@thefittingroom/shop-ui 5.0.9 → 5.0.10
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/index.js +119 -63
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19034,7 +19034,7 @@ const en$1 = {
|
|
|
19034
19034
|
"get-app": { "create_avatar": "Create your avatar" },
|
|
19035
19035
|
"sign-in": { "email": "Email", "password": "Password", "forgot_password": "Forgot password?", "sign_in": "Sign in", "no_account": "Don’t have an account?", "download_app": "Download the app.", "invalid_email": "Please enter a valid email address.", "missing_password": "Please enter your password.", "login_failed": "Incorrect email or password." },
|
|
19036
19036
|
"forgot-password": { "title": "Forgot password", "description": "We’ll send you an email with a link to reset your password.", "send_link": "Send link", "link_sent": "Link sent! Please check your email.", "need_help": "Need help?", "contact_us": "Contact us." },
|
|
19037
|
-
"vto-single": { "avatar_loading": "Finding your perfect fit...", "slide_to_rotate": "Slide to rotate", "sign_out": "Sign out", "color_label": "Color:", "add_to_cart": "Add to cart", "view_product_details": "View product details", "hide_product_details": "Hide product details" },
|
|
19037
|
+
"vto-single": { "avatar_loading": "Finding your perfect fit...", "slide_to_rotate": "Slide to rotate", "sign_out": "Sign out", "color_label": "Color:", "add_to_cart": "Add to cart", "view_product_details": "View product details", "hide_product_details": "Hide product details", "no_recommendation": "There are currently no well fitting sizes available for this item." },
|
|
19038
19038
|
"size-rec": { "recommended_size": "Recommended Size: {{size}}", "item_fit": "This item is {{fit}}", "select_size": "Select a size to see how it fits", "fitClassification": { "form_fitting": "Form Fitting", "slim_fit": "Slim Fit", "regular_fit": "Regular Fit", "relaxed_fit": "Relaxed Fit", "oversized_fit": "Oversized Fit" }, "measurementLocation": { "neck_base": "Neck", "across_shoulder": "Shoulders", "cb_neck_to_wrist": "Neck to Wrist", "sleeve_length_from_shoulder_point": "Sleeve", "bust": "Bust", "waist": "Waist", "low_waist": "Low Waist", "high_hip": "High Hip", "low_hip": "Low Hip", "thigh": "Thigh", "inseam": "Inseam", "hsp_to_low_hip": "HSP to Low Hip", "hsp_to_crotch": "HSP to Crotch", "low_hip_bottoms": "Low Hip (Bottoms)", "high_hip_bottoms": "High Hip (Bottoms)" }, "fit": { "too_tight": "Too Tight", "tight": "Tight", "slightly_tight": "Slightly Tight", "perfect_fit": "Perfect Fit", "slightly_loose": "Slightly Loose", "loose": "Loose", "oversized": "Oversized", "too_short": "Too Short", "short": "Short", "slightly_short": "Slightly Short", "slightly_long": "Slightly Long", "long": "Long", "too_long": "Too Long" } },
|
|
19039
19039
|
"fit-chart": { "fit_scale": "Fit Scale", "fit": { "poor_fit": "Poor Fit", "acceptable_fit": "Acceptable Fit", "too_tight": "Too Tight", "tight": "Tight or More Fitted", "slightly_tight": "Slightly Tight or Fitted", "perfect_fit": "Perfect Fit", "slightly_loose": "Slightly Loose or Less Fitted", "loose": "Loose or Not Fitted", "oversized": "Oversized" }, "measurement_points": "Measurement Points", "point": { "bust": "Chest/Bust", "waist": "Natural Waist", "pant_waist": "Pant Waist", "high_hip": "High Hip", "low_hip": "Low Hip", "thigh": "Thigh" } }
|
|
19040
19040
|
};
|
|
@@ -19050,7 +19050,7 @@ const fr = {
|
|
|
19050
19050
|
"get-app": { "create_avatar": "Créez votre avatar" },
|
|
19051
19051
|
"sign-in": { "email": "Email", "password": "Mot de passe", "forgot_password": "Mot de passe oublié ?", "sign_in": "Se connecter", "no_account": "Vous n'avez pas de compte ?", "download_app": "Téléchargez l'application.", "invalid_email": "Veuillez entrer une adresse e-mail valide.", "missing_password": "Veuillez entrer votre mot de passe.", "login_failed": "Email ou mot de passe incorrect." },
|
|
19052
19052
|
"forgot-password": { "title": "Mot de passe oublié", "description": "Nous vous enverrons un e-mail avec un lien pour réinitialiser votre mot de passe.", "send_link": "Envoyer le lien", "link_sent": "Lien envoyé ! Veuillez vérifier votre e-mail.", "need_help": "Besoin d'aide ?", "contact_us": "Contactez-nous." },
|
|
19053
|
-
"vto-single": { "avatar_loading": "Trouver votre ajustement parfait...", "slide_to_rotate": "Faites glisser pour faire pivoter", "sign_out": "Se déconnecter", "color_label": "Couleur :", "add_to_cart": "Ajouter au panier", "view_product_details": "Voir les détails du produit", "hide_product_details": "Masquer les détails du produit" },
|
|
19053
|
+
"vto-single": { "avatar_loading": "Trouver votre ajustement parfait...", "slide_to_rotate": "Faites glisser pour faire pivoter", "sign_out": "Se déconnecter", "color_label": "Couleur :", "add_to_cart": "Ajouter au panier", "view_product_details": "Voir les détails du produit", "hide_product_details": "Masquer les détails du produit", "no_recommendation": "Il n'y a actuellement pas de tailles bien ajustées disponibles pour cet article." },
|
|
19054
19054
|
"size-rec": { "recommended_size": "Taille recommandée : {{size}}", "item_fit": "Cet article est {{fit}}", "select_size": "Sélectionnez une taille pour voir comment elle s'adapte", "fitClassification": { "form_fitting": "Ajusté", "slim_fit": "Coupe slim", "regular_fit": "Coupe régulière", "relaxed_fit": "Coupe décontractée", "oversized_fit": "Coupe oversize" }, "measurementLocation": { "neck_base": "Cou", "across_shoulder": "Épaules", "cb_neck_to_wrist": "Cou jusqu'au poignet", "sleeve_length_from_shoulder_point": "Manche", "bust": "Buste", "waist": "Taille", "low_waist": "Bas de la taille", "high_hip": "Haut des hanches", "low_hip": "Bas des hanches", "thigh": "Cuisse", "inseam": "Entrejambe", "hsp_to_low_hip": "HSP au bas des hanches", "hsp_to_crotch": "HSP à l'entrejambe", "low_hip_bottoms": "Bas des hanches (bas)", "high_hip_bottoms": "Haut des hanches (bas)" }, "fit": { "too_tight": "Trop serré", "tight": "Serré", "slightly_tight": "Légèrement serré", "perfect_fit": "Parfait", "slightly_loose": "Légèrement ample", "loose": "Ample", "oversized": "Oversize", "too_short": "Trop court", "short": "Court", "slightly_short": "Légèrement court", "slightly_long": "Légèrement long", "long": "Long", "too_long": "Trop long" } },
|
|
19055
19055
|
"fit-chart": { "fit_scale": "Échelle d'ajustement", "fit": { "poor_fit": "Mauvais ajustement", "acceptable_fit": "Ajustement acceptable", "too_tight": "Trop serré", "tight": "Serré ou plus ajusté", "slightly_tight": "Légèrement serré ou ajusté", "perfect_fit": "Parfait", "slightly_loose": "Légèrement ample ou moins ajusté", "loose": "Ample ou non ajusté", "oversized": "Oversize" }, "measurement_points": "Points de mesure", "point": { "bust": "Poitrine/Buste", "waist": "Taille naturelle", "pant_waist": "Taille du pantalon", "high_hip": "Haut des hanches", "low_hip": "Bas des hanches", "thigh": "Cuisse" } }
|
|
19056
19056
|
};
|
|
@@ -41961,66 +41961,81 @@ function VtoSingleOverlay() {
|
|
|
41961
41961
|
const sizeRecommendationRecord = await getSizeRecommendation(styleRec.id);
|
|
41962
41962
|
logger$2.timerEnd("fetchInitialData_3_getSizeRecommendation");
|
|
41963
41963
|
logger$2.timerStart("fetchInitialData_4_assembleLoadedData");
|
|
41964
|
-
let productData;
|
|
41965
|
-
const recommendedSizeLabel = getSizeLabelFromSize(sizeRecommendationRecord.recommended_size) ?? "(unknown)";
|
|
41966
41964
|
{
|
|
41967
|
-
const
|
|
41968
|
-
const
|
|
41969
|
-
|
|
41970
|
-
|
|
41971
|
-
|
|
41972
|
-
|
|
41973
|
-
|
|
41974
|
-
|
|
41975
|
-
|
|
41976
|
-
|
|
41965
|
+
const recommendedSizeId = sizeRecommendationRecord.recommended_size.id || null;
|
|
41966
|
+
const recommendedSizeLabel = getSizeLabelFromSize(sizeRecommendationRecord.recommended_size);
|
|
41967
|
+
if (recommendedSizeId != null && recommendedSizeLabel != null) {
|
|
41968
|
+
let productData;
|
|
41969
|
+
{
|
|
41970
|
+
const fitClassification = sizeRecommendationRecord.fit_classification;
|
|
41971
|
+
const sizes = [];
|
|
41972
|
+
for (const sizeRec of sizeRecommendationRecord.available_sizes) {
|
|
41973
|
+
const sizeId = sizeRec.id;
|
|
41974
|
+
const sizeLabel = getSizeLabelFromSize(sizeRec) || null;
|
|
41975
|
+
if (!sizeLabel) {
|
|
41976
|
+
continue;
|
|
41977
|
+
}
|
|
41978
|
+
const isRecommended = sizeRec.id === recommendedSizeId;
|
|
41979
|
+
const fit = sizeRecommendationRecord.fits.find((f) => f.size_id === sizeRec.id);
|
|
41980
|
+
if (!fit) {
|
|
41981
|
+
continue;
|
|
41982
|
+
}
|
|
41983
|
+
const colors = [];
|
|
41984
|
+
for (const csaRec of sizeRec.colorway_size_assets) {
|
|
41985
|
+
const colorwaySizeAssetId = csaRec.id;
|
|
41986
|
+
const sku = csaRec.sku;
|
|
41987
|
+
const variant = variants.find((v) => v.sku === sku);
|
|
41988
|
+
if (!variant) {
|
|
41989
|
+
continue;
|
|
41990
|
+
}
|
|
41991
|
+
const colorLabel = variant.color || null;
|
|
41992
|
+
if (!colorLabel) {
|
|
41993
|
+
continue;
|
|
41994
|
+
}
|
|
41995
|
+
const priceFormatted = variant.priceFormatted;
|
|
41996
|
+
colors.push({
|
|
41997
|
+
colorwaySizeAssetId,
|
|
41998
|
+
colorLabel,
|
|
41999
|
+
sku,
|
|
42000
|
+
priceFormatted
|
|
42001
|
+
});
|
|
42002
|
+
}
|
|
42003
|
+
sizes.push({
|
|
42004
|
+
sizeId,
|
|
42005
|
+
sizeLabel,
|
|
42006
|
+
isRecommended,
|
|
42007
|
+
fit,
|
|
42008
|
+
colors
|
|
42009
|
+
});
|
|
42010
|
+
}
|
|
42011
|
+
productData = {
|
|
42012
|
+
productName,
|
|
42013
|
+
productDescriptionHtml,
|
|
42014
|
+
fitClassification,
|
|
42015
|
+
recommendedSizeId,
|
|
42016
|
+
recommendedSizeLabel,
|
|
42017
|
+
sizes,
|
|
42018
|
+
styleCategoryLabel
|
|
42019
|
+
};
|
|
41977
42020
|
}
|
|
41978
|
-
|
|
41979
|
-
|
|
41980
|
-
const
|
|
41981
|
-
|
|
41982
|
-
|
|
41983
|
-
if (!variant) {
|
|
41984
|
-
continue;
|
|
42021
|
+
let recommendedColorLabel;
|
|
42022
|
+
{
|
|
42023
|
+
const recommendedSizeRecord = productData.sizes.find((s) => s.isRecommended);
|
|
42024
|
+
if (!recommendedSizeRecord) {
|
|
42025
|
+
throw new Error("Recommended size record not found");
|
|
41985
42026
|
}
|
|
41986
|
-
const
|
|
41987
|
-
|
|
41988
|
-
colors
|
|
41989
|
-
|
|
41990
|
-
colorLabel,
|
|
41991
|
-
sku,
|
|
41992
|
-
priceFormatted
|
|
41993
|
-
});
|
|
42027
|
+
const recommendedSizeColorRecord = recommendedSizeRecord.colors.find((c) => {
|
|
42028
|
+
return c.colorLabel === selectedColor;
|
|
42029
|
+
}) || recommendedSizeRecord.colors[0];
|
|
42030
|
+
recommendedColorLabel = recommendedSizeColorRecord.colorLabel;
|
|
41994
42031
|
}
|
|
41995
|
-
|
|
41996
|
-
|
|
41997
|
-
|
|
41998
|
-
|
|
41999
|
-
|
|
42000
|
-
colors
|
|
42001
|
-
});
|
|
42032
|
+
setLoadedProductData(productData);
|
|
42033
|
+
setSelectedSizeLabel(recommendedSizeLabel);
|
|
42034
|
+
setSelectedColorLabel(recommendedColorLabel);
|
|
42035
|
+
} else {
|
|
42036
|
+
setLoadedProductData(false);
|
|
42002
42037
|
}
|
|
42003
|
-
productData = {
|
|
42004
|
-
productName,
|
|
42005
|
-
productDescriptionHtml,
|
|
42006
|
-
fitClassification,
|
|
42007
|
-
recommendedSizeId,
|
|
42008
|
-
recommendedSizeLabel,
|
|
42009
|
-
sizes,
|
|
42010
|
-
styleCategoryLabel
|
|
42011
|
-
};
|
|
42012
42038
|
}
|
|
42013
|
-
let recommendedColorLabel;
|
|
42014
|
-
{
|
|
42015
|
-
const recommendedSizeRecord = productData.sizes.find((s) => s.isRecommended);
|
|
42016
|
-
const recommendedSizeColorRecord = recommendedSizeRecord.colors.find((c) => {
|
|
42017
|
-
return c.colorLabel === selectedColor;
|
|
42018
|
-
}) || recommendedSizeRecord.colors[0];
|
|
42019
|
-
recommendedColorLabel = recommendedSizeColorRecord.colorLabel;
|
|
42020
|
-
}
|
|
42021
|
-
setLoadedProductData(productData);
|
|
42022
|
-
setSelectedSizeLabel(recommendedSizeLabel);
|
|
42023
|
-
setSelectedColorLabel(recommendedColorLabel);
|
|
42024
42039
|
for (const sku in userProfile?.vto?.[brandId] ?? {}) {
|
|
42025
42040
|
fetchedVtoSkus.current.add(sku);
|
|
42026
42041
|
readyVtoSkus.current.add(sku);
|
|
@@ -42034,10 +42049,10 @@ function VtoSingleOverlay() {
|
|
|
42034
42049
|
});
|
|
42035
42050
|
}
|
|
42036
42051
|
}
|
|
42037
|
-
if (userIsLoggedIn && userHasAvatar &&
|
|
42052
|
+
if (userIsLoggedIn && userHasAvatar && userProfile && loadedProductData == null) {
|
|
42038
42053
|
fetchInitialData();
|
|
42039
42054
|
}
|
|
42040
|
-
}, [userIsLoggedIn, userHasAvatar,
|
|
42055
|
+
}, [userIsLoggedIn, userHasAvatar, userProfile, loadedProductData]);
|
|
42041
42056
|
const {
|
|
42042
42057
|
sizeColorRecord: selectedColorSizeRecord,
|
|
42043
42058
|
availableColorLabels
|
|
@@ -42049,7 +42064,7 @@ function VtoSingleOverlay() {
|
|
|
42049
42064
|
};
|
|
42050
42065
|
}
|
|
42051
42066
|
const sizeRecord = loadedProductData.sizes.find((s) => s.sizeLabel === selectedSizeLabel);
|
|
42052
|
-
if (!sizeRecord) {
|
|
42067
|
+
if (!sizeRecord || !sizeRecord.colors.length) {
|
|
42053
42068
|
return {
|
|
42054
42069
|
sizeColorRecord: null,
|
|
42055
42070
|
availableColorLabels: []
|
|
@@ -42150,7 +42165,10 @@ function VtoSingleOverlay() {
|
|
|
42150
42165
|
});
|
|
42151
42166
|
}
|
|
42152
42167
|
}, [selectedColorLabel, selectedSizeLabel]);
|
|
42153
|
-
if (
|
|
42168
|
+
if (loadedProductData === false) {
|
|
42169
|
+
return /* @__PURE__ */ jsx$1(SidecarModalFrame, { onRequestClose: closeOverlay, children: /* @__PURE__ */ jsx$1(NoFitLayout, { onClose: closeOverlay, onSignOut: handleSignOutClick }) });
|
|
42170
|
+
}
|
|
42171
|
+
if (!userIsLoggedIn || !userHasAvatar || loadedProductData == null || !selectedColorSizeRecord) {
|
|
42154
42172
|
return /* @__PURE__ */ jsx$1(SidecarModalFrame, { onRequestClose: closeOverlay, children: /* @__PURE__ */ jsx$1(Loading, {}) });
|
|
42155
42173
|
}
|
|
42156
42174
|
let Layout;
|
|
@@ -42161,6 +42179,44 @@ function VtoSingleOverlay() {
|
|
|
42161
42179
|
}
|
|
42162
42180
|
return /* @__PURE__ */ jsx$1(SidecarModalFrame, { onRequestClose: closeOverlay, contentStyle: modalStyle, children: /* @__PURE__ */ jsx$1(Layout, { loadedProductData, selectedColorSizeRecord, availableColorLabels, selectedColorLabel, selectedSizeLabel, frameUrls, setModalStyle, onClose: closeOverlay, onChangeColor: setSelectedColorLabel, onChangeSize: setSelectedSizeLabel, onAddToCart: handleAddToCartClick, onSignOut: handleSignOutClick }) });
|
|
42163
42181
|
}
|
|
42182
|
+
function NoFitLayout({
|
|
42183
|
+
onClose,
|
|
42184
|
+
onSignOut
|
|
42185
|
+
}) {
|
|
42186
|
+
const {
|
|
42187
|
+
t
|
|
42188
|
+
} = useTranslation();
|
|
42189
|
+
const css2 = useCss((_theme) => ({
|
|
42190
|
+
mainContainer: {
|
|
42191
|
+
width: "100%",
|
|
42192
|
+
height: "100%",
|
|
42193
|
+
padding: "16px"
|
|
42194
|
+
},
|
|
42195
|
+
titlebarContainer: {},
|
|
42196
|
+
contentContainer: {
|
|
42197
|
+
height: "100%",
|
|
42198
|
+
display: "flex",
|
|
42199
|
+
flexDirection: "column",
|
|
42200
|
+
alignItems: "center",
|
|
42201
|
+
justifyContent: "center"
|
|
42202
|
+
},
|
|
42203
|
+
messageContainer: {
|
|
42204
|
+
marginTop: "32px",
|
|
42205
|
+
textAlign: "center"
|
|
42206
|
+
},
|
|
42207
|
+
footerContainer: {
|
|
42208
|
+
marginTop: "32px"
|
|
42209
|
+
}
|
|
42210
|
+
}));
|
|
42211
|
+
return /* @__PURE__ */ jsxs("div", { css: css2.mainContainer, children: [
|
|
42212
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.titlebarContainer, children: /* @__PURE__ */ jsx$1(ModalTitlebar, { title: t("try_it_on"), onCloseClick: onClose }) }),
|
|
42213
|
+
/* @__PURE__ */ jsxs("div", { css: css2.contentContainer, children: [
|
|
42214
|
+
/* @__PURE__ */ jsx$1("div", { children: " " }),
|
|
42215
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.messageContainer, children: /* @__PURE__ */ jsx$1(TextT, { variant: "base", t: "vto-single.no_recommendation" }) }),
|
|
42216
|
+
/* @__PURE__ */ jsx$1("div", { css: css2.footerContainer, children: /* @__PURE__ */ jsx$1(Footer, { onSignOutClick: onSignOut }) })
|
|
42217
|
+
] })
|
|
42218
|
+
] });
|
|
42219
|
+
}
|
|
42164
42220
|
function MobileLayout({
|
|
42165
42221
|
loadedProductData,
|
|
42166
42222
|
selectedColorSizeRecord,
|
|
@@ -43379,9 +43435,9 @@ const SHARED_CONFIG = {
|
|
|
43379
43435
|
appGooglePlayUrl: "https://play.google.com/store/apps/details?id=com.thefittingroom.marketplace"
|
|
43380
43436
|
},
|
|
43381
43437
|
build: {
|
|
43382
|
-
version: `${"5.0.
|
|
43383
|
-
commitHash: `${"
|
|
43384
|
-
date: `${"2026-02-
|
|
43438
|
+
version: `${"5.0.10"}`,
|
|
43439
|
+
commitHash: `${"0058a65"}`,
|
|
43440
|
+
date: `${"2026-02-01T18:44:35.278Z"}`
|
|
43385
43441
|
}
|
|
43386
43442
|
};
|
|
43387
43443
|
const CONFIGS = {
|