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,71 +1,59 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- exports.__esModule = true;
4
- exports.STRATEGIES = undefined;
5
- exports.initEnterprise = initEnterprise;
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.STRATEGIES = void 0;
8
+ exports.corpNetworkConnection = corpNetworkConnection;
6
9
  exports.defaultEnterpriseConnection = defaultEnterpriseConnection;
7
10
  exports.defaultEnterpriseConnectionName = defaultEnterpriseConnectionName;
8
11
  exports.enterpriseActiveFlowConnection = enterpriseActiveFlowConnection;
9
- exports.matchConnection = matchConnection;
10
- exports.isEnterpriseDomain = isEnterpriseDomain;
11
12
  exports.enterpriseDomain = enterpriseDomain;
12
- exports.quickAuthConnection = quickAuthConnection;
13
- exports.isADEnabled = isADEnabled;
14
13
  exports.findADConnectionWithoutDomain = findADConnectionWithoutDomain;
14
+ exports.initEnterprise = initEnterprise;
15
+ exports.isADEnabled = isADEnabled;
16
+ exports.isEnterpriseDomain = isEnterpriseDomain;
17
+ exports.isHRDActive = isHRDActive;
18
+ exports.isHRDDomain = isHRDDomain;
19
+ exports.isHRDEmailValid = isHRDEmailValid;
15
20
  exports.isInCorpNetwork = isInCorpNetwork;
16
- exports.corpNetworkConnection = corpNetworkConnection;
17
21
  exports.isSingleHRDConnection = isSingleHRDConnection;
18
- exports.isHRDDomain = isHRDDomain;
22
+ exports.matchConnection = matchConnection;
23
+ exports.quickAuthConnection = quickAuthConnection;
19
24
  exports.toggleHRD = toggleHRD;
20
- exports.isHRDActive = isHRDActive;
21
- exports.isHRDEmailValid = isHRDEmailValid;
22
-
23
- var _immutable = require('immutable');
24
-
25
- var _immutable2 = _interopRequireDefault(_immutable);
26
-
27
- var _index = require('../core/index');
28
-
29
- var l = _interopRequireWildcard(_index);
30
-
31
- var _index2 = require('../field/index');
32
-
33
- var c = _interopRequireWildcard(_index2);
34
-
35
- var _data_utils = require('../utils/data_utils');
36
-
37
- var _email = require('../field/email');
38
-
39
- var _username = require('../field/username');
40
-
41
- var _classic = require('../engine/classic');
42
-
43
- var _index3 = require('./database/index');
44
-
45
- var _index4 = require('../store/index');
46
-
47
- 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; } }
48
-
49
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50
-
25
+ var _immutable = _interopRequireWildcard(require("immutable"));
26
+ var l = _interopRequireWildcard(require("../core/index"));
27
+ var c = _interopRequireWildcard(require("../field/index"));
28
+ var _data_utils = require("../utils/data_utils");
29
+ var _email = require("../field/email");
30
+ var _username = require("../field/username");
31
+ var _classic = require("../engine/classic");
32
+ var _index3 = require("./database/index");
33
+ var _index4 = require("../store/index");
34
+ 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); }
35
+ 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; }
36
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
37
+ 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."); }
38
+ 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); }
39
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
40
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
41
+ 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; }
51
42
  var _dataFns = (0, _data_utils.dataFns)(['enterprise']),
52
- get = _dataFns.get,
53
- initNS = _dataFns.initNS,
54
- tget = _dataFns.tget,
55
- tremove = _dataFns.tremove,
56
- tset = _dataFns.tset;
57
-
43
+ get = _dataFns.get,
44
+ initNS = _dataFns.initNS,
45
+ tget = _dataFns.tget,
46
+ tremove = _dataFns.tremove,
47
+ tset = _dataFns.tset;
58
48
  var _dataFns2 = (0, _data_utils.dataFns)(['core']),
59
- tremoveCore = _dataFns2.tremove,
60
- tsetCore = _dataFns2.tset,
61
- tgetCore = _dataFns2.tget;
49
+ tremoveCore = _dataFns2.tremove,
50
+ tsetCore = _dataFns2.tset,
51
+ tgetCore = _dataFns2.tget;
62
52
 
63
53
  // TODO: Android version also has "google-opendid" in the list, but we
64
54
  // consider it to be a social connection. See
65
55
  // https://github.com/auth0/Lock.Android/blob/98262cb7110e5d1c8a97e1129faf2621c1d8d111/lock/src/main/java/com/auth0/android/lock/utils/Strategies.java
66
-
67
-
68
- var STRATEGIES = exports.STRATEGIES = {
56
+ var STRATEGIES = {
69
57
  ad: 'AD / LDAP',
70
58
  adfs: 'ADFS',
71
59
  'auth0-adldap': 'AD/LDAP',
@@ -82,32 +70,27 @@ var STRATEGIES = exports.STRATEGIES = {
82
70
  oidc: 'OpenID Connect',
83
71
  okta: 'Okta Workforce'
84
72
  };
85
-
73
+ exports.STRATEGIES = STRATEGIES;
86
74
  function initEnterprise(m, opts) {
87
- return initNS(m, _immutable2.default.fromJS(processOptions(opts)));
75
+ return initNS(m, _immutable.default.fromJS(processOptions(opts)));
88
76
  }
89
-
90
77
  function processOptions(opts) {
91
78
  var defaultEnterpriseConnection = opts.defaultEnterpriseConnection;
92
-
93
-
94
79
  if (defaultEnterpriseConnection != undefined && typeof defaultEnterpriseConnection !== 'string') {
95
80
  l.warn(opts, 'The `defaultEnterpriseConnection` option will be ignored, because it is not a string.');
96
81
  defaultEnterpriseConnection = undefined;
97
82
  }
98
-
99
- return defaultEnterpriseConnection === undefined ? {} : { defaultConnectionName: defaultEnterpriseConnection };
83
+ return defaultEnterpriseConnection === undefined ? {} : {
84
+ defaultConnectionName: defaultEnterpriseConnection
85
+ };
100
86
  }
101
-
102
87
  function defaultEnterpriseConnection(m) {
103
88
  var name = defaultEnterpriseConnectionName(m);
104
89
  return name && findADConnectionWithoutDomain(m, name);
105
90
  }
106
-
107
91
  function defaultEnterpriseConnectionName(m) {
108
92
  return get(m, 'defaultConnectionName');
109
93
  }
110
-
111
94
  function enterpriseActiveFlowConnection(m) {
112
95
  if (isHRDActive(m)) {
113
96
  // HRD is active when an email matched or there is only one
@@ -118,27 +101,21 @@ function enterpriseActiveFlowConnection(m) {
118
101
  return defaultEnterpriseConnection(m) || findADConnectionWithoutDomain(m);
119
102
  }
120
103
  }
121
-
122
104
  function matchConnection(m, email) {
123
105
  var strategies = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
124
-
125
106
  var target = (0, _email.emailDomain)(email);
126
107
  if (!target) return false;
127
- return l.connections.apply(l, [m, 'enterprise'].concat(strategies)).find(function (x) {
108
+ return l.connections.apply(l, [m, 'enterprise'].concat(_toConsumableArray(strategies))).find(function (x) {
128
109
  return x.get('domains').contains(target);
129
110
  });
130
111
  }
131
-
132
112
  function isEnterpriseDomain(m, email) {
133
113
  var strategies = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
134
-
135
114
  return !!matchConnection(m, email, strategies);
136
115
  }
137
-
138
116
  function enterpriseDomain(m) {
139
117
  return isSingleHRDConnection(m) ? l.connections(m, 'enterprise').getIn([0, 'domains', 0]) : (0, _email.emailDomain)(tget(m, 'hrdEmail'));
140
118
  }
141
-
142
119
  function quickAuthConnection(m) {
143
120
  return !isADEnabled(m) && l.hasOneConnection(m, 'enterprise') ? l.connections(m, 'enterprise').get(0) : null;
144
121
  }
@@ -149,18 +126,14 @@ function quickAuthConnection(m) {
149
126
  function isADEnabled(m) {
150
127
  return l.hasSomeConnections(m, 'enterprise', 'ad', 'auth0-adldap');
151
128
  }
152
-
153
129
  function findADConnectionWithoutDomain(m) {
154
130
  var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
155
-
156
131
  return l.connections(m, 'enterprise', 'ad', 'auth0-adldap').find(function (x) {
157
132
  return x.get('domains').isEmpty() && (!name || x.get('name') === name);
158
133
  });
159
134
  }
160
-
161
135
  function findActiveFlowConnection(m) {
162
136
  var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
163
-
164
137
  return l.connections(m, 'enterprise', 'ad', 'auth0-adldap').find(function (x) {
165
138
  return !name || x.get('name') === name;
166
139
  });
@@ -171,14 +144,15 @@ function findActiveFlowConnection(m) {
171
144
  function isInCorpNetwork(m) {
172
145
  return corpNetworkConnection(m) !== undefined;
173
146
  }
174
-
175
147
  function corpNetworkConnection(m) {
176
148
  // Information about connection is stored in to flat properties connection and strategy.
177
149
  // If connection is present, strategy will always be present as defined by the server.
178
150
  var name = m.getIn(['sso', 'connection']);
179
151
  var strategy = m.getIn(['sso', 'strategy']);
180
-
181
- return name && strategy && _immutable2.default.Map({ name: name, strategy: strategy });
152
+ return name && strategy && _immutable.default.Map({
153
+ name: name,
154
+ strategy: strategy
155
+ });
182
156
  }
183
157
 
184
158
  // hrd
@@ -186,15 +160,12 @@ function corpNetworkConnection(m) {
186
160
  function isSingleHRDConnection(m) {
187
161
  return isADEnabled(m) && l.connections(m).count() === 1;
188
162
  }
189
-
190
163
  function isHRDDomain(m, email) {
191
164
  return isEnterpriseDomain(m, email, ['ad', 'auth0-adldap']);
192
165
  }
193
-
194
166
  function toggleHRD(m, email) {
195
167
  if (email) {
196
168
  var username = l.defaultADUsernameFromEmailPrefix(m) ? (0, _email.emailLocalPart)(email) : email;
197
-
198
169
  m = (0, _username.setUsername)(m, username, 'username', false);
199
170
  m = tset(m, 'hrdEmail', email);
200
171
  } else {
@@ -204,18 +175,14 @@ function toggleHRD(m, email) {
204
175
  }
205
176
  m = tremove(m, 'hrdEmail');
206
177
  }
207
-
208
178
  return tset(m, 'hrd', !!email);
209
179
  }
210
-
211
180
  function isHRDActive(m) {
212
181
  return tget(m, 'hrd', isSingleHRDConnection(m));
213
182
  }
214
-
215
183
  function isHRDEmailValid(m, str) {
216
184
  if ((0, _email.isEmail)(str) && !l.hasSomeConnections(m, 'database') && !l.hasSomeConnections(m, 'passwordless') && !findADConnectionWithoutDomain(m) && !(0, _classic.matchesEnterpriseConnection)(m, str)) {
217
185
  return false;
218
186
  }
219
-
220
187
  return true;
221
188
  }
@@ -1,125 +1,95 @@
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; };
1
+ "use strict";
6
2
 
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.logIn = logIn;
7
7
  exports.requestPasswordlessEmail = requestPasswordlessEmail;
8
- exports.requestPasswordlessEmailSuccess = requestPasswordlessEmailSuccess;
9
8
  exports.requestPasswordlessEmailError = requestPasswordlessEmailError;
9
+ exports.requestPasswordlessEmailSuccess = requestPasswordlessEmailSuccess;
10
10
  exports.resendEmail = resendEmail;
11
- exports.sendSMS = sendSMS;
12
- exports.logIn = logIn;
13
11
  exports.restart = restart;
12
+ exports.sendSMS = sendSMS;
14
13
  exports.toggleTermsAcceptance = toggleTermsAcceptance;
15
-
16
- var _index = require('../../store/index');
17
-
18
- var _actions = require('../../core/actions');
19
-
20
- var _web_api = require('../../core/web_api');
21
-
22
- var _web_api2 = _interopRequireDefault(_web_api);
23
-
24
- var _index2 = require('../../field/index');
25
-
26
- var c = _interopRequireWildcard(_index2);
27
-
28
- var _index3 = require('../../core/index');
29
-
30
- var l = _interopRequireWildcard(_index3);
31
-
32
- var _index4 = require('./index');
33
-
34
- var _phone_number = require('../../field/phone_number');
35
-
36
- var _i18n = require('../../i18n');
37
-
38
- var i18n = _interopRequireWildcard(_i18n);
39
-
40
- var _captcha = require('../captcha');
41
-
42
- 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; } }
43
-
14
+ var _index = require("../../store/index");
15
+ var _actions = require("../../core/actions");
16
+ var _web_api = _interopRequireDefault(require("../../core/web_api"));
17
+ var c = _interopRequireWildcard(require("../../field/index"));
18
+ var l = _interopRequireWildcard(require("../../core/index"));
19
+ var _index4 = require("./index");
20
+ var _phone_number = require("../../field/phone_number");
21
+ var i18n = _interopRequireWildcard(require("../../i18n"));
22
+ var _captcha = require("../captcha");
23
+ 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); }
24
+ 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; }
44
25
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
45
-
26
+ 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); }
27
+ 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; }
28
+ 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; }
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); }
46
32
  function getErrorMessage(m, id, error) {
47
33
  var key = error.error;
48
-
49
34
  if (error.error === 'sms_provider_error' && (error.description || '').indexOf('(Code: 21211)') > -1) {
50
35
  key = 'bad.phone_number';
51
36
  }
52
-
53
37
  if (error.code === 'invalid_captcha') {
54
38
  var captchaConfig = l.passwordlessCaptcha(m);
55
39
  key = captchaConfig.get('provider') === 'recaptcha_v2' || captchaConfig.get('provider') === 'recaptcha_enterprise' ? 'invalid_recaptcha' : 'invalid_captcha';
56
40
  }
57
-
58
41
  return i18n.html(m, ['error', 'passwordless', key]) || i18n.html(m, ['error', 'passwordless', 'lock.fallback']);
59
42
  }
60
-
61
43
  function swapCaptchaAfterError(id, error) {
62
44
  var wasCaptchaInvalid = error && error.code === 'invalid_captcha';
63
45
  (0, _captcha.swapCaptcha)(id, true, wasCaptchaInvalid);
64
46
  }
65
-
66
47
  function requestPasswordlessEmail(id) {
67
48
  (0, _actions.validateAndSubmit)(id, ['email'], function (m) {
68
49
  sendEmail(m, id, requestPasswordlessEmailSuccess, requestPasswordlessEmailError);
69
50
  });
70
51
  }
71
-
72
52
  function requestPasswordlessEmailSuccess(id) {
73
53
  (0, _index.swap)(_index.updateEntity, 'lock', id, function (m) {
74
54
  m = l.setSubmitting(m, false);
75
55
  return (0, _index4.setPasswordlessStarted)(m, true);
76
56
  });
77
57
  }
78
-
79
58
  function requestPasswordlessEmailError(id, error) {
80
59
  var m = (0, _index.read)(_index.getEntity, 'lock', id);
81
60
  var errorMessage = getErrorMessage(m, id, error);
82
61
  (0, _index.swap)(_index.updateEntity, 'lock', id, l.setSubmitting, false, errorMessage);
83
62
  swapCaptchaAfterError(id, error);
84
63
  }
85
-
86
64
  function resendEmail(id) {
87
65
  (0, _index.swap)(_index.updateEntity, 'lock', id, _index4.resend);
88
66
  var m = (0, _index.read)(_index.getEntity, 'lock', id);
89
67
  sendEmail(m, id, resendEmailSuccess, resendEmailError);
90
68
  }
91
-
92
69
  function resendEmailSuccess(id) {
93
70
  (0, _index.swap)(_index.updateEntity, 'lock', id, _index4.setResendSuccess);
94
71
  }
95
-
96
72
  function resendEmailError(id, error) {
97
73
  (0, _index.swap)(_index.updateEntity, 'lock', id, _index4.setResendFailed);
98
74
  }
99
-
100
75
  function getPasswordlessConnectionName(m, defaultPasswordlessConnection) {
101
76
  var connections = l.connections(m, 'passwordless', defaultPasswordlessConnection);
102
-
103
77
  return connections.size > 0 && l.useCustomPasswordlessConnection(m) ? connections.first().get('name') : defaultPasswordlessConnection;
104
78
  }
105
-
106
79
  function sendEmail(m, id, successFn, errorFn) {
107
80
  var params = {
108
81
  connection: getPasswordlessConnectionName(m, 'email'),
109
82
  email: c.getFieldValue(m, 'email'),
110
83
  send: (0, _index4.send)(m)
111
84
  };
112
-
113
85
  if ((0, _index4.isSendLink)(m) && !l.auth.params(m).isEmpty()) {
114
86
  params.authParams = l.auth.params(m).toJS();
115
87
  }
116
88
  var isCaptchaValid = (0, _captcha.setCaptchaParams)(m, params, true, []);
117
-
118
89
  if (!isCaptchaValid) {
119
90
  return (0, _captcha.showMissingCaptcha)(m, id, true);
120
91
  }
121
-
122
- _web_api2.default.startPasswordless(l.id(m), params, function (error) {
92
+ _web_api.default.startPasswordless(l.id(m), params, function (error) {
123
93
  if (error) {
124
94
  setTimeout(function () {
125
95
  return errorFn(l.id(m), error);
@@ -129,7 +99,6 @@ function sendEmail(m, id, successFn, errorFn) {
129
99
  }
130
100
  });
131
101
  }
132
-
133
102
  function sendSMS(id) {
134
103
  (0, _actions.validateAndSubmit)(id, ['phoneNumber'], function (m) {
135
104
  var params = {
@@ -141,7 +110,7 @@ function sendSMS(id) {
141
110
  if (!isCaptchaValid) {
142
111
  return (0, _captcha.showMissingCaptcha)(m, id, true);
143
112
  }
144
- _web_api2.default.startPasswordless(id, params, function (error) {
113
+ _web_api.default.startPasswordless(id, params, function (error) {
145
114
  if (error) {
146
115
  setTimeout(function () {
147
116
  return sendSMSError(id, error);
@@ -152,7 +121,6 @@ function sendSMS(id) {
152
121
  });
153
122
  });
154
123
  }
155
-
156
124
  function sendSMSSuccess(id) {
157
125
  (0, _index.swap)(_index.updateEntity, 'lock', id, function (m) {
158
126
  m = l.setSubmitting(m, false);
@@ -160,7 +128,6 @@ function sendSMSSuccess(id) {
160
128
  return m;
161
129
  });
162
130
  }
163
-
164
131
  function sendSMSError(id, error) {
165
132
  var m = (0, _index.read)(_index.getEntity, 'lock', id);
166
133
  var errorMessage = getErrorMessage(m, id, error);
@@ -168,11 +135,10 @@ function sendSMSError(id, error) {
168
135
  (0, _index.swap)(_index.updateEntity, 'lock', id, l.setSubmitting, false, errorMessage);
169
136
  swapCaptchaAfterError(id, error);
170
137
  }
171
-
172
138
  function logIn(id) {
173
139
  var m = (0, _index.read)(_index.getEntity, 'lock', id);
174
140
  var authParams = l.auth.params(m).toJS();
175
- var params = _extends({
141
+ var params = _objectSpread({
176
142
  verificationCode: c.getFieldValue(m, 'vcode')
177
143
  }, authParams);
178
144
  if ((0, _index4.isEmail)(m)) {
@@ -183,8 +149,8 @@ function logIn(id) {
183
149
  params.phoneNumber = (0, _phone_number.phoneNumberWithDiallingCode)(m);
184
150
  }
185
151
  (0, _index.swap)(_index.updateEntity, 'lock', id, l.setSubmitting, true);
186
- _web_api2.default.passwordlessVerify(id, params, function (error, result) {
187
- var errorMessage = void 0;
152
+ _web_api.default.passwordlessVerify(id, params, function (error, result) {
153
+ var errorMessage;
188
154
  if (error) {
189
155
  var _m = (0, _index.read)(_index.getEntity, 'lock', id);
190
156
  errorMessage = getErrorMessage(_m, id, error);
@@ -198,12 +164,10 @@ function logIn(id) {
198
164
  }
199
165
  });
200
166
  }
201
-
202
167
  function restart(id) {
203
168
  (0, _index.swap)(_index.updateEntity, 'lock', id, _index4.restartPasswordless);
204
169
  (0, _captcha.swapCaptcha)(id, true, false);
205
170
  }
206
-
207
171
  function toggleTermsAcceptance(id) {
208
172
  (0, _index.swap)(_index.updateEntity, 'lock', id, _index4.toggleTermsAcceptance);
209
173
  }
@@ -1,44 +1,36 @@
1
- 'use strict';
2
-
3
- exports.__esModule = true;
4
-
5
- var _react = require('react');
6
-
7
- var _react2 = _interopRequireDefault(_react);
8
-
9
- var _screen = require('../../core/screen');
10
-
11
- var _screen2 = _interopRequireDefault(_screen);
12
-
13
- var _vcode_pane = require('../../field/vcode/vcode_pane');
14
-
15
- var _vcode_pane2 = _interopRequireDefault(_vcode_pane);
16
-
17
- var _index = require('./index');
18
-
19
- var _actions = require('./actions');
20
-
21
- var _signed_in_confirmation = require('../../core/signed_in_confirmation');
22
-
23
- var _index2 = require('../../field/index');
24
-
25
- var _phone_number = require('../../field/phone_number');
26
-
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _screen = _interopRequireDefault(require("../../core/screen"));
10
+ var _vcode_pane = _interopRequireDefault(require("../../field/vcode/vcode_pane"));
11
+ var _index = require("./index");
12
+ var _actions = require("./actions");
13
+ var _signed_in_confirmation = require("../../core/signed_in_confirmation");
14
+ var _index2 = require("../../field/index");
15
+ var _phone_number = require("../../field/phone_number");
27
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
28
-
29
17
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
30
-
31
- 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; }
32
-
33
- 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; }
34
-
18
+ 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); } }
19
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
20
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
21
+ 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); }
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); }
35
29
  var Component = function Component(_ref) {
36
30
  var i18n = _ref.i18n,
37
- model = _ref.model;
38
-
31
+ model = _ref.model;
39
32
  var instructions = (0, _index.isEmail)(model) ? i18n.str('passwordlessEmailCodeInstructions', (0, _index2.getFieldValue)(model, 'email')) : i18n.str('passwordlessSMSCodeInstructions', (0, _phone_number.humanPhoneNumberWithDiallingCode)(model));
40
-
41
- return _react2.default.createElement(_vcode_pane2.default, {
33
+ return /*#__PURE__*/_react.default.createElement(_vcode_pane.default, {
42
34
  instructions: instructions,
43
35
  lock: model,
44
36
  placeholder: i18n.str('codeInputPlaceholder'),
@@ -46,33 +38,34 @@ var Component = function Component(_ref) {
46
38
  onRestart: _actions.restart
47
39
  });
48
40
  };
49
-
50
- var VcodeScreen = function (_Screen) {
41
+ var VcodeScreen = /*#__PURE__*/function (_Screen) {
51
42
  _inherits(VcodeScreen, _Screen);
52
-
43
+ var _super = _createSuper(VcodeScreen);
53
44
  function VcodeScreen() {
54
45
  _classCallCheck(this, VcodeScreen);
55
-
56
- return _possibleConstructorReturn(this, _Screen.call(this, 'vcode'));
46
+ return _super.call(this, 'vcode');
57
47
  }
58
-
59
- VcodeScreen.prototype.backHandler = function backHandler() {
60
- return _actions.restart;
61
- };
62
-
63
- VcodeScreen.prototype.submitHandler = function submitHandler() {
64
- return _actions.logIn;
65
- };
66
-
67
- VcodeScreen.prototype.renderAuxiliaryPane = function renderAuxiliaryPane(lock) {
68
- return (0, _signed_in_confirmation.renderSignedInConfirmation)(lock);
69
- };
70
-
71
- VcodeScreen.prototype.render = function render() {
72
- return Component;
73
- };
74
-
48
+ _createClass(VcodeScreen, [{
49
+ key: "backHandler",
50
+ value: function backHandler() {
51
+ return _actions.restart;
52
+ }
53
+ }, {
54
+ key: "submitHandler",
55
+ value: function submitHandler() {
56
+ return _actions.logIn;
57
+ }
58
+ }, {
59
+ key: "renderAuxiliaryPane",
60
+ value: function renderAuxiliaryPane(lock) {
61
+ return (0, _signed_in_confirmation.renderSignedInConfirmation)(lock);
62
+ }
63
+ }, {
64
+ key: "render",
65
+ value: function render() {
66
+ return Component;
67
+ }
68
+ }]);
75
69
  return VcodeScreen;
76
- }(_screen2.default);
77
-
70
+ }(_screen.default);
78
71
  exports.default = VcodeScreen;