react-instantsearch 6.38.3 → 6.39.1

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/umd/Dom.js CHANGED
@@ -868,7 +868,7 @@
868
868
  });
869
869
  }
870
870
 
871
- var version = '6.38.3';
871
+ var version = '6.39.1';
872
872
 
873
873
  function _typeof$2(obj) {
874
874
  "@babel/helpers - typeof";
@@ -4347,7 +4347,33 @@
4347
4347
  };
4348
4348
  });
4349
4349
  } else if (results._state.isHierarchicalFacet(attribute)) {
4350
- return find$1(results.hierarchicalFacets, predicate);
4350
+ var hierarchicalFacetValues = find$1(results.hierarchicalFacets, predicate);
4351
+ if (!hierarchicalFacetValues) return hierarchicalFacetValues;
4352
+
4353
+ var hierarchicalFacet = results._state.getHierarchicalFacetByName(attribute);
4354
+ var currentRefinementSplit = unescapeFacetValue$3(
4355
+ results._state.getHierarchicalRefinement(attribute)[0] || ''
4356
+ ).split(results._state._getHierarchicalFacetSeparator(hierarchicalFacet));
4357
+ currentRefinementSplit.unshift(attribute);
4358
+
4359
+ setIsRefined(hierarchicalFacetValues, currentRefinementSplit, 0);
4360
+
4361
+ return hierarchicalFacetValues;
4362
+ }
4363
+ }
4364
+
4365
+ /**
4366
+ * Set the isRefined of a hierarchical facet result based on the current state.
4367
+ * @param {SearchResults.HierarchicalFacet} item Hierarchical facet to fix
4368
+ * @param {string[]} currentRefinementSplit array of parts of the current hierarchical refinement
4369
+ * @param {number} depth recursion depth in the currentRefinement
4370
+ */
4371
+ function setIsRefined(item, currentRefinement, depth) {
4372
+ item.isRefined = item.name === currentRefinement[depth];
4373
+ if (item.data) {
4374
+ item.data.forEach(function(child) {
4375
+ setIsRefined(child, currentRefinement, depth + 1);
4376
+ });
4351
4377
  }
4352
4378
  }
4353
4379
 
@@ -5436,7 +5462,7 @@
5436
5462
 
5437
5463
  var requestBuilder_1 = requestBuilder;
5438
5464
 
5439
- var version$1 = '3.11.2';
5465
+ var version$1 = '3.11.3';
5440
5466
 
5441
5467
  var escapeFacetValue$3 = escapeFacetValue_1.escapeFacetValue;
5442
5468
 
@@ -13238,7 +13264,8 @@
13238
13264
  viewBox: "0 0 38 38",
13239
13265
  xmlns: "http://www.w3.org/2000/svg",
13240
13266
  stroke: "#444",
13241
- className: cx$4('loadingIcon')
13267
+ className: cx$4('loadingIcon'),
13268
+ "aria-hidden": "true"
13242
13269
  }, /*#__PURE__*/React__default.createElement("g", {
13243
13270
  fill: "none",
13244
13271
  fillRule: "evenodd"
@@ -13265,7 +13292,8 @@
13265
13292
  xmlns: "http://www.w3.org/2000/svg",
13266
13293
  viewBox: "0 0 20 20",
13267
13294
  width: "10",
13268
- height: "10"
13295
+ height: "10",
13296
+ "aria-hidden": "true"
13269
13297
  }, /*#__PURE__*/React__default.createElement("path", {
13270
13298
  d: "M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"
13271
13299
  }));
@@ -13274,7 +13302,8 @@
13274
13302
  xmlns: "http://www.w3.org/2000/svg",
13275
13303
  width: "10",
13276
13304
  height: "10",
13277
- viewBox: "0 0 40 40"
13305
+ viewBox: "0 0 40 40",
13306
+ "aria-hidden": "true"
13278
13307
  }, /*#__PURE__*/React__default.createElement("path", {
13279
13308
  d: "M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"
13280
13309
  }));