@thefittingroom/shop-ui 0.0.6 → 0.0.8
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 +1 -1
- package/dist/esm/index.js +9 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +2 -2
- package/dist/esm/tfr.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ const shopId: number = 9001
|
|
|
26
26
|
const hooks: TfrHooks = {
|
|
27
27
|
onLoading: () => {},
|
|
28
28
|
onLoadingComplete: () => {},
|
|
29
|
-
|
|
29
|
+
onVtoReady: (frames: string[]) => {},
|
|
30
30
|
onError: () => {},
|
|
31
31
|
onLogin: () => {},
|
|
32
32
|
onLogout: () => {},
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* thefittingroom v0.0.
|
|
2
|
+
* thefittingroom v0.0.8 (2023-07-26T17:22:58.790Z)
|
|
3
3
|
* Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
/*!
|
|
@@ -36231,7 +36231,12 @@ class FittingRoom {
|
|
|
36231
36231
|
return validationError(L.EmailError);
|
|
36232
36232
|
if (!validatePassword(password))
|
|
36233
36233
|
return validationError(L.PasswordError);
|
|
36234
|
-
|
|
36234
|
+
try {
|
|
36235
|
+
await this.tfrShop.user.login(username, password);
|
|
36236
|
+
}
|
|
36237
|
+
catch (e) {
|
|
36238
|
+
return validationError(L.UsernameOrPasswordIncorrect);
|
|
36239
|
+
}
|
|
36235
36240
|
if (this.hooks.onLogin)
|
|
36236
36241
|
this.hooks.onLogin();
|
|
36237
36242
|
this.nav.close();
|
|
@@ -36281,8 +36286,8 @@ class FittingRoom {
|
|
|
36281
36286
|
this.hooks.onLoading();
|
|
36282
36287
|
const frames = await this.tfrShop.tryOn(this.sku);
|
|
36283
36288
|
this.nav.close();
|
|
36284
|
-
if (this.hooks.
|
|
36285
|
-
this.hooks.
|
|
36289
|
+
if (this.hooks.onVtoReady)
|
|
36290
|
+
this.hooks.onVtoReady(frames);
|
|
36286
36291
|
}
|
|
36287
36292
|
catch (error) {
|
|
36288
36293
|
if (error instanceof errors.AvatarNotCreatedError)
|