react-instantsearch 7.15.1 → 7.15.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.
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { FrequentlyBoughtTogetherProps as FrequentlyBoughtTogetherPropsUiComponentProps } from 'instantsearch-ui-components';
3
- import type { AlgoliaHit, BaseHit } from 'instantsearch.js';
3
+ import type { Hit, BaseHit } from 'instantsearch.js';
4
4
  import type { UseFrequentlyBoughtTogetherProps } from 'react-instantsearch-core';
5
- type UiProps<THit extends BaseHit> = Pick<FrequentlyBoughtTogetherPropsUiComponentProps<AlgoliaHit<THit>>, 'items' | 'itemComponent' | 'headerComponent' | 'emptyComponent' | 'layout' | 'status' | 'sendEvent'>;
6
- export type FrequentlyBoughtTogetherProps<THit extends BaseHit> = Omit<FrequentlyBoughtTogetherPropsUiComponentProps<AlgoliaHit<THit>>, keyof UiProps<THit>> & UseFrequentlyBoughtTogetherProps<THit> & {
5
+ type UiProps<THit extends BaseHit> = Pick<FrequentlyBoughtTogetherPropsUiComponentProps<Hit<THit>>, 'items' | 'itemComponent' | 'headerComponent' | 'emptyComponent' | 'layout' | 'status' | 'sendEvent'>;
6
+ export type FrequentlyBoughtTogetherProps<THit extends BaseHit> = Omit<FrequentlyBoughtTogetherPropsUiComponentProps<Hit<THit>>, keyof UiProps<THit>> & UseFrequentlyBoughtTogetherProps<THit> & {
7
7
  itemComponent?: FrequentlyBoughtTogetherPropsUiComponentProps<THit>['itemComponent'];
8
8
  headerComponent?: FrequentlyBoughtTogetherPropsUiComponentProps<THit>['headerComponent'];
9
9
  emptyComponent?: FrequentlyBoughtTogetherPropsUiComponentProps<THit>['emptyComponent'];
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { LookingSimilarProps as LookingSimilarPropsUiComponentProps } from 'instantsearch-ui-components';
3
- import type { AlgoliaHit, BaseHit } from 'instantsearch.js';
3
+ import type { Hit, BaseHit } from 'instantsearch.js';
4
4
  import type { UseLookingSimilarProps } from 'react-instantsearch-core';
5
- type UiProps<THit extends BaseHit> = Pick<LookingSimilarPropsUiComponentProps<AlgoliaHit<THit>>, 'items' | 'itemComponent' | 'headerComponent' | 'emptyComponent' | 'layout' | 'status' | 'sendEvent'>;
6
- export type LookingSimilarProps<THit extends BaseHit> = Omit<LookingSimilarPropsUiComponentProps<AlgoliaHit<THit>>, keyof UiProps<THit>> & UseLookingSimilarProps<THit> & {
5
+ type UiProps<THit extends BaseHit> = Pick<LookingSimilarPropsUiComponentProps<Hit<THit>>, 'items' | 'itemComponent' | 'headerComponent' | 'emptyComponent' | 'layout' | 'status' | 'sendEvent'>;
6
+ export type LookingSimilarProps<THit extends BaseHit> = Omit<LookingSimilarPropsUiComponentProps<Hit<THit>>, keyof UiProps<THit>> & UseLookingSimilarProps<THit> & {
7
7
  itemComponent?: LookingSimilarPropsUiComponentProps<THit>['itemComponent'];
8
8
  headerComponent?: LookingSimilarPropsUiComponentProps<THit>['headerComponent'];
9
9
  emptyComponent?: LookingSimilarPropsUiComponentProps<THit>['emptyComponent'];
@@ -7,7 +7,7 @@
7
7
 
8
8
  var React__default = 'default' in React ? React['default'] : React;
9
9
 
10
- var version = '7.15.1';
10
+ var version = '7.15.3';
11
11
 
12
12
  // Copyright Joyent, Inc. and other Node contributors.
13
13
  //
@@ -4623,7 +4623,7 @@
4623
4623
 
4624
4624
  var sortAndMergeRecommendations_1 = sortAndMergeRecommendations;
4625
4625
 
4626
- var version$1 = '3.23.1';
4626
+ var version$1 = '3.24.1';
4627
4627
 
4628
4628
  var escapeFacetValue$3 = escapeFacetValue_1.escapeFacetValue;
4629
4629
 
@@ -6466,6 +6466,14 @@
6466
6466
  if (this._currentNbQueries === 0) this.emit('searchQueueEmpty');
6467
6467
 
6468
6468
  var results = content.results.slice();
6469
+ var rawContent = Object.keys(content).reduce(function (value, key) {
6470
+ if (key !== 'results') value[key] = content[key];
6471
+ return value;
6472
+ }, {});
6473
+
6474
+ if (Object.keys(rawContent).length <= 0) {
6475
+ rawContent = undefined;
6476
+ }
6469
6477
 
6470
6478
  states.forEach(function (s) {
6471
6479
  var state = s.state;
@@ -6486,6 +6494,7 @@
6486
6494
  specificResults,
6487
6495
  self._searchResultsOptions
6488
6496
  );
6497
+ if (rawContent !== undefined) helper.lastResults._rawContent = rawContent;
6489
6498
 
6490
6499
  helper.emit('result', {
6491
6500
  results: helper.lastResults,
@@ -13408,7 +13417,7 @@
13408
13417
  };
13409
13418
  }
13410
13419
 
13411
- var version$3 = '4.77.1';
13420
+ var version$3 = '4.77.3';
13412
13421
 
13413
13422
  function _typeof$q(o) {
13414
13423
  "@babel/helpers - typeof";