@sledge-app/react-instant-search 2.0.19 → 2.0.20
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.
|
@@ -7726,8 +7726,11 @@ const Facet = (props) => {
|
|
|
7726
7726
|
});
|
|
7727
7727
|
};
|
|
7728
7728
|
const colorSwatchComponent = ({ item = {}, index }) => {
|
|
7729
|
-
var _a2;
|
|
7730
|
-
let getColorSwatch = (colorSwatches == null ? void 0 : colorSwatches.filter(({ name }) =>
|
|
7729
|
+
var _a2, _b2;
|
|
7730
|
+
let getColorSwatch = ((_a2 = colorSwatches == null ? void 0 : colorSwatches.filter(({ name }) => {
|
|
7731
|
+
var _a3;
|
|
7732
|
+
return (name == null ? void 0 : name.toLowerCase()) === ((_a3 = item == null ? void 0 : item.value) == null ? void 0 : _a3.toLowerCase());
|
|
7733
|
+
})) == null ? void 0 : _a2[0]) || {};
|
|
7731
7734
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
7732
7735
|
ColorSwatch,
|
|
7733
7736
|
{
|
|
@@ -7740,7 +7743,7 @@ const Facet = (props) => {
|
|
|
7740
7743
|
parentId: value,
|
|
7741
7744
|
value: e.currentTarget.value
|
|
7742
7745
|
}),
|
|
7743
|
-
checked: Boolean(clickedFacets && ((
|
|
7746
|
+
checked: Boolean(clickedFacets && ((_b2 = clickedFacets[value]) == null ? void 0 : _b2.includes(item == null ? void 0 : item.value))),
|
|
7744
7747
|
...display.toLowerCase() === "swatch_with_label" ? {
|
|
7745
7748
|
labelType: "text",
|
|
7746
7749
|
label: `${item == null ? void 0 : item.labelName} ${(item == null ? void 0 : item.counter) !== void 0 && isShowNumberMatchingProduct ? ` (${item == null ? void 0 : item.counter})` : ""}`,
|