@thefittingroom/shop-ui 1.1.9 → 1.1.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/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* thefittingroom v1.1.
|
|
2
|
+
* thefittingroom v1.1.10 (2024-05-17T17:05:22.690Z)
|
|
3
3
|
* Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
function loadImageRecursive(imageURL, imageURLs) {
|
|
@@ -36575,7 +36575,7 @@ class SizeRecComponent {
|
|
|
36575
36575
|
const { locations } = sizes[index];
|
|
36576
36576
|
const html = locations
|
|
36577
36577
|
.sort(({ location: a }, { location: b }) => (a < b ? -1 : 1))
|
|
36578
|
-
.map(({ location, fit }) => this.renderSizeRecTableRow(location, fit))
|
|
36578
|
+
.map(({ location, fit, isPerfect }) => this.renderSizeRecTableRow(location, fit, isPerfect))
|
|
36579
36579
|
.join('');
|
|
36580
36580
|
this.tfrSizeRecTable.innerHTML = html;
|
|
36581
36581
|
}
|
|
@@ -36586,10 +36586,10 @@ class SizeRecComponent {
|
|
|
36586
36586
|
.join('');
|
|
36587
36587
|
this.tfrSizeRecSelect.innerHTML = html;
|
|
36588
36588
|
}
|
|
36589
|
-
renderSizeRecTableRow(location, fit) {
|
|
36589
|
+
renderSizeRecTableRow(location, fit, isPerfect = false) {
|
|
36590
36590
|
return `<div class="tfr-size-rec-table-row">
|
|
36591
36591
|
<div class="tfr-size-rec-table-cell-left">${location}</div>
|
|
36592
|
-
<div class="tfr-size-rec-table-cell-right ${
|
|
36592
|
+
<div class="tfr-size-rec-table-cell-right ${isPerfect ? 'perfect' : ''}">
|
|
36593
36593
|
${fit}
|
|
36594
36594
|
</div>
|
|
36595
36595
|
</div>`;
|
|
@@ -36654,6 +36654,7 @@ class TfrSizeRec {
|
|
|
36654
36654
|
this.tfrShop = tfrShop;
|
|
36655
36655
|
this.onSignInClick = onSignInClick;
|
|
36656
36656
|
this.onSignOutClick = onSignOutClick;
|
|
36657
|
+
this.perfectFits = [index.Fit.PERFECT_FIT, index.Fit.SLIGHTLY_LOOSE, index.Fit.SLIGHTLY_TIGHT];
|
|
36657
36658
|
this.sizeRecComponent = new SizeRecComponent(sizeRecMainDivId, this.onSignInClick, this.onSignOutClick);
|
|
36658
36659
|
}
|
|
36659
36660
|
get sku() {
|
|
@@ -36719,6 +36720,7 @@ class TfrSizeRec {
|
|
|
36719
36720
|
locations: fit.measurement_location_fits.map((locationFit) => {
|
|
36720
36721
|
return {
|
|
36721
36722
|
fit: index.FitNames[locationFit.fit],
|
|
36723
|
+
isPerfect: this.perfectFits.includes(locationFit.fit),
|
|
36722
36724
|
location: index.MeasurementLocationName[locationFit.measurement_location],
|
|
36723
36725
|
};
|
|
36724
36726
|
}),
|