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.
- package/cjs/components/Hits/Hits.js +4 -0
- package/cjs/components/InfiniteHits/InfiniteHits.js +4 -0
- package/cjs/lib/utils/escape-highlight.js +2 -0
- package/cjs/lib/utils/getHighlightedParts.js +1 -0
- package/cjs/lib/version.js +1 -1
- package/dist/instantsearch.development.js +13 -2
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/components/Hits/Hits.js +4 -0
- package/es/components/InfiniteHits/InfiniteHits.js +4 -0
- package/es/lib/utils/escape-highlight.js +2 -0
- package/es/lib/utils/getHighlightedParts.js +1 -0
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/package.json +5 -5
|
@@ -45,6 +45,10 @@ export default function Hits(_ref) {
|
|
|
45
45
|
onClick: function onClick(event) {
|
|
46
46
|
handleInsightsClick(event);
|
|
47
47
|
sendEvent('click:internal', hit, 'Hit Clicked');
|
|
48
|
+
},
|
|
49
|
+
onAuxClick: function onAuxClick(event) {
|
|
50
|
+
handleInsightsClick(event);
|
|
51
|
+
sendEvent('click:internal', hit, 'Hit Clicked');
|
|
48
52
|
}
|
|
49
53
|
},
|
|
50
54
|
key: hit.objectID,
|
|
@@ -58,6 +58,10 @@ var InfiniteHits = function InfiniteHits(_ref) {
|
|
|
58
58
|
onClick: function onClick(event) {
|
|
59
59
|
handleInsightsClick(event);
|
|
60
60
|
sendEvent('click:internal', hit, 'Hit Clicked');
|
|
61
|
+
},
|
|
62
|
+
onAuxClick: function onAuxClick(event) {
|
|
63
|
+
handleInsightsClick(event);
|
|
64
|
+
sendEvent('click:internal', hit, 'Hit Clicked');
|
|
61
65
|
}
|
|
62
66
|
},
|
|
63
67
|
key: hit.objectID,
|
|
@@ -16,6 +16,8 @@ export var TAG_REPLACEMENT = {
|
|
|
16
16
|
highlightPreTag: '<mark>',
|
|
17
17
|
highlightPostTag: '</mark>'
|
|
18
18
|
};
|
|
19
|
+
|
|
20
|
+
// @MAJOR: in the future, this should only escape, not replace
|
|
19
21
|
function replaceTagsAndEscape(value) {
|
|
20
22
|
return escape(value).replace(new RegExp(TAG_PLACEHOLDER.highlightPreTag, 'g'), TAG_REPLACEMENT.highlightPreTag).replace(new RegExp(TAG_PLACEHOLDER.highlightPostTag, 'g'), TAG_REPLACEMENT.highlightPostTag);
|
|
21
23
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TAG_REPLACEMENT } from "./escape-highlight.js";
|
|
2
2
|
export function getHighlightedParts(highlightedValue) {
|
|
3
|
+
// @MAJOR: this should use TAG_PLACEHOLDER
|
|
3
4
|
var highlightPostTag = TAG_REPLACEMENT.highlightPostTag,
|
|
4
5
|
highlightPreTag = TAG_REPLACEMENT.highlightPreTag;
|
|
5
6
|
var splitByPreTag = highlightedValue.split(highlightPreTag);
|
package/es/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.56.
|
|
1
|
+
declare const _default: "4.56.1";
|
|
2
2
|
export default _default;
|
package/es/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '4.56.
|
|
1
|
+
export default '4.56.1';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "instantsearch.js",
|
|
3
|
-
"version": "4.56.
|
|
3
|
+
"version": "4.56.1",
|
|
4
4
|
"description": "InstantSearch.js is a JavaScript library for building performant and instant search experiences with Algolia.",
|
|
5
5
|
"homepage": "https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/",
|
|
6
6
|
"types": "es/index.d.ts",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"version": "./scripts/version/update-version.js"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@instantsearch/mocks": "1.
|
|
59
|
-
"@instantsearch/tests": "1.
|
|
60
|
-
"@instantsearch/testutils": "1.
|
|
58
|
+
"@instantsearch/mocks": "1.14.0",
|
|
59
|
+
"@instantsearch/tests": "1.14.0",
|
|
60
|
+
"@instantsearch/testutils": "1.3.0",
|
|
61
61
|
"@storybook/html": "5.3.9",
|
|
62
62
|
"@types/scriptjs": "0.0.2",
|
|
63
63
|
"algoliasearch": "4.14.3",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"scriptjs": "2.5.9",
|
|
66
66
|
"webpack": "4.41.5"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "f224d502edb8cf119213cb9cd6e557dc03180521"
|
|
69
69
|
}
|