@thefittingroom/shop-ui 0.0.11 → 0.0.13
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/dist/esm/index.js +12 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +2 -2
- package/dist/esm/init.d.ts +1 -1
- package/dist/esm/tfr.d.ts +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* thefittingroom v0.0.
|
|
2
|
+
* thefittingroom v0.0.13 (2023-07-31T17:36:04.376Z)
|
|
3
3
|
* Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
/*!
|
|
@@ -36199,11 +36199,17 @@ var AvatarState;
|
|
|
36199
36199
|
})(AvatarState || (AvatarState = {}));
|
|
36200
36200
|
|
|
36201
36201
|
class FittingRoom {
|
|
36202
|
-
constructor(shopId, modalDivId, hooks = {}) {
|
|
36202
|
+
constructor(shopId, modalDivId, hooks = {}, _env) {
|
|
36203
36203
|
this.shopId = shopId;
|
|
36204
36204
|
this.hooks = hooks;
|
|
36205
|
+
// prettier-ignore
|
|
36206
|
+
const env = _env
|
|
36207
|
+
? _env
|
|
36208
|
+
: typeof process !== 'undefined'
|
|
36209
|
+
? process.env.NODE_ENV
|
|
36210
|
+
: 'dev';
|
|
36205
36211
|
this.nav = new FittingRoomNav(modalDivId, this.signIn.bind(this), this.forgotPassword.bind(this), this.submitTel.bind(this));
|
|
36206
|
-
this.tfrShop = initShop(Number(this.shopId),
|
|
36212
|
+
this.tfrShop = initShop(Number(this.shopId), env);
|
|
36207
36213
|
}
|
|
36208
36214
|
get sku() {
|
|
36209
36215
|
return this.nav.sku;
|
|
@@ -36293,7 +36299,7 @@ class FittingRoom {
|
|
|
36293
36299
|
const lastSize = availableSizeLabels.slice(-1);
|
|
36294
36300
|
const tryFirstSizes = `${L.TrySize} ${firstSizes.join(', ')}`;
|
|
36295
36301
|
const trySizes = availableSizeLabels.length > 1 ? `${tryFirstSizes} ${L.OrSize} ${lastSize}` : tryFirstSizes;
|
|
36296
|
-
return `${trySizes}. ${L.WeRecommendSize} ${recommendedSizeLabel}
|
|
36302
|
+
return `${trySizes}. ${L.WeRecommendSize} ${recommendedSizeLabel}.`;
|
|
36297
36303
|
}
|
|
36298
36304
|
async tryOn() {
|
|
36299
36305
|
try {
|
|
@@ -36321,8 +36327,8 @@ class FittingRoom {
|
|
|
36321
36327
|
}
|
|
36322
36328
|
}
|
|
36323
36329
|
|
|
36324
|
-
const initFittingRoom = async (shopId, modalDivId, hooks) => {
|
|
36325
|
-
const tfr = new FittingRoom(shopId, modalDivId, hooks);
|
|
36330
|
+
const initFittingRoom = async (shopId, modalDivId, hooks, env = 'dev') => {
|
|
36331
|
+
const tfr = new FittingRoom(shopId, modalDivId, hooks, env);
|
|
36326
36332
|
await tfr.onInit();
|
|
36327
36333
|
return tfr;
|
|
36328
36334
|
};
|