@turnkey/react-wallet-kit 1.0.0-beta.6 → 1.1.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/README.MD +5 -2
- package/dist/_virtual/_rollupPluginBabelHelpers.mjs +95 -256
- package/dist/_virtual/_rollupPluginBabelHelpers.mjs.map +1 -1
- package/dist/components/auth/Action.js.map +1 -1
- package/dist/components/auth/Action.mjs +18 -18
- package/dist/components/auth/Action.mjs.map +1 -1
- package/dist/components/auth/Email.d.ts.map +1 -1
- package/dist/components/auth/Email.js +3 -0
- package/dist/components/auth/Email.js.map +1 -1
- package/dist/components/auth/Email.mjs +16 -14
- package/dist/components/auth/Email.mjs.map +1 -1
- package/dist/components/auth/OAuth.d.ts.map +1 -1
- package/dist/components/auth/OAuth.js +1 -0
- package/dist/components/auth/OAuth.js.map +1 -1
- package/dist/components/auth/OAuth.mjs +1 -0
- package/dist/components/auth/OAuth.mjs.map +1 -1
- package/dist/components/auth/OTP.d.ts +2 -2
- package/dist/components/auth/OTP.d.ts.map +1 -1
- package/dist/components/auth/OTP.js +1 -1
- package/dist/components/auth/OTP.js.map +1 -1
- package/dist/components/auth/OTP.mjs +46 -48
- package/dist/components/auth/OTP.mjs.map +1 -1
- package/dist/components/auth/OrSeparator.js.map +1 -1
- package/dist/components/auth/OrSeparator.mjs.map +1 -1
- package/dist/components/auth/Passkey.d.ts.map +1 -1
- package/dist/components/auth/Passkey.js +2 -0
- package/dist/components/auth/Passkey.js.map +1 -1
- package/dist/components/auth/Passkey.mjs +2 -0
- package/dist/components/auth/Passkey.mjs.map +1 -1
- package/dist/components/auth/Phone.js.map +1 -1
- package/dist/components/auth/Phone.mjs +13 -14
- package/dist/components/auth/Phone.mjs.map +1 -1
- package/dist/components/auth/Wallet.d.ts +2 -2
- package/dist/components/auth/Wallet.d.ts.map +1 -1
- package/dist/components/auth/Wallet.js +90 -49
- package/dist/components/auth/Wallet.js.map +1 -1
- package/dist/components/auth/Wallet.mjs +155 -116
- package/dist/components/auth/Wallet.mjs.map +1 -1
- package/dist/components/auth/index.d.ts +4 -1
- package/dist/components/auth/index.d.ts.map +1 -1
- package/dist/components/auth/index.js +44 -7
- package/dist/components/auth/index.js.map +1 -1
- package/dist/components/auth/index.mjs +160 -138
- package/dist/components/auth/index.mjs.map +1 -1
- package/dist/components/design/Buttons.d.ts +2 -0
- package/dist/components/design/Buttons.d.ts.map +1 -1
- package/dist/components/design/Buttons.js +8 -2
- package/dist/components/design/Buttons.js.map +1 -1
- package/dist/components/design/Buttons.mjs +9 -3
- package/dist/components/design/Buttons.mjs.map +1 -1
- package/dist/components/design/Failure.js.map +1 -1
- package/dist/components/design/Failure.mjs.map +1 -1
- package/dist/components/design/Inputs.js.map +1 -1
- package/dist/components/design/Inputs.mjs.map +1 -1
- package/dist/components/design/Lottie/Dynamic.mjs +8 -11
- package/dist/components/design/Lottie/Dynamic.mjs.map +1 -1
- package/dist/components/design/Lottie/Wrapper.js.map +1 -1
- package/dist/components/design/Lottie/Wrapper.mjs +9 -10
- package/dist/components/design/Lottie/Wrapper.mjs.map +1 -1
- package/dist/components/design/Spinners.js.map +1 -1
- package/dist/components/design/Spinners.mjs.map +1 -1
- package/dist/components/design/Success.js.map +1 -1
- package/dist/components/design/Success.mjs.map +1 -1
- package/dist/components/design/Svg.js.map +1 -1
- package/dist/components/design/Svg.mjs.map +1 -1
- package/dist/components/export/Export.d.ts +3 -0
- package/dist/components/export/Export.d.ts.map +1 -1
- package/dist/components/export/Export.js +13 -4
- package/dist/components/export/Export.js.map +1 -1
- package/dist/components/export/Export.mjs +36 -29
- package/dist/components/export/Export.mjs.map +1 -1
- package/dist/components/export/ExportWarning.d.ts +2 -0
- package/dist/components/export/ExportWarning.d.ts.map +1 -1
- package/dist/components/export/ExportWarning.js +18 -9
- package/dist/components/export/ExportWarning.js.map +1 -1
- package/dist/components/export/ExportWarning.mjs +65 -63
- package/dist/components/export/ExportWarning.mjs.map +1 -1
- package/dist/components/import/Import.d.ts +3 -0
- package/dist/components/import/Import.d.ts.map +1 -1
- package/dist/components/import/Import.js +32 -16
- package/dist/components/import/Import.js.map +1 -1
- package/dist/components/import/Import.mjs +127 -114
- package/dist/components/import/Import.mjs.map +1 -1
- package/dist/components/sign/Message.d.ts +1 -0
- package/dist/components/sign/Message.d.ts.map +1 -1
- package/dist/components/sign/Message.js +5 -0
- package/dist/components/sign/Message.js.map +1 -1
- package/dist/components/sign/Message.mjs +25 -22
- package/dist/components/sign/Message.mjs.map +1 -1
- package/dist/components/user/ConnectWallet.d.ts +2 -0
- package/dist/components/user/ConnectWallet.d.ts.map +1 -1
- package/dist/components/user/ConnectWallet.js +41 -29
- package/dist/components/user/ConnectWallet.js.map +1 -1
- package/dist/components/user/ConnectWallet.mjs +48 -32
- package/dist/components/user/ConnectWallet.mjs.map +1 -1
- package/dist/components/user/RemoveEmail.d.ts +1 -0
- package/dist/components/user/RemoveEmail.d.ts.map +1 -1
- package/dist/components/user/RemoveEmail.js +7 -3
- package/dist/components/user/RemoveEmail.js.map +1 -1
- package/dist/components/user/RemoveEmail.mjs +27 -25
- package/dist/components/user/RemoveEmail.mjs.map +1 -1
- package/dist/components/user/RemoveOAuthProvider.d.ts +1 -0
- package/dist/components/user/RemoveOAuthProvider.d.ts.map +1 -1
- package/dist/components/user/RemoveOAuthProvider.js +7 -3
- package/dist/components/user/RemoveOAuthProvider.js.map +1 -1
- package/dist/components/user/RemoveOAuthProvider.mjs +27 -25
- package/dist/components/user/RemoveOAuthProvider.mjs.map +1 -1
- package/dist/components/user/RemovePasskey.d.ts +1 -0
- package/dist/components/user/RemovePasskey.d.ts.map +1 -1
- package/dist/components/user/RemovePasskey.js +7 -2
- package/dist/components/user/RemovePasskey.js.map +1 -1
- package/dist/components/user/RemovePasskey.mjs +27 -24
- package/dist/components/user/RemovePasskey.mjs.map +1 -1
- package/dist/components/user/RemovePhoneNumber.d.ts +1 -0
- package/dist/components/user/RemovePhoneNumber.d.ts.map +1 -1
- package/dist/components/user/RemovePhoneNumber.js +7 -3
- package/dist/components/user/RemovePhoneNumber.js.map +1 -1
- package/dist/components/user/RemovePhoneNumber.mjs +27 -25
- package/dist/components/user/RemovePhoneNumber.mjs.map +1 -1
- package/dist/components/user/UpdateEmail.d.ts +4 -0
- package/dist/components/user/UpdateEmail.d.ts.map +1 -1
- package/dist/components/user/UpdateEmail.js +13 -3
- package/dist/components/user/UpdateEmail.js.map +1 -1
- package/dist/components/user/UpdateEmail.mjs +46 -39
- package/dist/components/user/UpdateEmail.mjs.map +1 -1
- package/dist/components/user/UpdatePhoneNumber.d.ts +4 -0
- package/dist/components/user/UpdatePhoneNumber.d.ts.map +1 -1
- package/dist/components/user/UpdatePhoneNumber.js +13 -3
- package/dist/components/user/UpdatePhoneNumber.js.map +1 -1
- package/dist/components/user/UpdatePhoneNumber.mjs +46 -39
- package/dist/components/user/UpdatePhoneNumber.mjs.map +1 -1
- package/dist/components/user/UpdateUserName.d.ts +2 -0
- package/dist/components/user/UpdateUserName.d.ts.map +1 -1
- package/dist/components/user/UpdateUserName.js +4 -3
- package/dist/components/user/UpdateUserName.js.map +1 -1
- package/dist/components/user/UpdateUserName.mjs +25 -25
- package/dist/components/user/UpdateUserName.mjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/providers/TurnkeyProvider.js.map +1 -1
- package/dist/providers/TurnkeyProvider.mjs.map +1 -1
- package/dist/providers/client/Hook.js.map +1 -1
- package/dist/providers/client/Hook.mjs.map +1 -1
- package/dist/providers/client/Provider.d.ts.map +1 -1
- package/dist/providers/client/Provider.js +705 -343
- package/dist/providers/client/Provider.js.map +1 -1
- package/dist/providers/client/Provider.mjs +2676 -2211
- package/dist/providers/client/Provider.mjs.map +1 -1
- package/dist/providers/client/Types.d.ts +100 -171
- package/dist/providers/client/Types.d.ts.map +1 -1
- package/dist/providers/client/Types.js.map +1 -1
- package/dist/providers/client/Types.mjs.map +1 -1
- package/dist/providers/index.d.ts +1 -0
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/modal/Hook.js.map +1 -1
- package/dist/providers/modal/Hook.mjs.map +1 -1
- package/dist/providers/modal/Provider.d.ts +3 -0
- package/dist/providers/modal/Provider.d.ts.map +1 -1
- package/dist/providers/modal/Provider.js +10 -1
- package/dist/providers/modal/Provider.js.map +1 -1
- package/dist/providers/modal/Provider.mjs +15 -1
- package/dist/providers/modal/Provider.mjs.map +1 -1
- package/dist/providers/modal/Root.d.ts.map +1 -1
- package/dist/providers/modal/Root.js +74 -2
- package/dist/providers/modal/Root.js.map +1 -1
- package/dist/providers/modal/Root.mjs +92 -15
- package/dist/providers/modal/Root.mjs.map +1 -1
- package/dist/providers/theme/Overrides.js.map +1 -1
- package/dist/providers/theme/Overrides.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tests/timers-test.d.ts +2 -0
- package/dist/tests/timers-test.d.ts.map +1 -0
- package/dist/tests/utils-test.d.ts +2 -0
- package/dist/tests/utils-test.d.ts.map +1 -0
- package/dist/typedoc-entry/index.d.ts +4 -0
- package/dist/typedoc-entry/index.d.ts.map +1 -0
- package/dist/types/base.d.ts +11 -2
- package/dist/types/base.d.ts.map +1 -1
- package/dist/types/base.js.map +1 -1
- package/dist/types/base.mjs.map +1 -1
- package/dist/types/method-types.d.ts +210 -0
- package/dist/types/method-types.d.ts.map +1 -0
- package/dist/utils/timers.js.map +1 -1
- package/dist/utils/timers.mjs.map +1 -1
- package/dist/utils/utils.d.ts +1 -1
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +15 -5
- package/dist/utils/utils.js.map +1 -1
- package/dist/utils/utils.mjs +92 -86
- package/dist/utils/utils.mjs.map +1 -1
- package/package.json +6 -5
package/README.MD
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
The `@turnkey/react-wallet-kit` is a powerful SDK that allows you to integrate Turnkey's Embedded Wallets into your React applications. It provides a set of UI components and easy-to-use functions, all exported from a hook, enabling you to quickly build secure embedded wallet experiences.
|
|
4
4
|
|
|
5
|
+
## Getting started
|
|
6
|
+
|
|
7
|
+
To learn how to setup your Turnkey organization and configure the Auth Proxy, check out our [Getting Started](https://docs.turnkey.com/sdks/react/getting-started) guide!
|
|
5
8
|
|
|
6
9
|
## Installation
|
|
7
10
|
|
|
@@ -95,7 +98,7 @@ export default function RootLayout({
|
|
|
95
98
|
> - Centralizing Turnkey setup in app/providers.tsx keeps configuration, styles, and callbacks in one place.
|
|
96
99
|
|
|
97
100
|
|
|
98
|
-
## Quick
|
|
101
|
+
## Quick authentication
|
|
99
102
|
|
|
100
103
|
The easiest way to handle authentication is using the `handleLogin` function from the `useTurnkey` hook. This will automatically show a modal with all the authentication methods you've enabled in your dashboard.
|
|
101
104
|
|
|
@@ -110,4 +113,4 @@ function LoginButton() {
|
|
|
110
113
|
```
|
|
111
114
|
|
|
112
115
|
|
|
113
|
-
For more information, check out [our docs!](https://docs.turnkey.com)
|
|
116
|
+
For more information, check out [our docs!](https://docs.turnkey.com/sdks/react)
|
|
@@ -167,274 +167,113 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
167
167
|
}
|
|
168
168
|
return t;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
function h(r, e, n, o) {
|
|
198
|
-
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
199
|
-
a = Object.create(i.prototype);
|
|
200
|
-
return c(a, "_invoke", function (r, e, n) {
|
|
201
|
-
var o = 1;
|
|
202
|
-
return function (i, a) {
|
|
203
|
-
if (3 === o) throw Error("Generator is already running");
|
|
204
|
-
if (4 === o) {
|
|
205
|
-
if ("throw" === i) throw a;
|
|
206
|
-
return {
|
|
207
|
-
value: t,
|
|
208
|
-
done: true
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
for (n.method = i, n.arg = a;;) {
|
|
212
|
-
var u = n.delegate;
|
|
213
|
-
if (u) {
|
|
214
|
-
var c = d(u, n);
|
|
215
|
-
if (c) {
|
|
216
|
-
if (c === f) continue;
|
|
217
|
-
return c;
|
|
218
|
-
}
|
|
170
|
+
function _regenerator() {
|
|
171
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
172
|
+
var e,
|
|
173
|
+
t,
|
|
174
|
+
r = "function" == typeof Symbol ? Symbol : {},
|
|
175
|
+
n = r.iterator || "@@iterator",
|
|
176
|
+
o = r.toStringTag || "@@toStringTag";
|
|
177
|
+
function i(r, n, o, i) {
|
|
178
|
+
var c = n && n.prototype instanceof Generator ? n : Generator,
|
|
179
|
+
u = Object.create(c.prototype);
|
|
180
|
+
return _regeneratorDefine(u, "_invoke", function (r, n, o) {
|
|
181
|
+
var i,
|
|
182
|
+
c,
|
|
183
|
+
u,
|
|
184
|
+
f = 0,
|
|
185
|
+
p = o || [],
|
|
186
|
+
y = false,
|
|
187
|
+
G = {
|
|
188
|
+
p: 0,
|
|
189
|
+
n: 0,
|
|
190
|
+
v: e,
|
|
191
|
+
a: d,
|
|
192
|
+
f: d.bind(e, 4),
|
|
193
|
+
d: function (t, r) {
|
|
194
|
+
return i = t, c = 0, u = e, G.n = r, a;
|
|
219
195
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
196
|
+
};
|
|
197
|
+
function d(r, n) {
|
|
198
|
+
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
|
|
199
|
+
var o,
|
|
200
|
+
i = p[t],
|
|
201
|
+
d = G.p,
|
|
202
|
+
l = i[2];
|
|
203
|
+
r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
|
|
204
|
+
}
|
|
205
|
+
if (o || r > 1) return a;
|
|
206
|
+
throw y = true, n;
|
|
207
|
+
}
|
|
208
|
+
return function (o, p, l) {
|
|
209
|
+
if (f > 1) throw TypeError("Generator is already running");
|
|
210
|
+
for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
|
|
211
|
+
i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
|
|
212
|
+
try {
|
|
213
|
+
if (f = 2, i) {
|
|
214
|
+
if (c || (o = "next"), t = i[o]) {
|
|
215
|
+
if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
|
|
216
|
+
if (!t.done) return t;
|
|
217
|
+
u = t.value, c < 2 && (c = 0);
|
|
218
|
+
} else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
|
|
219
|
+
i = e;
|
|
220
|
+
} else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
|
|
221
|
+
} catch (t) {
|
|
222
|
+
i = e, c = 1, u = t;
|
|
223
|
+
} finally {
|
|
224
|
+
f = 1;
|
|
232
225
|
}
|
|
233
|
-
"throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg);
|
|
234
226
|
}
|
|
227
|
+
return {
|
|
228
|
+
value: t,
|
|
229
|
+
done: y
|
|
230
|
+
};
|
|
235
231
|
};
|
|
236
|
-
}(r,
|
|
232
|
+
}(r, o, i), true), u;
|
|
237
233
|
}
|
|
238
|
-
|
|
239
|
-
try {
|
|
240
|
-
return {
|
|
241
|
-
type: "normal",
|
|
242
|
-
arg: t.call(r, e)
|
|
243
|
-
};
|
|
244
|
-
} catch (t) {
|
|
245
|
-
return {
|
|
246
|
-
type: "throw",
|
|
247
|
-
arg: t
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
r.wrap = h;
|
|
252
|
-
var f = {};
|
|
234
|
+
var a = {};
|
|
253
235
|
function Generator() {}
|
|
254
236
|
function GeneratorFunction() {}
|
|
255
237
|
function GeneratorFunctionPrototype() {}
|
|
256
|
-
|
|
257
|
-
c(
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l);
|
|
264
|
-
function g(t) {
|
|
265
|
-
["next", "throw", "return"].forEach(function (r) {
|
|
266
|
-
c(t, r, function (t) {
|
|
267
|
-
return this._invoke(r, t);
|
|
268
|
-
});
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
function AsyncIterator(t, r) {
|
|
272
|
-
function e(o, i, a, u) {
|
|
273
|
-
var c = s(t[o], t, i);
|
|
274
|
-
if ("throw" !== c.type) {
|
|
275
|
-
var h = c.arg,
|
|
276
|
-
f = h.value;
|
|
277
|
-
return f && "object" == typeof f && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) {
|
|
278
|
-
e("next", t, a, u);
|
|
279
|
-
}, function (t) {
|
|
280
|
-
e("throw", t, a, u);
|
|
281
|
-
}) : r.resolve(f).then(function (t) {
|
|
282
|
-
h.value = t, a(h);
|
|
283
|
-
}, function (t) {
|
|
284
|
-
return e("throw", t, a, u);
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
u(c.arg);
|
|
288
|
-
}
|
|
289
|
-
var o;
|
|
290
|
-
c(this, "_invoke", function (t, n) {
|
|
291
|
-
function i() {
|
|
292
|
-
return new r(function (r, o) {
|
|
293
|
-
e(t, n, r, o);
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
return o = o ? o.then(i, i) : i();
|
|
297
|
-
}, true);
|
|
298
|
-
}
|
|
299
|
-
function d(r, e) {
|
|
300
|
-
var n = e.method,
|
|
301
|
-
o = r.i[n];
|
|
302
|
-
if (o === t) return e.delegate = null, "throw" === n && r.i.return && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f;
|
|
303
|
-
var i = s(o, r.i, e.arg);
|
|
304
|
-
if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f;
|
|
305
|
-
var a = i.arg;
|
|
306
|
-
return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f);
|
|
307
|
-
}
|
|
308
|
-
function w(t) {
|
|
309
|
-
this.tryEntries.push(t);
|
|
310
|
-
}
|
|
311
|
-
function m(r) {
|
|
312
|
-
var e = r[4] || {};
|
|
313
|
-
e.type = "normal", e.arg = t, r[4] = e;
|
|
314
|
-
}
|
|
315
|
-
function Context(t) {
|
|
316
|
-
this.tryEntries = [[-1]], t.forEach(w, this), this.reset(true);
|
|
238
|
+
t = Object.getPrototypeOf;
|
|
239
|
+
var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
|
|
240
|
+
return this;
|
|
241
|
+
}), t),
|
|
242
|
+
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
|
|
243
|
+
function f(e) {
|
|
244
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
|
|
317
245
|
}
|
|
318
|
-
function
|
|
319
|
-
if (null != r) {
|
|
320
|
-
var e = r[i];
|
|
321
|
-
if (e) return e.call(r);
|
|
322
|
-
if ("function" == typeof r.next) return r;
|
|
323
|
-
if (!isNaN(r.length)) {
|
|
324
|
-
var o = -1,
|
|
325
|
-
a = function e() {
|
|
326
|
-
for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = false, e;
|
|
327
|
-
return e.value = t, e.done = true, e;
|
|
328
|
-
};
|
|
329
|
-
return a.next = a;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
throw new TypeError(typeof r + " is not iterable");
|
|
333
|
-
}
|
|
334
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), c(GeneratorFunctionPrototype, u, GeneratorFunction.displayName = "GeneratorFunction"), r.isGeneratorFunction = function (t) {
|
|
335
|
-
var r = "function" == typeof t && t.constructor;
|
|
336
|
-
return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name));
|
|
337
|
-
}, r.mark = function (t) {
|
|
338
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t;
|
|
339
|
-
}, r.awrap = function (t) {
|
|
340
|
-
return {
|
|
341
|
-
__await: t
|
|
342
|
-
};
|
|
343
|
-
}, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () {
|
|
344
|
-
return this;
|
|
345
|
-
}), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) {
|
|
346
|
-
void 0 === i && (i = Promise);
|
|
347
|
-
var a = new AsyncIterator(h(t, e, n, o), i);
|
|
348
|
-
return r.isGeneratorFunction(e) ? a : a.next().then(function (t) {
|
|
349
|
-
return t.done ? t.value : a.next();
|
|
350
|
-
});
|
|
351
|
-
}, g(v), c(v, u, "Generator"), c(v, i, function () {
|
|
246
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine(u), _regeneratorDefine(u, o, "Generator"), _regeneratorDefine(u, n, function () {
|
|
352
247
|
return this;
|
|
353
|
-
}),
|
|
248
|
+
}), _regeneratorDefine(u, "toString", function () {
|
|
354
249
|
return "[object Generator]";
|
|
355
|
-
}),
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
return function t() {
|
|
360
|
-
for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = false, t;
|
|
361
|
-
return t.done = true, t;
|
|
250
|
+
}), (_regenerator = function () {
|
|
251
|
+
return {
|
|
252
|
+
w: i,
|
|
253
|
+
m: f
|
|
362
254
|
};
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
function n(t) {
|
|
378
|
-
a.type = "throw", a.arg = r, e.next = t;
|
|
379
|
-
}
|
|
380
|
-
for (var o = e.tryEntries.length - 1; o >= 0; --o) {
|
|
381
|
-
var i = this.tryEntries[o],
|
|
382
|
-
a = i[4],
|
|
383
|
-
u = this.prev,
|
|
384
|
-
c = i[1],
|
|
385
|
-
h = i[2];
|
|
386
|
-
if (-1 === i[0]) return n("end"), false;
|
|
387
|
-
if (!c && !h) throw Error("try statement without catch or finally");
|
|
388
|
-
if (null != i[0] && i[0] <= u) {
|
|
389
|
-
if (u < c) return this.method = "next", this.arg = t, n(c), true;
|
|
390
|
-
if (u < h) return n(h), false;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
},
|
|
394
|
-
abrupt: function (t, r) {
|
|
395
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
396
|
-
var n = this.tryEntries[e];
|
|
397
|
-
if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) {
|
|
398
|
-
var o = n;
|
|
399
|
-
break;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null);
|
|
403
|
-
var i = o ? o[4] : {};
|
|
404
|
-
return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i);
|
|
405
|
-
},
|
|
406
|
-
complete: function (t, r) {
|
|
407
|
-
if ("throw" === t.type) throw t.arg;
|
|
408
|
-
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f;
|
|
409
|
-
},
|
|
410
|
-
finish: function (t) {
|
|
411
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
412
|
-
var e = this.tryEntries[r];
|
|
413
|
-
if (e[2] === t) return this.complete(e[4], e[3]), m(e), f;
|
|
414
|
-
}
|
|
415
|
-
},
|
|
416
|
-
catch: function (t) {
|
|
417
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
418
|
-
var e = this.tryEntries[r];
|
|
419
|
-
if (e[0] === t) {
|
|
420
|
-
var n = e[4];
|
|
421
|
-
if ("throw" === n.type) {
|
|
422
|
-
var o = n.arg;
|
|
423
|
-
m(e);
|
|
424
|
-
}
|
|
425
|
-
return o;
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
throw Error("illegal catch attempt");
|
|
429
|
-
},
|
|
430
|
-
delegateYield: function (r, e, n) {
|
|
431
|
-
return this.delegate = {
|
|
432
|
-
i: x(r),
|
|
433
|
-
r: e,
|
|
434
|
-
n: n
|
|
435
|
-
}, "next" === this.method && (this.arg = t), f;
|
|
255
|
+
})();
|
|
256
|
+
}
|
|
257
|
+
function _regeneratorDefine(e, r, n, t) {
|
|
258
|
+
var i = Object.defineProperty;
|
|
259
|
+
try {
|
|
260
|
+
i({}, "", {});
|
|
261
|
+
} catch (e) {
|
|
262
|
+
i = 0;
|
|
263
|
+
}
|
|
264
|
+
_regeneratorDefine = function (e, r, n, t) {
|
|
265
|
+
function o(r, n) {
|
|
266
|
+
_regeneratorDefine(e, r, function (e) {
|
|
267
|
+
return this._invoke(r, n, e);
|
|
268
|
+
});
|
|
436
269
|
}
|
|
437
|
-
|
|
270
|
+
r ? i ? i(e, r, {
|
|
271
|
+
value: n,
|
|
272
|
+
enumerable: !t,
|
|
273
|
+
configurable: !t,
|
|
274
|
+
writable: !t
|
|
275
|
+
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
|
|
276
|
+
}, _regeneratorDefine(e, r, n, t);
|
|
438
277
|
}
|
|
439
278
|
function _slicedToArray(r, e) {
|
|
440
279
|
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
@@ -464,5 +303,5 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
464
303
|
}
|
|
465
304
|
}
|
|
466
305
|
|
|
467
|
-
export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _arrayWithoutHoles as arrayWithoutHoles, _asyncToGenerator as asyncToGenerator, _createForOfIteratorHelper as createForOfIteratorHelper, _defineProperty as defineProperty, _iterableToArray as iterableToArray, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _nonIterableSpread as nonIterableSpread, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose,
|
|
306
|
+
export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _arrayWithoutHoles as arrayWithoutHoles, _asyncToGenerator as asyncToGenerator, _createForOfIteratorHelper as createForOfIteratorHelper, _defineProperty as defineProperty, _iterableToArray as iterableToArray, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _nonIterableSpread as nonIterableSpread, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _regenerator as regenerator, _regeneratorDefine as regeneratorDefine, _slicedToArray as slicedToArray, _toConsumableArray as toConsumableArray, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey, _unsupportedIterableToArray as unsupportedIterableToArray };
|
|
468
307
|
//# sourceMappingURL=_rollupPluginBabelHelpers.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_rollupPluginBabelHelpers.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_rollupPluginBabelHelpers.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.js","sources":["../../../src/components/auth/Action.tsx"],"sourcesContent":[null],"names":["ActionPage","props","title","icon","closeOnComplete","action","popPage","closeModal","isMobile","useModal","hasRun","useRef","iconRef","spinnerSize","setSpinnerSize","useState","useEffect","current","rect","getBoundingClientRect","size","Math","max","width","height","runAction","error","Error","_jsx","className","clsx","children","_jsxs","ref","Spinner","style","strokeWidth"],"mappings":";;;;;;;;AAYM,SAAUA,UAAUA,CAACC,KAAsB,EAAA;EAC/C,MAAM;IAAEC,KAAK;IAAEC,IAAI;AAAEC,IAAAA,eAAe,GAAG,IAAI;AAAEC,IAAAA;
|
|
1
|
+
{"version":3,"file":"Action.js","sources":["../../../src/components/auth/Action.tsx"],"sourcesContent":[null],"names":["ActionPage","props","title","icon","closeOnComplete","action","popPage","closeModal","isMobile","useModal","hasRun","useRef","iconRef","spinnerSize","setSpinnerSize","useState","useEffect","current","rect","getBoundingClientRect","size","Math","max","width","height","runAction","error","Error","_jsx","className","clsx","children","_jsxs","ref","Spinner","style","strokeWidth"],"mappings":";;;;;;;;AAYM,SAAUA,UAAUA,CAACC,KAAsB,EAAA;EAC/C,MAAM;IAAEC,KAAK;IAAEC,IAAI;AAAEC,IAAAA,eAAe,GAAG,IAAI;AAAEC,IAAAA;AAAM,GAAE,GAAGJ,KAAK;EAC7D,MAAM;IAAEK,OAAO;IAAEC,UAAU;AAAEC,IAAAA;GAAU,GAAGC,aAAQ,EAAE;AACpD,EAAA,MAAMC,MAAM,GAAGC,YAAM,CAAC,KAAK,CAAC;AAC5B,EAAA,MAAMC,OAAO,GAAGD,YAAM,CAAiB,IAAI,CAAC;EAC5C,MAAM,CAACE,WAAW,EAAEC,cAAc,CAAC,GAAGC,cAAQ,CAAS,EAAE,CAAC;AAE1DC,EAAAA,eAAS,CAAC,MAAK;IACb,IAAIJ,OAAO,CAACK,OAAO,EAAE;MACnB,MAAMC,IAAI,GAAGN,OAAO,CAACK,OAAO,CAACE,qBAAqB,EAAE;AACpD,MAAA,MAAMC,IAAI,GAAGC,IAAI,CAACC,GAAG,CAACJ,IAAI,CAACK,KAAK,EAAEL,IAAI,CAACM,MAAM,CAAC;AAC9CV,M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A,MAAA,EAAA;AAAMC,QAAAA,SAAS,EAAC,uBAAuB;kBAAE3B;AAAK,OAAA,CAAQ;KAAA;AAClD,GAAA,CACF;AAEV;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator,
|
|
1
|
+
import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator, regenerator as _regenerator } from '../../_virtual/_rollupPluginBabelHelpers.mjs';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef, useState, useEffect } from 'react';
|
|
4
4
|
import { useModal } from '../../providers/modal/Hook.mjs';
|
|
@@ -32,34 +32,34 @@ function ActionPage(props) {
|
|
|
32
32
|
if (hasRun.current) return;
|
|
33
33
|
hasRun.current = true;
|
|
34
34
|
var runAction = /*#__PURE__*/function () {
|
|
35
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
36
|
+
var _t;
|
|
37
|
+
return _regenerator().w(function (_context) {
|
|
38
|
+
while (1) switch (_context.p = _context.n) {
|
|
38
39
|
case 0:
|
|
39
40
|
if (!action) {
|
|
40
|
-
_context.
|
|
41
|
+
_context.n = 5;
|
|
41
42
|
break;
|
|
42
43
|
}
|
|
43
|
-
_context.
|
|
44
|
-
_context.
|
|
44
|
+
_context.p = 1;
|
|
45
|
+
_context.n = 2;
|
|
45
46
|
return action();
|
|
46
|
-
case
|
|
47
|
-
_context.
|
|
47
|
+
case 2:
|
|
48
|
+
_context.n = 4;
|
|
48
49
|
break;
|
|
49
|
-
case
|
|
50
|
-
_context.
|
|
51
|
-
|
|
50
|
+
case 3:
|
|
51
|
+
_context.p = 3;
|
|
52
|
+
_t = _context.v;
|
|
52
53
|
popPage();
|
|
53
|
-
throw new Error("".concat(
|
|
54
|
-
case
|
|
54
|
+
throw new Error("".concat(_t));
|
|
55
|
+
case 4:
|
|
55
56
|
if (closeOnComplete) {
|
|
56
57
|
closeModal();
|
|
57
58
|
}
|
|
58
|
-
case
|
|
59
|
-
|
|
60
|
-
return _context.stop();
|
|
59
|
+
case 5:
|
|
60
|
+
return _context.a(2);
|
|
61
61
|
}
|
|
62
|
-
}, _callee, null, [[1,
|
|
62
|
+
}, _callee, null, [[1, 3]]);
|
|
63
63
|
}));
|
|
64
64
|
return function runAction() {
|
|
65
65
|
return _ref.apply(this, arguments);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.mjs","sources":["../../../src/components/auth/Action.tsx"],"sourcesContent":[null],"names":["ActionPage","props","title","icon","_props$closeOnComplet","closeOnComplete","action","_useModal","useModal","popPage","closeModal","isMobile","hasRun","useRef","iconRef","_useState","useState","_useState2","_slicedToArray","spinnerSize","setSpinnerSize","useEffect","current","rect","getBoundingClientRect","size","Math","max","width","height","runAction","_ref","_asyncToGenerator","
|
|
1
|
+
{"version":3,"file":"Action.mjs","sources":["../../../src/components/auth/Action.tsx"],"sourcesContent":[null],"names":["ActionPage","props","title","icon","_props$closeOnComplet","closeOnComplete","action","_useModal","useModal","popPage","closeModal","isMobile","hasRun","useRef","iconRef","_useState","useState","_useState2","_slicedToArray","spinnerSize","setSpinnerSize","useEffect","current","rect","getBoundingClientRect","size","Math","max","width","height","runAction","_ref","_asyncToGenerator","_regenerator","m","_callee","_t","w","_context","p","n","v","Error","concat","a","apply","arguments","_jsx","className","clsx","children","_jsxs","ref","Spinner","style","strokeWidth"],"mappings":";;;;;;;AAYM,SAAUA,UAAUA,CAACC,KAAsB,EAAA;AAC/C,EAAA,IAAQC,KAAK,GAA2CD,KAAK,CAArDC,KAAK;IAAEC,IAAI,GAAqCF,KAAK,CAA9CE,IAAI;IAAAC,qBAAA,GAAqCH,KAAK,CAAxCI,eAAe;AAAfA,IAAAA,eAAe,GAAAD,qBAAA,KAAA,MAAA,GAAG,IAAI,GAAAA,qBA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AuC,IAAAA,QAAA,EAEDC,IAAA,CAAA,KAAA,EAAA;AAAKH,MAAAA,SAAS,EAAC,iDAAiD;AAAAE,MAAAA,QAAA,EAAA,CAC9DC;AAAKH,QAAAA,SAAS,EAAC,2CAA2C;AAAAE,QAAAA,QAAA,EAAA,CACxDH,GAAA,CAAA,KAAA,EAAA;AAAKK,UAAAA,GAAG,EAAEtC,OAAO;AAAEkC,UAAAA,SAAS,EAAC,kCAAkC;oBAC5D7C;AAAI,SAAA,CACD,EACN4C,GAAA,CAACM,OAAO,EAAA;AACNL,UAAAA,SAAS,EAAC,UAAU;AACpBM,UAAAA,KAAK,EAAE;AACL1B,YAAAA,KAAK,EAAET,WAAW;AAClBU,YAAAA,MAAM,EAAEV;WACT;AACDoC,UAAAA,WAAW,EAAE;AAAC,SAAA,CACd;AAAA,OAAA,CACE,EACNR,GAAA,CAAA,MAAA,EAAA;AAAMC,QAAAA,SAAS,EAAC,uBAAuB;kBAAE9C;AAAK,OAAA,CAAQ;KAAA;AAClD,GAAA,CACF;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Email.d.ts","sourceRoot":"","sources":["../../../src/components/auth/Email.tsx"],"names":[],"mappings":"AAWA,UAAU,eAAe;IACvB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"Email.d.ts","sourceRoot":"","sources":["../../../src/components/auth/Email.tsx"],"names":[],"mappings":"AAWA,UAAU,eAAe;IACvB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAoFhD"}
|
|
@@ -44,6 +44,7 @@ function EmailInput(props) {
|
|
|
44
44
|
children: [jsxRuntime.jsxs("div", {
|
|
45
45
|
className: clsx("w-full", !useContinueButton && "relative flex items-center"),
|
|
46
46
|
children: [jsxRuntime.jsx(react$1.Input, {
|
|
47
|
+
"data-testid": "email-input",
|
|
47
48
|
type: "email",
|
|
48
49
|
placeholder: "Enter your email",
|
|
49
50
|
value: email,
|
|
@@ -55,6 +56,7 @@ function EmailInput(props) {
|
|
|
55
56
|
onClick: handleContinue,
|
|
56
57
|
disabled: buttonDisabled,
|
|
57
58
|
loading: loading,
|
|
59
|
+
name: "email-continue-icon",
|
|
58
60
|
className: clsx("absolute right-2 w-6 h-6", buttonClass),
|
|
59
61
|
spinnerClassName: "text-primary-text-light dark:text-primary-text-dark"
|
|
60
62
|
})]
|
|
@@ -63,6 +65,7 @@ function EmailInput(props) {
|
|
|
63
65
|
disabled: buttonDisabled,
|
|
64
66
|
loading: loading,
|
|
65
67
|
className: clsx("w-full", buttonClass),
|
|
68
|
+
name: "email-continue",
|
|
66
69
|
spinnerClassName: "text-primary-text-light dark:text-primary-text-dark",
|
|
67
70
|
children: "Continue"
|
|
68
71
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Email.js","sources":["../../../src/components/auth/Email.tsx"],"sourcesContent":[null],"names":["isValidEmail","email","test","EmailInput","props","onContinue","config","useTurnkey","loading","setLoading","useState","setEmail","useContinueButton","ui","preferLargeActionButtons","emailIsValid","handleContinue","Promise","resolve","handleKeyDown","e","key","buttonDisabled","buttonClass","clsx","_jsxs","className","children","_jsx","Input","type","placeholder","value","onChange","target","onKeyDown","IconButton","icon","faArrowRight","onClick","disabled","spinnerClassName","ActionButton"],"mappings":";;;;;;;;;;AAOA,SAASA,YAAYA,CAACC,KAAa,EAAA;AACjC,EAAA,OAAO,4BAA4B,CAACC,IAAI,CAACD,KAAK,CAAC;AACjD;AAMM,SAAUE,UAAUA,CAACC,KAAsB,EAAA;EAC/C,MAAM;AAAEC,IAAAA;
|
|
1
|
+
{"version":3,"file":"Email.js","sources":["../../../src/components/auth/Email.tsx"],"sourcesContent":[null],"names":["isValidEmail","email","test","EmailInput","props","onContinue","config","useTurnkey","loading","setLoading","useState","setEmail","useContinueButton","ui","preferLargeActionButtons","emailIsValid","handleContinue","Promise","resolve","handleKeyDown","e","key","buttonDisabled","buttonClass","clsx","_jsxs","className","children","_jsx","Input","type","placeholder","value","onChange","target","onKeyDown","IconButton","icon","faArrowRight","onClick","disabled","name","spinnerClassName","ActionButton"],"mappings":";;;;;;;;;;AAOA,SAASA,YAAYA,CAACC,KAAa,EAAA;AACjC,EAAA,OAAO,4BAA4B,CAACC,IAAI,CAACD,KAAK,CAAC;AACjD;AAMM,SAAUE,UAAUA,CAACC,KAAsB,EAAA;EAC/C,MAAM;AAAEC,IAAAA;AAAU,GAAE,GAAGD,KAAK;EAC5B,MAAM;AAAEE,IAAAA;GAAQ,GAAGC,eAAU,EAAE;EAC/B,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGC,cAAQ,CAAC,KAAK,CAAC;EAC7C,MAAM,CAACT,KAAK,EAAEU,QAAQ,CAAC,GAAGD,cAAQ,CAAC,EAAE,CAAC;EACtC,MAAME,iBAAiB,GAAGN,MAAM,EAAEO,EAAE,EAAEC,wBAAwB,IAAI,KAAK;AAEvE,EAAA,MAAMC,YAAY,GAAGf,YAAY,CAACC,KAAK,CAAC;AAExC,EAAA,MAAMe,cAAc,GAAG,YAAW;IAChC,IAAID,YAAY,IAAIV,UAAU,EAAE;MAC9BI,UAAU,CAAC,IAAI,CAAC;MAChB,IAAI;QACF,MAAMQ,OAAO,CAACC,OAAO,CAACb,UAAU,CAACJ,KAAK,CAAC,CAAC;AAC1C,MAAA,CAAC,SAAS;QACRQ,UAAU,CAAC,KAAK,CAAC;AACnB,MAAA;AACF,IAAA;EACF,CAAC;EAED,MAAMU,aAAa,GAAIC,CAAwC,IAAI;AACjE,IAAA,IAAIA,CAAC,CAACC,GAAG,KAAK,OAAO,EAAE;AACrBL,MAAAA,cAAc,EAAE;AAClB,IAAA;EACF,CAAC;EAED,MAAMM,cAAc,GAAG,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,IAAI,CAAC,QAAQ,EAAED,WAAW,CAAC;AACtCkB,MAAAA,IAAI,EAAC,gBAAgB;AACrBC,MAAAA,gBAAgB,EAAC,qDAAqD;AAAAf,MAAAA,QAAA,EAAA;AAAA,KAAA,CAIzE;AAAA,GAAA,CACG;AAEV;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator,
|
|
1
|
+
import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator, regenerator as _regenerator } from '../../_virtual/_rollupPluginBabelHelpers.mjs';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { Input } from '@headlessui/react';
|
|
@@ -26,27 +26,26 @@ function EmailInput(props) {
|
|
|
26
26
|
var useContinueButton = (_config$ui$preferLarg = config === null || config === void 0 ? void 0 : (_config$ui = config.ui) === null || _config$ui === void 0 ? void 0 : _config$ui.preferLargeActionButtons) !== null && _config$ui$preferLarg !== void 0 ? _config$ui$preferLarg : false;
|
|
27
27
|
var emailIsValid = isValidEmail(email);
|
|
28
28
|
var handleContinue = /*#__PURE__*/function () {
|
|
29
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/
|
|
30
|
-
return
|
|
31
|
-
while (1) switch (_context.
|
|
29
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
30
|
+
return _regenerator().w(function (_context) {
|
|
31
|
+
while (1) switch (_context.p = _context.n) {
|
|
32
32
|
case 0:
|
|
33
33
|
if (!(emailIsValid && onContinue)) {
|
|
34
|
-
_context.
|
|
34
|
+
_context.n = 3;
|
|
35
35
|
break;
|
|
36
36
|
}
|
|
37
37
|
setLoading(true);
|
|
38
|
-
_context.
|
|
39
|
-
_context.
|
|
38
|
+
_context.p = 1;
|
|
39
|
+
_context.n = 2;
|
|
40
40
|
return Promise.resolve(onContinue(email));
|
|
41
|
-
case
|
|
42
|
-
_context.
|
|
41
|
+
case 2:
|
|
42
|
+
_context.p = 2;
|
|
43
43
|
setLoading(false);
|
|
44
|
-
return _context.
|
|
45
|
-
case
|
|
46
|
-
|
|
47
|
-
return _context.stop();
|
|
44
|
+
return _context.f(2);
|
|
45
|
+
case 3:
|
|
46
|
+
return _context.a(2);
|
|
48
47
|
}
|
|
49
|
-
}, _callee, null, [[
|
|
48
|
+
}, _callee, null, [[1,, 2, 3]]);
|
|
50
49
|
}));
|
|
51
50
|
return function handleContinue() {
|
|
52
51
|
return _ref.apply(this, arguments);
|
|
@@ -64,6 +63,7 @@ function EmailInput(props) {
|
|
|
64
63
|
children: [jsxs("div", {
|
|
65
64
|
className: clsx("w-full", !useContinueButton && "relative flex items-center"),
|
|
66
65
|
children: [jsx(Input, {
|
|
66
|
+
"data-testid": "email-input",
|
|
67
67
|
type: "email",
|
|
68
68
|
placeholder: "Enter your email",
|
|
69
69
|
value: email,
|
|
@@ -77,6 +77,7 @@ function EmailInput(props) {
|
|
|
77
77
|
onClick: handleContinue,
|
|
78
78
|
disabled: buttonDisabled,
|
|
79
79
|
loading: loading,
|
|
80
|
+
name: "email-continue-icon",
|
|
80
81
|
className: clsx("absolute right-2 w-6 h-6", buttonClass),
|
|
81
82
|
spinnerClassName: "text-primary-text-light dark:text-primary-text-dark"
|
|
82
83
|
})]
|
|
@@ -85,6 +86,7 @@ function EmailInput(props) {
|
|
|
85
86
|
disabled: buttonDisabled,
|
|
86
87
|
loading: loading,
|
|
87
88
|
className: clsx("w-full", buttonClass),
|
|
89
|
+
name: "email-continue",
|
|
88
90
|
spinnerClassName: "text-primary-text-light dark:text-primary-text-dark",
|
|
89
91
|
children: "Continue"
|
|
90
92
|
})]
|