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.
- package/.browserslistrc +1 -0
- package/.circleci/config.yml +3 -1
- package/.shiprc +4 -5
- package/CHANGELOG.md +25 -0
- package/DEVELOPMENT.md +1 -1
- package/README.md +20 -16
- package/karma.conf.js +1 -1
- package/lib/CSSCore.js +1 -4
- package/lib/__tests__/auth_button.js +12 -22
- package/lib/__tests__/connection/database/actions.js +48 -49
- package/lib/__tests__/connection/database/index.js +22 -28
- package/lib/__tests__/connection/database/login_pane.js +24 -47
- package/lib/__tests__/connection/database/password_reset_confirmation.js +23 -32
- package/lib/__tests__/connection/database/reset_password.js +17 -39
- package/lib/__tests__/connection/database/signed_up_confirmation.js +23 -32
- package/lib/__tests__/connection/enterprise/actions.js +22 -47
- package/lib/__tests__/connection/enterprise/hrd_pane.js +16 -33
- package/lib/__tests__/connection/enterprise/hrd_screen.js +26 -40
- package/lib/__tests__/connection/enterprise/quick_auth_screen.js +32 -75
- package/lib/__tests__/connection/passwordless/ask_vcode.js +29 -51
- package/lib/__tests__/connection/passwordless/email_sent_confirmation.js +23 -32
- package/lib/__tests__/connection/passwordless/passwordless.js +35 -97
- package/lib/__tests__/core/actions.js +23 -46
- package/lib/__tests__/core/client/index.js +10 -13
- package/lib/__tests__/core/index.js +46 -94
- package/lib/__tests__/core/remote_data.js +14 -20
- package/lib/__tests__/core/signed_in_confirmation.js +23 -32
- package/lib/__tests__/core/sso/last_login_screen.js +27 -50
- package/lib/__tests__/core/tenant.js +10 -12
- package/lib/__tests__/core/web_api/helper.js +6 -14
- package/lib/__tests__/core/web_api/p2_api.js +38 -33
- package/lib/__tests__/core/web_api.js +37 -33
- package/lib/__tests__/engine/classic/login.js +20 -41
- package/lib/__tests__/engine/classic/mfa_login_screen.js +6 -19
- package/lib/__tests__/engine/classic/sign_up_pane.js +33 -55
- package/lib/__tests__/engine/classic/sign_up_screen.js +18 -45
- package/lib/__tests__/engine/classic.js +13 -6
- package/lib/__tests__/engine/passwordless/social_or_email_login_screen.js +7 -28
- package/lib/__tests__/engine/passwordless/social_or_phone_number_login_screen.js +7 -28
- package/lib/__tests__/engine/passwordless.js +2 -5
- package/lib/__tests__/field/captcha/recaptcha_enterprise.js +27 -27
- package/lib/__tests__/field/captcha/recaptchav2.js +27 -27
- package/lib/__tests__/field/captcha.js +39 -51
- package/lib/__tests__/field/custom_input.js +23 -47
- package/lib/__tests__/field/email.js +2 -3
- package/lib/__tests__/field/email_pane.js +25 -48
- package/lib/__tests__/field/field.js +9 -13
- package/lib/__tests__/field/login_pane.js +30 -34
- package/lib/__tests__/field/mfa_code_pane.js +13 -28
- package/lib/__tests__/field/option_selection_pane.js +7 -25
- package/lib/__tests__/field/password.js +6 -12
- package/lib/__tests__/field/password_pane.js +29 -46
- package/lib/__tests__/field/phone_number_pane.js +18 -41
- package/lib/__tests__/field/social_buttons_pane.js +30 -47
- package/lib/__tests__/field/username.js +27 -48
- package/lib/__tests__/field/username_pane.js +30 -47
- package/lib/__tests__/field/vcode.js +5 -13
- package/lib/__tests__/field/vcode_pane.js +20 -44
- package/lib/__tests__/i18n.js +28 -53
- package/lib/__tests__/quick-auth/actions.js +4 -27
- package/lib/__tests__/setup-tests.js +7 -9
- package/lib/__tests__/testUtils.js +41 -58
- package/lib/__tests__/ui/box/chrome.js +24 -49
- package/lib/__tests__/ui/box/confirmation_pane.js +23 -42
- package/lib/__tests__/ui/box/container.js +21 -46
- package/lib/__tests__/ui/box/global_message.js +60 -37
- package/lib/__tests__/ui/input/email_input.js +6 -17
- package/lib/__tests__/ui/input/input_wrap.js +6 -19
- package/lib/__tests__/ui/input/password/password_strength.js +13 -15
- package/lib/__tests__/ui/input/password_input.js +22 -27
- package/lib/__tests__/utils/format.js +10 -17
- package/lib/__tests__/utils/url_utils.js +2 -5
- package/lib/avatar/gravatar_provider.js +13 -28
- package/lib/avatar.js +22 -41
- package/lib/browser.js +372 -23
- package/lib/connection/captcha.js +15 -34
- package/lib/connection/database/actions.js +39 -108
- package/lib/connection/database/index.js +90 -191
- package/lib/connection/database/login_pane.js +107 -147
- package/lib/connection/database/login_sign_up_tabs.js +106 -125
- package/lib/connection/database/mfa_pane.js +50 -69
- package/lib/connection/database/password_reset_confirmation.js +51 -73
- package/lib/connection/database/reset_password.js +116 -132
- package/lib/connection/database/reset_password_pane.js +45 -56
- package/lib/connection/database/sign_up_terms.js +17 -23
- package/lib/connection/database/signed_up_confirmation.js +52 -75
- package/lib/connection/enterprise/actions.js +23 -52
- package/lib/connection/enterprise/hrd_pane.js +60 -76
- package/lib/connection/enterprise/hrd_screen.js +60 -75
- package/lib/connection/enterprise/kerberos_screen.js +46 -60
- package/lib/connection/enterprise/quick_auth_screen.js +46 -64
- package/lib/connection/enterprise/single_sign_on_notice.js +14 -26
- package/lib/connection/enterprise.js +51 -84
- package/lib/connection/passwordless/actions.js +29 -65
- package/lib/connection/passwordless/ask_vcode.js +53 -60
- package/lib/connection/passwordless/email_sent_confirmation.js +129 -179
- package/lib/connection/passwordless/index.js +36 -68
- package/lib/connection/social/index.js +12 -15
- package/lib/core/actions.js +33 -85
- package/lib/core/client/index.js +38 -58
- package/lib/core/client/settings.js +12 -20
- package/lib/core/error_screen.js +38 -52
- package/lib/core/index.js +154 -305
- package/lib/core/loading_screen.js +61 -71
- package/lib/core/pane_separator.js +10 -10
- package/lib/core/remote_data.js +30 -51
- package/lib/core/screen.js +85 -79
- package/lib/core/signed_in_confirmation.js +51 -73
- package/lib/core/sso/data.js +9 -17
- package/lib/core/sso/index.js +5 -6
- package/lib/core/sso/last_login_screen.js +46 -63
- package/lib/core/tenant/index.js +37 -59
- package/lib/core/tenant/settings.js +11 -15
- package/lib/core/web_api/helper.js +22 -28
- package/lib/core/web_api/p2_api.js +162 -171
- package/lib/core/web_api.js +106 -94
- package/lib/core.js +126 -160
- package/lib/engine/classic/login.js +92 -144
- package/lib/engine/classic/mfa_login_screen.js +61 -67
- package/lib/engine/classic/sign_up_pane.js +89 -123
- package/lib/engine/classic/sign_up_screen.js +112 -158
- package/lib/engine/classic.js +122 -183
- package/lib/engine/passwordless/social_or_email_login_screen.js +80 -116
- package/lib/engine/passwordless/social_or_phone_number_login_screen.js +79 -110
- package/lib/engine/passwordless.js +75 -104
- package/lib/field/actions.js +11 -17
- package/lib/field/captcha/captcha_pane.js +83 -103
- package/lib/field/captcha/recaptcha.js +140 -145
- package/lib/field/captcha.js +7 -10
- package/lib/field/custom_input.js +37 -50
- package/lib/field/email/email_pane.js +90 -109
- package/lib/field/email.js +17 -35
- package/lib/field/index.js +50 -87
- package/lib/field/mfa-code/mfa_code_pane.js +57 -71
- package/lib/field/mfa_code.js +15 -21
- package/lib/field/option_selection_pane.js +16 -22
- package/lib/field/password/password_pane.js +79 -91
- package/lib/field/password.js +8 -14
- package/lib/field/phone-number/locations.js +7 -3
- package/lib/field/phone-number/phone_number_pane.js +87 -124
- package/lib/field/phone_number.js +16 -30
- package/lib/field/social/event.js +9 -12
- package/lib/field/social/social_buttons_pane.js +93 -121
- package/lib/field/username/username_pane.js +105 -123
- package/lib/field/username.js +16 -26
- package/lib/field/vcode/vcode_pane.js +67 -93
- package/lib/field/vcode.js +5 -5
- package/lib/i18n/af.js +7 -4
- package/lib/i18n/ar.js +7 -4
- package/lib/i18n/az.js +7 -4
- package/lib/i18n/bg.js +7 -4
- package/lib/i18n/ca.js +7 -4
- package/lib/i18n/cs.js +7 -4
- package/lib/i18n/da.js +7 -4
- package/lib/i18n/de.js +7 -3
- package/lib/i18n/el.js +7 -4
- package/lib/i18n/en.js +9 -4
- package/lib/i18n/es.js +7 -3
- package/lib/i18n/et.js +7 -4
- package/lib/i18n/fa.js +7 -4
- package/lib/i18n/fi.js +7 -4
- package/lib/i18n/fr.js +7 -4
- package/lib/i18n/he.js +7 -4
- package/lib/i18n/hr.js +7 -4
- package/lib/i18n/hu.js +7 -4
- package/lib/i18n/id.js +7 -4
- package/lib/i18n/it.js +7 -3
- package/lib/i18n/ja.js +7 -4
- package/lib/i18n/ko.js +7 -4
- package/lib/i18n/lt.js +7 -4
- package/lib/i18n/lv.js +7 -4
- package/lib/i18n/ms.js +7 -4
- package/lib/i18n/nb.js +7 -4
- package/lib/i18n/nl.js +7 -4
- package/lib/i18n/nn.js +7 -4
- package/lib/i18n/no.js +7 -4
- package/lib/i18n/pl.js +7 -4
- package/lib/i18n/pt-br.js +7 -3
- package/lib/i18n/pt.js +7 -4
- package/lib/i18n/ro.js +7 -4
- package/lib/i18n/ru.js +7 -4
- package/lib/i18n/sk.js +7 -4
- package/lib/i18n/sl.js +7 -4
- package/lib/i18n/sr.js +7 -4
- package/lib/i18n/sv.js +7 -4
- package/lib/i18n/tr.js +7 -4
- package/lib/i18n/ua.js +7 -4
- package/lib/i18n/uk.js +7 -4
- package/lib/i18n/vi.js +7 -4
- package/lib/i18n/zh-tw.js +7 -4
- package/lib/i18n/zh.js +7 -4
- package/lib/i18n.js +38 -75
- package/lib/index.js +14 -17
- package/lib/lock.js +29 -32
- package/lib/passwordless.js +29 -31
- package/lib/quick-auth/actions.js +19 -26
- package/lib/quick_auth.js +8 -10
- package/lib/sanitizer.js +5 -5
- package/lib/store/index.js +22 -42
- package/lib/sync.js +21 -42
- package/lib/ui/box/button.js +85 -105
- package/lib/ui/box/chrome.js +463 -548
- package/lib/ui/box/confirmation_pane.js +34 -48
- package/lib/ui/box/container.js +305 -339
- package/lib/ui/box/global_message.js +51 -60
- package/lib/ui/box/header.js +155 -177
- package/lib/ui/box/multisize_slide.js +233 -229
- package/lib/ui/box/success_pane.js +34 -37
- package/lib/ui/box.js +88 -93
- package/lib/ui/button/auth_button.js +44 -51
- package/lib/ui/input/captcha_input.js +162 -181
- package/lib/ui/input/checkbox_input.js +57 -59
- package/lib/ui/input/email_input.js +117 -124
- package/lib/ui/input/input_wrap.js +65 -80
- package/lib/ui/input/location_input.js +130 -150
- package/lib/ui/input/mfa_code_input.js +98 -98
- package/lib/ui/input/password/password_strength.js +103 -127
- package/lib/ui/input/password_input.js +141 -147
- package/lib/ui/input/phone_number_input.js +101 -109
- package/lib/ui/input/select_input.js +120 -132
- package/lib/ui/input/text_input.js +89 -84
- package/lib/ui/input/username_input.js +109 -115
- package/lib/ui/input/vcode_input.js +110 -118
- package/lib/ui/list.js +224 -247
- package/lib/ui/pane/quick_auth_pane.js +55 -80
- package/lib/utils/atom.js +55 -48
- package/lib/utils/cache.js +54 -43
- package/lib/utils/cdn_utils.js +17 -31
- package/lib/utils/createRef.js +3 -1
- package/lib/utils/data_utils.js +10 -16
- package/lib/utils/fn_utils.js +5 -4
- package/lib/utils/format.js +6 -8
- package/lib/utils/id_utils.js +4 -3
- package/lib/utils/jsonp_utils.js +20 -17
- package/lib/utils/media_utils.js +4 -2
- package/lib/utils/preload_utils.js +4 -3
- package/lib/utils/string_utils.js +4 -4
- package/lib/utils/url_utils.js +4 -3
- package/package.json +48 -34
- package/webpack.config.js +36 -3
package/lib/sync.js
CHANGED
|
@@ -1,32 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
exports
|
|
5
|
-
|
|
6
|
-
|
|
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.go = exports.default = void 0;
|
|
7
8
|
exports.hasError = hasError;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var _data_utils = require(
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
var _index2 = require('./store/index');
|
|
18
|
-
|
|
19
|
-
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; } }
|
|
20
|
-
|
|
9
|
+
exports.isDone = isDone;
|
|
10
|
+
exports.isSuccess = isSuccess;
|
|
11
|
+
var _immutable = require("immutable");
|
|
12
|
+
var _data_utils = require("./utils/data_utils");
|
|
13
|
+
var l = _interopRequireWildcard(require("./core/index"));
|
|
14
|
+
var _index2 = require("./store/index");
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
21
17
|
var _dataFns = (0, _data_utils.dataFns)(['sync']),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
exports.default = function (m, key, opts) {
|
|
18
|
+
get = _dataFns.get,
|
|
19
|
+
set = _dataFns.set;
|
|
20
|
+
var _default = function _default(m, key, opts) {
|
|
26
21
|
if (get(m, key) !== undefined) return m;
|
|
27
|
-
|
|
28
22
|
var status = opts.waitFn ? 'waiting' : !opts.conditionFn || opts.conditionFn(m) ? 'pending' : 'no';
|
|
29
|
-
|
|
30
23
|
return set(m, key, (0, _immutable.Map)({
|
|
31
24
|
conditionFn: opts.conditionFn,
|
|
32
25
|
errorFn: opts.errorFn,
|
|
@@ -38,7 +31,7 @@ exports.default = function (m, key, opts) {
|
|
|
38
31
|
waitFn: opts.waitFn
|
|
39
32
|
}));
|
|
40
33
|
};
|
|
41
|
-
|
|
34
|
+
exports.default = _default;
|
|
42
35
|
var syncStatusKey = function syncStatusKey(key) {
|
|
43
36
|
return (window.Array.isArray(key) ? key : [key]).concat(['syncStatus']);
|
|
44
37
|
};
|
|
@@ -51,7 +44,6 @@ var setStatus = function setStatus(m, key, str) {
|
|
|
51
44
|
var getProp = function getProp(m, key, name) {
|
|
52
45
|
return get(m, key).get(name);
|
|
53
46
|
};
|
|
54
|
-
|
|
55
47
|
var findKeys = function findKeys(m) {
|
|
56
48
|
return m.reduce(function (r, v, k) {
|
|
57
49
|
var current = _immutable.Map.isMap(v) && v.has('syncStatus') ? [k] : [];
|
|
@@ -61,13 +53,11 @@ var findKeys = function findKeys(m) {
|
|
|
61
53
|
return r.concat.apply(r, [current].concat([nested]));
|
|
62
54
|
}, []);
|
|
63
55
|
};
|
|
64
|
-
|
|
65
56
|
function removeKeys(m, keys) {
|
|
66
57
|
return keys.reduce(function (r, k) {
|
|
67
58
|
return r.deleteIn(syncStatusKey(k));
|
|
68
59
|
}, m);
|
|
69
60
|
}
|
|
70
|
-
|
|
71
61
|
var process = function process(m, id) {
|
|
72
62
|
var keys = findKeys(get(m, [], (0, _immutable.Map)()));
|
|
73
63
|
// TODO timeout
|
|
@@ -82,15 +72,12 @@ var process = function process(m, id) {
|
|
|
82
72
|
setTimeout(function () {
|
|
83
73
|
(0, _index2.swap)(_index2.updateEntity, 'lock', id, function (m) {
|
|
84
74
|
var errorFn = getProp(r, k, 'errorFn');
|
|
85
|
-
|
|
86
75
|
if (error && typeof errorFn === 'function') {
|
|
87
76
|
setTimeout(function () {
|
|
88
77
|
return errorFn(m, error);
|
|
89
78
|
}, 0);
|
|
90
79
|
}
|
|
91
|
-
|
|
92
80
|
var recoverResult = getProp(m, k, 'recoverResult');
|
|
93
|
-
|
|
94
81
|
if (error && recoverResult === undefined) {
|
|
95
82
|
return handleError(m, k, error);
|
|
96
83
|
} else {
|
|
@@ -106,53 +93,45 @@ var process = function process(m, id) {
|
|
|
106
93
|
r = setStatus(r, k, !conditionFn || conditionFn(r) ? 'pending' : 'no');
|
|
107
94
|
}
|
|
108
95
|
}
|
|
109
|
-
|
|
110
96
|
return r;
|
|
111
97
|
}, m);
|
|
112
98
|
};
|
|
113
|
-
|
|
114
|
-
var go = exports.go = function go(id) {
|
|
99
|
+
var go = function go(id) {
|
|
115
100
|
(0, _index2.observe)('sync', id, function (m) {
|
|
116
101
|
setTimeout(function () {
|
|
117
102
|
return (0, _index2.swap)(_index2.updateEntity, 'lock', id, process, id);
|
|
118
103
|
}, 0);
|
|
119
104
|
});
|
|
120
105
|
};
|
|
121
|
-
|
|
106
|
+
exports.go = go;
|
|
122
107
|
function isSuccess(m, key) {
|
|
123
108
|
return getStatus(m, key) === 'ok';
|
|
124
109
|
}
|
|
125
|
-
|
|
126
110
|
function isDone(m) {
|
|
127
111
|
var keys = findKeys(get(m, [], (0, _immutable.Map)()));
|
|
128
112
|
return keys.length > 0 && keys.reduce(function (r, k) {
|
|
129
113
|
return r && !isLoading(m, k);
|
|
130
114
|
}, true);
|
|
131
115
|
}
|
|
132
|
-
|
|
133
116
|
function hasError(m) {
|
|
134
117
|
var excludeKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
135
|
-
|
|
136
118
|
var keys = findKeys(removeKeys(get(m, [], (0, _immutable.Map)()), excludeKeys));
|
|
137
119
|
return keys.length > 0 && keys.reduce(function (r, k) {
|
|
138
120
|
return r || getStatus(m, k) === 'error';
|
|
139
121
|
}, false);
|
|
140
122
|
}
|
|
141
|
-
|
|
142
123
|
function isLoading(m, key) {
|
|
143
124
|
return ['loading', 'pending', 'waiting'].indexOf(getStatus(m, key)) > -1;
|
|
144
125
|
}
|
|
145
|
-
|
|
146
126
|
function handleError(m, key, error) {
|
|
147
127
|
var result = setStatus(m, key, 'error');
|
|
148
128
|
|
|
149
129
|
// TODO: this should be configurable for each sync
|
|
150
130
|
if (key !== 'sso') {
|
|
151
|
-
var stopError = new Error(
|
|
131
|
+
var stopError = new Error("An error occurred when fetching ".concat(key, " data for Lock: ").concat(error.message));
|
|
152
132
|
stopError.code = 'sync';
|
|
153
133
|
stopError.origin = error;
|
|
154
134
|
result = l.stop(result, stopError);
|
|
155
135
|
}
|
|
156
|
-
|
|
157
136
|
return result;
|
|
158
137
|
}
|
package/lib/ui/box/button.js
CHANGED
|
@@ -1,127 +1,107 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.BackButton = exports.CloseButton = undefined;
|
|
5
|
-
|
|
6
|
-
var _propTypes = require('prop-types');
|
|
7
|
-
|
|
8
|
-
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
9
|
-
|
|
10
|
-
var _react = require('react');
|
|
11
|
-
|
|
12
|
-
var _react2 = _interopRequireDefault(_react);
|
|
1
|
+
"use strict";
|
|
13
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CloseButton = exports.BackButton = void 0;
|
|
7
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
14
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
10
|
var SvgBackIcon = function SvgBackIcon() {
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
strokeWidth: '2',
|
|
43
|
-
x1: '22',
|
|
44
|
-
x2: '3.5',
|
|
45
|
-
y1: '12',
|
|
46
|
-
y2: '12'
|
|
47
|
-
}),
|
|
48
|
-
' '
|
|
49
|
-
);
|
|
11
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
focusable: "false",
|
|
14
|
+
enableBackground: "new 0 0 24 24",
|
|
15
|
+
version: "1.0",
|
|
16
|
+
viewBox: "0 0 24 24",
|
|
17
|
+
xmlSpace: "preserve",
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
20
|
+
}, ' ', /*#__PURE__*/_react.default.createElement("polyline", {
|
|
21
|
+
fill: "none",
|
|
22
|
+
points: "12.5,21 3.5,12 12.5,3 ",
|
|
23
|
+
stroke: "#000000",
|
|
24
|
+
strokeMiterlimit: "10",
|
|
25
|
+
strokeWidth: "2"
|
|
26
|
+
}), ' ', /*#__PURE__*/_react.default.createElement("line", {
|
|
27
|
+
fill: "none",
|
|
28
|
+
stroke: "#000000",
|
|
29
|
+
strokeMiterlimit: "10",
|
|
30
|
+
strokeWidth: "2",
|
|
31
|
+
x1: "22",
|
|
32
|
+
x2: "3.5",
|
|
33
|
+
y1: "12",
|
|
34
|
+
y2: "12"
|
|
35
|
+
}), ' ');
|
|
50
36
|
};
|
|
51
37
|
var SvgCloseIcon = function SvgCloseIcon() {
|
|
52
|
-
return
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
'g',
|
|
66
|
-
null,
|
|
67
|
-
_react2.default.createElement('polygon', {
|
|
68
|
-
fill: '#373737',
|
|
69
|
-
points: '123.5429688,11.59375 116.4765625,4.5185547 64.0019531,56.9306641 11.5595703,4.4882813 4.4882813,11.5595703 56.9272461,63.9970703 4.4570313,116.4052734 11.5244141,123.4814453 63.9985352,71.0683594 116.4423828,123.5117188 123.5126953,116.4414063 71.0732422,64.0019531 '
|
|
70
|
-
})
|
|
71
|
-
)
|
|
72
|
-
);
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
39
|
+
"aria-hidden": "true",
|
|
40
|
+
focusable: "false",
|
|
41
|
+
enableBackground: "new 0 0 128 128",
|
|
42
|
+
version: "1.1",
|
|
43
|
+
viewBox: "0 0 128 128",
|
|
44
|
+
xmlSpace: "preserve",
|
|
45
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
46
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement("g", null, /*#__PURE__*/_react.default.createElement("polygon", {
|
|
48
|
+
fill: "#373737",
|
|
49
|
+
points: "123.5429688,11.59375 116.4765625,4.5185547 64.0019531,56.9306641 11.5595703,4.4882813 4.4882813,11.5595703 56.9272461,63.9970703 4.4570313,116.4052734 11.5244141,123.4814453 63.9985352,71.0683594 116.4423828,123.5117188 123.5126953,116.4414063 71.0732422,64.0019531 "
|
|
50
|
+
})));
|
|
73
51
|
};
|
|
74
|
-
|
|
75
52
|
var IconButton = function IconButton(_ref) {
|
|
76
53
|
var lockId = _ref.lockId,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
54
|
+
name = _ref.name,
|
|
55
|
+
_onClick = _ref.onClick,
|
|
56
|
+
svg = _ref.svg;
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
58
|
+
id: "".concat(lockId, "-").concat(name, "-button"),
|
|
59
|
+
role: "button",
|
|
60
|
+
tabIndex: 0,
|
|
61
|
+
className: "auth0-lock-".concat(name, "-button"),
|
|
62
|
+
onClick: function onClick(e) {
|
|
63
|
+
e.preventDefault();
|
|
64
|
+
_onClick();
|
|
65
|
+
},
|
|
66
|
+
onKeyPress: function onKeyPress(e) {
|
|
67
|
+
if (e.key === 'Enter') {
|
|
88
68
|
e.preventDefault();
|
|
89
69
|
_onClick();
|
|
90
|
-
}
|
|
91
|
-
onKeyPress: function onKeyPress(e) {
|
|
92
|
-
if (e.key === 'Enter') {
|
|
93
|
-
e.preventDefault();
|
|
94
|
-
_onClick();
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
'aria-label': name
|
|
70
|
+
}
|
|
98
71
|
},
|
|
99
|
-
|
|
100
|
-
);
|
|
72
|
+
"aria-label": name
|
|
73
|
+
}, svg);
|
|
101
74
|
};
|
|
102
|
-
|
|
103
75
|
IconButton.propTypes = {
|
|
104
|
-
name:
|
|
105
|
-
onClick:
|
|
106
|
-
svg:
|
|
76
|
+
name: _propTypes.default.string.isRequired,
|
|
77
|
+
onClick: _propTypes.default.func.isRequired,
|
|
78
|
+
svg: _propTypes.default.element.isRequired
|
|
107
79
|
};
|
|
108
|
-
|
|
109
|
-
var CloseButton = exports.CloseButton = function CloseButton(_ref2) {
|
|
80
|
+
var CloseButton = function CloseButton(_ref2) {
|
|
110
81
|
var lockId = _ref2.lockId,
|
|
111
|
-
|
|
112
|
-
return
|
|
82
|
+
onClick = _ref2.onClick;
|
|
83
|
+
return /*#__PURE__*/_react.default.createElement(IconButton, {
|
|
84
|
+
lockId: lockId,
|
|
85
|
+
name: "close",
|
|
86
|
+
onClick: onClick,
|
|
87
|
+
svg: /*#__PURE__*/_react.default.createElement(SvgCloseIcon, null)
|
|
88
|
+
});
|
|
113
89
|
};
|
|
114
|
-
|
|
90
|
+
exports.CloseButton = CloseButton;
|
|
115
91
|
CloseButton.propTypes = {
|
|
116
|
-
onClick:
|
|
92
|
+
onClick: _propTypes.default.func.isRequired
|
|
117
93
|
};
|
|
118
|
-
|
|
119
|
-
var BackButton = exports.BackButton = function BackButton(_ref3) {
|
|
94
|
+
var BackButton = function BackButton(_ref3) {
|
|
120
95
|
var lockId = _ref3.lockId,
|
|
121
|
-
|
|
122
|
-
return
|
|
96
|
+
onClick = _ref3.onClick;
|
|
97
|
+
return /*#__PURE__*/_react.default.createElement(IconButton, {
|
|
98
|
+
lockId: lockId,
|
|
99
|
+
name: "back",
|
|
100
|
+
onClick: onClick,
|
|
101
|
+
svg: /*#__PURE__*/_react.default.createElement(SvgBackIcon, null)
|
|
102
|
+
});
|
|
123
103
|
};
|
|
124
|
-
|
|
104
|
+
exports.BackButton = BackButton;
|
|
125
105
|
BackButton.propTypes = {
|
|
126
|
-
onClick:
|
|
106
|
+
onClick: _propTypes.default.func.isRequired
|
|
127
107
|
};
|