auth0-lock 12.0.0 → 12.0.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/lib/i18n.js CHANGED
@@ -91,7 +91,7 @@ function assertLanguage(m, language, base) {
91
91
  function syncLang(m, language, _cb) {
92
92
  (0, _cdn_utils.load)({
93
93
  method: 'registerLanguageDictionary',
94
- url: "".concat(l.languageBaseUrl(m), "/js/lock/").concat("12.0.0", "/").concat(language, ".js"),
94
+ url: "".concat(l.languageBaseUrl(m), "/js/lock/").concat("12.0.2", "/").concat(language, ".js"),
95
95
  check: function check(str) {
96
96
  return str && str === language;
97
97
  },
package/lib/lock.js CHANGED
@@ -39,7 +39,7 @@ var Auth0Lock = /*#__PURE__*/function (_Core) {
39
39
  return _createClass(Auth0Lock);
40
40
  }(_core.default); // telemetry
41
41
  exports.default = Auth0Lock;
42
- Auth0Lock.version = "12.0.0";
42
+ Auth0Lock.version = "12.0.2";
43
43
 
44
44
  // TODO: should we have different telemetry for classic/passwordless?
45
45
  // TODO: should we set telemetry info before each request?
@@ -39,4 +39,4 @@ var Auth0LockPasswordless = /*#__PURE__*/function (_Core) {
39
39
  return _createClass(Auth0LockPasswordless);
40
40
  }(_core.default);
41
41
  exports.default = Auth0LockPasswordless;
42
- Auth0LockPasswordless.version = "12.0.0";
42
+ Auth0LockPasswordless.version = "12.0.2";
package/lib/ui/box.js CHANGED
@@ -72,7 +72,7 @@ var Renderer = /*#__PURE__*/function () {
72
72
  key: "remove",
73
73
  value: function remove(containerId) {
74
74
  var _this2 = this;
75
- if (this.modals[containerId]) {
75
+ if (this.modals[containerId] && this.modals[containerId].component) {
76
76
  this.modals[containerId].component.hide();
77
77
  setTimeout(function () {
78
78
  return _this2.unmount(containerId);
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
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
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
@@ -9,14 +8,13 @@ var _react = _interopRequireDefault(require("react"));
9
8
  var _input_wrap = _interopRequireDefault(require("./input_wrap"));
10
9
  var _excluded = ["lockId", "image", "value", "placeholder", "onReload", "invalidHint", "isValid"];
11
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ 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); }
12
12
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
13
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
14
14
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
15
15
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
16
16
  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); } }
17
17
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
18
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
19
- 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); }
20
18
  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); }
21
19
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
22
20
  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); }; }
@@ -24,6 +22,9 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
24
22
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
25
23
  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; } }
26
24
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
+ 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; }
26
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
27
+ 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); }
27
28
  var InputIconSvg = /*#__PURE__*/_react.default.createElement("svg", {
28
29
  className: "auth0-lock-icon auth0-lock-icon-box",
29
30
  width: "21",
@@ -54,7 +55,6 @@ var RefreshIconSvg = function RefreshIconSvg() {
54
55
  fill: "black"
55
56
  }), /*#__PURE__*/_react.default.createElement("mask", {
56
57
  id: "mask0",
57
- "mask-type": "alpha",
58
58
  maskUnits: "userSpaceOnUse",
59
59
  x: "1",
60
60
  y: "1",
@@ -76,6 +76,27 @@ var CaptchaInput = /*#__PURE__*/function (_React$Component) {
76
76
  var _this;
77
77
  _classCallCheck(this, CaptchaInput);
78
78
  _this = _super.call(this, props);
79
+ _defineProperty(_assertThisInitialized(_this), "handleOnChange", function (e) {
80
+ if (_this.props.onChange) {
81
+ _this.props.onChange(e);
82
+ }
83
+ });
84
+ _defineProperty(_assertThisInitialized(_this), "handleReload", function (e) {
85
+ if (_this.props.onReload) {
86
+ e.preventDefault();
87
+ _this.props.onReload(e);
88
+ }
89
+ });
90
+ _defineProperty(_assertThisInitialized(_this), "handleFocus", function () {
91
+ _this.setState({
92
+ focused: true
93
+ });
94
+ });
95
+ _defineProperty(_assertThisInitialized(_this), "handleBlur", function () {
96
+ _this.setState({
97
+ focused: false
98
+ });
99
+ });
79
100
  _this.state = {};
80
101
  return _this;
81
102
  }
@@ -112,7 +133,7 @@ var CaptchaInput = /*#__PURE__*/function (_React$Component) {
112
133
  }
113
134
  }), /*#__PURE__*/_react.default.createElement("button", {
114
135
  type: "button",
115
- onClick: this.handleReload.bind(this),
136
+ onClick: this.handleReload,
116
137
  className: "auth0-lock-captcha-refresh"
117
138
  }, /*#__PURE__*/_react.default.createElement(RefreshIconSvg, null))), /*#__PURE__*/_react.default.createElement(_input_wrap.default, {
118
139
  focused: focused,
@@ -132,44 +153,15 @@ var CaptchaInput = /*#__PURE__*/function (_React$Component) {
132
153
  autoCapitalize: "off",
133
154
  autoCorrect: "off",
134
155
  spellCheck: "false",
135
- onChange: this.handleOnChange.bind(this),
136
- onFocus: this.handleFocus.bind(this),
137
- onBlur: this.handleBlur.bind(this),
156
+ onChange: this.handleOnChange,
157
+ onFocus: this.handleFocus,
158
+ onBlur: this.handleBlur,
138
159
  "aria-label": "Email",
139
160
  "aria-invalid": !isValid,
140
161
  "aria-describedby": !isValid && invalidHint ? "auth0-lock-error-msg-email" : undefined,
141
162
  value: value
142
163
  }, props))));
143
164
  }
144
- }, {
145
- key: "handleOnChange",
146
- value: function handleOnChange(e) {
147
- if (this.props.onChange) {
148
- this.props.onChange(e);
149
- }
150
- }
151
- }, {
152
- key: "handleReload",
153
- value: function handleReload(e) {
154
- if (this.props.onReload) {
155
- e.preventDefault();
156
- this.props.onReload(e);
157
- }
158
- }
159
- }, {
160
- key: "handleFocus",
161
- value: function handleFocus() {
162
- this.setState({
163
- focused: true
164
- });
165
- }
166
- }, {
167
- key: "handleBlur",
168
- value: function handleBlur() {
169
- this.setState({
170
- focused: false
171
- });
172
- }
173
165
  }]);
174
166
  return CaptchaInput;
175
167
  }(_react.default.Component);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auth0-lock",
3
- "version": "12.0.0",
3
+ "version": "12.0.2",
4
4
  "description": "Auth0 Lock",
5
5
  "author": "Auth0 <support@auth0.com> (http://auth0.com)",
6
6
  "license": "MIT",