@sledge-app/react-instant-search 2.0.29 → 2.0.30

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.
@@ -185,7 +185,8 @@ const OBJECT_DATA_STRING_KEY = {
185
185
  ACCEPTED_FILETYPE_MEDIA: "{{ accepted_filetype_media }}",
186
186
  MAX_SIZE_MEDIA: "{{ max_size_media }}",
187
187
  FILTER_TITLE: "{{ filter_title }}",
188
- PRICE_MAX_MONEY_FORMAT: "{{ price_max_money_format }}"
188
+ PRICE_MAX_MONEY_FORMAT: "{{ price_max_money_format }}",
189
+ LANGUAGE_REVIEW_PLURAL_SINGULAR: "{{ language_review_plural_singular }}"
189
190
  };
190
191
  const ELEMENT_ID = {
191
192
  PRODUCT_REVIEW: {
@@ -7721,7 +7722,7 @@ const Facet = (props) => {
7721
7722
  ...filter_option_text_transform && { textTransform: filter_option_text_transform }
7722
7723
  };
7723
7724
  let { value, label, display, indexFilter, items, settings: filterSettings } = filter;
7724
- const { show_search, auto_select_search, hide_filter_list } = filterSettings || {};
7725
+ const { show_search, auto_select_search, hide_filter_list, show_all_children_items } = filterSettings || {};
7725
7726
  const show_filter_list_when_search = !hide_filter_list;
7726
7727
  if (isFirstLoading)
7727
7728
  return null;
@@ -7847,6 +7848,7 @@ const Facet = (props) => {
7847
7848
  const isFacetHierarchical = Object.hasOwn(facetValue, "children");
7848
7849
  const isHasChildren = isFacetHierarchical && (children == null ? void 0 : children.length);
7849
7850
  const isChecked = Boolean(clickedFacets && ((_a3 = clickedFacets[value]) == null ? void 0 : _a3.includes(itemValue)));
7851
+ const isShowAllChildrenItems = show_all_children_items ? isHasChildren : isHasChildren && isChecked;
7850
7852
  const { haveNextPage: haveNextPage2, currentItems: currentItems2 } = handleFacetLoadMore({
7851
7853
  facetItems: children
7852
7854
  });
@@ -7865,7 +7867,7 @@ const Facet = (props) => {
7865
7867
  motion.div,
7866
7868
  {
7867
7869
  initial: false,
7868
- animate: isChecked ? "open" : "closed",
7870
+ animate: isShowAllChildrenItems ? "open" : isChecked ? "open" : "closed",
7869
7871
  variants: ROTATE_FILTER_ARROW_ANIMATION,
7870
7872
  className: "sledge-instant-search__result-filter-checkbox-item-level-arrow",
7871
7873
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronArrowDownIcon, { width: 15, height: 15, color: "#000000" })
@@ -7899,7 +7901,7 @@ const Facet = (props) => {
7899
7901
  },
7900
7902
  key
7901
7903
  ),
7902
- isHasChildren && isChecked ? haveNextPage2 ? React__default.cloneElement(
7904
+ isShowAllChildrenItems ? haveNextPage2 ? React__default.cloneElement(
7903
7905
  /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
7904
7906
  blockComponentChildren,
7905
7907
  loadMoreComponent