UNPKG

1.96 kBJavaScriptView Raw
1'use strict';
2
3exports.__esModule = true;
4
5var _core = require('./core');
6
7var _core2 = _interopRequireDefault(_core);
8
9var _classic = require('./engine/classic');
10
11var _classic2 = _interopRequireDefault(_classic);
12
13function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
15function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
16
17function _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; }
18
19function _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; }
20
21var Auth0Lock = function (_Core) {
22 _inherits(Auth0Lock, _Core);
23
24 function Auth0Lock(clientID, domain, options) {
25 _classCallCheck(this, Auth0Lock);
26
27 var _this = _possibleConstructorReturn(this, _Core.call(this, clientID, domain, options, _classic2.default));
28
29 (0, _core.injectStyles)();
30 (0, _core.setWindowHeightStyle)();
31
32 window.addEventListener('resize', function () {
33 (0, _core.setWindowHeightStyle)();
34 });
35 return _this;
36 }
37
38 return Auth0Lock;
39}(_core2.default);
40
41// telemetry
42
43
44exports.default = Auth0Lock;
45Auth0Lock.version = '11.22.5';
46
47// TODO: should we have different telemetry for classic/passwordless?
48// TODO: should we set telemetry info before each request?
49// TODO: should we inject styles here?