instantsearch.js 4.77.3 → 4.78.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.
- package/cjs/connectors/autocomplete/connectAutocomplete.js +4 -7
- package/cjs/connectors/frequently-bought-together/connectFrequentlyBoughtTogether.js +1 -3
- package/cjs/connectors/geo-search/connectGeoSearch.js +1 -3
- package/cjs/connectors/hits/connectHits.js +2 -6
- package/cjs/connectors/infinite-hits/connectInfiniteHits.js +2 -6
- package/cjs/connectors/looking-similar/connectLookingSimilar.js +1 -3
- package/cjs/connectors/rating-menu/connectRatingMenu.js +2 -1
- package/cjs/connectors/related-products/connectRelatedProducts.js +1 -3
- package/cjs/connectors/toggle-refinement/connectToggleRefinement.js +2 -1
- package/cjs/connectors/trending-items/connectTrendingItems.js +1 -3
- package/cjs/lib/utils/createSendEventForFacet.js +2 -1
- package/cjs/lib/utils/createSendEventForHits.js +11 -8
- package/cjs/lib/version.js +1 -1
- package/dist/instantsearch.development.js +33 -48
- 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/connectors/autocomplete/connectAutocomplete.js +4 -7
- package/es/connectors/frequently-bought-together/connectFrequentlyBoughtTogether.js +1 -3
- package/es/connectors/geo-search/connectGeoSearch.js +1 -3
- package/es/connectors/hits/connectHits.js +2 -6
- package/es/connectors/infinite-hits/connectInfiniteHits.js +2 -6
- package/es/connectors/looking-similar/connectLookingSimilar.js +1 -3
- package/es/connectors/rating-menu/connectRatingMenu.js +2 -1
- package/es/connectors/related-products/connectRelatedProducts.js +1 -3
- package/es/connectors/toggle-refinement/connectToggleRefinement.js +2 -1
- package/es/connectors/trending-items/connectTrendingItems.js +1 -3
- package/es/lib/utils/createSendEventForFacet.js +2 -1
- package/es/lib/utils/createSendEventForHits.d.ts +7 -6
- package/es/lib/utils/createSendEventForHits.js +11 -8
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/package.json +6 -6
|
@@ -64,7 +64,7 @@ var connectAutocomplete = function connectAutocomplete(renderFn) {
|
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
var indices = scopedResults.map(function (scopedResult) {
|
|
67
|
-
var _scopedResult$
|
|
67
|
+
var _scopedResult$results, _scopedResult$results2;
|
|
68
68
|
// We need to escape the hits because highlighting
|
|
69
69
|
// exposes HTML tags to the end-user.
|
|
70
70
|
if (scopedResult.results) {
|
|
@@ -72,16 +72,13 @@ var connectAutocomplete = function connectAutocomplete(renderFn) {
|
|
|
72
72
|
}
|
|
73
73
|
var sendEvent = (0, _utils.createSendEventForHits)({
|
|
74
74
|
instantSearchInstance: instantSearchInstance,
|
|
75
|
-
|
|
76
|
-
var _scopedResult$results;
|
|
77
|
-
return ((_scopedResult$results = scopedResult.results) === null || _scopedResult$results === void 0 ? void 0 : _scopedResult$results.index) || '';
|
|
78
|
-
},
|
|
75
|
+
helper: scopedResult.helper,
|
|
79
76
|
widgetType: _this.$$type
|
|
80
77
|
});
|
|
81
78
|
return {
|
|
82
79
|
indexId: scopedResult.indexId,
|
|
83
|
-
indexName: ((_scopedResult$
|
|
84
|
-
hits: ((_scopedResult$
|
|
80
|
+
indexName: ((_scopedResult$results = scopedResult.results) === null || _scopedResult$results === void 0 ? void 0 : _scopedResult$results.index) || '',
|
|
81
|
+
hits: ((_scopedResult$results2 = scopedResult.results) === null || _scopedResult$results2 === void 0 ? void 0 : _scopedResult$results2.hits) || [],
|
|
85
82
|
results: scopedResult.results || {},
|
|
86
83
|
sendEvent: sendEvent
|
|
87
84
|
};
|
|
@@ -58,9 +58,7 @@ var connectFrequentlyBoughtTogether = exports.default = function connectFrequent
|
|
|
58
58
|
if (!sendEvent) {
|
|
59
59
|
sendEvent = (0, _utils.createSendEventForHits)({
|
|
60
60
|
instantSearchInstance: instantSearchInstance,
|
|
61
|
-
|
|
62
|
-
return helper.getIndex();
|
|
63
|
-
},
|
|
61
|
+
helper: helper,
|
|
64
62
|
widgetType: this.$$type
|
|
65
63
|
});
|
|
66
64
|
}
|
|
@@ -155,9 +155,7 @@ var connectGeoSearch = exports.default = function connectGeoSearch(renderFn) {
|
|
|
155
155
|
if (!sendEvent) {
|
|
156
156
|
sendEvent = (0, _utils.createSendEventForHits)({
|
|
157
157
|
instantSearchInstance: instantSearchInstance,
|
|
158
|
-
|
|
159
|
-
return helper.getIndex();
|
|
160
|
-
},
|
|
158
|
+
helper: helper,
|
|
161
159
|
widgetType: $$type
|
|
162
160
|
});
|
|
163
161
|
}
|
|
@@ -57,17 +57,13 @@ var connectHits = exports.default = function connectHits(renderFn) {
|
|
|
57
57
|
if (!sendEvent) {
|
|
58
58
|
sendEvent = (0, _utils.createSendEventForHits)({
|
|
59
59
|
instantSearchInstance: instantSearchInstance,
|
|
60
|
-
|
|
61
|
-
return helper.getIndex();
|
|
62
|
-
},
|
|
60
|
+
helper: helper,
|
|
63
61
|
widgetType: this.$$type
|
|
64
62
|
});
|
|
65
63
|
}
|
|
66
64
|
if (!bindEvent) {
|
|
67
65
|
bindEvent = (0, _utils.createBindEventForHits)({
|
|
68
|
-
|
|
69
|
-
return helper.getIndex();
|
|
70
|
-
},
|
|
66
|
+
helper: helper,
|
|
71
67
|
widgetType: this.$$type,
|
|
72
68
|
instantSearchInstance: instantSearchInstance
|
|
73
69
|
});
|
|
@@ -162,15 +162,11 @@ var connectInfiniteHits = exports.default = function connectInfiniteHits(renderF
|
|
|
162
162
|
showMore = getShowMore(helper);
|
|
163
163
|
sendEvent = (0, _utils.createSendEventForHits)({
|
|
164
164
|
instantSearchInstance: instantSearchInstance,
|
|
165
|
-
|
|
166
|
-
return helper.getIndex();
|
|
167
|
-
},
|
|
165
|
+
helper: helper,
|
|
168
166
|
widgetType: this.$$type
|
|
169
167
|
});
|
|
170
168
|
bindEvent = (0, _utils.createBindEventForHits)({
|
|
171
|
-
|
|
172
|
-
return helper.getIndex();
|
|
173
|
-
},
|
|
169
|
+
helper: helper,
|
|
174
170
|
widgetType: this.$$type,
|
|
175
171
|
instantSearchInstance: instantSearchInstance
|
|
176
172
|
});
|
|
@@ -59,9 +59,7 @@ var connectLookingSimilar = exports.default = function connectLookingSimilar(ren
|
|
|
59
59
|
if (!sendEvent) {
|
|
60
60
|
sendEvent = (0, _utils.createSendEventForHits)({
|
|
61
61
|
instantSearchInstance: instantSearchInstance,
|
|
62
|
-
|
|
63
|
-
return helper.getIndex();
|
|
64
|
-
},
|
|
62
|
+
helper: helper,
|
|
65
63
|
widgetType: this.$$type
|
|
66
64
|
});
|
|
67
65
|
}
|
|
@@ -53,6 +53,7 @@ var createSendEvent = function createSendEvent(_ref) {
|
|
|
53
53
|
}
|
|
54
54
|
var isRefined = getRefinedStar() === Number(facetValue);
|
|
55
55
|
if (!isRefined) {
|
|
56
|
+
var _helper$lastResults;
|
|
56
57
|
instantSearchInstance.sendEventToInsights({
|
|
57
58
|
insightsMethod: 'clickedFilters',
|
|
58
59
|
widgetType: $$type,
|
|
@@ -60,7 +61,7 @@ var createSendEvent = function createSendEvent(_ref) {
|
|
|
60
61
|
eventModifier: eventModifier,
|
|
61
62
|
payload: {
|
|
62
63
|
eventName: eventName,
|
|
63
|
-
index: helper.
|
|
64
|
+
index: ((_helper$lastResults = helper.lastResults) === null || _helper$lastResults === void 0 ? void 0 : _helper$lastResults.index) || helper.state.index,
|
|
64
65
|
filters: ["".concat(attribute, ">=").concat(facetValue)]
|
|
65
66
|
},
|
|
66
67
|
attribute: attribute
|
|
@@ -59,9 +59,7 @@ var connectRelatedProducts = exports.default = function connectRelatedProducts(r
|
|
|
59
59
|
if (!sendEvent) {
|
|
60
60
|
sendEvent = (0, _utils.createSendEventForHits)({
|
|
61
61
|
instantSearchInstance: instantSearchInstance,
|
|
62
|
-
|
|
63
|
-
return helper.getIndex();
|
|
64
|
-
},
|
|
62
|
+
helper: helper,
|
|
65
63
|
widgetType: this.$$type
|
|
66
64
|
});
|
|
67
65
|
}
|
|
@@ -49,6 +49,7 @@ var createSendEvent = function createSendEvent(_ref) {
|
|
|
49
49
|
// only send an event when the refinement gets applied,
|
|
50
50
|
// not when it gets removed
|
|
51
51
|
if (!isRefined) {
|
|
52
|
+
var _helper$lastResults;
|
|
52
53
|
instantSearchInstance.sendEventToInsights({
|
|
53
54
|
insightsMethod: 'clickedFilters',
|
|
54
55
|
widgetType: $$type,
|
|
@@ -56,7 +57,7 @@ var createSendEvent = function createSendEvent(_ref) {
|
|
|
56
57
|
eventModifier: eventModifier,
|
|
57
58
|
payload: {
|
|
58
59
|
eventName: eventName,
|
|
59
|
-
index: helper.
|
|
60
|
+
index: ((_helper$lastResults = helper.lastResults) === null || _helper$lastResults === void 0 ? void 0 : _helper$lastResults.index) || helper.state.index,
|
|
60
61
|
filters: on.map(function (value) {
|
|
61
62
|
return "".concat(attribute, ":").concat(value);
|
|
62
63
|
})
|
|
@@ -60,9 +60,7 @@ var connectTrendingItems = exports.default = function connectTrendingItems(rende
|
|
|
60
60
|
if (!sendEvent) {
|
|
61
61
|
sendEvent = (0, _utils.createSendEventForHits)({
|
|
62
62
|
instantSearchInstance: instantSearchInstance,
|
|
63
|
-
|
|
64
|
-
return helper.getIndex();
|
|
65
|
-
},
|
|
63
|
+
helper: helper,
|
|
66
64
|
widgetType: this.$$type
|
|
67
65
|
});
|
|
68
66
|
}
|
|
@@ -40,6 +40,7 @@ function createSendEventForFacet(_ref) {
|
|
|
40
40
|
instantSearchInstance.sendEventToInsights(args[0]);
|
|
41
41
|
} else if (eventType === 'click' && args.length >= 2 && args.length <= 4) {
|
|
42
42
|
if (!(0, _isFacetRefined.isFacetRefined)(helper, attribute, facetValue)) {
|
|
43
|
+
var _helper$lastResults;
|
|
43
44
|
// send event only when the facet is being checked "ON"
|
|
44
45
|
instantSearchInstance.sendEventToInsights({
|
|
45
46
|
insightsMethod: 'clickedFilters',
|
|
@@ -48,7 +49,7 @@ function createSendEventForFacet(_ref) {
|
|
|
48
49
|
eventModifier: eventModifier,
|
|
49
50
|
payload: _objectSpread({
|
|
50
51
|
eventName: eventName,
|
|
51
|
-
index: helper.
|
|
52
|
+
index: ((_helper$lastResults = helper.lastResults) === null || _helper$lastResults === void 0 ? void 0 : _helper$lastResults.index) || helper.state.index,
|
|
52
53
|
filters: ["".concat(attribute, ":").concat(facetValue)]
|
|
53
54
|
}, additionalData),
|
|
54
55
|
attribute: attribute
|
|
@@ -28,7 +28,7 @@ function chunk(arr) {
|
|
|
28
28
|
return chunks;
|
|
29
29
|
}
|
|
30
30
|
function _buildEventPayloadsForHits(_ref) {
|
|
31
|
-
var
|
|
31
|
+
var helper = _ref.helper,
|
|
32
32
|
widgetType = _ref.widgetType,
|
|
33
33
|
methodName = _ref.methodName,
|
|
34
34
|
args = _ref.args,
|
|
@@ -79,13 +79,14 @@ function _buildEventPayloadsForHits(_ref) {
|
|
|
79
79
|
return [];
|
|
80
80
|
}
|
|
81
81
|
return hitsChunks.map(function (batch, i) {
|
|
82
|
+
var _helper$lastResults;
|
|
82
83
|
return {
|
|
83
84
|
insightsMethod: 'viewedObjectIDs',
|
|
84
85
|
widgetType: widgetType,
|
|
85
86
|
eventType: eventType,
|
|
86
87
|
payload: _objectSpread({
|
|
87
88
|
eventName: eventName || 'Hits Viewed',
|
|
88
|
-
index:
|
|
89
|
+
index: ((_helper$lastResults = helper.lastResults) === null || _helper$lastResults === void 0 ? void 0 : _helper$lastResults.index) || helper.state.index,
|
|
89
90
|
objectIDs: objectIDsByChunk[i]
|
|
90
91
|
}, additionalData),
|
|
91
92
|
hits: batch,
|
|
@@ -94,13 +95,14 @@ function _buildEventPayloadsForHits(_ref) {
|
|
|
94
95
|
});
|
|
95
96
|
} else if (eventType === 'click') {
|
|
96
97
|
return hitsChunks.map(function (batch, i) {
|
|
98
|
+
var _helper$lastResults2;
|
|
97
99
|
return {
|
|
98
100
|
insightsMethod: 'clickedObjectIDsAfterSearch',
|
|
99
101
|
widgetType: widgetType,
|
|
100
102
|
eventType: eventType,
|
|
101
103
|
payload: _objectSpread({
|
|
102
104
|
eventName: eventName || 'Hit Clicked',
|
|
103
|
-
index:
|
|
105
|
+
index: ((_helper$lastResults2 = helper.lastResults) === null || _helper$lastResults2 === void 0 ? void 0 : _helper$lastResults2.index) || helper.state.index,
|
|
104
106
|
queryID: queryID,
|
|
105
107
|
objectIDs: objectIDsByChunk[i],
|
|
106
108
|
positions: positionsByChunk[i]
|
|
@@ -111,13 +113,14 @@ function _buildEventPayloadsForHits(_ref) {
|
|
|
111
113
|
});
|
|
112
114
|
} else if (eventType === 'conversion') {
|
|
113
115
|
return hitsChunks.map(function (batch, i) {
|
|
116
|
+
var _helper$lastResults3;
|
|
114
117
|
return {
|
|
115
118
|
insightsMethod: 'convertedObjectIDsAfterSearch',
|
|
116
119
|
widgetType: widgetType,
|
|
117
120
|
eventType: eventType,
|
|
118
121
|
payload: _objectSpread({
|
|
119
122
|
eventName: eventName || 'Hit Converted',
|
|
120
|
-
index:
|
|
123
|
+
index: ((_helper$lastResults3 = helper.lastResults) === null || _helper$lastResults3 === void 0 ? void 0 : _helper$lastResults3.index) || helper.state.index,
|
|
121
124
|
queryID: queryID,
|
|
122
125
|
objectIDs: objectIDsByChunk[i]
|
|
123
126
|
}, additionalData),
|
|
@@ -133,7 +136,7 @@ function _buildEventPayloadsForHits(_ref) {
|
|
|
133
136
|
}
|
|
134
137
|
function createSendEventForHits(_ref2) {
|
|
135
138
|
var instantSearchInstance = _ref2.instantSearchInstance,
|
|
136
|
-
|
|
139
|
+
helper = _ref2.helper,
|
|
137
140
|
widgetType = _ref2.widgetType;
|
|
138
141
|
var sentEvents = {};
|
|
139
142
|
var timer = undefined;
|
|
@@ -143,7 +146,7 @@ function createSendEventForHits(_ref2) {
|
|
|
143
146
|
}
|
|
144
147
|
var payloads = _buildEventPayloadsForHits({
|
|
145
148
|
widgetType: widgetType,
|
|
146
|
-
|
|
149
|
+
helper: helper,
|
|
147
150
|
methodName: 'sendEvent',
|
|
148
151
|
args: args,
|
|
149
152
|
instantSearchInstance: instantSearchInstance
|
|
@@ -163,7 +166,7 @@ function createSendEventForHits(_ref2) {
|
|
|
163
166
|
return sendEventForHits;
|
|
164
167
|
}
|
|
165
168
|
function createBindEventForHits(_ref3) {
|
|
166
|
-
var
|
|
169
|
+
var helper = _ref3.helper,
|
|
167
170
|
widgetType = _ref3.widgetType,
|
|
168
171
|
instantSearchInstance = _ref3.instantSearchInstance;
|
|
169
172
|
var bindEventForHits = function bindEventForHits() {
|
|
@@ -172,7 +175,7 @@ function createBindEventForHits(_ref3) {
|
|
|
172
175
|
}
|
|
173
176
|
var payloads = _buildEventPayloadsForHits({
|
|
174
177
|
widgetType: widgetType,
|
|
175
|
-
|
|
178
|
+
helper: helper,
|
|
176
179
|
methodName: 'bindEvent',
|
|
177
180
|
args: args,
|
|
178
181
|
instantSearchInstance: instantSearchInstance
|
package/cjs/lib/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! InstantSearch.js 4.
|
|
1
|
+
/*! InstantSearch.js 4.78.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) :
|
|
@@ -772,6 +772,7 @@
|
|
|
772
772
|
instantSearchInstance.sendEventToInsights(args[0]);
|
|
773
773
|
} else if (eventType === 'click' && args.length >= 2 && args.length <= 4) {
|
|
774
774
|
if (!isFacetRefined(helper, attribute, facetValue)) {
|
|
775
|
+
var _helper$lastResults;
|
|
775
776
|
// send event only when the facet is being checked "ON"
|
|
776
777
|
instantSearchInstance.sendEventToInsights({
|
|
777
778
|
insightsMethod: 'clickedFilters',
|
|
@@ -780,7 +781,7 @@
|
|
|
780
781
|
eventModifier: eventModifier,
|
|
781
782
|
payload: _objectSpread2({
|
|
782
783
|
eventName: eventName,
|
|
783
|
-
index: helper.
|
|
784
|
+
index: ((_helper$lastResults = helper.lastResults) === null || _helper$lastResults === void 0 ? void 0 : _helper$lastResults.index) || helper.state.index,
|
|
784
785
|
filters: ["".concat(attribute, ":").concat(facetValue)]
|
|
785
786
|
}, additionalData),
|
|
786
787
|
attribute: attribute
|
|
@@ -809,7 +810,7 @@
|
|
|
809
810
|
return chunks;
|
|
810
811
|
}
|
|
811
812
|
function _buildEventPayloadsForHits(_ref) {
|
|
812
|
-
var
|
|
813
|
+
var helper = _ref.helper,
|
|
813
814
|
widgetType = _ref.widgetType,
|
|
814
815
|
methodName = _ref.methodName,
|
|
815
816
|
args = _ref.args,
|
|
@@ -856,13 +857,14 @@
|
|
|
856
857
|
return [];
|
|
857
858
|
}
|
|
858
859
|
return hitsChunks.map(function (batch, i) {
|
|
860
|
+
var _helper$lastResults;
|
|
859
861
|
return {
|
|
860
862
|
insightsMethod: 'viewedObjectIDs',
|
|
861
863
|
widgetType: widgetType,
|
|
862
864
|
eventType: eventType,
|
|
863
865
|
payload: _objectSpread2({
|
|
864
866
|
eventName: eventName || 'Hits Viewed',
|
|
865
|
-
index:
|
|
867
|
+
index: ((_helper$lastResults = helper.lastResults) === null || _helper$lastResults === void 0 ? void 0 : _helper$lastResults.index) || helper.state.index,
|
|
866
868
|
objectIDs: objectIDsByChunk[i]
|
|
867
869
|
}, additionalData),
|
|
868
870
|
hits: batch,
|
|
@@ -871,13 +873,14 @@
|
|
|
871
873
|
});
|
|
872
874
|
} else if (eventType === 'click') {
|
|
873
875
|
return hitsChunks.map(function (batch, i) {
|
|
876
|
+
var _helper$lastResults2;
|
|
874
877
|
return {
|
|
875
878
|
insightsMethod: 'clickedObjectIDsAfterSearch',
|
|
876
879
|
widgetType: widgetType,
|
|
877
880
|
eventType: eventType,
|
|
878
881
|
payload: _objectSpread2({
|
|
879
882
|
eventName: eventName || 'Hit Clicked',
|
|
880
|
-
index:
|
|
883
|
+
index: ((_helper$lastResults2 = helper.lastResults) === null || _helper$lastResults2 === void 0 ? void 0 : _helper$lastResults2.index) || helper.state.index,
|
|
881
884
|
queryID: queryID,
|
|
882
885
|
objectIDs: objectIDsByChunk[i],
|
|
883
886
|
positions: positionsByChunk[i]
|
|
@@ -888,13 +891,14 @@
|
|
|
888
891
|
});
|
|
889
892
|
} else if (eventType === 'conversion') {
|
|
890
893
|
return hitsChunks.map(function (batch, i) {
|
|
894
|
+
var _helper$lastResults3;
|
|
891
895
|
return {
|
|
892
896
|
insightsMethod: 'convertedObjectIDsAfterSearch',
|
|
893
897
|
widgetType: widgetType,
|
|
894
898
|
eventType: eventType,
|
|
895
899
|
payload: _objectSpread2({
|
|
896
900
|
eventName: eventName || 'Hit Converted',
|
|
897
|
-
index:
|
|
901
|
+
index: ((_helper$lastResults3 = helper.lastResults) === null || _helper$lastResults3 === void 0 ? void 0 : _helper$lastResults3.index) || helper.state.index,
|
|
898
902
|
queryID: queryID,
|
|
899
903
|
objectIDs: objectIDsByChunk[i]
|
|
900
904
|
}, additionalData),
|
|
@@ -908,7 +912,7 @@
|
|
|
908
912
|
}
|
|
909
913
|
function createSendEventForHits(_ref2) {
|
|
910
914
|
var instantSearchInstance = _ref2.instantSearchInstance,
|
|
911
|
-
|
|
915
|
+
helper = _ref2.helper,
|
|
912
916
|
widgetType = _ref2.widgetType;
|
|
913
917
|
var sentEvents = {};
|
|
914
918
|
var timer = undefined;
|
|
@@ -918,7 +922,7 @@
|
|
|
918
922
|
}
|
|
919
923
|
var payloads = _buildEventPayloadsForHits({
|
|
920
924
|
widgetType: widgetType,
|
|
921
|
-
|
|
925
|
+
helper: helper,
|
|
922
926
|
methodName: 'sendEvent',
|
|
923
927
|
args: args,
|
|
924
928
|
instantSearchInstance: instantSearchInstance
|
|
@@ -938,7 +942,7 @@
|
|
|
938
942
|
return sendEventForHits;
|
|
939
943
|
}
|
|
940
944
|
function createBindEventForHits(_ref3) {
|
|
941
|
-
var
|
|
945
|
+
var helper = _ref3.helper,
|
|
942
946
|
widgetType = _ref3.widgetType,
|
|
943
947
|
instantSearchInstance = _ref3.instantSearchInstance;
|
|
944
948
|
var bindEventForHits = function bindEventForHits() {
|
|
@@ -947,7 +951,7 @@
|
|
|
947
951
|
}
|
|
948
952
|
var payloads = _buildEventPayloadsForHits({
|
|
949
953
|
widgetType: widgetType,
|
|
950
|
-
|
|
954
|
+
helper: helper,
|
|
951
955
|
methodName: 'bindEvent',
|
|
952
956
|
args: args,
|
|
953
957
|
instantSearchInstance: instantSearchInstance
|
|
@@ -6583,7 +6587,7 @@
|
|
|
6583
6587
|
|
|
6584
6588
|
var sortAndMergeRecommendations_1 = sortAndMergeRecommendations;
|
|
6585
6589
|
|
|
6586
|
-
var version = '3.24.
|
|
6590
|
+
var version = '3.24.2';
|
|
6587
6591
|
|
|
6588
6592
|
var escapeFacetValue$4 = escapeFacetValue_1.escapeFacetValue;
|
|
6589
6593
|
|
|
@@ -9716,17 +9720,13 @@
|
|
|
9716
9720
|
if (!sendEvent) {
|
|
9717
9721
|
sendEvent = createSendEventForHits({
|
|
9718
9722
|
instantSearchInstance: instantSearchInstance,
|
|
9719
|
-
|
|
9720
|
-
return helper.getIndex();
|
|
9721
|
-
},
|
|
9723
|
+
helper: helper,
|
|
9722
9724
|
widgetType: this.$$type
|
|
9723
9725
|
});
|
|
9724
9726
|
}
|
|
9725
9727
|
if (!bindEvent) {
|
|
9726
9728
|
bindEvent = createBindEventForHits({
|
|
9727
|
-
|
|
9728
|
-
return helper.getIndex();
|
|
9729
|
-
},
|
|
9729
|
+
helper: helper,
|
|
9730
9730
|
widgetType: this.$$type,
|
|
9731
9731
|
instantSearchInstance: instantSearchInstance
|
|
9732
9732
|
});
|
|
@@ -10273,15 +10273,11 @@
|
|
|
10273
10273
|
showMore = getShowMore(helper);
|
|
10274
10274
|
sendEvent = createSendEventForHits({
|
|
10275
10275
|
instantSearchInstance: instantSearchInstance,
|
|
10276
|
-
|
|
10277
|
-
return helper.getIndex();
|
|
10278
|
-
},
|
|
10276
|
+
helper: helper,
|
|
10279
10277
|
widgetType: this.$$type
|
|
10280
10278
|
});
|
|
10281
10279
|
bindEvent = createBindEventForHits({
|
|
10282
|
-
|
|
10283
|
-
return helper.getIndex();
|
|
10284
|
-
},
|
|
10280
|
+
helper: helper,
|
|
10285
10281
|
widgetType: this.$$type,
|
|
10286
10282
|
instantSearchInstance: instantSearchInstance
|
|
10287
10283
|
});
|
|
@@ -11627,9 +11623,7 @@
|
|
|
11627
11623
|
if (!sendEvent) {
|
|
11628
11624
|
sendEvent = createSendEventForHits({
|
|
11629
11625
|
instantSearchInstance: instantSearchInstance,
|
|
11630
|
-
|
|
11631
|
-
return helper.getIndex();
|
|
11632
|
-
},
|
|
11626
|
+
helper: helper,
|
|
11633
11627
|
widgetType: this.$$type
|
|
11634
11628
|
});
|
|
11635
11629
|
}
|
|
@@ -11900,6 +11894,7 @@
|
|
|
11900
11894
|
}
|
|
11901
11895
|
var isRefined = getRefinedStar() === Number(facetValue);
|
|
11902
11896
|
if (!isRefined) {
|
|
11897
|
+
var _helper$lastResults;
|
|
11903
11898
|
instantSearchInstance.sendEventToInsights({
|
|
11904
11899
|
insightsMethod: 'clickedFilters',
|
|
11905
11900
|
widgetType: $$type$2,
|
|
@@ -11907,7 +11902,7 @@
|
|
|
11907
11902
|
eventModifier: eventModifier,
|
|
11908
11903
|
payload: {
|
|
11909
11904
|
eventName: eventName,
|
|
11910
|
-
index: helper.
|
|
11905
|
+
index: ((_helper$lastResults = helper.lastResults) === null || _helper$lastResults === void 0 ? void 0 : _helper$lastResults.index) || helper.state.index,
|
|
11911
11906
|
filters: ["".concat(attribute, ">=").concat(facetValue)]
|
|
11912
11907
|
},
|
|
11913
11908
|
attribute: attribute
|
|
@@ -12240,6 +12235,7 @@
|
|
|
12240
12235
|
// only send an event when the refinement gets applied,
|
|
12241
12236
|
// not when it gets removed
|
|
12242
12237
|
if (!isRefined) {
|
|
12238
|
+
var _helper$lastResults;
|
|
12243
12239
|
instantSearchInstance.sendEventToInsights({
|
|
12244
12240
|
insightsMethod: 'clickedFilters',
|
|
12245
12241
|
widgetType: $$type$3,
|
|
@@ -12247,7 +12243,7 @@
|
|
|
12247
12243
|
eventModifier: eventModifier,
|
|
12248
12244
|
payload: {
|
|
12249
12245
|
eventName: eventName,
|
|
12250
|
-
index: helper.
|
|
12246
|
+
index: ((_helper$lastResults = helper.lastResults) === null || _helper$lastResults === void 0 ? void 0 : _helper$lastResults.index) || helper.state.index,
|
|
12251
12247
|
filters: on.map(function (value) {
|
|
12252
12248
|
return "".concat(attribute, ":").concat(value);
|
|
12253
12249
|
})
|
|
@@ -12553,9 +12549,7 @@
|
|
|
12553
12549
|
if (!sendEvent) {
|
|
12554
12550
|
sendEvent = createSendEventForHits({
|
|
12555
12551
|
instantSearchInstance: instantSearchInstance,
|
|
12556
|
-
|
|
12557
|
-
return helper.getIndex();
|
|
12558
|
-
},
|
|
12552
|
+
helper: helper,
|
|
12559
12553
|
widgetType: this.$$type
|
|
12560
12554
|
});
|
|
12561
12555
|
}
|
|
@@ -12914,9 +12908,7 @@
|
|
|
12914
12908
|
if (!sendEvent) {
|
|
12915
12909
|
sendEvent = createSendEventForHits({
|
|
12916
12910
|
instantSearchInstance: instantSearchInstance,
|
|
12917
|
-
|
|
12918
|
-
return helper.getIndex();
|
|
12919
|
-
},
|
|
12911
|
+
helper: helper,
|
|
12920
12912
|
widgetType: $$type$4
|
|
12921
12913
|
});
|
|
12922
12914
|
}
|
|
@@ -13079,7 +13071,7 @@
|
|
|
13079
13071
|
};
|
|
13080
13072
|
}
|
|
13081
13073
|
var indices = scopedResults.map(function (scopedResult) {
|
|
13082
|
-
var _scopedResult$
|
|
13074
|
+
var _scopedResult$results, _scopedResult$results2;
|
|
13083
13075
|
// We need to escape the hits because highlighting
|
|
13084
13076
|
// exposes HTML tags to the end-user.
|
|
13085
13077
|
if (scopedResult.results) {
|
|
@@ -13087,16 +13079,13 @@
|
|
|
13087
13079
|
}
|
|
13088
13080
|
var sendEvent = createSendEventForHits({
|
|
13089
13081
|
instantSearchInstance: instantSearchInstance,
|
|
13090
|
-
|
|
13091
|
-
var _scopedResult$results;
|
|
13092
|
-
return ((_scopedResult$results = scopedResult.results) === null || _scopedResult$results === void 0 ? void 0 : _scopedResult$results.index) || '';
|
|
13093
|
-
},
|
|
13082
|
+
helper: scopedResult.helper,
|
|
13094
13083
|
widgetType: _this.$$type
|
|
13095
13084
|
});
|
|
13096
13085
|
return {
|
|
13097
13086
|
indexId: scopedResult.indexId,
|
|
13098
|
-
indexName: ((_scopedResult$
|
|
13099
|
-
hits: ((_scopedResult$
|
|
13087
|
+
indexName: ((_scopedResult$results = scopedResult.results) === null || _scopedResult$results === void 0 ? void 0 : _scopedResult$results.index) || '',
|
|
13088
|
+
hits: ((_scopedResult$results2 = scopedResult.results) === null || _scopedResult$results2 === void 0 ? void 0 : _scopedResult$results2.hits) || [],
|
|
13100
13089
|
results: scopedResult.results || {},
|
|
13101
13090
|
sendEvent: sendEvent
|
|
13102
13091
|
};
|
|
@@ -13655,9 +13644,7 @@
|
|
|
13655
13644
|
if (!sendEvent) {
|
|
13656
13645
|
sendEvent = createSendEventForHits({
|
|
13657
13646
|
instantSearchInstance: instantSearchInstance,
|
|
13658
|
-
|
|
13659
|
-
return helper.getIndex();
|
|
13660
|
-
},
|
|
13647
|
+
helper: helper,
|
|
13661
13648
|
widgetType: this.$$type
|
|
13662
13649
|
});
|
|
13663
13650
|
}
|
|
@@ -13751,9 +13738,7 @@
|
|
|
13751
13738
|
if (!sendEvent) {
|
|
13752
13739
|
sendEvent = createSendEventForHits({
|
|
13753
13740
|
instantSearchInstance: instantSearchInstance,
|
|
13754
|
-
|
|
13755
|
-
return helper.getIndex();
|
|
13756
|
-
},
|
|
13741
|
+
helper: helper,
|
|
13757
13742
|
widgetType: this.$$type
|
|
13758
13743
|
});
|
|
13759
13744
|
}
|
|
@@ -16417,7 +16402,7 @@
|
|
|
16417
16402
|
};
|
|
16418
16403
|
}
|
|
16419
16404
|
|
|
16420
|
-
var version$1 = '4.
|
|
16405
|
+
var version$1 = '4.78.0';
|
|
16421
16406
|
|
|
16422
16407
|
var withUsage$v = createDocumentationMessageGenerator({
|
|
16423
16408
|
name: 'instantsearch'
|