instantsearch.js 4.64.3 → 4.65.0

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.
Files changed (122) hide show
  1. package/cjs/components/Answers/Answers.js +2 -2
  2. package/cjs/components/Breadcrumb/Breadcrumb.js +4 -4
  3. package/cjs/components/ClearRefinements/ClearRefinements.js +2 -2
  4. package/cjs/components/CurrentRefinements/CurrentRefinements.js +2 -2
  5. package/cjs/components/GeoSearchControls/GeoSearchControls.js +3 -3
  6. package/cjs/components/Highlight/Highlight.js +5 -5
  7. package/cjs/components/Hits/Hits.js +2 -2
  8. package/cjs/components/InfiniteHits/InfiniteHits.js +4 -4
  9. package/cjs/components/InternalHighlight/InternalHighlight.js +2 -2
  10. package/cjs/components/MenuSelect/MenuSelect.js +2 -2
  11. package/cjs/components/Pagination/Pagination.js +3 -3
  12. package/cjs/components/Panel/Panel.js +2 -2
  13. package/cjs/components/RangeInput/RangeInput.js +4 -4
  14. package/cjs/components/RefinementList/RefinementList.js +4 -4
  15. package/cjs/components/ReverseHighlight/ReverseHighlight.js +5 -5
  16. package/cjs/components/ReverseSnippet/ReverseSnippet.js +5 -5
  17. package/cjs/components/Selector/Selector.js +3 -3
  18. package/cjs/components/Slider/Pit.js +2 -2
  19. package/cjs/components/Slider/Slider.js +3 -3
  20. package/cjs/components/Snippet/Snippet.js +5 -5
  21. package/cjs/components/Stats/Stats.js +2 -2
  22. package/cjs/components/Template/Template.js +64 -7
  23. package/cjs/lib/version.js +1 -1
  24. package/cjs/widgets/answers/answers.js +7 -7
  25. package/cjs/widgets/breadcrumb/breadcrumb.js +8 -8
  26. package/cjs/widgets/clear-refinements/clear-refinements.js +4 -4
  27. package/cjs/widgets/current-refinements/current-refinements.js +9 -9
  28. package/cjs/widgets/geo-search/geo-search.js +11 -11
  29. package/cjs/widgets/hierarchical-menu/defaultTemplates.js +4 -4
  30. package/cjs/widgets/hierarchical-menu/hierarchical-menu.js +14 -14
  31. package/cjs/widgets/hits/hits.js +5 -5
  32. package/cjs/widgets/hits-per-page/hits-per-page.js +4 -4
  33. package/cjs/widgets/infinite-hits/infinite-hits.js +9 -9
  34. package/cjs/widgets/menu/defaultTemplates.js +4 -4
  35. package/cjs/widgets/menu/menu.js +11 -11
  36. package/cjs/widgets/menu-select/menu-select.js +5 -5
  37. package/cjs/widgets/numeric-menu/numeric-menu.js +9 -9
  38. package/cjs/widgets/pagination/pagination.js +13 -13
  39. package/cjs/widgets/panel/panel.js +10 -10
  40. package/cjs/widgets/powered-by/powered-by.js +4 -4
  41. package/cjs/widgets/query-rule-custom-data/query-rule-custom-data.js +2 -2
  42. package/cjs/widgets/range-input/range-input.js +10 -10
  43. package/cjs/widgets/range-slider/range-slider.js +3 -3
  44. package/cjs/widgets/rating-menu/defaultTemplates.js +6 -6
  45. package/cjs/widgets/rating-menu/rating-menu.js +13 -13
  46. package/cjs/widgets/refinement-list/defaultTemplates.js +5 -5
  47. package/cjs/widgets/refinement-list/refinement-list.js +23 -23
  48. package/cjs/widgets/relevant-sort/relevant-sort.js +4 -4
  49. package/cjs/widgets/search-box/search-box.js +10 -10
  50. package/cjs/widgets/sort-by/sort-by.js +4 -4
  51. package/cjs/widgets/stats/stats.js +3 -3
  52. package/cjs/widgets/toggle-refinement/toggle-refinement.js +5 -5
  53. package/cjs/widgets/voice-search/voice-search.js +4 -4
  54. package/dist/instantsearch.development.d.ts +6 -2
  55. package/dist/instantsearch.development.js +187 -141
  56. package/dist/instantsearch.development.js.map +1 -1
  57. package/dist/instantsearch.production.d.ts +6 -2
  58. package/dist/instantsearch.production.min.d.ts +6 -2
  59. package/dist/instantsearch.production.min.js +2 -2
  60. package/dist/instantsearch.production.min.js.map +1 -1
  61. package/es/components/Answers/Answers.js +1 -1
  62. package/es/components/Breadcrumb/Breadcrumb.js +1 -1
  63. package/es/components/ClearRefinements/ClearRefinements.js +1 -1
  64. package/es/components/CurrentRefinements/CurrentRefinements.js +1 -1
  65. package/es/components/GeoSearchControls/GeoSearchControls.js +1 -1
  66. package/es/components/Highlight/Highlight.d.ts +1 -1
  67. package/es/components/Highlight/Highlight.js +1 -1
  68. package/es/components/Hits/Hits.js +1 -1
  69. package/es/components/InfiniteHits/InfiniteHits.js +1 -1
  70. package/es/components/InternalHighlight/InternalHighlight.d.ts +1 -1
  71. package/es/components/InternalHighlight/InternalHighlight.js +1 -1
  72. package/es/components/MenuSelect/MenuSelect.js +1 -1
  73. package/es/components/Pagination/Pagination.js +1 -1
  74. package/es/components/Panel/Panel.js +1 -1
  75. package/es/components/RangeInput/RangeInput.js +1 -1
  76. package/es/components/RefinementList/RefinementList.js +1 -1
  77. package/es/components/ReverseHighlight/ReverseHighlight.d.ts +1 -1
  78. package/es/components/ReverseHighlight/ReverseHighlight.js +1 -1
  79. package/es/components/ReverseSnippet/ReverseSnippet.d.ts +1 -1
  80. package/es/components/ReverseSnippet/ReverseSnippet.js +1 -1
  81. package/es/components/Selector/Selector.js +1 -1
  82. package/es/components/Slider/Pit.js +1 -1
  83. package/es/components/Slider/Slider.js +1 -1
  84. package/es/components/Snippet/Snippet.d.ts +1 -1
  85. package/es/components/Snippet/Snippet.js +1 -1
  86. package/es/components/Stats/Stats.js +1 -1
  87. package/es/components/Template/Template.d.ts +1 -1
  88. package/es/components/Template/Template.js +65 -8
  89. package/es/connectors/autocomplete/connectAutocomplete.d.ts +4 -0
  90. package/es/lib/version.d.ts +1 -1
  91. package/es/lib/version.js +1 -1
  92. package/es/widgets/answers/answers.js +1 -1
  93. package/es/widgets/breadcrumb/breadcrumb.js +1 -1
  94. package/es/widgets/clear-refinements/clear-refinements.js +1 -1
  95. package/es/widgets/current-refinements/current-refinements.js +1 -1
  96. package/es/widgets/geo-search/geo-search.js +1 -1
  97. package/es/widgets/hierarchical-menu/defaultTemplates.js +1 -1
  98. package/es/widgets/hierarchical-menu/hierarchical-menu.js +1 -1
  99. package/es/widgets/hits/hits.js +1 -1
  100. package/es/widgets/hits-per-page/hits-per-page.js +1 -1
  101. package/es/widgets/infinite-hits/infinite-hits.js +1 -1
  102. package/es/widgets/menu/defaultTemplates.js +1 -1
  103. package/es/widgets/menu/menu.js +1 -1
  104. package/es/widgets/menu-select/menu-select.js +1 -1
  105. package/es/widgets/numeric-menu/numeric-menu.js +1 -1
  106. package/es/widgets/pagination/pagination.js +1 -1
  107. package/es/widgets/panel/panel.js +1 -1
  108. package/es/widgets/powered-by/powered-by.js +1 -1
  109. package/es/widgets/query-rule-custom-data/query-rule-custom-data.js +1 -1
  110. package/es/widgets/range-input/range-input.js +1 -1
  111. package/es/widgets/range-slider/range-slider.js +1 -1
  112. package/es/widgets/rating-menu/defaultTemplates.js +1 -1
  113. package/es/widgets/rating-menu/rating-menu.js +1 -1
  114. package/es/widgets/refinement-list/defaultTemplates.js +1 -1
  115. package/es/widgets/refinement-list/refinement-list.js +1 -1
  116. package/es/widgets/relevant-sort/relevant-sort.js +1 -1
  117. package/es/widgets/search-box/search-box.js +1 -1
  118. package/es/widgets/sort-by/sort-by.js +1 -1
  119. package/es/widgets/stats/stats.js +1 -1
  120. package/es/widgets/toggle-refinement/toggle-refinement.js +1 -1
  121. package/es/widgets/voice-search/voice-search.js +1 -1
  122. package/package.json +6 -7
@@ -1,4 +1,4 @@
1
- /*! InstantSearch.js 4.64.3 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch */
1
+ /*! InstantSearch.js 4.65.0 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -14902,7 +14902,7 @@
14902
14902
  };
14903
14903
  }
14904
14904
 
14905
- var version$1 = '4.64.3';
14905
+ var version$1 = '4.65.0';
14906
14906
 
14907
14907
  var withUsage$r = createDocumentationMessageGenerator({
14908
14908
  name: 'instantsearch'
@@ -15538,20 +15538,142 @@
15538
15538
  createMetadataMiddleware: createMetadataMiddleware
15539
15539
  });
15540
15540
 
15541
- function cx() {
15542
- for (var _len = arguments.length, cssClasses = new Array(_len), _key = 0; _key < _len; _key++) {
15543
- cssClasses[_key] = arguments[_key];
15541
+ function unwrapExports (x) {
15542
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
15543
+ }
15544
+
15545
+ function createCommonjsModule(fn, module) {
15546
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
15547
+ }
15548
+
15549
+ var _extends_1 = createCommonjsModule(function (module) {
15550
+ function _extends() {
15551
+ module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {
15552
+ for (var i = 1; i < arguments.length; i++) {
15553
+ var source = arguments[i];
15554
+ for (var key in source) {
15555
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
15556
+ target[key] = source[key];
15557
+ }
15558
+ }
15559
+ }
15560
+ return target;
15561
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports;
15562
+ return _extends.apply(this, arguments);
15563
+ }
15564
+ module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
15565
+ });
15566
+
15567
+ var _extends$1 = unwrapExports(_extends_1);
15568
+
15569
+ var objectWithoutPropertiesLoose = createCommonjsModule(function (module) {
15570
+ function _objectWithoutPropertiesLoose(source, excluded) {
15571
+ if (source == null) return {};
15572
+ var target = {};
15573
+ var sourceKeys = Object.keys(source);
15574
+ var key, i;
15575
+ for (i = 0; i < sourceKeys.length; i++) {
15576
+ key = sourceKeys[i];
15577
+ if (excluded.indexOf(key) >= 0) continue;
15578
+ target[key] = source[key];
15544
15579
  }
15580
+ return target;
15581
+ }
15582
+ module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
15583
+ });
15584
+
15585
+ unwrapExports(objectWithoutPropertiesLoose);
15586
+
15587
+ var objectWithoutProperties = createCommonjsModule(function (module) {
15588
+ function _objectWithoutProperties(source, excluded) {
15589
+ if (source == null) return {};
15590
+ var target = objectWithoutPropertiesLoose(source, excluded);
15591
+ var key, i;
15592
+ if (Object.getOwnPropertySymbols) {
15593
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
15594
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
15595
+ key = sourceSymbolKeys[i];
15596
+ if (excluded.indexOf(key) >= 0) continue;
15597
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
15598
+ target[key] = source[key];
15599
+ }
15600
+ }
15601
+ return target;
15602
+ }
15603
+ module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports;
15604
+ });
15605
+
15606
+ var _objectWithoutProperties$1 = unwrapExports(objectWithoutProperties);
15545
15607
 
15546
- return cssClasses.reduce(function (acc, className) {
15608
+ function cx() {
15609
+ for (var _len = arguments.length, classNames = new Array(_len), _key = 0; _key < _len; _key++) {
15610
+ classNames[_key] = arguments[_key];
15611
+ }
15612
+ return classNames.reduce(function (acc, className) {
15547
15613
  if (Array.isArray(className)) {
15548
15614
  return acc.concat(className);
15549
15615
  }
15550
-
15551
15616
  return acc.concat([className]);
15552
15617
  }, []).filter(Boolean).join(' ');
15553
15618
  }
15554
15619
 
15620
+ var _excluded$9 = ["parts", "highlightedTagName", "nonHighlightedTagName", "separator", "className", "classNames"];
15621
+ function createHighlightPartComponent(_ref) {
15622
+ var createElement = _ref.createElement;
15623
+ return function HighlightPart(_ref2) {
15624
+ var classNames = _ref2.classNames,
15625
+ children = _ref2.children,
15626
+ highlightedTagName = _ref2.highlightedTagName,
15627
+ isHighlighted = _ref2.isHighlighted,
15628
+ nonHighlightedTagName = _ref2.nonHighlightedTagName;
15629
+ var TagName = isHighlighted ? highlightedTagName : nonHighlightedTagName;
15630
+ return createElement(TagName, {
15631
+ className: isHighlighted ? classNames.highlighted : classNames.nonHighlighted
15632
+ }, children);
15633
+ };
15634
+ }
15635
+ function createHighlightComponent(_ref3) {
15636
+ var createElement = _ref3.createElement,
15637
+ Fragment = _ref3.Fragment;
15638
+ var HighlightPart = createHighlightPartComponent({
15639
+ createElement: createElement,
15640
+ Fragment: Fragment
15641
+ });
15642
+ return function Highlight(userProps) {
15643
+ // Not destructured in function signature, to make sure it's not exposed in
15644
+ // the type definition.
15645
+ var parts = userProps.parts,
15646
+ _userProps$highlighte = userProps.highlightedTagName,
15647
+ highlightedTagName = _userProps$highlighte === void 0 ? 'mark' : _userProps$highlighte,
15648
+ _userProps$nonHighlig = userProps.nonHighlightedTagName,
15649
+ nonHighlightedTagName = _userProps$nonHighlig === void 0 ? 'span' : _userProps$nonHighlig,
15650
+ _userProps$separator = userProps.separator,
15651
+ separator = _userProps$separator === void 0 ? ', ' : _userProps$separator,
15652
+ className = userProps.className,
15653
+ _userProps$classNames = userProps.classNames,
15654
+ classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
15655
+ props = _objectWithoutProperties$1(userProps, _excluded$9);
15656
+ return createElement("span", _extends$1({}, props, {
15657
+ className: cx(classNames.root, className)
15658
+ }), parts.map(function (part, partIndex) {
15659
+ var isLastPart = partIndex === parts.length - 1;
15660
+ return createElement(Fragment, {
15661
+ key: partIndex
15662
+ }, part.map(function (subPart, subPartIndex) {
15663
+ return createElement(HighlightPart, {
15664
+ key: subPartIndex,
15665
+ classNames: classNames,
15666
+ highlightedTagName: highlightedTagName,
15667
+ nonHighlightedTagName: nonHighlightedTagName,
15668
+ isHighlighted: subPart.isHighlighted
15669
+ }, subPart.value);
15670
+ }), !isLastPart && createElement("span", {
15671
+ className: classNames.separator
15672
+ }, separator));
15673
+ }));
15674
+ };
15675
+ }
15676
+
15555
15677
  function prepareTemplates(
15556
15678
  // can not use = {} here, since the template could have different constraints
15557
15679
  defaultTemplates) {
@@ -15585,14 +15707,6 @@
15585
15707
  }, preparedTemplates);
15586
15708
  }
15587
15709
 
15588
- function unwrapExports (x) {
15589
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
15590
- }
15591
-
15592
- function createCommonjsModule(fn, module) {
15593
- return module = { exports: {} }, fn(module, module.exports), module.exports;
15594
- }
15595
-
15596
15710
  var compiler = createCommonjsModule(function (module, exports) {
15597
15711
  /*
15598
15712
  * Copyright 2011 Twitter, Inc.
@@ -16371,125 +16485,6 @@
16371
16485
 
16372
16486
  var m$1=e$1.bind(h);
16373
16487
 
16374
- var _extends_1 = createCommonjsModule(function (module) {
16375
- function _extends() {
16376
- module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {
16377
- for (var i = 1; i < arguments.length; i++) {
16378
- var source = arguments[i];
16379
- for (var key in source) {
16380
- if (Object.prototype.hasOwnProperty.call(source, key)) {
16381
- target[key] = source[key];
16382
- }
16383
- }
16384
- }
16385
- return target;
16386
- }, module.exports.__esModule = true, module.exports["default"] = module.exports;
16387
- return _extends.apply(this, arguments);
16388
- }
16389
- module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
16390
- });
16391
-
16392
- var _extends$1 = unwrapExports(_extends_1);
16393
-
16394
- var objectWithoutPropertiesLoose = createCommonjsModule(function (module) {
16395
- function _objectWithoutPropertiesLoose(source, excluded) {
16396
- if (source == null) return {};
16397
- var target = {};
16398
- var sourceKeys = Object.keys(source);
16399
- var key, i;
16400
- for (i = 0; i < sourceKeys.length; i++) {
16401
- key = sourceKeys[i];
16402
- if (excluded.indexOf(key) >= 0) continue;
16403
- target[key] = source[key];
16404
- }
16405
- return target;
16406
- }
16407
- module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
16408
- });
16409
-
16410
- unwrapExports(objectWithoutPropertiesLoose);
16411
-
16412
- var objectWithoutProperties = createCommonjsModule(function (module) {
16413
- function _objectWithoutProperties(source, excluded) {
16414
- if (source == null) return {};
16415
- var target = objectWithoutPropertiesLoose(source, excluded);
16416
- var key, i;
16417
- if (Object.getOwnPropertySymbols) {
16418
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
16419
- for (i = 0; i < sourceSymbolKeys.length; i++) {
16420
- key = sourceSymbolKeys[i];
16421
- if (excluded.indexOf(key) >= 0) continue;
16422
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
16423
- target[key] = source[key];
16424
- }
16425
- }
16426
- return target;
16427
- }
16428
- module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports;
16429
- });
16430
-
16431
- var _objectWithoutProperties$1 = unwrapExports(objectWithoutProperties);
16432
-
16433
- var _excluded$9 = ["parts", "highlightedTagName", "nonHighlightedTagName", "separator", "className", "classNames"];
16434
-
16435
- function createHighlightPartComponent(_ref) {
16436
- var createElement = _ref.createElement;
16437
- return function HighlightPart(_ref2) {
16438
- var classNames = _ref2.classNames,
16439
- children = _ref2.children,
16440
- highlightedTagName = _ref2.highlightedTagName,
16441
- isHighlighted = _ref2.isHighlighted,
16442
- nonHighlightedTagName = _ref2.nonHighlightedTagName;
16443
- var TagName = isHighlighted ? highlightedTagName : nonHighlightedTagName;
16444
- return createElement(TagName, {
16445
- className: isHighlighted ? classNames.highlighted : classNames.nonHighlighted
16446
- }, children);
16447
- };
16448
- }
16449
-
16450
- function createHighlightComponent(_ref3) {
16451
- var createElement = _ref3.createElement,
16452
- Fragment = _ref3.Fragment;
16453
- var HighlightPart = createHighlightPartComponent({
16454
- createElement: createElement,
16455
- Fragment: Fragment
16456
- });
16457
- return function Highlight(userProps) {
16458
- // Not destructured in function signature, to make sure it's not exposed in
16459
- // the type definition.
16460
- var parts = userProps.parts,
16461
- _userProps$highlighte = userProps.highlightedTagName,
16462
- highlightedTagName = _userProps$highlighte === void 0 ? 'mark' : _userProps$highlighte,
16463
- _userProps$nonHighlig = userProps.nonHighlightedTagName,
16464
- nonHighlightedTagName = _userProps$nonHighlig === void 0 ? 'span' : _userProps$nonHighlig,
16465
- _userProps$separator = userProps.separator,
16466
- separator = _userProps$separator === void 0 ? ', ' : _userProps$separator,
16467
- className = userProps.className,
16468
- _userProps$classNames = userProps.classNames,
16469
- classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
16470
- props = _objectWithoutProperties$1(userProps, _excluded$9);
16471
-
16472
- return createElement("span", _extends$1({}, props, {
16473
- className: cx(classNames.root, className)
16474
- }), parts.map(function (part, partIndex) {
16475
- var isLastPart = partIndex === parts.length - 1;
16476
- return createElement(Fragment, {
16477
- key: partIndex
16478
- }, part.map(function (subPart, subPartIndex) {
16479
- return createElement(HighlightPart, {
16480
- key: subPartIndex,
16481
- classNames: classNames,
16482
- highlightedTagName: highlightedTagName,
16483
- nonHighlightedTagName: nonHighlightedTagName,
16484
- isHighlighted: subPart.isHighlighted
16485
- }, subPart.value);
16486
- }), !isLastPart && createElement("span", {
16487
- className: classNames.separator
16488
- }, separator));
16489
- }));
16490
- };
16491
- }
16492
-
16493
16488
  var InternalHighlight = createHighlightComponent({
16494
16489
  createElement: h,
16495
16490
  Fragment: p
@@ -16701,6 +16696,49 @@
16701
16696
  }).trim();
16702
16697
  }
16703
16698
 
16699
+ var RawHtml = /*#__PURE__*/function (_Component) {
16700
+ _inherits(RawHtml, _Component);
16701
+ var _super = _createSuper(RawHtml);
16702
+ function RawHtml() {
16703
+ var _this;
16704
+ _classCallCheck(this, RawHtml);
16705
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
16706
+ args[_key] = arguments[_key];
16707
+ }
16708
+ _this = _super.call.apply(_super, [this].concat(args));
16709
+ _defineProperty(_assertThisInitialized(_this), "ref", y());
16710
+ _defineProperty(_assertThisInitialized(_this), "nodes", []);
16711
+ return _this;
16712
+ }
16713
+ _createClass(RawHtml, [{
16714
+ key: "componentDidMount",
16715
+ value: function componentDidMount() {
16716
+ var fragment = new DocumentFragment();
16717
+ var root = document.createElement('div');
16718
+ root.innerHTML = this.props.content;
16719
+ this.nodes = _toConsumableArray(root.children);
16720
+ this.nodes.forEach(function (node) {
16721
+ return fragment.appendChild(node);
16722
+ });
16723
+ this.ref.current.replaceWith(fragment);
16724
+ }
16725
+ }, {
16726
+ key: "componentWillUnmount",
16727
+ value: function componentWillUnmount() {
16728
+ this.nodes.forEach(function (node) {
16729
+ return node.outerHTML = '';
16730
+ });
16731
+ }
16732
+ }, {
16733
+ key: "render",
16734
+ value: function render() {
16735
+ return h("div", {
16736
+ ref: this.ref
16737
+ });
16738
+ }
16739
+ }]);
16740
+ return RawHtml;
16741
+ }(d);
16704
16742
  var defaultProps = {
16705
16743
  data: {},
16706
16744
  rootTagName: 'div',
@@ -16709,12 +16747,12 @@
16709
16747
  templatesConfig: {}
16710
16748
  };
16711
16749
  // @TODO: Template should be a generic and receive TData to pass to Templates (to avoid TTemplateData to be set as `any`)
16712
- var Template = /*#__PURE__*/function (_Component) {
16713
- _inherits(Template, _Component);
16714
- var _super = _createSuper(Template);
16750
+ var Template = /*#__PURE__*/function (_Component2) {
16751
+ _inherits(Template, _Component2);
16752
+ var _super2 = _createSuper(Template);
16715
16753
  function Template() {
16716
16754
  _classCallCheck(this, Template);
16717
- return _super.apply(this, arguments);
16755
+ return _super2.apply(this, arguments);
16718
16756
  }
16719
16757
  _createClass(Template, [{
16720
16758
  key: "shouldComponentUpdate",
@@ -16724,14 +16762,14 @@
16724
16762
  }, {
16725
16763
  key: "render",
16726
16764
  value: function render() {
16727
- var _this = this;
16765
+ var _this2 = this;
16728
16766
  {
16729
16767
  var nonFunctionTemplates = Object.keys(this.props.templates).filter(function (key) {
16730
- return typeof _this.props.templates[key] !== 'function';
16768
+ return typeof _this2.props.templates[key] !== 'function';
16731
16769
  });
16732
16770
  _warning(nonFunctionTemplates.length === 0, "Hogan.js and string-based templates are deprecated and will not be supported in InstantSearch.js 5.x.\n\nYou can replace them with function-form templates and use either the provided `html` function or JSX templates.\n\nString-based templates: ".concat(nonFunctionTemplates.join(', '), ".\n\nSee: https://www.algolia.com/doc/guides/building-search-ui/upgrade-guides/js/#upgrade-templates")) ;
16733
16771
  }
16734
- var RootTagName = this.props.rootTagName;
16772
+ var RootTagName = this.props.rootTagName === 'fragment' ? p : this.props.rootTagName;
16735
16773
  var useCustomCompileOptions = this.props.useCustomCompileOptions[this.props.templateKey];
16736
16774
  var compileOptions = useCustomCompileOptions ? this.props.templatesConfig.compileOptions : {};
16737
16775
  var content = renderTemplate({
@@ -16751,6 +16789,14 @@
16751
16789
  if (_typeof(content) === 'object') {
16752
16790
  return h(RootTagName, this.props.rootProps, content);
16753
16791
  }
16792
+
16793
+ // This is to handle Hogan templates with Fragment as rootTagName
16794
+ if (RootTagName === p) {
16795
+ return h(RawHtml, {
16796
+ content: content,
16797
+ key: content
16798
+ });
16799
+ }
16754
16800
  return h(RootTagName, _extends({}, this.props.rootProps, {
16755
16801
  dangerouslySetInnerHTML: {
16756
16802
  __html: content