react-instantsearch 7.15.1 → 7.15.2

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.2';
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.0';
4627
4627
 
4628
4628
  var escapeFacetValue$3 = escapeFacetValue_1.escapeFacetValue;
4629
4629
 
@@ -6466,6 +6466,11 @@
6466
6466
  if (this._currentNbQueries === 0) this.emit('searchQueueEmpty');
6467
6467
 
6468
6468
  var results = content.results.slice();
6469
+ var rawContent = Object.create(content);
6470
+ delete rawContent.results;
6471
+ if (Object.keys(rawContent).length <= 0) {
6472
+ rawContent = undefined;
6473
+ }
6469
6474
 
6470
6475
  states.forEach(function (s) {
6471
6476
  var state = s.state;
@@ -6486,10 +6491,12 @@
6486
6491
  specificResults,
6487
6492
  self._searchResultsOptions
6488
6493
  );
6494
+ helper.lastResults._rawContent = rawContent;
6489
6495
 
6490
6496
  helper.emit('result', {
6491
6497
  results: helper.lastResults,
6492
6498
  state: state,
6499
+ _rawContent: rawContent,
6493
6500
  });
6494
6501
  });
6495
6502
  };
@@ -13408,7 +13415,7 @@
13408
13415
  };
13409
13416
  }
13410
13417
 
13411
- var version$3 = '4.77.1';
13418
+ var version$3 = '4.77.2';
13412
13419
 
13413
13420
  function _typeof$q(o) {
13414
13421
  "@babel/helpers - typeof";