@thefittingroom/shop-ui 1.2.2 → 1.2.4
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 +17 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +3 -3
- package/dist/esm/tfr.d.ts +1 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* thefittingroom v1.2.
|
|
2
|
+
* thefittingroom v1.2.4 (2024-06-20T18:21:11.579Z)
|
|
3
3
|
* Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
function loadImageRecursive(imageURL, imageURLs) {
|
|
@@ -47,7 +47,7 @@ const InitImageSlider = (sliderID, onChange) => {
|
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
/*!
|
|
50
|
-
* thefittingroom v1.1.
|
|
50
|
+
* thefittingroom v1.1.11 (2024-06-20T18:20:57.355Z)
|
|
51
51
|
* Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
|
|
52
52
|
*/
|
|
53
53
|
|
|
@@ -23009,6 +23009,17 @@ class TfrShop {
|
|
|
23009
23009
|
return this.measurementLocations.has(location) ? this.measurementLocations.get(location) : location;
|
|
23010
23010
|
});
|
|
23011
23011
|
}
|
|
23012
|
+
async getStyleByBrandStyleId(brandStyleId) {
|
|
23013
|
+
try {
|
|
23014
|
+
const constraints = [rl('brand_id', '==', this.brandId)];
|
|
23015
|
+
constraints.push(rl('brand_style_id', '==', brandStyleId));
|
|
23016
|
+
const querySnapshot = await this.firebase.getDocs('styles', constraints);
|
|
23017
|
+
return querySnapshot.docs[0].data();
|
|
23018
|
+
}
|
|
23019
|
+
catch (error) {
|
|
23020
|
+
return getFirebaseError(error);
|
|
23021
|
+
}
|
|
23022
|
+
}
|
|
23012
23023
|
async getColorwaySizeAssets(styleId, skus) {
|
|
23013
23024
|
const constraints = [rl('brand_id', '==', this.brandId)];
|
|
23014
23025
|
if (styleId)
|
|
@@ -36704,7 +36715,8 @@ class TfrSizeRec {
|
|
|
36704
36715
|
}
|
|
36705
36716
|
catch (error) {
|
|
36706
36717
|
try {
|
|
36707
|
-
const
|
|
36718
|
+
const style = await this.tfrShop.getStyleByBrandStyleId(this.sku);
|
|
36719
|
+
const sizes = await this.getRecommendedSizes(String(style.id));
|
|
36708
36720
|
return sizes;
|
|
36709
36721
|
}
|
|
36710
36722
|
catch (error) {
|
|
@@ -36765,8 +36777,8 @@ class FittingRoom {
|
|
|
36765
36777
|
get sku() {
|
|
36766
36778
|
return this.tfrSizeRec.sku;
|
|
36767
36779
|
}
|
|
36768
|
-
async checkIfPublished(
|
|
36769
|
-
const style = await this.tfrShop.
|
|
36780
|
+
async checkIfPublished(brandStyleId) {
|
|
36781
|
+
const style = await this.tfrShop.getStyleByBrandStyleId(brandStyleId);
|
|
36770
36782
|
return style.is_published;
|
|
36771
36783
|
}
|
|
36772
36784
|
setSku(sku) {
|