instantsearch.js 4.64.2 → 4.64.3

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.
@@ -69,7 +69,9 @@ var connectAutocomplete = function connectAutocomplete(renderFn) {
69
69
  scopedResult.results.hits = escapeHTML ? (0, _utils.escapeHits)(scopedResult.results.hits) : scopedResult.results.hits;
70
70
  var sendEvent = (0, _utils.createSendEventForHits)({
71
71
  instantSearchInstance: instantSearchInstance,
72
- index: scopedResult.results.index,
72
+ getIndex: function getIndex() {
73
+ return scopedResult.results.index;
74
+ },
73
75
  widgetType: _this.$$type
74
76
  });
75
77
  return {
@@ -155,7 +155,9 @@ var connectGeoSearch = function connectGeoSearch(renderFn) {
155
155
  if (!sendEvent) {
156
156
  sendEvent = (0, _utils.createSendEventForHits)({
157
157
  instantSearchInstance: instantSearchInstance,
158
- index: helper.getIndex(),
158
+ getIndex: function getIndex() {
159
+ return helper.getIndex();
160
+ },
159
161
  widgetType: $$type
160
162
  });
161
163
  }
@@ -54,13 +54,17 @@ var connectHits = function connectHits(renderFn) {
54
54
  if (!sendEvent) {
55
55
  sendEvent = (0, _utils.createSendEventForHits)({
56
56
  instantSearchInstance: instantSearchInstance,
57
- index: helper.getIndex(),
57
+ getIndex: function getIndex() {
58
+ return helper.getIndex();
59
+ },
58
60
  widgetType: this.$$type
59
61
  });
60
62
  }
61
63
  if (!bindEvent) {
62
64
  bindEvent = (0, _utils.createBindEventForHits)({
63
- index: helper.getIndex(),
65
+ getIndex: function getIndex() {
66
+ return helper.getIndex();
67
+ },
64
68
  widgetType: this.$$type,
65
69
  instantSearchInstance: instantSearchInstance
66
70
  });
@@ -161,11 +161,15 @@ var connectInfiniteHits = function connectInfiniteHits(renderFn) {
161
161
  showMore = getShowMore(helper);
162
162
  sendEvent = (0, _utils.createSendEventForHits)({
163
163
  instantSearchInstance: instantSearchInstance,
164
- index: helper.getIndex(),
164
+ getIndex: function getIndex() {
165
+ return helper.getIndex();
166
+ },
165
167
  widgetType: this.$$type
166
168
  });
167
169
  bindEvent = (0, _utils.createBindEventForHits)({
168
- index: helper.getIndex(),
170
+ getIndex: function getIndex() {
171
+ return helper.getIndex();
172
+ },
169
173
  widgetType: this.$$type,
170
174
  instantSearchInstance: instantSearchInstance
171
175
  });
@@ -28,7 +28,7 @@ function chunk(arr) {
28
28
  return chunks;
29
29
  }
30
30
  function _buildEventPayloadsForHits(_ref) {
31
- var index = _ref.index,
31
+ var getIndex = _ref.getIndex,
32
32
  widgetType = _ref.widgetType,
33
33
  methodName = _ref.methodName,
34
34
  args = _ref.args,
@@ -85,7 +85,7 @@ function _buildEventPayloadsForHits(_ref) {
85
85
  eventType: eventType,
86
86
  payload: _objectSpread({
87
87
  eventName: eventName || 'Hits Viewed',
88
- index: index,
88
+ index: getIndex(),
89
89
  objectIDs: objectIDsByChunk[i]
90
90
  }, additionalData),
91
91
  hits: batch,
@@ -100,7 +100,7 @@ function _buildEventPayloadsForHits(_ref) {
100
100
  eventType: eventType,
101
101
  payload: _objectSpread({
102
102
  eventName: eventName || 'Hit Clicked',
103
- index: index,
103
+ index: getIndex(),
104
104
  queryID: queryID,
105
105
  objectIDs: objectIDsByChunk[i],
106
106
  positions: positionsByChunk[i]
@@ -117,7 +117,7 @@ function _buildEventPayloadsForHits(_ref) {
117
117
  eventType: eventType,
118
118
  payload: _objectSpread({
119
119
  eventName: eventName || 'Hit Converted',
120
- index: index,
120
+ index: getIndex(),
121
121
  queryID: queryID,
122
122
  objectIDs: objectIDsByChunk[i]
123
123
  }, additionalData),
@@ -133,7 +133,7 @@ function _buildEventPayloadsForHits(_ref) {
133
133
  }
134
134
  function createSendEventForHits(_ref2) {
135
135
  var instantSearchInstance = _ref2.instantSearchInstance,
136
- index = _ref2.index,
136
+ getIndex = _ref2.getIndex,
137
137
  widgetType = _ref2.widgetType;
138
138
  var sentEvents = {};
139
139
  var timer = undefined;
@@ -143,7 +143,7 @@ function createSendEventForHits(_ref2) {
143
143
  }
144
144
  var payloads = _buildEventPayloadsForHits({
145
145
  widgetType: widgetType,
146
- index: index,
146
+ getIndex: getIndex,
147
147
  methodName: 'sendEvent',
148
148
  args: args,
149
149
  instantSearchInstance: instantSearchInstance
@@ -163,7 +163,7 @@ function createSendEventForHits(_ref2) {
163
163
  return sendEventForHits;
164
164
  }
165
165
  function createBindEventForHits(_ref3) {
166
- var index = _ref3.index,
166
+ var getIndex = _ref3.getIndex,
167
167
  widgetType = _ref3.widgetType,
168
168
  instantSearchInstance = _ref3.instantSearchInstance;
169
169
  var bindEventForHits = function bindEventForHits() {
@@ -172,7 +172,7 @@ function createBindEventForHits(_ref3) {
172
172
  }
173
173
  var payloads = _buildEventPayloadsForHits({
174
174
  widgetType: widgetType,
175
- index: index,
175
+ getIndex: getIndex,
176
176
  methodName: 'bindEvent',
177
177
  args: args,
178
178
  instantSearchInstance: instantSearchInstance
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = '4.64.2';
7
+ var _default = '4.64.3';
8
8
  exports.default = _default;
@@ -1,4 +1,4 @@
1
- /*! InstantSearch.js 4.64.2 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch */
1
+ /*! InstantSearch.js 4.64.3 | © 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) :
@@ -801,7 +801,7 @@
801
801
  return chunks;
802
802
  }
803
803
  function _buildEventPayloadsForHits(_ref) {
804
- var index = _ref.index,
804
+ var getIndex = _ref.getIndex,
805
805
  widgetType = _ref.widgetType,
806
806
  methodName = _ref.methodName,
807
807
  args = _ref.args,
@@ -854,7 +854,7 @@
854
854
  eventType: eventType,
855
855
  payload: _objectSpread2({
856
856
  eventName: eventName || 'Hits Viewed',
857
- index: index,
857
+ index: getIndex(),
858
858
  objectIDs: objectIDsByChunk[i]
859
859
  }, additionalData),
860
860
  hits: batch,
@@ -869,7 +869,7 @@
869
869
  eventType: eventType,
870
870
  payload: _objectSpread2({
871
871
  eventName: eventName || 'Hit Clicked',
872
- index: index,
872
+ index: getIndex(),
873
873
  queryID: queryID,
874
874
  objectIDs: objectIDsByChunk[i],
875
875
  positions: positionsByChunk[i]
@@ -886,7 +886,7 @@
886
886
  eventType: eventType,
887
887
  payload: _objectSpread2({
888
888
  eventName: eventName || 'Hit Converted',
889
- index: index,
889
+ index: getIndex(),
890
890
  queryID: queryID,
891
891
  objectIDs: objectIDsByChunk[i]
892
892
  }, additionalData),
@@ -900,7 +900,7 @@
900
900
  }
901
901
  function createSendEventForHits(_ref2) {
902
902
  var instantSearchInstance = _ref2.instantSearchInstance,
903
- index = _ref2.index,
903
+ getIndex = _ref2.getIndex,
904
904
  widgetType = _ref2.widgetType;
905
905
  var sentEvents = {};
906
906
  var timer = undefined;
@@ -910,7 +910,7 @@
910
910
  }
911
911
  var payloads = _buildEventPayloadsForHits({
912
912
  widgetType: widgetType,
913
- index: index,
913
+ getIndex: getIndex,
914
914
  methodName: 'sendEvent',
915
915
  args: args,
916
916
  instantSearchInstance: instantSearchInstance
@@ -930,7 +930,7 @@
930
930
  return sendEventForHits;
931
931
  }
932
932
  function createBindEventForHits(_ref3) {
933
- var index = _ref3.index,
933
+ var getIndex = _ref3.getIndex,
934
934
  widgetType = _ref3.widgetType,
935
935
  instantSearchInstance = _ref3.instantSearchInstance;
936
936
  var bindEventForHits = function bindEventForHits() {
@@ -939,7 +939,7 @@
939
939
  }
940
940
  var payloads = _buildEventPayloadsForHits({
941
941
  widgetType: widgetType,
942
- index: index,
942
+ getIndex: getIndex,
943
943
  methodName: 'bindEvent',
944
944
  args: args,
945
945
  instantSearchInstance: instantSearchInstance
@@ -2669,13 +2669,17 @@
2669
2669
  if (!sendEvent) {
2670
2670
  sendEvent = createSendEventForHits({
2671
2671
  instantSearchInstance: instantSearchInstance,
2672
- index: helper.getIndex(),
2672
+ getIndex: function getIndex() {
2673
+ return helper.getIndex();
2674
+ },
2673
2675
  widgetType: this.$$type
2674
2676
  });
2675
2677
  }
2676
2678
  if (!bindEvent) {
2677
2679
  bindEvent = createBindEventForHits({
2678
- index: helper.getIndex(),
2680
+ getIndex: function getIndex() {
2681
+ return helper.getIndex();
2682
+ },
2679
2683
  widgetType: this.$$type,
2680
2684
  instantSearchInstance: instantSearchInstance
2681
2685
  });
@@ -3212,11 +3216,15 @@
3212
3216
  showMore = getShowMore(helper);
3213
3217
  sendEvent = createSendEventForHits({
3214
3218
  instantSearchInstance: instantSearchInstance,
3215
- index: helper.getIndex(),
3219
+ getIndex: function getIndex() {
3220
+ return helper.getIndex();
3221
+ },
3216
3222
  widgetType: this.$$type
3217
3223
  });
3218
3224
  bindEvent = createBindEventForHits({
3219
- index: helper.getIndex(),
3225
+ getIndex: function getIndex() {
3226
+ return helper.getIndex();
3227
+ },
3220
3228
  widgetType: this.$$type,
3221
3229
  instantSearchInstance: instantSearchInstance
3222
3230
  });
@@ -5651,7 +5659,9 @@
5651
5659
  if (!sendEvent) {
5652
5660
  sendEvent = createSendEventForHits({
5653
5661
  instantSearchInstance: instantSearchInstance,
5654
- index: helper.getIndex(),
5662
+ getIndex: function getIndex() {
5663
+ return helper.getIndex();
5664
+ },
5655
5665
  widgetType: $$type$4
5656
5666
  });
5657
5667
  }
@@ -11976,7 +11986,9 @@
11976
11986
  scopedResult.results.hits = escapeHTML ? escapeHits(scopedResult.results.hits) : scopedResult.results.hits;
11977
11987
  var sendEvent = createSendEventForHits({
11978
11988
  instantSearchInstance: instantSearchInstance,
11979
- index: scopedResult.results.index,
11989
+ getIndex: function getIndex() {
11990
+ return scopedResult.results.index;
11991
+ },
11980
11992
  widgetType: _this.$$type
11981
11993
  });
11982
11994
  return {
@@ -14890,7 +14902,7 @@
14890
14902
  };
14891
14903
  }
14892
14904
 
14893
- var version$1 = '4.64.2';
14905
+ var version$1 = '4.64.3';
14894
14906
 
14895
14907
  var withUsage$r = createDocumentationMessageGenerator({
14896
14908
  name: 'instantsearch'