@thefittingroom/shop-ui 4.3.5 → 4.3.7
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 +10 -2
- package/dist/index.umd.cjs +10 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20629,7 +20629,7 @@ class FittingRoomAPI {
|
|
|
20629
20629
|
const timeoutPromise = new Promise((_, reject) => {
|
|
20630
20630
|
setTimeout(() => {
|
|
20631
20631
|
reject(TimeoutError);
|
|
20632
|
-
},
|
|
20632
|
+
}, 1e3 * 60 * 7);
|
|
20633
20633
|
});
|
|
20634
20634
|
let firestoreUser;
|
|
20635
20635
|
try {
|
|
@@ -20651,11 +20651,16 @@ class FittingRoomAPI {
|
|
|
20651
20651
|
console.error(`Frames not found on final user object for SKU: ${colorwaySizeAssetSKU}`, firestoreUser);
|
|
20652
20652
|
throw NoFramesFoundError;
|
|
20653
20653
|
}
|
|
20654
|
+
const timingMS = firestoreUser.vto?.[this.BrandID]?.[colorwaySizeAssetSKU]?.timing_ms;
|
|
20655
|
+
console.debug("vto timing", "colorway_size_asset", colorwaySizeAssetSKU, "timing_ms", timingMS);
|
|
20654
20656
|
return frames;
|
|
20655
20657
|
}
|
|
20656
20658
|
async GetCachedOrRequestUserColorwaySizeAssetFrames(firestoreUserController, colorwaySizeAssetSKU, skipCache) {
|
|
20657
20659
|
console.debug("GetCachedOrRequestUserColorwaySizeAssetFrames", colorwaySizeAssetSKU, "skipCache:", skipCache);
|
|
20658
|
-
if (
|
|
20660
|
+
if (skipCache) {
|
|
20661
|
+
console.debug("clearing cache for fresh VTO request", colorwaySizeAssetSKU);
|
|
20662
|
+
this.vtoFramesPromiseCache.delete(colorwaySizeAssetSKU);
|
|
20663
|
+
} else {
|
|
20659
20664
|
const cached = this.vtoFramesPromiseCache.get(colorwaySizeAssetSKU);
|
|
20660
20665
|
if (cached) {
|
|
20661
20666
|
console.debug("returning cached frames", colorwaySizeAssetSKU);
|
|
@@ -22168,6 +22173,7 @@ class FittingRoomController {
|
|
|
22168
22173
|
}
|
|
22169
22174
|
// callback for SizeRecommendationController
|
|
22170
22175
|
async onTryOnCallback(selectedSizeID, availableSizeIDs, fromSizeRecSelect) {
|
|
22176
|
+
const startTime = performance.now();
|
|
22171
22177
|
try {
|
|
22172
22178
|
if (!this.selectedColorwaySizeAsset) {
|
|
22173
22179
|
throw new Error("selectedColorwaySizeAsset is not set");
|
|
@@ -22201,6 +22207,8 @@ class FittingRoomController {
|
|
|
22201
22207
|
this.vtoComponent.onNewFramesReady(batchResult);
|
|
22202
22208
|
this.SizeRecommendationController.SetVTOLoading(false);
|
|
22203
22209
|
this.hasInitializedTryOn = true;
|
|
22210
|
+
const endTime = performance.now();
|
|
22211
|
+
console.debug("tryOnCallback", "timing", endTime - startTime);
|
|
22204
22212
|
} catch (e) {
|
|
22205
22213
|
this.tfrModal.onError(L$1.SomethingWentWrong);
|
|
22206
22214
|
console.log("calling HideVTOLoading after VTO error");
|
package/dist/index.umd.cjs
CHANGED
|
@@ -20633,7 +20633,7 @@ This typically indicates that your device does not have a healthy Internet conne
|
|
|
20633
20633
|
const timeoutPromise = new Promise((_, reject) => {
|
|
20634
20634
|
setTimeout(() => {
|
|
20635
20635
|
reject(TimeoutError);
|
|
20636
|
-
},
|
|
20636
|
+
}, 1e3 * 60 * 7);
|
|
20637
20637
|
});
|
|
20638
20638
|
let firestoreUser;
|
|
20639
20639
|
try {
|
|
@@ -20655,11 +20655,16 @@ This typically indicates that your device does not have a healthy Internet conne
|
|
|
20655
20655
|
console.error(`Frames not found on final user object for SKU: ${colorwaySizeAssetSKU}`, firestoreUser);
|
|
20656
20656
|
throw NoFramesFoundError;
|
|
20657
20657
|
}
|
|
20658
|
+
const timingMS = firestoreUser.vto?.[this.BrandID]?.[colorwaySizeAssetSKU]?.timing_ms;
|
|
20659
|
+
console.debug("vto timing", "colorway_size_asset", colorwaySizeAssetSKU, "timing_ms", timingMS);
|
|
20658
20660
|
return frames;
|
|
20659
20661
|
}
|
|
20660
20662
|
async GetCachedOrRequestUserColorwaySizeAssetFrames(firestoreUserController, colorwaySizeAssetSKU, skipCache) {
|
|
20661
20663
|
console.debug("GetCachedOrRequestUserColorwaySizeAssetFrames", colorwaySizeAssetSKU, "skipCache:", skipCache);
|
|
20662
|
-
if (
|
|
20664
|
+
if (skipCache) {
|
|
20665
|
+
console.debug("clearing cache for fresh VTO request", colorwaySizeAssetSKU);
|
|
20666
|
+
this.vtoFramesPromiseCache.delete(colorwaySizeAssetSKU);
|
|
20667
|
+
} else {
|
|
20663
20668
|
const cached = this.vtoFramesPromiseCache.get(colorwaySizeAssetSKU);
|
|
20664
20669
|
if (cached) {
|
|
20665
20670
|
console.debug("returning cached frames", colorwaySizeAssetSKU);
|
|
@@ -22172,6 +22177,7 @@ This typically indicates that your device does not have a healthy Internet conne
|
|
|
22172
22177
|
}
|
|
22173
22178
|
// callback for SizeRecommendationController
|
|
22174
22179
|
async onTryOnCallback(selectedSizeID, availableSizeIDs, fromSizeRecSelect) {
|
|
22180
|
+
const startTime = performance.now();
|
|
22175
22181
|
try {
|
|
22176
22182
|
if (!this.selectedColorwaySizeAsset) {
|
|
22177
22183
|
throw new Error("selectedColorwaySizeAsset is not set");
|
|
@@ -22205,6 +22211,8 @@ This typically indicates that your device does not have a healthy Internet conne
|
|
|
22205
22211
|
this.vtoComponent.onNewFramesReady(batchResult);
|
|
22206
22212
|
this.SizeRecommendationController.SetVTOLoading(false);
|
|
22207
22213
|
this.hasInitializedTryOn = true;
|
|
22214
|
+
const endTime = performance.now();
|
|
22215
|
+
console.debug("tryOnCallback", "timing", endTime - startTime);
|
|
22208
22216
|
} catch (e) {
|
|
22209
22217
|
this.tfrModal.onError(L$1.SomethingWentWrong);
|
|
22210
22218
|
console.log("calling HideVTOLoading after VTO error");
|