instantsearch.js 4.59.0 → 4.61.0

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.
Files changed (40) hide show
  1. package/cjs/components/SearchBox/SearchBox.js +2 -2
  2. package/cjs/connectors/breadcrumb/connectBreadcrumb.js +18 -5
  3. package/cjs/connectors/dynamic-widgets/connectDynamicWidgets.js +2 -3
  4. package/cjs/connectors/hierarchical-menu/connectHierarchicalMenu.js +17 -6
  5. package/cjs/connectors/menu/connectMenu.js +18 -6
  6. package/cjs/connectors/numeric-menu/connectNumericMenu.js +18 -5
  7. package/cjs/connectors/rating-menu/connectRatingMenu.js +19 -6
  8. package/cjs/connectors/refinement-list/connectRefinementList.js +17 -6
  9. package/cjs/lib/InstantSearch.js +1 -0
  10. package/cjs/lib/utils/hydrateSearchClient.js +126 -0
  11. package/cjs/lib/utils/index.js +11 -0
  12. package/cjs/lib/version.js +1 -1
  13. package/cjs/widgets/search-box/defaultTemplates.js +9 -3
  14. package/dist/instantsearch.development.d.ts +13 -3
  15. package/dist/instantsearch.development.js +277 -95
  16. package/dist/instantsearch.development.js.map +1 -1
  17. package/dist/instantsearch.production.d.ts +13 -3
  18. package/dist/instantsearch.production.min.d.ts +13 -3
  19. package/dist/instantsearch.production.min.js +2 -2
  20. package/dist/instantsearch.production.min.js.map +1 -1
  21. package/es/components/SearchBox/SearchBox.js +2 -2
  22. package/es/connectors/breadcrumb/connectBreadcrumb.js +18 -5
  23. package/es/connectors/dynamic-widgets/connectDynamicWidgets.d.ts +12 -2
  24. package/es/connectors/dynamic-widgets/connectDynamicWidgets.js +2 -3
  25. package/es/connectors/hierarchical-menu/connectHierarchicalMenu.js +17 -6
  26. package/es/connectors/menu/connectMenu.js +18 -6
  27. package/es/connectors/numeric-menu/connectNumericMenu.js +18 -5
  28. package/es/connectors/rating-menu/connectRatingMenu.d.ts +1 -1
  29. package/es/connectors/rating-menu/connectRatingMenu.js +19 -6
  30. package/es/connectors/refinement-list/connectRefinementList.js +17 -6
  31. package/es/lib/InstantSearch.js +2 -1
  32. package/es/lib/utils/hydrateSearchClient.d.ts +5 -0
  33. package/es/lib/utils/hydrateSearchClient.js +120 -0
  34. package/es/lib/utils/index.d.ts +1 -0
  35. package/es/lib/utils/index.js +1 -0
  36. package/es/lib/utils/render-args.d.ts +4 -4
  37. package/es/lib/version.d.ts +1 -1
  38. package/es/lib/version.js +1 -1
  39. package/es/widgets/search-box/defaultTemplates.js +10 -3
  40. package/package.json +5 -5
@@ -1,4 +1,4 @@
1
- /*! InstantSearch.js 4.59.0 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch */
1
+ /*! InstantSearch.js 4.61.0 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -1411,6 +1411,115 @@
1411
1411
  });
1412
1412
  }
1413
1413
 
1414
+ function hydrateSearchClient(client, results) {
1415
+ if (!results) {
1416
+ return;
1417
+ }
1418
+
1419
+ // Disable cache hydration on:
1420
+ // - Algoliasearch API Client < v4 with cache disabled
1421
+ // - Third party clients (detected by the `addAlgoliaAgent` function missing)
1422
+
1423
+ if ((!('transporter' in client) || client._cacheHydrated) && (!client._useCache || typeof client.addAlgoliaAgent !== 'function')) {
1424
+ return;
1425
+ }
1426
+ var cachedRequest = Object.keys(results).map(function (key) {
1427
+ return results[key].results.map(function (result) {
1428
+ return {
1429
+ indexName: result.index,
1430
+ // We normalize the params received from the server as they can
1431
+ // be serialized differently depending on the engine.
1432
+ params: serializeQueryParameters(deserializeQueryParameters(result.params))
1433
+ };
1434
+ });
1435
+ });
1436
+ var cachedResults = Object.keys(results).reduce(function (acc, key) {
1437
+ return acc.concat(results[key].results);
1438
+ }, []);
1439
+
1440
+ // Algoliasearch API Client >= v4
1441
+ // To hydrate the client we need to populate the cache with the data from
1442
+ // the server (done in `hydrateSearchClientWithMultiIndexRequest` or
1443
+ // `hydrateSearchClientWithSingleIndexRequest`). But since there is no way
1444
+ // for us to compute the key the same way as `algoliasearch-client` we need
1445
+ // to populate it on a custom key and override the `search` method to
1446
+ // search on it first.
1447
+ if ('transporter' in client && !client._cacheHydrated) {
1448
+ client._cacheHydrated = true;
1449
+ var baseMethod = client.search;
1450
+ // @ts-ignore wanting type checks for v3 on this would make this too complex
1451
+ client.search = function (requests) {
1452
+ for (var _len = arguments.length, methodArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1453
+ methodArgs[_key - 1] = arguments[_key];
1454
+ }
1455
+ var requestsWithSerializedParams = requests.map(function (request) {
1456
+ return _objectSpread2(_objectSpread2({}, request), {}, {
1457
+ params: serializeQueryParameters(request.params)
1458
+ });
1459
+ });
1460
+ return client.transporter.responsesCache.get({
1461
+ method: 'search',
1462
+ args: [requestsWithSerializedParams].concat(methodArgs)
1463
+ }, function () {
1464
+ return baseMethod.apply(void 0, [requests].concat(methodArgs));
1465
+ });
1466
+ };
1467
+ client.transporter.responsesCache.set({
1468
+ method: 'search',
1469
+ args: cachedRequest
1470
+ }, {
1471
+ results: cachedResults
1472
+ });
1473
+ }
1474
+
1475
+ // Algoliasearch API Client < v4
1476
+ // Prior to client v4 we didn't have a proper API to hydrate the client
1477
+ // cache from the outside. The following code populates the cache with
1478
+ // a single-index result. You can find more information about the
1479
+ // computation of the key inside the client (see link below).
1480
+ // https://github.com/algolia/algoliasearch-client-javascript/blob/c27e89ff92b2a854ae6f40dc524bffe0f0cbc169/src/AlgoliaSearchCore.js#L232-L240
1481
+ if (!('transporter' in client)) {
1482
+ var cacheKey = "/1/indexes/*/queries_body_".concat(JSON.stringify({
1483
+ requests: cachedRequest
1484
+ }));
1485
+ client.cache = _objectSpread2(_objectSpread2({}, client.cache), {}, _defineProperty({}, cacheKey, JSON.stringify({
1486
+ results: Object.keys(results).map(function (key) {
1487
+ return results[key].results;
1488
+ })
1489
+ })));
1490
+ }
1491
+ }
1492
+ function deserializeQueryParameters(parameters) {
1493
+ return parameters.split('&').reduce(function (acc, parameter) {
1494
+ var _parameter$split = parameter.split('='),
1495
+ _parameter$split2 = _slicedToArray(_parameter$split, 2),
1496
+ key = _parameter$split2[0],
1497
+ value = _parameter$split2[1];
1498
+ acc[key] = value ? decodeURIComponent(value) : '';
1499
+ return acc;
1500
+ }, {});
1501
+ }
1502
+
1503
+ // This function is copied from the algoliasearch v4 API Client. If modified,
1504
+ // consider updating it also in `serializeQueryParameters` from `@algolia/transporter`.
1505
+ function serializeQueryParameters(parameters) {
1506
+ var isObjectOrArray = function isObjectOrArray(value) {
1507
+ return Object.prototype.toString.call(value) === '[object Object]' || Object.prototype.toString.call(value) === '[object Array]';
1508
+ };
1509
+ var encode = function encode(format) {
1510
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1511
+ args[_key2 - 1] = arguments[_key2];
1512
+ }
1513
+ var i = 0;
1514
+ return format.replace(/%s/g, function () {
1515
+ return encodeURIComponent(args[i++]);
1516
+ });
1517
+ };
1518
+ return Object.keys(parameters).map(function (key) {
1519
+ return encode('%s=%s', key, isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key]);
1520
+ }).join('&');
1521
+ }
1522
+
1414
1523
  function isPrimitive(obj) {
1415
1524
  return obj !== Object(obj);
1416
1525
  }
@@ -1845,8 +1954,8 @@
1845
1954
  }))) {
1846
1955
  throw new Error(withUsage$1('The `widgets` option expects an array of widgets.'));
1847
1956
  }
1848
- if (!(Array.isArray(facets) && facets.length <= 1 && (facets[0] === '*' || facets[0] === undefined))) {
1849
- throw new Error(withUsage$1("The `facets` option only accepts [] or [\"*\"], you passed ".concat(JSON.stringify(facets))));
1957
+ if (!Array.isArray(facets)) {
1958
+ throw new Error(withUsage$1("The `facets` option only accepts an array of facets, you passed ".concat(JSON.stringify(facets))));
1850
1959
  }
1851
1960
  var localWidgets = new Map();
1852
1961
  return {
@@ -1924,7 +2033,6 @@
1924
2033
  unmountFn();
1925
2034
  },
1926
2035
  getWidgetSearchParameters: function getWidgetSearchParameters(state) {
1927
- // broadening the scope of facets to avoid conflict between never and *
1928
2036
  return facets.reduce(function (acc, curr) {
1929
2037
  return acc.addFacet(curr);
1930
2038
  }, state.setQueryParameters({
@@ -2281,7 +2389,8 @@
2281
2389
  return refinement.name;
2282
2390
  }
2283
2391
 
2284
- var _excluded$1 = ["name", "escapedValue", "data", "path"];
2392
+ var _excluded$1 = ["name", "escapedValue", "data", "path"],
2393
+ _excluded2 = ["hierarchicalMenu"];
2285
2394
  var withUsage$4 = createDocumentationMessageGenerator({
2286
2395
  name: 'hierarchical-menu',
2287
2396
  connector: true
@@ -2467,12 +2576,9 @@
2467
2576
  getWidgetUiState: function getWidgetUiState(uiState, _ref5) {
2468
2577
  var searchParameters = _ref5.searchParameters;
2469
2578
  var path = searchParameters.getHierarchicalFacetBreadcrumb(hierarchicalFacetName);
2470
- if (!path.length) {
2471
- return uiState;
2472
- }
2473
- return _objectSpread2(_objectSpread2({}, uiState), {}, {
2579
+ return removeEmptyRefinementsFromUiState(_objectSpread2(_objectSpread2({}, uiState), {}, {
2474
2580
  hierarchicalMenu: _objectSpread2(_objectSpread2({}, uiState.hierarchicalMenu), {}, _defineProperty({}, hierarchicalFacetName, path))
2475
- });
2581
+ }));
2476
2582
  },
2477
2583
  getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref6) {
2478
2584
  var uiState = _ref6.uiState;
@@ -2505,6 +2611,19 @@
2505
2611
  };
2506
2612
  };
2507
2613
  };
2614
+ function removeEmptyRefinementsFromUiState(indexUiState) {
2615
+ var hierarchicalMenu = indexUiState.hierarchicalMenu,
2616
+ indexUiStateBase = _objectWithoutProperties(indexUiState, _excluded2);
2617
+ if (!hierarchicalMenu) {
2618
+ return indexUiState;
2619
+ }
2620
+ var connectorUiState = Object.keys(hierarchicalMenu).reduce(function (acc, key) {
2621
+ return _objectSpread2(_objectSpread2({}, acc), hierarchicalMenu[key].length > 0 ? _defineProperty({}, key, hierarchicalMenu[key]) : {});
2622
+ }, {});
2623
+ return _objectSpread2(_objectSpread2({}, indexUiStateBase), Object.keys(connectorUiState).length > 0 ? {
2624
+ hierarchicalMenu: connectorUiState
2625
+ } : {});
2626
+ }
2508
2627
 
2509
2628
  var withUsage$5 = createDocumentationMessageGenerator({
2510
2629
  name: 'hits',
@@ -2951,7 +3070,7 @@
2951
3070
  };
2952
3071
 
2953
3072
  var _excluded$2 = ["page"],
2954
- _excluded2 = ["clickAnalytics", "userToken"];
3073
+ _excluded2$1 = ["clickAnalytics", "userToken"];
2955
3074
  var withUsage$7 = createDocumentationMessageGenerator({
2956
3075
  name: 'infinite-hits',
2957
3076
  connector: true
@@ -2966,7 +3085,7 @@
2966
3085
  var _ref2 = state || {},
2967
3086
  clickAnalytics = _ref2.clickAnalytics,
2968
3087
  userToken = _ref2.userToken,
2969
- rest = _objectWithoutProperties(_ref2, _excluded2);
3088
+ rest = _objectWithoutProperties(_ref2, _excluded2$1);
2970
3089
  return rest;
2971
3090
  }
2972
3091
  function getInMemoryCache() {
@@ -3202,7 +3321,8 @@
3202
3321
  */ // eslint-disable-next-line @typescript-eslint/no-unused-vars
3203
3322
  var connectInfiniteHitsWithInsights = withInsights(connectInfiniteHits);
3204
3323
 
3205
- var _excluded$3 = ["name", "escapedValue", "path"];
3324
+ var _excluded$3 = ["name", "escapedValue", "path"],
3325
+ _excluded2$2 = ["menu"];
3206
3326
  var withUsage$8 = createDocumentationMessageGenerator({
3207
3327
  name: 'menu',
3208
3328
  connector: true
@@ -3360,12 +3480,9 @@
3360
3480
  var _searchParameters$get = searchParameters.getHierarchicalFacetBreadcrumb(attribute),
3361
3481
  _searchParameters$get2 = _slicedToArray(_searchParameters$get, 1),
3362
3482
  value = _searchParameters$get2[0];
3363
- if (!value) {
3364
- return uiState;
3365
- }
3366
- return _objectSpread2(_objectSpread2({}, uiState), {}, {
3483
+ return removeEmptyRefinementsFromUiState$1(_objectSpread2(_objectSpread2({}, uiState), {}, {
3367
3484
  menu: _objectSpread2(_objectSpread2({}, uiState.menu), {}, _defineProperty({}, attribute, value))
3368
- });
3485
+ }));
3369
3486
  },
3370
3487
  getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref5) {
3371
3488
  var uiState = _ref5.uiState;
@@ -3391,7 +3508,22 @@
3391
3508
  };
3392
3509
  };
3393
3510
  };
3511
+ function removeEmptyRefinementsFromUiState$1(indexUiState) {
3512
+ var menu = indexUiState.menu,
3513
+ indexUiStateBase = _objectWithoutProperties(indexUiState, _excluded2$2);
3514
+ if (!menu) {
3515
+ return indexUiState;
3516
+ }
3517
+ var connectorUiState = Object.keys(menu).reduce(function (acc, key) {
3518
+ var _menu$key;
3519
+ return _objectSpread2(_objectSpread2({}, acc), ((_menu$key = menu[key]) === null || _menu$key === void 0 ? void 0 : _menu$key.length) > 0 ? _defineProperty({}, key, menu[key]) : {});
3520
+ }, {});
3521
+ return _objectSpread2(_objectSpread2({}, indexUiStateBase), Object.keys(connectorUiState).length > 0 ? {
3522
+ menu: connectorUiState
3523
+ } : {});
3524
+ }
3394
3525
 
3526
+ var _excluded$4 = ["numericMenu"];
3395
3527
  var withUsage$9 = createDocumentationMessageGenerator({
3396
3528
  name: 'numeric-menu',
3397
3529
  connector: true
@@ -3475,12 +3607,9 @@
3475
3607
  }
3476
3608
  var min = values['>='] && values['>='][0] || '';
3477
3609
  var max = values['<='] && values['<='][0] || '';
3478
- if (min === '' && max === '') {
3479
- return uiState;
3480
- }
3481
- return _objectSpread2(_objectSpread2({}, uiState), {}, {
3610
+ return removeEmptyRefinementsFromUiState$2(_objectSpread2(_objectSpread2({}, uiState), {}, {
3482
3611
  numericMenu: _objectSpread2(_objectSpread2({}, uiState.numericMenu), {}, _defineProperty({}, attribute, "".concat(min, ":").concat(max)))
3483
- });
3612
+ }));
3484
3613
  },
3485
3614
  getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref6) {
3486
3615
  var uiState = _ref6.uiState;
@@ -3642,6 +3771,19 @@
3642
3771
  function hasNumericRefinement(currentRefinements, operator, value) {
3643
3772
  return currentRefinements[operator] !== undefined && currentRefinements[operator].includes(value);
3644
3773
  }
3774
+ function removeEmptyRefinementsFromUiState$2(indexUiState) {
3775
+ var numericMenu = indexUiState.numericMenu,
3776
+ indexUiStateBase = _objectWithoutProperties(indexUiState, _excluded$4);
3777
+ if (!numericMenu) {
3778
+ return indexUiState;
3779
+ }
3780
+ var connectorUiState = Object.keys(numericMenu).reduce(function (acc, key) {
3781
+ return _objectSpread2(_objectSpread2({}, acc), numericMenu[key] !== ':' ? _defineProperty({}, key, numericMenu[key]) : {});
3782
+ }, {});
3783
+ return _objectSpread2(_objectSpread2({}, indexUiStateBase), Object.keys(connectorUiState).length > 0 ? {
3784
+ numericMenu: connectorUiState
3785
+ } : {});
3786
+ }
3645
3787
 
3646
3788
  var Paginator = /*#__PURE__*/function () {
3647
3789
  function Paginator(params) {
@@ -4091,8 +4233,9 @@
4091
4233
  };
4092
4234
  };
4093
4235
 
4094
- var _excluded$4 = ["name", "escapedValue"],
4095
- _excluded2$1 = ["escapedValue", "value"];
4236
+ var _excluded$5 = ["name", "escapedValue"],
4237
+ _excluded2$3 = ["escapedValue", "value"],
4238
+ _excluded3 = ["refinementList"];
4096
4239
  var withUsage$c = createDocumentationMessageGenerator({
4097
4240
  name: 'refinement-list',
4098
4241
  connector: true
@@ -4144,7 +4287,7 @@
4144
4287
  var formatItems = function formatItems(_ref2) {
4145
4288
  var label = _ref2.name,
4146
4289
  value = _ref2.escapedValue,
4147
- item = _objectWithoutProperties(_ref2, _excluded$4);
4290
+ item = _objectWithoutProperties(_ref2, _excluded$5);
4148
4291
  return _objectSpread2(_objectSpread2({}, item), {}, {
4149
4292
  value: value,
4150
4293
  label: label,
@@ -4201,7 +4344,7 @@
4201
4344
  var normalizedFacetValues = transformItems(facetValues.map(function (_ref3) {
4202
4345
  var escapedValue = _ref3.escapedValue,
4203
4346
  value = _ref3.value,
4204
- item = _objectWithoutProperties(_ref3, _excluded2$1);
4347
+ item = _objectWithoutProperties(_ref3, _excluded2$3);
4205
4348
  return _objectSpread2(_objectSpread2({}, item), {}, {
4206
4349
  value: escapedValue,
4207
4350
  label: value
@@ -4327,12 +4470,9 @@
4327
4470
  getWidgetUiState: function getWidgetUiState(uiState, _ref5) {
4328
4471
  var searchParameters = _ref5.searchParameters;
4329
4472
  var values = operator === 'or' ? searchParameters.getDisjunctiveRefinements(attribute) : searchParameters.getConjunctiveRefinements(attribute);
4330
- if (!values.length) {
4331
- return uiState;
4332
- }
4333
- return _objectSpread2(_objectSpread2({}, uiState), {}, {
4473
+ return removeEmptyRefinementsFromUiState$3(_objectSpread2(_objectSpread2({}, uiState), {}, {
4334
4474
  refinementList: _objectSpread2(_objectSpread2({}, uiState.refinementList), {}, _defineProperty({}, attribute, values))
4335
- });
4475
+ }));
4336
4476
  },
4337
4477
  getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref6) {
4338
4478
  var uiState = _ref6.uiState;
@@ -4362,6 +4502,19 @@
4362
4502
  };
4363
4503
  };
4364
4504
  };
4505
+ function removeEmptyRefinementsFromUiState$3(indexUiState) {
4506
+ var refinementList = indexUiState.refinementList,
4507
+ indexUiStateBase = _objectWithoutProperties(indexUiState, _excluded3);
4508
+ if (!refinementList) {
4509
+ return indexUiState;
4510
+ }
4511
+ var connectorUiState = Object.keys(refinementList).reduce(function (acc, key) {
4512
+ return _objectSpread2(_objectSpread2({}, acc), refinementList[key].length > 0 ? _defineProperty({}, key, refinementList[key]) : {});
4513
+ }, {});
4514
+ return _objectSpread2(_objectSpread2({}, indexUiStateBase), Object.keys(connectorUiState).length > 0 ? {
4515
+ refinementList: connectorUiState
4516
+ } : {});
4517
+ }
4365
4518
 
4366
4519
  var withUsage$d = createDocumentationMessageGenerator({
4367
4520
  name: 'search-box',
@@ -4555,6 +4708,7 @@
4555
4708
  };
4556
4709
  };
4557
4710
 
4711
+ var _excluded$6 = ["ratingMenu"];
4558
4712
  var withUsage$f = createDocumentationMessageGenerator({
4559
4713
  name: 'rating-menu',
4560
4714
  connector: true
@@ -4796,12 +4950,9 @@
4796
4950
  getWidgetUiState: function getWidgetUiState(uiState, _ref7) {
4797
4951
  var searchParameters = _ref7.searchParameters;
4798
4952
  var value = _getRefinedStar(searchParameters);
4799
- if (typeof value !== 'number') {
4800
- return uiState;
4801
- }
4802
- return _objectSpread2(_objectSpread2({}, uiState), {}, {
4803
- ratingMenu: _objectSpread2(_objectSpread2({}, uiState.ratingMenu), {}, _defineProperty({}, attribute, value))
4804
- });
4953
+ return removeEmptyRefinementsFromUiState$4(_objectSpread2(_objectSpread2({}, uiState), {}, {
4954
+ ratingMenu: _objectSpread2(_objectSpread2({}, uiState.ratingMenu), {}, _defineProperty({}, attribute, typeof value === 'number' ? value : undefined))
4955
+ }));
4805
4956
  },
4806
4957
  getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref8) {
4807
4958
  var uiState = _ref8.uiState;
@@ -4818,6 +4969,19 @@
4818
4969
  };
4819
4970
  };
4820
4971
  };
4972
+ function removeEmptyRefinementsFromUiState$4(indexUiState) {
4973
+ var ratingMenu = indexUiState.ratingMenu,
4974
+ indexUiStateBase = _objectWithoutProperties(indexUiState, _excluded$6);
4975
+ if (!ratingMenu) {
4976
+ return indexUiState;
4977
+ }
4978
+ var connectorUiState = Object.keys(ratingMenu).reduce(function (acc, key) {
4979
+ return _objectSpread2(_objectSpread2({}, acc), typeof ratingMenu[key] === 'number' ? _defineProperty({}, key, ratingMenu[key]) : {});
4980
+ }, {});
4981
+ return _objectSpread2(_objectSpread2({}, indexUiStateBase), Object.keys(connectorUiState).length > 0 ? {
4982
+ ratingMenu: connectorUiState
4983
+ } : {});
4984
+ }
4821
4985
 
4822
4986
  var withUsage$g = createDocumentationMessageGenerator({
4823
4987
  name: 'stats',
@@ -5183,6 +5347,7 @@
5183
5347
  };
5184
5348
  };
5185
5349
 
5350
+ var _excluded$7 = ["hierarchicalMenu"];
5186
5351
  var withUsage$i = createDocumentationMessageGenerator({
5187
5352
  name: 'breadcrumb',
5188
5353
  connector: true
@@ -5287,12 +5452,9 @@
5287
5452
  getWidgetUiState: function getWidgetUiState(uiState, _ref3) {
5288
5453
  var searchParameters = _ref3.searchParameters;
5289
5454
  var path = searchParameters.getHierarchicalFacetBreadcrumb(hierarchicalFacetName);
5290
- if (!path.length) {
5291
- return uiState;
5292
- }
5293
- return _objectSpread2(_objectSpread2({}, uiState), {}, {
5455
+ return removeEmptyRefinementsFromUiState$5(_objectSpread2(_objectSpread2({}, uiState), {}, {
5294
5456
  hierarchicalMenu: _objectSpread2(_objectSpread2({}, uiState.hierarchicalMenu), {}, _defineProperty({}, hierarchicalFacetName, path))
5295
- });
5457
+ }));
5296
5458
  },
5297
5459
  getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, _ref4) {
5298
5460
  var uiState = _ref4.uiState;
@@ -5343,6 +5505,19 @@
5343
5505
  };
5344
5506
  });
5345
5507
  }
5508
+ function removeEmptyRefinementsFromUiState$5(indexUiState) {
5509
+ var hierarchicalMenu = indexUiState.hierarchicalMenu,
5510
+ indexUiStateBase = _objectWithoutProperties(indexUiState, _excluded$7);
5511
+ if (!hierarchicalMenu) {
5512
+ return indexUiState;
5513
+ }
5514
+ var connectorUiState = Object.keys(hierarchicalMenu).reduce(function (acc, key) {
5515
+ return _objectSpread2(_objectSpread2({}, acc), hierarchicalMenu[key].length > 0 ? _defineProperty({}, key, hierarchicalMenu[key]) : {});
5516
+ }, {});
5517
+ return _objectSpread2(_objectSpread2({}, indexUiStateBase), Object.keys(connectorUiState).length > 0 ? {
5518
+ hierarchicalMenu: connectorUiState
5519
+ } : {});
5520
+ }
5346
5521
 
5347
5522
  var withUsage$j = createDocumentationMessageGenerator({
5348
5523
  name: 'geo-search',
@@ -12492,11 +12667,11 @@
12492
12667
  return getCookie(ANONYMOUS_TOKEN_COOKIE_KEY);
12493
12668
  }
12494
12669
 
12495
- var _excluded$5 = ["page"];
12670
+ var _excluded$8 = ["page"];
12496
12671
  function getStateWithoutPage$1(state) {
12497
12672
  var _ref = state || {},
12498
12673
  page = _ref.page,
12499
- rest = _objectWithoutProperties(_ref, _excluded$5);
12674
+ rest = _objectWithoutProperties(_ref, _excluded$8);
12500
12675
  return rest;
12501
12676
  }
12502
12677
  var KEY = 'ais.infiniteHits';
@@ -14005,10 +14180,10 @@
14005
14180
  });
14006
14181
  }
14007
14182
 
14008
- var _excluded$6 = ["configure"];
14183
+ var _excluded$9 = ["configure"];
14009
14184
  function getIndexStateWithoutConfigure(uiState) {
14010
14185
  var configure = uiState.configure,
14011
- trackedUiState = _objectWithoutProperties(uiState, _excluded$6);
14186
+ trackedUiState = _objectWithoutProperties(uiState, _excluded$9);
14012
14187
  return trackedUiState;
14013
14188
  }
14014
14189
 
@@ -14093,7 +14268,7 @@
14093
14268
  };
14094
14269
  };
14095
14270
 
14096
- var _excluded$7 = ["initialSearchParameters"];
14271
+ var _excluded$a = ["initialSearchParameters"];
14097
14272
  var withUsage$q = createDocumentationMessageGenerator({
14098
14273
  name: 'index-widget'
14099
14274
  });
@@ -14133,7 +14308,7 @@
14133
14308
  }
14134
14309
  function getLocalWidgetsSearchParameters(widgets, widgetSearchParametersOptions) {
14135
14310
  var initialSearchParameters = widgetSearchParametersOptions.initialSearchParameters,
14136
- rest = _objectWithoutProperties(widgetSearchParametersOptions, _excluded$7);
14311
+ rest = _objectWithoutProperties(widgetSearchParametersOptions, _excluded$a);
14137
14312
  return widgets.filter(function (widget) {
14138
14313
  return !isIndexWidget(widget);
14139
14314
  }).reduce(function (state, widget) {
@@ -14640,7 +14815,7 @@
14640
14815
  };
14641
14816
  }
14642
14817
 
14643
- var version$1 = '4.59.0';
14818
+ var version$1 = '4.61.0';
14644
14819
 
14645
14820
  var withUsage$r = createDocumentationMessageGenerator({
14646
14821
  name: 'instantsearch'
@@ -15068,6 +15243,7 @@
15068
15243
  uiState: this._initialUiState
15069
15244
  });
15070
15245
  if (this._initialResults) {
15246
+ hydrateSearchClient(this.client, this._initialResults);
15071
15247
  var originalScheduleSearch = this.scheduleSearch;
15072
15248
  // We don't schedule a first search when initial results are provided
15073
15249
  // because we already have the results to render. This skips the initial
@@ -15239,10 +15415,10 @@
15239
15415
  history: historyRouter
15240
15416
  });
15241
15417
 
15242
- var _excluded$8 = ["configure"];
15418
+ var _excluded$b = ["configure"];
15243
15419
  function getIndexStateWithoutConfigure$1(uiState) {
15244
15420
  var configure = uiState.configure,
15245
- trackedUiState = _objectWithoutProperties(uiState, _excluded$8);
15421
+ trackedUiState = _objectWithoutProperties(uiState, _excluded$b);
15246
15422
  return trackedUiState;
15247
15423
  }
15248
15424
  function singleIndexStateMapping(indexName) {
@@ -16168,7 +16344,7 @@
16168
16344
 
16169
16345
  var _objectWithoutProperties$1 = unwrapExports(objectWithoutProperties);
16170
16346
 
16171
- var _excluded$9 = ["parts", "highlightedTagName", "nonHighlightedTagName", "separator", "className", "classNames"];
16347
+ var _excluded$c = ["parts", "highlightedTagName", "nonHighlightedTagName", "separator", "className", "classNames"];
16172
16348
 
16173
16349
  function createHighlightPartComponent(_ref) {
16174
16350
  var createElement = _ref.createElement;
@@ -16205,7 +16381,7 @@
16205
16381
  className = userProps.className,
16206
16382
  _userProps$classNames = userProps.classNames,
16207
16383
  classNames = _userProps$classNames === void 0 ? {} : _userProps$classNames,
16208
- props = _objectWithoutProperties$1(userProps, _excluded$9);
16384
+ props = _objectWithoutProperties$1(userProps, _excluded$c);
16209
16385
 
16210
16386
  return createElement("span", _extends$1({}, props, {
16211
16387
  className: cx(classNames.root, className)
@@ -16233,11 +16409,11 @@
16233
16409
  Fragment: p
16234
16410
  });
16235
16411
 
16236
- var _excluded$a = ["classNames"];
16412
+ var _excluded$d = ["classNames"];
16237
16413
  function Highlight(_ref) {
16238
16414
  var _ref$classNames = _ref.classNames,
16239
16415
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
16240
- props = _objectWithoutProperties(_ref, _excluded$a);
16416
+ props = _objectWithoutProperties(_ref, _excluded$d);
16241
16417
  return h(InternalHighlight, _extends({
16242
16418
  classNames: {
16243
16419
  root: cx('ais-Highlight', classNames.root),
@@ -16248,12 +16424,12 @@
16248
16424
  }, props));
16249
16425
  }
16250
16426
 
16251
- var _excluded$b = ["hit", "attribute", "cssClasses"];
16427
+ var _excluded$e = ["hit", "attribute", "cssClasses"];
16252
16428
  function Highlight$1(_ref) {
16253
16429
  var hit = _ref.hit,
16254
16430
  attribute = _ref.attribute,
16255
16431
  cssClasses = _ref.cssClasses,
16256
- props = _objectWithoutProperties(_ref, _excluded$b);
16432
+ props = _objectWithoutProperties(_ref, _excluded$e);
16257
16433
  var property = getPropertyByPath(hit._highlightResult, attribute) || [];
16258
16434
  var properties = toArray(property);
16259
16435
  _warning(Boolean(properties.length), "Could not enable highlight for \"".concat(attribute.toString(), "\", will display an empty string.\nPlease check whether this attribute exists and is either searchable or specified in `attributesToHighlight`.\n\nSee: https://alg.li/highlighting\n")) ;
@@ -16267,11 +16443,11 @@
16267
16443
  }));
16268
16444
  }
16269
16445
 
16270
- var _excluded$c = ["classNames"];
16446
+ var _excluded$f = ["classNames"];
16271
16447
  function ReverseHighlight(_ref) {
16272
16448
  var _ref$classNames = _ref.classNames,
16273
16449
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
16274
- props = _objectWithoutProperties(_ref, _excluded$c);
16450
+ props = _objectWithoutProperties(_ref, _excluded$f);
16275
16451
  return h(InternalHighlight, _extends({
16276
16452
  classNames: {
16277
16453
  root: cx('ais-ReverseHighlight', classNames.root),
@@ -16282,13 +16458,13 @@
16282
16458
  }, props));
16283
16459
  }
16284
16460
 
16285
- var _excluded$d = ["hit", "attribute", "cssClasses"],
16286
- _excluded2$2 = ["isHighlighted"];
16461
+ var _excluded$g = ["hit", "attribute", "cssClasses"],
16462
+ _excluded2$4 = ["isHighlighted"];
16287
16463
  function ReverseHighlight$1(_ref) {
16288
16464
  var hit = _ref.hit,
16289
16465
  attribute = _ref.attribute,
16290
16466
  cssClasses = _ref.cssClasses,
16291
- props = _objectWithoutProperties(_ref, _excluded$d);
16467
+ props = _objectWithoutProperties(_ref, _excluded$g);
16292
16468
  var property = getPropertyByPath(hit._highlightResult, attribute) || [];
16293
16469
  var properties = toArray(property);
16294
16470
  _warning(Boolean(properties.length), "Could not enable highlight for \"".concat(attribute.toString(), "\", will display an empty string.\nPlease check whether this attribute exists and is either searchable or specified in `attributesToHighlight`.\n\nSee: https://alg.li/highlighting\n")) ;
@@ -16296,7 +16472,7 @@
16296
16472
  var value = _ref2.value;
16297
16473
  return getHighlightedParts(unescape$1(value || '')).map(function (_ref3) {
16298
16474
  var isHighlighted = _ref3.isHighlighted,
16299
- rest = _objectWithoutProperties(_ref3, _excluded2$2);
16475
+ rest = _objectWithoutProperties(_ref3, _excluded2$4);
16300
16476
  return _objectSpread2(_objectSpread2({}, rest), {}, {
16301
16477
  isHighlighted: !isHighlighted
16302
16478
  });
@@ -16308,11 +16484,11 @@
16308
16484
  }));
16309
16485
  }
16310
16486
 
16311
- var _excluded$e = ["classNames"];
16487
+ var _excluded$h = ["classNames"];
16312
16488
  function ReverseSnippet(_ref) {
16313
16489
  var _ref$classNames = _ref.classNames,
16314
16490
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
16315
- props = _objectWithoutProperties(_ref, _excluded$e);
16491
+ props = _objectWithoutProperties(_ref, _excluded$h);
16316
16492
  return h(InternalHighlight, _extends({
16317
16493
  classNames: {
16318
16494
  root: cx('ais-ReverseSnippet', classNames.root),
@@ -16323,13 +16499,13 @@
16323
16499
  }, props));
16324
16500
  }
16325
16501
 
16326
- var _excluded$f = ["hit", "attribute", "cssClasses"],
16327
- _excluded2$3 = ["isHighlighted"];
16502
+ var _excluded$i = ["hit", "attribute", "cssClasses"],
16503
+ _excluded2$5 = ["isHighlighted"];
16328
16504
  function ReverseSnippet$1(_ref) {
16329
16505
  var hit = _ref.hit,
16330
16506
  attribute = _ref.attribute,
16331
16507
  cssClasses = _ref.cssClasses,
16332
- props = _objectWithoutProperties(_ref, _excluded$f);
16508
+ props = _objectWithoutProperties(_ref, _excluded$i);
16333
16509
  var property = getPropertyByPath(hit._snippetResult, attribute) || [];
16334
16510
  var properties = toArray(property);
16335
16511
  _warning(Boolean(properties.length), "Could not enable snippet for \"".concat(attribute.toString(), "\", will display an empty string.\nPlease check whether this attribute exists and is specified in `attributesToSnippet`.\n\nSee: https://alg.li/highlighting\n")) ;
@@ -16337,7 +16513,7 @@
16337
16513
  var value = _ref2.value;
16338
16514
  return getHighlightedParts(unescape$1(value || '')).map(function (_ref3) {
16339
16515
  var isHighlighted = _ref3.isHighlighted,
16340
- rest = _objectWithoutProperties(_ref3, _excluded2$3);
16516
+ rest = _objectWithoutProperties(_ref3, _excluded2$5);
16341
16517
  return _objectSpread2(_objectSpread2({}, rest), {}, {
16342
16518
  isHighlighted: !isHighlighted
16343
16519
  });
@@ -16349,11 +16525,11 @@
16349
16525
  }));
16350
16526
  }
16351
16527
 
16352
- var _excluded$g = ["classNames"];
16528
+ var _excluded$j = ["classNames"];
16353
16529
  function Snippet(_ref) {
16354
16530
  var _ref$classNames = _ref.classNames,
16355
16531
  classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
16356
- props = _objectWithoutProperties(_ref, _excluded$g);
16532
+ props = _objectWithoutProperties(_ref, _excluded$j);
16357
16533
  return h(InternalHighlight, _extends({
16358
16534
  classNames: {
16359
16535
  root: cx('ais-Snippet', classNames.root),
@@ -16364,12 +16540,12 @@
16364
16540
  }, props));
16365
16541
  }
16366
16542
 
16367
- var _excluded$h = ["hit", "attribute", "cssClasses"];
16543
+ var _excluded$k = ["hit", "attribute", "cssClasses"];
16368
16544
  function Snippet$1(_ref) {
16369
16545
  var hit = _ref.hit,
16370
16546
  attribute = _ref.attribute,
16371
16547
  cssClasses = _ref.cssClasses,
16372
- props = _objectWithoutProperties(_ref, _excluded$h);
16548
+ props = _objectWithoutProperties(_ref, _excluded$k);
16373
16549
  var property = getPropertyByPath(hit._snippetResult, attribute) || [];
16374
16550
  var properties = toArray(property);
16375
16551
  _warning(Boolean(properties.length), "Could not enable snippet for \"".concat(attribute.toString(), "\", will display an empty string.\nPlease check whether this attribute exists and is specified in `attributesToSnippet`.\n\nSee: https://alg.li/highlighting\n")) ;
@@ -16640,7 +16816,7 @@
16640
16816
  });
16641
16817
  };
16642
16818
 
16643
- var _excluded$i = ["container", "widgets", "fallbackWidget"];
16819
+ var _excluded$l = ["container", "widgets", "fallbackWidget"];
16644
16820
  var withUsage$t = createDocumentationMessageGenerator({
16645
16821
  name: 'dynamic-widgets'
16646
16822
  });
@@ -16658,7 +16834,7 @@
16658
16834
  containerSelector = _ref.container,
16659
16835
  widgets = _ref.widgets,
16660
16836
  fallbackWidget = _ref.fallbackWidget,
16661
- otherWidgetParams = _objectWithoutProperties(_ref, _excluded$i);
16837
+ otherWidgetParams = _objectWithoutProperties(_ref, _excluded$l);
16662
16838
  if (!containerSelector) {
16663
16839
  throw new Error(withUsage$t('The `container` option is required.'));
16664
16840
  }
@@ -17632,9 +17808,9 @@
17632
17808
  }), container.querySelector(".".concat(cssClasses.tree)));
17633
17809
  };
17634
17810
 
17635
- var _excluded$j = ["initialZoom", "initialPosition", "templates", "cssClasses", "builtInMarker", "customHTMLMarker", "enableRefine", "enableClearMapRefinement", "enableRefineControl", "container", "googleReference"],
17636
- _excluded2$4 = ["item"],
17637
- _excluded3 = ["item"];
17811
+ var _excluded$m = ["initialZoom", "initialPosition", "templates", "cssClasses", "builtInMarker", "customHTMLMarker", "enableRefine", "enableClearMapRefinement", "enableRefineControl", "container", "googleReference"],
17812
+ _excluded2$6 = ["item"],
17813
+ _excluded3$1 = ["item"];
17638
17814
  var withUsage$y = createDocumentationMessageGenerator({
17639
17815
  name: 'geo-search'
17640
17816
  });
@@ -17676,7 +17852,7 @@
17676
17852
  enableRefineControl = _ref$enableRefineCont === void 0 ? true : _ref$enableRefineCont,
17677
17853
  container = _ref.container,
17678
17854
  googleReference = _ref.googleReference,
17679
- otherWidgetParams = _objectWithoutProperties(_ref, _excluded$j);
17855
+ otherWidgetParams = _objectWithoutProperties(_ref, _excluded$m);
17680
17856
  var defaultBuiltInMarker = {
17681
17857
  createOptions: function createOptions() {
17682
17858
  return {};
@@ -17735,7 +17911,7 @@
17735
17911
  var customHTMLMarker = isCustomHTMLMarker && _objectSpread2(_objectSpread2({}, defaultCustomHTMLMarker), userCustomHTMLMarker);
17736
17912
  var createBuiltInMarker = function createBuiltInMarker(_ref2) {
17737
17913
  var item = _ref2.item,
17738
- rest = _objectWithoutProperties(_ref2, _excluded2$4);
17914
+ rest = _objectWithoutProperties(_ref2, _excluded2$6);
17739
17915
  return new googleReference.maps.Marker(_objectSpread2(_objectSpread2(_objectSpread2({}, builtInMarker.createOptions(item)), rest), {}, {
17740
17916
  // @ts-expect-error @types/googlemaps doesn't document this
17741
17917
  __id: item.objectID,
@@ -17745,7 +17921,7 @@
17745
17921
  var HTMLMarker = createHTMLMarker(googleReference);
17746
17922
  var createCustomHTMLMarker = function createCustomHTMLMarker(_ref3) {
17747
17923
  var item = _ref3.item,
17748
- rest = _objectWithoutProperties(_ref3, _excluded3);
17924
+ rest = _objectWithoutProperties(_ref3, _excluded3$1);
17749
17925
  return new HTMLMarker(_objectSpread2(_objectSpread2(_objectSpread2({}, customHTMLMarker.createOptions(item)), rest), {}, {
17750
17926
  __id: item.objectID,
17751
17927
  position: item._geoloc,
@@ -17944,7 +18120,7 @@
17944
18120
  rootProps: {
17945
18121
  className: cssClasses.submit,
17946
18122
  type: 'submit',
17947
- title: 'Submit the search query.',
18123
+ title: 'Submit the search query',
17948
18124
  hidden: !showSubmit
17949
18125
  },
17950
18126
  templates: templates,
@@ -17957,7 +18133,7 @@
17957
18133
  rootProps: {
17958
18134
  className: cssClasses.reset,
17959
18135
  type: 'reset',
17960
- title: 'Clear the search query.',
18136
+ title: 'Clear the search query',
17961
18137
  hidden: !(showReset && this.state.query.trim() && !isSearchStalled)
17962
18138
  },
17963
18139
  templates: templates,
@@ -18006,7 +18182,7 @@
18006
18182
  })), subItems);
18007
18183
  }
18008
18184
 
18009
- var _excluded$k = ["root"];
18185
+ var _excluded$n = ["root"];
18010
18186
 
18011
18187
  // CSS types
18012
18188
 
@@ -18033,7 +18209,7 @@
18033
18209
  if (isHierarchicalMenuItem(facetValue) && Array.isArray(facetValue.data) && facetValue.data.length > 0) {
18034
18210
  var _this$props$cssClasse = _this.props.cssClasses,
18035
18211
  root = _this$props$cssClasse.root,
18036
- cssClasses = _objectWithoutProperties(_this$props$cssClasse, _excluded$k);
18212
+ cssClasses = _objectWithoutProperties(_this$props$cssClasse, _excluded$n);
18037
18213
  subItems = h(RefinementList, _extends({}, _this.props, {
18038
18214
  // We want to keep `root` required for external usage but not for the
18039
18215
  // sub items.
@@ -19689,8 +19865,8 @@
19689
19865
  };
19690
19866
  };
19691
19867
 
19692
- var _excluded$l = ["placesReference", "defaultPosition"],
19693
- _excluded2$5 = ["places"];
19868
+ var _excluded$o = ["placesReference", "defaultPosition"],
19869
+ _excluded2$7 = ["places"];
19694
19870
  /* Places.js is an optional dependency, no error should be reported if the package is missing */
19695
19871
  /** @ts-ignore */
19696
19872
  // using the type like this requires only one ts-ignore
@@ -19703,7 +19879,7 @@
19703
19879
  placesReference = _ref.placesReference,
19704
19880
  _ref$defaultPosition = _ref.defaultPosition,
19705
19881
  defaultPosition = _ref$defaultPosition === void 0 ? [] : _ref$defaultPosition,
19706
- placesOptions = _objectWithoutProperties(_ref, _excluded$l);
19882
+ placesOptions = _objectWithoutProperties(_ref, _excluded$o);
19707
19883
  if (typeof placesReference !== 'function') {
19708
19884
  throw new Error('The `placesReference` option requires a valid Places.js reference.');
19709
19885
  }
@@ -19744,7 +19920,7 @@
19744
19920
  var hasPositionSet = position !== defaultPosition.join(',');
19745
19921
  if (!hasPositionSet && !state.query) {
19746
19922
  var places = uiState.places,
19747
- uiStateWithoutPlaces = _objectWithoutProperties(uiState, _excluded2$5);
19923
+ uiStateWithoutPlaces = _objectWithoutProperties(uiState, _excluded2$7);
19748
19924
  return uiStateWithoutPlaces;
19749
19925
  }
19750
19926
  return _objectSpread2(_objectSpread2({}, uiState), {}, {
@@ -21161,12 +21337,12 @@
21161
21337
  });
21162
21338
  var _ref6$1 = h("g", {
21163
21339
  fill: "none",
21164
- fillRule: "evenodd"
21340
+ "fill-rule": "evenodd"
21165
21341
  }, h("g", {
21166
21342
  transform: "translate(1 1)",
21167
- strokeWidth: "2"
21343
+ "stroke-width": "2"
21168
21344
  }, h("circle", {
21169
- strokeOpacity: ".5",
21345
+ "stroke-opacity": ".5",
21170
21346
  cx: "18",
21171
21347
  cy: "18",
21172
21348
  r: "18"
@@ -21203,7 +21379,12 @@
21203
21379
  },
21204
21380
  loadingIndicator: function loadingIndicator(_ref5) {
21205
21381
  var cssClasses = _ref5.cssClasses;
21382
+ /* eslint-disable react/no-unknown-property */
21383
+ // Preact supports kebab case attributes, and using camel case would
21384
+ // require using `preact/compat`.
21385
+ // @TODO: reconsider using the `react` ESLint preset
21206
21386
  return h("svg", {
21387
+ "aria-label": "Results are loading",
21207
21388
  className: cssClasses.loadingIcon,
21208
21389
  width: "16",
21209
21390
  height: "16",
@@ -21211,6 +21392,7 @@
21211
21392
  stroke: "#444",
21212
21393
  "aria-hidden": "true"
21213
21394
  }, _ref6$1);
21395
+ /* eslint-enable react/no-unknown-property */
21214
21396
  }
21215
21397
  };
21216
21398
 
@@ -21735,13 +21917,13 @@
21735
21917
  });
21736
21918
  };
21737
21919
 
21738
- var _excluded$m = ["nbHits", "nbSortedHits", "cssClasses", "templateProps"];
21920
+ var _excluded$p = ["nbHits", "nbSortedHits", "cssClasses", "templateProps"];
21739
21921
  var Stats = function Stats(_ref) {
21740
21922
  var nbHits = _ref.nbHits,
21741
21923
  nbSortedHits = _ref.nbSortedHits,
21742
21924
  cssClasses = _ref.cssClasses,
21743
21925
  templateProps = _ref.templateProps,
21744
- rest = _objectWithoutProperties(_ref, _excluded$m);
21926
+ rest = _objectWithoutProperties(_ref, _excluded$p);
21745
21927
  return h("div", {
21746
21928
  className: cx(cssClasses.root)
21747
21929
  }, h(Template, _extends({}, templateProps, {