@thefittingroom/shop-ui 5.0.33 → 5.0.35
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 +48 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -41683,6 +41683,10 @@ function buildVtoWireItems(loaded, parentCsaId, untucked) {
|
|
|
41683
41683
|
}
|
|
41684
41684
|
const childCsaIds = resolveContainerExpansion(loaded, parentCsaId);
|
|
41685
41685
|
if (!childCsaIds) {
|
|
41686
|
+
logger$c.logWarn("buildVtoWireItems: container expansion failed, skipping request", {
|
|
41687
|
+
externalId: loaded.externalId,
|
|
41688
|
+
parentCsaId
|
|
41689
|
+
});
|
|
41686
41690
|
return null;
|
|
41687
41691
|
}
|
|
41688
41692
|
return childCsaIds.map((csaId) => ({
|
|
@@ -41696,26 +41700,52 @@ function resolveContainerExpansion(loaded, parentCsaId) {
|
|
|
41696
41700
|
}
|
|
41697
41701
|
for (const sz of loaded.sizeFitRecommendation.available_sizes) {
|
|
41698
41702
|
const csa = sz.colorway_size_assets.find((c) => c.id === parentCsaId);
|
|
41699
|
-
if (!csa
|
|
41703
|
+
if (!csa) {
|
|
41704
|
+
continue;
|
|
41705
|
+
}
|
|
41706
|
+
if (!csa.colorway_name) {
|
|
41707
|
+
logger$c.logWarn("resolveContainerExpansion: parent CSA has no colorway_name", {
|
|
41708
|
+
externalId: loaded.externalId,
|
|
41709
|
+
parentCsaId,
|
|
41710
|
+
parentSizeId: sz.id
|
|
41711
|
+
});
|
|
41700
41712
|
continue;
|
|
41701
41713
|
}
|
|
41702
|
-
return resolveContainerChildCSAs(loaded.container, sz.id, csa.colorway_name);
|
|
41714
|
+
return resolveContainerChildCSAs(loaded.container, sz.id, csa.colorway_name, loaded.externalId);
|
|
41703
41715
|
}
|
|
41716
|
+
logger$c.logWarn("resolveContainerExpansion: parent CSA not found in any available_size", {
|
|
41717
|
+
externalId: loaded.externalId,
|
|
41718
|
+
parentCsaId,
|
|
41719
|
+
availableSizeIds: loaded.sizeFitRecommendation.available_sizes.map((s) => s.id),
|
|
41720
|
+
csaIdsBySize: loaded.sizeFitRecommendation.available_sizes.map((s) => ({
|
|
41721
|
+
sizeId: s.id,
|
|
41722
|
+
csaIds: s.colorway_size_assets.map((c) => c.id)
|
|
41723
|
+
}))
|
|
41724
|
+
});
|
|
41704
41725
|
return null;
|
|
41705
41726
|
}
|
|
41706
|
-
function resolveContainerChildCSAs(container, parentSizeId, parentColorwayName) {
|
|
41727
|
+
function resolveContainerChildCSAs(container, parentSizeId, parentColorwayName, externalId) {
|
|
41707
41728
|
const relevantMappings = container.setSizeMappings.filter((m) => m.parent_size_id === parentSizeId);
|
|
41708
41729
|
if (relevantMappings.length === 0) {
|
|
41730
|
+
logger$c.logWarn("resolveContainerChildCSAs: no set_size_mappings for parent size", {
|
|
41731
|
+
externalId,
|
|
41732
|
+
parentSizeId,
|
|
41733
|
+
parentColorwayName,
|
|
41734
|
+
mappingParentSizeIds: container.setSizeMappings.map((m) => m.parent_size_id)
|
|
41735
|
+
});
|
|
41709
41736
|
return null;
|
|
41710
41737
|
}
|
|
41711
41738
|
const csaIds = [];
|
|
41712
41739
|
for (const mapping of relevantMappings) {
|
|
41713
41740
|
let matchedCsaId = null;
|
|
41714
|
-
|
|
41741
|
+
let ownerChildIdx = null;
|
|
41742
|
+
for (let i = 0; i < container.children.length; i++) {
|
|
41743
|
+
const child = container.children[i];
|
|
41715
41744
|
const size = (child.sizes ?? []).find((s) => s.id === mapping.child_size_id);
|
|
41716
41745
|
if (!size) {
|
|
41717
41746
|
continue;
|
|
41718
41747
|
}
|
|
41748
|
+
ownerChildIdx = i;
|
|
41719
41749
|
const csa = (child.colorway_size_assets ?? []).find((a) => a.size_id === size.id && a.colorway_name === parentColorwayName);
|
|
41720
41750
|
if (csa) {
|
|
41721
41751
|
matchedCsaId = csa.id;
|
|
@@ -41723,6 +41753,17 @@ function resolveContainerChildCSAs(container, parentSizeId, parentColorwayName)
|
|
|
41723
41753
|
break;
|
|
41724
41754
|
}
|
|
41725
41755
|
if (matchedCsaId == null) {
|
|
41756
|
+
const owner = ownerChildIdx != null ? container.children[ownerChildIdx] : null;
|
|
41757
|
+
logger$c.logWarn("resolveContainerChildCSAs: no matching child CSA", {
|
|
41758
|
+
externalId,
|
|
41759
|
+
parentSizeId,
|
|
41760
|
+
parentColorwayName,
|
|
41761
|
+
childSizeId: mapping.child_size_id,
|
|
41762
|
+
ownerChildIdx,
|
|
41763
|
+
ownerChildFound: owner != null,
|
|
41764
|
+
ownerColorwayNames: owner ? (owner.colorway_size_assets ?? []).map((a) => a.colorway_name) : [],
|
|
41765
|
+
ownerChildSizeIds: owner ? (owner.sizes ?? []).map((s) => s.id) : []
|
|
41766
|
+
});
|
|
41726
41767
|
return null;
|
|
41727
41768
|
}
|
|
41728
41769
|
csaIds.push(matchedCsaId);
|
|
@@ -48021,9 +48062,9 @@ const SHARED_CONFIG = {
|
|
|
48021
48062
|
appGooglePlayUrl: "https://play.google.com/store/apps/details?id=com.thefittingroom.marketplace"
|
|
48022
48063
|
},
|
|
48023
48064
|
build: {
|
|
48024
|
-
version: `${"5.0.
|
|
48025
|
-
commitHash: `${"
|
|
48026
|
-
date: `${"2026-07-
|
|
48065
|
+
version: `${"5.0.35"}`,
|
|
48066
|
+
commitHash: `${"1640850"}`,
|
|
48067
|
+
date: `${"2026-07-18T07:33:00.590Z"}`
|
|
48027
48068
|
}
|
|
48028
48069
|
};
|
|
48029
48070
|
const CONFIGS = {
|