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,249 +1,188 @@
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;
7
+ exports.hasOnlyClassicConnections = hasOnlyClassicConnections;
4
8
  exports.isSSOEnabled = isSSOEnabled;
5
9
  exports.matchesEnterpriseConnection = matchesEnterpriseConnection;
6
10
  exports.usernameStyle = usernameStyle;
7
- exports.hasOnlyClassicConnections = hasOnlyClassicConnections;
8
-
9
- var _index = require('../index');
10
-
11
- var _index2 = _interopRequireDefault(_index);
12
-
13
- var _login = require('./classic/login');
14
-
15
- var _login2 = _interopRequireDefault(_login);
16
-
17
- var _sign_up_screen = require('./classic/sign_up_screen');
18
-
19
- var _sign_up_screen2 = _interopRequireDefault(_sign_up_screen);
20
-
21
- var _mfa_login_screen = require('./classic/mfa_login_screen');
22
-
23
- var _mfa_login_screen2 = _interopRequireDefault(_mfa_login_screen);
24
-
25
- var _reset_password = require('../connection/database/reset_password');
26
-
27
- var _reset_password2 = _interopRequireDefault(_reset_password);
28
-
29
- var _index3 = require('../core/sso/index');
30
-
31
- var sso = _interopRequireWildcard(_index3);
32
-
33
- var _index4 = require('../connection/database/index');
34
-
35
- var _enterprise = require('../connection/enterprise');
36
-
37
- var _tenant = require('../core/tenant');
38
-
39
- var _email = require('../field/email');
40
-
41
- var _username = require('../field/username');
42
-
43
- var _index5 = require('../core/index');
44
-
45
- var l = _interopRequireWildcard(_index5);
46
-
47
- var _kerberos_screen = require('../connection/enterprise/kerberos_screen');
48
-
49
- var _kerberos_screen2 = _interopRequireDefault(_kerberos_screen);
50
-
51
- var _hrd_screen = require('../connection/enterprise/hrd_screen');
52
-
53
- var _hrd_screen2 = _interopRequireDefault(_hrd_screen);
54
-
55
- var _quick_auth_screen = require('../connection/enterprise/quick_auth_screen');
56
-
57
- var _quick_auth_screen2 = _interopRequireDefault(_quick_auth_screen);
58
-
59
- var _quick_auth = require('../quick_auth');
60
-
61
- var _loading_screen = require('../core/loading_screen');
62
-
63
- var _loading_screen2 = _interopRequireDefault(_loading_screen);
64
-
65
- var _error_screen = require('../core/error_screen');
66
-
67
- var _error_screen2 = _interopRequireDefault(_error_screen);
68
-
69
- var _last_login_screen = require('../core/sso/last_login_screen');
70
-
71
- var _last_login_screen2 = _interopRequireDefault(_last_login_screen);
72
-
73
- var _sync = require('../sync');
74
-
75
- var _index6 = require('../field/index');
76
-
77
- var _index7 = require('../store/index');
78
-
79
- 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; } }
80
-
11
+ var _index = _interopRequireDefault(require("../index"));
12
+ var _login = _interopRequireDefault(require("./classic/login"));
13
+ var _sign_up_screen = _interopRequireDefault(require("./classic/sign_up_screen"));
14
+ var _mfa_login_screen = _interopRequireDefault(require("./classic/mfa_login_screen"));
15
+ var _reset_password = _interopRequireDefault(require("../connection/database/reset_password"));
16
+ var sso = _interopRequireWildcard(require("../core/sso/index"));
17
+ var _index3 = require("../connection/database/index");
18
+ var _enterprise = require("../connection/enterprise");
19
+ var _tenant = require("../core/tenant");
20
+ var _email = require("../field/email");
21
+ var _username = require("../field/username");
22
+ var l = _interopRequireWildcard(require("../core/index"));
23
+ var _kerberos_screen = _interopRequireDefault(require("../connection/enterprise/kerberos_screen"));
24
+ var _hrd_screen = _interopRequireDefault(require("../connection/enterprise/hrd_screen"));
25
+ var _quick_auth_screen = _interopRequireDefault(require("../connection/enterprise/quick_auth_screen"));
26
+ var _quick_auth = require("../quick_auth");
27
+ var _loading_screen = _interopRequireDefault(require("../core/loading_screen"));
28
+ var _error_screen = _interopRequireDefault(require("../core/error_screen"));
29
+ var _last_login_screen = _interopRequireDefault(require("../core/sso/last_login_screen"));
30
+ var _sync = require("../sync");
31
+ var _index5 = require("../field/index");
32
+ var _index6 = require("../store/index");
33
+ 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); }
34
+ 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; }
81
35
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
82
-
36
+ 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); }
83
37
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
84
-
38
+ 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); } }
39
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
40
+ 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; }
41
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
42
+ 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); }
85
43
  function isSSOEnabled(m, options) {
86
- return matchesEnterpriseConnection(m, (0, _index4.databaseUsernameValue)(m, options));
44
+ return matchesEnterpriseConnection(m, (0, _index3.databaseUsernameValue)(m, options));
87
45
  }
88
-
89
46
  function matchesEnterpriseConnection(m, usernameValue) {
90
47
  return (0, _enterprise.isEnterpriseDomain)(m, usernameValue);
91
48
  }
92
-
93
49
  function usernameStyle(m) {
94
- return (0, _index4.authWithUsername)(m) && !(0, _enterprise.isADEnabled)(m) ? 'username' : 'email';
50
+ return (0, _index3.authWithUsername)(m) && !(0, _enterprise.isADEnabled)(m) ? 'username' : 'email';
95
51
  }
96
-
97
52
  function hasOnlyClassicConnections(m) {
98
53
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
99
-
100
- for (var _len = arguments.length, strategies = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
54
+ for (var _len = arguments.length, strategies = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
101
55
  strategies[_key - 2] = arguments[_key];
102
56
  }
103
-
104
57
  return l.hasOnlyConnections.apply(l, [m, type].concat(strategies)) && !l.hasSomeConnections(m, 'passwordless');
105
58
  }
106
-
107
59
  function validateAllowedConnections(m) {
108
60
  var anyDBConnection = l.hasSomeConnections(m, 'database');
109
61
  var anySocialConnection = l.hasSomeConnections(m, 'social');
110
62
  var anyEnterpriseConnection = l.hasSomeConnections(m, 'enterprise');
111
-
112
63
  if (!anyDBConnection && !anySocialConnection && !anyEnterpriseConnection) {
113
64
  var error = new Error('At least one database, enterprise or social connection needs to be available.');
114
65
  error.code = 'no_connection';
115
66
  m = l.stop(m, error);
116
- } else if (!anyDBConnection && (0, _index4.hasInitialScreen)(m, 'forgotPassword')) {
67
+ } else if (!anyDBConnection && (0, _index3.hasInitialScreen)(m, 'forgotPassword')) {
117
68
  var _error = new Error('The `initialScreen` option was set to "forgotPassword" but no database connection is available.');
118
69
  _error.code = 'unavailable_initial_screen';
119
70
  m = l.stop(m, _error);
120
- } else if (!anyDBConnection && !anySocialConnection && (0, _index4.hasInitialScreen)(m, 'signUp')) {
71
+ } else if (!anyDBConnection && !anySocialConnection && (0, _index3.hasInitialScreen)(m, 'signUp')) {
121
72
  var _error2 = new Error('The `initialScreen` option was set to "signUp" but no database or social connection is available.');
122
73
  _error2.code = 'unavailable_initial_screen';
123
74
  m = l.stop(m, _error2);
124
75
  }
125
-
126
76
  if ((0, _tenant.defaultDirectoryName)(m) && !(0, _tenant.defaultDirectory)(m)) {
127
- l.error(m, 'The account\'s default directory "' + (0, _tenant.defaultDirectoryName)(m) + '" is not enabled.');
77
+ l.error(m, "The account's default directory \"".concat((0, _tenant.defaultDirectoryName)(m), "\" is not enabled."));
128
78
  }
129
-
130
- if ((0, _index4.defaultDatabaseConnectionName)(m) && !(0, _index4.defaultDatabaseConnection)(m)) {
131
- l.warn(m, 'The provided default database connection "' + (0, _index4.defaultDatabaseConnectionName)(m) + '" is not enabled.');
79
+ if ((0, _index3.defaultDatabaseConnectionName)(m) && !(0, _index3.defaultDatabaseConnection)(m)) {
80
+ l.warn(m, "The provided default database connection \"".concat((0, _index3.defaultDatabaseConnectionName)(m), "\" is not enabled."));
132
81
  }
133
-
134
82
  if ((0, _enterprise.defaultEnterpriseConnectionName)(m) && !(0, _enterprise.defaultEnterpriseConnection)(m)) {
135
- l.warn(m, 'The provided default enterprise connection "' + (0, _enterprise.defaultEnterpriseConnectionName)(m) + '" is not enabled or does not allow email/password authentication.');
83
+ l.warn(m, "The provided default enterprise connection \"".concat((0, _enterprise.defaultEnterpriseConnectionName)(m), "\" is not enabled or does not allow email/password authentication."));
136
84
  }
137
-
138
85
  return m;
139
86
  }
140
-
141
87
  var setPrefill = function setPrefill(m) {
142
88
  var _l$prefill$toJS = l.prefill(m).toJS(),
143
- email = _l$prefill$toJS.email,
144
- username = _l$prefill$toJS.username;
145
-
89
+ email = _l$prefill$toJS.email,
90
+ username = _l$prefill$toJS.username;
146
91
  if (typeof email === 'string') m = (0, _email.setEmail)(m, email);
147
92
  if (typeof username === 'string') m = (0, _username.setUsername)(m, username, 'username', false);
148
93
  return m;
149
94
  };
150
-
151
95
  function createErrorScreen(m, stopError) {
152
96
  setTimeout(function () {
153
- (0, _index7.swap)(_index7.updateEntity, 'lock', l.id(m), l.stop, stopError);
97
+ (0, _index6.swap)(_index6.updateEntity, 'lock', l.id(m), l.stop, stopError);
154
98
  }, 0);
155
-
156
- return new _error_screen2.default();
99
+ return new _error_screen.default();
157
100
  }
158
-
159
- var Classic = function () {
101
+ var Classic = /*#__PURE__*/function () {
160
102
  function Classic() {
161
103
  _classCallCheck(this, Classic);
162
104
  }
163
-
164
- Classic.prototype.didInitialize = function didInitialize(model, options) {
165
- model = (0, _index4.initDatabase)(model, options);
166
- model = (0, _enterprise.initEnterprise)(model, options);
167
-
168
- return model;
169
- };
170
-
171
- Classic.prototype.didReceiveClientSettings = function didReceiveClientSettings(m) {
172
- m = validateAllowedConnections(m);
173
- m = setPrefill(m);
174
- return m;
175
- };
176
-
177
- Classic.prototype.willShow = function willShow(m, opts) {
178
- m = (0, _index4.overrideDatabaseOptions)(m, opts);
179
- m = (0, _index4.resolveAdditionalSignUpFields)(m);
180
- if ((0, _sync.isSuccess)(m, 'client')) {
181
- m = validateAllowedConnections(m);
105
+ _createClass(Classic, [{
106
+ key: "didInitialize",
107
+ value: function didInitialize(model, options) {
108
+ model = (0, _index3.initDatabase)(model, options);
109
+ model = (0, _enterprise.initEnterprise)(model, options);
110
+ return model;
182
111
  }
183
- return m;
184
- };
185
-
186
- Classic.prototype.render = function render(m) {
187
- //if there's an error, we should show the error screen no matter what.
188
- if (l.hasStopped(m)) {
189
- return new _error_screen2.default();
112
+ }, {
113
+ key: "didReceiveClientSettings",
114
+ value: function didReceiveClientSettings(m) {
115
+ m = validateAllowedConnections(m);
116
+ m = setPrefill(m);
117
+ return m;
190
118
  }
191
-
192
- // TODO: remove the detail about the loading pane being pinned,
193
- // sticky screens should be handled at the box module.
194
- if (!(0, _sync.isDone)(m) || m.get('isLoadingPanePinned')) {
195
- return new _loading_screen2.default();
119
+ }, {
120
+ key: "willShow",
121
+ value: function willShow(m, opts) {
122
+ m = (0, _index3.overrideDatabaseOptions)(m, opts);
123
+ m = (0, _index3.resolveAdditionalSignUpFields)(m);
124
+ if ((0, _sync.isSuccess)(m, 'client')) {
125
+ m = validateAllowedConnections(m);
126
+ }
127
+ return m;
196
128
  }
129
+ }, {
130
+ key: "render",
131
+ value: function render(m) {
132
+ //if there's an error, we should show the error screen no matter what.
133
+ if (l.hasStopped(m)) {
134
+ return new _error_screen.default();
135
+ }
197
136
 
198
- if ((0, _index4.hasScreen)(m, 'login')) {
199
- if (!(0, _quick_auth.hasSkippedQuickAuth)(m) && (0, _index4.hasInitialScreen)(m, 'login')) {
200
- if ((0, _enterprise.isInCorpNetwork)(m)) {
201
- return new _kerberos_screen2.default();
202
- }
203
-
204
- if (l.ui.rememberLastLogin(m)) {
205
- var lastUsedConnection = sso.lastUsedConnection(m);
206
- var lastUsedUsername = sso.lastUsedUsername(m);
207
- if (lastUsedConnection && (0, _sync.isSuccess)(m, 'sso') && l.hasConnection(m, lastUsedConnection.get('name')) && l.findConnection(m, lastUsedConnection.get('name')).get('type') !== 'passwordless') {
208
- return new _last_login_screen2.default();
137
+ // TODO: remove the detail about the loading pane being pinned,
138
+ // sticky screens should be handled at the box module.
139
+ if (!(0, _sync.isDone)(m) || m.get('isLoadingPanePinned')) {
140
+ return new _loading_screen.default();
141
+ }
142
+ if ((0, _index3.hasScreen)(m, 'login')) {
143
+ if (!(0, _quick_auth.hasSkippedQuickAuth)(m) && (0, _index3.hasInitialScreen)(m, 'login')) {
144
+ if ((0, _enterprise.isInCorpNetwork)(m)) {
145
+ return new _kerberos_screen.default();
209
146
  }
147
+ if (l.ui.rememberLastLogin(m)) {
148
+ var lastUsedConnection = sso.lastUsedConnection(m);
149
+ var lastUsedUsername = sso.lastUsedUsername(m);
150
+ if (lastUsedConnection && (0, _sync.isSuccess)(m, 'sso') && l.hasConnection(m, lastUsedConnection.get('name')) && l.findConnection(m, lastUsedConnection.get('name')).get('type') !== 'passwordless') {
151
+ return new _last_login_screen.default();
152
+ }
153
+ }
154
+ }
155
+ if ((0, _enterprise.quickAuthConnection)(m)) {
156
+ return new _quick_auth_screen.default();
157
+ }
158
+ if ((0, _enterprise.isHRDActive)(m)) {
159
+ return new _hrd_screen.default();
210
160
  }
211
161
  }
212
-
213
- if ((0, _enterprise.quickAuthConnection)(m)) {
214
- return new _quick_auth_screen2.default();
162
+ if (!(0, _index3.hasScreen)(m, 'login') && !(0, _index3.hasScreen)(m, 'signUp') && !(0, _index3.hasScreen)(m, 'forgotPassword')) {
163
+ var errorMessage = 'No available Screen. You have to allow at least one of those screens: `login`, `signUp`or `forgotPassword`.';
164
+ var noAvailableScreenError = new Error(errorMessage);
165
+ noAvailableScreenError.code = 'internal_error';
166
+ noAvailableScreenError.description = errorMessage;
167
+ return createErrorScreen(m, noAvailableScreenError);
215
168
  }
216
-
217
- if ((0, _enterprise.isHRDActive)(m)) {
218
- return new _hrd_screen2.default();
169
+ var Screen = Classic.SCREENS[(0, _index3.getScreen)(m)];
170
+ if (Screen) {
171
+ return new Screen();
219
172
  }
173
+ var noScreenError = new Error('Internal error');
174
+ noScreenError.code = 'internal_error';
175
+ noScreenError.description = "Couldn't find a screen \"".concat((0, _index3.getScreen)(m), "\"");
176
+ return createErrorScreen(m, noScreenError);
220
177
  }
221
-
222
- if (!(0, _index4.hasScreen)(m, 'login') && !(0, _index4.hasScreen)(m, 'signUp') && !(0, _index4.hasScreen)(m, 'forgotPassword')) {
223
- var errorMessage = 'No available Screen. You have to allow at least one of those screens: `login`, `signUp`or `forgotPassword`.';
224
- var noAvailableScreenError = new Error(errorMessage);
225
- noAvailableScreenError.code = 'internal_error';
226
- noAvailableScreenError.description = errorMessage;
227
- return createErrorScreen(m, noAvailableScreenError);
228
- }
229
-
230
- var Screen = Classic.SCREENS[(0, _index4.getScreen)(m)];
231
- if (Screen) {
232
- return new Screen();
233
- }
234
- var noScreenError = new Error('Internal error');
235
- noScreenError.code = 'internal_error';
236
- noScreenError.description = 'Couldn\'t find a screen "' + (0, _index4.getScreen)(m) + '"';
237
- return createErrorScreen(m, noScreenError);
238
- };
239
-
178
+ }]);
240
179
  return Classic;
241
180
  }();
242
-
243
- Classic.SCREENS = {
244
- login: _login2.default,
245
- forgotPassword: _reset_password2.default,
246
- signUp: _sign_up_screen2.default,
247
- mfaLogin: _mfa_login_screen2.default
248
- };
249
- exports.default = new Classic();
181
+ _defineProperty(Classic, "SCREENS", {
182
+ login: _login.default,
183
+ forgotPassword: _reset_password.default,
184
+ signUp: _sign_up_screen.default,
185
+ mfaLogin: _mfa_login_screen.default
186
+ });
187
+ var _default = new Classic();
188
+ exports.default = _default;
@@ -1,71 +1,48 @@
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 _email_pane = require('../../field/email/email_pane');
14
-
15
- var _email_pane2 = _interopRequireDefault(_email_pane);
16
-
17
- var _social_buttons_pane = require('../../field/social/social_buttons_pane');
18
-
19
- var _social_buttons_pane2 = _interopRequireDefault(_social_buttons_pane);
20
-
21
- var _captcha_pane = require('../../field/captcha/captcha_pane');
22
-
23
- var _captcha_pane2 = _interopRequireDefault(_captcha_pane);
24
-
25
- var _captcha = require('../../connection/captcha');
26
-
27
- var _pane_separator = require('../../core/pane_separator');
28
-
29
- var _pane_separator2 = _interopRequireDefault(_pane_separator);
30
-
31
- var _index = require('../../connection/passwordless/index');
32
-
33
- var _actions = require('../../connection/passwordless/actions');
34
-
35
- var _email_sent_confirmation = require('../../connection/passwordless/email_sent_confirmation');
36
-
37
- var _signed_in_confirmation = require('../../core/signed_in_confirmation');
38
-
39
- var _index2 = require('../../core/index');
40
-
41
- var l = _interopRequireWildcard(_index2);
42
-
43
- var _sign_up_terms = require('../../connection/database/sign_up_terms');
44
-
45
- var _sign_up_terms2 = _interopRequireDefault(_sign_up_terms);
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
-
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 _email_pane = _interopRequireDefault(require("../../field/email/email_pane"));
11
+ var _social_buttons_pane = _interopRequireDefault(require("../../field/social/social_buttons_pane"));
12
+ var _captcha_pane = _interopRequireDefault(require("../../field/captcha/captcha_pane"));
13
+ var _captcha = require("../../connection/captcha");
14
+ var _pane_separator = _interopRequireDefault(require("../../core/pane_separator"));
15
+ var _index = require("../../connection/passwordless/index");
16
+ var _actions = require("../../connection/passwordless/actions");
17
+ var _email_sent_confirmation = require("../../connection/passwordless/email_sent_confirmation");
18
+ var _signed_in_confirmation = require("../../core/signed_in_confirmation");
19
+ var l = _interopRequireWildcard(require("../../core/index"));
20
+ var _sign_up_terms = _interopRequireDefault(require("../../connection/database/sign_up_terms"));
21
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
22
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
49
23
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50
-
51
24
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
52
-
53
- 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; }
54
-
55
- 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; }
56
-
25
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
26
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
27
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
28
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
29
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
30
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
32
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
33
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
34
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
35
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
57
36
  var Component = function Component(_ref) {
58
37
  var i18n = _ref.i18n,
59
- model = _ref.model;
60
-
61
- var social = l.hasSomeConnections(model, 'social') ? _react2.default.createElement(_social_buttons_pane2.default, {
38
+ model = _ref.model;
39
+ var social = l.hasSomeConnections(model, 'social') ? /*#__PURE__*/_react.default.createElement(_social_buttons_pane.default, {
62
40
  instructions: i18n.html('socialLoginInstructions'),
63
41
  labelFn: i18n.str,
64
42
  lock: model,
65
43
  signUp: true
66
44
  }) : null;
67
-
68
- var email = l.hasSomeConnections(model, 'passwordless', 'email') ? _react2.default.createElement(_email_pane2.default, {
45
+ var email = l.hasSomeConnections(model, 'passwordless', 'email') ? /*#__PURE__*/_react.default.createElement(_email_pane.default, {
69
46
  i18n: i18n,
70
47
  lock: model,
71
48
  placeholder: i18n.str('emailInputPlaceholder'),
@@ -78,72 +55,59 @@ var Component = function Component(_ref) {
78
55
  //
79
56
  // Maybe we can make new PasswordlessEmailPane component.
80
57
  var emailInstructionsI18nKey = social ? 'passwordlessEmailAlternativeInstructions' : 'passwordlessEmailInstructions';
81
-
82
58
  var headerText = i18n.html(emailInstructionsI18nKey) || null;
83
- var header = email && headerText && _react2.default.createElement(
84
- 'p',
85
- null,
86
- headerText
87
- );
88
-
89
- var separator = social && email ? _react2.default.createElement(_pane_separator2.default, null) : null;
90
-
91
- var captchaPane = l.passwordlessCaptcha(model) && l.passwordlessCaptcha(model).get('required') ? _react2.default.createElement(_captcha_pane2.default, { i18n: i18n, lock: model, isPasswordless: true, onReload: function onReload() {
59
+ var header = email && headerText && /*#__PURE__*/_react.default.createElement("p", null, headerText);
60
+ var separator = social && email ? /*#__PURE__*/_react.default.createElement(_pane_separator.default, null) : null;
61
+ var captchaPane = l.passwordlessCaptcha(model) && l.passwordlessCaptcha(model).get('required') ? /*#__PURE__*/_react.default.createElement(_captcha_pane.default, {
62
+ i18n: i18n,
63
+ lock: model,
64
+ isPasswordless: true,
65
+ onReload: function onReload() {
92
66
  return (0, _captcha.swapCaptcha)(l.id(model), true, false);
93
- } }) : null;
94
-
95
- return _react2.default.createElement(
96
- 'div',
97
- null,
98
- social,
99
- separator,
100
- header,
101
- email,
102
- captchaPane
103
- );
67
+ }
68
+ }) : null;
69
+ return /*#__PURE__*/_react.default.createElement("div", null, social, separator, header, email, captchaPane);
104
70
  };
105
-
106
- var SocialOrEmailLoginScreen = function (_Screen) {
71
+ var SocialOrEmailLoginScreen = /*#__PURE__*/function (_Screen) {
107
72
  _inherits(SocialOrEmailLoginScreen, _Screen);
108
-
73
+ var _super = _createSuper(SocialOrEmailLoginScreen);
109
74
  function SocialOrEmailLoginScreen() {
110
75
  _classCallCheck(this, SocialOrEmailLoginScreen);
111
-
112
- return _possibleConstructorReturn(this, _Screen.call(this, 'socialOrEmail'));
76
+ return _super.call(this, 'socialOrEmail');
113
77
  }
114
-
115
- SocialOrEmailLoginScreen.prototype.submitHandler = function submitHandler(m) {
116
- return l.hasSomeConnections(m, 'passwordless', 'email') ? _actions.requestPasswordlessEmail : null;
117
- };
118
-
119
- SocialOrEmailLoginScreen.prototype.renderAuxiliaryPane = function renderAuxiliaryPane(lock) {
120
- return (0, _email_sent_confirmation.renderEmailSentConfirmation)(lock) || (0, _signed_in_confirmation.renderSignedInConfirmation)(lock);
121
- };
122
-
123
- SocialOrEmailLoginScreen.prototype.render = function render() {
124
- return Component;
125
- };
126
-
127
- SocialOrEmailLoginScreen.prototype.isSubmitDisabled = function isSubmitDisabled(m) {
128
- return !(0, _index.termsAccepted)(m);
129
- };
130
-
131
- SocialOrEmailLoginScreen.prototype.renderTerms = function renderTerms(m, terms) {
132
- var checkHandler = (0, _index.mustAcceptTerms)(m) ? function () {
133
- return (0, _actions.toggleTermsAcceptance)(l.id(m));
134
- } : undefined;
135
- return terms && (0, _index.showTerms)(m) ? _react2.default.createElement(
136
- _sign_up_terms2.default,
137
- {
78
+ _createClass(SocialOrEmailLoginScreen, [{
79
+ key: "submitHandler",
80
+ value: function submitHandler(m) {
81
+ return l.hasSomeConnections(m, 'passwordless', 'email') ? _actions.requestPasswordlessEmail : null;
82
+ }
83
+ }, {
84
+ key: "renderAuxiliaryPane",
85
+ value: function renderAuxiliaryPane(lock) {
86
+ return (0, _email_sent_confirmation.renderEmailSentConfirmation)(lock) || (0, _signed_in_confirmation.renderSignedInConfirmation)(lock);
87
+ }
88
+ }, {
89
+ key: "render",
90
+ value: function render() {
91
+ return Component;
92
+ }
93
+ }, {
94
+ key: "isSubmitDisabled",
95
+ value: function isSubmitDisabled(m) {
96
+ return !(0, _index.termsAccepted)(m);
97
+ }
98
+ }, {
99
+ key: "renderTerms",
100
+ value: function renderTerms(m, terms) {
101
+ var checkHandler = (0, _index.mustAcceptTerms)(m) ? function () {
102
+ return (0, _actions.toggleTermsAcceptance)(l.id(m));
103
+ } : undefined;
104
+ return terms && (0, _index.showTerms)(m) ? /*#__PURE__*/_react.default.createElement(_sign_up_terms.default, {
138
105
  showCheckbox: (0, _index.mustAcceptTerms)(m),
139
106
  checkHandler: checkHandler,
140
107
  checked: (0, _index.termsAccepted)(m)
141
- },
142
- terms
143
- ) : null;
144
- };
145
-
108
+ }, terms) : null;
109
+ }
110
+ }]);
146
111
  return SocialOrEmailLoginScreen;
147
- }(_screen2.default);
148
-
112
+ }(_screen.default);
149
113
  exports.default = SocialOrEmailLoginScreen;