coveo.analytics 2.27.3 → 2.27.5

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.
@@ -377,7 +377,7 @@
377
377
  };
378
378
  HistoryStore.prototype.getMostRecentElement = function () {
379
379
  var currentHistory = this.getHistoryWithInternalTime();
380
- if (currentHistory != null) {
380
+ if (Array.isArray(currentHistory)) {
381
381
  var sorted = currentHistory.sort(function (first, second) {
382
382
  return (second.internalTime || 0) - (first.internalTime || 0);
383
383
  });
@@ -399,10 +399,13 @@
399
399
  return true;
400
400
  };
401
401
  HistoryStore.prototype.stripInternalTime = function (history) {
402
- return history.map(function (part) {
403
- var name = part.name, time = part.time, value = part.value;
404
- return { name: name, time: time, value: value };
405
- });
402
+ if (Array.isArray(history)) {
403
+ return history.map(function (part) {
404
+ var name = part.name, time = part.time, value = part.value;
405
+ return { name: name, time: time, value: value };
406
+ });
407
+ }
408
+ return [];
406
409
  };
407
410
  HistoryStore.prototype.stripEmptyQuery = function (part) {
408
411
  var name = part.name, time = part.time, value = part.value;
@@ -725,7 +728,7 @@
725
728
  const v5 = v35('v5', 0x50, sha1);
726
729
  var uuidv5 = v5;
727
730
 
728
- var libVersion = "2.27.3" ;
731
+ var libVersion = "2.27.5" ;
729
732
 
730
733
  var getFormattedLocation = function (location) {
731
734
  return "".concat(location.protocol, "//").concat(location.hostname).concat(location.pathname.indexOf('/') === 0 ? location.pathname : "/".concat(location.pathname)).concat(location.search);
@@ -4410,6 +4413,20 @@
4410
4413
  });
4411
4414
  });
4412
4415
  };
4416
+ CoveoInsightClient.prototype.logShowMoreFoldedResults = function (info, identifier, metadata) {
4417
+ return __awaiter(this, void 0, void 0, function () {
4418
+ return __generator(this, function (_a) {
4419
+ return [2, this.logClickEvent(SearchPageEvents.showMoreFoldedResults, info, identifier, metadata ? generateMetadataToSend(metadata, false) : undefined)];
4420
+ });
4421
+ });
4422
+ };
4423
+ CoveoInsightClient.prototype.logShowLessFoldedResults = function (metadata) {
4424
+ return __awaiter(this, void 0, void 0, function () {
4425
+ return __generator(this, function (_a) {
4426
+ return [2, this.logCustomEvent(SearchPageEvents.showLessFoldedResults, metadata ? generateMetadataToSend(metadata, false) : undefined)];
4427
+ });
4428
+ });
4429
+ };
4413
4430
  CoveoInsightClient.prototype.getBaseCustomEventRequest = function (metadata) {
4414
4431
  return __awaiter(this, void 0, void 0, function () {
4415
4432
  var _a;