@wise/dynamic-flow-client 5.22.1 → 5.22.2
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/build/main.js +7 -1
- package/build/main.mjs +7 -1
- package/build/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +3 -3
package/build/main.js
CHANGED
|
@@ -1746,9 +1746,15 @@ var mergeSections = (existing, incoming) => {
|
|
|
1746
1746
|
const knownIds = new Set(existing.map((section) => section.id));
|
|
1747
1747
|
const newSections = incoming.filter((section) => !knownIds.has(section.id));
|
|
1748
1748
|
const merged = existing.map((section) => {
|
|
1749
|
+
var _a, _b;
|
|
1749
1750
|
const match = incoming.find((s) => s.id === section.id);
|
|
1750
1751
|
if (!match) return section;
|
|
1751
|
-
return
|
|
1752
|
+
return {
|
|
1753
|
+
id: match.id,
|
|
1754
|
+
title: (_a = match.title) != null ? _a : section.title,
|
|
1755
|
+
callToAction: (_b = match.callToAction) != null ? _b : section.callToAction,
|
|
1756
|
+
items: [...section.items, ...match.items]
|
|
1757
|
+
};
|
|
1752
1758
|
});
|
|
1753
1759
|
return [...merged, ...newSections];
|
|
1754
1760
|
};
|
package/build/main.mjs
CHANGED
|
@@ -1715,9 +1715,15 @@ var mergeSections = (existing, incoming) => {
|
|
|
1715
1715
|
const knownIds = new Set(existing.map((section) => section.id));
|
|
1716
1716
|
const newSections = incoming.filter((section) => !knownIds.has(section.id));
|
|
1717
1717
|
const merged = existing.map((section) => {
|
|
1718
|
+
var _a, _b;
|
|
1718
1719
|
const match = incoming.find((s) => s.id === section.id);
|
|
1719
1720
|
if (!match) return section;
|
|
1720
|
-
return
|
|
1721
|
+
return {
|
|
1722
|
+
id: match.id,
|
|
1723
|
+
title: (_a = match.title) != null ? _a : section.title,
|
|
1724
|
+
callToAction: (_b = match.callToAction) != null ? _b : section.callToAction,
|
|
1725
|
+
items: [...section.items, ...match.items]
|
|
1726
|
+
};
|
|
1721
1727
|
});
|
|
1722
1728
|
return [...merged, ...newSections];
|
|
1723
1729
|
};
|