instantsearch.js 4.36.0 → 4.37.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.
- package/CHANGELOG.md +38 -0
- package/cjs/components/Answers/Answers.js +1 -1
- package/cjs/components/Breadcrumb/Breadcrumb.js +1 -1
- package/cjs/components/ClearRefinements/ClearRefinements.js +1 -1
- package/cjs/components/CurrentRefinements/CurrentRefinements.js +3 -3
- package/cjs/components/GeoSearchControls/GeoSearchControls.js +3 -3
- package/cjs/components/Hits/Hits.js +1 -7
- package/cjs/components/InfiniteHits/InfiniteHits.js +1 -1
- package/cjs/components/MenuSelect/MenuSelect.js +3 -3
- package/cjs/components/Pagination/Pagination.js +89 -160
- package/cjs/components/Panel/Panel.js +1 -1
- package/cjs/components/QueryRuleCustomData/QueryRuleCustomData.js +1 -1
- package/cjs/components/RangeInput/RangeInput.js +1 -1
- package/cjs/components/RefinementList/RefinementList.js +6 -6
- package/cjs/components/RefinementList/RefinementListItem.js +1 -1
- package/cjs/components/RelevantSort/RelevantSort.js +1 -1
- package/cjs/components/SearchBox/SearchBox.js +9 -10
- package/cjs/components/Slider/Slider.js +5 -5
- package/cjs/components/Stats/Stats.js +1 -1
- package/cjs/components/Template/Template.js +3 -3
- package/cjs/components/ToggleRefinement/ToggleRefinement.js +1 -1
- package/cjs/components/VoiceSearch/VoiceSearch.js +1 -1
- package/cjs/connectors/answers/connectAnswers.js +10 -10
- package/cjs/connectors/autocomplete/connectAutocomplete.js +9 -9
- package/cjs/connectors/breadcrumb/connectBreadcrumb.js +12 -7
- package/cjs/connectors/clear-refinements/connectClearRefinements.js +9 -9
- package/cjs/connectors/configure/connectConfigure.js +8 -8
- package/cjs/connectors/configure-related-items/connectConfigureRelatedItems.js +5 -5
- package/cjs/connectors/current-refinements/connectCurrentRefinements.js +6 -6
- package/cjs/connectors/dynamic-widgets/connectDynamicWidgets.js +7 -7
- package/cjs/connectors/geo-search/connectGeoSearch.js +11 -11
- package/cjs/connectors/hierarchical-menu/connectHierarchicalMenu.js +6 -6
- package/cjs/connectors/hits/connectHits.js +11 -11
- package/cjs/connectors/hits/connectHitsWithInsights.js +3 -3
- package/cjs/connectors/hits-per-page/connectHitsPerPage.js +6 -6
- package/cjs/connectors/index.js +31 -31
- package/cjs/connectors/infinite-hits/connectInfiniteHits.js +12 -12
- package/cjs/connectors/infinite-hits/connectInfiniteHitsWithInsights.js +3 -3
- package/cjs/connectors/menu/connectMenu.js +5 -5
- package/cjs/connectors/numeric-menu/connectNumericMenu.js +7 -7
- package/cjs/connectors/pagination/Paginator.js +3 -3
- package/cjs/connectors/pagination/connectPagination.js +5 -5
- package/cjs/connectors/powered-by/connectPoweredBy.js +5 -5
- package/cjs/connectors/query-rules/connectQueryRules.js +7 -7
- package/cjs/connectors/range/connectRange.js +27 -27
- package/cjs/connectors/rating-menu/connectRatingMenu.js +6 -6
- package/cjs/connectors/refinement-list/connectRefinementList.js +8 -8
- package/cjs/connectors/relevant-sort/connectRelevantSort.js +3 -3
- package/cjs/connectors/search-box/connectSearchBox.js +19 -29
- package/cjs/connectors/sort-by/connectSortBy.js +6 -6
- package/cjs/connectors/stats/connectStats.js +4 -4
- package/cjs/connectors/toggle-refinement/connectToggleRefinement.js +11 -11
- package/cjs/connectors/voice-search/connectVoiceSearch.js +6 -6
- package/cjs/helpers/get-insights-anonymous-user-token.js +2 -2
- package/cjs/helpers/highlight.js +7 -4
- package/cjs/helpers/index.js +6 -6
- package/cjs/helpers/insights.js +4 -4
- package/cjs/helpers/reverseHighlight.js +8 -5
- package/cjs/helpers/reverseSnippet.js +8 -5
- package/cjs/helpers/snippet.js +7 -4
- package/cjs/index.js +9 -9
- package/cjs/lib/InstantSearch.js +32 -27
- package/cjs/lib/createHelpers.js +6 -6
- package/cjs/lib/infiniteHitsCache/index.js +1 -1
- package/cjs/lib/infiniteHitsCache/sessionStorage.js +4 -4
- package/cjs/lib/insights/client.js +5 -5
- package/cjs/lib/insights/index.js +2 -2
- package/cjs/lib/insights/listener.js +3 -3
- package/cjs/lib/routers/history.js +6 -6
- package/cjs/lib/routers/index.js +1 -1
- package/cjs/lib/stateMappings/index.js +2 -2
- package/cjs/lib/utils/checkIndexUiState.js +3 -3
- package/cjs/lib/utils/checkRendering.js +1 -1
- package/cjs/lib/utils/concatHighlightedParts.js +1 -1
- package/cjs/lib/utils/createSendEventForFacet.js +1 -1
- package/cjs/lib/utils/createSendEventForHits.js +1 -1
- package/cjs/lib/utils/detect-insights-client.js +1 -1
- package/cjs/lib/utils/escape-highlight.js +2 -2
- package/cjs/lib/utils/getContainerNode.js +1 -1
- package/cjs/lib/utils/getHighlightFromSiblings.js +1 -1
- package/cjs/lib/utils/getHighlightedParts.js +1 -1
- package/cjs/lib/utils/getRefinements.js +2 -2
- package/cjs/lib/utils/index.js +48 -48
- package/cjs/lib/utils/logger.js +1 -1
- package/cjs/lib/utils/mergeSearchParameters.js +2 -2
- package/cjs/lib/utils/prepareTemplateProps.js +1 -1
- package/cjs/lib/utils/reverseHighlightedParts.js +1 -1
- package/cjs/lib/version.js +1 -1
- package/cjs/middlewares/createInsightsMiddleware.js +11 -11
- package/cjs/middlewares/createMetadataMiddleware.js +2 -2
- package/cjs/middlewares/createRouterMiddleware.js +4 -4
- package/cjs/middlewares/index.js +3 -3
- package/cjs/types/index.js +14 -14
- package/cjs/widgets/analytics/analytics.js +3 -3
- package/cjs/widgets/answers/answers.js +8 -8
- package/cjs/widgets/breadcrumb/breadcrumb.js +8 -8
- package/cjs/widgets/clear-refinements/clear-refinements.js +8 -8
- package/cjs/widgets/configure/configure.js +3 -3
- package/cjs/widgets/configure-related-items/configure-related-items.js +3 -3
- package/cjs/widgets/current-refinements/current-refinements.js +6 -6
- package/cjs/widgets/dynamic-widgets/dynamic-widgets.js +6 -6
- package/cjs/widgets/geo-search/GeoSearchRenderer.js +3 -3
- package/cjs/widgets/geo-search/geo-search.js +9 -9
- package/cjs/widgets/hierarchical-menu/hierarchical-menu.js +8 -8
- package/cjs/widgets/hits/hits.js +11 -11
- package/cjs/widgets/hits-per-page/hits-per-page.js +7 -7
- package/cjs/widgets/index/index.js +6 -6
- package/cjs/widgets/index.js +36 -36
- package/cjs/widgets/infinite-hits/infinite-hits.js +11 -11
- package/cjs/widgets/menu/menu.js +8 -8
- package/cjs/widgets/menu-select/menu-select.js +8 -8
- package/cjs/widgets/numeric-menu/numeric-menu.js +8 -8
- package/cjs/widgets/pagination/pagination.js +7 -7
- package/cjs/widgets/panel/panel.js +7 -7
- package/cjs/widgets/powered-by/powered-by.js +6 -6
- package/cjs/widgets/query-rule-context/query-rule-context.js +4 -4
- package/cjs/widgets/query-rule-custom-data/query-rule-custom-data.js +6 -6
- package/cjs/widgets/range-input/range-input.js +7 -7
- package/cjs/widgets/range-slider/range-slider.js +6 -6
- package/cjs/widgets/rating-menu/rating-menu.js +8 -8
- package/cjs/widgets/refinement-list/refinement-list.js +10 -10
- package/cjs/widgets/relevant-sort/relevant-sort.js +7 -7
- package/cjs/widgets/search-box/search-box.js +7 -7
- package/cjs/widgets/sort-by/sort-by.js +6 -6
- package/cjs/widgets/stats/defaultTemplates.js +1 -1
- package/cjs/widgets/stats/stats.js +7 -7
- package/cjs/widgets/toggle-refinement/toggle-refinement.js +8 -8
- package/cjs/widgets/voice-search/voice-search.js +7 -7
- package/dist/instantsearch.development.d.ts +36 -7
- package/dist/instantsearch.development.js +326 -406
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.development.min.d.ts +36 -7
- package/dist/instantsearch.production.d.ts +36 -7
- package/dist/instantsearch.production.min.d.ts +36 -7
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/components/Answers/Answers.js +1 -1
- package/es/components/Breadcrumb/Breadcrumb.js +1 -1
- package/es/components/ClearRefinements/ClearRefinements.js +1 -1
- package/es/components/CurrentRefinements/CurrentRefinements.js +1 -1
- package/es/components/GeoSearchControls/GeoSearchControls.js +3 -3
- package/es/components/Hits/Hits.d.ts +1 -9
- package/es/components/Hits/Hits.js +1 -7
- package/es/components/InfiniteHits/InfiniteHits.js +1 -1
- package/es/components/MenuSelect/MenuSelect.js +2 -2
- package/es/components/Pagination/Pagination.d.ts +5 -19
- package/es/components/Pagination/Pagination.js +89 -158
- package/es/components/Panel/Panel.js +1 -1
- package/es/components/QueryRuleCustomData/QueryRuleCustomData.js +1 -1
- package/es/components/RangeInput/RangeInput.js +1 -1
- package/es/components/RefinementList/RefinementList.js +4 -4
- package/es/components/RefinementList/RefinementListItem.js +1 -1
- package/es/components/RelevantSort/RelevantSort.js +1 -1
- package/es/components/SearchBox/SearchBox.js +5 -6
- package/es/components/Slider/Slider.js +3 -3
- package/es/components/Stats/Stats.js +1 -1
- package/es/components/Template/Template.js +1 -1
- package/es/components/ToggleRefinement/ToggleRefinement.js +1 -1
- package/es/components/VoiceSearch/VoiceSearch.js +1 -1
- package/es/connectors/answers/connectAnswers.js +1 -1
- package/es/connectors/autocomplete/connectAutocomplete.js +1 -1
- package/es/connectors/breadcrumb/connectBreadcrumb.js +8 -3
- package/es/connectors/clear-refinements/connectClearRefinements.js +1 -1
- package/es/connectors/configure/connectConfigure.js +1 -1
- package/es/connectors/configure-related-items/connectConfigureRelatedItems.js +2 -2
- package/es/connectors/current-refinements/connectCurrentRefinements.js +1 -1
- package/es/connectors/dynamic-widgets/connectDynamicWidgets.js +1 -1
- package/es/connectors/geo-search/connectGeoSearch.js +1 -1
- package/es/connectors/hierarchical-menu/connectHierarchicalMenu.js +1 -1
- package/es/connectors/hits/connectHits.js +1 -1
- package/es/connectors/hits/connectHitsWithInsights.js +2 -2
- package/es/connectors/hits-per-page/connectHitsPerPage.js +1 -1
- package/es/connectors/index.js +30 -30
- package/es/connectors/infinite-hits/connectInfiniteHits.js +1 -1
- package/es/connectors/infinite-hits/connectInfiniteHitsWithInsights.js +2 -2
- package/es/connectors/menu/connectMenu.js +1 -1
- package/es/connectors/numeric-menu/connectNumericMenu.js +1 -1
- package/es/connectors/pagination/Paginator.js +1 -1
- package/es/connectors/pagination/connectPagination.js +2 -2
- package/es/connectors/powered-by/connectPoweredBy.js +1 -1
- package/es/connectors/query-rules/connectQueryRules.js +1 -1
- package/es/connectors/range/connectRange.js +1 -1
- package/es/connectors/rating-menu/connectRatingMenu.js +1 -1
- package/es/connectors/refinement-list/connectRefinementList.js +1 -1
- package/es/connectors/relevant-sort/connectRelevantSort.js +1 -1
- package/es/connectors/search-box/connectSearchBox.js +16 -26
- package/es/connectors/sort-by/connectSortBy.js +1 -1
- package/es/connectors/stats/connectStats.js +1 -1
- package/es/connectors/toggle-refinement/connectToggleRefinement.d.ts +36 -7
- package/es/connectors/toggle-refinement/connectToggleRefinement.js +1 -1
- package/es/connectors/voice-search/connectVoiceSearch.js +2 -2
- package/es/helpers/get-insights-anonymous-user-token.js +1 -1
- package/es/helpers/highlight.js +6 -3
- package/es/helpers/index.js +10 -10
- package/es/helpers/insights.js +1 -1
- package/es/helpers/reverseHighlight.js +6 -3
- package/es/helpers/reverseSnippet.js +6 -3
- package/es/helpers/snippet.js +6 -3
- package/es/index.js +6 -6
- package/es/lib/InstantSearch.js +15 -10
- package/es/lib/createHelpers.js +1 -1
- package/es/lib/infiniteHitsCache/index.js +1 -1
- package/es/lib/infiniteHitsCache/sessionStorage.js +1 -1
- package/es/lib/insights/client.js +1 -1
- package/es/lib/insights/index.js +2 -2
- package/es/lib/insights/listener.js +2 -2
- package/es/lib/routers/history.js +1 -1
- package/es/lib/routers/index.js +1 -1
- package/es/lib/stateMappings/index.js +2 -2
- package/es/lib/utils/checkIndexUiState.js +3 -3
- package/es/lib/utils/checkRendering.js +1 -1
- package/es/lib/utils/concatHighlightedParts.js +1 -1
- package/es/lib/utils/createSendEventForFacet.js +1 -1
- package/es/lib/utils/createSendEventForHits.js +1 -1
- package/es/lib/utils/detect-insights-client.js +1 -1
- package/es/lib/utils/escape-highlight.js +2 -2
- package/es/lib/utils/getContainerNode.js +1 -1
- package/es/lib/utils/getHighlightFromSiblings.js +1 -1
- package/es/lib/utils/getHighlightedParts.js +1 -1
- package/es/lib/utils/getRefinements.js +2 -2
- package/es/lib/utils/index.js +48 -48
- package/es/lib/utils/logger.js +1 -1
- package/es/lib/utils/mergeSearchParameters.js +2 -2
- package/es/lib/utils/prepareTemplateProps.js +1 -1
- package/es/lib/utils/reverseHighlightedParts.js +1 -1
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/middlewares/createInsightsMiddleware.js +3 -3
- package/es/middlewares/createMetadataMiddleware.js +1 -1
- package/es/middlewares/createRouterMiddleware.js +3 -3
- package/es/middlewares/index.js +3 -3
- package/es/package.json +1 -0
- package/es/types/index.js +14 -14
- package/es/widgets/analytics/analytics.js +1 -1
- package/es/widgets/answers/answers.js +5 -5
- package/es/widgets/breadcrumb/breadcrumb.js +5 -5
- package/es/widgets/clear-refinements/clear-refinements.js +5 -5
- package/es/widgets/configure/configure.js +2 -2
- package/es/widgets/configure-related-items/configure-related-items.js +2 -2
- package/es/widgets/current-refinements/current-refinements.js +4 -4
- package/es/widgets/dynamic-widgets/dynamic-widgets.js +3 -3
- package/es/widgets/geo-search/GeoSearchRenderer.js +2 -2
- package/es/widgets/geo-search/geo-search.js +6 -6
- package/es/widgets/hierarchical-menu/hierarchical-menu.js +5 -5
- package/es/widgets/hits/hits.js +6 -6
- package/es/widgets/hits-per-page/hits-per-page.js +4 -4
- package/es/widgets/index/index.js +1 -1
- package/es/widgets/index.js +34 -34
- package/es/widgets/infinite-hits/infinite-hits.js +6 -6
- package/es/widgets/menu/menu.js +5 -5
- package/es/widgets/menu-select/menu-select.js +5 -5
- package/es/widgets/numeric-menu/numeric-menu.js +5 -5
- package/es/widgets/pagination/pagination.js +4 -4
- package/es/widgets/panel/panel.js +3 -3
- package/es/widgets/powered-by/powered-by.js +4 -4
- package/es/widgets/query-rule-context/query-rule-context.js +2 -2
- package/es/widgets/query-rule-custom-data/query-rule-custom-data.js +4 -4
- package/es/widgets/range-input/range-input.js +4 -4
- package/es/widgets/range-slider/range-slider.js +4 -4
- package/es/widgets/rating-menu/rating-menu.js +5 -5
- package/es/widgets/refinement-list/refinement-list.js +6 -6
- package/es/widgets/relevant-sort/relevant-sort.js +5 -5
- package/es/widgets/search-box/search-box.js +5 -5
- package/es/widgets/sort-by/sort-by.js +4 -4
- package/es/widgets/stats/defaultTemplates.js +1 -1
- package/es/widgets/stats/stats.js +4 -4
- package/es/widgets/toggle-refinement/toggle-refinement.js +5 -5
- package/es/widgets/voice-search/voice-search.js +5 -5
- package/package.json +6 -5
- package/cjs/components/Pagination/PaginationLink.js +0 -47
- package/es/components/Pagination/PaginationLink.d.ts +0 -17
- package/es/components/Pagination/PaginationLink.js +0 -39
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! InstantSearch.js 4.
|
|
1
|
+
/*! InstantSearch.js 4.37.3 | © Algolia, Inc. and contributors; MIT License | https://github.com/algolia/instantsearch.js */
|
|
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) :
|
|
@@ -8483,7 +8483,7 @@
|
|
|
8483
8483
|
instantSearchInstance.renderState = _objectSpread2(_objectSpread2({}, instantSearchInstance.renderState), {}, _defineProperty({}, parentIndexName, _objectSpread2(_objectSpread2({}, instantSearchInstance.renderState[parentIndexName]), renderState)));
|
|
8484
8484
|
}
|
|
8485
8485
|
|
|
8486
|
-
var version$1 = '4.
|
|
8486
|
+
var version$1 = '4.37.3';
|
|
8487
8487
|
|
|
8488
8488
|
var NAMESPACE = 'ais';
|
|
8489
8489
|
var component = function component(componentName) {
|
|
@@ -8506,8 +8506,11 @@
|
|
|
8506
8506
|
hit = _ref.hit,
|
|
8507
8507
|
_ref$cssClasses = _ref.cssClasses,
|
|
8508
8508
|
cssClasses = _ref$cssClasses === void 0 ? {} : _ref$cssClasses;
|
|
8509
|
+
var highlightAttributeResult = getPropertyByPath(hit._highlightResult, attribute); // @MAJOR fallback to attribute value if highlight is not found
|
|
8509
8510
|
|
|
8510
|
-
|
|
8511
|
+
_warning(highlightAttributeResult, "Could not enable highlight for \"".concat(attribute, "\", 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")) ;
|
|
8512
|
+
|
|
8513
|
+
var _ref2 = highlightAttributeResult || {},
|
|
8511
8514
|
_ref2$value = _ref2.value,
|
|
8512
8515
|
attributeValue = _ref2$value === void 0 ? '' : _ref2$value; // cx is not used, since it would be bundled as a dependency for Vue & Angular
|
|
8513
8516
|
|
|
@@ -8526,8 +8529,11 @@
|
|
|
8526
8529
|
hit = _ref.hit,
|
|
8527
8530
|
_ref$cssClasses = _ref.cssClasses,
|
|
8528
8531
|
cssClasses = _ref$cssClasses === void 0 ? {} : _ref$cssClasses;
|
|
8532
|
+
var highlightAttributeResult = getPropertyByPath(hit._highlightResult, attribute); // @MAJOR fallback to attribute value if highlight is not found
|
|
8533
|
+
|
|
8534
|
+
_warning(highlightAttributeResult, "Could not enable reverse highlight for \"".concat(attribute, "\", 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")) ;
|
|
8529
8535
|
|
|
8530
|
-
var _ref2 =
|
|
8536
|
+
var _ref2 = highlightAttributeResult || {},
|
|
8531
8537
|
_ref2$value = _ref2.value,
|
|
8532
8538
|
attributeValue = _ref2$value === void 0 ? '' : _ref2$value; // cx is not used, since it would be bundled as a dependency for Vue & Angular
|
|
8533
8539
|
|
|
@@ -8547,8 +8553,11 @@
|
|
|
8547
8553
|
hit = _ref.hit,
|
|
8548
8554
|
_ref$cssClasses = _ref.cssClasses,
|
|
8549
8555
|
cssClasses = _ref$cssClasses === void 0 ? {} : _ref$cssClasses;
|
|
8556
|
+
var snippetAttributeResult = getPropertyByPath(hit._snippetResult, attribute); // @MAJOR fallback to attribute value if snippet is not found
|
|
8550
8557
|
|
|
8551
|
-
|
|
8558
|
+
_warning(snippetAttributeResult, "Could not enable snippet for \"".concat(attribute, "\", will display an empty string.\nPlease check whether this attribute exists and is specified in `attributesToSnippet`.\n\nSee: https://alg.li/highlighting\n")) ;
|
|
8559
|
+
|
|
8560
|
+
var _ref2 = snippetAttributeResult || {},
|
|
8552
8561
|
_ref2$value = _ref2.value,
|
|
8553
8562
|
attributeValue = _ref2$value === void 0 ? '' : _ref2$value; // cx is not used, since it would be bundled as a dependency for Vue & Angular
|
|
8554
8563
|
|
|
@@ -8567,8 +8576,11 @@
|
|
|
8567
8576
|
hit = _ref.hit,
|
|
8568
8577
|
_ref$cssClasses = _ref.cssClasses,
|
|
8569
8578
|
cssClasses = _ref$cssClasses === void 0 ? {} : _ref$cssClasses;
|
|
8579
|
+
var snippetAttributeResult = getPropertyByPath(hit._snippetResult, attribute); // @MAJOR fallback to attribute value if snippet is not found
|
|
8580
|
+
|
|
8581
|
+
_warning(snippetAttributeResult, "Could not enable reverse snippet for \"".concat(attribute, "\", will display an empty string.\nPlease check whether this attribute exists and is specified in `attributesToSnippet`.\n\nSee: https://alg.li/highlighting\n")) ;
|
|
8570
8582
|
|
|
8571
|
-
var _ref2 =
|
|
8583
|
+
var _ref2 = snippetAttributeResult || {},
|
|
8572
8584
|
_ref2$value = _ref2.value,
|
|
8573
8585
|
attributeValue = _ref2$value === void 0 ? '' : _ref2$value; // cx is not used, since it would be bundled as a dependency for Vue & Angular
|
|
8574
8586
|
|
|
@@ -10314,10 +10326,15 @@
|
|
|
10314
10326
|
|
|
10315
10327
|
mainHelper.on('error', function (_ref4) {
|
|
10316
10328
|
var error = _ref4.error;
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10329
|
+
// If an error is emitted, it is re-thrown by events. In previous versions
|
|
10330
|
+
// we emitted {error}, which is thrown as:
|
|
10331
|
+
// "Uncaught, unspecified \"error\" event. ([object Object])"
|
|
10332
|
+
// To avoid breaking changes, we make the error available in both
|
|
10333
|
+
// `error` and `error.error`
|
|
10334
|
+
// @MAJOR emit only error
|
|
10335
|
+
error.error = error;
|
|
10336
|
+
|
|
10337
|
+
_this3.emit('error', error);
|
|
10321
10338
|
});
|
|
10322
10339
|
this.mainHelper = mainHelper;
|
|
10323
10340
|
this.middleware.forEach(function (_ref5) {
|
|
@@ -11250,7 +11267,7 @@
|
|
|
11250
11267
|
};
|
|
11251
11268
|
}
|
|
11252
11269
|
|
|
11253
|
-
var n,u,t,
|
|
11270
|
+
var n,l,u,t,r,o,f,e={},c=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a(n,l){for(var u in l)n[u]=l[u];return n}function h(n){var l=n.parentNode;l&&l.removeChild(n);}function v(l,u,i){var t,r,o,f={};for(o in u)"key"==o?t=u[o]:"ref"==o?r=u[o]:f[o]=u[o];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===f[o]&&(f[o]=l.defaultProps[o]);return y(l,f,t,r,null)}function y(n,i,t,r,o){var f={type:n,props:i,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++u:o};return null==o&&null!=l.vnode&&l.vnode(f),f}function p(){return {current:null}}function d(n){return n.children}function _(n,l){this.props=n,this.context=l;}function k(n,l){if(null==l)return n.__?k(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?k(n):null}function b(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return b(n)}}function m(n){(!n.__d&&(n.__d=!0)&&t.push(n)&&!g.__r++||o!==l.debounceRendering)&&((o=l.debounceRendering)||r)(g);}function g(){for(var n;g.__r=t.length;)n=t.sort(function(n,l){return n.__v.__b-l.__v.__b}),t=[],n.some(function(n){var l,u,i,t,r,o;n.__d&&(r=(t=(l=n).__v).__e,(o=l.__P)&&(u=[],(i=a({},t)).__v=t.__v+1,j(o,t,i,l.__n,void 0!==o.ownerSVGElement,null!=t.__h?[r]:null,u,null==r?k(t):r,t.__h),z(u,t),t.__e!=r&&b(t)));});}function w(n,l,u,i,t,r,o,f,s,a){var h,v,p,_,b,m,g,w=i&&i.__k||c,A=w.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(_=u.__k[h]=null==(_=l[h])||"boolean"==typeof _?null:"string"==typeof _||"number"==typeof _||"bigint"==typeof _?y(null,_,null,null,_):Array.isArray(_)?y(d,{children:_},null,null,null):_.__b>0?y(_.type,_.props,_.key,null,_.__v):_)){if(_.__=u,_.__b=u.__b+1,null===(p=w[h])||p&&_.key==p.key&&_.type===p.type)w[h]=void 0;else for(v=0;v<A;v++){if((p=w[v])&&_.key==p.key&&_.type===p.type){w[v]=void 0;break}p=null;}j(n,_,p=p||e,t,r,o,f,s,a),b=_.__e,(v=_.ref)&&p.ref!=v&&(g||(g=[]),p.ref&&g.push(p.ref,null,_),g.push(v,_.__c||b,_)),null!=b?(null==m&&(m=b),"function"==typeof _.type&&_.__k===p.__k?_.__d=s=x(_,s,n):s=P(n,_,p,w,b,s),"function"==typeof u.type&&(u.__d=s)):s&&p.__e==s&&s.parentNode!=n&&(s=k(p));}for(u.__e=m,h=A;h--;)null!=w[h]&&("function"==typeof u.type&&null!=w[h].__e&&w[h].__e==u.__d&&(u.__d=k(i,h+1)),N(w[h],w[h]));if(g)for(h=0;h<g.length;h++)M(g[h],g[++h],g[++h]);}function x(n,l,u){for(var i,t=n.__k,r=0;t&&r<t.length;r++)(i=t[r])&&(i.__=n,l="function"==typeof i.type?x(i,l,u):P(u,i,i,t,i.__e,l));return l}function P(n,l,u,i,t,r){var o,f,e;if(void 0!==l.__d)o=l.__d,l.__d=void 0;else if(null==u||t!=r||null==t.parentNode)n:if(null==r||r.parentNode!==n)n.appendChild(t),o=null;else{for(f=r,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,r),o=r;}return void 0!==o?o:t.nextSibling}function C(n,l,u,i,t){var r;for(r in u)"children"===r||"key"===r||r in l||H(n,r,null,u[r],i);for(r in l)t&&"function"!=typeof l[r]||"children"===r||"key"===r||"value"===r||"checked"===r||u[r]===l[r]||H(n,r,l[r],u[r],i);}function $(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||s.test(l)?u:u+"px";}function H(n,l,u,i,t){var r;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else{if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||$(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||$(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])r=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?i||n.addEventListener(l,r?T:I,r):n.removeEventListener(l,r?T:I,r);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l));}}function I(n){this.l[n.type+!1](l.event?l.event(n):n);}function T(n){this.l[n.type+!0](l.event?l.event(n):n);}function j(n,u,i,t,r,o,f,e,c){var s,h,v,y,p,k,b,m,g,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,o=[e]),(s=l.__b)&&s(u);try{n:if("function"==typeof P){if(m=u.props,g=(s=P.contextType)&&t[s.__c],x=s?g?g.props.value:s.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in P&&P.prototype.render?u.__c=h=new P(m,x):(u.__c=h=new _(m,x),h.constructor=P,h.render=O),g&&g.sub(h),h.props=m,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=a({},h.__s)),a(h.__s,P.getDerivedStateFromProps(m,h.__s))),y=h.props,p=h.state,v)null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==P.getDerivedStateFromProps&&m!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,x)||u.__v===i.__v){h.props=m,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,p,k);});}h.context=x,h.props=m,h.state=h.__s,(s=l.__r)&&s(u),h.__d=!1,h.__v=u,h.__P=n,s=h.render(h.props,h.state,h.context),h.state=h.__s,null!=h.getChildContext&&(t=a(a({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,p)),A=null!=s&&s.type===d&&null==s.key?s.props.children:s,w(n,Array.isArray(A)?A:[A],u,i,t,r,o,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),b&&(h.__E=h.__=null),h.__e=!1;}else null==o&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=L(i.__e,u,i,t,r,o,f,c);(s=l.diffed)&&s(u);}catch(n){u.__v=null,(c||null!=o)&&(u.__e=e,u.__h=!!c,o[o.indexOf(e)]=null),l.__e(n,u,i);}}function z(n,u){l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l.__e(n,u.__v);}});}function L(l,u,i,t,r,o,f,c){var s,a,v,y=i.props,p=u.props,d=u.type,_=0;if("svg"===d&&(r=!0),null!=o)for(;_<o.length;_++)if((s=o[_])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,o[_]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=r?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),o=null,c=!1;}if(null===d)y===p||c&&l.data===p||(l.data=p);else{if(o=o&&n.call(l.childNodes),a=(y=i.props||e).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=o)for(y={},_=0;_<l.attributes.length;_++)y[l.attributes[_].name]=l.attributes[_].value;(v||a)&&(v&&(a&&v.__html==a.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""));}if(C(l,p,y,r,c),v)u.__k=[];else if(_=u.props.children,w(l,Array.isArray(_)?_:[_],u,i,t,r&&"foreignObject"!==d,o,f,o?o[0]:i.__k&&k(i,0),c),null!=o)for(_=o.length;_--;)null!=o[_]&&h(o[_]);c||("value"in p&&void 0!==(_=p.value)&&(_!==y.value||_!==l.value||"progress"===d&&!_)&&H(l,"value",_,y.value,!1),"checked"in p&&void 0!==(_=p.checked)&&_!==l.checked&&H(l,"checked",_,y.checked,!1));}return l}function M(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l.__e(n,i);}}function N(n,u,i){var t,r;if(l.unmount&&l.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l.__e(n,u);}t.base=t.__P=null;}if(t=n.__k)for(r=0;r<t.length;r++)t[r]&&N(t[r],u,"function"!=typeof n.type);i||null==n.__e||h(n.__e),n.__e=n.__d=void 0;}function O(n,l,u){return this.constructor(n,u)}function S(u,i,t){var r,o,f;l.__&&l.__(u,i),o=(r="function"==typeof t)?null:t&&t.__k||i.__k,f=[],j(i,u=(!r&&t||i).__k=v(d,null,[u]),o||e,e,void 0!==i.ownerSVGElement,!r&&t?[t]:o?null:i.firstChild?n.call(i.childNodes):null,f,!r&&t?t:o?o.__e:i.firstChild,r),z(f,u);}n=c.slice,l={__e:function(n,l){for(var u,i,t;l=l.__;)if((u=l.__c)&&!u.__)try{if((i=u.constructor)&&null!=i.getDerivedStateFromError&&(u.setState(i.getDerivedStateFromError(n)),t=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),t=u.__d),t)return u.__E=u}catch(l){n=l;}throw n}},u=0,_.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a({},this.state),"function"==typeof n&&(n=n(a({},u),this.props)),n&&a(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),m(this));},_.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),m(this));},_.prototype.render=d,t=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,g.__r=0,f=0;
|
|
11254
11271
|
|
|
11255
11272
|
/** @jsx h */
|
|
11256
11273
|
|
|
@@ -11313,9 +11330,9 @@
|
|
|
11313
11330
|
}
|
|
11314
11331
|
};
|
|
11315
11332
|
|
|
11316
|
-
return
|
|
11333
|
+
return v("div", {
|
|
11317
11334
|
onClick: handleClick
|
|
11318
|
-
},
|
|
11335
|
+
}, v(BaseComponent, props));
|
|
11319
11336
|
}
|
|
11320
11337
|
|
|
11321
11338
|
return WithInsightsListener;
|
|
@@ -13014,32 +13031,28 @@
|
|
|
13014
13031
|
connector: true
|
|
13015
13032
|
});
|
|
13016
13033
|
|
|
13034
|
+
var defaultQueryHook = function defaultQueryHook(query, hook) {
|
|
13035
|
+
return hook(query);
|
|
13036
|
+
};
|
|
13017
13037
|
/**
|
|
13018
13038
|
* **SearchBox** connector provides the logic to build a widget that will let the user search for a query.
|
|
13019
13039
|
*
|
|
13020
13040
|
* The connector provides to the rendering: `refine()` to set the query. The behaviour of this function
|
|
13021
13041
|
* may be impacted by the `queryHook` widget parameter.
|
|
13022
13042
|
*/
|
|
13043
|
+
|
|
13044
|
+
|
|
13023
13045
|
var connectSearchBox = function connectSearchBox(renderFn) {
|
|
13024
13046
|
var unmountFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
|
|
13025
13047
|
checkRendering(renderFn, withUsage$d());
|
|
13026
13048
|
return function (widgetParams) {
|
|
13027
13049
|
var _ref = widgetParams || {},
|
|
13028
|
-
queryHook = _ref.queryHook
|
|
13029
|
-
|
|
13030
|
-
function clear(helper) {
|
|
13031
|
-
return function () {
|
|
13032
|
-
helper.setQuery('').search();
|
|
13033
|
-
};
|
|
13034
|
-
}
|
|
13050
|
+
_ref$queryHook = _ref.queryHook,
|
|
13051
|
+
queryHook = _ref$queryHook === void 0 ? defaultQueryHook : _ref$queryHook;
|
|
13035
13052
|
|
|
13036
13053
|
var _refine;
|
|
13037
13054
|
|
|
13038
|
-
var _clear
|
|
13039
|
-
|
|
13040
|
-
function _cachedClear() {
|
|
13041
|
-
_clear();
|
|
13042
|
-
}
|
|
13055
|
+
var _clear;
|
|
13043
13056
|
|
|
13044
13057
|
return {
|
|
13045
13058
|
$$type: 'ais.searchBox',
|
|
@@ -13071,27 +13084,21 @@
|
|
|
13071
13084
|
state = _ref3.state;
|
|
13072
13085
|
|
|
13073
13086
|
if (!_refine) {
|
|
13074
|
-
var setQueryAndSearch = function setQueryAndSearch(query) {
|
|
13075
|
-
if (query !== state.query) {
|
|
13076
|
-
helper.setQuery(query).search();
|
|
13077
|
-
}
|
|
13078
|
-
};
|
|
13079
|
-
|
|
13080
13087
|
_refine = function _refine(query) {
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
|
|
13088
|
+
queryHook(query, function (q) {
|
|
13089
|
+
return helper.setQuery(q).search();
|
|
13090
|
+
});
|
|
13091
|
+
};
|
|
13085
13092
|
|
|
13086
|
-
|
|
13093
|
+
_clear = function _clear() {
|
|
13094
|
+
helper.setQuery('').search();
|
|
13087
13095
|
};
|
|
13088
13096
|
}
|
|
13089
13097
|
|
|
13090
|
-
_clear = clear(helper);
|
|
13091
13098
|
return {
|
|
13092
13099
|
query: state.query || '',
|
|
13093
13100
|
refine: _refine,
|
|
13094
|
-
clear:
|
|
13101
|
+
clear: _clear,
|
|
13095
13102
|
widgetParams: widgetParams,
|
|
13096
13103
|
isSearchStalled: searchMetadata.isSearchStalled
|
|
13097
13104
|
};
|
|
@@ -13899,7 +13906,9 @@
|
|
|
13899
13906
|
if (!facetValue) {
|
|
13900
13907
|
var breadcrumb = state.getHierarchicalFacetBreadcrumb(hierarchicalFacetName);
|
|
13901
13908
|
|
|
13902
|
-
if (breadcrumb.length
|
|
13909
|
+
if (breadcrumb.length === 0) {
|
|
13910
|
+
return state;
|
|
13911
|
+
} else {
|
|
13903
13912
|
return state.resetPage().toggleFacetRefinement(hierarchicalFacetName, breadcrumb[0]);
|
|
13904
13913
|
}
|
|
13905
13914
|
}
|
|
@@ -13934,7 +13943,10 @@
|
|
|
13934
13943
|
state = _ref2.state;
|
|
13935
13944
|
|
|
13936
13945
|
function getItems() {
|
|
13937
|
-
|
|
13946
|
+
// The hierarchicalFacets condition is required for flavors
|
|
13947
|
+
// that render immediately with empty results, without relying
|
|
13948
|
+
// on init() (like React InstantSearch Hooks).
|
|
13949
|
+
if (!results || state.hierarchicalFacets.length === 0) {
|
|
13938
13950
|
return [];
|
|
13939
13951
|
}
|
|
13940
13952
|
|
|
@@ -15675,7 +15687,7 @@
|
|
|
15675
15687
|
return null;
|
|
15676
15688
|
}
|
|
15677
15689
|
|
|
15678
|
-
return
|
|
15690
|
+
return v(RootTagName, _extends({}, this.props.rootProps, {
|
|
15679
15691
|
dangerouslySetInnerHTML: {
|
|
15680
15692
|
__html: content
|
|
15681
15693
|
}
|
|
@@ -15684,7 +15696,7 @@
|
|
|
15684
15696
|
}]);
|
|
15685
15697
|
|
|
15686
15698
|
return Template;
|
|
15687
|
-
}(
|
|
15699
|
+
}(_);
|
|
15688
15700
|
|
|
15689
15701
|
_defineProperty(Template, "defaultProps", defaultProps);
|
|
15690
15702
|
|
|
@@ -15694,13 +15706,13 @@
|
|
|
15694
15706
|
templateProps = _ref.templateProps,
|
|
15695
15707
|
createURL = _ref.createURL,
|
|
15696
15708
|
refine = _ref.refine;
|
|
15697
|
-
return
|
|
15709
|
+
return v("div", {
|
|
15698
15710
|
className: classnames(cssClasses.root, _defineProperty({}, cssClasses.noRefinementRoot, items.length === 0))
|
|
15699
|
-
},
|
|
15711
|
+
}, v("ul", {
|
|
15700
15712
|
className: cssClasses.list
|
|
15701
|
-
},
|
|
15713
|
+
}, v("li", {
|
|
15702
15714
|
className: classnames(cssClasses.item, _defineProperty({}, cssClasses.selectedItem, items.length === 0))
|
|
15703
|
-
},
|
|
15715
|
+
}, v(Template, _extends({}, templateProps, {
|
|
15704
15716
|
templateKey: "home",
|
|
15705
15717
|
rootTagName: "a",
|
|
15706
15718
|
rootProps: {
|
|
@@ -15713,17 +15725,17 @@
|
|
|
15713
15725
|
}
|
|
15714
15726
|
}))), items.map(function (item, idx) {
|
|
15715
15727
|
var isLast = idx === items.length - 1;
|
|
15716
|
-
return
|
|
15728
|
+
return v("li", {
|
|
15717
15729
|
key: item.label + idx,
|
|
15718
15730
|
className: classnames(cssClasses.item, _defineProperty({}, cssClasses.selectedItem, isLast))
|
|
15719
|
-
},
|
|
15731
|
+
}, v(Template, _extends({}, templateProps, {
|
|
15720
15732
|
templateKey: "separator",
|
|
15721
15733
|
rootTagName: "span",
|
|
15722
15734
|
rootProps: {
|
|
15723
15735
|
className: cssClasses.separator,
|
|
15724
15736
|
'aria-hidden': true
|
|
15725
15737
|
}
|
|
15726
|
-
})), isLast ? item.label :
|
|
15738
|
+
})), isLast ? item.label : v("a", {
|
|
15727
15739
|
className: cssClasses.link,
|
|
15728
15740
|
href: createURL(item.value),
|
|
15729
15741
|
onClick: function onClick(event) {
|
|
@@ -15765,7 +15777,7 @@
|
|
|
15765
15777
|
return;
|
|
15766
15778
|
}
|
|
15767
15779
|
|
|
15768
|
-
|
|
15780
|
+
S(v(Breadcrumb, {
|
|
15769
15781
|
canRefine: canRefine,
|
|
15770
15782
|
cssClasses: cssClasses,
|
|
15771
15783
|
createURL: createURL,
|
|
@@ -15822,7 +15834,7 @@
|
|
|
15822
15834
|
templates: templates
|
|
15823
15835
|
});
|
|
15824
15836
|
var makeWidget = connectBreadcrumb(specializedRenderer, function () {
|
|
15825
|
-
return
|
|
15837
|
+
return S(null, containerNode);
|
|
15826
15838
|
});
|
|
15827
15839
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
15828
15840
|
attributes: attributes,
|
|
@@ -15839,9 +15851,9 @@
|
|
|
15839
15851
|
refine = _ref.refine,
|
|
15840
15852
|
cssClasses = _ref.cssClasses,
|
|
15841
15853
|
templateProps = _ref.templateProps;
|
|
15842
|
-
return
|
|
15854
|
+
return v("div", {
|
|
15843
15855
|
className: cssClasses.root
|
|
15844
|
-
},
|
|
15856
|
+
}, v(Template, _extends({}, templateProps, {
|
|
15845
15857
|
templateKey: "resetLabel",
|
|
15846
15858
|
rootTagName: "button",
|
|
15847
15859
|
rootProps: {
|
|
@@ -15883,7 +15895,7 @@
|
|
|
15883
15895
|
return;
|
|
15884
15896
|
}
|
|
15885
15897
|
|
|
15886
|
-
|
|
15898
|
+
S(v(ClearRefinements, {
|
|
15887
15899
|
refine: refine,
|
|
15888
15900
|
cssClasses: cssClasses,
|
|
15889
15901
|
hasRefinements: hasRefinements,
|
|
@@ -15925,7 +15937,7 @@
|
|
|
15925
15937
|
templates: templates
|
|
15926
15938
|
});
|
|
15927
15939
|
var makeWidget = connectClearRefinements(specializedRenderer, function () {
|
|
15928
|
-
return
|
|
15940
|
+
return S(null, containerNode);
|
|
15929
15941
|
});
|
|
15930
15942
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
15931
15943
|
includedAttributes: includedAttributes,
|
|
@@ -15978,23 +15990,23 @@
|
|
|
15978
15990
|
var CurrentRefinements = function CurrentRefinements(_ref2) {
|
|
15979
15991
|
var items = _ref2.items,
|
|
15980
15992
|
cssClasses = _ref2.cssClasses;
|
|
15981
|
-
return
|
|
15993
|
+
return v("div", {
|
|
15982
15994
|
className: cssClasses.root
|
|
15983
|
-
},
|
|
15995
|
+
}, v("ul", {
|
|
15984
15996
|
className: cssClasses.list
|
|
15985
15997
|
}, items.map(function (item, index) {
|
|
15986
|
-
return
|
|
15998
|
+
return v("li", {
|
|
15987
15999
|
key: "".concat(item.indexName, "-").concat(item.attribute, "-").concat(index),
|
|
15988
16000
|
className: cssClasses.item
|
|
15989
|
-
},
|
|
16001
|
+
}, v("span", {
|
|
15990
16002
|
className: cssClasses.label
|
|
15991
16003
|
}, capitalize(item.label), ":"), item.refinements.map(function (refinement) {
|
|
15992
|
-
return
|
|
16004
|
+
return v("span", {
|
|
15993
16005
|
key: createItemKey(refinement),
|
|
15994
16006
|
className: cssClasses.category
|
|
15995
|
-
},
|
|
16007
|
+
}, v("span", {
|
|
15996
16008
|
className: cssClasses.categoryLabel
|
|
15997
|
-
}, refinement.attribute === 'query' ?
|
|
16009
|
+
}, refinement.attribute === 'query' ? v("q", null, refinement.label) : refinement.label), v("button", {
|
|
15998
16010
|
className: cssClasses.delete,
|
|
15999
16011
|
onClick: handleClick(item.refine.bind(null, refinement))
|
|
16000
16012
|
}, "\u2715"));
|
|
@@ -16018,7 +16030,7 @@
|
|
|
16018
16030
|
var _ref2 = widgetParams,
|
|
16019
16031
|
container = _ref2.container,
|
|
16020
16032
|
cssClasses = _ref2.cssClasses;
|
|
16021
|
-
|
|
16033
|
+
S(v(CurrentRefinements, {
|
|
16022
16034
|
cssClasses: cssClasses,
|
|
16023
16035
|
items: items
|
|
16024
16036
|
}), container);
|
|
@@ -16060,7 +16072,7 @@
|
|
|
16060
16072
|
}), userCssClasses.delete)
|
|
16061
16073
|
};
|
|
16062
16074
|
var makeWidget = connectCurrentRefinements(renderer$2, function () {
|
|
16063
|
-
return
|
|
16075
|
+
return S(null, containerNode);
|
|
16064
16076
|
});
|
|
16065
16077
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
16066
16078
|
container: containerNode,
|
|
@@ -16086,9 +16098,9 @@
|
|
|
16086
16098
|
isLoading = _ref.isLoading,
|
|
16087
16099
|
cssClasses = _ref.cssClasses,
|
|
16088
16100
|
templateProps = _ref.templateProps;
|
|
16089
|
-
return
|
|
16101
|
+
return v("div", {
|
|
16090
16102
|
className: classnames(cssClasses.root, _defineProperty({}, cssClasses.emptyRoot, hits.length === 0))
|
|
16091
|
-
},
|
|
16103
|
+
}, v(Template, _extends({}, templateProps, {
|
|
16092
16104
|
templateKey: "header",
|
|
16093
16105
|
rootProps: {
|
|
16094
16106
|
className: cssClasses.header
|
|
@@ -16097,15 +16109,15 @@
|
|
|
16097
16109
|
hits: hits,
|
|
16098
16110
|
isLoading: isLoading
|
|
16099
16111
|
}
|
|
16100
|
-
})), isLoading ?
|
|
16112
|
+
})), isLoading ? v(Template, _extends({}, templateProps, {
|
|
16101
16113
|
templateKey: "loader",
|
|
16102
16114
|
rootProps: {
|
|
16103
16115
|
className: cssClasses.loader
|
|
16104
16116
|
}
|
|
16105
|
-
})) :
|
|
16117
|
+
})) : v("ul", {
|
|
16106
16118
|
className: cssClasses.list
|
|
16107
16119
|
}, hits.map(function (hit, position) {
|
|
16108
|
-
return
|
|
16120
|
+
return v(Template, _extends({}, templateProps, {
|
|
16109
16121
|
templateKey: "item",
|
|
16110
16122
|
rootTagName: "li",
|
|
16111
16123
|
rootProps: {
|
|
@@ -16143,7 +16155,7 @@
|
|
|
16143
16155
|
return;
|
|
16144
16156
|
}
|
|
16145
16157
|
|
|
16146
|
-
|
|
16158
|
+
S(v(Answers, {
|
|
16147
16159
|
cssClasses: cssClasses,
|
|
16148
16160
|
hits: hits,
|
|
16149
16161
|
isLoading: isLoading,
|
|
@@ -16197,7 +16209,7 @@
|
|
|
16197
16209
|
renderState: {}
|
|
16198
16210
|
});
|
|
16199
16211
|
var makeWidget = connectAnswers(specializedRenderer, function () {
|
|
16200
|
-
return
|
|
16212
|
+
return S(null, containerNode);
|
|
16201
16213
|
});
|
|
16202
16214
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
16203
16215
|
attributesForPrediction: attributesForPrediction,
|
|
@@ -16308,7 +16320,7 @@
|
|
|
16308
16320
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
16309
16321
|
onClick = _ref.onClick,
|
|
16310
16322
|
children = _ref.children;
|
|
16311
|
-
return
|
|
16323
|
+
return v("button", {
|
|
16312
16324
|
className: className,
|
|
16313
16325
|
onClick: onClick,
|
|
16314
16326
|
disabled: disabled
|
|
@@ -16323,9 +16335,9 @@
|
|
|
16323
16335
|
checked = _ref.checked,
|
|
16324
16336
|
onToggle = _ref.onToggle,
|
|
16325
16337
|
children = _ref.children;
|
|
16326
|
-
return
|
|
16338
|
+
return v("label", {
|
|
16327
16339
|
className: classNameLabel
|
|
16328
|
-
},
|
|
16340
|
+
}, v("input", {
|
|
16329
16341
|
className: classNameInput,
|
|
16330
16342
|
type: "checkbox",
|
|
16331
16343
|
checked: checked,
|
|
@@ -16345,36 +16357,36 @@
|
|
|
16345
16357
|
onRefineClick = _ref.onRefineClick,
|
|
16346
16358
|
onClearClick = _ref.onClearClick,
|
|
16347
16359
|
templateProps = _ref.templateProps;
|
|
16348
|
-
return
|
|
16360
|
+
return v(d, null, enableRefine && v("div", null, enableRefineControl && v("div", {
|
|
16349
16361
|
className: cssClasses.control
|
|
16350
|
-
}, isRefineOnMapMove || !hasMapMoveSinceLastRefine ?
|
|
16362
|
+
}, isRefineOnMapMove || !hasMapMoveSinceLastRefine ? v(GeoSearchToggle, {
|
|
16351
16363
|
classNameLabel: classnames(cssClasses.label, _defineProperty({}, cssClasses.selectedLabel, isRefineOnMapMove)),
|
|
16352
16364
|
classNameInput: cssClasses.input,
|
|
16353
16365
|
checked: isRefineOnMapMove,
|
|
16354
16366
|
onToggle: onRefineToggle
|
|
16355
|
-
},
|
|
16367
|
+
}, v(Template, _extends({}, templateProps, {
|
|
16356
16368
|
templateKey: "toggle",
|
|
16357
16369
|
rootTagName: "span"
|
|
16358
|
-
}))) :
|
|
16370
|
+
}))) : v(GeoSearchButton, {
|
|
16359
16371
|
className: cssClasses.redo,
|
|
16360
16372
|
disabled: !hasMapMoveSinceLastRefine,
|
|
16361
16373
|
onClick: onRefineClick
|
|
16362
|
-
},
|
|
16374
|
+
}, v(Template, _extends({}, templateProps, {
|
|
16363
16375
|
templateKey: "redo",
|
|
16364
16376
|
rootTagName: "span"
|
|
16365
|
-
})))), !enableRefineControl && !isRefineOnMapMove &&
|
|
16377
|
+
})))), !enableRefineControl && !isRefineOnMapMove && v("div", {
|
|
16366
16378
|
className: cssClasses.control
|
|
16367
|
-
},
|
|
16379
|
+
}, v(GeoSearchButton, {
|
|
16368
16380
|
className: classnames(cssClasses.redo, _defineProperty({}, cssClasses.disabledRedo, !hasMapMoveSinceLastRefine)),
|
|
16369
16381
|
disabled: !hasMapMoveSinceLastRefine,
|
|
16370
16382
|
onClick: onRefineClick
|
|
16371
|
-
},
|
|
16383
|
+
}, v(Template, _extends({}, templateProps, {
|
|
16372
16384
|
templateKey: "redo",
|
|
16373
16385
|
rootTagName: "span"
|
|
16374
|
-
})))), enableClearMapRefinement && isRefinedWithMap &&
|
|
16386
|
+
})))), enableClearMapRefinement && isRefinedWithMap && v(GeoSearchButton, {
|
|
16375
16387
|
className: cssClasses.reset,
|
|
16376
16388
|
onClick: onClearClick
|
|
16377
|
-
},
|
|
16389
|
+
}, v(Template, _extends({}, templateProps, {
|
|
16378
16390
|
templateKey: "reset",
|
|
16379
16391
|
rootTagName: "span"
|
|
16380
16392
|
})))));
|
|
@@ -16558,7 +16570,7 @@
|
|
|
16558
16570
|
});
|
|
16559
16571
|
}
|
|
16560
16572
|
|
|
16561
|
-
|
|
16573
|
+
S(v(GeoSearchControls, {
|
|
16562
16574
|
cssClasses: cssClasses,
|
|
16563
16575
|
enableRefine: enableRefine,
|
|
16564
16576
|
enableRefineControl: enableRefineControl,
|
|
@@ -16847,7 +16859,7 @@
|
|
|
16847
16859
|
var createMarker = !customHTMLMarker ? createBuiltInMarker : createCustomHTMLMarker;
|
|
16848
16860
|
var markerOptions = !customHTMLMarker ? builtInMarker : customHTMLMarker;
|
|
16849
16861
|
var makeWidget = connectGeoSearch(renderer$4, function () {
|
|
16850
|
-
return
|
|
16862
|
+
return S(null, containerNode);
|
|
16851
16863
|
});
|
|
16852
16864
|
return _objectSpread2(_objectSpread2({}, makeWidget(_objectSpread2(_objectSpread2({}, otherWidgetParams), {}, {
|
|
16853
16865
|
renderState: {},
|
|
@@ -16876,7 +16888,7 @@
|
|
|
16876
16888
|
templateKey = _ref.templateKey,
|
|
16877
16889
|
templateData = _ref.templateData,
|
|
16878
16890
|
subItems = _ref.subItems;
|
|
16879
|
-
return
|
|
16891
|
+
return v("li", {
|
|
16880
16892
|
className: className,
|
|
16881
16893
|
onClick: function onClick(originalEvent) {
|
|
16882
16894
|
handleClick({
|
|
@@ -16885,7 +16897,7 @@
|
|
|
16885
16897
|
originalEvent: originalEvent
|
|
16886
16898
|
});
|
|
16887
16899
|
}
|
|
16888
|
-
},
|
|
16900
|
+
}, v(Template, _extends({}, templateProps, {
|
|
16889
16901
|
templateKey: templateKey,
|
|
16890
16902
|
data: templateData
|
|
16891
16903
|
})), subItems);
|
|
@@ -17042,17 +17054,16 @@
|
|
|
17042
17054
|
showLoadingIndicator = _this$props4.showLoadingIndicator,
|
|
17043
17055
|
templates = _this$props4.templates,
|
|
17044
17056
|
isSearchStalled = _this$props4.isSearchStalled;
|
|
17045
|
-
return
|
|
17057
|
+
return v("div", {
|
|
17046
17058
|
className: cssClasses.root
|
|
17047
|
-
},
|
|
17059
|
+
}, v("form", {
|
|
17048
17060
|
action: "",
|
|
17049
17061
|
role: "search",
|
|
17050
17062
|
className: cssClasses.form,
|
|
17051
17063
|
noValidate: true,
|
|
17052
|
-
onSubmit: this.onSubmit
|
|
17053
|
-
,
|
|
17064
|
+
onSubmit: this.onSubmit,
|
|
17054
17065
|
onReset: this.onReset
|
|
17055
|
-
},
|
|
17066
|
+
}, v("input", {
|
|
17056
17067
|
ref: this.input,
|
|
17057
17068
|
value: this.state.query,
|
|
17058
17069
|
disabled: this.props.disabled,
|
|
@@ -17061,15 +17072,15 @@
|
|
|
17061
17072
|
placeholder: placeholder,
|
|
17062
17073
|
autoFocus: autofocus,
|
|
17063
17074
|
autoComplete: "off",
|
|
17064
|
-
autoCorrect: "off"
|
|
17075
|
+
autoCorrect: "off",
|
|
17076
|
+
autoCapitalize: "off" // @ts-expect-error `spellCheck` attribute is missing in preact JSX types
|
|
17065
17077
|
,
|
|
17066
|
-
autoCapitalize: "off",
|
|
17067
17078
|
spellCheck: "false",
|
|
17068
17079
|
maxLength: 512,
|
|
17069
17080
|
onInput: this.onInput,
|
|
17070
17081
|
onBlur: this.onBlur,
|
|
17071
17082
|
onFocus: this.onFocus
|
|
17072
|
-
}),
|
|
17083
|
+
}), v(Template, {
|
|
17073
17084
|
templateKey: "submit",
|
|
17074
17085
|
rootTagName: "button",
|
|
17075
17086
|
rootProps: {
|
|
@@ -17082,7 +17093,7 @@
|
|
|
17082
17093
|
data: {
|
|
17083
17094
|
cssClasses: cssClasses
|
|
17084
17095
|
}
|
|
17085
|
-
}),
|
|
17096
|
+
}), v(Template, {
|
|
17086
17097
|
templateKey: "reset",
|
|
17087
17098
|
rootTagName: "button",
|
|
17088
17099
|
rootProps: {
|
|
@@ -17095,7 +17106,7 @@
|
|
|
17095
17106
|
data: {
|
|
17096
17107
|
cssClasses: cssClasses
|
|
17097
17108
|
}
|
|
17098
|
-
}), showLoadingIndicator &&
|
|
17109
|
+
}), showLoadingIndicator && v(Template, {
|
|
17099
17110
|
templateKey: "loadingIndicator",
|
|
17100
17111
|
rootTagName: "span",
|
|
17101
17112
|
rootProps: {
|
|
@@ -17111,7 +17122,7 @@
|
|
|
17111
17122
|
}]);
|
|
17112
17123
|
|
|
17113
17124
|
return SearchBox;
|
|
17114
|
-
}(
|
|
17125
|
+
}(_);
|
|
17115
17126
|
|
|
17116
17127
|
_defineProperty(SearchBox, "defaultProps", defaultProps$1);
|
|
17117
17128
|
|
|
@@ -17165,7 +17176,7 @@
|
|
|
17165
17176
|
root = _this$props$cssClasse.root,
|
|
17166
17177
|
cssClasses = _objectWithoutProperties(_this$props$cssClasse, ["root"]);
|
|
17167
17178
|
|
|
17168
|
-
subItems =
|
|
17179
|
+
subItems = v(RefinementList, _extends({}, this.props, {
|
|
17169
17180
|
// We want to keep `root` required for external usage but not for the
|
|
17170
17181
|
// sub items.
|
|
17171
17182
|
cssClasses: cssClasses,
|
|
@@ -17196,7 +17207,7 @@
|
|
|
17196
17207
|
}
|
|
17197
17208
|
|
|
17198
17209
|
var refinementListItemClassName = classnames(this.props.cssClasses.item, (_cx = {}, _defineProperty(_cx, this.props.cssClasses.selectedItem, facetValue.isRefined), _defineProperty(_cx, this.props.cssClasses.disabledItem, !facetValue.count), _defineProperty(_cx, this.props.cssClasses.parentItem, isHierarchicalMenuItem(facetValue) && Array.isArray(facetValue.data) && facetValue.data.length > 0), _cx));
|
|
17199
|
-
return
|
|
17210
|
+
return v(RefinementListItem, {
|
|
17200
17211
|
templateKey: "item",
|
|
17201
17212
|
key: key,
|
|
17202
17213
|
facetValueToRefine: facetValue.value,
|
|
@@ -17290,7 +17301,7 @@
|
|
|
17290
17301
|
var _this2 = this;
|
|
17291
17302
|
|
|
17292
17303
|
var showMoreButtonClassName = classnames(this.props.cssClasses.showMore, _defineProperty({}, this.props.cssClasses.disabledShowMore, !(this.props.showMore === true && this.props.canToggleShowMore)));
|
|
17293
|
-
var showMoreButton = this.props.showMore === true &&
|
|
17304
|
+
var showMoreButton = this.props.showMore === true && v(Template, _extends({}, this.props.templateProps, {
|
|
17294
17305
|
templateKey: "showMoreText",
|
|
17295
17306
|
rootTagName: "button",
|
|
17296
17307
|
rootProps: {
|
|
@@ -17303,9 +17314,9 @@
|
|
|
17303
17314
|
}
|
|
17304
17315
|
}));
|
|
17305
17316
|
var shouldDisableSearchBox = this.props.searchIsAlwaysActive !== true && !(this.props.isFromSearch || !this.props.hasExhaustiveItems);
|
|
17306
|
-
var searchBox = this.props.searchFacetValues &&
|
|
17317
|
+
var searchBox = this.props.searchFacetValues && v("div", {
|
|
17307
17318
|
className: this.props.cssClasses.searchBox
|
|
17308
|
-
},
|
|
17319
|
+
}, v(SearchBox, {
|
|
17309
17320
|
ref: this.searchBox,
|
|
17310
17321
|
placeholder: this.props.searchPlaceholder,
|
|
17311
17322
|
disabled: shouldDisableSearchBox,
|
|
@@ -17324,24 +17335,24 @@
|
|
|
17324
17335
|
,
|
|
17325
17336
|
searchAsYouType: false
|
|
17326
17337
|
}));
|
|
17327
|
-
var facetValues = this.props.facetValues && this.props.facetValues.length > 0 &&
|
|
17338
|
+
var facetValues = this.props.facetValues && this.props.facetValues.length > 0 && v("ul", {
|
|
17328
17339
|
className: this.props.cssClasses.list
|
|
17329
17340
|
}, this.props.facetValues.map(this._generateFacetItem, this));
|
|
17330
|
-
var noResults = this.props.searchFacetValues && this.props.isFromSearch && (!this.props.facetValues || this.props.facetValues.length === 0) &&
|
|
17341
|
+
var noResults = this.props.searchFacetValues && this.props.isFromSearch && (!this.props.facetValues || this.props.facetValues.length === 0) && v(Template, _extends({}, this.props.templateProps, {
|
|
17331
17342
|
templateKey: "searchableNoResults",
|
|
17332
17343
|
rootProps: {
|
|
17333
17344
|
className: this.props.cssClasses.noResults
|
|
17334
17345
|
}
|
|
17335
17346
|
}));
|
|
17336
17347
|
var rootClassName = classnames(this.props.cssClasses.root, _defineProperty({}, this.props.cssClasses.noRefinementRoot, !this.props.facetValues || this.props.facetValues.length === 0), this.props.className);
|
|
17337
|
-
return
|
|
17348
|
+
return v("div", {
|
|
17338
17349
|
className: rootClassName
|
|
17339
17350
|
}, this.props.children, searchBox, facetValues, noResults, showMoreButton);
|
|
17340
17351
|
}
|
|
17341
17352
|
}]);
|
|
17342
17353
|
|
|
17343
17354
|
return RefinementList;
|
|
17344
|
-
}(
|
|
17355
|
+
}(_);
|
|
17345
17356
|
|
|
17346
17357
|
_defineProperty(RefinementList$1, "defaultProps", defaultProps$2);
|
|
17347
17358
|
|
|
@@ -17379,7 +17390,7 @@
|
|
|
17379
17390
|
return;
|
|
17380
17391
|
}
|
|
17381
17392
|
|
|
17382
|
-
|
|
17393
|
+
S(v(RefinementList$1, {
|
|
17383
17394
|
createURL: createURL,
|
|
17384
17395
|
cssClasses: cssClasses,
|
|
17385
17396
|
facetValues: items,
|
|
@@ -17516,7 +17527,7 @@
|
|
|
17516
17527
|
renderState: {}
|
|
17517
17528
|
});
|
|
17518
17529
|
var makeWidget = connectHierarchicalMenu(specializedRenderer, function () {
|
|
17519
|
-
return
|
|
17530
|
+
return S(null, containerNode);
|
|
17520
17531
|
});
|
|
17521
17532
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
17522
17533
|
attributes: attributes,
|
|
@@ -17541,7 +17552,7 @@
|
|
|
17541
17552
|
templateProps = _ref.templateProps;
|
|
17542
17553
|
|
|
17543
17554
|
if (results.hits.length === 0) {
|
|
17544
|
-
return
|
|
17555
|
+
return v(Template, _extends({}, templateProps, {
|
|
17545
17556
|
templateKey: "empty",
|
|
17546
17557
|
rootProps: {
|
|
17547
17558
|
className: classnames(cssClasses.root, cssClasses.emptyRoot)
|
|
@@ -17550,12 +17561,12 @@
|
|
|
17550
17561
|
}));
|
|
17551
17562
|
}
|
|
17552
17563
|
|
|
17553
|
-
return
|
|
17564
|
+
return v("div", {
|
|
17554
17565
|
className: cssClasses.root
|
|
17555
|
-
},
|
|
17566
|
+
}, v("ol", {
|
|
17556
17567
|
className: cssClasses.list
|
|
17557
17568
|
}, hits.map(function (hit, index) {
|
|
17558
|
-
return
|
|
17569
|
+
return v(Template, _extends({}, templateProps, {
|
|
17559
17570
|
templateKey: "item",
|
|
17560
17571
|
rootTagName: "li",
|
|
17561
17572
|
rootProps: {
|
|
@@ -17570,13 +17581,6 @@
|
|
|
17570
17581
|
})));
|
|
17571
17582
|
};
|
|
17572
17583
|
|
|
17573
|
-
Hits.defaultProps = {
|
|
17574
|
-
results: {
|
|
17575
|
-
hits: []
|
|
17576
|
-
},
|
|
17577
|
-
hits: []
|
|
17578
|
-
};
|
|
17579
|
-
|
|
17580
17584
|
var defaultTemplates$5 = {
|
|
17581
17585
|
empty: 'No results',
|
|
17582
17586
|
item: function item(data) {
|
|
@@ -17611,7 +17615,7 @@
|
|
|
17611
17615
|
return;
|
|
17612
17616
|
}
|
|
17613
17617
|
|
|
17614
|
-
|
|
17618
|
+
S(v(HitsWithInsightsListener, {
|
|
17615
17619
|
cssClasses: cssClasses,
|
|
17616
17620
|
hits: receivedHits,
|
|
17617
17621
|
results: results,
|
|
@@ -17659,7 +17663,7 @@
|
|
|
17659
17663
|
templates: templates
|
|
17660
17664
|
});
|
|
17661
17665
|
var makeWidget = withInsights(connectHits)(specializedRenderer, function () {
|
|
17662
|
-
return
|
|
17666
|
+
return S(null, containerNode);
|
|
17663
17667
|
});
|
|
17664
17668
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
17665
17669
|
escapeHTML: escapeHTML,
|
|
@@ -17676,14 +17680,14 @@
|
|
|
17676
17680
|
options = _ref.options,
|
|
17677
17681
|
cssClasses = _ref.cssClasses,
|
|
17678
17682
|
setValue = _ref.setValue;
|
|
17679
|
-
return
|
|
17683
|
+
return v("select", {
|
|
17680
17684
|
className: classnames(cssClasses.select),
|
|
17681
17685
|
onChange: function onChange(event) {
|
|
17682
17686
|
return setValue(event.target.value);
|
|
17683
17687
|
},
|
|
17684
17688
|
value: "".concat(currentValue)
|
|
17685
17689
|
}, options.map(function (option) {
|
|
17686
|
-
return
|
|
17690
|
+
return v("option", {
|
|
17687
17691
|
className: classnames(cssClasses.option),
|
|
17688
17692
|
key: option.label + option.value,
|
|
17689
17693
|
value: "".concat(option.value)
|
|
@@ -17710,9 +17714,9 @@
|
|
|
17710
17714
|
}) || {},
|
|
17711
17715
|
currentValue = _ref3.value;
|
|
17712
17716
|
|
|
17713
|
-
|
|
17717
|
+
S(v("div", {
|
|
17714
17718
|
className: cssClasses.root
|
|
17715
|
-
},
|
|
17719
|
+
}, v(Selector, {
|
|
17716
17720
|
cssClasses: cssClasses,
|
|
17717
17721
|
currentValue: currentValue,
|
|
17718
17722
|
options: items,
|
|
@@ -17748,7 +17752,7 @@
|
|
|
17748
17752
|
cssClasses: cssClasses
|
|
17749
17753
|
});
|
|
17750
17754
|
var makeWidget = connectHitsPerPage(specializedRenderer, function () {
|
|
17751
|
-
return
|
|
17755
|
+
return S(null, containerNode);
|
|
17752
17756
|
});
|
|
17753
17757
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
17754
17758
|
items: items,
|
|
@@ -17771,7 +17775,7 @@
|
|
|
17771
17775
|
templateProps = _ref.templateProps;
|
|
17772
17776
|
|
|
17773
17777
|
if (results.hits.length === 0) {
|
|
17774
|
-
return
|
|
17778
|
+
return v(Template, _extends({}, templateProps, {
|
|
17775
17779
|
templateKey: "empty",
|
|
17776
17780
|
rootProps: {
|
|
17777
17781
|
className: classnames(cssClasses.root, cssClasses.emptyRoot)
|
|
@@ -17780,9 +17784,9 @@
|
|
|
17780
17784
|
}));
|
|
17781
17785
|
}
|
|
17782
17786
|
|
|
17783
|
-
return
|
|
17787
|
+
return v("div", {
|
|
17784
17788
|
className: cssClasses.root
|
|
17785
|
-
}, hasShowPrevious &&
|
|
17789
|
+
}, hasShowPrevious && v(Template, _extends({}, templateProps, {
|
|
17786
17790
|
templateKey: "showPreviousText",
|
|
17787
17791
|
rootTagName: "button",
|
|
17788
17792
|
rootProps: {
|
|
@@ -17790,10 +17794,10 @@
|
|
|
17790
17794
|
disabled: isFirstPage,
|
|
17791
17795
|
onClick: showPrevious
|
|
17792
17796
|
}
|
|
17793
|
-
})),
|
|
17797
|
+
})), v("ol", {
|
|
17794
17798
|
className: cssClasses.list
|
|
17795
17799
|
}, hits.map(function (hit, position) {
|
|
17796
|
-
return
|
|
17800
|
+
return v(Template, _extends({}, templateProps, {
|
|
17797
17801
|
templateKey: "item",
|
|
17798
17802
|
rootTagName: "li",
|
|
17799
17803
|
rootProps: {
|
|
@@ -17805,7 +17809,7 @@
|
|
|
17805
17809
|
}),
|
|
17806
17810
|
bindEvent: bindEvent
|
|
17807
17811
|
}));
|
|
17808
|
-
})),
|
|
17812
|
+
})), v(Template, _extends({}, templateProps, {
|
|
17809
17813
|
templateKey: "showMoreText",
|
|
17810
17814
|
rootTagName: "button",
|
|
17811
17815
|
rootProps: {
|
|
@@ -17857,7 +17861,7 @@
|
|
|
17857
17861
|
return;
|
|
17858
17862
|
}
|
|
17859
17863
|
|
|
17860
|
-
|
|
17864
|
+
S(v(InfiniteHitsWithInsightsListener, {
|
|
17861
17865
|
cssClasses: cssClasses,
|
|
17862
17866
|
hits: hits,
|
|
17863
17867
|
results: results,
|
|
@@ -17927,7 +17931,7 @@
|
|
|
17927
17931
|
renderState: {}
|
|
17928
17932
|
});
|
|
17929
17933
|
var makeWidget = withInsights(connectInfiniteHits)(specializedRenderer, function () {
|
|
17930
|
-
return
|
|
17934
|
+
return S(null, containerNode);
|
|
17931
17935
|
});
|
|
17932
17936
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
17933
17937
|
escapeHTML: escapeHTML,
|
|
@@ -17978,7 +17982,7 @@
|
|
|
17978
17982
|
url: createURL(facetValue.value)
|
|
17979
17983
|
});
|
|
17980
17984
|
});
|
|
17981
|
-
|
|
17985
|
+
S(v(RefinementList$1, {
|
|
17982
17986
|
createURL: createURL,
|
|
17983
17987
|
cssClasses: cssClasses,
|
|
17984
17988
|
facetValues: facetValues,
|
|
@@ -18051,7 +18055,7 @@
|
|
|
18051
18055
|
showMore: showMore
|
|
18052
18056
|
});
|
|
18053
18057
|
var makeWidget = connectMenu(specializedRenderer, function () {
|
|
18054
|
-
return
|
|
18058
|
+
return S(null, containerNode);
|
|
18055
18059
|
});
|
|
18056
18060
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
18057
18061
|
attribute: attribute,
|
|
@@ -18078,15 +18082,15 @@
|
|
|
18078
18082
|
},
|
|
18079
18083
|
selectedValue = _ref2.value;
|
|
18080
18084
|
|
|
18081
|
-
return
|
|
18085
|
+
return v("div", {
|
|
18082
18086
|
className: classnames(cssClasses.root, _defineProperty({}, cssClasses.noRefinementRoot, items.length === 0))
|
|
18083
|
-
},
|
|
18087
|
+
}, v("select", {
|
|
18084
18088
|
className: cssClasses.select,
|
|
18085
18089
|
value: selectedValue,
|
|
18086
18090
|
onChange: function onChange(event) {
|
|
18087
18091
|
refine(event.target.value);
|
|
18088
18092
|
}
|
|
18089
|
-
},
|
|
18093
|
+
}, v(Template, _extends({}, templateProps, {
|
|
18090
18094
|
templateKey: "defaultOption",
|
|
18091
18095
|
rootTagName: "option",
|
|
18092
18096
|
rootProps: {
|
|
@@ -18094,7 +18098,7 @@
|
|
|
18094
18098
|
className: cssClasses.option
|
|
18095
18099
|
}
|
|
18096
18100
|
})), items.map(function (item) {
|
|
18097
|
-
return
|
|
18101
|
+
return v(Template, _extends({}, templateProps, {
|
|
18098
18102
|
templateKey: "item",
|
|
18099
18103
|
rootTagName: "option",
|
|
18100
18104
|
rootProps: {
|
|
@@ -18136,7 +18140,7 @@
|
|
|
18136
18140
|
return;
|
|
18137
18141
|
}
|
|
18138
18142
|
|
|
18139
|
-
|
|
18143
|
+
S(v(MenuSelect, {
|
|
18140
18144
|
cssClasses: cssClasses,
|
|
18141
18145
|
items: items,
|
|
18142
18146
|
refine: refine,
|
|
@@ -18183,7 +18187,7 @@
|
|
|
18183
18187
|
templates: templates
|
|
18184
18188
|
});
|
|
18185
18189
|
var makeWidget = connectMenu(specializedRenderer, function () {
|
|
18186
|
-
return
|
|
18190
|
+
return S(null, containerNode);
|
|
18187
18191
|
});
|
|
18188
18192
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
18189
18193
|
attribute: attribute,
|
|
@@ -18225,7 +18229,7 @@
|
|
|
18225
18229
|
return;
|
|
18226
18230
|
}
|
|
18227
18231
|
|
|
18228
|
-
|
|
18232
|
+
S(v(RefinementList$1, {
|
|
18229
18233
|
createURL: createURL,
|
|
18230
18234
|
cssClasses: cssClasses,
|
|
18231
18235
|
facetValues: items,
|
|
@@ -18285,7 +18289,7 @@
|
|
|
18285
18289
|
templates: templates
|
|
18286
18290
|
});
|
|
18287
18291
|
var makeWidget = connectNumericMenu(specializedRenderer, function () {
|
|
18288
|
-
return
|
|
18292
|
+
return S(null, containerNode);
|
|
18289
18293
|
});
|
|
18290
18294
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
18291
18295
|
attribute: attribute,
|
|
@@ -18296,66 +18300,9 @@
|
|
|
18296
18300
|
});
|
|
18297
18301
|
};
|
|
18298
18302
|
|
|
18299
|
-
|
|
18300
|
-
|
|
18301
|
-
|
|
18302
|
-
var cssClasses = _ref.cssClasses,
|
|
18303
|
-
label = _ref.label,
|
|
18304
|
-
ariaLabel = _ref.ariaLabel,
|
|
18305
|
-
url = _ref.url,
|
|
18306
|
-
isDisabled = _ref.isDisabled,
|
|
18307
|
-
handleClick = _ref.handleClick,
|
|
18308
|
-
pageNumber = _ref.pageNumber;
|
|
18309
|
-
|
|
18310
|
-
if (isDisabled) {
|
|
18311
|
-
return h("li", {
|
|
18312
|
-
className: cssClasses.item
|
|
18313
|
-
}, h("span", {
|
|
18314
|
-
className: cssClasses.link,
|
|
18315
|
-
dangerouslySetInnerHTML: {
|
|
18316
|
-
__html: label
|
|
18317
|
-
}
|
|
18318
|
-
}));
|
|
18319
|
-
}
|
|
18320
|
-
|
|
18321
|
-
return h("li", {
|
|
18322
|
-
className: cssClasses.item
|
|
18323
|
-
}, h("a", {
|
|
18324
|
-
className: cssClasses.link,
|
|
18325
|
-
"aria-label": ariaLabel,
|
|
18326
|
-
href: url,
|
|
18327
|
-
onClick: function onClick(event) {
|
|
18328
|
-
return handleClick(pageNumber, event);
|
|
18329
|
-
},
|
|
18330
|
-
dangerouslySetInnerHTML: {
|
|
18331
|
-
__html: label
|
|
18332
|
-
}
|
|
18333
|
-
}));
|
|
18334
|
-
};
|
|
18335
|
-
|
|
18336
|
-
var defaultProps$3 = {
|
|
18337
|
-
currentPage: 0,
|
|
18338
|
-
nbPages: 0,
|
|
18339
|
-
pages: []
|
|
18340
|
-
};
|
|
18341
|
-
|
|
18342
|
-
var Pagination = /*#__PURE__*/function (_Component) {
|
|
18343
|
-
_inherits(Pagination, _Component);
|
|
18344
|
-
|
|
18345
|
-
var _super = _createSuper(Pagination);
|
|
18346
|
-
|
|
18347
|
-
function Pagination() {
|
|
18348
|
-
var _this;
|
|
18349
|
-
|
|
18350
|
-
_classCallCheck(this, Pagination);
|
|
18351
|
-
|
|
18352
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
18353
|
-
args[_key] = arguments[_key];
|
|
18354
|
-
}
|
|
18355
|
-
|
|
18356
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
18357
|
-
|
|
18358
|
-
_defineProperty(_assertThisInitialized(_this), "handleClick", function (pageNumber, event) {
|
|
18303
|
+
function Pagination(props) {
|
|
18304
|
+
function createClickHandler(pageNumber) {
|
|
18305
|
+
return function (event) {
|
|
18359
18306
|
if (isSpecialClick(event)) {
|
|
18360
18307
|
// do not alter the default browser behavior
|
|
18361
18308
|
// if one special key is down
|
|
@@ -18363,121 +18310,94 @@
|
|
|
18363
18310
|
}
|
|
18364
18311
|
|
|
18365
18312
|
event.preventDefault();
|
|
18366
|
-
|
|
18367
|
-
|
|
18368
|
-
});
|
|
18369
|
-
|
|
18370
|
-
_defineProperty(_assertThisInitialized(_this), "previousPageLink", function () {
|
|
18371
|
-
return _this.pageLink({
|
|
18372
|
-
ariaLabel: 'Previous',
|
|
18373
|
-
additionalClassName: _this.props.cssClasses.previousPageItem,
|
|
18374
|
-
isDisabled: _this.props.isFirstPage,
|
|
18375
|
-
label: _this.props.templates.previous,
|
|
18376
|
-
pageNumber: _this.props.currentPage - 1,
|
|
18377
|
-
createURL: _this.props.createURL
|
|
18378
|
-
});
|
|
18379
|
-
});
|
|
18380
|
-
|
|
18381
|
-
_defineProperty(_assertThisInitialized(_this), "nextPageLink", function () {
|
|
18382
|
-
return _this.pageLink({
|
|
18383
|
-
ariaLabel: 'Next',
|
|
18384
|
-
additionalClassName: _this.props.cssClasses.nextPageItem,
|
|
18385
|
-
isDisabled: _this.props.isLastPage,
|
|
18386
|
-
label: _this.props.templates.next,
|
|
18387
|
-
pageNumber: _this.props.currentPage + 1,
|
|
18388
|
-
createURL: _this.props.createURL
|
|
18389
|
-
});
|
|
18390
|
-
});
|
|
18391
|
-
|
|
18392
|
-
_defineProperty(_assertThisInitialized(_this), "firstPageLink", function () {
|
|
18393
|
-
return _this.pageLink({
|
|
18394
|
-
ariaLabel: 'First',
|
|
18395
|
-
additionalClassName: _this.props.cssClasses.firstPageItem,
|
|
18396
|
-
isDisabled: _this.props.isFirstPage,
|
|
18397
|
-
label: _this.props.templates.first,
|
|
18398
|
-
pageNumber: 0,
|
|
18399
|
-
createURL: _this.props.createURL
|
|
18400
|
-
});
|
|
18401
|
-
});
|
|
18402
|
-
|
|
18403
|
-
_defineProperty(_assertThisInitialized(_this), "lastPageLink", function () {
|
|
18404
|
-
return _this.pageLink({
|
|
18405
|
-
ariaLabel: 'Last',
|
|
18406
|
-
additionalClassName: _this.props.cssClasses.lastPageItem,
|
|
18407
|
-
isDisabled: _this.props.isLastPage,
|
|
18408
|
-
label: _this.props.templates.last,
|
|
18409
|
-
pageNumber: _this.props.nbPages - 1,
|
|
18410
|
-
createURL: _this.props.createURL
|
|
18411
|
-
});
|
|
18412
|
-
});
|
|
18413
|
-
|
|
18414
|
-
_defineProperty(_assertThisInitialized(_this), "pages", function () {
|
|
18415
|
-
return _this.props.pages.map(function (pageNumber) {
|
|
18416
|
-
return _this.pageLink({
|
|
18417
|
-
ariaLabel: "".concat(pageNumber + 1),
|
|
18418
|
-
additionalClassName: _this.props.cssClasses.pageItem,
|
|
18419
|
-
isSelected: pageNumber === _this.props.currentPage,
|
|
18420
|
-
label: "".concat(pageNumber + 1),
|
|
18421
|
-
pageNumber: pageNumber,
|
|
18422
|
-
createURL: _this.props.createURL
|
|
18423
|
-
});
|
|
18424
|
-
});
|
|
18425
|
-
});
|
|
18426
|
-
|
|
18427
|
-
return _this;
|
|
18313
|
+
props.setCurrentPage(pageNumber);
|
|
18314
|
+
};
|
|
18428
18315
|
}
|
|
18429
18316
|
|
|
18430
|
-
|
|
18431
|
-
|
|
18432
|
-
|
|
18433
|
-
|
|
18434
|
-
|
|
18435
|
-
|
|
18436
|
-
|
|
18437
|
-
|
|
18438
|
-
|
|
18439
|
-
|
|
18440
|
-
|
|
18441
|
-
|
|
18442
|
-
|
|
18443
|
-
|
|
18444
|
-
|
|
18445
|
-
|
|
18446
|
-
|
|
18447
|
-
|
|
18448
|
-
|
|
18449
|
-
|
|
18450
|
-
|
|
18451
|
-
|
|
18452
|
-
|
|
18317
|
+
return v("div", {
|
|
18318
|
+
className: classnames(props.cssClasses.root, _defineProperty({}, props.cssClasses.noRefinementRoot, props.nbPages <= 1))
|
|
18319
|
+
}, v("ul", {
|
|
18320
|
+
className: props.cssClasses.list
|
|
18321
|
+
}, props.showFirst && v(PaginationLink, {
|
|
18322
|
+
ariaLabel: "First",
|
|
18323
|
+
className: props.cssClasses.firstPageItem,
|
|
18324
|
+
isDisabled: props.isFirstPage,
|
|
18325
|
+
label: props.templates.first,
|
|
18326
|
+
pageNumber: 0,
|
|
18327
|
+
createURL: props.createURL,
|
|
18328
|
+
cssClasses: props.cssClasses,
|
|
18329
|
+
createClickHandler: createClickHandler
|
|
18330
|
+
}), props.showPrevious && v(PaginationLink, {
|
|
18331
|
+
ariaLabel: "Previous",
|
|
18332
|
+
className: props.cssClasses.previousPageItem,
|
|
18333
|
+
isDisabled: props.isFirstPage,
|
|
18334
|
+
label: props.templates.previous,
|
|
18335
|
+
pageNumber: props.currentPage - 1,
|
|
18336
|
+
createURL: props.createURL,
|
|
18337
|
+
cssClasses: props.cssClasses,
|
|
18338
|
+
createClickHandler: createClickHandler
|
|
18339
|
+
}), props.pages.map(function (pageNumber) {
|
|
18340
|
+
return v(PaginationLink, {
|
|
18341
|
+
key: pageNumber,
|
|
18342
|
+
ariaLabel: "".concat(pageNumber + 1),
|
|
18343
|
+
className: props.cssClasses.pageItem,
|
|
18344
|
+
isSelected: pageNumber === props.currentPage,
|
|
18345
|
+
label: "".concat(pageNumber + 1),
|
|
18346
|
+
pageNumber: pageNumber,
|
|
18347
|
+
createURL: props.createURL,
|
|
18348
|
+
cssClasses: props.cssClasses,
|
|
18349
|
+
createClickHandler: createClickHandler
|
|
18350
|
+
});
|
|
18351
|
+
}), props.showNext && v(PaginationLink, {
|
|
18352
|
+
ariaLabel: "Next",
|
|
18353
|
+
className: props.cssClasses.nextPageItem,
|
|
18354
|
+
isDisabled: props.isLastPage,
|
|
18355
|
+
label: props.templates.next,
|
|
18356
|
+
pageNumber: props.currentPage + 1,
|
|
18357
|
+
createURL: props.createURL,
|
|
18358
|
+
cssClasses: props.cssClasses,
|
|
18359
|
+
createClickHandler: createClickHandler
|
|
18360
|
+
}), props.showLast && v(PaginationLink, {
|
|
18361
|
+
ariaLabel: "Last",
|
|
18362
|
+
className: props.cssClasses.lastPageItem,
|
|
18363
|
+
isDisabled: props.isLastPage,
|
|
18364
|
+
label: props.templates.last,
|
|
18365
|
+
pageNumber: props.nbPages - 1,
|
|
18366
|
+
createURL: props.createURL,
|
|
18367
|
+
cssClasses: props.cssClasses,
|
|
18368
|
+
createClickHandler: createClickHandler
|
|
18369
|
+
})));
|
|
18370
|
+
}
|
|
18453
18371
|
|
|
18454
|
-
|
|
18455
|
-
|
|
18456
|
-
|
|
18457
|
-
|
|
18458
|
-
|
|
18459
|
-
|
|
18460
|
-
|
|
18461
|
-
|
|
18462
|
-
|
|
18463
|
-
|
|
18464
|
-
|
|
18372
|
+
function PaginationLink(_ref) {
|
|
18373
|
+
var label = _ref.label,
|
|
18374
|
+
ariaLabel = _ref.ariaLabel,
|
|
18375
|
+
pageNumber = _ref.pageNumber,
|
|
18376
|
+
className = _ref.className,
|
|
18377
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
18378
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
18379
|
+
_ref$isSelected = _ref.isSelected,
|
|
18380
|
+
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
18381
|
+
cssClasses = _ref.cssClasses,
|
|
18382
|
+
createURL = _ref.createURL,
|
|
18383
|
+
createClickHandler = _ref.createClickHandler;
|
|
18384
|
+
return v("li", {
|
|
18385
|
+
className: classnames(cssClasses.item, className, isDisabled && cssClasses.disabledItem, isSelected && cssClasses.selectedItem)
|
|
18386
|
+
}, isDisabled ? v("span", {
|
|
18387
|
+
className: cssClasses.link,
|
|
18388
|
+
dangerouslySetInnerHTML: {
|
|
18389
|
+
__html: label
|
|
18465
18390
|
}
|
|
18466
|
-
}, {
|
|
18467
|
-
|
|
18468
|
-
|
|
18469
|
-
|
|
18470
|
-
|
|
18471
|
-
|
|
18472
|
-
|
|
18473
|
-
}, this.props.showFirst && this.firstPageLink(), this.props.showPrevious && this.previousPageLink(), this.pages(), this.props.showNext && this.nextPageLink(), this.props.showLast && this.lastPageLink()));
|
|
18391
|
+
}) : v("a", {
|
|
18392
|
+
className: cssClasses.link,
|
|
18393
|
+
"aria-label": ariaLabel,
|
|
18394
|
+
href: createURL(pageNumber),
|
|
18395
|
+
onClick: createClickHandler(pageNumber),
|
|
18396
|
+
dangerouslySetInnerHTML: {
|
|
18397
|
+
__html: label
|
|
18474
18398
|
}
|
|
18475
|
-
}
|
|
18476
|
-
|
|
18477
|
-
return Pagination;
|
|
18478
|
-
}(m);
|
|
18479
|
-
|
|
18480
|
-
_defineProperty(Pagination, "defaultProps", defaultProps$3);
|
|
18399
|
+
}));
|
|
18400
|
+
}
|
|
18481
18401
|
|
|
18482
18402
|
var suit$h = component('Pagination');
|
|
18483
18403
|
var withUsage$G = createDocumentationMessageGenerator({
|
|
@@ -18517,7 +18437,7 @@
|
|
|
18517
18437
|
}
|
|
18518
18438
|
};
|
|
18519
18439
|
|
|
18520
|
-
|
|
18440
|
+
S(v(Pagination, {
|
|
18521
18441
|
createURL: createURL,
|
|
18522
18442
|
cssClasses: cssClasses,
|
|
18523
18443
|
currentPage: currentRefinement,
|
|
@@ -18619,7 +18539,7 @@
|
|
|
18619
18539
|
scrollToNode: scrollToNode
|
|
18620
18540
|
});
|
|
18621
18541
|
var makeWidget = connectPagination(specializedRenderer, function () {
|
|
18622
|
-
return
|
|
18542
|
+
return S(null, containerNode);
|
|
18623
18543
|
});
|
|
18624
18544
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
18625
18545
|
totalPages: totalPages,
|
|
@@ -18629,23 +18549,23 @@
|
|
|
18629
18549
|
});
|
|
18630
18550
|
};
|
|
18631
18551
|
|
|
18632
|
-
var t$1,r$1,
|
|
18552
|
+
var t$1,u$1,r$1,o$1=0,i=[],c$1=l.__b,f$1=l.__r,e$1=l.diffed,a$1=l.__c,v$1=l.unmount;function m$1(t,r){l.__h&&l.__h(u$1,t,o$1||r),o$1=0;var i=u$1.__H||(u$1.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({}),i.__[t]}function l$1(n){return o$1=1,p$1(w$1,n)}function p$1(n,r,o){var i=m$1(t$1++,2);return i.t=n,i.__c||(i.__=[o?o(r):w$1(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}));}],i.__c=u$1),i.__}function y$1(r,o){var i=m$1(t$1++,3);!l.__s&&k$1(i.__H,o)&&(i.__=r,i.__H=o,u$1.__H.__h.push(i));}function s$1(n){return o$1=5,d$1(function(){return {current:n}},[])}function d$1(n,u){var r=m$1(t$1++,7);return k$1(r.__H,u)&&(r.__=n(),r.__H=u,r.__h=n),r.__}function x$1(){var t;for(i.sort(function(n,t){return n.__v.__b-t.__v.__b});t=i.pop();)if(t.__P)try{t.__H.__h.forEach(g$1),t.__H.__h.forEach(j$1),t.__H.__h=[];}catch(u){t.__H.__h=[],l.__e(u,t.__v);}}l.__b=function(n){u$1=null,c$1&&c$1(n);},l.__r=function(n){f$1&&f$1(n),t$1=0;var r=(u$1=n.__c).__H;r&&(r.__h.forEach(g$1),r.__h.forEach(j$1),r.__h=[]);},l.diffed=function(t){e$1&&e$1(t);var o=t.__c;o&&o.__H&&o.__H.__h.length&&(1!==i.push(o)&&r$1===l.requestAnimationFrame||((r$1=l.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),b$1&&cancelAnimationFrame(t),setTimeout(n);},r=setTimeout(u,100);b$1&&(t=requestAnimationFrame(u));})(x$1)),u$1=null;},l.__c=function(t,u){u.some(function(t){try{t.__h.forEach(g$1),t.__h=t.__h.filter(function(n){return !n.__||j$1(n)});}catch(r){u.some(function(n){n.__h&&(n.__h=[]);}),u=[],l.__e(r,t.__v);}}),a$1&&a$1(t,u);},l.unmount=function(t){v$1&&v$1(t);var u,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{g$1(n);}catch(n){u=n;}}),u&&l.__e(u,r.__v));};var b$1="function"==typeof requestAnimationFrame;function g$1(n){var t=u$1,r=n.__c;"function"==typeof r&&(n.__c=void 0,r()),u$1=t;}function j$1(n){var t=u$1;n.__c=n.__(),u$1=t;}function k$1(n,t){return !n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function w$1(n,t){return "function"==typeof t?t(n):t}
|
|
18633
18553
|
|
|
18634
18554
|
function Panel(props) {
|
|
18635
18555
|
var _cx;
|
|
18636
18556
|
|
|
18637
|
-
var _useState =
|
|
18557
|
+
var _useState = l$1(props.isCollapsed),
|
|
18638
18558
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18639
18559
|
isCollapsed = _useState2[0],
|
|
18640
18560
|
setIsCollapsed = _useState2[1];
|
|
18641
18561
|
|
|
18642
|
-
var _useState3 =
|
|
18562
|
+
var _useState3 = l$1(false),
|
|
18643
18563
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
18644
18564
|
isControlled = _useState4[0],
|
|
18645
18565
|
setIsControlled = _useState4[1];
|
|
18646
18566
|
|
|
18647
|
-
var bodyRef =
|
|
18648
|
-
|
|
18567
|
+
var bodyRef = s$1(null);
|
|
18568
|
+
y$1(function () {
|
|
18649
18569
|
var node = bodyRef.current;
|
|
18650
18570
|
|
|
18651
18571
|
if (!node) {
|
|
@@ -18662,17 +18582,17 @@
|
|
|
18662
18582
|
setIsCollapsed(props.isCollapsed);
|
|
18663
18583
|
}
|
|
18664
18584
|
|
|
18665
|
-
return
|
|
18585
|
+
return v("div", {
|
|
18666
18586
|
className: classnames(props.cssClasses.root, (_cx = {}, _defineProperty(_cx, props.cssClasses.noRefinementRoot, props.hidden), _defineProperty(_cx, props.cssClasses.collapsibleRoot, props.collapsible), _defineProperty(_cx, props.cssClasses.collapsedRoot, isCollapsed), _cx)),
|
|
18667
18587
|
hidden: props.hidden
|
|
18668
|
-
}, props.templates.header &&
|
|
18588
|
+
}, props.templates.header && v("div", {
|
|
18669
18589
|
className: props.cssClasses.header
|
|
18670
|
-
},
|
|
18590
|
+
}, v(Template, {
|
|
18671
18591
|
templates: props.templates,
|
|
18672
18592
|
templateKey: "header",
|
|
18673
18593
|
rootTagName: "span",
|
|
18674
18594
|
data: props.data
|
|
18675
|
-
}), props.collapsible &&
|
|
18595
|
+
}), props.collapsible && v("button", {
|
|
18676
18596
|
className: props.cssClasses.collapseButton,
|
|
18677
18597
|
"aria-expanded": !isCollapsed,
|
|
18678
18598
|
onClick: function onClick(event) {
|
|
@@ -18682,17 +18602,17 @@
|
|
|
18682
18602
|
return !prevIsCollapsed;
|
|
18683
18603
|
});
|
|
18684
18604
|
}
|
|
18685
|
-
},
|
|
18605
|
+
}, v(Template, {
|
|
18686
18606
|
templates: props.templates,
|
|
18687
18607
|
templateKey: "collapseButtonText",
|
|
18688
18608
|
rootTagName: "span",
|
|
18689
18609
|
data: {
|
|
18690
18610
|
collapsed: isCollapsed
|
|
18691
18611
|
}
|
|
18692
|
-
}))),
|
|
18612
|
+
}))), v("div", {
|
|
18693
18613
|
className: props.cssClasses.body,
|
|
18694
18614
|
ref: bodyRef
|
|
18695
|
-
}), props.templates.footer &&
|
|
18615
|
+
}), props.templates.footer && v(Template, {
|
|
18696
18616
|
templates: props.templates,
|
|
18697
18617
|
templateKey: "footer",
|
|
18698
18618
|
rootProps: {
|
|
@@ -18717,7 +18637,7 @@
|
|
|
18717
18637
|
hidden = _ref2.hidden,
|
|
18718
18638
|
collapsible = _ref2.collapsible,
|
|
18719
18639
|
collapsed = _ref2.collapsed;
|
|
18720
|
-
|
|
18640
|
+
S(v(Panel, {
|
|
18721
18641
|
cssClasses: cssClasses,
|
|
18722
18642
|
hidden: hidden,
|
|
18723
18643
|
collapsible: collapsible,
|
|
@@ -18853,7 +18773,7 @@
|
|
|
18853
18773
|
}
|
|
18854
18774
|
},
|
|
18855
18775
|
dispose: function dispose() {
|
|
18856
|
-
|
|
18776
|
+
S(null, containerNode);
|
|
18857
18777
|
|
|
18858
18778
|
if (typeof widget.dispose === 'function') {
|
|
18859
18779
|
var _widget$dispose;
|
|
@@ -18977,12 +18897,12 @@
|
|
|
18977
18897
|
|
|
18978
18898
|
/** @jsx h */
|
|
18979
18899
|
|
|
18980
|
-
var _ref2 =
|
|
18900
|
+
var _ref2 = v("path", {
|
|
18981
18901
|
fill: "#5468FF",
|
|
18982
18902
|
d: "M78.99.94h16.6a2.97 2.97 0 012.96 2.96v16.6a2.97 2.97 0 01-2.97 2.96h-16.6a2.97 2.97 0 01-2.96-2.96V3.9A2.96 2.96 0 0179 .94"
|
|
18983
18903
|
});
|
|
18984
18904
|
|
|
18985
|
-
var _ref3 =
|
|
18905
|
+
var _ref3 = v("path", {
|
|
18986
18906
|
fill: "#FFF",
|
|
18987
18907
|
d: "M89.63 5.97v-.78a.98.98 0 00-.98-.97h-2.28a.98.98 0 00-.97.97V6c0 .09.08.15.17.13a7.13 7.13 0 013.9-.02c.08.02.16-.04.16-.13m-6.25 1L83 6.6a.98.98 0 00-1.38 0l-.46.46a.97.97 0 000 1.38l.38.39c.06.06.15.04.2-.02a7.49 7.49 0 011.63-1.62c.07-.04.08-.14.02-.2m4.16 2.45v3.34c0 .1.1.17.2.12l2.97-1.54c.06-.03.08-.12.05-.18a3.7 3.7 0 00-3.08-1.87c-.07 0-.14.06-.14.13m0 8.05a4.49 4.49 0 110-8.98 4.49 4.49 0 010 8.98m0-10.85a6.37 6.37 0 100 12.74 6.37 6.37 0 000-12.74"
|
|
18988
18908
|
});
|
|
@@ -18991,15 +18911,15 @@
|
|
|
18991
18911
|
var url = _ref.url,
|
|
18992
18912
|
theme = _ref.theme,
|
|
18993
18913
|
cssClasses = _ref.cssClasses;
|
|
18994
|
-
return
|
|
18914
|
+
return v("div", {
|
|
18995
18915
|
className: cssClasses.root
|
|
18996
|
-
},
|
|
18916
|
+
}, v("a", {
|
|
18997
18917
|
href: url,
|
|
18998
18918
|
target: "_blank",
|
|
18999
18919
|
className: cssClasses.link,
|
|
19000
18920
|
"aria-label": "Search by Algolia",
|
|
19001
18921
|
rel: "noopener noreferrer"
|
|
19002
|
-
},
|
|
18922
|
+
}, v("svg", {
|
|
19003
18923
|
height: "1.2em",
|
|
19004
18924
|
className: cssClasses.logo,
|
|
19005
18925
|
viewBox: "0 0 168 24" // This style is necessary as long as it's not included in InstantSearch.css.
|
|
@@ -19008,10 +18928,10 @@
|
|
|
19008
18928
|
style: {
|
|
19009
18929
|
width: 'auto'
|
|
19010
18930
|
}
|
|
19011
|
-
},
|
|
18931
|
+
}, v("path", {
|
|
19012
18932
|
fill: theme === 'dark' ? '#FFF' : '#5D6494',
|
|
19013
18933
|
d: "M6.97 6.68V8.3a4.47 4.47 0 00-2.42-.67 2.2 2.2 0 00-1.38.4c-.34.26-.5.6-.5 1.02 0 .43.16.77.49 1.03.33.25.83.53 1.51.83a7.04 7.04 0 011.9 1.08c.34.24.58.54.73.89.15.34.23.74.23 1.18 0 .95-.33 1.7-1 2.24a4 4 0 01-2.6.81 5.71 5.71 0 01-2.94-.68v-1.71c.84.63 1.81.94 2.92.94.58 0 1.05-.14 1.39-.4.34-.28.5-.65.5-1.13 0-.29-.1-.55-.3-.8a2.2 2.2 0 00-.65-.53 23.03 23.03 0 00-1.64-.78 13.67 13.67 0 01-1.11-.64c-.12-.1-.28-.22-.46-.4a1.72 1.72 0 01-.39-.5 4.46 4.46 0 01-.22-.6c-.07-.23-.1-.48-.1-.75 0-.91.33-1.63 1-2.17a4 4 0 012.57-.8c.97 0 1.8.18 2.47.52zm7.47 5.7v-.3a2.26 2.26 0 00-.5-1.44c-.3-.35-.74-.53-1.32-.53-.53 0-.99.2-1.37.58a2.9 2.9 0 00-.72 1.68h3.91zm1 2.79v1.4c-.6.34-1.38.51-2.36.51a4.02 4.02 0 01-3-1.13 4.04 4.04 0 01-1.11-2.97c0-1.3.34-2.32 1.02-3.06a3.38 3.38 0 012.6-1.1c1.03 0 1.85.32 2.46.96.6.64.9 1.57.9 2.78 0 .33-.03.68-.09 1.04h-5.31c.1.7.4 1.24.89 1.61.49.38 1.1.56 1.85.56.86 0 1.58-.2 2.15-.6zm6.61-1.78h-1.21c-.6 0-1.05.12-1.35.36-.3.23-.46.53-.46.89 0 .37.12.66.36.88.23.2.57.32 1.02.32.5 0 .9-.15 1.2-.43.3-.28.44-.65.44-1.1v-.92zm-4.07-2.55V9.33a4.96 4.96 0 012.5-.55c2.1 0 3.17 1.03 3.17 3.08V17H22.1v-.96c-.42.68-1.15 1.02-2.19 1.02-.76 0-1.38-.22-1.84-.66-.46-.44-.7-1-.7-1.68 0-.78.3-1.38.88-1.81.59-.43 1.4-.65 2.46-.65h1.34v-.46c0-.55-.13-.97-.4-1.25-.26-.29-.7-.43-1.32-.43-.86 0-1.65.24-2.35.72zm9.34-1.93v1.42c.39-1 1.1-1.5 2.12-1.5.15 0 .31.02.5.05v1.53c-.23-.1-.48-.14-.76-.14-.54 0-.99.24-1.34.71a2.8 2.8 0 00-.52 1.71V17h-1.57V8.91h1.57zm5 4.09a3 3 0 00.76 2.01c.47.53 1.14.8 2 .8.64 0 1.24-.18 1.8-.53v1.4c-.53.32-1.2.48-2 .48a3.98 3.98 0 01-4.17-4.18c0-1.16.38-2.15 1.14-2.98a4 4 0 013.1-1.23c.7 0 1.34.15 1.92.44v1.44a3.24 3.24 0 00-1.77-.5A2.65 2.65 0 0032.33 13zm7.92-7.28v4.58c.46-1 1.3-1.5 2.5-1.5.8 0 1.42.24 1.9.73.48.5.72 1.17.72 2.05V17H43.8v-5.1c0-.56-.14-.99-.43-1.29-.28-.3-.65-.45-1.1-.45-.54 0-1 .2-1.42.6-.4.4-.61 1.02-.61 1.85V17h-1.56V5.72h1.56zM55.2 15.74c.6 0 1.1-.25 1.5-.76.4-.5.6-1.16.6-1.95 0-.92-.2-1.62-.6-2.12-.4-.5-.92-.74-1.55-.74-.56 0-1.05.22-1.5.67-.44.45-.66 1.13-.66 2.06 0 .96.22 1.67.64 2.14.43.47.95.7 1.57.7zM53 5.72v4.42a2.74 2.74 0 012.43-1.34c1.03 0 1.86.38 2.51 1.15.65.76.97 1.78.97 3.05 0 1.13-.3 2.1-.92 2.9-.62.81-1.47 1.21-2.54 1.21s-1.9-.45-2.46-1.34V17h-1.58V5.72H53zm9.9 11.1l-3.22-7.9h1.74l1 2.62 1.26 3.42c.1-.32.48-1.46 1.15-3.42l.91-2.63h1.66l-2.92 7.87c-.78 2.07-1.96 3.1-3.56 3.1-.28 0-.53-.02-.73-.07v-1.34c.17.04.35.06.54.06 1.03 0 1.76-.57 2.17-1.7z"
|
|
19014
|
-
}), _ref2, _ref3,
|
|
18934
|
+
}), _ref2, _ref3, v("path", {
|
|
19015
18935
|
fill: theme === 'dark' ? '#FFF' : '#5468FF',
|
|
19016
18936
|
d: "M120.92 18.8c-4.38.02-4.38-3.54-4.38-4.1V1.36l2.67-.42v13.25c0 .32 0 2.36 1.71 2.37v2.24zm-10.84-2.18c.82 0 1.43-.04 1.85-.12v-2.72a5.48 5.48 0 00-1.57-.2c-.3 0-.6.02-.9.07-.3.04-.57.12-.81.24-.24.11-.44.28-.58.49a.93.93 0 00-.22.65c0 .63.22 1 .61 1.23.4.24.94.36 1.62.36zm-.23-9.7c.88 0 1.62.11 2.23.33.6.22 1.09.53 1.44.92.36.4.61.92.76 1.48.16.56.23 1.17.23 1.85v6.87a21.69 21.69 0 01-4.68.5c-.69 0-1.32-.07-1.9-.2a4 4 0 01-1.46-.63 3.3 3.3 0 01-.96-1.13 4.3 4.3 0 01-.34-1.8 3.13 3.13 0 011.43-2.63c.45-.3.95-.5 1.54-.62a8.8 8.8 0 013.79.05v-.44c0-.3-.04-.6-.11-.87a1.78 1.78 0 00-1.1-1.22 3.2 3.2 0 00-1.15-.2 9.75 9.75 0 00-2.95.46l-.33-2.19a11.43 11.43 0 013.56-.53zm52.84 9.63c.82 0 1.43-.05 1.85-.13V13.7a5.42 5.42 0 00-1.57-.2c-.3 0-.6.02-.9.07-.3.04-.57.12-.81.24-.24.12-.44.28-.58.5a.93.93 0 00-.22.65c0 .63.22.99.61 1.23.4.24.94.36 1.62.36zm-.23-9.7c.88 0 1.63.11 2.23.33.6.22 1.1.53 1.45.92.35.39.6.92.76 1.48.15.56.23 1.18.23 1.85v6.88c-.41.08-1.03.19-1.87.31-.83.12-1.77.18-2.81.18-.7 0-1.33-.06-1.9-.2a4 4 0 01-1.47-.63c-.4-.3-.72-.67-.95-1.13a4.3 4.3 0 01-.34-1.8c0-.66.13-1.08.38-1.53.26-.45.61-.82 1.05-1.1.44-.3.95-.5 1.53-.62a8.8 8.8 0 013.8.05v-.43c0-.31-.04-.6-.12-.88-.07-.28-.2-.52-.38-.73a1.78 1.78 0 00-.73-.5c-.3-.1-.68-.2-1.14-.2a9.85 9.85 0 00-2.95.47l-.32-2.19a11.63 11.63 0 013.55-.53zm-8.03-1.27a1.62 1.62 0 000-3.24 1.62 1.62 0 100 3.24zm1.35 13.22h-2.7V7.27l2.7-.42V18.8zm-4.72 0c-4.38.02-4.38-3.54-4.38-4.1l-.01-13.34 2.67-.42v13.25c0 .32 0 2.36 1.72 2.37v2.24zm-8.7-5.9a4.7 4.7 0 00-.74-2.79 2.4 2.4 0 00-2.07-1 2.4 2.4 0 00-2.06 1 4.7 4.7 0 00-.74 2.8c0 1.16.25 1.94.74 2.62a2.4 2.4 0 002.07 1.02c.88 0 1.57-.34 2.07-1.02a4.2 4.2 0 00.73-2.63zm2.74 0a6.46 6.46 0 01-1.52 4.23c-.49.53-1.07.94-1.76 1.22-.68.29-1.73.45-2.26.45a6.6 6.6 0 01-2.25-.45 5.1 5.1 0 01-2.88-3.13 7.3 7.3 0 01-.01-4.84 5.13 5.13 0 012.9-3.1 5.67 5.67 0 012.22-.42c.81 0 1.56.14 2.24.42.69.29 1.28.69 1.75 1.22.49.52.87 1.15 1.14 1.89a7 7 0 01.43 2.5zm-20.14 0c0 1.11.25 2.36.74 2.88.5.52 1.13.78 1.91.78a4.07 4.07 0 002.12-.6V9.33c-.19-.04-.99-.2-1.76-.23a2.67 2.67 0 00-2.23 1 4.73 4.73 0 00-.78 2.8zm7.44 5.27c0 1.82-.46 3.16-1.4 4-.94.85-2.37 1.27-4.3 1.27-.7 0-2.17-.13-3.34-.4l.43-2.11c.98.2 2.27.26 2.95.26 1.08 0 1.84-.22 2.3-.66.46-.43.68-1.08.68-1.94v-.44a5.2 5.2 0 01-2.54.6 5.6 5.6 0 01-2.01-.36 4.2 4.2 0 01-2.58-2.71 9.88 9.88 0 01.02-5.35 4.92 4.92 0 012.93-2.96 6.6 6.6 0 012.43-.46 19.64 19.64 0 014.43.66v10.6z"
|
|
19017
18937
|
}))));
|
|
@@ -19032,7 +18952,7 @@
|
|
|
19032
18952
|
if (isFirstRendering) {
|
|
19033
18953
|
var _widgetParams$theme = widgetParams.theme,
|
|
19034
18954
|
theme = _widgetParams$theme === void 0 ? 'light' : _widgetParams$theme;
|
|
19035
|
-
|
|
18955
|
+
S(v(PoweredBy, {
|
|
19036
18956
|
cssClasses: cssClasses,
|
|
19037
18957
|
url: url,
|
|
19038
18958
|
theme: theme
|
|
@@ -19071,7 +18991,7 @@
|
|
|
19071
18991
|
cssClasses: cssClasses
|
|
19072
18992
|
});
|
|
19073
18993
|
var makeWidget = connectPoweredBy(specializedRenderer, function () {
|
|
19074
|
-
return
|
|
18994
|
+
return S(null, containerNode);
|
|
19075
18995
|
});
|
|
19076
18996
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
19077
18997
|
theme: theme
|
|
@@ -19102,7 +19022,7 @@
|
|
|
19102
19022
|
var cssClasses = _ref.cssClasses,
|
|
19103
19023
|
templates = _ref.templates,
|
|
19104
19024
|
items = _ref.items;
|
|
19105
|
-
return
|
|
19025
|
+
return v(Template, {
|
|
19106
19026
|
templateKey: "default",
|
|
19107
19027
|
templates: templates,
|
|
19108
19028
|
rootProps: {
|
|
@@ -19131,7 +19051,7 @@
|
|
|
19131
19051
|
templates = _ref2.templates;
|
|
19132
19052
|
return function (_ref3) {
|
|
19133
19053
|
var items = _ref3.items;
|
|
19134
|
-
|
|
19054
|
+
S(v(QueryRuleCustomData, {
|
|
19135
19055
|
cssClasses: cssClasses,
|
|
19136
19056
|
templates: templates,
|
|
19137
19057
|
items: items
|
|
@@ -19169,7 +19089,7 @@
|
|
|
19169
19089
|
templates: templates
|
|
19170
19090
|
});
|
|
19171
19091
|
var makeWidget = connectQueryRules(specializedRenderer, function () {
|
|
19172
|
-
|
|
19092
|
+
S(null, containerNode);
|
|
19173
19093
|
});
|
|
19174
19094
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
19175
19095
|
transformItems: transformItems
|
|
@@ -19240,14 +19160,14 @@
|
|
|
19240
19160
|
var isDisabled = min && max ? min >= max : false;
|
|
19241
19161
|
var hasRefinements = Boolean(minValue || maxValue);
|
|
19242
19162
|
var rootClassNames = classnames(cssClasses.root, _defineProperty({}, cssClasses.noRefinement, !hasRefinements));
|
|
19243
|
-
return
|
|
19163
|
+
return v("div", {
|
|
19244
19164
|
className: rootClassNames
|
|
19245
|
-
},
|
|
19165
|
+
}, v("form", {
|
|
19246
19166
|
className: cssClasses.form,
|
|
19247
19167
|
onSubmit: this.onSubmit
|
|
19248
|
-
},
|
|
19168
|
+
}, v("label", {
|
|
19249
19169
|
className: cssClasses.label
|
|
19250
|
-
},
|
|
19170
|
+
}, v("input", {
|
|
19251
19171
|
className: classnames(cssClasses.input, cssClasses.inputMin),
|
|
19252
19172
|
type: "number",
|
|
19253
19173
|
min: min,
|
|
@@ -19257,15 +19177,15 @@
|
|
|
19257
19177
|
onInput: this.onInput('min'),
|
|
19258
19178
|
placeholder: min === null || min === void 0 ? void 0 : min.toString(),
|
|
19259
19179
|
disabled: isDisabled
|
|
19260
|
-
})),
|
|
19180
|
+
})), v(Template, _extends({}, templateProps, {
|
|
19261
19181
|
templateKey: "separatorText",
|
|
19262
19182
|
rootTagName: "span",
|
|
19263
19183
|
rootProps: {
|
|
19264
19184
|
className: cssClasses.separator
|
|
19265
19185
|
}
|
|
19266
|
-
})),
|
|
19186
|
+
})), v("label", {
|
|
19267
19187
|
className: cssClasses.label
|
|
19268
|
-
},
|
|
19188
|
+
}, v("input", {
|
|
19269
19189
|
className: classnames(cssClasses.input, cssClasses.inputMax),
|
|
19270
19190
|
type: "number",
|
|
19271
19191
|
min: min,
|
|
@@ -19275,7 +19195,7 @@
|
|
|
19275
19195
|
onInput: this.onInput('max'),
|
|
19276
19196
|
placeholder: max === null || max === void 0 ? void 0 : max.toString(),
|
|
19277
19197
|
disabled: isDisabled
|
|
19278
|
-
})),
|
|
19198
|
+
})), v(Template, _extends({}, templateProps, {
|
|
19279
19199
|
templateKey: "submitText",
|
|
19280
19200
|
rootTagName: "button",
|
|
19281
19201
|
rootProps: {
|
|
@@ -19288,7 +19208,7 @@
|
|
|
19288
19208
|
}]);
|
|
19289
19209
|
|
|
19290
19210
|
return RangeInput;
|
|
19291
|
-
}(
|
|
19211
|
+
}(_);
|
|
19292
19212
|
|
|
19293
19213
|
var withUsage$L = createDocumentationMessageGenerator({
|
|
19294
19214
|
name: 'range-input'
|
|
@@ -19332,7 +19252,7 @@
|
|
|
19332
19252
|
min: minValue !== -Infinity && minValue !== rangeMin ? minValue : undefined,
|
|
19333
19253
|
max: maxValue !== Infinity && maxValue !== rangeMax ? maxValue : undefined
|
|
19334
19254
|
};
|
|
19335
|
-
|
|
19255
|
+
S(v(RangeInput, {
|
|
19336
19256
|
min: rangeMin,
|
|
19337
19257
|
max: rangeMax,
|
|
19338
19258
|
step: step,
|
|
@@ -19398,7 +19318,7 @@
|
|
|
19398
19318
|
renderState: {}
|
|
19399
19319
|
});
|
|
19400
19320
|
var makeWidget = connectRange(specializedRenderer, function () {
|
|
19401
|
-
return
|
|
19321
|
+
return S(null, containerNode);
|
|
19402
19322
|
});
|
|
19403
19323
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
19404
19324
|
attribute: attribute,
|
|
@@ -19456,14 +19376,14 @@
|
|
|
19456
19376
|
}
|
|
19457
19377
|
|
|
19458
19378
|
function Button(props) {
|
|
19459
|
-
return
|
|
19379
|
+
return v("button", _extends({}, props, {
|
|
19460
19380
|
type: "button"
|
|
19461
19381
|
}));
|
|
19462
19382
|
} // Preact doesn't have builtin types for Style, JSX.HTMLAttributes['style'] is just object
|
|
19463
19383
|
// maybe migrate to csstype later?
|
|
19464
19384
|
|
|
19465
19385
|
|
|
19466
|
-
var _ref6 =
|
|
19386
|
+
var _ref6 = v("div", {
|
|
19467
19387
|
className: "rheostat-background"
|
|
19468
19388
|
});
|
|
19469
19389
|
|
|
@@ -19997,7 +19917,7 @@
|
|
|
19997
19917
|
className = _this$state6.className,
|
|
19998
19918
|
handlePos = _this$state6.handlePos,
|
|
19999
19919
|
values = _this$state6.values;
|
|
20000
|
-
return
|
|
19920
|
+
return v("div", {
|
|
20001
19921
|
className: className,
|
|
20002
19922
|
ref: this.rheostat,
|
|
20003
19923
|
onClick: disabled ? undefined : this.handleClick,
|
|
@@ -20012,7 +19932,7 @@
|
|
|
20012
19932
|
left: "".concat(pos, "%"),
|
|
20013
19933
|
position: 'absolute'
|
|
20014
19934
|
};
|
|
20015
|
-
return
|
|
19935
|
+
return v(Handle, {
|
|
20016
19936
|
"aria-valuemax": _this7.getMaxValue(idx),
|
|
20017
19937
|
"aria-valuemin": _this7.getMinValue(idx),
|
|
20018
19938
|
"aria-valuenow": values[idx],
|
|
@@ -20033,7 +19953,7 @@
|
|
|
20033
19953
|
return null;
|
|
20034
19954
|
}
|
|
20035
19955
|
|
|
20036
|
-
return
|
|
19956
|
+
return v(ProgressBar, {
|
|
20037
19957
|
className: "rheostat-progress",
|
|
20038
19958
|
key: "progress-bar-".concat(idx),
|
|
20039
19959
|
style: _this7.getProgressStyle(idx)
|
|
@@ -20047,7 +19967,7 @@
|
|
|
20047
19967
|
left: "".concat(pos, "%"),
|
|
20048
19968
|
position: 'absolute'
|
|
20049
19969
|
};
|
|
20050
|
-
return
|
|
19970
|
+
return v(PitComponent, {
|
|
20051
19971
|
key: "pit-".concat(n),
|
|
20052
19972
|
style: pitStyle
|
|
20053
19973
|
}, n);
|
|
@@ -20056,7 +19976,7 @@
|
|
|
20056
19976
|
}]);
|
|
20057
19977
|
|
|
20058
19978
|
return Rheostat;
|
|
20059
|
-
}(
|
|
19979
|
+
}(_);
|
|
20060
19980
|
|
|
20061
19981
|
_defineProperty(Rheostat, "defaultProps", {
|
|
20062
19982
|
className: '',
|
|
@@ -20089,14 +20009,14 @@
|
|
|
20089
20009
|
var shouldDisplayValue = [0, 50, 100].includes(positionValue);
|
|
20090
20010
|
var value = children;
|
|
20091
20011
|
var pitValue = Math.round(parseInt(value, 10) * 100) / 100;
|
|
20092
|
-
return
|
|
20012
|
+
return v("div", {
|
|
20093
20013
|
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
20094
20014
|
marginLeft: positionValue === 100 ? '-2px' : 0
|
|
20095
20015
|
}),
|
|
20096
20016
|
className: classnames('rheostat-marker', 'rheostat-marker-horizontal', {
|
|
20097
20017
|
'rheostat-marker-large': shouldDisplayValue
|
|
20098
20018
|
})
|
|
20099
|
-
}, shouldDisplayValue &&
|
|
20019
|
+
}, shouldDisplayValue && v("div", {
|
|
20100
20020
|
className: 'rheostat-value'
|
|
20101
20021
|
}, pitValue));
|
|
20102
20022
|
};
|
|
@@ -20136,9 +20056,9 @@
|
|
|
20136
20056
|
'rheostat-handle-lower': props['data-handle-key'] === 0,
|
|
20137
20057
|
'rheostat-handle-upper': props['data-handle-key'] === 1
|
|
20138
20058
|
});
|
|
20139
|
-
return
|
|
20059
|
+
return v("div", _extends({}, props, {
|
|
20140
20060
|
className: className
|
|
20141
|
-
}), tooltips &&
|
|
20061
|
+
}), tooltips && v("div", {
|
|
20142
20062
|
className: "rheostat-tooltip"
|
|
20143
20063
|
}, value));
|
|
20144
20064
|
};
|
|
@@ -20208,9 +20128,9 @@
|
|
|
20208
20128
|
min: min,
|
|
20209
20129
|
max: max
|
|
20210
20130
|
});
|
|
20211
|
-
return
|
|
20131
|
+
return v("div", {
|
|
20212
20132
|
className: classnames(cssClasses.root, _defineProperty({}, cssClasses.disabledRoot, this.isDisabled))
|
|
20213
|
-
},
|
|
20133
|
+
}, v(Rheostat, {
|
|
20214
20134
|
handle: this.createHandleComponent(tooltips),
|
|
20215
20135
|
onChange: this.handleChange,
|
|
20216
20136
|
min: min,
|
|
@@ -20226,7 +20146,7 @@
|
|
|
20226
20146
|
}]);
|
|
20227
20147
|
|
|
20228
20148
|
return Slider;
|
|
20229
|
-
}(
|
|
20149
|
+
}(_);
|
|
20230
20150
|
|
|
20231
20151
|
var withUsage$M = createDocumentationMessageGenerator({
|
|
20232
20152
|
name: 'range-slider'
|
|
@@ -20262,7 +20182,7 @@
|
|
|
20262
20182
|
// backward compatible so we still need to pass [-Infinity, Infinity]
|
|
20263
20183
|
|
|
20264
20184
|
var values = [minFinite > maxRange ? maxRange : minFinite, maxFinite < minRange ? minRange : maxFinite];
|
|
20265
|
-
|
|
20185
|
+
S(v(Slider, {
|
|
20266
20186
|
cssClasses: cssClasses,
|
|
20267
20187
|
refine: refine,
|
|
20268
20188
|
min: minRange,
|
|
@@ -20321,7 +20241,7 @@
|
|
|
20321
20241
|
cssClasses: cssClasses
|
|
20322
20242
|
});
|
|
20323
20243
|
var makeWidget = connectRange(specializedRenderer, function () {
|
|
20324
|
-
return
|
|
20244
|
+
return S(null, containerNode);
|
|
20325
20245
|
});
|
|
20326
20246
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
20327
20247
|
attribute: attribute,
|
|
@@ -20343,11 +20263,11 @@
|
|
|
20343
20263
|
});
|
|
20344
20264
|
var suit$n = component('RatingMenu');
|
|
20345
20265
|
|
|
20346
|
-
var _ref3$1 =
|
|
20266
|
+
var _ref3$1 = v("path", {
|
|
20347
20267
|
d: "M12 .288l2.833 8.718h9.167l-7.417 5.389 2.833 8.718-7.416-5.388-7.417 5.388 2.833-8.718-7.416-5.389h9.167z"
|
|
20348
20268
|
});
|
|
20349
20269
|
|
|
20350
|
-
var _ref4 =
|
|
20270
|
+
var _ref4 = v("path", {
|
|
20351
20271
|
d: "M12 6.76l1.379 4.246h4.465l-3.612 2.625 1.379 4.246-3.611-2.625-3.612 2.625 1.379-4.246-3.612-2.625h4.465l1.38-4.246zm0-6.472l-2.833 8.718h-9.167l7.416 5.389-2.833 8.718 7.417-5.388 7.416 5.388-2.833-8.718 7.417-5.389h-9.167l-2.833-8.718z"
|
|
20352
20272
|
});
|
|
20353
20273
|
|
|
@@ -20371,20 +20291,20 @@
|
|
|
20371
20291
|
return;
|
|
20372
20292
|
}
|
|
20373
20293
|
|
|
20374
|
-
|
|
20294
|
+
S(v(RefinementList$1, {
|
|
20375
20295
|
createURL: createURL,
|
|
20376
20296
|
cssClasses: cssClasses,
|
|
20377
20297
|
facetValues: items,
|
|
20378
20298
|
templateProps: renderState.templateProps,
|
|
20379
20299
|
toggleRefinement: refine
|
|
20380
|
-
},
|
|
20300
|
+
}, v("svg", {
|
|
20381
20301
|
style: "display:none;"
|
|
20382
|
-
},
|
|
20302
|
+
}, v("symbol", {
|
|
20383
20303
|
id: suit$n({
|
|
20384
20304
|
descendantName: 'starSymbol'
|
|
20385
20305
|
}),
|
|
20386
20306
|
viewBox: "0 0 24 24"
|
|
20387
|
-
}, _ref3$1),
|
|
20307
|
+
}, _ref3$1), v("symbol", {
|
|
20388
20308
|
id: suit$n({
|
|
20389
20309
|
descendantName: 'starEmptySymbol'
|
|
20390
20310
|
}),
|
|
@@ -20483,7 +20403,7 @@
|
|
|
20483
20403
|
templates: templates
|
|
20484
20404
|
});
|
|
20485
20405
|
var makeWidget = connectRatingMenu(specializedRenderer, function () {
|
|
20486
|
-
return
|
|
20406
|
+
return S(null, containerNode);
|
|
20487
20407
|
});
|
|
20488
20408
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
20489
20409
|
attribute: attribute,
|
|
@@ -20547,7 +20467,7 @@
|
|
|
20547
20467
|
return;
|
|
20548
20468
|
}
|
|
20549
20469
|
|
|
20550
|
-
|
|
20470
|
+
S(v(RefinementList$1, {
|
|
20551
20471
|
createURL: createURL,
|
|
20552
20472
|
cssClasses: cssClasses,
|
|
20553
20473
|
facetValues: items,
|
|
@@ -20699,7 +20619,7 @@
|
|
|
20699
20619
|
showMore: showMore
|
|
20700
20620
|
});
|
|
20701
20621
|
var makeWidget = connectRefinementList(specializedRenderer, function () {
|
|
20702
|
-
return
|
|
20622
|
+
return S(null, containerNode);
|
|
20703
20623
|
});
|
|
20704
20624
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
20705
20625
|
attribute: attribute,
|
|
@@ -20723,9 +20643,9 @@
|
|
|
20723
20643
|
isRelevantSorted = _ref.isRelevantSorted,
|
|
20724
20644
|
isVirtualReplica = _ref.isVirtualReplica,
|
|
20725
20645
|
refine = _ref.refine;
|
|
20726
|
-
return isVirtualReplica ?
|
|
20646
|
+
return isVirtualReplica ? v("div", {
|
|
20727
20647
|
className: cssClasses.root
|
|
20728
|
-
},
|
|
20648
|
+
}, v(Template, {
|
|
20729
20649
|
templateKey: "text",
|
|
20730
20650
|
templates: templates,
|
|
20731
20651
|
rootProps: {
|
|
@@ -20734,7 +20654,7 @@
|
|
|
20734
20654
|
data: {
|
|
20735
20655
|
isRelevantSorted: isRelevantSorted
|
|
20736
20656
|
}
|
|
20737
|
-
}),
|
|
20657
|
+
}), v("button", {
|
|
20738
20658
|
type: "button",
|
|
20739
20659
|
className: cssClasses.button,
|
|
20740
20660
|
onClick: function onClick() {
|
|
@@ -20744,7 +20664,7 @@
|
|
|
20744
20664
|
refine(undefined);
|
|
20745
20665
|
}
|
|
20746
20666
|
}
|
|
20747
|
-
},
|
|
20667
|
+
}, v(Template, {
|
|
20748
20668
|
rootTagName: "span",
|
|
20749
20669
|
templateKey: "button",
|
|
20750
20670
|
templates: templates,
|
|
@@ -20775,7 +20695,7 @@
|
|
|
20775
20695
|
var isRelevantSorted = _ref2.isRelevantSorted,
|
|
20776
20696
|
isVirtualReplica = _ref2.isVirtualReplica,
|
|
20777
20697
|
refine = _ref2.refine;
|
|
20778
|
-
|
|
20698
|
+
S(v(RelevantSort, {
|
|
20779
20699
|
cssClasses: cssClasses,
|
|
20780
20700
|
templates: templates,
|
|
20781
20701
|
isRelevantSorted: isRelevantSorted,
|
|
@@ -20816,7 +20736,7 @@
|
|
|
20816
20736
|
templates: templates
|
|
20817
20737
|
});
|
|
20818
20738
|
var makeWidget = connectRelevantSort(specializedRenderer, function () {
|
|
20819
|
-
|
|
20739
|
+
S(null, containerNode);
|
|
20820
20740
|
});
|
|
20821
20741
|
return _objectSpread2(_objectSpread2({}, makeWidget({})), {}, {
|
|
20822
20742
|
$$widgetType: 'ais.relevantSort'
|
|
@@ -20842,7 +20762,7 @@
|
|
|
20842
20762
|
var refine = _ref2.refine,
|
|
20843
20763
|
query = _ref2.query,
|
|
20844
20764
|
isSearchStalled = _ref2.isSearchStalled;
|
|
20845
|
-
|
|
20765
|
+
S(v(SearchBox, {
|
|
20846
20766
|
query: query,
|
|
20847
20767
|
placeholder: placeholder,
|
|
20848
20768
|
autofocus: autofocus,
|
|
@@ -20935,7 +20855,7 @@
|
|
|
20935
20855
|
showLoadingIndicator: showLoadingIndicator
|
|
20936
20856
|
});
|
|
20937
20857
|
var makeWidget = connectSearchBox(specializedRenderer, function () {
|
|
20938
|
-
return
|
|
20858
|
+
return S(null, containerNode);
|
|
20939
20859
|
});
|
|
20940
20860
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
20941
20861
|
queryHook: queryHook
|
|
@@ -20961,9 +20881,9 @@
|
|
|
20961
20881
|
return;
|
|
20962
20882
|
}
|
|
20963
20883
|
|
|
20964
|
-
|
|
20884
|
+
S(v("div", {
|
|
20965
20885
|
className: cssClasses.root
|
|
20966
|
-
},
|
|
20886
|
+
}, v(Selector, {
|
|
20967
20887
|
cssClasses: cssClasses,
|
|
20968
20888
|
currentValue: currentRefinement,
|
|
20969
20889
|
options: options,
|
|
@@ -21004,7 +20924,7 @@
|
|
|
21004
20924
|
cssClasses: cssClasses
|
|
21005
20925
|
});
|
|
21006
20926
|
var makeWidget = connectSortBy(specializedRenderer, function () {
|
|
21007
|
-
return
|
|
20927
|
+
return S(null, containerNode);
|
|
21008
20928
|
});
|
|
21009
20929
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
21010
20930
|
container: containerNode,
|
|
@@ -21022,9 +20942,9 @@
|
|
|
21022
20942
|
templateProps = _ref.templateProps,
|
|
21023
20943
|
rest = _objectWithoutProperties(_ref, ["nbHits", "nbSortedHits", "cssClasses", "templateProps"]);
|
|
21024
20944
|
|
|
21025
|
-
return
|
|
20945
|
+
return v("div", {
|
|
21026
20946
|
className: classnames(cssClasses.root)
|
|
21027
|
-
},
|
|
20947
|
+
}, v(Template, _extends({}, templateProps, {
|
|
21028
20948
|
templateKey: "text",
|
|
21029
20949
|
rootTagName: "span",
|
|
21030
20950
|
rootProps: {
|
|
@@ -21077,7 +20997,7 @@
|
|
|
21077
20997
|
return;
|
|
21078
20998
|
}
|
|
21079
20999
|
|
|
21080
|
-
|
|
21000
|
+
S(v(Stats, {
|
|
21081
21001
|
cssClasses: cssClasses,
|
|
21082
21002
|
hitsPerPage: hitsPerPage,
|
|
21083
21003
|
nbHits: nbHits,
|
|
@@ -21125,7 +21045,7 @@
|
|
|
21125
21045
|
renderState: {}
|
|
21126
21046
|
});
|
|
21127
21047
|
var makeWidget = connectStats(specializedRenderer, function () {
|
|
21128
|
-
return
|
|
21048
|
+
return S(null, containerNode);
|
|
21129
21049
|
});
|
|
21130
21050
|
return _objectSpread2(_objectSpread2({}, makeWidget({})), {}, {
|
|
21131
21051
|
$$widgetType: 'ais.stats'
|
|
@@ -21137,11 +21057,11 @@
|
|
|
21137
21057
|
refine = _ref.refine,
|
|
21138
21058
|
cssClasses = _ref.cssClasses,
|
|
21139
21059
|
templateProps = _ref.templateProps;
|
|
21140
|
-
return
|
|
21060
|
+
return v("div", {
|
|
21141
21061
|
className: cssClasses.root
|
|
21142
|
-
},
|
|
21062
|
+
}, v("label", {
|
|
21143
21063
|
className: cssClasses.label
|
|
21144
|
-
},
|
|
21064
|
+
}, v("input", {
|
|
21145
21065
|
className: cssClasses.checkbox,
|
|
21146
21066
|
type: "checkbox",
|
|
21147
21067
|
checked: currentRefinement.isRefined,
|
|
@@ -21150,7 +21070,7 @@
|
|
|
21150
21070
|
isRefined: !event.target.checked
|
|
21151
21071
|
});
|
|
21152
21072
|
}
|
|
21153
|
-
}),
|
|
21073
|
+
}), v(Template, _extends({}, templateProps, {
|
|
21154
21074
|
rootTagName: "span",
|
|
21155
21075
|
rootProps: {
|
|
21156
21076
|
className: cssClasses.labelText
|
|
@@ -21188,7 +21108,7 @@
|
|
|
21188
21108
|
return;
|
|
21189
21109
|
}
|
|
21190
21110
|
|
|
21191
|
-
|
|
21111
|
+
S(v(ToggleRefinement, {
|
|
21192
21112
|
cssClasses: cssClasses,
|
|
21193
21113
|
currentRefinement: value,
|
|
21194
21114
|
templateProps: renderState.templateProps,
|
|
@@ -21245,7 +21165,7 @@
|
|
|
21245
21165
|
templates: templates
|
|
21246
21166
|
});
|
|
21247
21167
|
var makeWidget = connectToggleRefinement(specializedRenderer, function () {
|
|
21248
|
-
return
|
|
21168
|
+
return S(null, containerNode);
|
|
21249
21169
|
});
|
|
21250
21170
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
21251
21171
|
attribute: attribute,
|
|
@@ -21278,9 +21198,9 @@
|
|
|
21278
21198
|
transcript = voiceListeningState.transcript,
|
|
21279
21199
|
isSpeechFinal = voiceListeningState.isSpeechFinal,
|
|
21280
21200
|
errorCode = voiceListeningState.errorCode;
|
|
21281
|
-
return
|
|
21201
|
+
return v("div", {
|
|
21282
21202
|
className: cssClasses.root
|
|
21283
|
-
},
|
|
21203
|
+
}, v(Template, {
|
|
21284
21204
|
templateKey: "buttonText",
|
|
21285
21205
|
rootTagName: "button",
|
|
21286
21206
|
rootProps: {
|
|
@@ -21299,7 +21219,7 @@
|
|
|
21299
21219
|
isBrowserSupported: isBrowserSupported
|
|
21300
21220
|
},
|
|
21301
21221
|
templates: templates
|
|
21302
|
-
}),
|
|
21222
|
+
}), v(Template, {
|
|
21303
21223
|
templateKey: "status",
|
|
21304
21224
|
rootProps: {
|
|
21305
21225
|
className: cssClasses.status
|
|
@@ -21348,7 +21268,7 @@
|
|
|
21348
21268
|
isListening = _ref2.isListening,
|
|
21349
21269
|
toggleListening = _ref2.toggleListening,
|
|
21350
21270
|
voiceListeningState = _ref2.voiceListeningState;
|
|
21351
|
-
|
|
21271
|
+
S(v(VoiceSearch, {
|
|
21352
21272
|
cssClasses: cssClasses,
|
|
21353
21273
|
templates: templates,
|
|
21354
21274
|
isBrowserSupported: isBrowserSupported,
|
|
@@ -21395,7 +21315,7 @@
|
|
|
21395
21315
|
templates: templates
|
|
21396
21316
|
});
|
|
21397
21317
|
var makeWidget = connectVoiceSearch(specializedRenderer, function () {
|
|
21398
|
-
return
|
|
21318
|
+
return S(null, containerNode);
|
|
21399
21319
|
});
|
|
21400
21320
|
return _objectSpread2(_objectSpread2({}, makeWidget({
|
|
21401
21321
|
container: containerNode,
|