@mjhls/mjh-framework 1.0.875 → 1.0.876
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/README.md +1 -1
- package/dist/cjs/AD.js +10 -9
- package/dist/cjs/AD300x250.js +28 -27
- package/dist/cjs/AD300x250x600.js +28 -27
- package/dist/cjs/AD728x90.js +31 -30
- package/dist/cjs/ADFloatingFooter.js +31 -30
- package/dist/cjs/ADFooter.js +13 -12
- package/dist/cjs/ADGutter.js +31 -30
- package/dist/cjs/{ADInfeed-326c6278.js → ADInfeed-b9e5ff3f.js} +15 -13
- package/dist/cjs/ADSkyscraper.js +31 -30
- package/dist/cjs/ADSponsoredResources.js +31 -30
- package/dist/cjs/ADWebcast.js +31 -30
- package/dist/cjs/ADWelcome.js +32 -31
- package/dist/cjs/{ADlgInfeed-a14f79ce.js → ADlgInfeed-3cdefebd.js} +11 -10
- package/dist/cjs/AccordionPanel.js +29 -27
- package/dist/cjs/AdSlot.js +32 -31
- package/dist/cjs/AdSlotsProvider.js +17 -15
- package/dist/cjs/AlgoliaSearch.js +1033 -1042
- package/dist/cjs/AlphabeticList.js +24 -23
- package/dist/cjs/ArticleCarousel.js +20 -19
- package/dist/cjs/ArticleProgramLandingPage.js +58 -57
- package/dist/cjs/ArticleSeriesLandingPage.js +39 -38
- package/dist/cjs/ArticleSeriesListing.js +60 -59
- package/dist/cjs/Auth.js +287 -283
- package/dist/cjs/AuthWrapper.js +45 -44
- package/dist/cjs/{AuthorComponent-421d5ec1.js → AuthorComponent-39b37d84.js} +14 -13
- package/dist/cjs/Beam.js +6 -6
- package/dist/cjs/{BlockContent-bac780ac.js → BlockContent-36e54d77.js} +56 -55
- package/dist/cjs/Breadcrumbs.js +27 -25
- package/dist/cjs/CMEDeck.js +81 -81
- package/dist/cjs/Column1.js +14 -11
- package/dist/cjs/Column2.js +34 -31
- package/dist/cjs/Column3.js +59 -56
- package/dist/cjs/ConferenceArticleCard.js +26 -25
- package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
- package/dist/cjs/DeckContent.js +96 -92
- package/dist/cjs/DeckQueue.js +90 -86
- package/dist/cjs/{Dfp-57cecb43.js → Dfp-9be904d5.js} +33 -32
- package/dist/cjs/EventsDeck.js +140 -133
- package/dist/cjs/ExternalResources.js +79 -78
- package/dist/cjs/Feature.js +28 -26
- package/dist/cjs/ForbesHero.js +41 -40
- package/dist/cjs/GridContent.js +236 -231
- package/dist/cjs/GridHero.js +43 -42
- package/dist/cjs/GroupDeck.js +58 -57
- package/dist/cjs/HamMagazine.js +131 -126
- package/dist/cjs/Header.js +14 -12
- package/dist/cjs/Hero.js +16 -15
- package/dist/cjs/HighlightenVideo.js +18 -17
- package/dist/cjs/HorizontalArticleListing.js +72 -71
- package/dist/cjs/HorizontalHero.js +28 -27
- package/dist/cjs/IssueContentDeck.js +76 -71
- package/dist/cjs/IssueDeck.js +75 -70
- package/dist/cjs/IssueLanding.js +65 -64
- package/dist/cjs/LeftNav.js +39 -37
- package/dist/cjs/MasterDeck.js +71 -70
- package/dist/cjs/MediaSeriesLanding.js +978 -986
- package/dist/cjs/NavDvm.js +77 -72
- package/dist/cjs/{NavFooter-76c913e3.js → NavFooter-3dcd99a8.js} +15 -14
- package/dist/cjs/NavMagazine.js +138 -133
- package/dist/cjs/NavNative.js +134 -126
- package/dist/cjs/OncliveHero.js +22 -21
- package/dist/cjs/OncliveLargeHero.js +71 -70
- package/dist/cjs/PageFilter.js +13 -12
- package/dist/cjs/PartnerDetailListing.js +113 -112
- package/dist/cjs/PdfDownload.js +9 -8
- package/dist/cjs/PopUpModal.js +19 -17
- package/dist/cjs/PubSection.js +41 -40
- package/dist/cjs/PubToc.js +14 -13
- package/dist/cjs/PublicationDeck.js +70 -65
- package/dist/cjs/PublicationLanding.js +110 -106
- package/dist/cjs/QueueDeckExpanded.js +308 -308
- package/dist/cjs/RecentNews.js +22 -21
- package/dist/cjs/RelatedContent.js +30 -29
- package/dist/cjs/RelatedTopicsDropdown.js +22 -19
- package/dist/cjs/RolesDeck.js +32 -27
- package/dist/cjs/Search.js +20 -16
- package/dist/cjs/Segment.js +4 -4
- package/dist/cjs/SeriesListingDeck.js +34 -34
- package/dist/cjs/{SeriesSlider-372e418f.js → SeriesSlider-ce3261cb.js} +31 -30
- package/dist/cjs/SetCookie.js +1 -1
- package/dist/cjs/SideFooter.js +35 -34
- package/dist/cjs/SocialIcons.js +10 -9
- package/dist/cjs/{SocialSearchComponent-80a2130a.js → SocialSearchComponent-5ec44406.js} +36 -32
- package/dist/cjs/SocialShare.js +31 -29
- package/dist/cjs/TaxonomyCard.js +66 -61
- package/dist/cjs/TaxonomyDescription.js +54 -53
- package/dist/cjs/TemplateNormal.js +72 -71
- package/dist/cjs/ThumbnailCard.js +26 -24
- package/dist/cjs/Ustream.js +27 -26
- package/dist/cjs/VerticalHero.js +20 -19
- package/dist/cjs/VideoProgramLandingPage.js +76 -72
- package/dist/cjs/VideoSeriesCard.js +33 -32
- package/dist/cjs/VideoSeriesFilter.js +16 -16
- package/dist/cjs/VideoSeriesLandingPage.js +49 -48
- package/dist/cjs/VideoSeriesListing.js +77 -76
- package/dist/cjs/View.js +284 -277
- package/dist/cjs/YahooHero.js +40 -39
- package/dist/cjs/YoutubeGroup.js +59 -58
- package/dist/cjs/{_is-array-bd978497.js → _is-array-54228b29.js} +6 -6
- package/dist/cjs/{_iter-detect-ee3d4802.js → _iter-detect-b1df62f0.js} +7 -7
- package/dist/cjs/{_object-pie-68c5bcbc.js → _object-pie-083f2dd6.js} +4 -4
- package/dist/cjs/{_object-sap-fee50a62.js → _object-sap-d1978572.js} +1 -1
- package/dist/cjs/{_object-to-array-18379aba.js → _object-to-array-ce86cae7.js} +2 -2
- package/dist/cjs/{asyncToGenerator-15014394.js → asyncToGenerator-77821af0.js} +30 -30
- package/dist/cjs/{brightcove-react-player-loader.es-05029198.js → brightcove-react-player-loader.es-a195642e.js} +7 -6
- package/dist/cjs/{core.get-iterator-method-5cb3af28.js → core.get-iterator-method-5643aa10.js} +33 -33
- package/dist/cjs/{debounce-6191c8ee.js → debounce-d4a2369b.js} +2 -2
- package/dist/cjs/{define-property-530a5e9e.js → define-property-e8404b64.js} +6 -6
- package/dist/cjs/{defineProperty-5ca424cd.js → defineProperty-9673846a.js} +1 -1
- package/dist/cjs/{entities-310b46ee.js → entities-3f9d0f2f.js} +1 -1
- package/dist/cjs/{eq-bb2843ed.js → eq-5fc26c07.js} +1 -1
- package/dist/cjs/{extends-1d905ddb.js → extends-7c86182f.js} +7 -7
- package/dist/cjs/faundadb.js +5 -5
- package/dist/cjs/{get-adbb11e3.js → get-5839e5b5.js} +21 -21
- package/dist/cjs/getRelatedArticle.js +18 -18
- package/dist/cjs/getRootDocGroup.js +4 -4
- package/dist/cjs/getSerializers.js +43 -43
- package/dist/cjs/{getTargeting-9d63325d.js → getTargeting-9d509319.js} +2 -2
- package/dist/cjs/getTargeting.js +6 -6
- package/dist/cjs/iconBase-68959171.js +0 -3
- package/dist/cjs/{index-75e4415e.js → index-6a2a3e03.js} +581 -571
- package/dist/cjs/{index-53e27416.js → index-8041a4eb.js} +10 -16
- package/dist/cjs/{index-96b3db50.js → index-eadd5035.js} +17 -15
- package/dist/cjs/{index-ff69979f.js → index-efca863c.js} +8 -8
- package/dist/cjs/{index-79eed652.js → index-f86bb269.js} +6 -6
- package/dist/cjs/{index-98e01cb9.js → index-fc2f1ca2.js} +13 -12
- package/dist/cjs/{index.es-e9d84959.js → index.es-f3e47207.js} +8 -7
- package/dist/cjs/{index.esm-bf016399.js → index.esm-8123cf40.js} +18 -17
- package/dist/cjs/index.js +167 -164
- package/dist/cjs/{inherits-1dcf1280.js → inherits-de66ea16.js} +21 -21
- package/dist/cjs/{isSymbol-04666465.js → isSymbol-03abbdf0.js} +15 -15
- package/dist/cjs/{keys-91f31941.js → keys-e982b3fa.js} +6 -6
- package/dist/cjs/{lodash-b5e0d5f6.js → lodash-f0783643.js} +1 -1
- package/dist/cjs/{main-bc7d4bf8.js → main-025fdc78.js} +73 -72
- package/dist/cjs/{moment-ca3bd9fb.js → moment-aca40de1.js} +1 -1
- package/dist/cjs/{react-social-icons-f7f48f71.js → react-social-icons-af932527.js} +28 -27
- package/dist/cjs/{slicedToArray-0a78cdf3.js → slicedToArray-067dd3bc.js} +12 -12
- package/dist/cjs/{smoothscroll-5054361f.js → smoothscroll-99df7f93.js} +1 -1
- package/dist/cjs/{stringify-13405ce2.js → stringify-f7a37a8d.js} +5 -5
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-39fd0757.js → toConsumableArray-d7797c2b.js} +7 -7
- package/dist/cjs/{toNumber-f2f8744b.js → toNumber-5e1fac58.js} +1 -1
- package/dist/cjs/{typeof-3dd6d3df.js → typeof-567e31ff.js} +35 -35
- package/dist/cjs/urlFor.js +6 -6
- package/dist/cjs/{ustream-api-5619c1fa.js → ustream-api-3819e4aa.js} +4 -4
- package/dist/cjs/{util-f2c1b65b.js → util-6f784d85.js} +1 -1
- package/dist/cjs/{visibility-sensor-ad5e3116.js → visibility-sensor-eb2c5b69.js} +7 -5
- package/dist/cjs/{web.dom.iterable-a9359910.js → web.dom.iterable-d98303e0.js} +2 -2
- package/dist/esm/AD.js +7 -7
- package/dist/esm/AD300x250.js +24 -24
- package/dist/esm/AD300x250x600.js +24 -24
- package/dist/esm/AD728x90.js +27 -27
- package/dist/esm/ADFloatingFooter.js +27 -27
- package/dist/esm/ADFooter.js +9 -9
- package/dist/esm/ADGutter.js +27 -27
- package/dist/esm/{ADInfeed-dbdb0513.js → ADInfeed-6c6093ae.js} +11 -11
- package/dist/esm/ADSkyscraper.js +27 -27
- package/dist/esm/ADSponsoredResources.js +27 -27
- package/dist/esm/ADWebcast.js +27 -27
- package/dist/esm/ADWelcome.js +28 -28
- package/dist/esm/{ADlgInfeed-f1c2c5cd.js → ADlgInfeed-5d7386e8.js} +8 -8
- package/dist/esm/AccordionPanel.js +22 -22
- package/dist/esm/AdSlot.js +23 -23
- package/dist/esm/AdSlotsProvider.js +10 -10
- package/dist/esm/AlgoliaSearch.js +681 -691
- package/dist/esm/AlphabeticList.js +20 -20
- package/dist/esm/ArticleCarousel.js +16 -16
- package/dist/esm/ArticleProgramLandingPage.js +54 -54
- package/dist/esm/ArticleSeriesLandingPage.js +35 -35
- package/dist/esm/ArticleSeriesListing.js +55 -55
- package/dist/esm/Auth.js +268 -268
- package/dist/esm/AuthWrapper.js +42 -42
- package/dist/esm/{AuthorComponent-2277b67c.js → AuthorComponent-46a745ba.js} +11 -11
- package/dist/esm/Beam.js +6 -6
- package/dist/esm/{BlockContent-ea93e8f7.js → BlockContent-52cf21c5.js} +35 -35
- package/dist/esm/Breadcrumbs.js +15 -15
- package/dist/esm/CMEDeck.js +77 -77
- package/dist/esm/Column1.js +9 -9
- package/dist/esm/Column2.js +28 -28
- package/dist/esm/Column3.js +53 -53
- package/dist/esm/ConferenceArticleCard.js +23 -23
- package/dist/esm/{ConferenceBanner-8792ebd2.js → ConferenceBanner-9162d0ca.js} +4 -4
- package/dist/esm/DeckContent.js +87 -87
- package/dist/esm/DeckQueue.js +81 -81
- package/dist/esm/{Dfp-d6a5629f.js → Dfp-4ca12f2e.js} +20 -20
- package/dist/esm/EventsDeck.js +110 -110
- package/dist/esm/ExternalResources.js +72 -72
- package/dist/esm/Feature.js +20 -20
- package/dist/esm/ForbesHero.js +33 -33
- package/dist/esm/GridContent.js +196 -196
- package/dist/esm/GridHero.js +35 -35
- package/dist/esm/GroupDeck.js +45 -45
- package/dist/esm/HamMagazine.js +101 -101
- package/dist/esm/Header.js +8 -8
- package/dist/esm/Hero.js +13 -13
- package/dist/esm/HighlightenVideo.js +14 -14
- package/dist/esm/HorizontalArticleListing.js +68 -68
- package/dist/esm/HorizontalHero.js +25 -25
- package/dist/esm/IssueContentDeck.js +59 -59
- package/dist/esm/IssueDeck.js +63 -63
- package/dist/esm/IssueLanding.js +61 -61
- package/dist/esm/LeftNav.js +33 -33
- package/dist/esm/MasterDeck.js +67 -67
- package/dist/esm/MediaSeriesLanding.js +616 -627
- package/dist/esm/NavDvm.js +57 -57
- package/dist/esm/{NavFooter-e27bd93b.js → NavFooter-c29526b7.js} +12 -12
- package/dist/esm/NavMagazine.js +111 -111
- package/dist/esm/NavNative.js +103 -103
- package/dist/esm/OncliveHero.js +19 -19
- package/dist/esm/OncliveLargeHero.js +58 -58
- package/dist/esm/PageFilter.js +10 -10
- package/dist/esm/PartnerDetailListing.js +109 -109
- package/dist/esm/PdfDownload.js +6 -6
- package/dist/esm/PopUpModal.js +12 -12
- package/dist/esm/PubSection.js +37 -37
- package/dist/esm/PubToc.js +10 -10
- package/dist/esm/PublicationDeck.js +56 -56
- package/dist/esm/PublicationLanding.js +93 -93
- package/dist/esm/QueueDeckExpanded.js +271 -271
- package/dist/esm/RecentNews.js +19 -19
- package/dist/esm/RelatedContent.js +23 -23
- package/dist/esm/RelatedTopicsDropdown.js +11 -11
- package/dist/esm/RolesDeck.js +25 -25
- package/dist/esm/Search.js +11 -11
- package/dist/esm/Segment.js +4 -4
- package/dist/esm/SeriesListingDeck.js +30 -30
- package/dist/esm/{SeriesSlider-ae692d40.js → SeriesSlider-485f514e.js} +22 -22
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +30 -30
- package/dist/esm/SocialIcons.js +7 -7
- package/dist/esm/{SocialSearchComponent-998cb92d.js → SocialSearchComponent-a5b11613.js} +26 -26
- package/dist/esm/SocialShare.js +25 -25
- package/dist/esm/TaxonomyCard.js +56 -56
- package/dist/esm/TaxonomyDescription.js +48 -48
- package/dist/esm/TemplateNormal.js +67 -67
- package/dist/esm/ThumbnailCard.js +17 -17
- package/dist/esm/Ustream.js +23 -23
- package/dist/esm/VerticalHero.js +17 -17
- package/dist/esm/VideoProgramLandingPage.js +65 -65
- package/dist/esm/VideoSeriesCard.js +25 -25
- package/dist/esm/VideoSeriesFilter.js +13 -13
- package/dist/esm/VideoSeriesLandingPage.js +40 -40
- package/dist/esm/VideoSeriesListing.js +72 -72
- package/dist/esm/View.js +272 -269
- package/dist/esm/YahooHero.js +33 -33
- package/dist/esm/YoutubeGroup.js +43 -43
- package/dist/esm/{_is-array-8914b83f.js → _is-array-893ab020.js} +6 -6
- package/dist/esm/{_iter-detect-13e31915.js → _iter-detect-f089461c.js} +7 -7
- package/dist/esm/{_object-pie-33c40e79.js → _object-pie-133f504a.js} +4 -4
- package/dist/esm/{_object-sap-fc9da7e8.js → _object-sap-169d6272.js} +1 -1
- package/dist/esm/{_object-to-array-ee8f6d98.js → _object-to-array-50a6b9a3.js} +2 -2
- package/dist/esm/{asyncToGenerator-40371743.js → asyncToGenerator-b4dfe691.js} +30 -30
- package/dist/esm/{brightcove-react-player-loader.es-e761d404.js → brightcove-react-player-loader.es-b43c695a.js} +3 -3
- package/dist/esm/{core.get-iterator-method-0fb60d94.js → core.get-iterator-method-e903ff31.js} +34 -34
- package/dist/esm/{debounce-89969f66.js → debounce-533d9748.js} +2 -2
- package/dist/esm/{define-property-73034847.js → define-property-99e66838.js} +6 -6
- package/dist/esm/{defineProperty-e66a2c7c.js → defineProperty-8fa0bc8d.js} +1 -1
- package/dist/esm/{entities-7cc3bf45.js → entities-932b50cf.js} +1 -1
- package/dist/esm/{eq-b470f743.js → eq-bdcbf886.js} +1 -1
- package/dist/esm/{extends-9a61581c.js → extends-dc6a71fd.js} +7 -7
- package/dist/esm/faundadb.js +5 -5
- package/dist/esm/{get-1e515072.js → get-3c308da4.js} +21 -21
- package/dist/esm/getRelatedArticle.js +12 -12
- package/dist/esm/getRootDocGroup.js +4 -4
- package/dist/esm/getSerializers.js +43 -43
- package/dist/esm/{getTargeting-e6820763.js → getTargeting-ff2c9409.js} +2 -2
- package/dist/esm/getTargeting.js +6 -6
- package/dist/esm/{index-f7fdcc91.js → index-0dbff1d1.js} +8 -8
- package/dist/esm/{index-41a678ea.js → index-2446af28.js} +6 -6
- package/dist/esm/{index-5f7e79e7.js → index-35bdcc81.js} +10 -10
- package/dist/esm/{index-fd89ce38.js → index-5bbd1562.js} +528 -528
- package/dist/esm/{index-637e8f49.js → index-67e1773f.js} +10 -16
- package/dist/esm/{index-511bdaa5.js → index-79cfd25c.js} +6 -6
- package/dist/esm/{index.es-a6137319.js → index.es-c6222053.js} +5 -5
- package/dist/esm/{index.esm-ed50151c.js → index.esm-8016b507.js} +15 -15
- package/dist/esm/index.js +137 -137
- package/dist/esm/{inherits-eeaf6740.js → inherits-8a801a18.js} +18 -18
- package/dist/esm/{isSymbol-1981418f.js → isSymbol-a7e9aafe.js} +15 -15
- package/dist/esm/{keys-a5ffafe7.js → keys-425c8ab0.js} +6 -6
- package/dist/esm/{lodash-a818d390.js → lodash-f97fd99a.js} +1 -1
- package/dist/esm/{main-ae902629.js → main-b5c5aac1.js} +72 -72
- package/dist/esm/{moment-b6f49411.js → moment-bc12cb97.js} +1 -1
- package/dist/esm/{react-social-icons-a7d5c5c7.js → react-social-icons-91f9716f.js} +20 -20
- package/dist/esm/{slicedToArray-9c3bb613.js → slicedToArray-ca2c8b8d.js} +12 -12
- package/dist/esm/{smoothscroll-0cd4c7a6.js → smoothscroll-fa4e3f8c.js} +1 -1
- package/dist/esm/stringify-c21932b3.js +15 -0
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/{toConsumableArray-e333293f.js → toConsumableArray-7b1c0e23.js} +7 -7
- package/dist/esm/{toNumber-e3dcad26.js → toNumber-5aeba6e7.js} +1 -1
- package/dist/esm/{typeof-938ae770.js → typeof-83d9eb10.js} +35 -35
- package/dist/esm/urlFor.js +4 -4
- package/dist/esm/{ustream-api-d325d196.js → ustream-api-41166338.js} +4 -4
- package/dist/esm/{util-7700fc59.js → util-3ab476bf.js} +1 -1
- package/dist/esm/{visibility-sensor-72fd8f8b.js → visibility-sensor-f40c2564.js} +2 -2
- package/dist/esm/{web.dom.iterable-6b037ff9.js → web.dom.iterable-fdf034f5.js} +2 -2
- package/package.json +1 -1
- package/dist/cjs/ConferenceBanner-4a16fddc.js +0 -23
- package/dist/esm/stringify-ebc16384.js +0 -15
|
@@ -1,25 +1,25 @@
|
|
|
1
|
+
import { _ as _extends$1 } from './extends-dc6a71fd.js';
|
|
2
|
+
import { _ as _typeof$2 } from './typeof-83d9eb10.js';
|
|
3
|
+
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-8a801a18.js';
|
|
4
|
+
import React, { createContext, Component, Children, version as version$2 } from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
1
6
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import './
|
|
3
|
-
import './_library-528f1934.js';
|
|
4
|
-
import './_object-pie-33c40e79.js';
|
|
5
|
-
import { _ as _extends$1 } from './extends-9a61581c.js';
|
|
6
|
-
import './_object-sap-fc9da7e8.js';
|
|
7
|
-
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-eeaf6740.js';
|
|
8
|
-
import './define-property-73034847.js';
|
|
9
|
-
import './web.dom.iterable-6b037ff9.js';
|
|
10
|
-
import { _ as _typeof$2 } from './typeof-938ae770.js';
|
|
11
|
-
import './_is-array-8914b83f.js';
|
|
12
|
-
import React__default, { createContext, Component, Children, version as version$2 } from 'react';
|
|
7
|
+
import { _ as _objectWithoutPropertiesLoose$1, a as _setPrototypeOf, b as _extends, c as classnames } from './index-67e1773f.js';
|
|
13
8
|
import { E as EventEmitter } from './events-6c3a7a63.js';
|
|
14
|
-
import PropTypes from 'prop-types';
|
|
15
|
-
import { m as moment } from './moment-b6f49411.js';
|
|
16
|
-
import 'react-dom';
|
|
17
|
-
import './slicedToArray-9c3bb613.js';
|
|
18
|
-
import './index-f7fdcc91.js';
|
|
19
|
-
import urlFor from './urlFor.js';
|
|
20
|
-
import { L as LazyLoad } from './index-5f7e79e7.js';
|
|
21
9
|
import { DropdownButton } from 'react-bootstrap';
|
|
22
|
-
import
|
|
10
|
+
import urlFor from './urlFor.js';
|
|
11
|
+
import { m as moment } from './moment-bc12cb97.js';
|
|
12
|
+
import { L as LazyLoad } from './index-35bdcc81.js';
|
|
13
|
+
import './core.get-iterator-method-e903ff31.js';
|
|
14
|
+
import './_object-pie-133f504a.js';
|
|
15
|
+
import './web.dom.iterable-fdf034f5.js';
|
|
16
|
+
import './_is-array-893ab020.js';
|
|
17
|
+
import './_library-528f1934.js';
|
|
18
|
+
import './_object-sap-169d6272.js';
|
|
19
|
+
import './define-property-99e66838.js';
|
|
20
|
+
import './slicedToArray-ca2c8b8d.js';
|
|
21
|
+
import './index-0dbff1d1.js';
|
|
22
|
+
import 'react-dom';
|
|
23
23
|
|
|
24
24
|
function _objectWithoutProperties(source, excluded) {
|
|
25
25
|
if (source == null) return {};
|
|
@@ -121,7 +121,7 @@ module.exports = _typeof;
|
|
|
121
121
|
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
122
122
|
});
|
|
123
123
|
|
|
124
|
-
var _typeof = unwrapExports(_typeof_1);
|
|
124
|
+
var _typeof$1 = unwrapExports(_typeof_1);
|
|
125
125
|
|
|
126
126
|
function _assertThisInitialized(self) {
|
|
127
127
|
if (self === void 0) {
|
|
@@ -132,7 +132,7 @@ function _assertThisInitialized(self) {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
function _possibleConstructorReturn(self, call) {
|
|
135
|
-
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
135
|
+
if (call && (_typeof$1(call) === "object" || typeof call === "function")) {
|
|
136
136
|
return call;
|
|
137
137
|
}
|
|
138
138
|
|
|
@@ -296,20 +296,20 @@ var reactFastCompare = function isEqual(a, b) {
|
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
298
|
|
|
299
|
-
function _typeof
|
|
299
|
+
function _typeof(obj) {
|
|
300
300
|
"@babel/helpers - typeof";
|
|
301
301
|
|
|
302
302
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
303
|
-
_typeof
|
|
303
|
+
_typeof = function _typeof(obj) {
|
|
304
304
|
return typeof obj;
|
|
305
305
|
};
|
|
306
306
|
} else {
|
|
307
|
-
_typeof
|
|
307
|
+
_typeof = function _typeof(obj) {
|
|
308
308
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
return _typeof
|
|
312
|
+
return _typeof(obj);
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
// From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
@@ -345,7 +345,7 @@ var defer = function defer(f) {
|
|
|
345
345
|
};
|
|
346
346
|
|
|
347
347
|
var isPlainObject = function isPlainObject(value) {
|
|
348
|
-
return _typeof
|
|
348
|
+
return _typeof(value) === 'object' && value !== null && !Array.isArray(value);
|
|
349
349
|
};
|
|
350
350
|
|
|
351
351
|
var removeEmptyKey = function removeEmptyKey(obj) {
|
|
@@ -356,7 +356,7 @@ var removeEmptyKey = function removeEmptyKey(obj) {
|
|
|
356
356
|
return;
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
if (!objectHasKeys(value)) {
|
|
359
|
+
if (!objectHasKeys$1(value)) {
|
|
360
360
|
delete obj[key];
|
|
361
361
|
} else {
|
|
362
362
|
removeEmptyKey(value);
|
|
@@ -392,7 +392,7 @@ function addQueryID(hits, queryID) {
|
|
|
392
392
|
});
|
|
393
393
|
});
|
|
394
394
|
}
|
|
395
|
-
function find(array, comparator) {
|
|
395
|
+
function find$2(array, comparator) {
|
|
396
396
|
if (!Array.isArray(array)) {
|
|
397
397
|
return undefined;
|
|
398
398
|
}
|
|
@@ -405,11 +405,11 @@ function find(array, comparator) {
|
|
|
405
405
|
|
|
406
406
|
return undefined;
|
|
407
407
|
}
|
|
408
|
-
function objectHasKeys(object) {
|
|
408
|
+
function objectHasKeys$1(object) {
|
|
409
409
|
return object && Object.keys(object).length > 0;
|
|
410
410
|
} // https://github.com/babel/babel/blob/3aaafae053fa75febb3aa45d45b6f00646e30ba4/packages/babel-helpers/src/helpers.js#L604-L620
|
|
411
411
|
|
|
412
|
-
function omit(source, excluded) {
|
|
412
|
+
function omit$1(source, excluded) {
|
|
413
413
|
if (source === null || source === undefined) {
|
|
414
414
|
return {};
|
|
415
415
|
}
|
|
@@ -480,9 +480,9 @@ var instantSearchContext = createContext({
|
|
|
480
480
|
var InstantSearchConsumer = instantSearchContext.Consumer,
|
|
481
481
|
InstantSearchProvider = instantSearchContext.Provider;
|
|
482
482
|
|
|
483
|
-
var _createContext = createContext(undefined),
|
|
484
|
-
IndexConsumer = _createContext.Consumer,
|
|
485
|
-
IndexProvider = _createContext.Provider;
|
|
483
|
+
var _createContext$1 = createContext(undefined),
|
|
484
|
+
IndexConsumer = _createContext$1.Consumer,
|
|
485
|
+
IndexProvider = _createContext$1.Provider;
|
|
486
486
|
|
|
487
487
|
/**
|
|
488
488
|
* Connectors are the HOC used to transform React components
|
|
@@ -695,9 +695,9 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
695
695
|
}, {
|
|
696
696
|
key: "render",
|
|
697
697
|
value: function render() {
|
|
698
|
-
var _this$props = this.props
|
|
699
|
-
|
|
700
|
-
props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
698
|
+
var _this$props = this.props;
|
|
699
|
+
_this$props.contextValue;
|
|
700
|
+
var props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
701
701
|
|
|
702
702
|
var providedProps = this.state.providedProps;
|
|
703
703
|
|
|
@@ -712,7 +712,7 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
712
712
|
var searchForFacetValuesProps = typeof connectorDesc.searchForFacetValues === 'function' ? {
|
|
713
713
|
searchForItems: this.searchForFacetValues
|
|
714
714
|
} : {};
|
|
715
|
-
return
|
|
715
|
+
return React.createElement(Composed, _extends({}, props, providedProps, refineProps, searchForFacetValuesProps));
|
|
716
716
|
}
|
|
717
717
|
}]);
|
|
718
718
|
|
|
@@ -734,9 +734,9 @@ var createConnectorWithContext = function createConnectorWithContext(connectorDe
|
|
|
734
734
|
var Connector = createConnectorWithoutContext(connectorDesc)(Composed);
|
|
735
735
|
|
|
736
736
|
var ConnectorWrapper = function ConnectorWrapper(props) {
|
|
737
|
-
return
|
|
738
|
-
return
|
|
739
|
-
return
|
|
737
|
+
return React.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
738
|
+
return React.createElement(IndexConsumer, null, function (indexContextValue) {
|
|
739
|
+
return React.createElement(Connector, _extends({
|
|
740
740
|
contextValue: contextValue,
|
|
741
741
|
indexContextValue: indexContextValue
|
|
742
742
|
}, props));
|
|
@@ -848,7 +848,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
848
848
|
});
|
|
849
849
|
}
|
|
850
850
|
|
|
851
|
-
var version = '6.10.3';
|
|
851
|
+
var version$1 = '6.10.3';
|
|
852
852
|
|
|
853
853
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
854
854
|
return function (props, propName, componentName) {
|
|
@@ -909,7 +909,7 @@ function translatable(defaultTranslations) {
|
|
|
909
909
|
_createClass(Translatable, [{
|
|
910
910
|
key: "render",
|
|
911
911
|
value: function render() {
|
|
912
|
-
return
|
|
912
|
+
return React.createElement(Composed, _extends({
|
|
913
913
|
translate: this.translate
|
|
914
914
|
}, this.props));
|
|
915
915
|
}
|
|
@@ -1045,7 +1045,7 @@ function hasRefinements(_ref) {
|
|
|
1045
1045
|
return Object.hasOwnProperty.call(searchState, id);
|
|
1046
1046
|
}
|
|
1047
1047
|
|
|
1048
|
-
function getRefinements(_ref2) {
|
|
1048
|
+
function getRefinements$1(_ref2) {
|
|
1049
1049
|
var multiIndex = _ref2.multiIndex,
|
|
1050
1050
|
indexId = _ref2.indexId,
|
|
1051
1051
|
namespace = _ref2.namespace,
|
|
@@ -1087,7 +1087,7 @@ function getCurrentRefinementValue(props, searchState, context, id, defaultValue
|
|
|
1087
1087
|
var hasRefinementsValue = hasRefinements(args);
|
|
1088
1088
|
|
|
1089
1089
|
if (hasRefinementsValue) {
|
|
1090
|
-
return getRefinements(args);
|
|
1090
|
+
return getRefinements$1(args);
|
|
1091
1091
|
}
|
|
1092
1092
|
|
|
1093
1093
|
if (props.defaultRefinement) {
|
|
@@ -1128,10 +1128,10 @@ function cleanUpValueWithSingleIndex(_ref3) {
|
|
|
1128
1128
|
attribute = _ref3.attribute;
|
|
1129
1129
|
|
|
1130
1130
|
if (namespace) {
|
|
1131
|
-
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit(searchState[namespace], [attribute])));
|
|
1131
|
+
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit$1(searchState[namespace], [attribute])));
|
|
1132
1132
|
}
|
|
1133
1133
|
|
|
1134
|
-
return omit(searchState, [id]);
|
|
1134
|
+
return omit$1(searchState, [id]);
|
|
1135
1135
|
}
|
|
1136
1136
|
|
|
1137
1137
|
function cleanUpValueWithMultiIndex(_ref4) {
|
|
@@ -1144,20 +1144,20 @@ function cleanUpValueWithMultiIndex(_ref4) {
|
|
|
1144
1144
|
|
|
1145
1145
|
if (namespace && indexSearchState) {
|
|
1146
1146
|
return _objectSpread({}, searchState, {
|
|
1147
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit(indexSearchState[namespace], [attribute])))))
|
|
1147
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit$1(indexSearchState[namespace], [attribute])))))
|
|
1148
1148
|
});
|
|
1149
1149
|
}
|
|
1150
1150
|
|
|
1151
1151
|
if (indexSearchState) {
|
|
1152
1152
|
return _objectSpread({}, searchState, {
|
|
1153
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit(indexSearchState, [id])))
|
|
1153
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit$1(indexSearchState, [id])))
|
|
1154
1154
|
});
|
|
1155
1155
|
}
|
|
1156
1156
|
|
|
1157
1157
|
return searchState;
|
|
1158
1158
|
}
|
|
1159
1159
|
|
|
1160
|
-
function getId() {
|
|
1160
|
+
function getId$f() {
|
|
1161
1161
|
return 'configure';
|
|
1162
1162
|
}
|
|
1163
1163
|
|
|
@@ -1167,20 +1167,20 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1167
1167
|
return {};
|
|
1168
1168
|
},
|
|
1169
1169
|
getSearchParameters: function getSearchParameters(searchParameters, props) {
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1170
|
+
props.children;
|
|
1171
|
+
props.contextValue;
|
|
1172
|
+
props.indexContextValue;
|
|
1173
|
+
var items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1174
1174
|
|
|
1175
1175
|
return searchParameters.setQueryParameters(items);
|
|
1176
1176
|
},
|
|
1177
1177
|
transitionState: function transitionState(props, prevSearchState, nextSearchState) {
|
|
1178
|
-
var id = getId();
|
|
1178
|
+
var id = getId$f();
|
|
1179
1179
|
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1180
|
+
props.children;
|
|
1181
|
+
props.contextValue;
|
|
1182
|
+
props.indexContextValue;
|
|
1183
|
+
var items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1184
1184
|
|
|
1185
1185
|
var propKeys = Object.keys(props);
|
|
1186
1186
|
var nonPresentKeys = this._props ? Object.keys(this._props).filter(function (prop) {
|
|
@@ -1188,7 +1188,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1188
1188
|
}) : [];
|
|
1189
1189
|
this._props = props;
|
|
1190
1190
|
|
|
1191
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), items));
|
|
1191
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit$1(nextSearchState[id], nonPresentKeys), items));
|
|
1192
1192
|
|
|
1193
1193
|
return refineValue(nextSearchState, nextValue, {
|
|
1194
1194
|
ais: props.contextValue,
|
|
@@ -1196,7 +1196,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1196
1196
|
});
|
|
1197
1197
|
},
|
|
1198
1198
|
cleanUp: function cleanUp(props, searchState) {
|
|
1199
|
-
var id = getId();
|
|
1199
|
+
var id = getId$f();
|
|
1200
1200
|
var indexId = getIndexId({
|
|
1201
1201
|
ais: props.contextValue,
|
|
1202
1202
|
multiIndexContext: props.indexContextValue
|
|
@@ -1444,13 +1444,13 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
1444
1444
|
return target;
|
|
1445
1445
|
}
|
|
1446
1446
|
|
|
1447
|
-
var omit
|
|
1447
|
+
var omit = _objectWithoutPropertiesLoose;
|
|
1448
1448
|
|
|
1449
|
-
function objectHasKeys
|
|
1449
|
+
function objectHasKeys(obj) {
|
|
1450
1450
|
return obj && Object.keys(obj).length > 0;
|
|
1451
1451
|
}
|
|
1452
1452
|
|
|
1453
|
-
var objectHasKeys_1 = objectHasKeys
|
|
1453
|
+
var objectHasKeys_1 = objectHasKeys;
|
|
1454
1454
|
|
|
1455
1455
|
var isValidUserToken = function isValidUserToken(userToken) {
|
|
1456
1456
|
if (userToken === null) {
|
|
@@ -1558,7 +1558,7 @@ var lib = {
|
|
|
1558
1558
|
}
|
|
1559
1559
|
return {};
|
|
1560
1560
|
} else if (typeof attribute === 'string') {
|
|
1561
|
-
return omit
|
|
1561
|
+
return omit(refinementList, [attribute]);
|
|
1562
1562
|
} else if (typeof attribute === 'function') {
|
|
1563
1563
|
var hasChanged = false;
|
|
1564
1564
|
|
|
@@ -1603,7 +1603,7 @@ var lib = {
|
|
|
1603
1603
|
}
|
|
1604
1604
|
};
|
|
1605
1605
|
|
|
1606
|
-
var RefinementList = lib;
|
|
1606
|
+
var RefinementList$3 = lib;
|
|
1607
1607
|
|
|
1608
1608
|
/**
|
|
1609
1609
|
* isEqual, but only for numeric refinement values, possible values:
|
|
@@ -1972,22 +1972,22 @@ SearchParameters.prototype = {
|
|
|
1972
1972
|
clearRefinements: function clearRefinements(attribute) {
|
|
1973
1973
|
var patch = {
|
|
1974
1974
|
numericRefinements: this._clearNumericRefinements(attribute),
|
|
1975
|
-
facetsRefinements: RefinementList.clearRefinement(
|
|
1975
|
+
facetsRefinements: RefinementList$3.clearRefinement(
|
|
1976
1976
|
this.facetsRefinements,
|
|
1977
1977
|
attribute,
|
|
1978
1978
|
'conjunctiveFacet'
|
|
1979
1979
|
),
|
|
1980
|
-
facetsExcludes: RefinementList.clearRefinement(
|
|
1980
|
+
facetsExcludes: RefinementList$3.clearRefinement(
|
|
1981
1981
|
this.facetsExcludes,
|
|
1982
1982
|
attribute,
|
|
1983
1983
|
'exclude'
|
|
1984
1984
|
),
|
|
1985
|
-
disjunctiveFacetsRefinements: RefinementList.clearRefinement(
|
|
1985
|
+
disjunctiveFacetsRefinements: RefinementList$3.clearRefinement(
|
|
1986
1986
|
this.disjunctiveFacetsRefinements,
|
|
1987
1987
|
attribute,
|
|
1988
1988
|
'disjunctiveFacet'
|
|
1989
1989
|
),
|
|
1990
|
-
hierarchicalFacetsRefinements: RefinementList.clearRefinement(
|
|
1990
|
+
hierarchicalFacetsRefinements: RefinementList$3.clearRefinement(
|
|
1991
1991
|
this.hierarchicalFacetsRefinements,
|
|
1992
1992
|
attribute,
|
|
1993
1993
|
'hierarchicalFacet'
|
|
@@ -2263,7 +2263,7 @@ SearchParameters.prototype = {
|
|
|
2263
2263
|
}
|
|
2264
2264
|
return {};
|
|
2265
2265
|
} else if (typeof attribute === 'string') {
|
|
2266
|
-
return omit
|
|
2266
|
+
return omit(this.numericRefinements, [attribute]);
|
|
2267
2267
|
} else if (typeof attribute === 'function') {
|
|
2268
2268
|
var hasChanged = false;
|
|
2269
2269
|
var numericRefinements = this.numericRefinements;
|
|
@@ -2355,10 +2355,10 @@ SearchParameters.prototype = {
|
|
|
2355
2355
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2356
2356
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2357
2357
|
}
|
|
2358
|
-
if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2358
|
+
if (RefinementList$3.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2359
2359
|
|
|
2360
2360
|
return this.setQueryParameters({
|
|
2361
|
-
facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value)
|
|
2361
|
+
facetsRefinements: RefinementList$3.addRefinement(this.facetsRefinements, facet, value)
|
|
2362
2362
|
});
|
|
2363
2363
|
},
|
|
2364
2364
|
/**
|
|
@@ -2372,10 +2372,10 @@ SearchParameters.prototype = {
|
|
|
2372
2372
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2373
2373
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2374
2374
|
}
|
|
2375
|
-
if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2375
|
+
if (RefinementList$3.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2376
2376
|
|
|
2377
2377
|
return this.setQueryParameters({
|
|
2378
|
-
facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value)
|
|
2378
|
+
facetsExcludes: RefinementList$3.addRefinement(this.facetsExcludes, facet, value)
|
|
2379
2379
|
});
|
|
2380
2380
|
},
|
|
2381
2381
|
/**
|
|
@@ -2391,10 +2391,10 @@ SearchParameters.prototype = {
|
|
|
2391
2391
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2392
2392
|
}
|
|
2393
2393
|
|
|
2394
|
-
if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2394
|
+
if (RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2395
2395
|
|
|
2396
2396
|
return this.setQueryParameters({
|
|
2397
|
-
disjunctiveFacetsRefinements: RefinementList.addRefinement(
|
|
2397
|
+
disjunctiveFacetsRefinements: RefinementList$3.addRefinement(
|
|
2398
2398
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2399
2399
|
});
|
|
2400
2400
|
},
|
|
@@ -2479,10 +2479,10 @@ SearchParameters.prototype = {
|
|
|
2479
2479
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2480
2480
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2481
2481
|
}
|
|
2482
|
-
if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2482
|
+
if (!RefinementList$3.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2483
2483
|
|
|
2484
2484
|
return this.setQueryParameters({
|
|
2485
|
-
facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value)
|
|
2485
|
+
facetsRefinements: RefinementList$3.removeRefinement(this.facetsRefinements, facet, value)
|
|
2486
2486
|
});
|
|
2487
2487
|
},
|
|
2488
2488
|
/**
|
|
@@ -2496,10 +2496,10 @@ SearchParameters.prototype = {
|
|
|
2496
2496
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2497
2497
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2498
2498
|
}
|
|
2499
|
-
if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2499
|
+
if (!RefinementList$3.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2500
2500
|
|
|
2501
2501
|
return this.setQueryParameters({
|
|
2502
|
-
facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value)
|
|
2502
|
+
facetsExcludes: RefinementList$3.removeRefinement(this.facetsExcludes, facet, value)
|
|
2503
2503
|
});
|
|
2504
2504
|
},
|
|
2505
2505
|
/**
|
|
@@ -2514,10 +2514,10 @@ SearchParameters.prototype = {
|
|
|
2514
2514
|
throw new Error(
|
|
2515
2515
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2516
2516
|
}
|
|
2517
|
-
if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2517
|
+
if (!RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2518
2518
|
|
|
2519
2519
|
return this.setQueryParameters({
|
|
2520
|
-
disjunctiveFacetsRefinements: RefinementList.removeRefinement(
|
|
2520
|
+
disjunctiveFacetsRefinements: RefinementList$3.removeRefinement(
|
|
2521
2521
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2522
2522
|
});
|
|
2523
2523
|
},
|
|
@@ -2583,7 +2583,7 @@ SearchParameters.prototype = {
|
|
|
2583
2583
|
}
|
|
2584
2584
|
|
|
2585
2585
|
return this.setQueryParameters({
|
|
2586
|
-
facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2586
|
+
facetsRefinements: RefinementList$3.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2587
2587
|
});
|
|
2588
2588
|
},
|
|
2589
2589
|
/**
|
|
@@ -2599,7 +2599,7 @@ SearchParameters.prototype = {
|
|
|
2599
2599
|
}
|
|
2600
2600
|
|
|
2601
2601
|
return this.setQueryParameters({
|
|
2602
|
-
facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2602
|
+
facetsExcludes: RefinementList$3.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2603
2603
|
});
|
|
2604
2604
|
},
|
|
2605
2605
|
/**
|
|
@@ -2616,7 +2616,7 @@ SearchParameters.prototype = {
|
|
|
2616
2616
|
}
|
|
2617
2617
|
|
|
2618
2618
|
return this.setQueryParameters({
|
|
2619
|
-
disjunctiveFacetsRefinements: RefinementList.toggleRefinement(
|
|
2619
|
+
disjunctiveFacetsRefinements: RefinementList$3.toggleRefinement(
|
|
2620
2620
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2621
2621
|
});
|
|
2622
2622
|
},
|
|
@@ -2755,7 +2755,7 @@ SearchParameters.prototype = {
|
|
|
2755
2755
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2756
2756
|
return false;
|
|
2757
2757
|
}
|
|
2758
|
-
return RefinementList.isRefined(this.facetsRefinements, facet, value);
|
|
2758
|
+
return RefinementList$3.isRefined(this.facetsRefinements, facet, value);
|
|
2759
2759
|
},
|
|
2760
2760
|
/**
|
|
2761
2761
|
* Returns true if the facet contains exclusions or if a specific value is
|
|
@@ -2771,7 +2771,7 @@ SearchParameters.prototype = {
|
|
|
2771
2771
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2772
2772
|
return false;
|
|
2773
2773
|
}
|
|
2774
|
-
return RefinementList.isRefined(this.facetsExcludes, facet, value);
|
|
2774
|
+
return RefinementList$3.isRefined(this.facetsExcludes, facet, value);
|
|
2775
2775
|
},
|
|
2776
2776
|
/**
|
|
2777
2777
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2786,7 +2786,7 @@ SearchParameters.prototype = {
|
|
|
2786
2786
|
if (!this.isDisjunctiveFacet(facet)) {
|
|
2787
2787
|
return false;
|
|
2788
2788
|
}
|
|
2789
|
-
return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2789
|
+
return RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2790
2790
|
},
|
|
2791
2791
|
/**
|
|
2792
2792
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2972,7 +2972,7 @@ SearchParameters.prototype = {
|
|
|
2972
2972
|
var isNextValueDefined = nextWithNumbers[key] !== undefined;
|
|
2973
2973
|
|
|
2974
2974
|
if (isPreviousValueDefined && !isNextValueDefined) {
|
|
2975
|
-
return omit
|
|
2975
|
+
return omit(previous, [key]);
|
|
2976
2976
|
}
|
|
2977
2977
|
|
|
2978
2978
|
if (isNextValueDefined) {
|
|
@@ -4705,7 +4705,7 @@ var requestBuilder = {
|
|
|
4705
4705
|
|
|
4706
4706
|
var requestBuilder_1 = requestBuilder;
|
|
4707
4707
|
|
|
4708
|
-
var version
|
|
4708
|
+
var version = '3.4.4';
|
|
4709
4709
|
|
|
4710
4710
|
/**
|
|
4711
4711
|
* Event triggered when a parameter is set or updated
|
|
@@ -4812,7 +4812,7 @@ var version$1 = '3.4.4';
|
|
|
4812
4812
|
*/
|
|
4813
4813
|
function AlgoliaSearchHelper(client, index, options) {
|
|
4814
4814
|
if (typeof client.addAlgoliaAgent === 'function') {
|
|
4815
|
-
client.addAlgoliaAgent('JS Helper (' + version
|
|
4815
|
+
client.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
4816
4816
|
}
|
|
4817
4817
|
|
|
4818
4818
|
this.setClient(client);
|
|
@@ -4967,7 +4967,7 @@ AlgoliaSearchHelper.prototype.findAnswers = function(options) {
|
|
|
4967
4967
|
nbHits: options.nbHits
|
|
4968
4968
|
},
|
|
4969
4969
|
{
|
|
4970
|
-
params: omit
|
|
4970
|
+
params: omit(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
4971
4971
|
'attributesToSnippet',
|
|
4972
4972
|
'hitsPerPage',
|
|
4973
4973
|
'restrictSearchableAttributes',
|
|
@@ -6081,7 +6081,7 @@ AlgoliaSearchHelper.prototype.setClient = function(newClient) {
|
|
|
6081
6081
|
if (this.client === newClient) return this;
|
|
6082
6082
|
|
|
6083
6083
|
if (typeof newClient.addAlgoliaAgent === 'function') {
|
|
6084
|
-
newClient.addAlgoliaAgent('JS Helper (' + version
|
|
6084
|
+
newClient.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
6085
6085
|
}
|
|
6086
6086
|
this.client = newClient;
|
|
6087
6087
|
|
|
@@ -6200,7 +6200,7 @@ function algoliasearchHelper(client, index, opts) {
|
|
|
6200
6200
|
* @member module:algoliasearchHelper.version
|
|
6201
6201
|
* @type {number}
|
|
6202
6202
|
*/
|
|
6203
|
-
algoliasearchHelper.version = version
|
|
6203
|
+
algoliasearchHelper.version = version;
|
|
6204
6204
|
|
|
6205
6205
|
/**
|
|
6206
6206
|
* Constructor for the Helper.
|
|
@@ -6232,13 +6232,13 @@ function createOptionalFilter(_ref) {
|
|
|
6232
6232
|
return "".concat(attributeName, ":").concat(attributeValue, "<score=").concat(attributeScore || 1, ">");
|
|
6233
6233
|
}
|
|
6234
6234
|
|
|
6235
|
-
var defaultProps = {
|
|
6235
|
+
var defaultProps$1 = {
|
|
6236
6236
|
transformSearchParameters: function transformSearchParameters(x) {
|
|
6237
6237
|
return _objectSpread({}, x);
|
|
6238
6238
|
}
|
|
6239
6239
|
};
|
|
6240
6240
|
|
|
6241
|
-
function getId$
|
|
6241
|
+
function getId$e() {
|
|
6242
6242
|
// We store the search state of this widget in `configure`.
|
|
6243
6243
|
return 'configure';
|
|
6244
6244
|
}
|
|
@@ -6286,7 +6286,7 @@ function getSearchParametersFromProps(props) {
|
|
|
6286
6286
|
|
|
6287
6287
|
var connectConfigureRelatedItems = createConnectorWithContext({
|
|
6288
6288
|
displayName: 'AlgoliaConfigureRelatedItems',
|
|
6289
|
-
defaultProps: defaultProps,
|
|
6289
|
+
defaultProps: defaultProps$1,
|
|
6290
6290
|
getProvidedProps: function getProvidedProps() {
|
|
6291
6291
|
return {};
|
|
6292
6292
|
},
|
|
@@ -6294,7 +6294,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6294
6294
|
return searchParameters.setQueryParameters(getSearchParametersFromProps(props));
|
|
6295
6295
|
},
|
|
6296
6296
|
transitionState: function transitionState(props, _prevSearchState, nextSearchState) {
|
|
6297
|
-
var id = getId$
|
|
6297
|
+
var id = getId$e(); // We need to transform the exhaustive search parameters back to clean
|
|
6298
6298
|
// search parameters without the empty default keys so we don't pollute the
|
|
6299
6299
|
// `configure` search state.
|
|
6300
6300
|
|
|
@@ -6305,7 +6305,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6305
6305
|
}) : [];
|
|
6306
6306
|
this._searchParameters = searchParameters;
|
|
6307
6307
|
|
|
6308
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6308
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit$1(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6309
6309
|
|
|
6310
6310
|
return refineValue(nextSearchState, nextValue, {
|
|
6311
6311
|
ais: props.contextValue,
|
|
@@ -6315,7 +6315,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6315
6315
|
cleanUp: function cleanUp(props, searchState) {
|
|
6316
6316
|
var _this = this;
|
|
6317
6317
|
|
|
6318
|
-
var id = getId$
|
|
6318
|
+
var id = getId$e();
|
|
6319
6319
|
var indexId = getIndexId({
|
|
6320
6320
|
ais: props.contextValue,
|
|
6321
6321
|
multiIndexContext: props.indexContextValue
|
|
@@ -6388,7 +6388,7 @@ function getWidgetRefinements(attribute, widgetKey, searchState) {
|
|
|
6388
6388
|
}
|
|
6389
6389
|
}
|
|
6390
6390
|
|
|
6391
|
-
function getRefinements
|
|
6391
|
+
function getRefinements(attribute) {
|
|
6392
6392
|
var searchState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6393
6393
|
var refinements = Object.keys(searchState).filter(function (widgetKey) {
|
|
6394
6394
|
return searchState[widgetKey] !== undefined && searchState[widgetKey][attribute] !== undefined;
|
|
@@ -6405,7 +6405,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6405
6405
|
var searchState = _ref.searchState,
|
|
6406
6406
|
trackedFilters = _ref.trackedFilters;
|
|
6407
6407
|
var ruleContexts = Object.keys(trackedFilters).reduce(function (facets, facetName) {
|
|
6408
|
-
var facetRefinements = getRefinements
|
|
6408
|
+
var facetRefinements = getRefinements(facetName, searchState);
|
|
6409
6409
|
var getTrackedFacetValues = trackedFilters[facetName];
|
|
6410
6410
|
var trackedFacetValues = getTrackedFacetValues(facetRefinements);
|
|
6411
6411
|
return [].concat(_toConsumableArray(facets), _toConsumableArray(facetRefinements.filter(function (facetRefinement) {
|
|
@@ -6417,7 +6417,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6417
6417
|
return ruleContexts;
|
|
6418
6418
|
}
|
|
6419
6419
|
|
|
6420
|
-
var defaultProps
|
|
6420
|
+
var defaultProps = {
|
|
6421
6421
|
transformItems: function transformItems(items) {
|
|
6422
6422
|
return items;
|
|
6423
6423
|
},
|
|
@@ -6428,7 +6428,7 @@ var defaultProps$1 = {
|
|
|
6428
6428
|
};
|
|
6429
6429
|
var connectQueryRules = createConnectorWithContext({
|
|
6430
6430
|
displayName: 'AlgoliaQueryRules',
|
|
6431
|
-
defaultProps: defaultProps
|
|
6431
|
+
defaultProps: defaultProps,
|
|
6432
6432
|
getProvidedProps: function getProvidedProps(props, _1, searchResults) {
|
|
6433
6433
|
var results = getResults(searchResults, {
|
|
6434
6434
|
ais: props.contextValue,
|
|
@@ -6590,7 +6590,7 @@ function (_Component) {
|
|
|
6590
6590
|
return null;
|
|
6591
6591
|
}
|
|
6592
6592
|
|
|
6593
|
-
return
|
|
6593
|
+
return React.createElement(IndexProvider, {
|
|
6594
6594
|
value: this.state.indexContext
|
|
6595
6595
|
}, this.props.children);
|
|
6596
6596
|
}
|
|
@@ -6605,20 +6605,10 @@ _defineProperty(Index, "propTypes", {
|
|
|
6605
6605
|
children: PropTypes.node
|
|
6606
6606
|
});
|
|
6607
6607
|
|
|
6608
|
-
|
|
6609
|
-
var inferredIndexId = props.indexName;
|
|
6610
|
-
return React__default.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
6611
|
-
return React__default.createElement(Index, _extends({
|
|
6612
|
-
contextValue: contextValue,
|
|
6613
|
-
indexId: inferredIndexId
|
|
6614
|
-
}, props));
|
|
6615
|
-
});
|
|
6616
|
-
};
|
|
6617
|
-
|
|
6618
|
-
IndexWrapper.propTypes = {
|
|
6608
|
+
({
|
|
6619
6609
|
indexName: PropTypes.string.isRequired,
|
|
6620
6610
|
indexId: PropTypes.string
|
|
6621
|
-
};
|
|
6611
|
+
});
|
|
6622
6612
|
|
|
6623
6613
|
function createWidgetsManager(onWidgetsUpdate) {
|
|
6624
6614
|
var widgets = []; // Is an update scheduled?
|
|
@@ -6679,7 +6669,7 @@ function createStore(initialState) {
|
|
|
6679
6669
|
function addAlgoliaAgents(searchClient) {
|
|
6680
6670
|
if (typeof searchClient.addAlgoliaAgent === 'function') {
|
|
6681
6671
|
searchClient.addAlgoliaAgent("react (".concat(version$2, ")"));
|
|
6682
|
-
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version, ")"));
|
|
6672
|
+
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version$1, ")"));
|
|
6683
6673
|
}
|
|
6684
6674
|
}
|
|
6685
6675
|
|
|
@@ -6917,8 +6907,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6917
6907
|
nextIsSearchStalled = false;
|
|
6918
6908
|
}
|
|
6919
6909
|
|
|
6920
|
-
|
|
6921
|
-
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6910
|
+
currentState.resultsFacetValues;
|
|
6911
|
+
var partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6922
6912
|
|
|
6923
6913
|
store.setState(_objectSpread({}, partialState, {
|
|
6924
6914
|
results: results,
|
|
@@ -6939,8 +6929,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6939
6929
|
nextIsSearchStalled = false;
|
|
6940
6930
|
}
|
|
6941
6931
|
|
|
6942
|
-
|
|
6943
|
-
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6932
|
+
currentState.resultsFacetValues;
|
|
6933
|
+
var partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6944
6934
|
|
|
6945
6935
|
store.setState(_objectSpread({}, partialState, {
|
|
6946
6936
|
isSearchStalled: nextIsSearchStalled,
|
|
@@ -6952,9 +6942,9 @@ function createInstantSearchManager(_ref) {
|
|
|
6952
6942
|
function handleNewSearch() {
|
|
6953
6943
|
if (!stalledSearchTimer) {
|
|
6954
6944
|
stalledSearchTimer = setTimeout(function () {
|
|
6955
|
-
var _store$getState = store.getState()
|
|
6956
|
-
|
|
6957
|
-
partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
6945
|
+
var _store$getState = store.getState();
|
|
6946
|
+
_store$getState.resultsFacetValues;
|
|
6947
|
+
var partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
6958
6948
|
|
|
6959
6949
|
store.setState(_objectSpread({}, partialState, {
|
|
6960
6950
|
isSearchStalled: true
|
|
@@ -7419,7 +7409,7 @@ function (_Component) {
|
|
|
7419
7409
|
return null;
|
|
7420
7410
|
}
|
|
7421
7411
|
|
|
7422
|
-
return
|
|
7412
|
+
return React.createElement(InstantSearchProvider, {
|
|
7423
7413
|
value: this.state.contextValue
|
|
7424
7414
|
}, this.props.children);
|
|
7425
7415
|
}
|
|
@@ -7453,21 +7443,21 @@ _defineProperty(InstantSearch, "propTypes", {
|
|
|
7453
7443
|
stalledSearchDelay: PropTypes.number
|
|
7454
7444
|
});
|
|
7455
7445
|
|
|
7456
|
-
var getId$
|
|
7446
|
+
var getId$d = function getId(props) {
|
|
7457
7447
|
return props.attributes[0];
|
|
7458
7448
|
};
|
|
7459
|
-
var namespace = 'hierarchicalMenu';
|
|
7449
|
+
var namespace$6 = 'hierarchicalMenu';
|
|
7460
7450
|
|
|
7461
|
-
function _refine(props, searchState, nextRefinement, context) {
|
|
7462
|
-
var id = getId$
|
|
7451
|
+
function _refine$9(props, searchState, nextRefinement, context) {
|
|
7452
|
+
var id = getId$d(props);
|
|
7463
7453
|
|
|
7464
7454
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7465
7455
|
|
|
7466
7456
|
var resetPage = true;
|
|
7467
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
7457
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$6);
|
|
7468
7458
|
}
|
|
7469
7459
|
|
|
7470
|
-
function transformValue(values) {
|
|
7460
|
+
function transformValue$1(values) {
|
|
7471
7461
|
return values.reduce(function (acc, item) {
|
|
7472
7462
|
if (item.isRefined) {
|
|
7473
7463
|
acc.push({
|
|
@@ -7478,7 +7468,7 @@ function transformValue(values) {
|
|
|
7478
7468
|
}); // Create a variable in order to keep the same acc for the recursion, otherwise "reduce" returns a new one
|
|
7479
7469
|
|
|
7480
7470
|
if (item.data) {
|
|
7481
|
-
acc = acc.concat(transformValue(item.data));
|
|
7471
|
+
acc = acc.concat(transformValue$1(item.data));
|
|
7482
7472
|
}
|
|
7483
7473
|
}
|
|
7484
7474
|
|
|
@@ -7540,7 +7530,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7540
7530
|
transformItems: PropTypes.func
|
|
7541
7531
|
},
|
|
7542
7532
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
7543
|
-
var id = getId$
|
|
7533
|
+
var id = getId$d(props);
|
|
7544
7534
|
var results = getResults(searchResults, {
|
|
7545
7535
|
ais: props.contextValue,
|
|
7546
7536
|
multiIndexContext: props.indexContextValue
|
|
@@ -7555,7 +7545,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7555
7545
|
}
|
|
7556
7546
|
|
|
7557
7547
|
var values = results.getFacetValues(id);
|
|
7558
|
-
var items = values.data ? transformValue(values.data) : [];
|
|
7548
|
+
var items = values.data ? transformValue$1(values.data) : [];
|
|
7559
7549
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7560
7550
|
return {
|
|
7561
7551
|
canRefine: transformedItems.length > 0,
|
|
@@ -7563,7 +7553,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7563
7553
|
};
|
|
7564
7554
|
},
|
|
7565
7555
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7566
|
-
return _refine(props, searchState, nextRefinement, {
|
|
7556
|
+
return _refine$9(props, searchState, nextRefinement, {
|
|
7567
7557
|
ais: props.contextValue,
|
|
7568
7558
|
multiIndexContext: props.indexContextValue
|
|
7569
7559
|
});
|
|
@@ -7626,13 +7616,13 @@ var connectCurrentRefinements = createConnectorWithContext({
|
|
|
7626
7616
|
}
|
|
7627
7617
|
});
|
|
7628
7618
|
|
|
7629
|
-
var getId$
|
|
7619
|
+
var getId$c = function getId(props) {
|
|
7630
7620
|
return props.attributes[0];
|
|
7631
7621
|
};
|
|
7632
|
-
var namespace$
|
|
7622
|
+
var namespace$5 = 'hierarchicalMenu';
|
|
7633
7623
|
|
|
7634
|
-
function getCurrentRefinement(props, searchState, context) {
|
|
7635
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
7624
|
+
function getCurrentRefinement$b(props, searchState, context) {
|
|
7625
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$5, ".").concat(getId$c(props)), null);
|
|
7636
7626
|
|
|
7637
7627
|
if (currentRefinement === '') {
|
|
7638
7628
|
return null;
|
|
@@ -7641,13 +7631,13 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
7641
7631
|
return currentRefinement;
|
|
7642
7632
|
}
|
|
7643
7633
|
|
|
7644
|
-
function getValue(path, props, searchState, context) {
|
|
7634
|
+
function getValue$2(path, props, searchState, context) {
|
|
7645
7635
|
var id = props.id,
|
|
7646
7636
|
attributes = props.attributes,
|
|
7647
7637
|
separator = props.separator,
|
|
7648
7638
|
rootPath = props.rootPath,
|
|
7649
7639
|
showParentLevel = props.showParentLevel;
|
|
7650
|
-
var currentRefinement = getCurrentRefinement(props, searchState, context);
|
|
7640
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, context);
|
|
7651
7641
|
var nextRefinement;
|
|
7652
7642
|
|
|
7653
7643
|
if (currentRefinement === null) {
|
|
@@ -7668,14 +7658,14 @@ function getValue(path, props, searchState, context) {
|
|
|
7668
7658
|
return nextRefinement;
|
|
7669
7659
|
}
|
|
7670
7660
|
|
|
7671
|
-
function transformValue
|
|
7661
|
+
function transformValue(value, props, searchState, context) {
|
|
7672
7662
|
return value.map(function (v) {
|
|
7673
7663
|
return {
|
|
7674
7664
|
label: v.name,
|
|
7675
|
-
value: getValue(v.path, props, searchState, context),
|
|
7665
|
+
value: getValue$2(v.path, props, searchState, context),
|
|
7676
7666
|
count: v.count,
|
|
7677
7667
|
isRefined: v.isRefined,
|
|
7678
|
-
items: v.data && transformValue
|
|
7668
|
+
items: v.data && transformValue(v.data, props, searchState, context)
|
|
7679
7669
|
};
|
|
7680
7670
|
});
|
|
7681
7671
|
}
|
|
@@ -7691,20 +7681,20 @@ var truncate = function truncate() {
|
|
|
7691
7681
|
});
|
|
7692
7682
|
};
|
|
7693
7683
|
|
|
7694
|
-
function _refine$
|
|
7695
|
-
var id = getId$
|
|
7684
|
+
function _refine$8(props, searchState, nextRefinement, context) {
|
|
7685
|
+
var id = getId$c(props);
|
|
7696
7686
|
|
|
7697
7687
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7698
7688
|
|
|
7699
7689
|
var resetPage = true;
|
|
7700
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
7690
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$5);
|
|
7701
7691
|
}
|
|
7702
7692
|
|
|
7703
|
-
function _cleanUp(props, searchState, context) {
|
|
7704
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
7693
|
+
function _cleanUp$7(props, searchState, context) {
|
|
7694
|
+
return cleanUpValue(searchState, context, "".concat(namespace$5, ".").concat(getId$c(props)));
|
|
7705
7695
|
}
|
|
7706
7696
|
|
|
7707
|
-
var sortBy = ['name:asc'];
|
|
7697
|
+
var sortBy$1 = ['name:asc'];
|
|
7708
7698
|
/**
|
|
7709
7699
|
* connectHierarchicalMenu connector provides the logic to build a widget that will
|
|
7710
7700
|
* give the user the ability to explore a tree-like structure.
|
|
@@ -7786,7 +7776,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7786
7776
|
var showMore = props.showMore,
|
|
7787
7777
|
limit = props.limit,
|
|
7788
7778
|
showMoreLimit = props.showMoreLimit;
|
|
7789
|
-
var id = getId$
|
|
7779
|
+
var id = getId$c(props);
|
|
7790
7780
|
var results = getResults(searchResults, {
|
|
7791
7781
|
ais: props.contextValue,
|
|
7792
7782
|
multiIndexContext: props.indexContextValue
|
|
@@ -7796,7 +7786,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7796
7786
|
if (!isFacetPresent) {
|
|
7797
7787
|
return {
|
|
7798
7788
|
items: [],
|
|
7799
|
-
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7789
|
+
currentRefinement: getCurrentRefinement$b(props, searchState, {
|
|
7800
7790
|
ais: props.contextValue,
|
|
7801
7791
|
multiIndexContext: props.indexContextValue
|
|
7802
7792
|
}),
|
|
@@ -7806,16 +7796,16 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7806
7796
|
|
|
7807
7797
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7808
7798
|
var value = results.getFacetValues(id, {
|
|
7809
|
-
sortBy: sortBy
|
|
7799
|
+
sortBy: sortBy$1
|
|
7810
7800
|
});
|
|
7811
|
-
var items = value.data ? transformValue
|
|
7801
|
+
var items = value.data ? transformValue(value.data, props, searchState, {
|
|
7812
7802
|
ais: props.contextValue,
|
|
7813
7803
|
multiIndexContext: props.indexContextValue
|
|
7814
7804
|
}) : [];
|
|
7815
7805
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7816
7806
|
return {
|
|
7817
7807
|
items: truncate(transformedItems, itemsLimit),
|
|
7818
|
-
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7808
|
+
currentRefinement: getCurrentRefinement$b(props, searchState, {
|
|
7819
7809
|
ais: props.contextValue,
|
|
7820
7810
|
multiIndexContext: props.indexContextValue
|
|
7821
7811
|
}),
|
|
@@ -7823,13 +7813,13 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7823
7813
|
};
|
|
7824
7814
|
},
|
|
7825
7815
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7826
|
-
return _refine$
|
|
7816
|
+
return _refine$8(props, searchState, nextRefinement, {
|
|
7827
7817
|
ais: props.contextValue,
|
|
7828
7818
|
multiIndexContext: props.indexContextValue
|
|
7829
7819
|
});
|
|
7830
7820
|
},
|
|
7831
7821
|
cleanUp: function cleanUp(props, searchState) {
|
|
7832
|
-
return _cleanUp(props, searchState, {
|
|
7822
|
+
return _cleanUp$7(props, searchState, {
|
|
7833
7823
|
ais: props.contextValue,
|
|
7834
7824
|
multiIndexContext: props.indexContextValue
|
|
7835
7825
|
});
|
|
@@ -7843,7 +7833,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7843
7833
|
limit = props.limit,
|
|
7844
7834
|
showMoreLimit = props.showMoreLimit,
|
|
7845
7835
|
contextValue = props.contextValue;
|
|
7846
|
-
var id = getId$
|
|
7836
|
+
var id = getId$c(props);
|
|
7847
7837
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7848
7838
|
searchParameters = searchParameters.addHierarchicalFacet({
|
|
7849
7839
|
name: id,
|
|
@@ -7854,7 +7844,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7854
7844
|
}).setQueryParameters({
|
|
7855
7845
|
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, itemsLimit)
|
|
7856
7846
|
});
|
|
7857
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7847
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
7858
7848
|
ais: contextValue,
|
|
7859
7849
|
multiIndexContext: props.indexContextValue
|
|
7860
7850
|
});
|
|
@@ -7867,8 +7857,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7867
7857
|
},
|
|
7868
7858
|
getMetadata: function getMetadata(props, searchState) {
|
|
7869
7859
|
var rootAttribute = props.attributes[0];
|
|
7870
|
-
var id = getId$
|
|
7871
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7860
|
+
var id = getId$c(props);
|
|
7861
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
7872
7862
|
ais: props.contextValue,
|
|
7873
7863
|
multiIndexContext: props.indexContextValue
|
|
7874
7864
|
});
|
|
@@ -7876,7 +7866,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7876
7866
|
label: "".concat(rootAttribute, ": ").concat(currentRefinement),
|
|
7877
7867
|
attribute: rootAttribute,
|
|
7878
7868
|
value: function value(nextState) {
|
|
7879
|
-
return _refine$
|
|
7869
|
+
return _refine$8(props, nextState, '', {
|
|
7880
7870
|
ais: props.contextValue,
|
|
7881
7871
|
multiIndexContext: props.indexContextValue
|
|
7882
7872
|
});
|
|
@@ -8053,12 +8043,12 @@ var connectHits = createConnectorWithContext({
|
|
|
8053
8043
|
}
|
|
8054
8044
|
});
|
|
8055
8045
|
|
|
8056
|
-
function getId$
|
|
8046
|
+
function getId$b() {
|
|
8057
8047
|
return 'hitsPerPage';
|
|
8058
8048
|
}
|
|
8059
8049
|
|
|
8060
|
-
function getCurrentRefinement$
|
|
8061
|
-
var id = getId$
|
|
8050
|
+
function getCurrentRefinement$a(props, searchState, context) {
|
|
8051
|
+
var id = getId$b();
|
|
8062
8052
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
8063
8053
|
|
|
8064
8054
|
if (typeof currentRefinement === 'string') {
|
|
@@ -8093,7 +8083,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8093
8083
|
transformItems: PropTypes.func
|
|
8094
8084
|
},
|
|
8095
8085
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
8096
|
-
var currentRefinement = getCurrentRefinement$
|
|
8086
|
+
var currentRefinement = getCurrentRefinement$a(props, searchState, {
|
|
8097
8087
|
ais: props.contextValue,
|
|
8098
8088
|
multiIndexContext: props.indexContextValue
|
|
8099
8089
|
});
|
|
@@ -8110,7 +8100,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8110
8100
|
};
|
|
8111
8101
|
},
|
|
8112
8102
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8113
|
-
var id = getId$
|
|
8103
|
+
var id = getId$b();
|
|
8114
8104
|
|
|
8115
8105
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
8116
8106
|
|
|
@@ -8124,27 +8114,27 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8124
8114
|
return cleanUpValue(searchState, {
|
|
8125
8115
|
ais: props.contextValue,
|
|
8126
8116
|
multiIndexContext: props.indexContextValue
|
|
8127
|
-
}, getId$
|
|
8117
|
+
}, getId$b());
|
|
8128
8118
|
},
|
|
8129
8119
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8130
|
-
return searchParameters.setHitsPerPage(getCurrentRefinement$
|
|
8120
|
+
return searchParameters.setHitsPerPage(getCurrentRefinement$a(props, searchState, {
|
|
8131
8121
|
ais: props.contextValue,
|
|
8132
8122
|
multiIndexContext: props.indexContextValue
|
|
8133
8123
|
}));
|
|
8134
8124
|
},
|
|
8135
8125
|
getMetadata: function getMetadata() {
|
|
8136
8126
|
return {
|
|
8137
|
-
id: getId$
|
|
8127
|
+
id: getId$b()
|
|
8138
8128
|
};
|
|
8139
8129
|
}
|
|
8140
8130
|
});
|
|
8141
8131
|
|
|
8142
|
-
function getId$
|
|
8132
|
+
function getId$a() {
|
|
8143
8133
|
return 'page';
|
|
8144
8134
|
}
|
|
8145
8135
|
|
|
8146
|
-
function getCurrentRefinement$
|
|
8147
|
-
var id = getId$
|
|
8136
|
+
function getCurrentRefinement$9(props, searchState, context) {
|
|
8137
|
+
var id = getId$a();
|
|
8148
8138
|
var page = 1;
|
|
8149
8139
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8150
8140
|
|
|
@@ -8156,9 +8146,9 @@ function getCurrentRefinement$2(props, searchState, context) {
|
|
|
8156
8146
|
}
|
|
8157
8147
|
|
|
8158
8148
|
function getStateWithoutPage(state) {
|
|
8159
|
-
var _ref = state || {}
|
|
8160
|
-
|
|
8161
|
-
rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8149
|
+
var _ref = state || {};
|
|
8150
|
+
_ref.page;
|
|
8151
|
+
var rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8162
8152
|
|
|
8163
8153
|
return rest;
|
|
8164
8154
|
}
|
|
@@ -8267,14 +8257,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8267
8257
|
},
|
|
8268
8258
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8269
8259
|
return searchParameters.setQueryParameters({
|
|
8270
|
-
page: getCurrentRefinement$
|
|
8260
|
+
page: getCurrentRefinement$9(props, searchState, {
|
|
8271
8261
|
ais: props.contextValue,
|
|
8272
8262
|
multiIndexContext: props.indexContextValue
|
|
8273
8263
|
}) - 1
|
|
8274
8264
|
});
|
|
8275
8265
|
},
|
|
8276
8266
|
refine: function refine(props, searchState, event, index) {
|
|
8277
|
-
var id = getId$
|
|
8267
|
+
var id = getId$a();
|
|
8278
8268
|
|
|
8279
8269
|
var nextValue = _defineProperty({}, id, index + 1);
|
|
8280
8270
|
|
|
@@ -8286,14 +8276,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8286
8276
|
}
|
|
8287
8277
|
});
|
|
8288
8278
|
|
|
8289
|
-
var namespace$
|
|
8279
|
+
var namespace$4 = 'menu';
|
|
8290
8280
|
|
|
8291
|
-
function getId$
|
|
8281
|
+
function getId$9(props) {
|
|
8292
8282
|
return props.attribute;
|
|
8293
8283
|
}
|
|
8294
8284
|
|
|
8295
|
-
function getCurrentRefinement$
|
|
8296
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8285
|
+
function getCurrentRefinement$8(props, searchState, context) {
|
|
8286
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)), null);
|
|
8297
8287
|
|
|
8298
8288
|
if (currentRefinement === '') {
|
|
8299
8289
|
return null;
|
|
@@ -8303,28 +8293,28 @@ function getCurrentRefinement$3(props, searchState, context) {
|
|
|
8303
8293
|
}
|
|
8304
8294
|
|
|
8305
8295
|
function getValue$1(name, props, searchState, context) {
|
|
8306
|
-
var currentRefinement = getCurrentRefinement$
|
|
8296
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, context);
|
|
8307
8297
|
return name === currentRefinement ? '' : name;
|
|
8308
8298
|
}
|
|
8309
8299
|
|
|
8310
|
-
function getLimit(_ref) {
|
|
8300
|
+
function getLimit$1(_ref) {
|
|
8311
8301
|
var showMore = _ref.showMore,
|
|
8312
8302
|
limit = _ref.limit,
|
|
8313
8303
|
showMoreLimit = _ref.showMoreLimit;
|
|
8314
8304
|
return showMore ? showMoreLimit : limit;
|
|
8315
8305
|
}
|
|
8316
8306
|
|
|
8317
|
-
function _refine$
|
|
8318
|
-
var id = getId$
|
|
8307
|
+
function _refine$7(props, searchState, nextRefinement, context) {
|
|
8308
|
+
var id = getId$9(props);
|
|
8319
8309
|
|
|
8320
8310
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : '');
|
|
8321
8311
|
|
|
8322
8312
|
var resetPage = true;
|
|
8323
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
8313
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$4);
|
|
8324
8314
|
}
|
|
8325
8315
|
|
|
8326
|
-
function _cleanUp$
|
|
8327
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
8316
|
+
function _cleanUp$6(props, searchState, context) {
|
|
8317
|
+
return cleanUpValue(searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)));
|
|
8328
8318
|
}
|
|
8329
8319
|
|
|
8330
8320
|
var defaultSortBy = ['count:desc', 'name:asc'];
|
|
@@ -8383,7 +8373,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8383
8373
|
if (!canRefine) {
|
|
8384
8374
|
return {
|
|
8385
8375
|
items: [],
|
|
8386
|
-
currentRefinement: getCurrentRefinement$
|
|
8376
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
8387
8377
|
ais: props.contextValue,
|
|
8388
8378
|
multiIndexContext: props.indexContextValue
|
|
8389
8379
|
}),
|
|
@@ -8430,8 +8420,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8430
8420
|
|
|
8431
8421
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
8432
8422
|
return {
|
|
8433
|
-
items: transformedItems.slice(0, getLimit(props)),
|
|
8434
|
-
currentRefinement: getCurrentRefinement$
|
|
8423
|
+
items: transformedItems.slice(0, getLimit$1(props)),
|
|
8424
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
8435
8425
|
ais: props.contextValue,
|
|
8436
8426
|
multiIndexContext: props.indexContextValue
|
|
8437
8427
|
}),
|
|
@@ -8441,7 +8431,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8441
8431
|
};
|
|
8442
8432
|
},
|
|
8443
8433
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8444
|
-
return _refine$
|
|
8434
|
+
return _refine$7(props, searchState, nextRefinement, {
|
|
8445
8435
|
ais: props.contextValue,
|
|
8446
8436
|
multiIndexContext: props.indexContextValue
|
|
8447
8437
|
});
|
|
@@ -8450,11 +8440,11 @@ var connectMenu = createConnectorWithContext({
|
|
|
8450
8440
|
return {
|
|
8451
8441
|
facetName: props.attribute,
|
|
8452
8442
|
query: nextRefinement,
|
|
8453
|
-
maxFacetHits: getLimit(props)
|
|
8443
|
+
maxFacetHits: getLimit$1(props)
|
|
8454
8444
|
};
|
|
8455
8445
|
},
|
|
8456
8446
|
cleanUp: function cleanUp(props, searchState) {
|
|
8457
|
-
return _cleanUp$
|
|
8447
|
+
return _cleanUp$6(props, searchState, {
|
|
8458
8448
|
ais: props.contextValue,
|
|
8459
8449
|
multiIndexContext: props.indexContextValue
|
|
8460
8450
|
});
|
|
@@ -8462,10 +8452,10 @@ var connectMenu = createConnectorWithContext({
|
|
|
8462
8452
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8463
8453
|
var attribute = props.attribute;
|
|
8464
8454
|
searchParameters = searchParameters.setQueryParameters({
|
|
8465
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
8455
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit$1(props))
|
|
8466
8456
|
});
|
|
8467
8457
|
searchParameters = searchParameters.addDisjunctiveFacet(attribute);
|
|
8468
|
-
var currentRefinement = getCurrentRefinement$
|
|
8458
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
8469
8459
|
ais: props.contextValue,
|
|
8470
8460
|
multiIndexContext: props.indexContextValue
|
|
8471
8461
|
});
|
|
@@ -8477,8 +8467,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8477
8467
|
return searchParameters;
|
|
8478
8468
|
},
|
|
8479
8469
|
getMetadata: function getMetadata(props, searchState) {
|
|
8480
|
-
var id = getId$
|
|
8481
|
-
var currentRefinement = getCurrentRefinement$
|
|
8470
|
+
var id = getId$9(props);
|
|
8471
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
8482
8472
|
ais: props.contextValue,
|
|
8483
8473
|
multiIndexContext: props.indexContextValue
|
|
8484
8474
|
});
|
|
@@ -8492,7 +8482,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8492
8482
|
label: "".concat(props.attribute, ": ").concat(currentRefinement),
|
|
8493
8483
|
attribute: props.attribute,
|
|
8494
8484
|
value: function value(nextState) {
|
|
8495
|
-
return _refine$
|
|
8485
|
+
return _refine$7(props, nextState, '', {
|
|
8496
8486
|
ais: props.contextValue,
|
|
8497
8487
|
multiIndexContext: props.indexContextValue
|
|
8498
8488
|
});
|
|
@@ -8573,12 +8563,12 @@ function parseItem(value) {
|
|
|
8573
8563
|
|
|
8574
8564
|
var namespace$3 = 'multiRange';
|
|
8575
8565
|
|
|
8576
|
-
function getId$
|
|
8566
|
+
function getId$8(props) {
|
|
8577
8567
|
return props.attribute;
|
|
8578
8568
|
}
|
|
8579
8569
|
|
|
8580
|
-
function getCurrentRefinement$
|
|
8581
|
-
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8570
|
+
function getCurrentRefinement$7(props, searchState, context) {
|
|
8571
|
+
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$8(props)), '');
|
|
8582
8572
|
}
|
|
8583
8573
|
|
|
8584
8574
|
function isRefinementsRangeIncludesInsideItemRange(stats, start, end) {
|
|
@@ -8597,15 +8587,15 @@ function itemHasRefinement(attribute, results, value) {
|
|
|
8597
8587
|
return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end)));
|
|
8598
8588
|
}
|
|
8599
8589
|
|
|
8600
|
-
function _refine$
|
|
8601
|
-
var nextValue = _defineProperty({}, getId$
|
|
8590
|
+
function _refine$6(props, searchState, nextRefinement, context) {
|
|
8591
|
+
var nextValue = _defineProperty({}, getId$8(props), nextRefinement);
|
|
8602
8592
|
|
|
8603
8593
|
var resetPage = true;
|
|
8604
8594
|
return refineValue(searchState, nextValue, context, resetPage, namespace$3);
|
|
8605
8595
|
}
|
|
8606
8596
|
|
|
8607
|
-
function _cleanUp$
|
|
8608
|
-
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8597
|
+
function _cleanUp$5(props, searchState, context) {
|
|
8598
|
+
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$8(props)));
|
|
8609
8599
|
}
|
|
8610
8600
|
/**
|
|
8611
8601
|
* connectNumericMenu connector provides the logic to build a widget that will
|
|
@@ -8639,7 +8629,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8639
8629
|
},
|
|
8640
8630
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
8641
8631
|
var attribute = props.attribute;
|
|
8642
|
-
var currentRefinement = getCurrentRefinement$
|
|
8632
|
+
var currentRefinement = getCurrentRefinement$7(props, searchState, {
|
|
8643
8633
|
ais: props.contextValue,
|
|
8644
8634
|
multiIndexContext: props.indexContextValue
|
|
8645
8635
|
});
|
|
@@ -8653,11 +8643,11 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8653
8643
|
label: item.label,
|
|
8654
8644
|
value: value,
|
|
8655
8645
|
isRefined: value === currentRefinement,
|
|
8656
|
-
noRefinement: results ? itemHasRefinement(getId$
|
|
8646
|
+
noRefinement: results ? itemHasRefinement(getId$8(props), results, value) : false
|
|
8657
8647
|
};
|
|
8658
8648
|
});
|
|
8659
8649
|
var stats = results && results.getFacetByName(attribute) ? results.getFacetStats(attribute) : null;
|
|
8660
|
-
var refinedItem = find(items, function (item) {
|
|
8650
|
+
var refinedItem = find$2(items, function (item) {
|
|
8661
8651
|
return item.isRefined === true;
|
|
8662
8652
|
});
|
|
8663
8653
|
|
|
@@ -8682,13 +8672,13 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8682
8672
|
};
|
|
8683
8673
|
},
|
|
8684
8674
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8685
|
-
return _refine$
|
|
8675
|
+
return _refine$6(props, searchState, nextRefinement, {
|
|
8686
8676
|
ais: props.contextValue,
|
|
8687
8677
|
multiIndexContext: props.indexContextValue
|
|
8688
8678
|
});
|
|
8689
8679
|
},
|
|
8690
8680
|
cleanUp: function cleanUp(props, searchState) {
|
|
8691
|
-
return _cleanUp$
|
|
8681
|
+
return _cleanUp$5(props, searchState, {
|
|
8692
8682
|
ais: props.contextValue,
|
|
8693
8683
|
multiIndexContext: props.indexContextValue
|
|
8694
8684
|
});
|
|
@@ -8696,7 +8686,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8696
8686
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8697
8687
|
var attribute = props.attribute;
|
|
8698
8688
|
|
|
8699
|
-
var _parseItem = parseItem(getCurrentRefinement$
|
|
8689
|
+
var _parseItem = parseItem(getCurrentRefinement$7(props, searchState, {
|
|
8700
8690
|
ais: props.contextValue,
|
|
8701
8691
|
multiIndexContext: props.indexContextValue
|
|
8702
8692
|
})),
|
|
@@ -8716,8 +8706,8 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8716
8706
|
return searchParameters;
|
|
8717
8707
|
},
|
|
8718
8708
|
getMetadata: function getMetadata(props, searchState) {
|
|
8719
|
-
var id = getId$
|
|
8720
|
-
var value = getCurrentRefinement$
|
|
8709
|
+
var id = getId$8(props);
|
|
8710
|
+
var value = getCurrentRefinement$7(props, searchState, {
|
|
8721
8711
|
ais: props.contextValue,
|
|
8722
8712
|
multiIndexContext: props.indexContextValue
|
|
8723
8713
|
});
|
|
@@ -8728,7 +8718,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8728
8718
|
});
|
|
8729
8719
|
|
|
8730
8720
|
if (value !== '') {
|
|
8731
|
-
var _find = find(props.items, function (item) {
|
|
8721
|
+
var _find = find$2(props.items, function (item) {
|
|
8732
8722
|
return stringifyItem(item) === value;
|
|
8733
8723
|
}),
|
|
8734
8724
|
label = _find.label;
|
|
@@ -8738,7 +8728,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8738
8728
|
attribute: props.attribute,
|
|
8739
8729
|
currentRefinement: label,
|
|
8740
8730
|
value: function value(nextState) {
|
|
8741
|
-
return _refine$
|
|
8731
|
+
return _refine$6(props, nextState, '', {
|
|
8742
8732
|
ais: props.contextValue,
|
|
8743
8733
|
multiIndexContext: props.indexContextValue
|
|
8744
8734
|
});
|
|
@@ -8754,12 +8744,12 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8754
8744
|
}
|
|
8755
8745
|
});
|
|
8756
8746
|
|
|
8757
|
-
function getId$
|
|
8747
|
+
function getId$7() {
|
|
8758
8748
|
return 'page';
|
|
8759
8749
|
}
|
|
8760
8750
|
|
|
8761
|
-
function getCurrentRefinement$
|
|
8762
|
-
var id = getId$
|
|
8751
|
+
function getCurrentRefinement$6(props, searchState, context) {
|
|
8752
|
+
var id = getId$7();
|
|
8763
8753
|
var page = 1;
|
|
8764
8754
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8765
8755
|
|
|
@@ -8770,8 +8760,8 @@ function getCurrentRefinement$5(props, searchState, context) {
|
|
|
8770
8760
|
return currentRefinement;
|
|
8771
8761
|
}
|
|
8772
8762
|
|
|
8773
|
-
function _refine$
|
|
8774
|
-
var id = getId$
|
|
8763
|
+
function _refine$5(props, searchState, nextPage, context) {
|
|
8764
|
+
var id = getId$7();
|
|
8775
8765
|
|
|
8776
8766
|
var nextValue = _defineProperty({}, id, nextPage);
|
|
8777
8767
|
|
|
@@ -8811,7 +8801,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8811
8801
|
var nbPages = results.nbPages;
|
|
8812
8802
|
return {
|
|
8813
8803
|
nbPages: nbPages,
|
|
8814
|
-
currentRefinement: getCurrentRefinement$
|
|
8804
|
+
currentRefinement: getCurrentRefinement$6(props, searchState, {
|
|
8815
8805
|
ais: props.contextValue,
|
|
8816
8806
|
multiIndexContext: props.indexContextValue
|
|
8817
8807
|
}),
|
|
@@ -8819,7 +8809,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8819
8809
|
};
|
|
8820
8810
|
},
|
|
8821
8811
|
refine: function refine(props, searchState, nextPage) {
|
|
8822
|
-
return _refine$
|
|
8812
|
+
return _refine$5(props, searchState, nextPage, {
|
|
8823
8813
|
ais: props.contextValue,
|
|
8824
8814
|
multiIndexContext: props.indexContextValue
|
|
8825
8815
|
});
|
|
@@ -8828,17 +8818,17 @@ var connectPagination = createConnectorWithContext({
|
|
|
8828
8818
|
return cleanUpValue(searchState, {
|
|
8829
8819
|
ais: props.contextValue,
|
|
8830
8820
|
multiIndexContext: props.indexContextValue
|
|
8831
|
-
}, getId$
|
|
8821
|
+
}, getId$7());
|
|
8832
8822
|
},
|
|
8833
8823
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8834
|
-
return searchParameters.setPage(getCurrentRefinement$
|
|
8824
|
+
return searchParameters.setPage(getCurrentRefinement$6(props, searchState, {
|
|
8835
8825
|
ais: props.contextValue,
|
|
8836
8826
|
multiIndexContext: props.indexContextValue
|
|
8837
8827
|
}) - 1);
|
|
8838
8828
|
},
|
|
8839
8829
|
getMetadata: function getMetadata() {
|
|
8840
8830
|
return {
|
|
8841
|
-
id: getId$
|
|
8831
|
+
id: getId$7()
|
|
8842
8832
|
};
|
|
8843
8833
|
}
|
|
8844
8834
|
});
|
|
@@ -8884,11 +8874,11 @@ var connectPoweredBy = createConnectorWithContext({
|
|
|
8884
8874
|
* @providedPropType {number} precision - Number of digits after decimal point to use.
|
|
8885
8875
|
*/
|
|
8886
8876
|
|
|
8887
|
-
function getId$
|
|
8877
|
+
function getId$6(props) {
|
|
8888
8878
|
return props.attribute;
|
|
8889
8879
|
}
|
|
8890
8880
|
|
|
8891
|
-
var namespace$
|
|
8881
|
+
var namespace$2 = 'range';
|
|
8892
8882
|
|
|
8893
8883
|
function getCurrentRange(boundaries, stats, precision) {
|
|
8894
8884
|
var pow = Math.pow(10, precision);
|
|
@@ -8918,8 +8908,8 @@ function getCurrentRange(boundaries, stats, precision) {
|
|
|
8918
8908
|
};
|
|
8919
8909
|
}
|
|
8920
8910
|
|
|
8921
|
-
function getCurrentRefinement$
|
|
8922
|
-
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8911
|
+
function getCurrentRefinement$5(props, searchState, currentRange, context) {
|
|
8912
|
+
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)), {}),
|
|
8923
8913
|
min = _getCurrentRefinement.min,
|
|
8924
8914
|
max = _getCurrentRefinement.max;
|
|
8925
8915
|
|
|
@@ -8985,7 +8975,7 @@ function nextValueForRefinement(hasBound, isReset, range, value) {
|
|
|
8985
8975
|
return next;
|
|
8986
8976
|
}
|
|
8987
8977
|
|
|
8988
|
-
function _refine$
|
|
8978
|
+
function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
8989
8979
|
var nextMin = nextRefinement.min,
|
|
8990
8980
|
nextMax = nextRefinement.max;
|
|
8991
8981
|
var currentMinRange = currentRange.min,
|
|
@@ -9009,7 +8999,7 @@ function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
|
9009
8999
|
throw Error("You can't provide max value greater than range.");
|
|
9010
9000
|
}
|
|
9011
9001
|
|
|
9012
|
-
var id = getId$
|
|
9002
|
+
var id = getId$6(props);
|
|
9013
9003
|
var resetPage = true;
|
|
9014
9004
|
|
|
9015
9005
|
var nextValue = _defineProperty({}, id, {
|
|
@@ -9017,11 +9007,11 @@ function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
|
9017
9007
|
max: nextValueForRefinement(props.max !== undefined, isMaxReset, currentMaxRange, nextMaxAsNumber)
|
|
9018
9008
|
});
|
|
9019
9009
|
|
|
9020
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9010
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$2);
|
|
9021
9011
|
}
|
|
9022
9012
|
|
|
9023
|
-
function _cleanUp$
|
|
9024
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9013
|
+
function _cleanUp$4(props, searchState, context) {
|
|
9014
|
+
return cleanUpValue(searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)));
|
|
9025
9015
|
}
|
|
9026
9016
|
|
|
9027
9017
|
var connectRange = createConnectorWithContext({
|
|
@@ -9076,7 +9066,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9076
9066
|
min: rangeMin,
|
|
9077
9067
|
max: rangeMax
|
|
9078
9068
|
};
|
|
9079
|
-
var currentRefinement = getCurrentRefinement$
|
|
9069
|
+
var currentRefinement = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
9080
9070
|
ais: props.contextValue,
|
|
9081
9071
|
multiIndexContext: props.indexContextValue
|
|
9082
9072
|
});
|
|
@@ -9090,13 +9080,13 @@ var connectRange = createConnectorWithContext({
|
|
|
9090
9080
|
};
|
|
9091
9081
|
},
|
|
9092
9082
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9093
|
-
return _refine$
|
|
9083
|
+
return _refine$4(props, searchState, nextRefinement, this._currentRange, {
|
|
9094
9084
|
ais: props.contextValue,
|
|
9095
9085
|
multiIndexContext: props.indexContextValue
|
|
9096
9086
|
});
|
|
9097
9087
|
},
|
|
9098
9088
|
cleanUp: function cleanUp(props, searchState) {
|
|
9099
|
-
return _cleanUp$
|
|
9089
|
+
return _cleanUp$4(props, searchState, {
|
|
9100
9090
|
ais: props.contextValue,
|
|
9101
9091
|
multiIndexContext: props.indexContextValue
|
|
9102
9092
|
});
|
|
@@ -9104,7 +9094,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9104
9094
|
getSearchParameters: function getSearchParameters(params, props, searchState) {
|
|
9105
9095
|
var attribute = props.attribute;
|
|
9106
9096
|
|
|
9107
|
-
var _getCurrentRefinement2 = getCurrentRefinement$
|
|
9097
|
+
var _getCurrentRefinement2 = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
9108
9098
|
ais: props.contextValue,
|
|
9109
9099
|
multiIndexContext: props.indexContextValue
|
|
9110
9100
|
}),
|
|
@@ -9130,7 +9120,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9130
9120
|
minRange = _this$_currentRange.min,
|
|
9131
9121
|
maxRange = _this$_currentRange.max;
|
|
9132
9122
|
|
|
9133
|
-
var _getCurrentRefinement3 = getCurrentRefinement$
|
|
9123
|
+
var _getCurrentRefinement3 = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
9134
9124
|
ais: props.contextValue,
|
|
9135
9125
|
multiIndexContext: props.indexContextValue
|
|
9136
9126
|
}),
|
|
@@ -9149,7 +9139,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9149
9139
|
label: fragments.join(''),
|
|
9150
9140
|
attribute: props.attribute,
|
|
9151
9141
|
value: function value(nextState) {
|
|
9152
|
-
return _refine$
|
|
9142
|
+
return _refine$4(props, nextState, {}, _this._currentRange, {
|
|
9153
9143
|
ais: props.contextValue,
|
|
9154
9144
|
multiIndexContext: props.indexContextValue
|
|
9155
9145
|
});
|
|
@@ -9165,7 +9155,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9165
9155
|
}
|
|
9166
9156
|
|
|
9167
9157
|
return {
|
|
9168
|
-
id: getId$
|
|
9158
|
+
id: getId$6(props),
|
|
9169
9159
|
index: getIndexId({
|
|
9170
9160
|
ais: props.contextValue,
|
|
9171
9161
|
multiIndexContext: props.indexContextValue
|
|
@@ -9175,14 +9165,14 @@ var connectRange = createConnectorWithContext({
|
|
|
9175
9165
|
}
|
|
9176
9166
|
});
|
|
9177
9167
|
|
|
9178
|
-
var namespace$
|
|
9168
|
+
var namespace$1 = 'refinementList';
|
|
9179
9169
|
|
|
9180
|
-
function getId$
|
|
9170
|
+
function getId$5(props) {
|
|
9181
9171
|
return props.attribute;
|
|
9182
9172
|
}
|
|
9183
9173
|
|
|
9184
|
-
function getCurrentRefinement$
|
|
9185
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
9174
|
+
function getCurrentRefinement$4(props, searchState, context) {
|
|
9175
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$1, ".").concat(getId$5(props)), []);
|
|
9186
9176
|
|
|
9187
9177
|
if (typeof currentRefinement !== 'string') {
|
|
9188
9178
|
return currentRefinement;
|
|
@@ -9195,8 +9185,8 @@ function getCurrentRefinement$7(props, searchState, context) {
|
|
|
9195
9185
|
return [];
|
|
9196
9186
|
}
|
|
9197
9187
|
|
|
9198
|
-
function getValue
|
|
9199
|
-
var currentRefinement = getCurrentRefinement$
|
|
9188
|
+
function getValue(name, props, searchState, context) {
|
|
9189
|
+
var currentRefinement = getCurrentRefinement$4(props, searchState, context);
|
|
9200
9190
|
var isAnewValue = currentRefinement.indexOf(name) === -1;
|
|
9201
9191
|
var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates
|
|
9202
9192
|
: currentRefinement.filter(function (selectedValue) {
|
|
@@ -9206,15 +9196,15 @@ function getValue$2(name, props, searchState, context) {
|
|
|
9206
9196
|
return nextRefinement;
|
|
9207
9197
|
}
|
|
9208
9198
|
|
|
9209
|
-
function getLimit
|
|
9199
|
+
function getLimit(_ref) {
|
|
9210
9200
|
var showMore = _ref.showMore,
|
|
9211
9201
|
limit = _ref.limit,
|
|
9212
9202
|
showMoreLimit = _ref.showMoreLimit;
|
|
9213
9203
|
return showMore ? showMoreLimit : limit;
|
|
9214
9204
|
}
|
|
9215
9205
|
|
|
9216
|
-
function _refine$
|
|
9217
|
-
var id = getId$
|
|
9206
|
+
function _refine$3(props, searchState, nextRefinement, context) {
|
|
9207
|
+
var id = getId$5(props); // Setting the value to an empty string ensures that it is persisted in
|
|
9218
9208
|
// the URL as an empty value.
|
|
9219
9209
|
// This is necessary in the case where `defaultRefinement` contains one
|
|
9220
9210
|
// item and we try to deselect it. `nextSelected` would be an empty array,
|
|
@@ -9225,11 +9215,11 @@ function _refine$6(props, searchState, nextRefinement, context) {
|
|
|
9225
9215
|
var nextValue = _defineProperty({}, id, nextRefinement.length > 0 ? nextRefinement : '');
|
|
9226
9216
|
|
|
9227
9217
|
var resetPage = true;
|
|
9228
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9218
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$1);
|
|
9229
9219
|
}
|
|
9230
9220
|
|
|
9231
|
-
function _cleanUp$
|
|
9232
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9221
|
+
function _cleanUp$3(props, searchState, context) {
|
|
9222
|
+
return cleanUpValue(searchState, context, "".concat(namespace$1, ".").concat(getId$5(props)));
|
|
9233
9223
|
}
|
|
9234
9224
|
/**
|
|
9235
9225
|
* connectRefinementList connector provides the logic to build a widget that will
|
|
@@ -9256,7 +9246,7 @@ function _cleanUp$4(props, searchState, context) {
|
|
|
9256
9246
|
*/
|
|
9257
9247
|
|
|
9258
9248
|
|
|
9259
|
-
var sortBy
|
|
9249
|
+
var sortBy = ['isRefined', 'count:desc', 'name:asc'];
|
|
9260
9250
|
var connectRefinementList = createConnectorWithContext({
|
|
9261
9251
|
displayName: 'AlgoliaRefinementList',
|
|
9262
9252
|
propTypes: {
|
|
@@ -9294,7 +9284,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9294
9284
|
if (!canRefine) {
|
|
9295
9285
|
return {
|
|
9296
9286
|
items: [],
|
|
9297
|
-
currentRefinement: getCurrentRefinement$
|
|
9287
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, {
|
|
9298
9288
|
ais: props.contextValue,
|
|
9299
9289
|
multiIndexContext: props.indexContextValue
|
|
9300
9290
|
}),
|
|
@@ -9307,7 +9297,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9307
9297
|
var items = isFromSearch ? searchForFacetValuesResults[attribute].map(function (v) {
|
|
9308
9298
|
return {
|
|
9309
9299
|
label: v.value,
|
|
9310
|
-
value: getValue
|
|
9300
|
+
value: getValue(v.value, props, searchState, {
|
|
9311
9301
|
ais: props.contextValue,
|
|
9312
9302
|
multiIndexContext: props.indexContextValue
|
|
9313
9303
|
}),
|
|
@@ -9320,11 +9310,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9320
9310
|
isRefined: v.isRefined
|
|
9321
9311
|
};
|
|
9322
9312
|
}) : results.getFacetValues(attribute, {
|
|
9323
|
-
sortBy: sortBy
|
|
9313
|
+
sortBy: sortBy
|
|
9324
9314
|
}).map(function (v) {
|
|
9325
9315
|
return {
|
|
9326
9316
|
label: v.name,
|
|
9327
|
-
value: getValue
|
|
9317
|
+
value: getValue(v.name, props, searchState, {
|
|
9328
9318
|
ais: props.contextValue,
|
|
9329
9319
|
multiIndexContext: props.indexContextValue
|
|
9330
9320
|
}),
|
|
@@ -9334,8 +9324,8 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9334
9324
|
});
|
|
9335
9325
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
9336
9326
|
return {
|
|
9337
|
-
items: transformedItems.slice(0, getLimit
|
|
9338
|
-
currentRefinement: getCurrentRefinement$
|
|
9327
|
+
items: transformedItems.slice(0, getLimit(props)),
|
|
9328
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, {
|
|
9339
9329
|
ais: props.contextValue,
|
|
9340
9330
|
multiIndexContext: props.indexContextValue
|
|
9341
9331
|
}),
|
|
@@ -9345,7 +9335,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9345
9335
|
};
|
|
9346
9336
|
},
|
|
9347
9337
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9348
|
-
return _refine$
|
|
9338
|
+
return _refine$3(props, searchState, nextRefinement, {
|
|
9349
9339
|
ais: props.contextValue,
|
|
9350
9340
|
multiIndexContext: props.indexContextValue
|
|
9351
9341
|
});
|
|
@@ -9354,11 +9344,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9354
9344
|
return {
|
|
9355
9345
|
facetName: props.attribute,
|
|
9356
9346
|
query: nextRefinement,
|
|
9357
|
-
maxFacetHits: getLimit
|
|
9347
|
+
maxFacetHits: getLimit(props)
|
|
9358
9348
|
};
|
|
9359
9349
|
},
|
|
9360
9350
|
cleanUp: function cleanUp(props, searchState) {
|
|
9361
|
-
return _cleanUp$
|
|
9351
|
+
return _cleanUp$3(props, searchState, {
|
|
9362
9352
|
ais: props.contextValue,
|
|
9363
9353
|
multiIndexContext: props.indexContextValue
|
|
9364
9354
|
});
|
|
@@ -9369,10 +9359,10 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9369
9359
|
var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet';
|
|
9370
9360
|
var addRefinementKey = "".concat(addKey, "Refinement");
|
|
9371
9361
|
searchParameters = searchParameters.setQueryParameters({
|
|
9372
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit
|
|
9362
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
9373
9363
|
});
|
|
9374
9364
|
searchParameters = searchParameters[addKey](attribute);
|
|
9375
|
-
return getCurrentRefinement$
|
|
9365
|
+
return getCurrentRefinement$4(props, searchState, {
|
|
9376
9366
|
ais: props.contextValue,
|
|
9377
9367
|
multiIndexContext: props.indexContextValue
|
|
9378
9368
|
}).reduce(function (res, val) {
|
|
@@ -9380,7 +9370,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9380
9370
|
}, searchParameters);
|
|
9381
9371
|
},
|
|
9382
9372
|
getMetadata: function getMetadata(props, searchState) {
|
|
9383
|
-
var id = getId$
|
|
9373
|
+
var id = getId$5(props);
|
|
9384
9374
|
var context = {
|
|
9385
9375
|
ais: props.contextValue,
|
|
9386
9376
|
multiIndexContext: props.indexContextValue
|
|
@@ -9388,21 +9378,21 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9388
9378
|
return {
|
|
9389
9379
|
id: id,
|
|
9390
9380
|
index: getIndexId(context),
|
|
9391
|
-
items: getCurrentRefinement$
|
|
9381
|
+
items: getCurrentRefinement$4(props, searchState, context).length > 0 ? [{
|
|
9392
9382
|
attribute: props.attribute,
|
|
9393
9383
|
label: "".concat(props.attribute, ": "),
|
|
9394
|
-
currentRefinement: getCurrentRefinement$
|
|
9384
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, context),
|
|
9395
9385
|
value: function value(nextState) {
|
|
9396
|
-
return _refine$
|
|
9386
|
+
return _refine$3(props, nextState, [], context);
|
|
9397
9387
|
},
|
|
9398
|
-
items: getCurrentRefinement$
|
|
9388
|
+
items: getCurrentRefinement$4(props, searchState, context).map(function (item) {
|
|
9399
9389
|
return {
|
|
9400
9390
|
label: "".concat(item),
|
|
9401
9391
|
value: function value(nextState) {
|
|
9402
|
-
var nextSelectedItems = getCurrentRefinement$
|
|
9392
|
+
var nextSelectedItems = getCurrentRefinement$4(props, nextState, context).filter(function (other) {
|
|
9403
9393
|
return other !== item;
|
|
9404
9394
|
});
|
|
9405
|
-
return _refine$
|
|
9395
|
+
return _refine$3(props, searchState, nextSelectedItems, context);
|
|
9406
9396
|
}
|
|
9407
9397
|
};
|
|
9408
9398
|
})
|
|
@@ -9461,7 +9451,7 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9461
9451
|
// See: https://github.com/algolia/react-instantsearch/issues/164
|
|
9462
9452
|
|
|
9463
9453
|
|
|
9464
|
-
var cleanedSearchState = omit(searchState, ['configure', id]);
|
|
9454
|
+
var cleanedSearchState = omit$1(searchState, ['configure', id]);
|
|
9465
9455
|
var hasNotChanged = shallowEqual(this._prevSearchState, cleanedSearchState);
|
|
9466
9456
|
this._prevSearchState = cleanedSearchState;
|
|
9467
9457
|
return {
|
|
@@ -9471,12 +9461,12 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9471
9461
|
}
|
|
9472
9462
|
});
|
|
9473
9463
|
|
|
9474
|
-
function getId$
|
|
9464
|
+
function getId$4() {
|
|
9475
9465
|
return 'query';
|
|
9476
9466
|
}
|
|
9477
9467
|
|
|
9478
|
-
function getCurrentRefinement$
|
|
9479
|
-
var id = getId$
|
|
9468
|
+
function getCurrentRefinement$3(props, searchState, context) {
|
|
9469
|
+
var id = getId$4();
|
|
9480
9470
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9481
9471
|
|
|
9482
9472
|
if (currentRefinement) {
|
|
@@ -9486,8 +9476,8 @@ function getCurrentRefinement$8(props, searchState, context) {
|
|
|
9486
9476
|
return '';
|
|
9487
9477
|
}
|
|
9488
9478
|
|
|
9489
|
-
function _refine$
|
|
9490
|
-
var id = getId$
|
|
9479
|
+
function _refine$2(props, searchState, nextRefinement, context) {
|
|
9480
|
+
var id = getId$4();
|
|
9491
9481
|
|
|
9492
9482
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9493
9483
|
|
|
@@ -9495,8 +9485,8 @@ function _refine$7(props, searchState, nextRefinement, context) {
|
|
|
9495
9485
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9496
9486
|
}
|
|
9497
9487
|
|
|
9498
|
-
function _cleanUp$
|
|
9499
|
-
return cleanUpValue(searchState, context, getId$
|
|
9488
|
+
function _cleanUp$2(props, searchState, context) {
|
|
9489
|
+
return cleanUpValue(searchState, context, getId$4());
|
|
9500
9490
|
}
|
|
9501
9491
|
/**
|
|
9502
9492
|
* connectSearchBox connector provides the logic to build a widget that will
|
|
@@ -9517,7 +9507,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9517
9507
|
},
|
|
9518
9508
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
9519
9509
|
return {
|
|
9520
|
-
currentRefinement: getCurrentRefinement$
|
|
9510
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
9521
9511
|
ais: props.contextValue,
|
|
9522
9512
|
multiIndexContext: props.indexContextValue
|
|
9523
9513
|
}),
|
|
@@ -9525,26 +9515,26 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9525
9515
|
};
|
|
9526
9516
|
},
|
|
9527
9517
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9528
|
-
return _refine$
|
|
9518
|
+
return _refine$2(props, searchState, nextRefinement, {
|
|
9529
9519
|
ais: props.contextValue,
|
|
9530
9520
|
multiIndexContext: props.indexContextValue
|
|
9531
9521
|
});
|
|
9532
9522
|
},
|
|
9533
9523
|
cleanUp: function cleanUp(props, searchState) {
|
|
9534
|
-
return _cleanUp$
|
|
9524
|
+
return _cleanUp$2(props, searchState, {
|
|
9535
9525
|
ais: props.contextValue,
|
|
9536
9526
|
multiIndexContext: props.indexContextValue
|
|
9537
9527
|
});
|
|
9538
9528
|
},
|
|
9539
9529
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9540
|
-
return searchParameters.setQuery(getCurrentRefinement$
|
|
9530
|
+
return searchParameters.setQuery(getCurrentRefinement$3(props, searchState, {
|
|
9541
9531
|
ais: props.contextValue,
|
|
9542
9532
|
multiIndexContext: props.indexContextValue
|
|
9543
9533
|
}));
|
|
9544
9534
|
},
|
|
9545
9535
|
getMetadata: function getMetadata(props, searchState) {
|
|
9546
|
-
var id = getId$
|
|
9547
|
-
var currentRefinement = getCurrentRefinement$
|
|
9536
|
+
var id = getId$4();
|
|
9537
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
9548
9538
|
ais: props.contextValue,
|
|
9549
9539
|
multiIndexContext: props.indexContextValue
|
|
9550
9540
|
});
|
|
@@ -9557,7 +9547,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9557
9547
|
items: currentRefinement === null ? [] : [{
|
|
9558
9548
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9559
9549
|
value: function value(nextState) {
|
|
9560
|
-
return _refine$
|
|
9550
|
+
return _refine$2(props, nextState, '', {
|
|
9561
9551
|
ais: props.contextValue,
|
|
9562
9552
|
multiIndexContext: props.indexContextValue
|
|
9563
9553
|
});
|
|
@@ -9568,12 +9558,12 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9568
9558
|
}
|
|
9569
9559
|
});
|
|
9570
9560
|
|
|
9571
|
-
function getId$
|
|
9561
|
+
function getId$3() {
|
|
9572
9562
|
return 'relevancyStrictness';
|
|
9573
9563
|
}
|
|
9574
9564
|
|
|
9575
|
-
function getCurrentRefinement$
|
|
9576
|
-
var id = getId$
|
|
9565
|
+
function getCurrentRefinement$2(props, searchState, context) {
|
|
9566
|
+
var id = getId$3();
|
|
9577
9567
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id);
|
|
9578
9568
|
return currentRefinement;
|
|
9579
9569
|
}
|
|
@@ -9599,13 +9589,13 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9599
9589
|
};
|
|
9600
9590
|
},
|
|
9601
9591
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9602
|
-
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$
|
|
9592
|
+
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$2(props, searchState, {
|
|
9603
9593
|
ais: props.contextValue,
|
|
9604
9594
|
multiIndexContext: props.indexContextValue
|
|
9605
9595
|
}));
|
|
9606
9596
|
},
|
|
9607
9597
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9608
|
-
var nextValue = _defineProperty({}, getId$
|
|
9598
|
+
var nextValue = _defineProperty({}, getId$3(), nextRefinement);
|
|
9609
9599
|
|
|
9610
9600
|
var resetPage = true;
|
|
9611
9601
|
return refineValue(searchState, nextValue, {
|
|
@@ -9615,12 +9605,12 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9615
9605
|
}
|
|
9616
9606
|
});
|
|
9617
9607
|
|
|
9618
|
-
function getId$
|
|
9608
|
+
function getId$2() {
|
|
9619
9609
|
return 'sortBy';
|
|
9620
9610
|
}
|
|
9621
9611
|
|
|
9622
|
-
function getCurrentRefinement$
|
|
9623
|
-
var id = getId$
|
|
9612
|
+
function getCurrentRefinement$1(props, searchState, context) {
|
|
9613
|
+
var id = getId$2();
|
|
9624
9614
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
9625
9615
|
|
|
9626
9616
|
if (currentRefinement) {
|
|
@@ -9657,7 +9647,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9657
9647
|
transformItems: PropTypes.func
|
|
9658
9648
|
},
|
|
9659
9649
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
9660
|
-
var currentRefinement = getCurrentRefinement$
|
|
9650
|
+
var currentRefinement = getCurrentRefinement$1(props, searchState, {
|
|
9661
9651
|
ais: props.contextValue,
|
|
9662
9652
|
multiIndexContext: props.indexContextValue
|
|
9663
9653
|
});
|
|
@@ -9674,7 +9664,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9674
9664
|
};
|
|
9675
9665
|
},
|
|
9676
9666
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9677
|
-
var id = getId$
|
|
9667
|
+
var id = getId$2();
|
|
9678
9668
|
|
|
9679
9669
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9680
9670
|
|
|
@@ -9688,10 +9678,10 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9688
9678
|
return cleanUpValue(searchState, {
|
|
9689
9679
|
ais: props.contextValue,
|
|
9690
9680
|
multiIndexContext: props.indexContextValue
|
|
9691
|
-
}, getId$
|
|
9681
|
+
}, getId$2());
|
|
9692
9682
|
},
|
|
9693
9683
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9694
|
-
var selectedIndex = getCurrentRefinement$
|
|
9684
|
+
var selectedIndex = getCurrentRefinement$1(props, searchState, {
|
|
9695
9685
|
ais: props.contextValue,
|
|
9696
9686
|
multiIndexContext: props.indexContextValue
|
|
9697
9687
|
});
|
|
@@ -9699,7 +9689,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9699
9689
|
},
|
|
9700
9690
|
getMetadata: function getMetadata() {
|
|
9701
9691
|
return {
|
|
9702
|
-
id: getId$
|
|
9692
|
+
id: getId$2()
|
|
9703
9693
|
};
|
|
9704
9694
|
}
|
|
9705
9695
|
});
|
|
@@ -9735,15 +9725,15 @@ var connectStats = createConnectorWithContext({
|
|
|
9735
9725
|
}
|
|
9736
9726
|
});
|
|
9737
9727
|
|
|
9738
|
-
function getId$
|
|
9728
|
+
function getId$1(props) {
|
|
9739
9729
|
return props.attribute;
|
|
9740
9730
|
}
|
|
9741
9731
|
|
|
9742
|
-
var namespace
|
|
9732
|
+
var namespace = 'toggle';
|
|
9743
9733
|
var falsyStrings = ['0', 'false', 'null', 'undefined'];
|
|
9744
9734
|
|
|
9745
|
-
function getCurrentRefinement
|
|
9746
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace
|
|
9735
|
+
function getCurrentRefinement(props, searchState, context) {
|
|
9736
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace, ".").concat(getId$1(props)), false);
|
|
9747
9737
|
|
|
9748
9738
|
if (falsyStrings.indexOf(currentRefinement) !== -1) {
|
|
9749
9739
|
return false;
|
|
@@ -9752,17 +9742,17 @@ function getCurrentRefinement$b(props, searchState, context) {
|
|
|
9752
9742
|
return Boolean(currentRefinement);
|
|
9753
9743
|
}
|
|
9754
9744
|
|
|
9755
|
-
function _refine$
|
|
9756
|
-
var id = getId$
|
|
9745
|
+
function _refine$1(props, searchState, nextRefinement, context) {
|
|
9746
|
+
var id = getId$1(props);
|
|
9757
9747
|
|
|
9758
9748
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : false);
|
|
9759
9749
|
|
|
9760
9750
|
var resetPage = true;
|
|
9761
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace
|
|
9751
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
9762
9752
|
}
|
|
9763
9753
|
|
|
9764
|
-
function _cleanUp$
|
|
9765
|
-
return cleanUpValue(searchState, context, "".concat(namespace
|
|
9754
|
+
function _cleanUp$1(props, searchState, context) {
|
|
9755
|
+
return cleanUpValue(searchState, context, "".concat(namespace, ".").concat(getId$1(props)));
|
|
9766
9756
|
}
|
|
9767
9757
|
/**
|
|
9768
9758
|
* connectToggleRefinement connector provides the logic to build a widget that will
|
|
@@ -9801,14 +9791,14 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9801
9791
|
ais: props.contextValue,
|
|
9802
9792
|
multiIndexContext: props.indexContextValue
|
|
9803
9793
|
});
|
|
9804
|
-
var currentRefinement = getCurrentRefinement
|
|
9794
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
9805
9795
|
ais: props.contextValue,
|
|
9806
9796
|
multiIndexContext: props.indexContextValue
|
|
9807
9797
|
});
|
|
9808
9798
|
var allFacetValues = results && results.getFacetByName(attribute) ? results.getFacetValues(attribute) : null;
|
|
9809
9799
|
var facetValue = // Use null to always be consistent with type of the value
|
|
9810
9800
|
// count: number | null
|
|
9811
|
-
allFacetValues && allFacetValues.length ? find(allFacetValues, function (item) {
|
|
9801
|
+
allFacetValues && allFacetValues.length ? find$2(allFacetValues, function (item) {
|
|
9812
9802
|
return item.name === value.toString();
|
|
9813
9803
|
}) : null;
|
|
9814
9804
|
var facetValueCount = facetValue && facetValue.count;
|
|
@@ -9829,13 +9819,13 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9829
9819
|
};
|
|
9830
9820
|
},
|
|
9831
9821
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9832
|
-
return _refine$
|
|
9822
|
+
return _refine$1(props, searchState, nextRefinement, {
|
|
9833
9823
|
ais: props.contextValue,
|
|
9834
9824
|
multiIndexContext: props.indexContextValue
|
|
9835
9825
|
});
|
|
9836
9826
|
},
|
|
9837
9827
|
cleanUp: function cleanUp(props, searchState) {
|
|
9838
|
-
return _cleanUp$
|
|
9828
|
+
return _cleanUp$1(props, searchState, {
|
|
9839
9829
|
ais: props.contextValue,
|
|
9840
9830
|
multiIndexContext: props.indexContextValue
|
|
9841
9831
|
});
|
|
@@ -9844,7 +9834,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9844
9834
|
var attribute = props.attribute,
|
|
9845
9835
|
value = props.value,
|
|
9846
9836
|
filter = props.filter;
|
|
9847
|
-
var checked = getCurrentRefinement
|
|
9837
|
+
var checked = getCurrentRefinement(props, searchState, {
|
|
9848
9838
|
ais: props.contextValue,
|
|
9849
9839
|
multiIndexContext: props.indexContextValue
|
|
9850
9840
|
});
|
|
@@ -9861,8 +9851,8 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9861
9851
|
return nextSearchParameters;
|
|
9862
9852
|
},
|
|
9863
9853
|
getMetadata: function getMetadata(props, searchState) {
|
|
9864
|
-
var id = getId$
|
|
9865
|
-
var checked = getCurrentRefinement
|
|
9854
|
+
var id = getId$1(props);
|
|
9855
|
+
var checked = getCurrentRefinement(props, searchState, {
|
|
9866
9856
|
ais: props.contextValue,
|
|
9867
9857
|
multiIndexContext: props.indexContextValue
|
|
9868
9858
|
});
|
|
@@ -9878,7 +9868,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9878
9868
|
currentRefinement: checked,
|
|
9879
9869
|
attribute: props.attribute,
|
|
9880
9870
|
value: function value(nextState) {
|
|
9881
|
-
return _refine$
|
|
9871
|
+
return _refine$1(props, nextState, false, {
|
|
9882
9872
|
ais: props.contextValue,
|
|
9883
9873
|
multiIndexContext: props.indexContextValue
|
|
9884
9874
|
});
|
|
@@ -9894,7 +9884,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9894
9884
|
}
|
|
9895
9885
|
});
|
|
9896
9886
|
|
|
9897
|
-
function getId
|
|
9887
|
+
function getId() {
|
|
9898
9888
|
return 'query';
|
|
9899
9889
|
}
|
|
9900
9890
|
|
|
@@ -9903,7 +9893,7 @@ function getAdditionalId() {
|
|
|
9903
9893
|
}
|
|
9904
9894
|
|
|
9905
9895
|
function getCurrentRefinementQuery(props, searchState, context) {
|
|
9906
|
-
var id = getId
|
|
9896
|
+
var id = getId();
|
|
9907
9897
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9908
9898
|
|
|
9909
9899
|
if (currentRefinement) {
|
|
@@ -9924,10 +9914,10 @@ function getCurrentRefinementAdditional(props, searchState, context) {
|
|
|
9924
9914
|
return {};
|
|
9925
9915
|
}
|
|
9926
9916
|
|
|
9927
|
-
function _refine
|
|
9917
|
+
function _refine(props, searchState, nextRefinement, context) {
|
|
9928
9918
|
var _nextValue;
|
|
9929
9919
|
|
|
9930
|
-
var id = getId
|
|
9920
|
+
var id = getId();
|
|
9931
9921
|
var voiceParams = getAdditionalId();
|
|
9932
9922
|
var queryLanguages = props.language ? {
|
|
9933
9923
|
queryLanguages: [props.language.split('-')[0]]
|
|
@@ -9944,8 +9934,8 @@ function _refine$9(props, searchState, nextRefinement, context) {
|
|
|
9944
9934
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9945
9935
|
}
|
|
9946
9936
|
|
|
9947
|
-
function _cleanUp
|
|
9948
|
-
var interimState = cleanUpValue(searchState, context, getId
|
|
9937
|
+
function _cleanUp(props, searchState, context) {
|
|
9938
|
+
var interimState = cleanUpValue(searchState, context, getId());
|
|
9949
9939
|
return cleanUpValue(interimState, context, getAdditionalId());
|
|
9950
9940
|
}
|
|
9951
9941
|
|
|
@@ -9964,13 +9954,13 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9964
9954
|
};
|
|
9965
9955
|
},
|
|
9966
9956
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9967
|
-
return _refine
|
|
9957
|
+
return _refine(props, searchState, nextRefinement, {
|
|
9968
9958
|
ais: props.contextValue,
|
|
9969
9959
|
multiIndexContext: props.indexContextValue
|
|
9970
9960
|
});
|
|
9971
9961
|
},
|
|
9972
9962
|
cleanUp: function cleanUp(props, searchState) {
|
|
9973
|
-
return _cleanUp
|
|
9963
|
+
return _cleanUp(props, searchState, {
|
|
9974
9964
|
ais: props.contextValue,
|
|
9975
9965
|
multiIndexContext: props.indexContextValue
|
|
9976
9966
|
});
|
|
@@ -9987,7 +9977,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9987
9977
|
return searchParameters.setQuery(query).setQueryParameters(additionalParams);
|
|
9988
9978
|
},
|
|
9989
9979
|
getMetadata: function getMetadata(props, searchState) {
|
|
9990
|
-
var id = getId
|
|
9980
|
+
var id = getId();
|
|
9991
9981
|
var currentRefinement = getCurrentRefinementQuery(props, searchState, {
|
|
9992
9982
|
ais: props.contextValue,
|
|
9993
9983
|
multiIndexContext: props.indexContextValue
|
|
@@ -10001,7 +9991,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
10001
9991
|
items: currentRefinement === null ? [] : [{
|
|
10002
9992
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
10003
9993
|
value: function value(nextState) {
|
|
10004
|
-
return _refine
|
|
9994
|
+
return _refine(props, nextState, '', {
|
|
10005
9995
|
ais: props.contextValue,
|
|
10006
9996
|
multiIndexContext: props.indexContextValue
|
|
10007
9997
|
});
|
|
@@ -10054,7 +10044,7 @@ function range(_ref) {
|
|
|
10054
10044
|
return (start + current) * limitStep;
|
|
10055
10045
|
});
|
|
10056
10046
|
}
|
|
10057
|
-
function find
|
|
10047
|
+
function find(array, comparator) {
|
|
10058
10048
|
if (!Array.isArray(array)) {
|
|
10059
10049
|
return undefined;
|
|
10060
10050
|
}
|
|
@@ -10068,11 +10058,11 @@ function find$2(array, comparator) {
|
|
|
10068
10058
|
return undefined;
|
|
10069
10059
|
}
|
|
10070
10060
|
|
|
10071
|
-
var cx = createClassNames('Panel');
|
|
10061
|
+
var cx$p = createClassNames('Panel');
|
|
10072
10062
|
|
|
10073
|
-
var _createContext
|
|
10074
|
-
PanelConsumer = _createContext
|
|
10075
|
-
PanelProvider = _createContext
|
|
10063
|
+
var _createContext = createContext(function setCanRefine() {}),
|
|
10064
|
+
PanelConsumer = _createContext.Consumer,
|
|
10065
|
+
PanelProvider = _createContext.Provider;
|
|
10076
10066
|
|
|
10077
10067
|
var Panel =
|
|
10078
10068
|
/*#__PURE__*/
|
|
@@ -10114,16 +10104,16 @@ function (_Component) {
|
|
|
10114
10104
|
header = _this$props.header,
|
|
10115
10105
|
footer = _this$props.footer;
|
|
10116
10106
|
var canRefine = this.state.canRefine;
|
|
10117
|
-
return
|
|
10118
|
-
className: classnames(cx('', !canRefine && '-noRefinement'), className)
|
|
10119
|
-
}, header &&
|
|
10120
|
-
className: cx('header')
|
|
10121
|
-
}, header),
|
|
10122
|
-
className: cx('body')
|
|
10123
|
-
},
|
|
10107
|
+
return React.createElement("div", {
|
|
10108
|
+
className: classnames(cx$p('', !canRefine && '-noRefinement'), className)
|
|
10109
|
+
}, header && React.createElement("div", {
|
|
10110
|
+
className: cx$p('header')
|
|
10111
|
+
}, header), React.createElement("div", {
|
|
10112
|
+
className: cx$p('body')
|
|
10113
|
+
}, React.createElement(PanelProvider, {
|
|
10124
10114
|
value: this.setCanRefine
|
|
10125
|
-
}, children)), footer &&
|
|
10126
|
-
className: cx('footer')
|
|
10115
|
+
}, children)), footer && React.createElement("div", {
|
|
10116
|
+
className: cx$p('footer')
|
|
10127
10117
|
}, footer));
|
|
10128
10118
|
}
|
|
10129
10119
|
}]);
|
|
@@ -10186,8 +10176,8 @@ _defineProperty(PanelCallbackHandler, "propTypes", {
|
|
|
10186
10176
|
var PanelWrapper = function PanelWrapper(_ref) {
|
|
10187
10177
|
var canRefine = _ref.canRefine,
|
|
10188
10178
|
children = _ref.children;
|
|
10189
|
-
return
|
|
10190
|
-
return
|
|
10179
|
+
return React.createElement(PanelConsumer, null, function (setCanRefine) {
|
|
10180
|
+
return React.createElement(PanelCallbackHandler, {
|
|
10191
10181
|
setCanRefine: setCanRefine,
|
|
10192
10182
|
canRefine: canRefine
|
|
10193
10183
|
}, children);
|
|
@@ -10233,7 +10223,7 @@ function (_Component) {
|
|
|
10233
10223
|
_createClass(Link, [{
|
|
10234
10224
|
key: "render",
|
|
10235
10225
|
value: function render() {
|
|
10236
|
-
return
|
|
10226
|
+
return React.createElement("a", _extends({}, this.props, {
|
|
10237
10227
|
onClick: this.onClick
|
|
10238
10228
|
}));
|
|
10239
10229
|
}
|
|
@@ -10246,8 +10236,8 @@ _defineProperty(Link, "propTypes", {
|
|
|
10246
10236
|
onClick: PropTypes.func.isRequired
|
|
10247
10237
|
});
|
|
10248
10238
|
|
|
10249
|
-
var cx$
|
|
10250
|
-
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
10239
|
+
var cx$o = createClassNames('Breadcrumb');
|
|
10240
|
+
var itemsPropType$2 = PropTypes.arrayOf(PropTypes.shape({
|
|
10251
10241
|
label: PropTypes.string.isRequired,
|
|
10252
10242
|
value: PropTypes.string.isRequired
|
|
10253
10243
|
}));
|
|
@@ -10275,10 +10265,10 @@ function (_Component) {
|
|
|
10275
10265
|
separator = _this$props.separator,
|
|
10276
10266
|
translate = _this$props.translate,
|
|
10277
10267
|
className = _this$props.className;
|
|
10278
|
-
var rootPath = canRefine ?
|
|
10279
|
-
className: cx$
|
|
10280
|
-
},
|
|
10281
|
-
className: cx$
|
|
10268
|
+
var rootPath = canRefine ? React.createElement("li", {
|
|
10269
|
+
className: cx$o('item')
|
|
10270
|
+
}, React.createElement(Link, {
|
|
10271
|
+
className: cx$o('link'),
|
|
10282
10272
|
onClick: function onClick() {
|
|
10283
10273
|
return !rootURL ? refine() : null;
|
|
10284
10274
|
},
|
|
@@ -10286,23 +10276,23 @@ function (_Component) {
|
|
|
10286
10276
|
}, translate('rootLabel'))) : null;
|
|
10287
10277
|
var breadcrumb = items.map(function (item, idx) {
|
|
10288
10278
|
var isLast = idx === items.length - 1;
|
|
10289
|
-
return
|
|
10290
|
-
className: cx$
|
|
10279
|
+
return React.createElement("li", {
|
|
10280
|
+
className: cx$o('item', isLast && 'item--selected'),
|
|
10291
10281
|
key: idx
|
|
10292
|
-
},
|
|
10293
|
-
className: cx$
|
|
10294
|
-
}, separator), !isLast ?
|
|
10295
|
-
className: cx$
|
|
10282
|
+
}, React.createElement("span", {
|
|
10283
|
+
className: cx$o('separator')
|
|
10284
|
+
}, separator), !isLast ? React.createElement(Link, {
|
|
10285
|
+
className: cx$o('link'),
|
|
10296
10286
|
onClick: function onClick() {
|
|
10297
10287
|
return refine(item.value);
|
|
10298
10288
|
},
|
|
10299
10289
|
href: createURL(item.value)
|
|
10300
10290
|
}, item.label) : item.label);
|
|
10301
10291
|
});
|
|
10302
|
-
return
|
|
10303
|
-
className: classnames(cx$
|
|
10304
|
-
},
|
|
10305
|
-
className: cx$
|
|
10292
|
+
return React.createElement("div", {
|
|
10293
|
+
className: classnames(cx$o('', !canRefine && '-noRefinement'), className)
|
|
10294
|
+
}, React.createElement("ul", {
|
|
10295
|
+
className: cx$o('list')
|
|
10306
10296
|
}, rootPath, breadcrumb));
|
|
10307
10297
|
}
|
|
10308
10298
|
}]);
|
|
@@ -10313,7 +10303,7 @@ function (_Component) {
|
|
|
10313
10303
|
_defineProperty(Breadcrumb, "propTypes", {
|
|
10314
10304
|
canRefine: PropTypes.bool.isRequired,
|
|
10315
10305
|
createURL: PropTypes.func.isRequired,
|
|
10316
|
-
items: itemsPropType,
|
|
10306
|
+
items: itemsPropType$2,
|
|
10317
10307
|
refine: PropTypes.func.isRequired,
|
|
10318
10308
|
rootURL: PropTypes.string,
|
|
10319
10309
|
separator: PropTypes.node,
|
|
@@ -10420,12 +10410,12 @@ var Breadcrumb$1 = translatable({
|
|
|
10420
10410
|
*/
|
|
10421
10411
|
|
|
10422
10412
|
var BreadcrumbWidget = function BreadcrumbWidget(props) {
|
|
10423
|
-
return
|
|
10413
|
+
return React.createElement(PanelWrapper, props, React.createElement(Breadcrumb$1, props));
|
|
10424
10414
|
};
|
|
10425
10415
|
|
|
10426
10416
|
connectBreadcrumb(BreadcrumbWidget);
|
|
10427
10417
|
|
|
10428
|
-
var cx$
|
|
10418
|
+
var cx$n = createClassNames('ClearRefinements');
|
|
10429
10419
|
|
|
10430
10420
|
var ClearRefinements =
|
|
10431
10421
|
/*#__PURE__*/
|
|
@@ -10447,10 +10437,10 @@ function (_Component) {
|
|
|
10447
10437
|
refine = _this$props.refine,
|
|
10448
10438
|
translate = _this$props.translate,
|
|
10449
10439
|
className = _this$props.className;
|
|
10450
|
-
return
|
|
10451
|
-
className: classnames(cx$
|
|
10452
|
-
},
|
|
10453
|
-
className: cx$
|
|
10440
|
+
return React.createElement("div", {
|
|
10441
|
+
className: classnames(cx$n(''), className)
|
|
10442
|
+
}, React.createElement("button", {
|
|
10443
|
+
className: cx$n('button', !canRefine && 'button--disabled'),
|
|
10454
10444
|
onClick: function onClick() {
|
|
10455
10445
|
return refine(items);
|
|
10456
10446
|
},
|
|
@@ -10513,44 +10503,44 @@ var ClearRefinements$1 = translatable({
|
|
|
10513
10503
|
*/
|
|
10514
10504
|
|
|
10515
10505
|
var ClearRefinementsWidget = function ClearRefinementsWidget(props) {
|
|
10516
|
-
return
|
|
10506
|
+
return React.createElement(PanelWrapper, props, React.createElement(ClearRefinements$1, props));
|
|
10517
10507
|
};
|
|
10518
10508
|
|
|
10519
10509
|
connectCurrentRefinements(ClearRefinementsWidget);
|
|
10520
10510
|
|
|
10521
|
-
var cx$
|
|
10511
|
+
var cx$m = createClassNames('CurrentRefinements');
|
|
10522
10512
|
var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
10523
10513
|
var items = _ref.items,
|
|
10524
10514
|
canRefine = _ref.canRefine,
|
|
10525
10515
|
refine = _ref.refine,
|
|
10526
10516
|
translate = _ref.translate,
|
|
10527
10517
|
className = _ref.className;
|
|
10528
|
-
return
|
|
10529
|
-
className: classnames(cx$
|
|
10530
|
-
},
|
|
10531
|
-
className: cx$
|
|
10518
|
+
return React.createElement("div", {
|
|
10519
|
+
className: classnames(cx$m('', !canRefine && '-noRefinement'), className)
|
|
10520
|
+
}, React.createElement("ul", {
|
|
10521
|
+
className: cx$m('list', !canRefine && 'list--noRefinement')
|
|
10532
10522
|
}, items.map(function (item) {
|
|
10533
|
-
return
|
|
10523
|
+
return React.createElement("li", {
|
|
10534
10524
|
key: item.label,
|
|
10535
|
-
className: cx$
|
|
10536
|
-
},
|
|
10537
|
-
className: cx$
|
|
10525
|
+
className: cx$m('item')
|
|
10526
|
+
}, React.createElement("span", {
|
|
10527
|
+
className: cx$m('label')
|
|
10538
10528
|
}, item.label), item.items ? item.items.map(function (nest) {
|
|
10539
|
-
return
|
|
10529
|
+
return React.createElement("span", {
|
|
10540
10530
|
key: nest.label,
|
|
10541
|
-
className: cx$
|
|
10542
|
-
},
|
|
10543
|
-
className: cx$
|
|
10544
|
-
}, nest.label),
|
|
10545
|
-
className: cx$
|
|
10531
|
+
className: cx$m('category')
|
|
10532
|
+
}, React.createElement("span", {
|
|
10533
|
+
className: cx$m('categoryLabel')
|
|
10534
|
+
}, nest.label), React.createElement("button", {
|
|
10535
|
+
className: cx$m('delete'),
|
|
10546
10536
|
onClick: function onClick() {
|
|
10547
10537
|
return refine(nest.value);
|
|
10548
10538
|
}
|
|
10549
10539
|
}, translate('clearFilter', nest)));
|
|
10550
|
-
}) :
|
|
10551
|
-
className: cx$
|
|
10552
|
-
},
|
|
10553
|
-
className: cx$
|
|
10540
|
+
}) : React.createElement("span", {
|
|
10541
|
+
className: cx$m('category')
|
|
10542
|
+
}, React.createElement("button", {
|
|
10543
|
+
className: cx$m('delete'),
|
|
10554
10544
|
onClick: function onClick() {
|
|
10555
10545
|
return refine(item.value);
|
|
10556
10546
|
}
|
|
@@ -10621,33 +10611,33 @@ var CurrentRefinements$1 = translatable({
|
|
|
10621
10611
|
*/
|
|
10622
10612
|
|
|
10623
10613
|
var CurrentRefinementsWidget = function CurrentRefinementsWidget(props) {
|
|
10624
|
-
return
|
|
10614
|
+
return React.createElement(PanelWrapper, props, React.createElement(CurrentRefinements$1, props));
|
|
10625
10615
|
};
|
|
10626
10616
|
|
|
10627
10617
|
connectCurrentRefinements(CurrentRefinementsWidget);
|
|
10628
10618
|
|
|
10629
|
-
var cx$
|
|
10630
|
-
var defaultLoadingIndicator =
|
|
10619
|
+
var cx$l = createClassNames('SearchBox');
|
|
10620
|
+
var defaultLoadingIndicator = React.createElement("svg", {
|
|
10631
10621
|
width: "18",
|
|
10632
10622
|
height: "18",
|
|
10633
10623
|
viewBox: "0 0 38 38",
|
|
10634
10624
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10635
10625
|
stroke: "#444",
|
|
10636
|
-
className: cx$
|
|
10637
|
-
},
|
|
10626
|
+
className: cx$l('loadingIcon')
|
|
10627
|
+
}, React.createElement("g", {
|
|
10638
10628
|
fill: "none",
|
|
10639
10629
|
fillRule: "evenodd"
|
|
10640
|
-
},
|
|
10630
|
+
}, React.createElement("g", {
|
|
10641
10631
|
transform: "translate(1 1)",
|
|
10642
10632
|
strokeWidth: "2"
|
|
10643
|
-
},
|
|
10633
|
+
}, React.createElement("circle", {
|
|
10644
10634
|
strokeOpacity: ".5",
|
|
10645
10635
|
cx: "18",
|
|
10646
10636
|
cy: "18",
|
|
10647
10637
|
r: "18"
|
|
10648
|
-
}),
|
|
10638
|
+
}), React.createElement("path", {
|
|
10649
10639
|
d: "M36 18c0-9.94-8.06-18-18-18"
|
|
10650
|
-
},
|
|
10640
|
+
}, React.createElement("animateTransform", {
|
|
10651
10641
|
attributeName: "transform",
|
|
10652
10642
|
type: "rotate",
|
|
10653
10643
|
from: "0 18 18",
|
|
@@ -10655,26 +10645,26 @@ var defaultLoadingIndicator = React__default.createElement("svg", {
|
|
|
10655
10645
|
dur: "1s",
|
|
10656
10646
|
repeatCount: "indefinite"
|
|
10657
10647
|
})))));
|
|
10658
|
-
var defaultReset =
|
|
10659
|
-
className: cx$
|
|
10648
|
+
var defaultReset = React.createElement("svg", {
|
|
10649
|
+
className: cx$l('resetIcon'),
|
|
10660
10650
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10661
10651
|
viewBox: "0 0 20 20",
|
|
10662
10652
|
width: "10",
|
|
10663
10653
|
height: "10"
|
|
10664
|
-
},
|
|
10654
|
+
}, React.createElement("path", {
|
|
10665
10655
|
d: "M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"
|
|
10666
10656
|
}));
|
|
10667
|
-
var defaultSubmit =
|
|
10668
|
-
className: cx$
|
|
10657
|
+
var defaultSubmit = React.createElement("svg", {
|
|
10658
|
+
className: cx$l('submitIcon'),
|
|
10669
10659
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10670
10660
|
width: "10",
|
|
10671
10661
|
height: "10",
|
|
10672
10662
|
viewBox: "0 0 40 40"
|
|
10673
|
-
},
|
|
10663
|
+
}, React.createElement("path", {
|
|
10674
10664
|
d: "M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"
|
|
10675
10665
|
}));
|
|
10676
10666
|
|
|
10677
|
-
var SearchBox =
|
|
10667
|
+
var SearchBox$1 =
|
|
10678
10668
|
/*#__PURE__*/
|
|
10679
10669
|
function (_Component) {
|
|
10680
10670
|
_inherits(SearchBox, _Component);
|
|
@@ -10836,16 +10826,16 @@ function (_Component) {
|
|
|
10836
10826
|
var isSearchStalled = this.props.showLoadingIndicator && this.props.isSearchStalled;
|
|
10837
10827
|
/* eslint-disable max-len */
|
|
10838
10828
|
|
|
10839
|
-
return
|
|
10840
|
-
className: classnames(cx$
|
|
10841
|
-
},
|
|
10829
|
+
return React.createElement("div", {
|
|
10830
|
+
className: classnames(cx$l(''), className)
|
|
10831
|
+
}, React.createElement("form", {
|
|
10842
10832
|
noValidate: true,
|
|
10843
10833
|
onSubmit: this.props.onSubmit ? this.props.onSubmit : this.onSubmit,
|
|
10844
10834
|
onReset: this.onReset,
|
|
10845
|
-
className: cx$
|
|
10835
|
+
className: cx$l('form', isSearchStalled && 'form--stalledSearch'),
|
|
10846
10836
|
action: "",
|
|
10847
10837
|
role: "search"
|
|
10848
|
-
},
|
|
10838
|
+
}, React.createElement("input", _extends({
|
|
10849
10839
|
ref: this.onInputMount,
|
|
10850
10840
|
type: "search",
|
|
10851
10841
|
placeholder: translate('placeholder'),
|
|
@@ -10859,19 +10849,19 @@ function (_Component) {
|
|
|
10859
10849
|
value: query,
|
|
10860
10850
|
onChange: this.onChange
|
|
10861
10851
|
}, searchInputEvents, {
|
|
10862
|
-
className: cx$
|
|
10863
|
-
})),
|
|
10852
|
+
className: cx$l('input')
|
|
10853
|
+
})), React.createElement("button", {
|
|
10864
10854
|
type: "submit",
|
|
10865
10855
|
title: translate('submitTitle'),
|
|
10866
|
-
className: cx$
|
|
10867
|
-
}, submit),
|
|
10856
|
+
className: cx$l('submit')
|
|
10857
|
+
}, submit), React.createElement("button", {
|
|
10868
10858
|
type: "reset",
|
|
10869
10859
|
title: translate('resetTitle'),
|
|
10870
|
-
className: cx$
|
|
10860
|
+
className: cx$l('reset'),
|
|
10871
10861
|
hidden: !query || isSearchStalled
|
|
10872
|
-
}, reset), this.props.showLoadingIndicator &&
|
|
10862
|
+
}, reset), this.props.showLoadingIndicator && React.createElement("span", {
|
|
10873
10863
|
hidden: !isSearchStalled,
|
|
10874
|
-
className: cx$
|
|
10864
|
+
className: cx$l('loadingIndicator')
|
|
10875
10865
|
}, loadingIndicator)));
|
|
10876
10866
|
/* eslint-enable */
|
|
10877
10867
|
}
|
|
@@ -10880,7 +10870,7 @@ function (_Component) {
|
|
|
10880
10870
|
return SearchBox;
|
|
10881
10871
|
}(Component);
|
|
10882
10872
|
|
|
10883
|
-
_defineProperty(SearchBox, "propTypes", {
|
|
10873
|
+
_defineProperty(SearchBox$1, "propTypes", {
|
|
10884
10874
|
currentRefinement: PropTypes.string,
|
|
10885
10875
|
className: PropTypes.string,
|
|
10886
10876
|
refine: PropTypes.func.isRequired,
|
|
@@ -10901,7 +10891,7 @@ _defineProperty(SearchBox, "propTypes", {
|
|
|
10901
10891
|
})])
|
|
10902
10892
|
});
|
|
10903
10893
|
|
|
10904
|
-
_defineProperty(SearchBox, "defaultProps", {
|
|
10894
|
+
_defineProperty(SearchBox$1, "defaultProps", {
|
|
10905
10895
|
currentRefinement: '',
|
|
10906
10896
|
className: '',
|
|
10907
10897
|
focusShortcuts: ['s', '/'],
|
|
@@ -10914,11 +10904,11 @@ _defineProperty(SearchBox, "defaultProps", {
|
|
|
10914
10904
|
submit: defaultSubmit
|
|
10915
10905
|
});
|
|
10916
10906
|
|
|
10917
|
-
var SearchBox$
|
|
10907
|
+
var SearchBox$2 = translatable({
|
|
10918
10908
|
resetTitle: 'Clear the search query.',
|
|
10919
10909
|
submitTitle: 'Submit your search query.',
|
|
10920
10910
|
placeholder: 'Search here…'
|
|
10921
|
-
})(SearchBox);
|
|
10911
|
+
})(SearchBox$1);
|
|
10922
10912
|
|
|
10923
10913
|
var itemsPropType$1 = PropTypes.arrayOf(PropTypes.shape({
|
|
10924
10914
|
value: PropTypes.any,
|
|
@@ -10964,10 +10954,10 @@ function (_Component) {
|
|
|
10964
10954
|
|
|
10965
10955
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
10966
10956
|
var itemHasChildren = item.items && Boolean(item.items.length);
|
|
10967
|
-
return
|
|
10957
|
+
return React.createElement("li", {
|
|
10968
10958
|
key: item.key || item.label,
|
|
10969
10959
|
className: _this.props.cx('item', item.isRefined && 'item--selected', item.noRefinement && 'item--noRefinement', itemHasChildren && 'item--parent')
|
|
10970
|
-
}, _this.props.renderItem(item, resetQuery), itemHasChildren &&
|
|
10960
|
+
}, _this.props.renderItem(item, resetQuery), itemHasChildren && React.createElement("ul", {
|
|
10971
10961
|
className: _this.props.cx('list', 'list--child')
|
|
10972
10962
|
}, item.items.slice(0, _this.getLimit()).map(function (child) {
|
|
10973
10963
|
return _this.renderItem(child, item);
|
|
@@ -10995,7 +10985,7 @@ function (_Component) {
|
|
|
10995
10985
|
return null;
|
|
10996
10986
|
}
|
|
10997
10987
|
|
|
10998
|
-
return
|
|
10988
|
+
return React.createElement("button", {
|
|
10999
10989
|
disabled: disabled,
|
|
11000
10990
|
className: cx('showMore', disabled && 'showMore--disabled'),
|
|
11001
10991
|
onClick: this.onShowMoreClick
|
|
@@ -11013,12 +11003,12 @@ function (_Component) {
|
|
|
11013
11003
|
translate = _this$props3.translate,
|
|
11014
11004
|
items = _this$props3.items,
|
|
11015
11005
|
selectItem = _this$props3.selectItem;
|
|
11016
|
-
var noResults = items.length === 0 && this.state.query !== '' ?
|
|
11006
|
+
var noResults = items.length === 0 && this.state.query !== '' ? React.createElement("div", {
|
|
11017
11007
|
className: cx('noResults')
|
|
11018
11008
|
}, translate('noResults')) : null;
|
|
11019
|
-
return
|
|
11009
|
+
return React.createElement("div", {
|
|
11020
11010
|
className: cx('searchBox')
|
|
11021
|
-
},
|
|
11011
|
+
}, React.createElement(SearchBox$2, {
|
|
11022
11012
|
currentRefinement: this.state.query,
|
|
11023
11013
|
refine: function refine(value) {
|
|
11024
11014
|
_this2.setState({
|
|
@@ -11054,7 +11044,7 @@ function (_Component) {
|
|
|
11054
11044
|
var rootClassName = classnames(cx('', !canRefine && '-noRefinement'), className);
|
|
11055
11045
|
|
|
11056
11046
|
if (items.length === 0) {
|
|
11057
|
-
return
|
|
11047
|
+
return React.createElement("div", {
|
|
11058
11048
|
className: rootClassName
|
|
11059
11049
|
}, searchBox);
|
|
11060
11050
|
} // Always limit the number of items we show on screen, since the actual
|
|
@@ -11062,9 +11052,9 @@ function (_Component) {
|
|
|
11062
11052
|
// option.
|
|
11063
11053
|
|
|
11064
11054
|
|
|
11065
|
-
return
|
|
11055
|
+
return React.createElement("div", {
|
|
11066
11056
|
className: rootClassName
|
|
11067
|
-
}, searchBox,
|
|
11057
|
+
}, searchBox, React.createElement("ul", {
|
|
11068
11058
|
className: cx('list', !canRefine && 'list--noRefinement')
|
|
11069
11059
|
}, items.slice(0, this.getLimit()).map(function (item) {
|
|
11070
11060
|
return _this3.renderItem(item, _this3.resetQuery);
|
|
@@ -11098,13 +11088,13 @@ _defineProperty(List, "defaultProps", {
|
|
|
11098
11088
|
isFromSearch: false
|
|
11099
11089
|
});
|
|
11100
11090
|
|
|
11101
|
-
var cx$
|
|
11102
|
-
var itemsPropType
|
|
11091
|
+
var cx$k = createClassNames('HierarchicalMenu');
|
|
11092
|
+
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
11103
11093
|
label: PropTypes.string.isRequired,
|
|
11104
11094
|
value: PropTypes.string,
|
|
11105
11095
|
count: PropTypes.number.isRequired,
|
|
11106
11096
|
items: function items() {
|
|
11107
|
-
return itemsPropType
|
|
11097
|
+
return itemsPropType.apply(void 0, arguments);
|
|
11108
11098
|
}
|
|
11109
11099
|
}));
|
|
11110
11100
|
|
|
@@ -11130,16 +11120,16 @@ function (_Component) {
|
|
|
11130
11120
|
var _this$props = _this.props,
|
|
11131
11121
|
createURL = _this$props.createURL,
|
|
11132
11122
|
refine = _this$props.refine;
|
|
11133
|
-
return
|
|
11134
|
-
className: cx$
|
|
11123
|
+
return React.createElement(Link, {
|
|
11124
|
+
className: cx$k('link'),
|
|
11135
11125
|
onClick: function onClick() {
|
|
11136
11126
|
return refine(item.value);
|
|
11137
11127
|
},
|
|
11138
11128
|
href: createURL(item.value)
|
|
11139
|
-
},
|
|
11140
|
-
className: cx$
|
|
11141
|
-
}, item.label), ' ',
|
|
11142
|
-
className: cx$
|
|
11129
|
+
}, React.createElement("span", {
|
|
11130
|
+
className: cx$k('label')
|
|
11131
|
+
}, item.label), ' ', React.createElement("span", {
|
|
11132
|
+
className: cx$k('count')
|
|
11143
11133
|
}, item.count));
|
|
11144
11134
|
});
|
|
11145
11135
|
|
|
@@ -11157,9 +11147,9 @@ function (_Component) {
|
|
|
11157
11147
|
showMoreLimit = _this$props2.showMoreLimit,
|
|
11158
11148
|
canRefine = _this$props2.canRefine,
|
|
11159
11149
|
className = _this$props2.className;
|
|
11160
|
-
return
|
|
11150
|
+
return React.createElement(List, {
|
|
11161
11151
|
renderItem: this.renderItem,
|
|
11162
|
-
cx: cx$
|
|
11152
|
+
cx: cx$k,
|
|
11163
11153
|
translate: translate,
|
|
11164
11154
|
items: items,
|
|
11165
11155
|
showMore: showMore,
|
|
@@ -11179,7 +11169,7 @@ _defineProperty(HierarchicalMenu, "propTypes", {
|
|
|
11179
11169
|
refine: PropTypes.func.isRequired,
|
|
11180
11170
|
createURL: PropTypes.func.isRequired,
|
|
11181
11171
|
canRefine: PropTypes.bool.isRequired,
|
|
11182
|
-
items: itemsPropType
|
|
11172
|
+
items: itemsPropType,
|
|
11183
11173
|
showMore: PropTypes.bool,
|
|
11184
11174
|
className: PropTypes.string,
|
|
11185
11175
|
limit: PropTypes.number,
|
|
@@ -11288,12 +11278,12 @@ var HierarchicalMenu$1 = translatable({
|
|
|
11288
11278
|
*/
|
|
11289
11279
|
|
|
11290
11280
|
var HierarchicalMenuWidget = function HierarchicalMenuWidget(props) {
|
|
11291
|
-
return
|
|
11281
|
+
return React.createElement(PanelWrapper, props, React.createElement(HierarchicalMenu$1, props));
|
|
11292
11282
|
};
|
|
11293
11283
|
|
|
11294
11284
|
connectHierarchicalMenu(HierarchicalMenuWidget);
|
|
11295
11285
|
|
|
11296
|
-
var Highlight = function Highlight(_ref) {
|
|
11286
|
+
var Highlight$2 = function Highlight(_ref) {
|
|
11297
11287
|
var cx = _ref.cx,
|
|
11298
11288
|
value = _ref.value,
|
|
11299
11289
|
highlightedTagName = _ref.highlightedTagName,
|
|
@@ -11301,11 +11291,11 @@ var Highlight = function Highlight(_ref) {
|
|
|
11301
11291
|
nonHighlightedTagName = _ref.nonHighlightedTagName;
|
|
11302
11292
|
var TagName = isHighlighted ? highlightedTagName : nonHighlightedTagName;
|
|
11303
11293
|
var className = isHighlighted ? 'highlighted' : 'nonHighlighted';
|
|
11304
|
-
return
|
|
11294
|
+
return React.createElement(TagName, {
|
|
11305
11295
|
className: cx(className)
|
|
11306
11296
|
}, value);
|
|
11307
11297
|
};
|
|
11308
|
-
Highlight.propTypes = {
|
|
11298
|
+
Highlight$2.propTypes = {
|
|
11309
11299
|
cx: PropTypes.func.isRequired,
|
|
11310
11300
|
value: PropTypes.string.isRequired,
|
|
11311
11301
|
isHighlighted: PropTypes.bool.isRequired,
|
|
@@ -11328,15 +11318,15 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11328
11318
|
attribute: attribute,
|
|
11329
11319
|
highlightProperty: highlightProperty
|
|
11330
11320
|
});
|
|
11331
|
-
return
|
|
11321
|
+
return React.createElement("span", {
|
|
11332
11322
|
className: classnames(cx(''), className)
|
|
11333
11323
|
}, parsedHighlightedValue.map(function (item, i) {
|
|
11334
11324
|
if (Array.isArray(item)) {
|
|
11335
11325
|
var isLast = i === parsedHighlightedValue.length - 1;
|
|
11336
|
-
return
|
|
11326
|
+
return React.createElement("span", {
|
|
11337
11327
|
key: i
|
|
11338
11328
|
}, item.map(function (element, index) {
|
|
11339
|
-
return
|
|
11329
|
+
return React.createElement(Highlight$2, {
|
|
11340
11330
|
cx: cx,
|
|
11341
11331
|
key: index,
|
|
11342
11332
|
value: element.value,
|
|
@@ -11344,12 +11334,12 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11344
11334
|
nonHighlightedTagName: nonHighlightedTagName,
|
|
11345
11335
|
isHighlighted: element.isHighlighted
|
|
11346
11336
|
});
|
|
11347
|
-
}), !isLast &&
|
|
11337
|
+
}), !isLast && React.createElement("span", {
|
|
11348
11338
|
className: cx('separator')
|
|
11349
11339
|
}, separator));
|
|
11350
11340
|
}
|
|
11351
11341
|
|
|
11352
|
-
return
|
|
11342
|
+
return React.createElement(Highlight$2, {
|
|
11353
11343
|
cx: cx,
|
|
11354
11344
|
key: i,
|
|
11355
11345
|
value: item.value,
|
|
@@ -11378,12 +11368,12 @@ Highlighter.defaultProps = {
|
|
|
11378
11368
|
separator: ', '
|
|
11379
11369
|
};
|
|
11380
11370
|
|
|
11381
|
-
var cx$
|
|
11371
|
+
var cx$j = createClassNames('Highlight');
|
|
11382
11372
|
|
|
11383
11373
|
var Highlight$1 = function Highlight(props) {
|
|
11384
|
-
return
|
|
11374
|
+
return React.createElement(Highlighter, _extends({}, props, {
|
|
11385
11375
|
highlightProperty: "_highlightResult",
|
|
11386
|
-
cx: cx$
|
|
11376
|
+
cx: cx$j
|
|
11387
11377
|
}));
|
|
11388
11378
|
};
|
|
11389
11379
|
|
|
@@ -11428,12 +11418,12 @@ var Highlight$1 = function Highlight(props) {
|
|
|
11428
11418
|
* );
|
|
11429
11419
|
*/
|
|
11430
11420
|
|
|
11431
|
-
var Highlight
|
|
11421
|
+
var Highlight = connectHighlight(Highlight$1);
|
|
11432
11422
|
|
|
11433
|
-
var cx$
|
|
11423
|
+
var cx$i = createClassNames('Hits');
|
|
11434
11424
|
|
|
11435
11425
|
var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
11436
|
-
return
|
|
11426
|
+
return React.createElement("div", {
|
|
11437
11427
|
style: {
|
|
11438
11428
|
borderBottom: '1px solid #bbb',
|
|
11439
11429
|
paddingBottom: '5px',
|
|
@@ -11443,21 +11433,21 @@ var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
|
11443
11433
|
}, JSON.stringify(props).slice(0, 100), "...");
|
|
11444
11434
|
};
|
|
11445
11435
|
|
|
11446
|
-
var Hits = function Hits(_ref) {
|
|
11436
|
+
var Hits$1 = function Hits(_ref) {
|
|
11447
11437
|
var hits = _ref.hits,
|
|
11448
11438
|
_ref$className = _ref.className,
|
|
11449
11439
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
11450
11440
|
_ref$hitComponent = _ref.hitComponent,
|
|
11451
11441
|
HitComponent = _ref$hitComponent === void 0 ? DefaultHitComponent : _ref$hitComponent;
|
|
11452
|
-
return
|
|
11453
|
-
className: classnames(cx$
|
|
11454
|
-
},
|
|
11455
|
-
className: cx$
|
|
11442
|
+
return React.createElement("div", {
|
|
11443
|
+
className: classnames(cx$i(''), className)
|
|
11444
|
+
}, React.createElement("ul", {
|
|
11445
|
+
className: cx$i('list')
|
|
11456
11446
|
}, hits.map(function (hit) {
|
|
11457
|
-
return
|
|
11458
|
-
className: cx$
|
|
11447
|
+
return React.createElement("li", {
|
|
11448
|
+
className: cx$i('item'),
|
|
11459
11449
|
key: hit.objectID
|
|
11460
|
-
},
|
|
11450
|
+
}, React.createElement(HitComponent, {
|
|
11461
11451
|
hit: hit
|
|
11462
11452
|
}));
|
|
11463
11453
|
})));
|
|
@@ -11466,7 +11456,7 @@ var Hits = function Hits(_ref) {
|
|
|
11466
11456
|
var HitPropTypes = PropTypes.shape({
|
|
11467
11457
|
objectID: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11468
11458
|
});
|
|
11469
|
-
Hits.propTypes = {
|
|
11459
|
+
Hits$1.propTypes = {
|
|
11470
11460
|
hits: PropTypes.arrayOf(HitPropTypes.isRequired).isRequired,
|
|
11471
11461
|
className: PropTypes.string,
|
|
11472
11462
|
hitComponent: PropTypes.func
|
|
@@ -11505,7 +11495,7 @@ Hits.propTypes = {
|
|
|
11505
11495
|
* );
|
|
11506
11496
|
*/
|
|
11507
11497
|
|
|
11508
|
-
var Hits
|
|
11498
|
+
var Hits = connectHits(Hits$1);
|
|
11509
11499
|
|
|
11510
11500
|
var Select =
|
|
11511
11501
|
/*#__PURE__*/
|
|
@@ -11539,12 +11529,12 @@ function (_Component) {
|
|
|
11539
11529
|
cx = _this$props.cx,
|
|
11540
11530
|
items = _this$props.items,
|
|
11541
11531
|
selectedItem = _this$props.selectedItem;
|
|
11542
|
-
return
|
|
11532
|
+
return React.createElement("select", {
|
|
11543
11533
|
className: cx('select'),
|
|
11544
11534
|
value: selectedItem,
|
|
11545
11535
|
onChange: this.onChange
|
|
11546
11536
|
}, items.map(function (item) {
|
|
11547
|
-
return
|
|
11537
|
+
return React.createElement("option", {
|
|
11548
11538
|
className: cx('option'),
|
|
11549
11539
|
key: item.key === undefined ? item.value : item.key,
|
|
11550
11540
|
disabled: item.disabled,
|
|
@@ -11569,7 +11559,7 @@ _defineProperty(Select, "propTypes", {
|
|
|
11569
11559
|
selectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11570
11560
|
});
|
|
11571
11561
|
|
|
11572
|
-
var cx$
|
|
11562
|
+
var cx$h = createClassNames('HitsPerPage');
|
|
11573
11563
|
|
|
11574
11564
|
var HitsPerPage =
|
|
11575
11565
|
/*#__PURE__*/
|
|
@@ -11590,13 +11580,13 @@ function (_Component) {
|
|
|
11590
11580
|
currentRefinement = _this$props.currentRefinement,
|
|
11591
11581
|
refine = _this$props.refine,
|
|
11592
11582
|
className = _this$props.className;
|
|
11593
|
-
return
|
|
11594
|
-
className: classnames(cx$
|
|
11595
|
-
},
|
|
11583
|
+
return React.createElement("div", {
|
|
11584
|
+
className: classnames(cx$h(''), className)
|
|
11585
|
+
}, React.createElement(Select, {
|
|
11596
11586
|
onSelect: refine,
|
|
11597
11587
|
selectedItem: currentRefinement,
|
|
11598
11588
|
items: items,
|
|
11599
|
-
cx: cx$
|
|
11589
|
+
cx: cx$h
|
|
11600
11590
|
}));
|
|
11601
11591
|
}
|
|
11602
11592
|
}]);
|
|
@@ -11662,7 +11652,7 @@ _defineProperty(HitsPerPage, "defaultProps", {
|
|
|
11662
11652
|
|
|
11663
11653
|
connectHitsPerPage(HitsPerPage);
|
|
11664
11654
|
|
|
11665
|
-
var cx$
|
|
11655
|
+
var cx$g = createClassNames('InfiniteHits');
|
|
11666
11656
|
|
|
11667
11657
|
var InfiniteHits =
|
|
11668
11658
|
/*#__PURE__*/
|
|
@@ -11688,25 +11678,25 @@ function (_Component) {
|
|
|
11688
11678
|
refineNext = _this$props.refineNext,
|
|
11689
11679
|
translate = _this$props.translate,
|
|
11690
11680
|
className = _this$props.className;
|
|
11691
|
-
return
|
|
11692
|
-
className: classnames(cx$
|
|
11693
|
-
}, showPrevious &&
|
|
11694
|
-
className: cx$
|
|
11681
|
+
return React.createElement("div", {
|
|
11682
|
+
className: classnames(cx$g(''), className)
|
|
11683
|
+
}, showPrevious && React.createElement("button", {
|
|
11684
|
+
className: cx$g('loadPrevious', !hasPrevious && 'loadPrevious--disabled'),
|
|
11695
11685
|
onClick: function onClick() {
|
|
11696
11686
|
return refinePrevious();
|
|
11697
11687
|
},
|
|
11698
11688
|
disabled: !hasPrevious
|
|
11699
|
-
}, translate('loadPrevious')),
|
|
11700
|
-
className: cx$
|
|
11689
|
+
}, translate('loadPrevious')), React.createElement("ul", {
|
|
11690
|
+
className: cx$g('list')
|
|
11701
11691
|
}, hits.map(function (hit) {
|
|
11702
|
-
return
|
|
11692
|
+
return React.createElement("li", {
|
|
11703
11693
|
key: hit.objectID,
|
|
11704
|
-
className: cx$
|
|
11705
|
-
},
|
|
11694
|
+
className: cx$g('item')
|
|
11695
|
+
}, React.createElement(HitComponent, {
|
|
11706
11696
|
hit: hit
|
|
11707
11697
|
}));
|
|
11708
|
-
})),
|
|
11709
|
-
className: cx$
|
|
11698
|
+
})), React.createElement("button", {
|
|
11699
|
+
className: cx$g('loadMore', !hasMore && 'loadMore--disabled'),
|
|
11710
11700
|
onClick: function onClick() {
|
|
11711
11701
|
return refineNext();
|
|
11712
11702
|
},
|
|
@@ -11733,7 +11723,7 @@ InfiniteHits.defaultProps = {
|
|
|
11733
11723
|
className: '',
|
|
11734
11724
|
showPrevious: false,
|
|
11735
11725
|
hitComponent: function hitComponent(hit) {
|
|
11736
|
-
return
|
|
11726
|
+
return React.createElement("div", {
|
|
11737
11727
|
style: {
|
|
11738
11728
|
borderBottom: '1px solid #bbb',
|
|
11739
11729
|
paddingBottom: '5px',
|
|
@@ -11787,7 +11777,7 @@ var InfiniteHits$1 = translatable({
|
|
|
11787
11777
|
|
|
11788
11778
|
connectInfiniteHits(InfiniteHits$1);
|
|
11789
11779
|
|
|
11790
|
-
var cx$
|
|
11780
|
+
var cx$f = createClassNames('Menu');
|
|
11791
11781
|
|
|
11792
11782
|
var Menu =
|
|
11793
11783
|
/*#__PURE__*/
|
|
@@ -11809,20 +11799,20 @@ function (_Component) {
|
|
|
11809
11799
|
|
|
11810
11800
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
11811
11801
|
var createURL = _this.props.createURL;
|
|
11812
|
-
var label = _this.props.isFromSearch ?
|
|
11802
|
+
var label = _this.props.isFromSearch ? React.createElement(Highlight, {
|
|
11813
11803
|
attribute: "label",
|
|
11814
11804
|
hit: item
|
|
11815
11805
|
}) : item.label;
|
|
11816
|
-
return
|
|
11817
|
-
className: cx$
|
|
11806
|
+
return React.createElement(Link, {
|
|
11807
|
+
className: cx$f('link'),
|
|
11818
11808
|
onClick: function onClick() {
|
|
11819
11809
|
return _this.selectItem(item, resetQuery);
|
|
11820
11810
|
},
|
|
11821
11811
|
href: createURL(item.value)
|
|
11822
|
-
},
|
|
11823
|
-
className: cx$
|
|
11824
|
-
}, label), ' ',
|
|
11825
|
-
className: cx$
|
|
11812
|
+
}, React.createElement("span", {
|
|
11813
|
+
className: cx$f('label')
|
|
11814
|
+
}, label), ' ', React.createElement("span", {
|
|
11815
|
+
className: cx$f('count')
|
|
11826
11816
|
}, item.count));
|
|
11827
11817
|
});
|
|
11828
11818
|
|
|
@@ -11849,10 +11839,10 @@ function (_Component) {
|
|
|
11849
11839
|
searchable = _this$props.searchable,
|
|
11850
11840
|
canRefine = _this$props.canRefine,
|
|
11851
11841
|
className = _this$props.className;
|
|
11852
|
-
return
|
|
11842
|
+
return React.createElement(List, {
|
|
11853
11843
|
renderItem: this.renderItem,
|
|
11854
11844
|
selectItem: this.selectItem,
|
|
11855
|
-
cx: cx$
|
|
11845
|
+
cx: cx$f,
|
|
11856
11846
|
translate: translate,
|
|
11857
11847
|
items: items,
|
|
11858
11848
|
showMore: showMore,
|
|
@@ -11957,12 +11947,12 @@ var Menu$1 = translatable({
|
|
|
11957
11947
|
*/
|
|
11958
11948
|
|
|
11959
11949
|
var MenuWidget = function MenuWidget(props) {
|
|
11960
|
-
return
|
|
11950
|
+
return React.createElement(PanelWrapper, props, React.createElement(Menu$1, props));
|
|
11961
11951
|
};
|
|
11962
11952
|
|
|
11963
11953
|
connectMenu(MenuWidget);
|
|
11964
11954
|
|
|
11965
|
-
var cx$
|
|
11955
|
+
var cx$e = createClassNames('MenuSelect');
|
|
11966
11956
|
|
|
11967
11957
|
var MenuSelect =
|
|
11968
11958
|
/*#__PURE__*/
|
|
@@ -11999,27 +11989,27 @@ function (_Component) {
|
|
|
11999
11989
|
canRefine = _this$props.canRefine,
|
|
12000
11990
|
translate = _this$props.translate,
|
|
12001
11991
|
className = _this$props.className;
|
|
12002
|
-
return
|
|
12003
|
-
className: classnames(cx$
|
|
12004
|
-
},
|
|
11992
|
+
return React.createElement("div", {
|
|
11993
|
+
className: classnames(cx$e('', !canRefine && '-noRefinement'), className)
|
|
11994
|
+
}, React.createElement("select", {
|
|
12005
11995
|
value: this.selectedValue,
|
|
12006
11996
|
onChange: this.handleSelectChange,
|
|
12007
|
-
className: cx$
|
|
12008
|
-
},
|
|
11997
|
+
className: cx$e('select')
|
|
11998
|
+
}, React.createElement("option", {
|
|
12009
11999
|
value: "ais__see__all__option",
|
|
12010
|
-
className: cx$
|
|
12000
|
+
className: cx$e('option')
|
|
12011
12001
|
}, translate('seeAllOption')), items.map(function (item) {
|
|
12012
|
-
return
|
|
12002
|
+
return React.createElement("option", {
|
|
12013
12003
|
key: item.value,
|
|
12014
12004
|
value: item.value,
|
|
12015
|
-
className: cx$
|
|
12005
|
+
className: cx$e('option')
|
|
12016
12006
|
}, item.label, " (", item.count, ")");
|
|
12017
12007
|
})));
|
|
12018
12008
|
}
|
|
12019
12009
|
}, {
|
|
12020
12010
|
key: "selectedValue",
|
|
12021
12011
|
get: function get() {
|
|
12022
|
-
var _ref2 = find
|
|
12012
|
+
var _ref2 = find(this.props.items, function (item) {
|
|
12023
12013
|
return item.isRefined === true;
|
|
12024
12014
|
}) || {
|
|
12025
12015
|
value: 'ais__see__all__option'
|
|
@@ -12091,12 +12081,12 @@ var MenuSelect$1 = translatable({
|
|
|
12091
12081
|
*/
|
|
12092
12082
|
|
|
12093
12083
|
var MenuSelectWidget = function MenuSelectWidget(props) {
|
|
12094
|
-
return
|
|
12084
|
+
return React.createElement(PanelWrapper, props, React.createElement(MenuSelect$1, props));
|
|
12095
12085
|
};
|
|
12096
12086
|
|
|
12097
12087
|
connectMenu(MenuSelectWidget);
|
|
12098
12088
|
|
|
12099
|
-
var cx$
|
|
12089
|
+
var cx$d = createClassNames('NumericMenu');
|
|
12100
12090
|
|
|
12101
12091
|
var NumericMenu =
|
|
12102
12092
|
/*#__PURE__*/
|
|
@@ -12120,18 +12110,18 @@ function (_Component) {
|
|
|
12120
12110
|
var _this$props = _this.props,
|
|
12121
12111
|
refine = _this$props.refine,
|
|
12122
12112
|
translate = _this$props.translate;
|
|
12123
|
-
return
|
|
12124
|
-
className: cx$
|
|
12125
|
-
},
|
|
12126
|
-
className: cx$
|
|
12113
|
+
return React.createElement("label", {
|
|
12114
|
+
className: cx$d('label')
|
|
12115
|
+
}, React.createElement("input", {
|
|
12116
|
+
className: cx$d('radio'),
|
|
12127
12117
|
type: "radio",
|
|
12128
12118
|
checked: item.isRefined,
|
|
12129
12119
|
disabled: item.noRefinement,
|
|
12130
12120
|
onChange: function onChange() {
|
|
12131
12121
|
return refine(item.value);
|
|
12132
12122
|
}
|
|
12133
|
-
}),
|
|
12134
|
-
className: cx$
|
|
12123
|
+
}), React.createElement("span", {
|
|
12124
|
+
className: cx$d('labelText')
|
|
12135
12125
|
}, item.value === '' ? translate('all') : item.label));
|
|
12136
12126
|
});
|
|
12137
12127
|
|
|
@@ -12145,11 +12135,11 @@ function (_Component) {
|
|
|
12145
12135
|
items = _this$props2.items,
|
|
12146
12136
|
canRefine = _this$props2.canRefine,
|
|
12147
12137
|
className = _this$props2.className;
|
|
12148
|
-
return
|
|
12138
|
+
return React.createElement(List, {
|
|
12149
12139
|
renderItem: this.renderItem,
|
|
12150
12140
|
showMore: false,
|
|
12151
12141
|
canRefine: canRefine,
|
|
12152
|
-
cx: cx$
|
|
12142
|
+
cx: cx$d,
|
|
12153
12143
|
items: items.map(function (item) {
|
|
12154
12144
|
return _objectSpread({}, item, {
|
|
12155
12145
|
key: item.value
|
|
@@ -12231,7 +12221,7 @@ var NumericMenu$1 = translatable({
|
|
|
12231
12221
|
*/
|
|
12232
12222
|
|
|
12233
12223
|
var NumericMenuWidget = function NumericMenuWidget(props) {
|
|
12234
|
-
return
|
|
12224
|
+
return React.createElement(PanelWrapper, props, React.createElement(NumericMenu$1, props));
|
|
12235
12225
|
};
|
|
12236
12226
|
|
|
12237
12227
|
connectNumericMenu(NumericMenuWidget);
|
|
@@ -12256,15 +12246,15 @@ function (_Component) {
|
|
|
12256
12246
|
items = _this$props.items,
|
|
12257
12247
|
onSelect = _this$props.onSelect,
|
|
12258
12248
|
canRefine = _this$props.canRefine;
|
|
12259
|
-
return
|
|
12249
|
+
return React.createElement("ul", {
|
|
12260
12250
|
className: cx('list', !canRefine && 'list--noRefinement')
|
|
12261
12251
|
}, items.map(function (item) {
|
|
12262
|
-
return
|
|
12252
|
+
return React.createElement("li", {
|
|
12263
12253
|
key: item.key === undefined ? item.value : item.key,
|
|
12264
12254
|
className: cx('item', item.selected && !item.disabled && 'item--selected', item.disabled && 'item--disabled', item.modifier)
|
|
12265
|
-
}, item.disabled ?
|
|
12255
|
+
}, item.disabled ? React.createElement("span", {
|
|
12266
12256
|
className: cx('link')
|
|
12267
|
-
}, item.label === undefined ? item.value : item.label) :
|
|
12257
|
+
}, item.label === undefined ? item.value : item.label) : React.createElement(Link, {
|
|
12268
12258
|
className: cx('link', item.selected && 'link--selected'),
|
|
12269
12259
|
"aria-label": item.ariaLabel,
|
|
12270
12260
|
href: createURL(item.value),
|
|
@@ -12294,7 +12284,7 @@ _defineProperty(LinkList, "propTypes", {
|
|
|
12294
12284
|
canRefine: PropTypes.bool.isRequired
|
|
12295
12285
|
});
|
|
12296
12286
|
|
|
12297
|
-
var cx$
|
|
12287
|
+
var cx$c = createClassNames('Pagination'); // Determines the size of the widget (the number of pages displayed - that the user can directly click on)
|
|
12298
12288
|
|
|
12299
12289
|
function calculateSize(padding, maxPages) {
|
|
12300
12290
|
return Math.min(2 * padding + 1, maxPages);
|
|
@@ -12330,7 +12320,7 @@ function getPages(currentPage, maxPages, padding) {
|
|
|
12330
12320
|
});
|
|
12331
12321
|
}
|
|
12332
12322
|
|
|
12333
|
-
var Pagination =
|
|
12323
|
+
var Pagination$1 =
|
|
12334
12324
|
/*#__PURE__*/
|
|
12335
12325
|
function (_Component) {
|
|
12336
12326
|
_inherits(Pagination, _Component);
|
|
@@ -12436,10 +12426,10 @@ function (_Component) {
|
|
|
12436
12426
|
});
|
|
12437
12427
|
}
|
|
12438
12428
|
|
|
12439
|
-
return
|
|
12440
|
-
className: classnames(cx$
|
|
12441
|
-
},
|
|
12442
|
-
cx: cx$
|
|
12429
|
+
return React.createElement("div", {
|
|
12430
|
+
className: classnames(cx$c('', !canRefine && '-noRefinement'), className)
|
|
12431
|
+
}, React.createElement(ListComponent, _extends({}, otherProps, {
|
|
12432
|
+
cx: cx$c,
|
|
12443
12433
|
items: items,
|
|
12444
12434
|
onSelect: refine,
|
|
12445
12435
|
createURL: createURL,
|
|
@@ -12451,7 +12441,7 @@ function (_Component) {
|
|
|
12451
12441
|
return Pagination;
|
|
12452
12442
|
}(Component);
|
|
12453
12443
|
|
|
12454
|
-
_defineProperty(Pagination, "propTypes", {
|
|
12444
|
+
_defineProperty(Pagination$1, "propTypes", {
|
|
12455
12445
|
nbPages: PropTypes.number.isRequired,
|
|
12456
12446
|
currentRefinement: PropTypes.number.isRequired,
|
|
12457
12447
|
refine: PropTypes.func.isRequired,
|
|
@@ -12468,7 +12458,7 @@ _defineProperty(Pagination, "propTypes", {
|
|
|
12468
12458
|
className: PropTypes.string
|
|
12469
12459
|
});
|
|
12470
12460
|
|
|
12471
|
-
_defineProperty(Pagination, "defaultProps", {
|
|
12461
|
+
_defineProperty(Pagination$1, "defaultProps", {
|
|
12472
12462
|
listComponent: LinkList,
|
|
12473
12463
|
showFirst: true,
|
|
12474
12464
|
showPrevious: true,
|
|
@@ -12479,7 +12469,7 @@ _defineProperty(Pagination, "defaultProps", {
|
|
|
12479
12469
|
className: ''
|
|
12480
12470
|
});
|
|
12481
12471
|
|
|
12482
|
-
var Pagination$
|
|
12472
|
+
var Pagination$2 = translatable({
|
|
12483
12473
|
previous: '‹',
|
|
12484
12474
|
next: '›',
|
|
12485
12475
|
first: '«',
|
|
@@ -12494,7 +12484,7 @@ var Pagination$1 = translatable({
|
|
|
12494
12484
|
ariaPage: function ariaPage(currentRefinement) {
|
|
12495
12485
|
return "Page ".concat(currentRefinement.toString());
|
|
12496
12486
|
}
|
|
12497
|
-
})(Pagination);
|
|
12487
|
+
})(Pagination$1);
|
|
12498
12488
|
|
|
12499
12489
|
/**
|
|
12500
12490
|
* The Pagination widget displays a simple pagination system allowing the user to
|
|
@@ -12551,23 +12541,23 @@ var Pagination$1 = translatable({
|
|
|
12551
12541
|
*/
|
|
12552
12542
|
|
|
12553
12543
|
var PaginationWidget = function PaginationWidget(props) {
|
|
12554
|
-
return
|
|
12544
|
+
return React.createElement(PanelWrapper, props, React.createElement(Pagination$2, props));
|
|
12555
12545
|
};
|
|
12556
12546
|
|
|
12557
|
-
var Pagination
|
|
12547
|
+
var Pagination = connectPagination(PaginationWidget);
|
|
12558
12548
|
|
|
12559
|
-
var cx$
|
|
12549
|
+
var cx$b = createClassNames('PoweredBy');
|
|
12560
12550
|
/* eslint-disable max-len */
|
|
12561
12551
|
|
|
12562
12552
|
var AlgoliaLogo = function AlgoliaLogo() {
|
|
12563
|
-
return
|
|
12553
|
+
return React.createElement("svg", {
|
|
12564
12554
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12565
12555
|
baseProfile: "basic",
|
|
12566
12556
|
viewBox: "0 0 1366 362",
|
|
12567
12557
|
width: "100",
|
|
12568
12558
|
height: "27",
|
|
12569
|
-
className: cx$
|
|
12570
|
-
},
|
|
12559
|
+
className: cx$b('logo')
|
|
12560
|
+
}, React.createElement("linearGradient", {
|
|
12571
12561
|
id: "g",
|
|
12572
12562
|
x1: "428.258",
|
|
12573
12563
|
x2: "434.145",
|
|
@@ -12575,19 +12565,19 @@ var AlgoliaLogo = function AlgoliaLogo() {
|
|
|
12575
12565
|
y2: "409.85",
|
|
12576
12566
|
gradientUnits: "userSpaceOnUse",
|
|
12577
12567
|
gradientTransform: "matrix(94.045 0 0 -94.072 -40381.527 38479.52)"
|
|
12578
|
-
},
|
|
12568
|
+
}, React.createElement("stop", {
|
|
12579
12569
|
offset: "0",
|
|
12580
12570
|
stopColor: "#00AEFF"
|
|
12581
|
-
}),
|
|
12571
|
+
}), React.createElement("stop", {
|
|
12582
12572
|
offset: "1",
|
|
12583
12573
|
stopColor: "#3369E7"
|
|
12584
|
-
})),
|
|
12574
|
+
})), React.createElement("path", {
|
|
12585
12575
|
d: "M61.8 15.4h242.8c23.9 0 43.4 19.4 43.4 43.4v242.9c0 23.9-19.4 43.4-43.4 43.4H61.8c-23.9 0-43.4-19.4-43.4-43.4v-243c0-23.9 19.4-43.3 43.4-43.3z",
|
|
12586
12576
|
fill: "url(#g)"
|
|
12587
|
-
}),
|
|
12577
|
+
}), React.createElement("path", {
|
|
12588
12578
|
d: "M187 98.7c-51.4 0-93.1 41.7-93.1 93.2S135.6 285 187 285s93.1-41.7 93.1-93.2-41.6-93.1-93.1-93.1zm0 158.8c-36.2 0-65.6-29.4-65.6-65.6s29.4-65.6 65.6-65.6 65.6 29.4 65.6 65.6-29.3 65.6-65.6 65.6zm0-117.8v48.9c0 1.4 1.5 2.4 2.8 1.7l43.4-22.5c1-.5 1.3-1.7.8-2.7-9-15.8-25.7-26.6-45-27.3-1 0-2 .8-2 1.9zm-60.8-35.9l-5.7-5.7c-5.6-5.6-14.6-5.6-20.2 0l-6.8 6.8c-5.6 5.6-5.6 14.6 0 20.2l5.6 5.6c.9.9 2.2.7 3-.2 3.3-4.5 6.9-8.8 10.9-12.8 4.1-4.1 8.3-7.7 12.9-11 1-.6 1.1-2 .3-2.9zM217.5 89V77.7c0-7.9-6.4-14.3-14.3-14.3h-33.3c-7.9 0-14.3 6.4-14.3 14.3v11.6c0 1.3 1.2 2.2 2.5 1.9 9.3-2.7 19.1-4.1 29-4.1 9.5 0 18.9 1.3 28 3.8 1.2.3 2.4-.6 2.4-1.9z",
|
|
12589
12579
|
fill: "#FFFFFF"
|
|
12590
|
-
}),
|
|
12580
|
+
}), React.createElement("path", {
|
|
12591
12581
|
d: "M842.5 267.6c0 26.7-6.8 46.2-20.5 58.6-13.7 12.4-34.6 18.6-62.8 18.6-10.3 0-31.7-2-48.8-5.8l6.3-31c14.3 3 33.2 3.8 43.1 3.8 15.7 0 26.9-3.2 33.6-9.6s10-15.9 10-28.5v-6.4c-3.9 1.9-9 3.8-15.3 5.8-6.3 1.9-13.6 2.9-21.8 2.9-10.8 0-20.6-1.7-29.5-5.1-8.9-3.4-16.6-8.4-22.9-15-6.3-6.6-11.3-14.9-14.8-24.8s-5.3-27.6-5.3-40.6c0-12.2 1.9-27.5 5.6-37.7 3.8-10.2 9.2-19 16.5-26.3 7.2-7.3 16-12.9 26.3-17s22.4-6.7 35.5-6.7c12.7 0 24.4 1.6 35.8 3.5 11.4 1.9 21.1 3.9 29 6.1v155.2zm-108.7-77.2c0 16.4 3.6 34.6 10.8 42.2 7.2 7.6 16.5 11.4 27.9 11.4 6.2 0 12.1-.9 17.6-2.6 5.5-1.7 9.9-3.7 13.4-6.1v-97.1c-2.8-.6-14.5-3-25.8-3.3-14.2-.4-25 5.4-32.6 14.7-7.5 9.3-11.3 25.6-11.3 40.8zm294.3 0c0 13.2-1.9 23.2-5.8 34.1s-9.4 20.2-16.5 27.9c-7.1 7.7-15.6 13.7-25.6 17.9s-25.4 6.6-33.1 6.6c-7.7-.1-23-2.3-32.9-6.6-9.9-4.3-18.4-10.2-25.5-17.9-7.1-7.7-12.6-17-16.6-27.9s-6-20.9-6-34.1c0-13.2 1.8-25.9 5.8-36.7 4-10.8 9.6-20 16.8-27.7s15.8-13.6 25.6-17.8c9.9-4.2 20.8-6.2 32.6-6.2s22.7 2.1 32.7 6.2c10 4.2 18.6 10.1 25.6 17.8 7.1 7.7 12.6 16.9 16.6 27.7 4.2 10.8 6.3 23.5 6.3 36.7zm-40 .1c0-16.9-3.7-31-10.9-40.8-7.2-9.9-17.3-14.8-30.2-14.8-12.9 0-23 4.9-30.2 14.8-7.2 9.9-10.7 23.9-10.7 40.8 0 17.1 3.6 28.6 10.8 38.5 7.2 10 17.3 14.9 30.2 14.9 12.9 0 23-5 30.2-14.9 7.2-10 10.8-21.4 10.8-38.5zm127.1 86.4c-64.1.3-64.1-51.8-64.1-60.1L1051 32l39.1-6.2v183.6c0 4.7 0 34.5 25.1 34.6v32.9zm68.9 0h-39.3V108.1l39.3-6.2v175zm-19.7-193.5c13.1 0 23.8-10.6 23.8-23.7S1177.6 36 1164.4 36s-23.8 10.6-23.8 23.7 10.7 23.7 23.8 23.7zm117.4 18.6c12.9 0 23.8 1.6 32.6 4.8 8.8 3.2 15.9 7.7 21.1 13.4s8.9 13.5 11.1 21.7c2.3 8.2 3.4 17.2 3.4 27.1v100.6c-6 1.3-15.1 2.8-27.3 4.6s-25.9 2.7-41.1 2.7c-10.1 0-19.4-1-27.7-2.9-8.4-1.9-15.5-5-21.5-9.3-5.9-4.3-10.5-9.8-13.9-16.6-3.3-6.8-5-16.4-5-26.4 0-9.6 1.9-15.7 5.6-22.3 3.8-6.6 8.9-12 15.3-16.2 6.5-4.2 13.9-7.2 22.4-9s17.4-2.7 26.6-2.7c4.3 0 8.8.3 13.6.8s9.8 1.4 15.2 2.7v-6.4c0-4.5-.5-8.8-1.6-12.8-1.1-4.1-3-7.6-5.6-10.7-2.7-3.1-6.2-5.5-10.6-7.2s-10-3-16.7-3c-9 0-17.2 1.1-24.7 2.4-7.5 1.3-13.7 2.8-18.4 4.5l-4.7-32.1c4.9-1.7 12.2-3.4 21.6-5.1s19.5-2.6 30.3-2.6zm3.3 141.9c12 0 20.9-.7 27.1-1.9v-39.8c-2.2-.6-5.3-1.3-9.4-1.9-4.1-.6-8.6-1-13.6-1-4.3 0-8.7.3-13.1 1-4.4.6-8.4 1.8-11.9 3.5s-6.4 4.1-8.5 7.2c-2.2 3.1-3.2 4.9-3.2 9.6 0 9.2 3.2 14.5 9 18 5.9 3.6 13.7 5.3 23.6 5.3zM512.9 103c12.9 0 23.8 1.6 32.6 4.8 8.8 3.2 15.9 7.7 21.1 13.4 5.3 5.8 8.9 13.5 11.1 21.7 2.3 8.2 3.4 17.2 3.4 27.1v100.6c-6 1.3-15.1 2.8-27.3 4.6-12.2 1.8-25.9 2.7-41.1 2.7-10.1 0-19.4-1-27.7-2.9-8.4-1.9-15.5-5-21.5-9.3-5.9-4.3-10.5-9.8-13.9-16.6-3.3-6.8-5-16.4-5-26.4 0-9.6 1.9-15.7 5.6-22.3 3.8-6.6 8.9-12 15.3-16.2 6.5-4.2 13.9-7.2 22.4-9s17.4-2.7 26.6-2.7c4.3 0 8.8.3 13.6.8 4.7.5 9.8 1.4 15.2 2.7v-6.4c0-4.5-.5-8.8-1.6-12.8-1.1-4.1-3-7.6-5.6-10.7-2.7-3.1-6.2-5.5-10.6-7.2-4.4-1.7-10-3-16.7-3-9 0-17.2 1.1-24.7 2.4-7.5 1.3-13.7 2.8-18.4 4.5l-4.7-32.1c4.9-1.7 12.2-3.4 21.6-5.1 9.4-1.8 19.5-2.6 30.3-2.6zm3.4 142c12 0 20.9-.7 27.1-1.9v-39.8c-2.2-.6-5.3-1.3-9.4-1.9-4.1-.6-8.6-1-13.6-1-4.3 0-8.7.3-13.1 1-4.4.6-8.4 1.8-11.9 3.5s-6.4 4.1-8.5 7.2c-2.2 3.1-3.2 4.9-3.2 9.6 0 9.2 3.2 14.5 9 18s13.7 5.3 23.6 5.3zm158.5 31.9c-64.1.3-64.1-51.8-64.1-60.1L610.6 32l39.1-6.2v183.6c0 4.7 0 34.5 25.1 34.6v32.9z",
|
|
12592
12582
|
fill: "#182359"
|
|
12593
12583
|
}));
|
|
@@ -12613,17 +12603,17 @@ function (_Component) {
|
|
|
12613
12603
|
url = _this$props.url,
|
|
12614
12604
|
translate = _this$props.translate,
|
|
12615
12605
|
className = _this$props.className;
|
|
12616
|
-
return
|
|
12617
|
-
className: classnames(cx$
|
|
12618
|
-
},
|
|
12619
|
-
className: cx$
|
|
12620
|
-
}, translate('searchBy')), ' ',
|
|
12606
|
+
return React.createElement("div", {
|
|
12607
|
+
className: classnames(cx$b(''), className)
|
|
12608
|
+
}, React.createElement("span", {
|
|
12609
|
+
className: cx$b('text')
|
|
12610
|
+
}, translate('searchBy')), ' ', React.createElement("a", {
|
|
12621
12611
|
href: url,
|
|
12622
12612
|
target: "_blank",
|
|
12623
|
-
className: cx$
|
|
12613
|
+
className: cx$b('link'),
|
|
12624
12614
|
"aria-label": "Algolia",
|
|
12625
12615
|
rel: "noopener noreferrer"
|
|
12626
|
-
},
|
|
12616
|
+
}, React.createElement(AlgoliaLogo, null)));
|
|
12627
12617
|
}
|
|
12628
12618
|
}]);
|
|
12629
12619
|
|
|
@@ -12673,7 +12663,7 @@ var PoweredBy$1 = translatable({
|
|
|
12673
12663
|
|
|
12674
12664
|
connectPoweredBy(PoweredBy$1);
|
|
12675
12665
|
|
|
12676
|
-
var cx$
|
|
12666
|
+
var cx$a = createClassNames('RangeInput');
|
|
12677
12667
|
var RawRangeInput =
|
|
12678
12668
|
/*#__PURE__*/
|
|
12679
12669
|
function (_Component) {
|
|
@@ -12752,13 +12742,13 @@ function (_Component) {
|
|
|
12752
12742
|
max = _this$normalizeRangeF.max;
|
|
12753
12743
|
|
|
12754
12744
|
var step = 1 / Math.pow(10, precision);
|
|
12755
|
-
return
|
|
12756
|
-
className: classnames(cx$
|
|
12757
|
-
},
|
|
12758
|
-
className: cx$
|
|
12745
|
+
return React.createElement("div", {
|
|
12746
|
+
className: classnames(cx$a('', !canRefine && '-noRefinement'), className)
|
|
12747
|
+
}, React.createElement("form", {
|
|
12748
|
+
className: cx$a('form'),
|
|
12759
12749
|
onSubmit: this.onSubmit
|
|
12760
|
-
},
|
|
12761
|
-
className: cx$
|
|
12750
|
+
}, React.createElement("input", {
|
|
12751
|
+
className: cx$a('input', 'input--min'),
|
|
12762
12752
|
type: "number",
|
|
12763
12753
|
min: min,
|
|
12764
12754
|
max: max,
|
|
@@ -12771,10 +12761,10 @@ function (_Component) {
|
|
|
12771
12761
|
from: e.currentTarget.value
|
|
12772
12762
|
});
|
|
12773
12763
|
}
|
|
12774
|
-
}),
|
|
12775
|
-
className: cx$
|
|
12776
|
-
}, translate('separator')),
|
|
12777
|
-
className: cx$
|
|
12764
|
+
}), React.createElement("span", {
|
|
12765
|
+
className: cx$a('separator')
|
|
12766
|
+
}, translate('separator')), React.createElement("input", {
|
|
12767
|
+
className: cx$a('input', 'input--max'),
|
|
12778
12768
|
type: "number",
|
|
12779
12769
|
min: min,
|
|
12780
12770
|
max: max,
|
|
@@ -12787,8 +12777,8 @@ function (_Component) {
|
|
|
12787
12777
|
to: e.currentTarget.value
|
|
12788
12778
|
});
|
|
12789
12779
|
}
|
|
12790
|
-
}),
|
|
12791
|
-
className: cx$
|
|
12780
|
+
}), React.createElement("button", {
|
|
12781
|
+
className: cx$a('submit'),
|
|
12792
12782
|
type: "submit"
|
|
12793
12783
|
}, translate('submit'))));
|
|
12794
12784
|
}
|
|
@@ -12864,12 +12854,12 @@ var RangeInput = translatable({
|
|
|
12864
12854
|
*/
|
|
12865
12855
|
|
|
12866
12856
|
var RangeInputWidget = function RangeInputWidget(props) {
|
|
12867
|
-
return
|
|
12857
|
+
return React.createElement(PanelWrapper, props, React.createElement(RangeInput, props));
|
|
12868
12858
|
};
|
|
12869
12859
|
|
|
12870
12860
|
connectRange(RangeInputWidget);
|
|
12871
12861
|
|
|
12872
|
-
var cx$
|
|
12862
|
+
var cx$9 = createClassNames('RatingMenu');
|
|
12873
12863
|
|
|
12874
12864
|
var RatingMenu =
|
|
12875
12865
|
/*#__PURE__*/
|
|
@@ -12920,14 +12910,14 @@ function (_Component) {
|
|
|
12920
12910
|
rating++;
|
|
12921
12911
|
}
|
|
12922
12912
|
|
|
12923
|
-
icons.push([
|
|
12913
|
+
icons.push([React.createElement("svg", {
|
|
12924
12914
|
key: icon,
|
|
12925
|
-
className: cx$
|
|
12915
|
+
className: cx$9('starIcon', icon >= lowerBound ? 'starIcon--empty' : 'starIcon--full'),
|
|
12926
12916
|
"aria-hidden": "true",
|
|
12927
12917
|
width: "24",
|
|
12928
12918
|
height: "24"
|
|
12929
|
-
},
|
|
12930
|
-
xlinkHref: "#".concat(cx$
|
|
12919
|
+
}, React.createElement("use", {
|
|
12920
|
+
xlinkHref: "#".concat(cx$9(icon >= lowerBound ? 'starEmptySymbol' : 'starSymbol'))
|
|
12931
12921
|
})), ' ']);
|
|
12932
12922
|
} // The last item of the list (the default item), should not
|
|
12933
12923
|
// be clickable if it is selected.
|
|
@@ -12941,17 +12931,17 @@ function (_Component) {
|
|
|
12941
12931
|
}),
|
|
12942
12932
|
onClick: this.onClick.bind(this, lowerBound, max)
|
|
12943
12933
|
};
|
|
12944
|
-
return
|
|
12934
|
+
return React.createElement("li", {
|
|
12945
12935
|
key: lowerBound,
|
|
12946
|
-
className: cx$
|
|
12947
|
-
},
|
|
12948
|
-
className: cx$
|
|
12936
|
+
className: cx$9('item', selected && 'item--selected', disabled && 'item--disabled')
|
|
12937
|
+
}, React.createElement("a", _extends({
|
|
12938
|
+
className: cx$9('link'),
|
|
12949
12939
|
"aria-label": "".concat(rating).concat(translate('ratingLabel'))
|
|
12950
|
-
}, onClickHandler), icons,
|
|
12951
|
-
className: cx$
|
|
12940
|
+
}, onClickHandler), icons, React.createElement("span", {
|
|
12941
|
+
className: cx$9('label'),
|
|
12952
12942
|
"aria-hidden": "true"
|
|
12953
|
-
}, translate('ratingLabel')), ' ',
|
|
12954
|
-
className: cx$
|
|
12943
|
+
}, translate('ratingLabel')), ' ', React.createElement("span", {
|
|
12944
|
+
className: cx$9('count')
|
|
12955
12945
|
}, count)));
|
|
12956
12946
|
}
|
|
12957
12947
|
}, {
|
|
@@ -12983,7 +12973,7 @@ function (_Component) {
|
|
|
12983
12973
|
start: 0,
|
|
12984
12974
|
end: Math.max(inclusiveLength, 0)
|
|
12985
12975
|
}).map(function (index) {
|
|
12986
|
-
var element = find
|
|
12976
|
+
var element = find(values, function (item) {
|
|
12987
12977
|
return item.value === limitMax - index;
|
|
12988
12978
|
});
|
|
12989
12979
|
var placeholder = {
|
|
@@ -13006,25 +12996,25 @@ function (_Component) {
|
|
|
13006
12996
|
createURL: createURL
|
|
13007
12997
|
});
|
|
13008
12998
|
});
|
|
13009
|
-
return
|
|
13010
|
-
className: classnames(cx$
|
|
13011
|
-
},
|
|
12999
|
+
return React.createElement("div", {
|
|
13000
|
+
className: classnames(cx$9('', !canRefine && '-noRefinement'), className)
|
|
13001
|
+
}, React.createElement("svg", {
|
|
13012
13002
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13013
13003
|
style: {
|
|
13014
13004
|
display: 'none'
|
|
13015
13005
|
}
|
|
13016
|
-
},
|
|
13017
|
-
id: cx$
|
|
13006
|
+
}, React.createElement("symbol", {
|
|
13007
|
+
id: cx$9('starSymbol'),
|
|
13018
13008
|
viewBox: "0 0 24 24"
|
|
13019
|
-
},
|
|
13009
|
+
}, React.createElement("path", {
|
|
13020
13010
|
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"
|
|
13021
|
-
})),
|
|
13022
|
-
id: cx$
|
|
13011
|
+
})), React.createElement("symbol", {
|
|
13012
|
+
id: cx$9('starEmptySymbol'),
|
|
13023
13013
|
viewBox: "0 0 24 24"
|
|
13024
|
-
},
|
|
13014
|
+
}, React.createElement("path", {
|
|
13025
13015
|
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"
|
|
13026
|
-
}))),
|
|
13027
|
-
className: cx$
|
|
13016
|
+
}))), React.createElement("ul", {
|
|
13017
|
+
className: cx$9('list', !canRefine && 'list--noRefinement')
|
|
13028
13018
|
}, items));
|
|
13029
13019
|
}
|
|
13030
13020
|
}]);
|
|
@@ -13107,12 +13097,12 @@ var RatingMenu$1 = translatable({
|
|
|
13107
13097
|
*/
|
|
13108
13098
|
|
|
13109
13099
|
var RatingMenuWidget = function RatingMenuWidget(props) {
|
|
13110
|
-
return
|
|
13100
|
+
return React.createElement(PanelWrapper, props, React.createElement(RatingMenu$1, props));
|
|
13111
13101
|
};
|
|
13112
13102
|
|
|
13113
13103
|
connectRange(RatingMenuWidget);
|
|
13114
13104
|
|
|
13115
|
-
var cx$
|
|
13105
|
+
var cx$8 = createClassNames('RefinementList');
|
|
13116
13106
|
|
|
13117
13107
|
var RefinementList$1 =
|
|
13118
13108
|
/*#__PURE__*/
|
|
@@ -13143,23 +13133,23 @@ function (_Component) {
|
|
|
13143
13133
|
});
|
|
13144
13134
|
|
|
13145
13135
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
13146
|
-
var label = _this.props.isFromSearch ?
|
|
13136
|
+
var label = _this.props.isFromSearch ? React.createElement(Highlight, {
|
|
13147
13137
|
attribute: "label",
|
|
13148
13138
|
hit: item
|
|
13149
13139
|
}) : item.label;
|
|
13150
|
-
return
|
|
13151
|
-
className: cx$
|
|
13152
|
-
},
|
|
13153
|
-
className: cx$
|
|
13140
|
+
return React.createElement("label", {
|
|
13141
|
+
className: cx$8('label')
|
|
13142
|
+
}, React.createElement("input", {
|
|
13143
|
+
className: cx$8('checkbox'),
|
|
13154
13144
|
type: "checkbox",
|
|
13155
13145
|
checked: item.isRefined,
|
|
13156
13146
|
onChange: function onChange() {
|
|
13157
13147
|
return _this.selectItem(item, resetQuery);
|
|
13158
13148
|
}
|
|
13159
|
-
}),
|
|
13160
|
-
className: cx$
|
|
13161
|
-
}, label), ' ',
|
|
13162
|
-
className: cx$
|
|
13149
|
+
}), React.createElement("span", {
|
|
13150
|
+
className: cx$8('labelText')
|
|
13151
|
+
}, label), ' ', React.createElement("span", {
|
|
13152
|
+
className: cx$8('count')
|
|
13163
13153
|
}, item.count.toLocaleString()));
|
|
13164
13154
|
});
|
|
13165
13155
|
|
|
@@ -13180,10 +13170,10 @@ function (_Component) {
|
|
|
13180
13170
|
searchable = _this$props.searchable,
|
|
13181
13171
|
canRefine = _this$props.canRefine,
|
|
13182
13172
|
className = _this$props.className;
|
|
13183
|
-
return
|
|
13173
|
+
return React.createElement(List, {
|
|
13184
13174
|
renderItem: this.renderItem,
|
|
13185
13175
|
selectItem: this.selectItem,
|
|
13186
|
-
cx: cx$
|
|
13176
|
+
cx: cx$8,
|
|
13187
13177
|
translate: translate,
|
|
13188
13178
|
items: items,
|
|
13189
13179
|
showMore: showMore,
|
|
@@ -13292,12 +13282,12 @@ var RefinementList$2 = translatable({
|
|
|
13292
13282
|
*/
|
|
13293
13283
|
|
|
13294
13284
|
var RefinementListWidget = function RefinementListWidget(props) {
|
|
13295
|
-
return
|
|
13285
|
+
return React.createElement(PanelWrapper, props, React.createElement(RefinementList$2, props));
|
|
13296
13286
|
};
|
|
13297
13287
|
|
|
13298
|
-
var RefinementList
|
|
13288
|
+
var RefinementList = connectRefinementList(RefinementListWidget);
|
|
13299
13289
|
|
|
13300
|
-
var cx$
|
|
13290
|
+
var cx$7 = createClassNames('ScrollTo');
|
|
13301
13291
|
|
|
13302
13292
|
var ScrollTo =
|
|
13303
13293
|
/*#__PURE__*/
|
|
@@ -13326,11 +13316,11 @@ function (_Component) {
|
|
|
13326
13316
|
value: function render() {
|
|
13327
13317
|
var _this = this;
|
|
13328
13318
|
|
|
13329
|
-
return
|
|
13319
|
+
return React.createElement("div", {
|
|
13330
13320
|
ref: function ref(_ref) {
|
|
13331
13321
|
return _this.el = _ref;
|
|
13332
13322
|
},
|
|
13333
|
-
className: cx$
|
|
13323
|
+
className: cx$7('')
|
|
13334
13324
|
}, this.props.children);
|
|
13335
13325
|
}
|
|
13336
13326
|
}]);
|
|
@@ -13424,14 +13414,14 @@ connectScrollTo(ScrollTo);
|
|
|
13424
13414
|
* );
|
|
13425
13415
|
*/
|
|
13426
13416
|
|
|
13427
|
-
var SearchBox
|
|
13417
|
+
var SearchBox = connectSearchBox(SearchBox$2);
|
|
13428
13418
|
|
|
13429
|
-
var cx$
|
|
13419
|
+
var cx$6 = createClassNames('Snippet');
|
|
13430
13420
|
|
|
13431
13421
|
var Snippet = function Snippet(props) {
|
|
13432
|
-
return
|
|
13422
|
+
return React.createElement(Highlighter, _extends({}, props, {
|
|
13433
13423
|
highlightProperty: "_snippetResult",
|
|
13434
|
-
cx: cx$
|
|
13424
|
+
cx: cx$6
|
|
13435
13425
|
}));
|
|
13436
13426
|
};
|
|
13437
13427
|
|
|
@@ -13481,11 +13471,11 @@ var Snippet = function Snippet(props) {
|
|
|
13481
13471
|
|
|
13482
13472
|
connectHighlight(Snippet);
|
|
13483
13473
|
|
|
13484
|
-
var cx$
|
|
13474
|
+
var cx$5 = createClassNames('RelevantSort');
|
|
13485
13475
|
|
|
13486
13476
|
var DefaultButtonTextComponent = function DefaultButtonTextComponent(_ref) {
|
|
13487
13477
|
var isRelevantSorted = _ref.isRelevantSorted;
|
|
13488
|
-
return
|
|
13478
|
+
return React.createElement("span", null, isRelevantSorted ? 'See all results' : 'See relevant results');
|
|
13489
13479
|
};
|
|
13490
13480
|
|
|
13491
13481
|
var RelevantSort = function RelevantSort(_ref2) {
|
|
@@ -13497,18 +13487,18 @@ var RelevantSort = function RelevantSort(_ref2) {
|
|
|
13497
13487
|
ButtonTextComponent = _ref2$buttonTextCompo === void 0 ? DefaultButtonTextComponent : _ref2$buttonTextCompo,
|
|
13498
13488
|
TextComponent = _ref2.textComponent,
|
|
13499
13489
|
refine = _ref2.refine;
|
|
13500
|
-
return !isVirtualReplica ? null :
|
|
13501
|
-
className: classnames(cx$
|
|
13502
|
-
},
|
|
13503
|
-
className: cx$
|
|
13504
|
-
}, TextComponent &&
|
|
13490
|
+
return !isVirtualReplica ? null : React.createElement("div", {
|
|
13491
|
+
className: classnames(cx$5(''), className)
|
|
13492
|
+
}, React.createElement("div", {
|
|
13493
|
+
className: cx$5('text')
|
|
13494
|
+
}, TextComponent && React.createElement(TextComponent, {
|
|
13505
13495
|
isRelevantSorted: isRelevantSorted
|
|
13506
|
-
})),
|
|
13507
|
-
className: cx$
|
|
13496
|
+
})), React.createElement("button", {
|
|
13497
|
+
className: cx$5('button'),
|
|
13508
13498
|
onClick: function onClick() {
|
|
13509
13499
|
return refine(isRelevantSorted ? 0 : undefined);
|
|
13510
13500
|
}
|
|
13511
|
-
},
|
|
13501
|
+
}, React.createElement(ButtonTextComponent, {
|
|
13512
13502
|
isRelevantSorted: isRelevantSorted
|
|
13513
13503
|
})));
|
|
13514
13504
|
};
|
|
@@ -13524,7 +13514,7 @@ RelevantSort.propTypes = {
|
|
|
13524
13514
|
|
|
13525
13515
|
connectRelevantSort(RelevantSort);
|
|
13526
13516
|
|
|
13527
|
-
var cx$
|
|
13517
|
+
var cx$4 = createClassNames('SortBy');
|
|
13528
13518
|
|
|
13529
13519
|
var SortBy =
|
|
13530
13520
|
/*#__PURE__*/
|
|
@@ -13545,10 +13535,10 @@ function (_Component) {
|
|
|
13545
13535
|
currentRefinement = _this$props.currentRefinement,
|
|
13546
13536
|
refine = _this$props.refine,
|
|
13547
13537
|
className = _this$props.className;
|
|
13548
|
-
return
|
|
13549
|
-
className: classnames(cx$
|
|
13550
|
-
},
|
|
13551
|
-
cx: cx$
|
|
13538
|
+
return React.createElement("div", {
|
|
13539
|
+
className: classnames(cx$4(''), className)
|
|
13540
|
+
}, React.createElement(Select, {
|
|
13541
|
+
cx: cx$4,
|
|
13552
13542
|
items: items,
|
|
13553
13543
|
selectedItem: currentRefinement,
|
|
13554
13544
|
onSelect: refine
|
|
@@ -13614,7 +13604,7 @@ _defineProperty(SortBy, "defaultProps", {
|
|
|
13614
13604
|
|
|
13615
13605
|
connectSortBy(SortBy);
|
|
13616
13606
|
|
|
13617
|
-
var cx$
|
|
13607
|
+
var cx$3 = createClassNames('Stats');
|
|
13618
13608
|
|
|
13619
13609
|
var Stats = function Stats(_ref) {
|
|
13620
13610
|
var _ref$className = _ref.className,
|
|
@@ -13624,10 +13614,10 @@ var Stats = function Stats(_ref) {
|
|
|
13624
13614
|
nbSortedHits = _ref.nbSortedHits,
|
|
13625
13615
|
processingTimeMS = _ref.processingTimeMS,
|
|
13626
13616
|
translate = _ref.translate;
|
|
13627
|
-
return
|
|
13628
|
-
className: classnames(cx$
|
|
13629
|
-
},
|
|
13630
|
-
className: cx$
|
|
13617
|
+
return React.createElement("div", {
|
|
13618
|
+
className: classnames(cx$3(''), className)
|
|
13619
|
+
}, React.createElement("span", {
|
|
13620
|
+
className: cx$3('text')
|
|
13631
13621
|
}, translate('stats', nbHits, processingTimeMS, nbSortedHits, areHitsSorted)));
|
|
13632
13622
|
};
|
|
13633
13623
|
|
|
@@ -13675,7 +13665,7 @@ var Stats$1 = translatable({
|
|
|
13675
13665
|
|
|
13676
13666
|
connectStats(Stats$1);
|
|
13677
13667
|
|
|
13678
|
-
var cx$
|
|
13668
|
+
var cx$2 = createClassNames('ToggleRefinement');
|
|
13679
13669
|
|
|
13680
13670
|
var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
13681
13671
|
var currentRefinement = _ref.currentRefinement,
|
|
@@ -13683,19 +13673,19 @@ var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
|
13683
13673
|
canRefine = _ref.canRefine,
|
|
13684
13674
|
refine = _ref.refine,
|
|
13685
13675
|
className = _ref.className;
|
|
13686
|
-
return
|
|
13687
|
-
className: classnames(cx$
|
|
13688
|
-
},
|
|
13689
|
-
className: cx$
|
|
13690
|
-
},
|
|
13691
|
-
className: cx$
|
|
13676
|
+
return React.createElement("div", {
|
|
13677
|
+
className: classnames(cx$2('', !canRefine && '-noRefinement'), className)
|
|
13678
|
+
}, React.createElement("label", {
|
|
13679
|
+
className: cx$2('label')
|
|
13680
|
+
}, React.createElement("input", {
|
|
13681
|
+
className: cx$2('checkbox'),
|
|
13692
13682
|
type: "checkbox",
|
|
13693
13683
|
checked: currentRefinement,
|
|
13694
13684
|
onChange: function onChange(event) {
|
|
13695
13685
|
return refine(event.target.checked);
|
|
13696
13686
|
}
|
|
13697
|
-
}),
|
|
13698
|
-
className: cx$
|
|
13687
|
+
}), React.createElement("span", {
|
|
13688
|
+
className: cx$2('labelText')
|
|
13699
13689
|
}, label)));
|
|
13700
13690
|
};
|
|
13701
13691
|
|
|
@@ -13904,11 +13894,11 @@ function createVoiceSearchHelper(_ref) {
|
|
|
13904
13894
|
};
|
|
13905
13895
|
}
|
|
13906
13896
|
|
|
13907
|
-
var cx$
|
|
13897
|
+
var cx$1 = createClassNames('VoiceSearch');
|
|
13908
13898
|
|
|
13909
13899
|
var ButtonSvg = function ButtonSvg(_ref) {
|
|
13910
13900
|
var children = _ref.children;
|
|
13911
|
-
return
|
|
13901
|
+
return React.createElement("svg", {
|
|
13912
13902
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13913
13903
|
width: "16",
|
|
13914
13904
|
height: "16",
|
|
@@ -13925,36 +13915,36 @@ var DefaultButtonText = function DefaultButtonText(_ref2) {
|
|
|
13925
13915
|
var status = _ref2.status,
|
|
13926
13916
|
errorCode = _ref2.errorCode,
|
|
13927
13917
|
isListening = _ref2.isListening;
|
|
13928
|
-
return status === 'error' && errorCode === 'not-allowed' ?
|
|
13918
|
+
return status === 'error' && errorCode === 'not-allowed' ? React.createElement(ButtonSvg, null, React.createElement("line", {
|
|
13929
13919
|
x1: "1",
|
|
13930
13920
|
y1: "1",
|
|
13931
13921
|
x2: "23",
|
|
13932
13922
|
y2: "23"
|
|
13933
|
-
}),
|
|
13923
|
+
}), React.createElement("path", {
|
|
13934
13924
|
d: "M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"
|
|
13935
|
-
}),
|
|
13925
|
+
}), React.createElement("path", {
|
|
13936
13926
|
d: "M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"
|
|
13937
|
-
}),
|
|
13927
|
+
}), React.createElement("line", {
|
|
13938
13928
|
x1: "12",
|
|
13939
13929
|
y1: "19",
|
|
13940
13930
|
x2: "12",
|
|
13941
13931
|
y2: "23"
|
|
13942
|
-
}),
|
|
13932
|
+
}), React.createElement("line", {
|
|
13943
13933
|
x1: "8",
|
|
13944
13934
|
y1: "23",
|
|
13945
13935
|
x2: "16",
|
|
13946
13936
|
y2: "23"
|
|
13947
|
-
})) :
|
|
13937
|
+
})) : React.createElement(ButtonSvg, null, React.createElement("path", {
|
|
13948
13938
|
d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z",
|
|
13949
13939
|
fill: isListening ? 'currentColor' : ''
|
|
13950
|
-
}),
|
|
13940
|
+
}), React.createElement("path", {
|
|
13951
13941
|
d: "M19 10v2a7 7 0 0 1-14 0v-2"
|
|
13952
|
-
}),
|
|
13942
|
+
}), React.createElement("line", {
|
|
13953
13943
|
x1: "12",
|
|
13954
13944
|
y1: "19",
|
|
13955
13945
|
x2: "12",
|
|
13956
13946
|
y2: "23"
|
|
13957
|
-
}),
|
|
13947
|
+
}), React.createElement("line", {
|
|
13958
13948
|
x1: "8",
|
|
13959
13949
|
y1: "23",
|
|
13960
13950
|
x2: "16",
|
|
@@ -13964,7 +13954,7 @@ var DefaultButtonText = function DefaultButtonText(_ref2) {
|
|
|
13964
13954
|
|
|
13965
13955
|
var DefaultStatus = function DefaultStatus(_ref3) {
|
|
13966
13956
|
var transcript = _ref3.transcript;
|
|
13967
|
-
return
|
|
13957
|
+
return React.createElement("p", null, transcript);
|
|
13968
13958
|
};
|
|
13969
13959
|
|
|
13970
13960
|
var VoiceSearch =
|
|
@@ -14049,17 +14039,17 @@ function (_Component) {
|
|
|
14049
14039
|
isSpeechFinal: isSpeechFinal,
|
|
14050
14040
|
isBrowserSupported: isBrowserSupported()
|
|
14051
14041
|
};
|
|
14052
|
-
return
|
|
14053
|
-
className: cx$
|
|
14054
|
-
},
|
|
14055
|
-
className: cx$
|
|
14042
|
+
return React.createElement("div", {
|
|
14043
|
+
className: cx$1('')
|
|
14044
|
+
}, React.createElement("button", {
|
|
14045
|
+
className: cx$1('button'),
|
|
14056
14046
|
type: "button",
|
|
14057
14047
|
title: isBrowserSupported() ? translate('buttonTitle') : translate('disabledButtonTitle'),
|
|
14058
14048
|
onClick: this.onClick,
|
|
14059
14049
|
disabled: !isBrowserSupported()
|
|
14060
|
-
},
|
|
14061
|
-
className: cx$
|
|
14062
|
-
},
|
|
14050
|
+
}, React.createElement(ButtonTextComponent, innerProps)), React.createElement("div", {
|
|
14051
|
+
className: cx$1('status')
|
|
14052
|
+
}, React.createElement(StatusComponent, innerProps)));
|
|
14063
14053
|
}
|
|
14064
14054
|
}, {
|
|
14065
14055
|
key: "componentWillUnmount",
|
|
@@ -14086,14 +14076,14 @@ var VoiceSearch$1 = translatable({
|
|
|
14086
14076
|
|
|
14087
14077
|
connectVoiceSearch(VoiceSearch$1);
|
|
14088
14078
|
|
|
14089
|
-
var cx
|
|
14079
|
+
var cx = createClassNames('QueryRuleCustomData');
|
|
14090
14080
|
|
|
14091
14081
|
var QueryRuleCustomData = function QueryRuleCustomData(_ref) {
|
|
14092
14082
|
var items = _ref.items,
|
|
14093
14083
|
className = _ref.className,
|
|
14094
14084
|
children = _ref.children;
|
|
14095
|
-
return
|
|
14096
|
-
className: classnames(cx
|
|
14085
|
+
return React.createElement("div", {
|
|
14086
|
+
className: classnames(cx(''), className)
|
|
14097
14087
|
}, children({
|
|
14098
14088
|
items: items
|
|
14099
14089
|
}));
|
|
@@ -14106,7 +14096,7 @@ QueryRuleCustomData.propTypes = {
|
|
|
14106
14096
|
};
|
|
14107
14097
|
|
|
14108
14098
|
var QueryRuleCustomDataWidget = function QueryRuleCustomDataWidget(props) {
|
|
14109
|
-
return
|
|
14099
|
+
return React.createElement(PanelWrapper, props, React.createElement(QueryRuleCustomData, props));
|
|
14110
14100
|
};
|
|
14111
14101
|
|
|
14112
14102
|
connectQueryRules(QueryRuleCustomDataWidget);
|
|
@@ -14130,57 +14120,57 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14130
14120
|
|
|
14131
14121
|
var hit = props.hit;
|
|
14132
14122
|
if (moment().isSameOrBefore(props.hit.pubDateSort)) return null;
|
|
14133
|
-
return
|
|
14123
|
+
return React.createElement(
|
|
14134
14124
|
'div',
|
|
14135
14125
|
{ key: hit.url, className: 'hitResult ' + styles.article },
|
|
14136
|
-
|
|
14126
|
+
React.createElement(
|
|
14137
14127
|
'a',
|
|
14138
14128
|
{ href: '/view/' + hit.url, style: this.props.variant === 'right' ? { flexDirection: 'row-reverse' } : {} },
|
|
14139
|
-
|
|
14129
|
+
React.createElement(
|
|
14140
14130
|
'div',
|
|
14141
14131
|
{ className: styles.thumb },
|
|
14142
|
-
|
|
14132
|
+
React.createElement(
|
|
14143
14133
|
'figure',
|
|
14144
14134
|
null,
|
|
14145
|
-
|
|
14135
|
+
React.createElement(
|
|
14146
14136
|
LazyLoad,
|
|
14147
14137
|
{ once: true },
|
|
14148
|
-
|
|
14138
|
+
React.createElement('img', {
|
|
14149
14139
|
src: hit.thumbnail && hit.thumbnail.asset ? urlFor({ client: client, source: hit.thumbnail }) : hit.thumbnail && _typeof$2(hit.thumbnail === 'string') ? hit.thumbnail : this.props.defaultImage
|
|
14150
14140
|
})
|
|
14151
14141
|
)
|
|
14152
14142
|
)
|
|
14153
14143
|
)
|
|
14154
14144
|
),
|
|
14155
|
-
|
|
14145
|
+
React.createElement(
|
|
14156
14146
|
'div',
|
|
14157
14147
|
{ className: styles.info, style: this.props.variant === 'right' ? { padding: '0 1rem 0 0' } : { padding: ' 0 0 0 1rem' } },
|
|
14158
|
-
|
|
14148
|
+
React.createElement(
|
|
14159
14149
|
'a',
|
|
14160
14150
|
{ href: '/view/' + hit.url },
|
|
14161
|
-
|
|
14151
|
+
React.createElement(
|
|
14162
14152
|
'h2',
|
|
14163
14153
|
null,
|
|
14164
14154
|
hit.title
|
|
14165
14155
|
)
|
|
14166
14156
|
),
|
|
14167
|
-
hit.pubDateSort &&
|
|
14157
|
+
hit.pubDateSort && React.createElement(
|
|
14168
14158
|
'p',
|
|
14169
14159
|
{ className: styles.published },
|
|
14170
14160
|
moment(hit.pubDateSort).format('MMMM Do YYYY')
|
|
14171
14161
|
),
|
|
14172
|
-
hit.authorMapping && hit.authorMapping.length > 0 &&
|
|
14162
|
+
hit.authorMapping && hit.authorMapping.length > 0 && React.createElement(
|
|
14173
14163
|
'p',
|
|
14174
14164
|
{ className: styles.author },
|
|
14175
14165
|
hit.authorMapping.map(function (author) {
|
|
14176
|
-
return
|
|
14166
|
+
return React.createElement(
|
|
14177
14167
|
'span',
|
|
14178
14168
|
null,
|
|
14179
14169
|
author.displayName
|
|
14180
14170
|
);
|
|
14181
14171
|
})
|
|
14182
14172
|
),
|
|
14183
|
-
hit.summary &&
|
|
14173
|
+
hit.summary && React.createElement('p', { dangerouslySetInnerHTML: { __html: hit.summary }, className: styles.summary })
|
|
14184
14174
|
)
|
|
14185
14175
|
);
|
|
14186
14176
|
}
|
|
@@ -14193,10 +14183,10 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14193
14183
|
styles: this.props.deckStyles,
|
|
14194
14184
|
client: this.props.sanityClient
|
|
14195
14185
|
};
|
|
14196
|
-
return
|
|
14197
|
-
|
|
14186
|
+
return React.createElement(
|
|
14187
|
+
React.Fragment,
|
|
14198
14188
|
null,
|
|
14199
|
-
|
|
14189
|
+
React.createElement(
|
|
14200
14190
|
InstantSearch,
|
|
14201
14191
|
_extends$1({
|
|
14202
14192
|
searchClient: this.props.searchClient,
|
|
@@ -14207,29 +14197,29 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14207
14197
|
indexName: this.props.indexName,
|
|
14208
14198
|
onSearchParameters: this.props.onSearchParameters
|
|
14209
14199
|
}, this.props),
|
|
14210
|
-
|
|
14211
|
-
|
|
14212
|
-
this.props.refinementAttributes &&
|
|
14200
|
+
React.createElement(Configure, { hitsPerPage: this.props.hitsPerPage || 20 }),
|
|
14201
|
+
React.createElement(SearchBox, null),
|
|
14202
|
+
this.props.refinementAttributes && React.createElement(
|
|
14213
14203
|
'div',
|
|
14214
14204
|
{ className: 'search_refinement' },
|
|
14215
14205
|
this.props.refinementAttributes.map(function (item, index) {
|
|
14216
|
-
return
|
|
14206
|
+
return React.createElement(
|
|
14217
14207
|
DropdownButton,
|
|
14218
14208
|
{ title: item.title },
|
|
14219
|
-
|
|
14209
|
+
React.createElement(RefinementList, { showMore: item.showMore, limit: item.limit, showMoreLimit: item.showMoreLimit, attribute: item.attribute })
|
|
14220
14210
|
);
|
|
14221
14211
|
})
|
|
14222
14212
|
),
|
|
14223
|
-
|
|
14213
|
+
React.createElement(
|
|
14224
14214
|
'div',
|
|
14225
14215
|
{ className: 'AlgoliaResults' },
|
|
14226
|
-
|
|
14216
|
+
React.createElement(Hits, { hitComponent: function hitComponent(hit) {
|
|
14227
14217
|
return _this2.Deck(_extends$1({}, hit, { propsObj: propsObj }));
|
|
14228
14218
|
} })
|
|
14229
14219
|
),
|
|
14230
|
-
|
|
14220
|
+
React.createElement(Pagination, null)
|
|
14231
14221
|
),
|
|
14232
|
-
|
|
14222
|
+
React.createElement(
|
|
14233
14223
|
'style',
|
|
14234
14224
|
{ jsx: 'true' },
|
|
14235
14225
|
'\n .hitResult {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-bottom: 1rem;\n border-bottom: 1px solid #00000024;\n padding: 1rem 0;\n }\n .hitResult > a:first-child {\n width: 30%;\n }\n .hitResult > a:first-child > div{\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n .hitResult > div:last-child > a {\n margin-bottom: .5rem;\n width: 100%;\n }\n @media only screen and (max-width: 568px) {\n .hitResult {\n flex-direction: column;\n align-items: center;\n border: none;\n padding: 0;\n }\n .hitResult > a:first-child {\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n }\n .AlgoliaResults {\n padding-left: 15px;\n margin-top: 3rem;\n }\n\n .search_refinement {\n display: flex;\n margin: 2rem 0;\n }\n\n .search_refinement > div {\n padding-right: 1rem;\n max-height: 500px;\n }\n\n .ais-Hits-list {\n margin: 0;\n list-style: none;\n padding-inline-start: 0;\n }\n .ais-Pagination-list {\n list-style: none;\n }\n .ais-Pagination-list {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n .ais-Pagination-item + .ais-Pagination-item {\n margin-left: 0.3rem;\n }\n .ais-Pagination-link {\n padding: 0.3rem 0.6rem;\n display: block;\n border: 1px solid var(--search-primary);\n border-radius: 5px;\n transition: background-color 0.2s ease-out;\n }\n .ais-Pagination-link:focus,\n .ais-Pagination-link:hover {\n background-color: var(--search-secondary);\n color: #fff;\n }\n .ais-Pagination-item--disabled .ais-Pagination-link {\n opacity: 0.6;\n cursor: not-allowed;\n color: var(--search-secondary);\n }\n .ais-Pagination-item--disabled .ais-Pagination-link:focus,\n .ais-Pagination-item--disabled .ais-Pagination-link:hover {\n color: #fff;\n background-color: var(--search-secondary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link {\n color: #fff;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link:focus,\n .ais-Pagination-item--selected .ais-Pagination-link:hover {\n color: #fff;\n }\n .ais-Pagination-list,\n .ais-Results-list {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .ais-Pagination-list,\n .ais-PoweredBy,\n .ais-RangeInput-form,\n .ais-RatingMenu-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .ais-RefinementList-item {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .ais-RefinementList-list {\n margin: 0;\n padding: 0 1rem;\n width: max-content;\n }\n .ais-SearchBox-form {\n width: 100%;\n border-radius: 5px;\n height: 48px;\n }\n .ais-SearchBox-input {\n padding: 0.5rem;\n border-radius: 5px;\n width: calc(100% - 150px);\n height: 48px;\n border: 0;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit {\n width: 78px;\n border-radius: 5px;\n padding: 7px;\n margin-left: 5px;\n height: 48px;\n background-color: var(--search-primary);\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit > svg {\n fill: #fff;\n }\n .search_refinement > .dropdown > button {\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n\n .ais-SearchBox-reset {\n height: 48px;\n width: 48px;\n color: #fff;\n background-color: var(--search-primary);\n border: 0;\n margin-left: 5px;\n border-radius: 5px;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-reset > svg {\n fill: #fff;\n }\n .ais-RefinementList-checkbox {\n margin-right: 5px;\n }\n\n .ais-RefinementList-showMore {\n padding: 0.5rem;\n border: 0;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n color: #fff;\n border: 1px solid;\n border-radius: 5px;\n margin-left: 1rem;\n }\n '
|
|
@@ -14239,7 +14229,7 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14239
14229
|
}]);
|
|
14240
14230
|
|
|
14241
14231
|
return AlgoliaSearch;
|
|
14242
|
-
}(
|
|
14232
|
+
}(React.Component);
|
|
14243
14233
|
|
|
14244
14234
|
AlgoliaSearch.propTypes = {
|
|
14245
14235
|
searchState: PropTypes.object,
|