auth0-lock 14.2.1 → 14.2.2
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.
- package/.github/workflows/snyk.yml +1 -1
- package/.github/workflows/test.yml +2 -2
- package/.version +1 -1
- package/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/lib/__tests__/connection/database/login_pane.js +6 -7
- package/lib/__tests__/connection/database/password_reset_confirmation.js +6 -7
- package/lib/__tests__/connection/database/signed_up_confirmation.js +6 -7
- package/lib/__tests__/connection/enterprise/quick_auth_screen.js +7 -8
- package/lib/__tests__/connection/passwordless/email_sent_confirmation.js +6 -7
- package/lib/__tests__/core/signed_in_confirmation.js +6 -7
- package/lib/__tests__/i18n.js +5 -2
- package/lib/__tests__/ui/box/confirmation_pane.js +6 -7
- package/lib/core/web_api/helper.js +1 -1
- package/lib/i18n.js +1 -1
- package/lib/lock.js +1 -1
- package/lib/passwordless.js +1 -1
- package/lib/ui/box/chrome.js +35 -20
- package/lib/ui/box/container.js +3 -2
- package/lib/ui/box/header.js +11 -7
- package/lib/ui/box/multisize_slide.js +27 -18
- package/lib/ui/input/captcha_input.js +2 -1
- package/lib/ui/input/email_input.js +2 -1
- package/lib/ui/input/mfa_code_input.js +3 -2
- package/lib/ui/input/password_input.js +3 -2
- package/lib/ui/input/phone_number_input.js +4 -3
- package/lib/ui/input/text_input.js +2 -1
- package/lib/ui/input/username_input.js +2 -1
- package/lib/ui/input/vcode_input.js +3 -2
- package/lib/ui/list.js +17 -12
- package/package.json +3 -3
|
@@ -51,6 +51,7 @@ var UsernameInput = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
51
51
|
_classCallCheck(this, UsernameInput);
|
|
52
52
|
_this = _callSuper(this, UsernameInput, [props]);
|
|
53
53
|
_this.state = {};
|
|
54
|
+
_this.inputRef = /*#__PURE__*/_react.default.createRef();
|
|
54
55
|
return _this;
|
|
55
56
|
}
|
|
56
57
|
_inherits(UsernameInput, _React$Component);
|
|
@@ -83,7 +84,7 @@ var UsernameInput = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
83
84
|
name: "username",
|
|
84
85
|
icon: IconSvg
|
|
85
86
|
}, /*#__PURE__*/_react.default.createElement("input", _extends({
|
|
86
|
-
ref:
|
|
87
|
+
ref: this.inputRef,
|
|
87
88
|
type: "text",
|
|
88
89
|
name: "username",
|
|
89
90
|
className: "auth0-lock-input",
|
|
@@ -57,6 +57,7 @@ var VcodeInput = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
57
57
|
_classCallCheck(this, VcodeInput);
|
|
58
58
|
_this = _callSuper(this, VcodeInput, [props]);
|
|
59
59
|
_this.state = {};
|
|
60
|
+
_this.inputRef = /*#__PURE__*/_react.default.createRef();
|
|
60
61
|
return _this;
|
|
61
62
|
}
|
|
62
63
|
_inherits(VcodeInput, _React$Component);
|
|
@@ -69,7 +70,7 @@ var VcodeInput = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
69
70
|
// the input to be visible. Use a more robust solution (Placeholder should
|
|
70
71
|
// notify it children when they are being shown).
|
|
71
72
|
setTimeout(function () {
|
|
72
|
-
return _this2.
|
|
73
|
+
return _this2.inputRef.current && _this2.inputRef.current.focus();
|
|
73
74
|
}, 1200);
|
|
74
75
|
}
|
|
75
76
|
}
|
|
@@ -88,7 +89,7 @@ var VcodeInput = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
88
89
|
icon: IconSvg
|
|
89
90
|
}, /*#__PURE__*/_react.default.createElement("input", _extends({
|
|
90
91
|
id: "".concat(lockId, "-vcode"),
|
|
91
|
-
ref:
|
|
92
|
+
ref: this.inputRef,
|
|
92
93
|
type: "tel",
|
|
93
94
|
name: "vcode",
|
|
94
95
|
className: "auth0-lock-input auth0-lock-input-code",
|
package/lib/ui/list.js
CHANGED
|
@@ -136,24 +136,28 @@ var FiltrableList = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
136
136
|
}]);
|
|
137
137
|
}(_react.default.Component);
|
|
138
138
|
var List = /*#__PURE__*/function (_React$Component2) {
|
|
139
|
-
function List() {
|
|
139
|
+
function List(props) {
|
|
140
|
+
var _this3;
|
|
140
141
|
_classCallCheck(this, List);
|
|
141
|
-
|
|
142
|
+
_this3 = _callSuper(this, List, [props]);
|
|
143
|
+
_this3.highlightedRef = /*#__PURE__*/_react.default.createRef();
|
|
144
|
+
_this3.listRef = /*#__PURE__*/_react.default.createRef();
|
|
145
|
+
return _this3;
|
|
142
146
|
}
|
|
143
147
|
_inherits(List, _React$Component2);
|
|
144
148
|
return _createClass(List, [{
|
|
145
149
|
key: "componentDidUpdate",
|
|
146
150
|
value: function componentDidUpdate() {
|
|
147
|
-
var
|
|
151
|
+
var _this4 = this;
|
|
148
152
|
// Ensure that highlighted item is entirely visible
|
|
149
153
|
|
|
150
154
|
// NOTE: I've spent very little time on this. It works, but it
|
|
151
155
|
// surely can be more clearly.
|
|
152
156
|
|
|
153
|
-
var highlighted = this.
|
|
157
|
+
var highlighted = this.highlightedRef.current;
|
|
154
158
|
if (highlighted) {
|
|
155
|
-
var scrollableNode =
|
|
156
|
-
var highlightedNode =
|
|
159
|
+
var scrollableNode = this.listRef.current;
|
|
160
|
+
var highlightedNode = highlighted;
|
|
157
161
|
var relativeOffsetTop = highlightedNode.offsetTop - scrollableNode.scrollTop;
|
|
158
162
|
var scrollTopDelta = 0;
|
|
159
163
|
if (relativeOffsetTop + highlightedNode.offsetHeight > scrollableNode.clientHeight) {
|
|
@@ -166,7 +170,7 @@ var List = /*#__PURE__*/function (_React$Component2) {
|
|
|
166
170
|
scrollableNode.scrollTop += scrollTopDelta;
|
|
167
171
|
if (this.timeout) clearTimeout(this.timeout);
|
|
168
172
|
this.timeout = setTimeout(function () {
|
|
169
|
-
return
|
|
173
|
+
return _this4.preventHighlight = false;
|
|
170
174
|
}, 100);
|
|
171
175
|
}
|
|
172
176
|
}
|
|
@@ -187,25 +191,26 @@ var List = /*#__PURE__*/function (_React$Component2) {
|
|
|
187
191
|
}, {
|
|
188
192
|
key: "render",
|
|
189
193
|
value: function render() {
|
|
190
|
-
var
|
|
194
|
+
var _this5 = this;
|
|
191
195
|
var items = this.props.items.map(function (x) {
|
|
192
|
-
var highlighted = x ===
|
|
196
|
+
var highlighted = x === _this5.props.highlighted;
|
|
193
197
|
var props = {
|
|
194
198
|
highlighted: highlighted,
|
|
195
199
|
label: x.get('label'),
|
|
196
200
|
onClick: function onClick() {
|
|
197
|
-
return
|
|
201
|
+
return _this5.props.onClick(x);
|
|
198
202
|
},
|
|
199
203
|
onMouseMove: function onMouseMove() {
|
|
200
|
-
return
|
|
204
|
+
return _this5.mouseMoveHandler(x);
|
|
201
205
|
}
|
|
202
206
|
};
|
|
203
|
-
if (highlighted) props.ref =
|
|
207
|
+
if (highlighted) props.ref = _this5.highlightedRef;
|
|
204
208
|
return /*#__PURE__*/_react.default.createElement(Item, _extends({
|
|
205
209
|
key: x.get('label')
|
|
206
210
|
}, props));
|
|
207
211
|
});
|
|
208
212
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
213
|
+
ref: this.listRef,
|
|
209
214
|
className: "auth0-lock-list-code",
|
|
210
215
|
onMouseLeave: this.mouseLeaveHandler.bind(this)
|
|
211
216
|
}, /*#__PURE__*/_react.default.createElement("ul", null, items));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auth0-lock",
|
|
3
|
-
"version": "14.2.
|
|
3
|
+
"version": "14.2.2",
|
|
4
4
|
"description": "Auth0 Lock",
|
|
5
5
|
"author": "Auth0 <support@auth0.com> (http://auth0.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"chalk": "^4.1.2",
|
|
74
74
|
"core-js": "^3.26.1",
|
|
75
75
|
"cross-env": "^7.0.3",
|
|
76
|
-
"css-loader": "^
|
|
76
|
+
"css-loader": "^7.1.2",
|
|
77
77
|
"emojic": "^1.1.17",
|
|
78
78
|
"enzyme": "^3.1.1",
|
|
79
79
|
"es-check": "^6.0.0",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"qs": "^6.10.3",
|
|
132
132
|
"react": "^18.2.0",
|
|
133
133
|
"react-dom": "^18.2.0",
|
|
134
|
-
"react-transition-group": "^
|
|
134
|
+
"react-transition-group": "^4.4.5",
|
|
135
135
|
"trim": "^1.0.1",
|
|
136
136
|
"url-join": "^1.1.0",
|
|
137
137
|
"validator": "^13.15.22"
|