algolia-experiences 1.6.2 → 1.6.4

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.
@@ -8898,6 +8898,11 @@
8898
8898
  return -1;
8899
8899
  }
8900
8900
 
8901
+ function getAlgoliaAgent$1(client) {
8902
+ var clientTyped = client;
8903
+ return clientTyped.transporter && clientTyped.transporter.userAgent ? clientTyped.transporter.userAgent.value : clientTyped._ua;
8904
+ }
8905
+
8901
8906
  // typed as any, since it accepts the _real_ js clients, not the interface we otherwise expect
8902
8907
  function getAppIdAndApiKey(searchClient) {
8903
8908
  if (searchClient.appId && searchClient.apiKey) {
@@ -10686,8 +10691,7 @@
10686
10691
  subscribe: function subscribe() {
10687
10692
  // using setTimeout here to delay extraction until widgets have been added in a tick (e.g. Vue)
10688
10693
  setTimeout(function () {
10689
- var client = instantSearchInstance.client;
10690
- payload.ua = client.transporter && client.transporter.userAgent ? client.transporter.userAgent.value : client._ua;
10694
+ payload.ua = getAlgoliaAgent$1(instantSearchInstance.client);
10691
10695
  extractWidgetPayload(instantSearchInstance.mainIndex.getWidgets(), instantSearchInstance, payload);
10692
10696
  instantSearchInstance.middleware.forEach(function (middleware) {
10693
10697
  return payload.widgets.push({
@@ -12371,6 +12375,12 @@
12371
12375
  helper: helper
12372
12376
  })));
12373
12377
  },
12378
+ scheduleLocalSearch: defer(function () {
12379
+ if (isolated) {
12380
+ var _helper2;
12381
+ (_helper2 = helper) === null || _helper2 === void 0 ? void 0 : _helper2.search();
12382
+ }
12383
+ }),
12374
12384
  getWidgets: function getWidgets() {
12375
12385
  return localWidgets;
12376
12386
  },
@@ -12436,8 +12446,7 @@
12436
12446
  }
12437
12447
  });
12438
12448
  if (isolated) {
12439
- var _helper2;
12440
- (_helper2 = helper) === null || _helper2 === void 0 ? void 0 : _helper2.search();
12449
+ this.scheduleLocalSearch();
12441
12450
  } else {
12442
12451
  localInstantSearchInstance.scheduleSearch();
12443
12452
  }
@@ -12516,8 +12525,7 @@
12516
12525
  helper.recommendState = cleanedRecommendState;
12517
12526
  if (localWidgets.length) {
12518
12527
  if (isolated) {
12519
- var _helper3;
12520
- (_helper3 = helper) === null || _helper3 === void 0 ? void 0 : _helper3.search();
12528
+ this.scheduleLocalSearch();
12521
12529
  } else {
12522
12530
  localInstantSearchInstance.scheduleSearch();
12523
12531
  }
@@ -12761,7 +12769,7 @@
12761
12769
  },
12762
12770
  dispose: function dispose() {
12763
12771
  var _this5 = this,
12764
- _helper4,
12772
+ _helper3,
12765
12773
  _derivedHelper3;
12766
12774
  localWidgets.forEach(function (widget) {
12767
12775
  if (widget.dispose && helper) {
@@ -12781,7 +12789,7 @@
12781
12789
  });
12782
12790
  localInstantSearchInstance = null;
12783
12791
  localParent = null;
12784
- (_helper4 = helper) === null || _helper4 === void 0 ? void 0 : _helper4.removeAllListeners();
12792
+ (_helper3 = helper) === null || _helper3 === void 0 ? void 0 : _helper3.removeAllListeners();
12785
12793
  helper = null;
12786
12794
  (_derivedHelper3 = derivedHelper) === null || _derivedHelper3 === void 0 ? void 0 : _derivedHelper3.detach();
12787
12795
  derivedHelper = null;
@@ -12958,7 +12966,7 @@
12958
12966
  };
12959
12967
  }
12960
12968
 
12961
- var version$1 = '4.83.0';
12969
+ var version$1 = '4.85.0';
12962
12970
 
12963
12971
  function _typeof$j(o) {
12964
12972
  "@babel/helpers - typeof";
@@ -14025,9 +14033,9 @@
14025
14033
  Fragment: Fragment
14026
14034
  }) : _userProps$itemCompon,
14027
14035
  _userProps$previousIc = userProps.previousIconComponent,
14028
- PreviousIconComponent = _userProps$previousIc === void 0 ? PreviousIconDefaultComponent : _userProps$previousIc,
14036
+ PreviousIcon = _userProps$previousIc === void 0 ? PreviousIconDefaultComponent : _userProps$previousIc,
14029
14037
  _userProps$nextIconCo = userProps.nextIconComponent,
14030
- NextIconComponent = _userProps$nextIconCo === void 0 ? NextIconDefaultComponent : _userProps$nextIconCo,
14038
+ NextIcon = _userProps$nextIconCo === void 0 ? NextIconDefaultComponent : _userProps$nextIconCo,
14031
14039
  HeaderComponent = userProps.headerComponent,
14032
14040
  _userProps$showNaviga = userProps.showNavigation,
14033
14041
  showNavigation = _userProps$showNaviga === void 0 ? true : _userProps$showNaviga,
@@ -14096,7 +14104,7 @@
14096
14104
  event.preventDefault();
14097
14105
  scrollLeft();
14098
14106
  }
14099
- }, createElement(PreviousIconComponent, {
14107
+ }, createElement(PreviousIcon, {
14100
14108
  createElement: createElement
14101
14109
  })), createElement("ol", {
14102
14110
  className: cx(cssClasses.list),
@@ -14142,7 +14150,7 @@
14142
14150
  event.preventDefault();
14143
14151
  scrollRight();
14144
14152
  }
14145
- }, createElement(NextIconComponent, {
14153
+ }, createElement(NextIcon, {
14146
14154
  createElement: createElement
14147
14155
  })));
14148
14156
  };