auth0-lock 11.30.6 → 11.32.1

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.
@@ -66,7 +66,7 @@ function shouldRenderTabs(m) {
66
66
  if (l.hasSomeConnections(m, 'social') && (0, _index.hasInitialScreen)(m, 'signUp')) return (0, _index.hasScreen)(m, 'signUp');
67
67
  }
68
68
 
69
- var Component = function Component(_ref) {
69
+ var LoginComponent = function LoginComponent(_ref) {
70
70
  var i18n = _ref.i18n,
71
71
  model = _ref.model;
72
72
 
@@ -182,7 +182,7 @@ var Login = function (_Screen) {
182
182
  };
183
183
 
184
184
  Login.prototype.render = function render() {
185
- return Component;
185
+ return LoginComponent;
186
186
  };
187
187
 
188
188
  return Login;
@@ -32,7 +32,11 @@ var _index2 = require('../../core/index');
32
32
 
33
33
  var l = _interopRequireWildcard(_index2);
34
34
 
35
- var _actions = require('../../connection/database/actions');
35
+ var _captcha = require('../../connection/captcha');
36
+
37
+ var _enterprise = require('../../connection/enterprise');
38
+
39
+ var _classic = require('../classic');
36
40
 
37
41
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
38
42
 
@@ -71,6 +75,7 @@ var SignUpPane = function (_React$Component) {
71
75
  null,
72
76
  headerText
73
77
  );
78
+ var sso = (0, _classic.isSSOEnabled)(model);
74
79
 
75
80
  var usernamePane = !onlyEmail && (0, _index.databaseConnectionRequiresUsername)(model) && !(0, _index.signUpHideUsernameField)(model) ? _react2.default.createElement(_username_pane2.default, {
76
81
  i18n: i18n,
@@ -96,8 +101,8 @@ var SignUpPane = function (_React$Component) {
96
101
  });
97
102
  });
98
103
 
99
- var captchaPane = l.captcha(model) && l.captcha(model).get('required') ? _react2.default.createElement(_captcha_pane2.default, { i18n: i18n, lock: model, onReload: function onReload() {
100
- return (0, _actions.swapCaptcha)(l.id(model), false);
104
+ var captchaPane = l.captcha(model) && l.captcha(model).get('required') && ((0, _enterprise.isHRDDomain)(model, (0, _index.databaseUsernameValue)(model)) || !sso) ? _react2.default.createElement(_captcha_pane2.default, { i18n: i18n, lock: model, onReload: function onReload() {
105
+ return (0, _captcha.swapCaptcha)(l.id(model), false);
101
106
  } }) : null;
102
107
 
103
108
  var passwordPane = !onlyEmail && _react2.default.createElement(_password_pane2.default, {
@@ -53,14 +53,10 @@ var CaptchaPane = function (_React$Component) {
53
53
  lock = _props.lock,
54
54
  onReload = _props.onReload;
55
55
 
56
-
57
56
  var lockId = l.id(lock);
58
-
59
57
  var captcha = l.captcha(lock);
60
-
61
58
  var value = (0, _index3.getFieldValue)(lock, 'captcha');
62
59
  var isValid = !(0, _index3.isFieldVisiblyInvalid)(lock, 'captcha');
63
-
64
60
  var provider = captcha.get('provider');
65
61
 
66
62
  if ((0, _recaptcha.isRecaptcha)(provider)) {
package/lib/i18n.js CHANGED
@@ -125,7 +125,7 @@ function assertLanguage(m, language, base) {
125
125
  function syncLang(m, language, _cb) {
126
126
  (0, _cdn_utils.load)({
127
127
  method: 'registerLanguageDictionary',
128
- url: l.languageBaseUrl(m) + '/js/lock/' + '11.30.6' + '/' + language + '.js',
128
+ url: l.languageBaseUrl(m) + '/js/lock/' + '11.32.1' + '/' + language + '.js',
129
129
  check: function check(str) {
130
130
  return str && str === language;
131
131
  },
@@ -141,7 +141,9 @@ function registerLanguageDictionary(language, dictionary) {
141
141
  languageDictionaries[language] = _immutable2.default.fromJS(dictionary);
142
142
  }
143
143
 
144
- (0, _cdn_utils.preload)({
145
- method: 'registerLanguageDictionary',
146
- cb: registerLanguageDictionary
147
- });
144
+ if (typeof window !== 'undefined') {
145
+ (0, _cdn_utils.preload)({
146
+ method: 'registerLanguageDictionary',
147
+ cb: registerLanguageDictionary
148
+ });
149
+ }
package/lib/lock.js CHANGED
@@ -42,7 +42,7 @@ var Auth0Lock = function (_Core) {
42
42
 
43
43
 
44
44
  exports.default = Auth0Lock;
45
- Auth0Lock.version = '11.30.6';
45
+ Auth0Lock.version = '11.32.1';
46
46
 
47
47
  // TODO: should we have different telemetry for classic/passwordless?
48
48
  // TODO: should we set telemetry info before each request?
@@ -41,4 +41,4 @@ var Auth0LockPasswordless = function (_Core) {
41
41
  exports.default = Auth0LockPasswordless;
42
42
 
43
43
 
44
- Auth0LockPasswordless.version = '11.30.6';
44
+ Auth0LockPasswordless.version = '11.32.1';
@@ -36,6 +36,10 @@ var _header = require('./header');
36
36
 
37
37
  var _header2 = _interopRequireDefault(_header);
38
38
 
39
+ var _classnames = require('classnames');
40
+
41
+ var _classnames2 = _interopRequireDefault(_classnames);
42
+
39
43
  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; } }
40
44
 
41
45
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -172,7 +176,10 @@ var SubmitButton = function (_React$Component) {
172
176
  color = _props2.color,
173
177
  disabled = _props2.disabled,
174
178
  label = _props2.label,
175
- display = _props2.display;
179
+ display = _props2.display,
180
+ contentProps = _props2.contentProps;
181
+ var model = contentProps.model;
182
+
176
183
 
177
184
  var content = label ? _react2.default.createElement(
178
185
  'span',
@@ -184,6 +191,7 @@ var SubmitButton = function (_React$Component) {
184
191
  return _react2.default.createElement(
185
192
  'button',
186
193
  {
194
+ id: l.id(model) + '-submit',
187
195
  className: 'auth0-lock-submit',
188
196
  disabled: disabled,
189
197
  style: { backgroundColor: color, display: display },
@@ -374,6 +382,7 @@ var Chrome = function (_React$Component2) {
374
382
  title = _props5.title,
375
383
  classNames = _props5.classNames,
376
384
  scrollGlobalMessagesIntoView = _props5.scrollGlobalMessagesIntoView;
385
+ var model = contentProps.model;
377
386
  var _state = this.state,
378
387
  delayingShowSubmitButton = _state.delayingShowSubmitButton,
379
388
  moving = _state.moving,
@@ -418,17 +427,23 @@ var Chrome = function (_React$Component2) {
418
427
  }) : null;
419
428
 
420
429
  var Content = contentComponent;
421
-
422
- var className = 'auth0-lock-cred-pane';
423
430
  var isQuiet = !moving && !delayingShowSubmitButton;
424
- className += isQuiet ? ' auth0-lock-quiet' : ' auth0-lock-moving';
431
+
432
+ var className = (0, _classnames2.default)('auth0-lock-cred-pane', {
433
+ 'auth0-lock-quiet': isQuiet,
434
+ 'auth0-lock-moving': !isQuiet
435
+ });
436
+
437
+ var internalWrapperClass = (0, _classnames2.default)('auth0-lock-cred-pane-internal-wrapper', {
438
+ 'auto-height': l.ui.forceAutoHeight(model)
439
+ });
425
440
 
426
441
  return _react2.default.createElement(
427
442
  'div',
428
443
  { className: className },
429
444
  _react2.default.createElement(
430
445
  'div',
431
- { className: 'auth0-lock-cred-pane-internal-wrapper' },
446
+ { className: internalWrapperClass },
432
447
  _react2.default.createElement(
433
448
  'div',
434
449
  { className: 'auth0-lock-content-wrapper' },
@@ -112,7 +112,7 @@ var EscKeyDownHandler = function () {
112
112
  return EscKeyDownHandler;
113
113
  }();
114
114
 
115
- var IPHONE = window.navigator && !!window.navigator.userAgent.match(/iPhone/i);
115
+ var IPHONE = typeof window !== 'undefined' && window.navigator && !!window.navigator.userAgent.match(/iPhone/i);
116
116
 
117
117
  var Container = function (_React$Component) {
118
118
  _inherits(Container, _React$Component);
@@ -384,7 +384,7 @@ Container.propTypes = {
384
384
  };
385
385
 
386
386
  // NOTE: detecting the file protocol is important for things like electron.
387
- var isFileProtocol = window.window && window.location && window.location.protocol === 'file:';
387
+ var isFileProtocol = typeof window !== 'undefined' && window.window && window.location && window.location.protocol === 'file:';
388
388
 
389
389
  var defaultProps = exports.defaultProps = Container.defaultProps = {
390
390
  autofocus: false,
@@ -155,12 +155,17 @@ WelcomeMessage.propTypes = {
155
155
  };
156
156
 
157
157
  var cssBlurSupport = function () {
158
+ if (typeof window === 'undefined') {
159
+ return;
160
+ }
161
+
158
162
  // Check stolen from Modernizr, see https://github.com/Modernizr/Modernizr/blob/29eab707f7a2fb261c8a9c538370e97eb1f86e25/feature-detects/css/filters.js
159
163
  var isEdge = window.navigator && !!window.navigator.userAgent.match(/Edge/i);
160
164
  if (typeof window.document === 'undefined' || isEdge) return false;
161
165
 
162
166
  var el = window.document.createElement('div');
163
167
  el.style.cssText = 'filter: blur(2px); -webkit-filter: blur(2px)';
168
+
164
169
  return !!el.style.length && (window.document.documentMode === undefined || window.document.documentMode > 9);
165
170
  }();
166
171
 
@@ -116,6 +116,7 @@ var PasswordInput = function (_React$Component) {
116
116
  _react2.default.createElement('input', _extends({
117
117
  ref: 'input',
118
118
  type: showPassword ? 'text' : 'password',
119
+ id: l.id(lock) + '-password',
119
120
  name: 'password',
120
121
  className: 'auth0-lock-input',
121
122
  autoComplete: allowPasswordAutocomplete ? 'on' : 'off',
@@ -10,7 +10,7 @@ var _auth0Js2 = _interopRequireDefault(_auth0Js);
10
10
 
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
12
 
13
- if (!window.Auth0) {
13
+ if (typeof window !== 'undefined' && !window.Auth0) {
14
14
  window.Auth0 = {};
15
15
  }
16
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auth0-lock",
3
- "version": "11.30.6",
3
+ "version": "11.32.1",
4
4
  "description": "Auth0 Lock",
5
5
  "author": "Auth0 <support@auth0.com> (http://auth0.com)",
6
6
  "license": "MIT",
@@ -25,7 +25,7 @@
25
25
  "dev": "grunt dev",
26
26
  "dist": "grunt dist",
27
27
  "prepublish": "cross-env BABEL_ENV=npm grunt dist",
28
- "precommit": "yarn test:es-check && lint-staged",
28
+ "precommit": "yarn lint-staged",
29
29
  "lint": "eslint --ext .jsx,.js src/",
30
30
  "test:e2e": "cross-env BABEL_ENV=test karma start --browsers ChromeHeadless",
31
31
  "test:e2e:watch": "cross-env BABEL_ENV=test karma start --browsers Chrome --single-run=false",
@@ -105,16 +105,17 @@
105
105
  "webpack-dev-server": "^2.3.0"
106
106
  },
107
107
  "dependencies": {
108
- "auth0-js": "^9.16.4",
108
+ "auth0-js": "^9.19.0",
109
109
  "auth0-password-policies": "^1.0.2",
110
- "blueimp-md5": "^2.18.0",
111
- "dompurify": "^2.2.8",
110
+ "blueimp-md5": "^2.19.0",
111
+ "classnames": "^2.3.1",
112
+ "dompurify": "^2.3.4",
112
113
  "immutable": "^3.7.3",
113
114
  "jsonp": "^0.2.1",
114
- "node-fetch": "^2.6.1",
115
+ "node-fetch": "^2.6.7",
115
116
  "password-sheriff": "^1.1.1",
116
- "prop-types": "^15.6.0",
117
- "qs": "^6.7.0",
117
+ "prop-types": "^15.8.0",
118
+ "qs": "^6.10.2",
118
119
  "react": "^15.6.2",
119
120
  "react-dom": "^15.6.2",
120
121
  "react-transition-group": "^2.2.1",