instantsearch.js 4.56.0 → 4.56.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.
@@ -52,6 +52,10 @@ function Hits(_ref) {
52
52
  onClick: function onClick(event) {
53
53
  handleInsightsClick(event);
54
54
  sendEvent('click:internal', hit, 'Hit Clicked');
55
+ },
56
+ onAuxClick: function onAuxClick(event) {
57
+ handleInsightsClick(event);
58
+ sendEvent('click:internal', hit, 'Hit Clicked');
55
59
  }
56
60
  },
57
61
  key: hit.objectID,
@@ -65,6 +65,10 @@ var InfiniteHits = function InfiniteHits(_ref) {
65
65
  onClick: function onClick(event) {
66
66
  handleInsightsClick(event);
67
67
  sendEvent('click:internal', hit, 'Hit Clicked');
68
+ },
69
+ onAuxClick: function onAuxClick(event) {
70
+ handleInsightsClick(event);
71
+ sendEvent('click:internal', hit, 'Hit Clicked');
68
72
  }
69
73
  },
70
74
  key: hit.objectID,
@@ -25,6 +25,8 @@ var TAG_REPLACEMENT = {
25
25
  highlightPreTag: '<mark>',
26
26
  highlightPostTag: '</mark>'
27
27
  };
28
+
29
+ // @MAJOR: in the future, this should only escape, not replace
28
30
  exports.TAG_REPLACEMENT = TAG_REPLACEMENT;
29
31
  function replaceTagsAndEscape(value) {
30
32
  return (0, _escapeHtml.escape)(value).replace(new RegExp(TAG_PLACEHOLDER.highlightPreTag, 'g'), TAG_REPLACEMENT.highlightPreTag).replace(new RegExp(TAG_PLACEHOLDER.highlightPostTag, 'g'), TAG_REPLACEMENT.highlightPostTag);
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getHighlightedParts = getHighlightedParts;
7
7
  var _escapeHighlight = require("./escape-highlight");
8
8
  function getHighlightedParts(highlightedValue) {
9
+ // @MAJOR: this should use TAG_PLACEHOLDER
9
10
  var highlightPostTag = _escapeHighlight.TAG_REPLACEMENT.highlightPostTag,
10
11
  highlightPreTag = _escapeHighlight.TAG_REPLACEMENT.highlightPreTag;
11
12
  var splitByPreTag = highlightedValue.split(highlightPreTag);
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = '4.56.0';
7
+ var _default = '4.56.1';
8
8
  exports.default = _default;
@@ -1,4 +1,4 @@
1
- /*! InstantSearch.js 4.56.0 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch.js */
1
+ /*! InstantSearch.js 4.56.1 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch.js */
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) :
@@ -641,6 +641,8 @@
641
641
  highlightPreTag: '<mark>',
642
642
  highlightPostTag: '</mark>'
643
643
  };
644
+
645
+ // @MAJOR: in the future, this should only escape, not replace
644
646
  function replaceTagsAndEscape(value) {
645
647
  return escape$1(value).replace(new RegExp(TAG_PLACEHOLDER.highlightPreTag, 'g'), TAG_REPLACEMENT.highlightPreTag).replace(new RegExp(TAG_PLACEHOLDER.highlightPostTag, 'g'), TAG_REPLACEMENT.highlightPostTag);
646
648
  }
@@ -1202,6 +1204,7 @@
1202
1204
  }
1203
1205
 
1204
1206
  function getHighlightedParts(highlightedValue) {
1207
+ // @MAJOR: this should use TAG_PLACEHOLDER
1205
1208
  var highlightPostTag = TAG_REPLACEMENT.highlightPostTag,
1206
1209
  highlightPreTag = TAG_REPLACEMENT.highlightPreTag;
1207
1210
  var splitByPreTag = highlightedValue.split(highlightPreTag);
@@ -14029,7 +14032,7 @@
14029
14032
  };
14030
14033
  }
14031
14034
 
14032
- var version$1 = '4.56.0';
14035
+ var version$1 = '4.56.1';
14033
14036
 
14034
14037
  var withUsage$r = createDocumentationMessageGenerator({
14035
14038
  name: 'instantsearch'
@@ -17770,6 +17773,10 @@
17770
17773
  onClick: function onClick(event) {
17771
17774
  handleInsightsClick(event);
17772
17775
  sendEvent('click:internal', hit, 'Hit Clicked');
17776
+ },
17777
+ onAuxClick: function onAuxClick(event) {
17778
+ handleInsightsClick(event);
17779
+ sendEvent('click:internal', hit, 'Hit Clicked');
17773
17780
  }
17774
17781
  },
17775
17782
  key: hit.objectID,
@@ -18002,6 +18009,10 @@
18002
18009
  onClick: function onClick(event) {
18003
18010
  handleInsightsClick(event);
18004
18011
  sendEvent('click:internal', hit, 'Hit Clicked');
18012
+ },
18013
+ onAuxClick: function onAuxClick(event) {
18014
+ handleInsightsClick(event);
18015
+ sendEvent('click:internal', hit, 'Hit Clicked');
18005
18016
  }
18006
18017
  },
18007
18018
  key: hit.objectID,