react-instantsearch 7.33.0 → 7.33.1

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.
@@ -20,12 +20,11 @@ var TrendingFacetsUiComponent = (0, _instantsearchuicomponents.createTrendingFac
20
20
  Fragment: _react.Fragment
21
21
  });
22
22
  function TrendingFacets(_0) {
23
- var facetName = _0.facetName, limit = _0.limit, threshold = _0.threshold, fallbackParameters = _0.fallbackParameters, queryParameters = _0.queryParameters, escapeHTML = _0.escapeHTML, transformItems = _0.transformItems, itemComponent = _0.itemComponent, headerComponent = _0.headerComponent, emptyComponent = _0.emptyComponent, props = _object_without_properties._(_0, [
23
+ var facetName = _0.facetName, limit = _0.limit, threshold = _0.threshold, fallbackParameters = _0.fallbackParameters, escapeHTML = _0.escapeHTML, transformItems = _0.transformItems, itemComponent = _0.itemComponent, headerComponent = _0.headerComponent, emptyComponent = _0.emptyComponent, props = _object_without_properties._(_0, [
24
24
  "facetName",
25
25
  "limit",
26
26
  "threshold",
27
27
  "fallbackParameters",
28
- "queryParameters",
29
28
  "escapeHTML",
30
29
  "transformItems",
31
30
  "itemComponent",
@@ -38,7 +37,6 @@ function TrendingFacets(_0) {
38
37
  limit: limit,
39
38
  threshold: threshold,
40
39
  fallbackParameters: fallbackParameters,
41
- queryParameters: queryParameters,
42
40
  escapeHTML: escapeHTML,
43
41
  transformItems: transformItems
44
42
  }, {
@@ -7,5 +7,5 @@ export type TrendingFacetsProps = Omit<TrendingFacetsUiComponentProps, keyof UiP
7
7
  headerComponent?: TrendingFacetsUiComponentProps['headerComponent'];
8
8
  emptyComponent?: TrendingFacetsUiComponentProps['emptyComponent'];
9
9
  };
10
- export declare function TrendingFacets({ facetName, limit, threshold, fallbackParameters, queryParameters, escapeHTML, transformItems, itemComponent, headerComponent, emptyComponent, ...props }: TrendingFacetsProps): React.JSX.Element;
10
+ export declare function TrendingFacets({ facetName, limit, threshold, fallbackParameters, escapeHTML, transformItems, itemComponent, headerComponent, emptyComponent, ...props }: TrendingFacetsProps): React.JSX.Element;
11
11
  export {};
@@ -9,12 +9,11 @@ var TrendingFacetsUiComponent = createTrendingFacetsComponent({
9
9
  Fragment: Fragment
10
10
  });
11
11
  function TrendingFacets(_0) {
12
- var facetName = _0.facetName, limit = _0.limit, threshold = _0.threshold, fallbackParameters = _0.fallbackParameters, queryParameters = _0.queryParameters, escapeHTML = _0.escapeHTML, transformItems = _0.transformItems, itemComponent = _0.itemComponent, headerComponent = _0.headerComponent, emptyComponent = _0.emptyComponent, props = _(_0, [
12
+ var facetName = _0.facetName, limit = _0.limit, threshold = _0.threshold, fallbackParameters = _0.fallbackParameters, escapeHTML = _0.escapeHTML, transformItems = _0.transformItems, itemComponent = _0.itemComponent, headerComponent = _0.headerComponent, emptyComponent = _0.emptyComponent, props = _(_0, [
13
13
  "facetName",
14
14
  "limit",
15
15
  "threshold",
16
16
  "fallbackParameters",
17
- "queryParameters",
18
17
  "escapeHTML",
19
18
  "transformItems",
20
19
  "itemComponent",
@@ -27,7 +26,6 @@ function TrendingFacets(_0) {
27
26
  limit: limit,
28
27
  threshold: threshold,
29
28
  fallbackParameters: fallbackParameters,
30
- queryParameters: queryParameters,
31
29
  escapeHTML: escapeHTML,
32
30
  transformItems: transformItems
33
31
  }, {
@@ -1,4 +1,4 @@
1
- /*! React InstantSearch 7.33.0 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch */
1
+ /*! React InstantSearch 7.33.1 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
@@ -24,7 +24,7 @@
24
24
 
25
25
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
26
26
 
27
- var version$2 = '7.33.0';
27
+ var version$2 = '7.33.1';
28
28
 
29
29
  function _define_property(obj, key, value) {
30
30
  if (key in obj) {
@@ -10821,7 +10821,7 @@
10821
10821
  };
10822
10822
  }
10823
10823
 
10824
- var version = '4.98.0';
10824
+ var version = '4.99.0';
10825
10825
 
10826
10826
  var withUsage$q = createDocumentationMessageGenerator({
10827
10827
  name: 'instantsearch'
@@ -13994,47 +13994,15 @@
13994
13994
  message
13995
13995
  ].concat(_to_consumable_array(rest)));
13996
13996
  }
13997
- var resolvedContext = typeof context === 'function' ? context() : context;
13998
- var serializedContext;
13999
- try {
14000
- serializedContext = JSON.stringify(resolvedContext);
14001
- } catch (unused) {
14002
- var _chatInstance3;
14003
- return (_chatInstance3 = _chatInstance).sendMessage.apply(_chatInstance3, [
14004
- message
14005
- ].concat(_to_consumable_array(rest)));
14006
- }
14007
- var contextTextPart = {
14008
- type: 'text',
14009
- text: '<context>'.concat(serializedContext).concat('</context>')
14010
- };
14011
- if ('parts' in message && message.parts) {
14012
- var _chatInstance4;
14013
- return (_chatInstance4 = _chatInstance).sendMessage.apply(_chatInstance4, [
14014
- _object_spread_props(_object_spread({}, message), {
14015
- parts: [
14016
- contextTextPart
14017
- ].concat(_to_consumable_array(message.parts)),
14018
- text: undefined,
14019
- files: undefined
14020
- })
14021
- ].concat(_to_consumable_array(rest)));
14022
- }
14023
- var textContent = 'text' in message && message.text ? message.text : '';
13997
+ // Resolve once per send; let the server validate the payload and
13998
+ // surface any contract violations.
13999
+ var turnContext = typeof context === 'function' ? context() : context;
14024
14000
  return (_chatInstance1 = _chatInstance).sendMessage.apply(_chatInstance1, [
14025
- {
14026
- parts: [
14027
- contextTextPart,
14028
- {
14029
- type: 'text',
14030
- text: textContent
14031
- }
14032
- ],
14033
- metadata: message.metadata,
14034
- messageId: message.messageId,
14035
- files: undefined,
14036
- text: undefined
14037
- }
14001
+ _object_spread_props(_object_spread({}, message), {
14002
+ metadata: _object_spread_props(_object_spread({}, message.metadata), {
14003
+ turnContext: turnContext
14004
+ })
14005
+ })
14038
14006
  ].concat(_to_consumable_array(rest)));
14039
14007
  };
14040
14008
  return {
@@ -17442,7 +17410,7 @@
17442
17410
  var unmountFn = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : noop;
17443
17411
  checkRendering(renderFn, withUsage$2());
17444
17412
  return function(widgetParams) {
17445
- var _ref = widgetParams || {}, facetName = _ref.facetName, limit = _ref.limit, threshold = _ref.threshold, fallbackParameters = _ref.fallbackParameters, queryParameters = _ref.queryParameters, _ref_escapeHTML = _ref.escapeHTML, escapeHTML = _ref_escapeHTML === void 0 ? true : _ref_escapeHTML, _ref_transformItems = _ref.transformItems, transformItems = _ref_transformItems === void 0 ? function(items) {
17413
+ var _ref = widgetParams || {}, facetName = _ref.facetName, limit = _ref.limit, threshold = _ref.threshold, fallbackParameters = _ref.fallbackParameters, _ref_escapeHTML = _ref.escapeHTML, escapeHTML = _ref_escapeHTML === void 0 ? true : _ref_escapeHTML, _ref_transformItems = _ref.transformItems, transformItems = _ref_transformItems === void 0 ? function(items) {
17446
17414
  return items;
17447
17415
  } : _ref_transformItems;
17448
17416
  if (!facetName) {
@@ -17510,7 +17478,6 @@
17510
17478
  maxRecommendations: limit,
17511
17479
  threshold: threshold,
17512
17480
  fallbackParameters: fallbackParameters ? _object_spread({}, fallbackParameters, escapeHTML ? TAG_PLACEHOLDER : {}) : undefined,
17513
- queryParameters: _object_spread({}, queryParameters, escapeHTML ? TAG_PLACEHOLDER : {}),
17514
17481
  $$id: this.$$id
17515
17482
  });
17516
17483
  }
@@ -19741,6 +19708,10 @@
19741
19708
  return null;
19742
19709
  }
19743
19710
  if (part.type === 'text') {
19711
+ // Back-compat shim for sessions started before the move from a
19712
+ // `<context>{...}</context>` text part to `metadata.turnContext`.
19713
+ // Safe to remove once existing sessionStorage transcripts have
19714
+ // rolled over (~2 weeks after release).
19744
19715
  if (part.text.startsWith('<context>') && part.text.endsWith('</context>')) {
19745
19716
  return null;
19746
19717
  }
@@ -24659,12 +24630,11 @@
24659
24630
  Fragment: React.Fragment
24660
24631
  });
24661
24632
  function TrendingFacets(_0) {
24662
- var facetName = _0.facetName, limit = _0.limit, threshold = _0.threshold, fallbackParameters = _0.fallbackParameters, queryParameters = _0.queryParameters, escapeHTML = _0.escapeHTML, transformItems = _0.transformItems, itemComponent = _0.itemComponent, headerComponent = _0.headerComponent, emptyComponent = _0.emptyComponent, props = _object_without_properties(_0, [
24633
+ var facetName = _0.facetName, limit = _0.limit, threshold = _0.threshold, fallbackParameters = _0.fallbackParameters, escapeHTML = _0.escapeHTML, transformItems = _0.transformItems, itemComponent = _0.itemComponent, headerComponent = _0.headerComponent, emptyComponent = _0.emptyComponent, props = _object_without_properties(_0, [
24663
24634
  "facetName",
24664
24635
  "limit",
24665
24636
  "threshold",
24666
24637
  "fallbackParameters",
24667
- "queryParameters",
24668
24638
  "escapeHTML",
24669
24639
  "transformItems",
24670
24640
  "itemComponent",
@@ -24677,7 +24647,6 @@
24677
24647
  limit: limit,
24678
24648
  threshold: threshold,
24679
24649
  fallbackParameters: fallbackParameters,
24680
- queryParameters: queryParameters,
24681
24650
  escapeHTML: escapeHTML,
24682
24651
  transformItems: transformItems
24683
24652
  }, {