algolia-experiences 1.5.7 → 1.5.9
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.
|
@@ -2014,7 +2014,16 @@
|
|
|
2014
2014
|
var facets = state.facets
|
|
2015
2015
|
.concat(
|
|
2016
2016
|
state.disjunctiveFacets.map(function (value) {
|
|
2017
|
-
|
|
2017
|
+
if (
|
|
2018
|
+
state.disjunctiveFacetsRefinements &&
|
|
2019
|
+
state.disjunctiveFacetsRefinements[value] &&
|
|
2020
|
+
state.disjunctiveFacetsRefinements[value].length > 0
|
|
2021
|
+
) {
|
|
2022
|
+
// only tag a disjunctiveFacet as disjunctive if it has a value selected
|
|
2023
|
+
// this helps avoid hitting the limit of 20 disjunctive facets in the Composition API
|
|
2024
|
+
return 'disjunctive(' + value + ')';
|
|
2025
|
+
}
|
|
2026
|
+
return value;
|
|
2018
2027
|
})
|
|
2019
2028
|
)
|
|
2020
2029
|
.concat(requestBuilder._getHitsHierarchicalFacetsAttributes(state))
|
|
@@ -5833,7 +5842,7 @@
|
|
|
5833
5842
|
|
|
5834
5843
|
var sortAndMergeRecommendations_1 = sortAndMergeRecommendations;
|
|
5835
5844
|
|
|
5836
|
-
var version = '3.24.
|
|
5845
|
+
var version = '3.24.3';
|
|
5837
5846
|
|
|
5838
5847
|
var escapeFacetValue$3 = escapeFacetValue_1.escapeFacetValue;
|
|
5839
5848
|
|
|
@@ -8518,6 +8527,7 @@
|
|
|
8518
8527
|
instantSearchInstance.sendEventToInsights(args[0]);
|
|
8519
8528
|
} else if (eventType === 'click' && args.length >= 2 && args.length <= 4) {
|
|
8520
8529
|
if (!isFacetRefined(helper, attribute, facetValue)) {
|
|
8530
|
+
var _helper$lastResults;
|
|
8521
8531
|
// send event only when the facet is being checked "ON"
|
|
8522
8532
|
instantSearchInstance.sendEventToInsights({
|
|
8523
8533
|
insightsMethod: 'clickedFilters',
|
|
@@ -8526,7 +8536,7 @@
|
|
|
8526
8536
|
eventModifier: eventModifier,
|
|
8527
8537
|
payload: _objectSpread$1({
|
|
8528
8538
|
eventName: eventName,
|
|
8529
|
-
index: helper.
|
|
8539
|
+
index: ((_helper$lastResults = helper.lastResults) === null || _helper$lastResults === void 0 ? void 0 : _helper$lastResults.index) || helper.state.index,
|
|
8530
8540
|
filters: ["".concat(attribute, ":").concat(facetValue)]
|
|
8531
8541
|
}, additionalData),
|
|
8532
8542
|
attribute: attribute
|
|
@@ -8660,7 +8670,7 @@
|
|
|
8660
8670
|
return chunks;
|
|
8661
8671
|
}
|
|
8662
8672
|
function _buildEventPayloadsForHits(_ref) {
|
|
8663
|
-
var
|
|
8673
|
+
var helper = _ref.helper,
|
|
8664
8674
|
widgetType = _ref.widgetType,
|
|
8665
8675
|
methodName = _ref.methodName,
|
|
8666
8676
|
args = _ref.args,
|
|
@@ -8707,13 +8717,14 @@
|
|
|
8707
8717
|
return [];
|
|
8708
8718
|
}
|
|
8709
8719
|
return hitsChunks.map(function (batch, i) {
|
|
8720
|
+
var _helper$lastResults;
|
|
8710
8721
|
return {
|
|
8711
8722
|
insightsMethod: 'viewedObjectIDs',
|
|
8712
8723
|
widgetType: widgetType,
|
|
8713
8724
|
eventType: eventType,
|
|
8714
8725
|
payload: _objectSpread$2({
|
|
8715
8726
|
eventName: eventName || 'Hits Viewed',
|
|
8716
|
-
index:
|
|
8727
|
+
index: ((_helper$lastResults = helper.lastResults) === null || _helper$lastResults === void 0 ? void 0 : _helper$lastResults.index) || helper.state.index,
|
|
8717
8728
|
objectIDs: objectIDsByChunk[i]
|
|
8718
8729
|
}, additionalData),
|
|
8719
8730
|
hits: batch,
|
|
@@ -8722,13 +8733,14 @@
|
|
|
8722
8733
|
});
|
|
8723
8734
|
} else if (eventType === 'click') {
|
|
8724
8735
|
return hitsChunks.map(function (batch, i) {
|
|
8736
|
+
var _helper$lastResults2;
|
|
8725
8737
|
return {
|
|
8726
8738
|
insightsMethod: 'clickedObjectIDsAfterSearch',
|
|
8727
8739
|
widgetType: widgetType,
|
|
8728
8740
|
eventType: eventType,
|
|
8729
8741
|
payload: _objectSpread$2({
|
|
8730
8742
|
eventName: eventName || 'Hit Clicked',
|
|
8731
|
-
index:
|
|
8743
|
+
index: ((_helper$lastResults2 = helper.lastResults) === null || _helper$lastResults2 === void 0 ? void 0 : _helper$lastResults2.index) || helper.state.index,
|
|
8732
8744
|
queryID: queryID,
|
|
8733
8745
|
objectIDs: objectIDsByChunk[i],
|
|
8734
8746
|
positions: positionsByChunk[i]
|
|
@@ -8739,13 +8751,14 @@
|
|
|
8739
8751
|
});
|
|
8740
8752
|
} else if (eventType === 'conversion') {
|
|
8741
8753
|
return hitsChunks.map(function (batch, i) {
|
|
8754
|
+
var _helper$lastResults3;
|
|
8742
8755
|
return {
|
|
8743
8756
|
insightsMethod: 'convertedObjectIDsAfterSearch',
|
|
8744
8757
|
widgetType: widgetType,
|
|
8745
8758
|
eventType: eventType,
|
|
8746
8759
|
payload: _objectSpread$2({
|
|
8747
8760
|
eventName: eventName || 'Hit Converted',
|
|
8748
|
-
index:
|
|
8761
|
+
index: ((_helper$lastResults3 = helper.lastResults) === null || _helper$lastResults3 === void 0 ? void 0 : _helper$lastResults3.index) || helper.state.index,
|
|
8749
8762
|
queryID: queryID,
|
|
8750
8763
|
objectIDs: objectIDsByChunk[i]
|
|
8751
8764
|
}, additionalData),
|
|
@@ -8759,7 +8772,7 @@
|
|
|
8759
8772
|
}
|
|
8760
8773
|
function createSendEventForHits(_ref2) {
|
|
8761
8774
|
var instantSearchInstance = _ref2.instantSearchInstance,
|
|
8762
|
-
|
|
8775
|
+
helper = _ref2.helper,
|
|
8763
8776
|
widgetType = _ref2.widgetType;
|
|
8764
8777
|
var sentEvents = {};
|
|
8765
8778
|
var timer = undefined;
|
|
@@ -8769,7 +8782,7 @@
|
|
|
8769
8782
|
}
|
|
8770
8783
|
var payloads = _buildEventPayloadsForHits({
|
|
8771
8784
|
widgetType: widgetType,
|
|
8772
|
-
|
|
8785
|
+
helper: helper,
|
|
8773
8786
|
methodName: 'sendEvent',
|
|
8774
8787
|
args: args,
|
|
8775
8788
|
instantSearchInstance: instantSearchInstance
|
|
@@ -8789,7 +8802,7 @@
|
|
|
8789
8802
|
return sendEventForHits;
|
|
8790
8803
|
}
|
|
8791
8804
|
function createBindEventForHits(_ref3) {
|
|
8792
|
-
var
|
|
8805
|
+
var helper = _ref3.helper,
|
|
8793
8806
|
widgetType = _ref3.widgetType,
|
|
8794
8807
|
instantSearchInstance = _ref3.instantSearchInstance;
|
|
8795
8808
|
var bindEventForHits = function bindEventForHits() {
|
|
@@ -8798,7 +8811,7 @@
|
|
|
8798
8811
|
}
|
|
8799
8812
|
var payloads = _buildEventPayloadsForHits({
|
|
8800
8813
|
widgetType: widgetType,
|
|
8801
|
-
|
|
8814
|
+
helper: helper,
|
|
8802
8815
|
methodName: 'bindEvent',
|
|
8803
8816
|
args: args,
|
|
8804
8817
|
instantSearchInstance: instantSearchInstance
|
|
@@ -13035,7 +13048,7 @@
|
|
|
13035
13048
|
};
|
|
13036
13049
|
}
|
|
13037
13050
|
|
|
13038
|
-
var version$1 = '4.
|
|
13051
|
+
var version$1 = '4.78.1';
|
|
13039
13052
|
|
|
13040
13053
|
function _typeof$j(o) {
|
|
13041
13054
|
"@babel/helpers - typeof";
|
|
@@ -19783,17 +19796,13 @@
|
|
|
19783
19796
|
if (!sendEvent) {
|
|
19784
19797
|
sendEvent = createSendEventForHits({
|
|
19785
19798
|
instantSearchInstance: instantSearchInstance,
|
|
19786
|
-
|
|
19787
|
-
return helper.getIndex();
|
|
19788
|
-
},
|
|
19799
|
+
helper: helper,
|
|
19789
19800
|
widgetType: this.$$type
|
|
19790
19801
|
});
|
|
19791
19802
|
}
|
|
19792
19803
|
if (!bindEvent) {
|
|
19793
19804
|
bindEvent = createBindEventForHits({
|
|
19794
|
-
|
|
19795
|
-
return helper.getIndex();
|
|
19796
|
-
},
|
|
19805
|
+
helper: helper,
|
|
19797
19806
|
widgetType: this.$$type,
|
|
19798
19807
|
instantSearchInstance: instantSearchInstance
|
|
19799
19808
|
});
|
|
@@ -21098,15 +21107,11 @@
|
|
|
21098
21107
|
showMore = getShowMore(helper);
|
|
21099
21108
|
sendEvent = createSendEventForHits({
|
|
21100
21109
|
instantSearchInstance: instantSearchInstance,
|
|
21101
|
-
|
|
21102
|
-
return helper.getIndex();
|
|
21103
|
-
},
|
|
21110
|
+
helper: helper,
|
|
21104
21111
|
widgetType: this.$$type
|
|
21105
21112
|
});
|
|
21106
21113
|
bindEvent = createBindEventForHits({
|
|
21107
|
-
|
|
21108
|
-
return helper.getIndex();
|
|
21109
|
-
},
|
|
21114
|
+
helper: helper,
|
|
21110
21115
|
widgetType: this.$$type,
|
|
21111
21116
|
instantSearchInstance: instantSearchInstance
|
|
21112
21117
|
});
|
|
@@ -23549,9 +23554,7 @@
|
|
|
23549
23554
|
if (!sendEvent) {
|
|
23550
23555
|
sendEvent = createSendEventForHits({
|
|
23551
23556
|
instantSearchInstance: instantSearchInstance,
|
|
23552
|
-
|
|
23553
|
-
return helper.getIndex();
|
|
23554
|
-
},
|
|
23557
|
+
helper: helper,
|
|
23555
23558
|
widgetType: this.$$type
|
|
23556
23559
|
});
|
|
23557
23560
|
}
|
|
@@ -26079,6 +26082,7 @@
|
|
|
26079
26082
|
}
|
|
26080
26083
|
var isRefined = getRefinedStar() === Number(facetValue);
|
|
26081
26084
|
if (!isRefined) {
|
|
26085
|
+
var _helper$lastResults;
|
|
26082
26086
|
instantSearchInstance.sendEventToInsights({
|
|
26083
26087
|
insightsMethod: 'clickedFilters',
|
|
26084
26088
|
widgetType: $$type$2,
|
|
@@ -26086,7 +26090,7 @@
|
|
|
26086
26090
|
eventModifier: eventModifier,
|
|
26087
26091
|
payload: {
|
|
26088
26092
|
eventName: eventName,
|
|
26089
|
-
index: helper.
|
|
26093
|
+
index: ((_helper$lastResults = helper.lastResults) === null || _helper$lastResults === void 0 ? void 0 : _helper$lastResults.index) || helper.state.index,
|
|
26090
26094
|
filters: ["".concat(attribute, ">=").concat(facetValue)]
|
|
26091
26095
|
},
|
|
26092
26096
|
attribute: attribute
|
|
@@ -28498,6 +28502,7 @@
|
|
|
28498
28502
|
// only send an event when the refinement gets applied,
|
|
28499
28503
|
// not when it gets removed
|
|
28500
28504
|
if (!isRefined) {
|
|
28505
|
+
var _helper$lastResults;
|
|
28501
28506
|
instantSearchInstance.sendEventToInsights({
|
|
28502
28507
|
insightsMethod: 'clickedFilters',
|
|
28503
28508
|
widgetType: $$type$3,
|
|
@@ -28505,7 +28510,7 @@
|
|
|
28505
28510
|
eventModifier: eventModifier,
|
|
28506
28511
|
payload: {
|
|
28507
28512
|
eventName: eventName,
|
|
28508
|
-
index: helper.
|
|
28513
|
+
index: ((_helper$lastResults = helper.lastResults) === null || _helper$lastResults === void 0 ? void 0 : _helper$lastResults.index) || helper.state.index,
|
|
28509
28514
|
filters: on.map(function (value) {
|
|
28510
28515
|
return "".concat(attribute, ":").concat(value);
|
|
28511
28516
|
})
|
|
@@ -29019,9 +29024,7 @@
|
|
|
29019
29024
|
if (!sendEvent) {
|
|
29020
29025
|
sendEvent = createSendEventForHits({
|
|
29021
29026
|
instantSearchInstance: instantSearchInstance,
|
|
29022
|
-
|
|
29023
|
-
return helper.getIndex();
|
|
29024
|
-
},
|
|
29027
|
+
helper: helper,
|
|
29025
29028
|
widgetType: this.$$type
|
|
29026
29029
|
});
|
|
29027
29030
|
}
|
|
@@ -29407,9 +29410,7 @@
|
|
|
29407
29410
|
if (!sendEvent) {
|
|
29408
29411
|
sendEvent = createSendEventForHits({
|
|
29409
29412
|
instantSearchInstance: instantSearchInstance,
|
|
29410
|
-
|
|
29411
|
-
return helper.getIndex();
|
|
29412
|
-
},
|
|
29413
|
+
helper: helper,
|
|
29413
29414
|
widgetType: this.$$type
|
|
29414
29415
|
});
|
|
29415
29416
|
}
|
|
@@ -29791,9 +29792,7 @@
|
|
|
29791
29792
|
if (!sendEvent) {
|
|
29792
29793
|
sendEvent = createSendEventForHits({
|
|
29793
29794
|
instantSearchInstance: instantSearchInstance,
|
|
29794
|
-
|
|
29795
|
-
return helper.getIndex();
|
|
29796
|
-
},
|
|
29795
|
+
helper: helper,
|
|
29797
29796
|
widgetType: this.$$type
|
|
29798
29797
|
});
|
|
29799
29798
|
}
|