@thefittingroom/shop-ui 1.1.5 → 1.1.6

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * thefittingroom v1.1.5 (2024-04-05T19:10:10.348Z)
2
+ * thefittingroom v1.1.6 (2024-04-05T19:16:24.483Z)
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.0 (2024-02-16T20:34:26.286Z)
50
+ * thefittingroom v1.1.3 (2024-04-05T19:13:45.167Z)
51
51
  * Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
52
52
  */
53
53
 
@@ -23362,7 +23362,8 @@ class TfrShop {
23362
23362
  var _a;
23363
23363
  const asset = await this.getColorwaySizeAssetFromSku(sku);
23364
23364
  const styleCategory = await this.getStyleCategory(asset.style_id);
23365
- const classificationLocation = ((_a = Taxonomy[styleCategory.category]) === null || _a === void 0 ? void 0 : _a[styleCategory.sub_category]) || null;
23365
+ const taxonomy = await this.getGetTaxonomy(styleCategory.style_garment_category_id);
23366
+ const classificationLocation = ((_a = Taxonomy[taxonomy.style_category]) === null || _a === void 0 ? void 0 : _a[taxonomy.garment_category]) || null;
23366
23367
  return classificationLocation
23367
23368
  ? ClassificationLocations[classificationLocation].map((location) => MeasurementLocationName[location])
23368
23369
  : null;
@@ -23388,7 +23389,16 @@ class TfrShop {
23388
23389
  }
23389
23390
  async getStyleCategory(styleId) {
23390
23391
  try {
23391
- const doc = await this.firebase.getDoc('style_categories', String(styleId));
23392
+ const doc = await this.firebase.getDoc('styles', String(styleId));
23393
+ return doc;
23394
+ }
23395
+ catch (error) {
23396
+ return getFirebaseError(error);
23397
+ }
23398
+ }
23399
+ async getGetTaxonomy(styleId) {
23400
+ try {
23401
+ const doc = await this.firebase.getDoc('style_garment_categories', String(styleId));
23392
23402
  return doc;
23393
23403
  }
23394
23404
  catch (error) {