@mjhls/mjh-framework 1.0.840-seomanager-v1 → 1.0.841-dv
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 +1 -1
- package/dist/cjs/AD300x250.js +24 -24
- package/dist/cjs/AD300x250x600.js +24 -24
- package/dist/cjs/AD728x90.js +27 -27
- package/dist/cjs/ADFloatingFooter.js +23 -23
- package/dist/cjs/ADFooter.js +6 -6
- package/dist/cjs/ADGutter.js +23 -23
- package/dist/cjs/{ADInfeed-859820d9.js → ADInfeed-ad02bfab.js} +4 -4
- package/dist/cjs/ADSkyscraper.js +23 -23
- package/dist/cjs/ADSponsoredResources.js +23 -23
- package/dist/cjs/ADWebcast.js +23 -23
- package/dist/cjs/ADWelcome.js +20 -20
- package/dist/cjs/{ADlgInfeed-da3a36a6.js → ADlgInfeed-eb23fc9f.js} +4 -4
- package/dist/cjs/AccordionPanel.js +8 -8
- package/dist/cjs/AdSlot.js +92 -24
- package/dist/cjs/AdSlotsProvider.js +27 -17
- package/dist/cjs/AlgoliaSearch.js +521 -488
- package/dist/cjs/AlphabeticList.js +10 -10
- package/dist/cjs/ArticleCarousel.js +17 -17
- package/dist/cjs/ArticleProgramLandingPage.js +50 -50
- package/dist/cjs/ArticleSeriesLandingPage.js +32 -32
- package/dist/cjs/ArticleSeriesListing.js +33 -33
- package/dist/cjs/Auth.js +348 -519
- package/dist/cjs/AuthWrapper.js +309 -1583
- package/dist/cjs/{AuthorComponent-c21aac7f.js → AuthorComponent-ac8972ce.js} +1 -1
- package/dist/cjs/Beam.js +8 -8
- package/dist/cjs/{BlockContent-36e54d77.js → BlockContent-8b494587.js} +34 -34
- package/dist/cjs/Breadcrumbs.js +8 -8
- package/dist/cjs/CMEDeck.js +24 -24
- package/dist/cjs/Column2.js +16 -16
- package/dist/cjs/Column3.js +33 -33
- package/dist/cjs/ConferenceArticleCard.js +7 -7
- package/dist/cjs/DeckContent.js +35 -35
- package/dist/cjs/DeckQueue.js +34 -34
- package/dist/cjs/{Dfp-93399f8c.js → Dfp-391fd124.js} +15 -15
- package/dist/cjs/EventsDeck.js +28 -28
- package/dist/cjs/ExternalResources.js +47 -47
- package/dist/cjs/Feature.js +4 -4
- package/dist/cjs/ForbesHero.js +12 -12
- package/dist/cjs/GridContent.js +204 -85
- package/dist/cjs/GridHero.js +13 -13
- package/dist/cjs/GroupDeck.js +14 -14
- package/dist/cjs/HamMagazine.js +28 -28
- package/dist/cjs/Hero.js +4 -4
- package/dist/cjs/HighlightenVideo.js +2 -2
- package/dist/cjs/HorizontalArticleListing.js +47 -47
- package/dist/cjs/HorizontalHero.js +5 -5
- package/dist/cjs/IssueContentDeck.js +13 -13
- package/dist/cjs/IssueDeck.js +17 -17
- package/dist/cjs/IssueLanding.js +55 -55
- package/dist/cjs/LeftNav.js +22 -22
- package/dist/cjs/MasterDeck.js +34 -34
- package/dist/cjs/MediaSeriesLanding.js +340 -440
- package/dist/cjs/NavDvm.js +13 -13
- package/dist/cjs/NavMagazine.js +31 -31
- package/dist/cjs/NavNative.js +32 -32
- package/dist/cjs/OncliveHero.js +4 -4
- package/dist/cjs/OncliveLargeHero.js +13 -13
- package/dist/cjs/PageFilter.js +6 -6
- package/dist/cjs/PartnerDetailListing.js +57 -57
- package/dist/cjs/PdfDownload.js +2 -2
- package/dist/cjs/PopUpModal.js +6 -6
- package/dist/cjs/PubSection.js +34 -34
- package/dist/cjs/PubToc.js +8 -8
- package/dist/cjs/PublicationDeck.js +8 -8
- package/dist/cjs/PublicationLanding.js +28 -28
- package/dist/cjs/QueueDeckExpanded.js +38 -38
- package/dist/cjs/RecentNews.js +4 -4
- package/dist/cjs/RelatedContent.js +7 -7
- package/dist/cjs/Search.js +8 -8
- package/dist/cjs/Segment.js +6 -6
- package/dist/cjs/SeriesListingDeck.js +20 -20
- package/dist/cjs/{SeriesSlider-34c6cc2b.js → SeriesSlider-d38767ae.js} +10 -10
- package/dist/cjs/SetCookie.js +1 -1
- package/dist/cjs/SideFooter.js +15 -15
- package/dist/cjs/{SocialSearchComponent-948138c7.js → SocialSearchComponent-9a9d6f8c.js} +11 -11
- package/dist/cjs/TaxonomyCard.js +10 -10
- package/dist/cjs/TaxonomyDescription.js +46 -46
- package/dist/cjs/TemplateNormal.js +48 -48
- package/dist/cjs/ThumbnailCard.js +7 -7
- package/dist/cjs/Ustream.js +14 -14
- package/dist/cjs/VerticalHero.js +3 -3
- package/dist/cjs/VideoProgramLandingPage.js +52 -52
- package/dist/cjs/VideoSeriesCard.js +13 -13
- package/dist/cjs/VideoSeriesFilter.js +9 -9
- package/dist/cjs/VideoSeriesLandingPage.js +38 -38
- package/dist/cjs/VideoSeriesListing.js +37 -35
- package/dist/cjs/View.js +179 -140
- package/dist/cjs/YahooHero.js +15 -15
- package/dist/cjs/YoutubeGroup.js +22 -22
- package/dist/cjs/{_is-array-6128bd56.js → _is-array-754e012d.js} +6 -6
- package/dist/cjs/{_iter-detect-55a5657a.js → _iter-detect-60b2f026.js} +8 -8
- package/dist/cjs/{_object-pie-083f2dd6.js → _object-pie-68c5bcbc.js} +4 -4
- package/dist/cjs/{_object-sap-a175b4a9.js → _object-sap-5e74ba08.js} +1 -1
- package/dist/cjs/{_object-to-array-8fe5a54f.js → _object-to-array-5762f850.js} +2 -2
- package/dist/cjs/{_to-object-6de10e57.js → _to-object-329a650b.js} +8 -8
- package/dist/cjs/{asyncToGenerator-58c289d9.js → asyncToGenerator-140e5f89.js} +32 -32
- package/dist/cjs/{brightcove-react-player-loader.es-a195642e.js → brightcove-react-player-loader.es-4ba0d3d5.js} +4 -5
- package/dist/cjs/{core.get-iterator-method-f474eacc.js → core.get-iterator-method-f62321d4.js} +2 -2
- package/dist/cjs/{debounce-d4a2369b.js → debounce-529c8d06.js} +2 -2
- package/dist/cjs/{define-property-c88be878.js → define-property-f4d12f4e.js} +6 -6
- package/dist/cjs/{defineProperty-0cb76d99.js → defineProperty-55548b25.js} +1 -1
- package/dist/cjs/{entities-3f9d0f2f.js → entities-310b46ee.js} +1 -1
- package/dist/cjs/{eq-5fc26c07.js → eq-bb2843ed.js} +1 -1
- package/dist/cjs/{es6.string.iterator-c2573ffd.js → es6.string.iterator-cc0bbaa4.js} +6 -6
- package/dist/cjs/{extends-29bdbc6d.js → extends-0a918631.js} +7 -7
- package/dist/cjs/faundadb.js +7 -7
- package/dist/cjs/{get-5839e5b5.js → get-adbb11e3.js} +21 -21
- package/dist/cjs/getRelatedArticle.js +14 -14
- package/dist/cjs/getRootDocGroup.js +6 -6
- package/dist/cjs/getSerializers.js +45 -45
- package/dist/cjs/{getTargeting-be6168ad.js → getTargeting-ea2ea5e7.js} +2 -2
- package/dist/cjs/getTargeting.js +8 -8
- package/dist/{esm/iconBase-ccc56b97.js → cjs/iconBase-68959171.js} +5 -2
- package/dist/cjs/{index-fc2f1ca2.js → index-2cf30c83.js} +4 -4
- package/dist/cjs/{index-f86bb269.js → index-5be2866f.js} +45 -44
- package/dist/cjs/{index-eadd5035.js → index-9d365128.js} +7 -7
- package/dist/cjs/{index-efca863c.js → index-b5eb3ff8.js} +11 -16
- package/dist/cjs/{index-060c5d65.js → index-c1d8b5a1.js} +231 -180
- package/dist/cjs/{index-50be6759.js → index-f0677b9d.js} +10 -16
- package/dist/cjs/{index.es-f3e47207.js → index.es-13533f24.js} +4 -20
- package/dist/cjs/{index.esm-f27f80d9.js → index.esm-05850a2f.js} +1 -1
- package/dist/cjs/{index.esm-2bb721c8.js → index.esm-3ffa049c.js} +2 -2
- package/dist/cjs/{index.esm-c1e16606.js → index.esm-44f3e2d0.js} +1 -1
- package/dist/cjs/{index.esm-00a6aade.js → index.esm-974f47d9.js} +1 -1
- package/dist/cjs/index.js +137 -138
- package/dist/cjs/{inherits-c2065b95.js → inherits-0c7830c5.js} +19 -19
- package/dist/cjs/{isSymbol-03abbdf0.js → isSymbol-04666465.js} +15 -15
- package/dist/cjs/keys-a586b7a0.js +25 -0
- package/dist/cjs/{lodash-f0783643.js → lodash-7fd85bcf.js} +10 -58
- package/dist/cjs/main-11ec04d2.js +894 -0
- package/dist/cjs/{moment-aca40de1.js → moment-66a6a284.js} +9 -11
- package/dist/cjs/{react-social-icons-af932527.js → react-social-icons-07939b41.js} +17 -17
- package/dist/cjs/{slicedToArray-5d1bc3b3.js → slicedToArray-8f385299.js} +14 -14
- package/dist/cjs/{smoothscroll-99df7f93.js → smoothscroll-5054361f.js} +1 -1
- package/dist/cjs/stringify-7c5aff47.js +17 -0
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-ddb70795.js → toConsumableArray-9a3476fe.js} +9 -9
- package/dist/cjs/{toNumber-5e1fac58.js → toNumber-36d1e7e5.js} +5 -40
- package/dist/cjs/{typeof-88a668c5.js → typeof-9d7f610f.js} +35 -35
- package/dist/cjs/urlFor.js +1 -1
- package/dist/cjs/{ustream-api-b2b9092f.js → ustream-api-d092dc31.js} +4 -4
- package/dist/cjs/{util-6f784d85.js → util-f2c1b65b.js} +1 -1
- package/dist/cjs/{web.dom.iterable-46657b5c.js → web.dom.iterable-a0e279c1.js} +3 -3
- package/dist/esm/AD.js +7 -7
- package/dist/esm/AD300x250.js +27 -27
- package/dist/esm/AD300x250x600.js +27 -27
- package/dist/esm/AD728x90.js +30 -30
- package/dist/esm/ADFloatingFooter.js +29 -29
- package/dist/esm/ADFooter.js +11 -11
- package/dist/esm/ADGutter.js +29 -29
- package/dist/esm/{ADInfeed-4bf3b2f9.js → ADInfeed-e8ab7008.js} +9 -9
- package/dist/esm/ADSkyscraper.js +29 -29
- package/dist/esm/ADSponsoredResources.js +29 -29
- package/dist/esm/ADWebcast.js +29 -29
- package/dist/esm/ADWelcome.js +30 -30
- package/dist/esm/{ADlgInfeed-a3377c4a.js → ADlgInfeed-882b23a8.js} +8 -8
- package/dist/esm/AccordionPanel.js +24 -24
- package/dist/esm/AdSlot.js +95 -27
- package/dist/esm/AdSlotsProvider.js +28 -18
- package/dist/esm/AlgoliaSearch.js +721 -688
- package/dist/esm/AlphabeticList.js +22 -22
- package/dist/esm/ArticleCarousel.js +20 -20
- package/dist/esm/ArticleProgramLandingPage.js +56 -56
- package/dist/esm/ArticleSeriesLandingPage.js +37 -37
- package/dist/esm/ArticleSeriesListing.js +56 -56
- package/dist/esm/Auth.js +418 -589
- package/dist/esm/AuthWrapper.js +326 -1600
- package/dist/esm/{AuthorComponent-30aeba69.js → AuthorComponent-8ffd4679.js} +11 -11
- package/dist/esm/Beam.js +8 -8
- package/dist/esm/{BlockContent-c99c9a8d.js → BlockContent-d05b5b23.js} +35 -35
- package/dist/esm/Breadcrumbs.js +17 -17
- package/dist/esm/CMEDeck.js +79 -79
- package/dist/esm/Column1.js +5 -5
- package/dist/esm/Column2.js +27 -27
- package/dist/esm/Column3.js +52 -52
- package/dist/esm/ConferenceArticleCard.js +20 -20
- package/dist/esm/{ConferenceBanner-8792ebd2.js → ConferenceBanner-9162d0ca.js} +4 -4
- package/dist/esm/DeckContent.js +79 -79
- package/dist/esm/DeckQueue.js +71 -71
- package/dist/esm/{Dfp-2c43d2a0.js → Dfp-2f9796e1.js} +22 -22
- package/dist/esm/EventsDeck.js +88 -88
- package/dist/esm/ExternalResources.js +73 -73
- package/dist/esm/Feature.js +18 -18
- package/dist/esm/ForbesHero.js +35 -35
- package/dist/esm/GridContent.js +262 -144
- package/dist/esm/GridHero.js +37 -37
- package/dist/esm/GroupDeck.js +47 -47
- package/dist/esm/HamMagazine.js +105 -105
- package/dist/esm/Header.js +8 -8
- package/dist/esm/Hero.js +10 -10
- package/dist/esm/HighlightenVideo.js +14 -14
- package/dist/esm/HorizontalArticleListing.js +69 -69
- package/dist/esm/HorizontalHero.js +23 -23
- package/dist/esm/IssueContentDeck.js +50 -50
- package/dist/esm/IssueDeck.js +47 -47
- package/dist/esm/IssueLanding.js +63 -63
- package/dist/esm/LeftNav.js +35 -35
- package/dist/esm/MasterDeck.js +66 -66
- package/dist/esm/MediaSeriesLanding.js +630 -730
- package/dist/esm/NavDvm.js +56 -56
- package/dist/esm/{NavFooter-e27bd93b.js → NavFooter-c29526b7.js} +12 -12
- package/dist/esm/NavMagazine.js +113 -113
- package/dist/esm/NavNative.js +103 -103
- package/dist/esm/OncliveHero.js +16 -16
- package/dist/esm/OncliveLargeHero.js +60 -60
- package/dist/esm/PageFilter.js +12 -12
- package/dist/esm/PartnerDetailListing.js +105 -105
- package/dist/esm/PdfDownload.js +7 -7
- package/dist/esm/PopUpModal.js +14 -14
- package/dist/esm/PubSection.js +39 -39
- package/dist/esm/PubToc.js +12 -12
- package/dist/esm/PublicationDeck.js +39 -39
- package/dist/esm/PublicationLanding.js +75 -75
- package/dist/esm/QueueDeckExpanded.js +275 -275
- package/dist/esm/RecentNews.js +20 -20
- package/dist/esm/RelatedContent.js +20 -20
- package/dist/esm/RelatedTopicsDropdown.js +11 -11
- package/dist/esm/RolesDeck.js +13 -13
- package/dist/esm/Search.js +12 -12
- package/dist/esm/Segment.js +6 -6
- package/dist/esm/SeriesListingDeck.js +32 -32
- package/dist/esm/{SeriesSlider-5d5c08f4.js → SeriesSlider-b8cc1baa.js} +27 -27
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +32 -32
- package/dist/esm/SocialIcons.js +7 -7
- package/dist/esm/{SocialSearchComponent-db963c3e.js → SocialSearchComponent-c54d43cb.js} +29 -29
- package/dist/esm/SocialShare.js +25 -25
- package/dist/esm/TaxonomyCard.js +42 -42
- package/dist/esm/TaxonomyDescription.js +50 -50
- package/dist/esm/TemplateNormal.js +68 -68
- package/dist/esm/ThumbnailCard.js +14 -14
- package/dist/esm/Ustream.js +27 -27
- package/dist/esm/VerticalHero.js +14 -14
- package/dist/esm/VideoProgramLandingPage.js +64 -64
- package/dist/esm/VideoSeriesCard.js +25 -25
- package/dist/esm/VideoSeriesFilter.js +15 -15
- package/dist/esm/VideoSeriesLandingPage.js +42 -42
- package/dist/esm/VideoSeriesListing.js +76 -74
- package/dist/esm/View.js +328 -289
- package/dist/esm/YahooHero.js +35 -35
- package/dist/esm/YoutubeGroup.js +47 -47
- package/dist/esm/{_is-array-3e99e06e.js → _is-array-58e95429.js} +6 -6
- package/dist/esm/{_iter-detect-7e5e5ce2.js → _iter-detect-5d49a330.js} +8 -8
- package/dist/esm/{_object-pie-133f504a.js → _object-pie-33c40e79.js} +4 -4
- package/dist/esm/{_object-sap-f353c2a9.js → _object-sap-964b6feb.js} +1 -1
- package/dist/esm/{_object-to-array-0f197f89.js → _object-to-array-7e804fce.js} +2 -2
- package/dist/esm/{_to-object-b50e61c3.js → _to-object-a4107da3.js} +9 -9
- package/dist/esm/{asyncToGenerator-7f8f9219.js → asyncToGenerator-fc1c2e29.js} +32 -32
- package/dist/esm/{brightcove-react-player-loader.es-57a70a56.js → brightcove-react-player-loader.es-e1c6b0f2.js} +6 -7
- package/dist/esm/{core.get-iterator-method-133dfacd.js → core.get-iterator-method-e1de7503.js} +2 -2
- package/dist/esm/{debounce-533d9748.js → debounce-9207d8ee.js} +2 -2
- package/dist/esm/{define-property-fe54dc9f.js → define-property-8af5f002.js} +6 -6
- package/dist/esm/{defineProperty-f5ff6f5a.js → defineProperty-94fd8bfc.js} +1 -1
- package/dist/esm/{entities-932b50cf.js → entities-7cc3bf45.js} +1 -1
- package/dist/esm/{eq-bdcbf886.js → eq-b470f743.js} +1 -1
- package/dist/esm/{es6.string.iterator-bc33758b.js → es6.string.iterator-c990c18c.js} +7 -7
- package/dist/esm/{extends-60e0e1c6.js → extends-6f2fcc99.js} +7 -7
- package/dist/esm/faundadb.js +7 -7
- package/dist/esm/{get-3c308da4.js → get-1e515072.js} +21 -21
- package/dist/esm/getRelatedArticle.js +14 -14
- package/dist/esm/getRootDocGroup.js +6 -6
- package/dist/esm/getSerializers.js +45 -45
- package/dist/esm/{getTargeting-68291ce9.js → getTargeting-831bc794.js} +2 -2
- package/dist/esm/getTargeting.js +8 -8
- package/dist/{cjs/iconBase-be4097c0.js → esm/iconBase-602d52fe.js} +8 -33
- package/dist/esm/{index-01d53c17.js → index-1fd83450.js} +555 -504
- package/dist/esm/{index-0dbff1d1.js → index-51a80699.js} +11 -16
- package/dist/esm/{index-755f2cc2.js → index-6c12bdd5.js} +10 -10
- package/dist/esm/{index-98ca9cec.js → index-b68072f5.js} +10 -16
- package/dist/esm/{index-79cfd25c.js → index-d2f90501.js} +45 -44
- package/dist/esm/{index-f0fc23eb.js → index-f7fb1e25.js} +6 -6
- package/dist/esm/{index.es-a6137319.js → index.es-7dda2f0a.js} +9 -25
- package/dist/esm/{index.esm-f6156a57.js → index.esm-3fdda599.js} +1 -1
- package/dist/esm/{index.esm-37268dca.js → index.esm-8ee5ff72.js} +16 -16
- package/dist/esm/{index.esm-d4932dea.js → index.esm-a8ff922c.js} +1 -1
- package/dist/esm/{index.esm-9b042655.js → index.esm-c6715e80.js} +1 -1
- package/dist/esm/index.js +133 -134
- package/dist/esm/{inherits-a41fe93f.js → inherits-75d45541.js} +19 -19
- package/dist/esm/{isSymbol-a7e9aafe.js → isSymbol-1981418f.js} +15 -15
- package/dist/esm/{keys-7a3adabf.js → keys-8eda7a5c.js} +6 -6
- package/dist/esm/{lodash-f97fd99a.js → lodash-ec8c6b48.js} +10 -58
- package/dist/esm/main-aef58dbc.js +882 -0
- package/dist/esm/{moment-bc12cb97.js → moment-12415288.js} +9 -11
- package/dist/esm/{react-social-icons-9be47857.js → react-social-icons-3822f1ce.js} +20 -20
- package/dist/esm/{slicedToArray-be2f7a22.js → slicedToArray-641f241f.js} +14 -14
- package/dist/esm/{smoothscroll-fa4e3f8c.js → smoothscroll-0cd4c7a6.js} +1 -1
- package/dist/esm/stringify-4330ccdc.js +15 -0
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/{toConsumableArray-6d9a4616.js → toConsumableArray-43aa614d.js} +9 -9
- package/dist/esm/{toNumber-5aeba6e7.js → toNumber-2f7a84cd.js} +5 -40
- package/dist/esm/{typeof-a286cf0c.js → typeof-af9c50d8.js} +35 -35
- package/dist/esm/urlFor.js +1 -1
- package/dist/esm/{ustream-api-33a866b6.js → ustream-api-9a50644d.js} +4 -4
- package/dist/esm/{util-3ab476bf.js → util-7700fc59.js} +1 -1
- package/dist/esm/{visibility-sensor-72fd8f8b.js → visibility-sensor-f40c2564.js} +2 -2
- package/dist/esm/{web.dom.iterable-4109ff68.js → web.dom.iterable-4439f05a.js} +3 -3
- package/package.json +1 -1
- package/dist/cjs/keys-7f2c2108.js +0 -25
- package/dist/cjs/main-f1c77adb.js +0 -973
- package/dist/cjs/stringify-c9ac1214.js +0 -17
- package/dist/cjs/typeof-1358762e.js +0 -33
- package/dist/esm/main-d4165069.js +0 -961
- package/dist/esm/stringify-59c8f690.js +0 -15
- package/dist/esm/typeof-2f07d0e8.js +0 -30
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import React__default, { createContext, Component, Children, version as version$2 } from 'react';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
import { _ as _typeof$1 } from './typeof-2f07d0e8.js';
|
|
7
|
-
import { _ as _objectWithoutPropertiesLoose$1, a as _setPrototypeOf, b as _extends, c as classnames } from './index-98ca9cec.js';
|
|
8
|
-
import { E as EventEmitter } from './events-6c3a7a63.js';
|
|
9
|
-
import { DropdownButton } from 'react-bootstrap';
|
|
10
|
-
import urlFor from './urlFor.js';
|
|
11
|
-
import { m as moment } from './moment-bc12cb97.js';
|
|
12
|
-
import { L as LazyLoad } from './index-755f2cc2.js';
|
|
13
|
-
import './_commonjsHelpers-0c4b6f40.js';
|
|
14
|
-
import './_to-object-b50e61c3.js';
|
|
15
|
-
import './_object-pie-133f504a.js';
|
|
16
|
-
import './es6.string.iterator-bc33758b.js';
|
|
17
|
-
import './web.dom.iterable-4109ff68.js';
|
|
18
|
-
import './_is-array-3e99e06e.js';
|
|
1
|
+
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
+
import './_to-object-a4107da3.js';
|
|
3
|
+
import './es6.string.iterator-c990c18c.js';
|
|
19
4
|
import './_library-528f1934.js';
|
|
20
|
-
import './_object-
|
|
21
|
-
import './
|
|
22
|
-
import './
|
|
5
|
+
import './_object-pie-33c40e79.js';
|
|
6
|
+
import { _ as _extends$1 } from './extends-6f2fcc99.js';
|
|
7
|
+
import './_object-sap-964b6feb.js';
|
|
8
|
+
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-75d45541.js';
|
|
9
|
+
import './define-property-8af5f002.js';
|
|
10
|
+
import './web.dom.iterable-4439f05a.js';
|
|
11
|
+
import { _ as _typeof$2 } from './typeof-af9c50d8.js';
|
|
12
|
+
import './_is-array-58e95429.js';
|
|
13
|
+
import React, { createContext, Component, Children, version as version$2 } from 'react';
|
|
14
|
+
import { E as EventEmitter } from './events-6c3a7a63.js';
|
|
15
|
+
import PropTypes from 'prop-types';
|
|
16
|
+
import { m as moment } from './moment-12415288.js';
|
|
23
17
|
import 'react-dom';
|
|
18
|
+
import './index-51a80699.js';
|
|
19
|
+
import urlFor from './urlFor.js';
|
|
20
|
+
import { L as LazyLoad } from './index-6c12bdd5.js';
|
|
21
|
+
import { DropdownButton } from 'react-bootstrap';
|
|
22
|
+
import { _ as _objectWithoutPropertiesLoose$1, a as _setPrototypeOf, b as _extends, c as classnames } from './index-b68072f5.js';
|
|
24
23
|
|
|
25
24
|
function _objectWithoutProperties(source, excluded) {
|
|
26
25
|
if (source == null) return {};
|
|
@@ -97,6 +96,33 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
97
96
|
return Constructor;
|
|
98
97
|
}
|
|
99
98
|
|
|
99
|
+
var _typeof_1 = createCommonjsModule(function (module) {
|
|
100
|
+
function _typeof(obj) {
|
|
101
|
+
"@babel/helpers - typeof";
|
|
102
|
+
|
|
103
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
104
|
+
module.exports = _typeof = function _typeof(obj) {
|
|
105
|
+
return typeof obj;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
109
|
+
} else {
|
|
110
|
+
module.exports = _typeof = function _typeof(obj) {
|
|
111
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return _typeof(obj);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
module.exports = _typeof;
|
|
121
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
var _typeof = unwrapExports(_typeof_1);
|
|
125
|
+
|
|
100
126
|
function _assertThisInitialized(self) {
|
|
101
127
|
if (self === void 0) {
|
|
102
128
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -106,7 +132,7 @@ function _assertThisInitialized(self) {
|
|
|
106
132
|
}
|
|
107
133
|
|
|
108
134
|
function _possibleConstructorReturn(self, call) {
|
|
109
|
-
if (call && (_typeof
|
|
135
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
110
136
|
return call;
|
|
111
137
|
}
|
|
112
138
|
|
|
@@ -270,20 +296,20 @@ var reactFastCompare = function isEqual(a, b) {
|
|
|
270
296
|
}
|
|
271
297
|
};
|
|
272
298
|
|
|
273
|
-
function _typeof(obj) {
|
|
299
|
+
function _typeof$1(obj) {
|
|
274
300
|
"@babel/helpers - typeof";
|
|
275
301
|
|
|
276
302
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
277
|
-
_typeof = function _typeof(obj) {
|
|
303
|
+
_typeof$1 = function _typeof(obj) {
|
|
278
304
|
return typeof obj;
|
|
279
305
|
};
|
|
280
306
|
} else {
|
|
281
|
-
_typeof = function _typeof(obj) {
|
|
307
|
+
_typeof$1 = function _typeof(obj) {
|
|
282
308
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
283
309
|
};
|
|
284
310
|
}
|
|
285
311
|
|
|
286
|
-
return _typeof(obj);
|
|
312
|
+
return _typeof$1(obj);
|
|
287
313
|
}
|
|
288
314
|
|
|
289
315
|
// From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
@@ -319,7 +345,7 @@ var defer = function defer(f) {
|
|
|
319
345
|
};
|
|
320
346
|
|
|
321
347
|
var isPlainObject = function isPlainObject(value) {
|
|
322
|
-
return _typeof(value) === 'object' && value !== null && !Array.isArray(value);
|
|
348
|
+
return _typeof$1(value) === 'object' && value !== null && !Array.isArray(value);
|
|
323
349
|
};
|
|
324
350
|
|
|
325
351
|
var removeEmptyKey = function removeEmptyKey(obj) {
|
|
@@ -330,7 +356,7 @@ var removeEmptyKey = function removeEmptyKey(obj) {
|
|
|
330
356
|
return;
|
|
331
357
|
}
|
|
332
358
|
|
|
333
|
-
if (!objectHasKeys
|
|
359
|
+
if (!objectHasKeys(value)) {
|
|
334
360
|
delete obj[key];
|
|
335
361
|
} else {
|
|
336
362
|
removeEmptyKey(value);
|
|
@@ -366,7 +392,7 @@ function addQueryID(hits, queryID) {
|
|
|
366
392
|
});
|
|
367
393
|
});
|
|
368
394
|
}
|
|
369
|
-
function find
|
|
395
|
+
function find(array, comparator) {
|
|
370
396
|
if (!Array.isArray(array)) {
|
|
371
397
|
return undefined;
|
|
372
398
|
}
|
|
@@ -379,11 +405,11 @@ function find$2(array, comparator) {
|
|
|
379
405
|
|
|
380
406
|
return undefined;
|
|
381
407
|
}
|
|
382
|
-
function objectHasKeys
|
|
408
|
+
function objectHasKeys(object) {
|
|
383
409
|
return object && Object.keys(object).length > 0;
|
|
384
410
|
} // https://github.com/babel/babel/blob/3aaafae053fa75febb3aa45d45b6f00646e30ba4/packages/babel-helpers/src/helpers.js#L604-L620
|
|
385
411
|
|
|
386
|
-
function omit
|
|
412
|
+
function omit(source, excluded) {
|
|
387
413
|
if (source === null || source === undefined) {
|
|
388
414
|
return {};
|
|
389
415
|
}
|
|
@@ -454,9 +480,9 @@ var instantSearchContext = createContext({
|
|
|
454
480
|
var InstantSearchConsumer = instantSearchContext.Consumer,
|
|
455
481
|
InstantSearchProvider = instantSearchContext.Provider;
|
|
456
482
|
|
|
457
|
-
var _createContext
|
|
458
|
-
IndexConsumer = _createContext
|
|
459
|
-
IndexProvider = _createContext
|
|
483
|
+
var _createContext = createContext(undefined),
|
|
484
|
+
IndexConsumer = _createContext.Consumer,
|
|
485
|
+
IndexProvider = _createContext.Provider;
|
|
460
486
|
|
|
461
487
|
/**
|
|
462
488
|
* Connectors are the HOC used to transform React components
|
|
@@ -669,9 +695,9 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
669
695
|
}, {
|
|
670
696
|
key: "render",
|
|
671
697
|
value: function render() {
|
|
672
|
-
var _this$props = this.props
|
|
673
|
-
_this$props.contextValue
|
|
674
|
-
|
|
698
|
+
var _this$props = this.props,
|
|
699
|
+
contextValue = _this$props.contextValue,
|
|
700
|
+
props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
675
701
|
|
|
676
702
|
var providedProps = this.state.providedProps;
|
|
677
703
|
|
|
@@ -686,7 +712,7 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
686
712
|
var searchForFacetValuesProps = typeof connectorDesc.searchForFacetValues === 'function' ? {
|
|
687
713
|
searchForItems: this.searchForFacetValues
|
|
688
714
|
} : {};
|
|
689
|
-
return
|
|
715
|
+
return React.createElement(Composed, _extends({}, props, providedProps, refineProps, searchForFacetValuesProps));
|
|
690
716
|
}
|
|
691
717
|
}]);
|
|
692
718
|
|
|
@@ -708,9 +734,9 @@ var createConnectorWithContext = function createConnectorWithContext(connectorDe
|
|
|
708
734
|
var Connector = createConnectorWithoutContext(connectorDesc)(Composed);
|
|
709
735
|
|
|
710
736
|
var ConnectorWrapper = function ConnectorWrapper(props) {
|
|
711
|
-
return
|
|
712
|
-
return
|
|
713
|
-
return
|
|
737
|
+
return React.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
738
|
+
return React.createElement(IndexConsumer, null, function (indexContextValue) {
|
|
739
|
+
return React.createElement(Connector, _extends({
|
|
714
740
|
contextValue: contextValue,
|
|
715
741
|
indexContextValue: indexContextValue
|
|
716
742
|
}, props));
|
|
@@ -822,7 +848,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
822
848
|
});
|
|
823
849
|
}
|
|
824
850
|
|
|
825
|
-
var version
|
|
851
|
+
var version = '6.11.0';
|
|
826
852
|
|
|
827
853
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
828
854
|
return function (props, propName, componentName) {
|
|
@@ -883,7 +909,7 @@ function translatable(defaultTranslations) {
|
|
|
883
909
|
_createClass(Translatable, [{
|
|
884
910
|
key: "render",
|
|
885
911
|
value: function render() {
|
|
886
|
-
return
|
|
912
|
+
return React.createElement(Composed, _extends({
|
|
887
913
|
translate: this.translate
|
|
888
914
|
}, this.props));
|
|
889
915
|
}
|
|
@@ -1019,7 +1045,7 @@ function hasRefinements(_ref) {
|
|
|
1019
1045
|
return Object.hasOwnProperty.call(searchState, id);
|
|
1020
1046
|
}
|
|
1021
1047
|
|
|
1022
|
-
function getRefinements
|
|
1048
|
+
function getRefinements(_ref2) {
|
|
1023
1049
|
var multiIndex = _ref2.multiIndex,
|
|
1024
1050
|
indexId = _ref2.indexId,
|
|
1025
1051
|
namespace = _ref2.namespace,
|
|
@@ -1061,7 +1087,7 @@ function getCurrentRefinementValue(props, searchState, context, id, defaultValue
|
|
|
1061
1087
|
var hasRefinementsValue = hasRefinements(args);
|
|
1062
1088
|
|
|
1063
1089
|
if (hasRefinementsValue) {
|
|
1064
|
-
return getRefinements
|
|
1090
|
+
return getRefinements(args);
|
|
1065
1091
|
}
|
|
1066
1092
|
|
|
1067
1093
|
if (props.defaultRefinement) {
|
|
@@ -1102,10 +1128,10 @@ function cleanUpValueWithSingleIndex(_ref3) {
|
|
|
1102
1128
|
attribute = _ref3.attribute;
|
|
1103
1129
|
|
|
1104
1130
|
if (namespace) {
|
|
1105
|
-
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit
|
|
1131
|
+
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit(searchState[namespace], [attribute])));
|
|
1106
1132
|
}
|
|
1107
1133
|
|
|
1108
|
-
return omit
|
|
1134
|
+
return omit(searchState, [id]);
|
|
1109
1135
|
}
|
|
1110
1136
|
|
|
1111
1137
|
function cleanUpValueWithMultiIndex(_ref4) {
|
|
@@ -1118,20 +1144,20 @@ function cleanUpValueWithMultiIndex(_ref4) {
|
|
|
1118
1144
|
|
|
1119
1145
|
if (namespace && indexSearchState) {
|
|
1120
1146
|
return _objectSpread({}, searchState, {
|
|
1121
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit
|
|
1147
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit(indexSearchState[namespace], [attribute])))))
|
|
1122
1148
|
});
|
|
1123
1149
|
}
|
|
1124
1150
|
|
|
1125
1151
|
if (indexSearchState) {
|
|
1126
1152
|
return _objectSpread({}, searchState, {
|
|
1127
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit
|
|
1153
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit(indexSearchState, [id])))
|
|
1128
1154
|
});
|
|
1129
1155
|
}
|
|
1130
1156
|
|
|
1131
1157
|
return searchState;
|
|
1132
1158
|
}
|
|
1133
1159
|
|
|
1134
|
-
function getId
|
|
1160
|
+
function getId() {
|
|
1135
1161
|
return 'configure';
|
|
1136
1162
|
}
|
|
1137
1163
|
|
|
@@ -1141,20 +1167,20 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1141
1167
|
return {};
|
|
1142
1168
|
},
|
|
1143
1169
|
getSearchParameters: function getSearchParameters(searchParameters, props) {
|
|
1144
|
-
props.children
|
|
1145
|
-
props.contextValue
|
|
1146
|
-
props.indexContextValue
|
|
1147
|
-
|
|
1170
|
+
var children = props.children,
|
|
1171
|
+
contextValue = props.contextValue,
|
|
1172
|
+
indexContextValue = props.indexContextValue,
|
|
1173
|
+
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1148
1174
|
|
|
1149
1175
|
return searchParameters.setQueryParameters(items);
|
|
1150
1176
|
},
|
|
1151
1177
|
transitionState: function transitionState(props, prevSearchState, nextSearchState) {
|
|
1152
|
-
var id = getId
|
|
1178
|
+
var id = getId();
|
|
1153
1179
|
|
|
1154
|
-
props.children
|
|
1155
|
-
props.contextValue
|
|
1156
|
-
props.indexContextValue
|
|
1157
|
-
|
|
1180
|
+
var children = props.children,
|
|
1181
|
+
contextValue = props.contextValue,
|
|
1182
|
+
indexContextValue = props.indexContextValue,
|
|
1183
|
+
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1158
1184
|
|
|
1159
1185
|
var propKeys = Object.keys(props);
|
|
1160
1186
|
var nonPresentKeys = this._props ? Object.keys(this._props).filter(function (prop) {
|
|
@@ -1162,7 +1188,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1162
1188
|
}) : [];
|
|
1163
1189
|
this._props = props;
|
|
1164
1190
|
|
|
1165
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit
|
|
1191
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), items));
|
|
1166
1192
|
|
|
1167
1193
|
return refineValue(nextSearchState, nextValue, {
|
|
1168
1194
|
ais: props.contextValue,
|
|
@@ -1170,7 +1196,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1170
1196
|
});
|
|
1171
1197
|
},
|
|
1172
1198
|
cleanUp: function cleanUp(props, searchState) {
|
|
1173
|
-
var id = getId
|
|
1199
|
+
var id = getId();
|
|
1174
1200
|
var indexId = getIndexId({
|
|
1175
1201
|
ais: props.contextValue,
|
|
1176
1202
|
multiIndexContext: props.indexContextValue
|
|
@@ -1251,7 +1277,7 @@ function _arrayWithoutHoles(arr) {
|
|
|
1251
1277
|
}
|
|
1252
1278
|
|
|
1253
1279
|
function _iterableToArray(iter) {
|
|
1254
|
-
if (typeof Symbol !== "undefined" &&
|
|
1280
|
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
|
1255
1281
|
}
|
|
1256
1282
|
|
|
1257
1283
|
function _unsupportedIterableToArray(o, minLen) {
|
|
@@ -1418,13 +1444,13 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
1418
1444
|
return target;
|
|
1419
1445
|
}
|
|
1420
1446
|
|
|
1421
|
-
var omit = _objectWithoutPropertiesLoose;
|
|
1447
|
+
var omit$1 = _objectWithoutPropertiesLoose;
|
|
1422
1448
|
|
|
1423
|
-
function objectHasKeys(obj) {
|
|
1449
|
+
function objectHasKeys$1(obj) {
|
|
1424
1450
|
return obj && Object.keys(obj).length > 0;
|
|
1425
1451
|
}
|
|
1426
1452
|
|
|
1427
|
-
var objectHasKeys_1 = objectHasKeys;
|
|
1453
|
+
var objectHasKeys_1 = objectHasKeys$1;
|
|
1428
1454
|
|
|
1429
1455
|
var isValidUserToken = function isValidUserToken(userToken) {
|
|
1430
1456
|
if (userToken === null) {
|
|
@@ -1532,7 +1558,7 @@ var lib = {
|
|
|
1532
1558
|
}
|
|
1533
1559
|
return {};
|
|
1534
1560
|
} else if (typeof attribute === 'string') {
|
|
1535
|
-
return omit(refinementList, [attribute]);
|
|
1561
|
+
return omit$1(refinementList, [attribute]);
|
|
1536
1562
|
} else if (typeof attribute === 'function') {
|
|
1537
1563
|
var hasChanged = false;
|
|
1538
1564
|
|
|
@@ -1577,7 +1603,7 @@ var lib = {
|
|
|
1577
1603
|
}
|
|
1578
1604
|
};
|
|
1579
1605
|
|
|
1580
|
-
var RefinementList
|
|
1606
|
+
var RefinementList = lib;
|
|
1581
1607
|
|
|
1582
1608
|
/**
|
|
1583
1609
|
* isEqual, but only for numeric refinement values, possible values:
|
|
@@ -1946,22 +1972,22 @@ SearchParameters.prototype = {
|
|
|
1946
1972
|
clearRefinements: function clearRefinements(attribute) {
|
|
1947
1973
|
var patch = {
|
|
1948
1974
|
numericRefinements: this._clearNumericRefinements(attribute),
|
|
1949
|
-
facetsRefinements: RefinementList
|
|
1975
|
+
facetsRefinements: RefinementList.clearRefinement(
|
|
1950
1976
|
this.facetsRefinements,
|
|
1951
1977
|
attribute,
|
|
1952
1978
|
'conjunctiveFacet'
|
|
1953
1979
|
),
|
|
1954
|
-
facetsExcludes: RefinementList
|
|
1980
|
+
facetsExcludes: RefinementList.clearRefinement(
|
|
1955
1981
|
this.facetsExcludes,
|
|
1956
1982
|
attribute,
|
|
1957
1983
|
'exclude'
|
|
1958
1984
|
),
|
|
1959
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
1985
|
+
disjunctiveFacetsRefinements: RefinementList.clearRefinement(
|
|
1960
1986
|
this.disjunctiveFacetsRefinements,
|
|
1961
1987
|
attribute,
|
|
1962
1988
|
'disjunctiveFacet'
|
|
1963
1989
|
),
|
|
1964
|
-
hierarchicalFacetsRefinements: RefinementList
|
|
1990
|
+
hierarchicalFacetsRefinements: RefinementList.clearRefinement(
|
|
1965
1991
|
this.hierarchicalFacetsRefinements,
|
|
1966
1992
|
attribute,
|
|
1967
1993
|
'hierarchicalFacet'
|
|
@@ -2237,7 +2263,7 @@ SearchParameters.prototype = {
|
|
|
2237
2263
|
}
|
|
2238
2264
|
return {};
|
|
2239
2265
|
} else if (typeof attribute === 'string') {
|
|
2240
|
-
return omit(this.numericRefinements, [attribute]);
|
|
2266
|
+
return omit$1(this.numericRefinements, [attribute]);
|
|
2241
2267
|
} else if (typeof attribute === 'function') {
|
|
2242
2268
|
var hasChanged = false;
|
|
2243
2269
|
var numericRefinements = this.numericRefinements;
|
|
@@ -2329,10 +2355,10 @@ SearchParameters.prototype = {
|
|
|
2329
2355
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2330
2356
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2331
2357
|
}
|
|
2332
|
-
if (RefinementList
|
|
2358
|
+
if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2333
2359
|
|
|
2334
2360
|
return this.setQueryParameters({
|
|
2335
|
-
facetsRefinements: RefinementList
|
|
2361
|
+
facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value)
|
|
2336
2362
|
});
|
|
2337
2363
|
},
|
|
2338
2364
|
/**
|
|
@@ -2346,10 +2372,10 @@ SearchParameters.prototype = {
|
|
|
2346
2372
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2347
2373
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2348
2374
|
}
|
|
2349
|
-
if (RefinementList
|
|
2375
|
+
if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2350
2376
|
|
|
2351
2377
|
return this.setQueryParameters({
|
|
2352
|
-
facetsExcludes: RefinementList
|
|
2378
|
+
facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value)
|
|
2353
2379
|
});
|
|
2354
2380
|
},
|
|
2355
2381
|
/**
|
|
@@ -2365,10 +2391,10 @@ SearchParameters.prototype = {
|
|
|
2365
2391
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2366
2392
|
}
|
|
2367
2393
|
|
|
2368
|
-
if (RefinementList
|
|
2394
|
+
if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2369
2395
|
|
|
2370
2396
|
return this.setQueryParameters({
|
|
2371
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2397
|
+
disjunctiveFacetsRefinements: RefinementList.addRefinement(
|
|
2372
2398
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2373
2399
|
});
|
|
2374
2400
|
},
|
|
@@ -2453,10 +2479,10 @@ SearchParameters.prototype = {
|
|
|
2453
2479
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2454
2480
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2455
2481
|
}
|
|
2456
|
-
if (!RefinementList
|
|
2482
|
+
if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2457
2483
|
|
|
2458
2484
|
return this.setQueryParameters({
|
|
2459
|
-
facetsRefinements: RefinementList
|
|
2485
|
+
facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value)
|
|
2460
2486
|
});
|
|
2461
2487
|
},
|
|
2462
2488
|
/**
|
|
@@ -2470,10 +2496,10 @@ SearchParameters.prototype = {
|
|
|
2470
2496
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2471
2497
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2472
2498
|
}
|
|
2473
|
-
if (!RefinementList
|
|
2499
|
+
if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2474
2500
|
|
|
2475
2501
|
return this.setQueryParameters({
|
|
2476
|
-
facetsExcludes: RefinementList
|
|
2502
|
+
facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value)
|
|
2477
2503
|
});
|
|
2478
2504
|
},
|
|
2479
2505
|
/**
|
|
@@ -2488,10 +2514,10 @@ SearchParameters.prototype = {
|
|
|
2488
2514
|
throw new Error(
|
|
2489
2515
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2490
2516
|
}
|
|
2491
|
-
if (!RefinementList
|
|
2517
|
+
if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2492
2518
|
|
|
2493
2519
|
return this.setQueryParameters({
|
|
2494
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2520
|
+
disjunctiveFacetsRefinements: RefinementList.removeRefinement(
|
|
2495
2521
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2496
2522
|
});
|
|
2497
2523
|
},
|
|
@@ -2557,7 +2583,7 @@ SearchParameters.prototype = {
|
|
|
2557
2583
|
}
|
|
2558
2584
|
|
|
2559
2585
|
return this.setQueryParameters({
|
|
2560
|
-
facetsRefinements: RefinementList
|
|
2586
|
+
facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2561
2587
|
});
|
|
2562
2588
|
},
|
|
2563
2589
|
/**
|
|
@@ -2573,7 +2599,7 @@ SearchParameters.prototype = {
|
|
|
2573
2599
|
}
|
|
2574
2600
|
|
|
2575
2601
|
return this.setQueryParameters({
|
|
2576
|
-
facetsExcludes: RefinementList
|
|
2602
|
+
facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2577
2603
|
});
|
|
2578
2604
|
},
|
|
2579
2605
|
/**
|
|
@@ -2590,7 +2616,7 @@ SearchParameters.prototype = {
|
|
|
2590
2616
|
}
|
|
2591
2617
|
|
|
2592
2618
|
return this.setQueryParameters({
|
|
2593
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2619
|
+
disjunctiveFacetsRefinements: RefinementList.toggleRefinement(
|
|
2594
2620
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2595
2621
|
});
|
|
2596
2622
|
},
|
|
@@ -2729,7 +2755,7 @@ SearchParameters.prototype = {
|
|
|
2729
2755
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2730
2756
|
return false;
|
|
2731
2757
|
}
|
|
2732
|
-
return RefinementList
|
|
2758
|
+
return RefinementList.isRefined(this.facetsRefinements, facet, value);
|
|
2733
2759
|
},
|
|
2734
2760
|
/**
|
|
2735
2761
|
* Returns true if the facet contains exclusions or if a specific value is
|
|
@@ -2745,7 +2771,7 @@ SearchParameters.prototype = {
|
|
|
2745
2771
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2746
2772
|
return false;
|
|
2747
2773
|
}
|
|
2748
|
-
return RefinementList
|
|
2774
|
+
return RefinementList.isRefined(this.facetsExcludes, facet, value);
|
|
2749
2775
|
},
|
|
2750
2776
|
/**
|
|
2751
2777
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2760,7 +2786,7 @@ SearchParameters.prototype = {
|
|
|
2760
2786
|
if (!this.isDisjunctiveFacet(facet)) {
|
|
2761
2787
|
return false;
|
|
2762
2788
|
}
|
|
2763
|
-
return RefinementList
|
|
2789
|
+
return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2764
2790
|
},
|
|
2765
2791
|
/**
|
|
2766
2792
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2946,7 +2972,7 @@ SearchParameters.prototype = {
|
|
|
2946
2972
|
var isNextValueDefined = nextWithNumbers[key] !== undefined;
|
|
2947
2973
|
|
|
2948
2974
|
if (isPreviousValueDefined && !isNextValueDefined) {
|
|
2949
|
-
return omit(previous, [key]);
|
|
2975
|
+
return omit$1(previous, [key]);
|
|
2950
2976
|
}
|
|
2951
2977
|
|
|
2952
2978
|
if (isNextValueDefined) {
|
|
@@ -4679,7 +4705,7 @@ var requestBuilder = {
|
|
|
4679
4705
|
|
|
4680
4706
|
var requestBuilder_1 = requestBuilder;
|
|
4681
4707
|
|
|
4682
|
-
var version = '3.4.4';
|
|
4708
|
+
var version$1 = '3.4.4';
|
|
4683
4709
|
|
|
4684
4710
|
/**
|
|
4685
4711
|
* Event triggered when a parameter is set or updated
|
|
@@ -4786,7 +4812,7 @@ var version = '3.4.4';
|
|
|
4786
4812
|
*/
|
|
4787
4813
|
function AlgoliaSearchHelper(client, index, options) {
|
|
4788
4814
|
if (typeof client.addAlgoliaAgent === 'function') {
|
|
4789
|
-
client.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
4815
|
+
client.addAlgoliaAgent('JS Helper (' + version$1 + ')');
|
|
4790
4816
|
}
|
|
4791
4817
|
|
|
4792
4818
|
this.setClient(client);
|
|
@@ -4941,7 +4967,7 @@ AlgoliaSearchHelper.prototype.findAnswers = function(options) {
|
|
|
4941
4967
|
nbHits: options.nbHits
|
|
4942
4968
|
},
|
|
4943
4969
|
{
|
|
4944
|
-
params: omit(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
4970
|
+
params: omit$1(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
4945
4971
|
'attributesToSnippet',
|
|
4946
4972
|
'hitsPerPage',
|
|
4947
4973
|
'restrictSearchableAttributes',
|
|
@@ -6055,7 +6081,7 @@ AlgoliaSearchHelper.prototype.setClient = function(newClient) {
|
|
|
6055
6081
|
if (this.client === newClient) return this;
|
|
6056
6082
|
|
|
6057
6083
|
if (typeof newClient.addAlgoliaAgent === 'function') {
|
|
6058
|
-
newClient.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
6084
|
+
newClient.addAlgoliaAgent('JS Helper (' + version$1 + ')');
|
|
6059
6085
|
}
|
|
6060
6086
|
this.client = newClient;
|
|
6061
6087
|
|
|
@@ -6174,7 +6200,7 @@ function algoliasearchHelper(client, index, opts) {
|
|
|
6174
6200
|
* @member module:algoliasearchHelper.version
|
|
6175
6201
|
* @type {number}
|
|
6176
6202
|
*/
|
|
6177
|
-
algoliasearchHelper.version = version;
|
|
6203
|
+
algoliasearchHelper.version = version$1;
|
|
6178
6204
|
|
|
6179
6205
|
/**
|
|
6180
6206
|
* Constructor for the Helper.
|
|
@@ -6206,13 +6232,13 @@ function createOptionalFilter(_ref) {
|
|
|
6206
6232
|
return "".concat(attributeName, ":").concat(attributeValue, "<score=").concat(attributeScore || 1, ">");
|
|
6207
6233
|
}
|
|
6208
6234
|
|
|
6209
|
-
var defaultProps
|
|
6235
|
+
var defaultProps = {
|
|
6210
6236
|
transformSearchParameters: function transformSearchParameters(x) {
|
|
6211
6237
|
return _objectSpread({}, x);
|
|
6212
6238
|
}
|
|
6213
6239
|
};
|
|
6214
6240
|
|
|
6215
|
-
function getId$
|
|
6241
|
+
function getId$1() {
|
|
6216
6242
|
// We store the search state of this widget in `configure`.
|
|
6217
6243
|
return 'configure';
|
|
6218
6244
|
}
|
|
@@ -6260,7 +6286,7 @@ function getSearchParametersFromProps(props) {
|
|
|
6260
6286
|
|
|
6261
6287
|
var connectConfigureRelatedItems = createConnectorWithContext({
|
|
6262
6288
|
displayName: 'AlgoliaConfigureRelatedItems',
|
|
6263
|
-
defaultProps: defaultProps
|
|
6289
|
+
defaultProps: defaultProps,
|
|
6264
6290
|
getProvidedProps: function getProvidedProps() {
|
|
6265
6291
|
return {};
|
|
6266
6292
|
},
|
|
@@ -6268,7 +6294,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6268
6294
|
return searchParameters.setQueryParameters(getSearchParametersFromProps(props));
|
|
6269
6295
|
},
|
|
6270
6296
|
transitionState: function transitionState(props, _prevSearchState, nextSearchState) {
|
|
6271
|
-
var id = getId$
|
|
6297
|
+
var id = getId$1(); // We need to transform the exhaustive search parameters back to clean
|
|
6272
6298
|
// search parameters without the empty default keys so we don't pollute the
|
|
6273
6299
|
// `configure` search state.
|
|
6274
6300
|
|
|
@@ -6279,7 +6305,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6279
6305
|
}) : [];
|
|
6280
6306
|
this._searchParameters = searchParameters;
|
|
6281
6307
|
|
|
6282
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit
|
|
6308
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6283
6309
|
|
|
6284
6310
|
return refineValue(nextSearchState, nextValue, {
|
|
6285
6311
|
ais: props.contextValue,
|
|
@@ -6289,7 +6315,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6289
6315
|
cleanUp: function cleanUp(props, searchState) {
|
|
6290
6316
|
var _this = this;
|
|
6291
6317
|
|
|
6292
|
-
var id = getId$
|
|
6318
|
+
var id = getId$1();
|
|
6293
6319
|
var indexId = getIndexId({
|
|
6294
6320
|
ais: props.contextValue,
|
|
6295
6321
|
multiIndexContext: props.indexContextValue
|
|
@@ -6362,7 +6388,7 @@ function getWidgetRefinements(attribute, widgetKey, searchState) {
|
|
|
6362
6388
|
}
|
|
6363
6389
|
}
|
|
6364
6390
|
|
|
6365
|
-
function getRefinements(attribute) {
|
|
6391
|
+
function getRefinements$1(attribute) {
|
|
6366
6392
|
var searchState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6367
6393
|
var refinements = Object.keys(searchState).filter(function (widgetKey) {
|
|
6368
6394
|
return searchState[widgetKey] !== undefined && searchState[widgetKey][attribute] !== undefined;
|
|
@@ -6379,7 +6405,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6379
6405
|
var searchState = _ref.searchState,
|
|
6380
6406
|
trackedFilters = _ref.trackedFilters;
|
|
6381
6407
|
var ruleContexts = Object.keys(trackedFilters).reduce(function (facets, facetName) {
|
|
6382
|
-
var facetRefinements = getRefinements(facetName, searchState);
|
|
6408
|
+
var facetRefinements = getRefinements$1(facetName, searchState);
|
|
6383
6409
|
var getTrackedFacetValues = trackedFilters[facetName];
|
|
6384
6410
|
var trackedFacetValues = getTrackedFacetValues(facetRefinements);
|
|
6385
6411
|
return [].concat(_toConsumableArray(facets), _toConsumableArray(facetRefinements.filter(function (facetRefinement) {
|
|
@@ -6391,7 +6417,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6391
6417
|
return ruleContexts;
|
|
6392
6418
|
}
|
|
6393
6419
|
|
|
6394
|
-
var defaultProps = {
|
|
6420
|
+
var defaultProps$1 = {
|
|
6395
6421
|
transformItems: function transformItems(items) {
|
|
6396
6422
|
return items;
|
|
6397
6423
|
},
|
|
@@ -6402,7 +6428,7 @@ var defaultProps = {
|
|
|
6402
6428
|
};
|
|
6403
6429
|
var connectQueryRules = createConnectorWithContext({
|
|
6404
6430
|
displayName: 'AlgoliaQueryRules',
|
|
6405
|
-
defaultProps: defaultProps,
|
|
6431
|
+
defaultProps: defaultProps$1,
|
|
6406
6432
|
getProvidedProps: function getProvidedProps(props, _1, searchResults) {
|
|
6407
6433
|
var results = getResults(searchResults, {
|
|
6408
6434
|
ais: props.contextValue,
|
|
@@ -6564,7 +6590,7 @@ function (_Component) {
|
|
|
6564
6590
|
return null;
|
|
6565
6591
|
}
|
|
6566
6592
|
|
|
6567
|
-
return
|
|
6593
|
+
return React.createElement(IndexProvider, {
|
|
6568
6594
|
value: this.state.indexContext
|
|
6569
6595
|
}, this.props.children);
|
|
6570
6596
|
}
|
|
@@ -6579,10 +6605,20 @@ _defineProperty(Index, "propTypes", {
|
|
|
6579
6605
|
children: PropTypes.node
|
|
6580
6606
|
});
|
|
6581
6607
|
|
|
6582
|
-
({
|
|
6608
|
+
var IndexWrapper = function IndexWrapper(props) {
|
|
6609
|
+
var inferredIndexId = props.indexName;
|
|
6610
|
+
return React.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
6611
|
+
return React.createElement(Index, _extends({
|
|
6612
|
+
contextValue: contextValue,
|
|
6613
|
+
indexId: inferredIndexId
|
|
6614
|
+
}, props));
|
|
6615
|
+
});
|
|
6616
|
+
};
|
|
6617
|
+
|
|
6618
|
+
IndexWrapper.propTypes = {
|
|
6583
6619
|
indexName: PropTypes.string.isRequired,
|
|
6584
6620
|
indexId: PropTypes.string
|
|
6585
|
-
}
|
|
6621
|
+
};
|
|
6586
6622
|
|
|
6587
6623
|
function createWidgetsManager(onWidgetsUpdate) {
|
|
6588
6624
|
var widgets = []; // Is an update scheduled?
|
|
@@ -6643,7 +6679,7 @@ function createStore(initialState) {
|
|
|
6643
6679
|
function addAlgoliaAgents(searchClient) {
|
|
6644
6680
|
if (typeof searchClient.addAlgoliaAgent === 'function') {
|
|
6645
6681
|
searchClient.addAlgoliaAgent("react (".concat(version$2, ")"));
|
|
6646
|
-
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version
|
|
6682
|
+
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version, ")"));
|
|
6647
6683
|
}
|
|
6648
6684
|
}
|
|
6649
6685
|
|
|
@@ -6881,8 +6917,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6881
6917
|
nextIsSearchStalled = false;
|
|
6882
6918
|
}
|
|
6883
6919
|
|
|
6884
|
-
currentState.resultsFacetValues
|
|
6885
|
-
|
|
6920
|
+
var resultsFacetValues = currentState.resultsFacetValues,
|
|
6921
|
+
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6886
6922
|
|
|
6887
6923
|
store.setState(_objectSpread({}, partialState, {
|
|
6888
6924
|
results: results,
|
|
@@ -6903,8 +6939,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6903
6939
|
nextIsSearchStalled = false;
|
|
6904
6940
|
}
|
|
6905
6941
|
|
|
6906
|
-
currentState.resultsFacetValues
|
|
6907
|
-
|
|
6942
|
+
var resultsFacetValues = currentState.resultsFacetValues,
|
|
6943
|
+
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6908
6944
|
|
|
6909
6945
|
store.setState(_objectSpread({}, partialState, {
|
|
6910
6946
|
isSearchStalled: nextIsSearchStalled,
|
|
@@ -6916,9 +6952,9 @@ function createInstantSearchManager(_ref) {
|
|
|
6916
6952
|
function handleNewSearch() {
|
|
6917
6953
|
if (!stalledSearchTimer) {
|
|
6918
6954
|
stalledSearchTimer = setTimeout(function () {
|
|
6919
|
-
var _store$getState = store.getState()
|
|
6920
|
-
_store$getState.resultsFacetValues
|
|
6921
|
-
|
|
6955
|
+
var _store$getState = store.getState(),
|
|
6956
|
+
resultsFacetValues = _store$getState.resultsFacetValues,
|
|
6957
|
+
partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
6922
6958
|
|
|
6923
6959
|
store.setState(_objectSpread({}, partialState, {
|
|
6924
6960
|
isSearchStalled: true
|
|
@@ -7383,7 +7419,7 @@ function (_Component) {
|
|
|
7383
7419
|
return null;
|
|
7384
7420
|
}
|
|
7385
7421
|
|
|
7386
|
-
return
|
|
7422
|
+
return React.createElement(InstantSearchProvider, {
|
|
7387
7423
|
value: this.state.contextValue
|
|
7388
7424
|
}, this.props.children);
|
|
7389
7425
|
}
|
|
@@ -7417,21 +7453,21 @@ _defineProperty(InstantSearch, "propTypes", {
|
|
|
7417
7453
|
stalledSearchDelay: PropTypes.number
|
|
7418
7454
|
});
|
|
7419
7455
|
|
|
7420
|
-
var getId$
|
|
7456
|
+
var getId$2 = function getId(props) {
|
|
7421
7457
|
return props.attributes[0];
|
|
7422
7458
|
};
|
|
7423
|
-
var namespace
|
|
7459
|
+
var namespace = 'hierarchicalMenu';
|
|
7424
7460
|
|
|
7425
|
-
function _refine
|
|
7426
|
-
var id = getId$
|
|
7461
|
+
function _refine(props, searchState, nextRefinement, context) {
|
|
7462
|
+
var id = getId$2(props);
|
|
7427
7463
|
|
|
7428
7464
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7429
7465
|
|
|
7430
7466
|
var resetPage = true;
|
|
7431
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace
|
|
7467
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
7432
7468
|
}
|
|
7433
7469
|
|
|
7434
|
-
function transformValue
|
|
7470
|
+
function transformValue(values) {
|
|
7435
7471
|
return values.reduce(function (acc, item) {
|
|
7436
7472
|
if (item.isRefined) {
|
|
7437
7473
|
acc.push({
|
|
@@ -7442,7 +7478,7 @@ function transformValue$1(values) {
|
|
|
7442
7478
|
}); // Create a variable in order to keep the same acc for the recursion, otherwise "reduce" returns a new one
|
|
7443
7479
|
|
|
7444
7480
|
if (item.data) {
|
|
7445
|
-
acc = acc.concat(transformValue
|
|
7481
|
+
acc = acc.concat(transformValue(item.data));
|
|
7446
7482
|
}
|
|
7447
7483
|
}
|
|
7448
7484
|
|
|
@@ -7504,7 +7540,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7504
7540
|
transformItems: PropTypes.func
|
|
7505
7541
|
},
|
|
7506
7542
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
7507
|
-
var id = getId$
|
|
7543
|
+
var id = getId$2(props);
|
|
7508
7544
|
var results = getResults(searchResults, {
|
|
7509
7545
|
ais: props.contextValue,
|
|
7510
7546
|
multiIndexContext: props.indexContextValue
|
|
@@ -7519,7 +7555,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7519
7555
|
}
|
|
7520
7556
|
|
|
7521
7557
|
var values = results.getFacetValues(id);
|
|
7522
|
-
var items = values.data ? transformValue
|
|
7558
|
+
var items = values.data ? transformValue(values.data) : [];
|
|
7523
7559
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7524
7560
|
return {
|
|
7525
7561
|
canRefine: transformedItems.length > 0,
|
|
@@ -7527,7 +7563,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7527
7563
|
};
|
|
7528
7564
|
},
|
|
7529
7565
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7530
|
-
return _refine
|
|
7566
|
+
return _refine(props, searchState, nextRefinement, {
|
|
7531
7567
|
ais: props.contextValue,
|
|
7532
7568
|
multiIndexContext: props.indexContextValue
|
|
7533
7569
|
});
|
|
@@ -7590,13 +7626,13 @@ var connectCurrentRefinements = createConnectorWithContext({
|
|
|
7590
7626
|
}
|
|
7591
7627
|
});
|
|
7592
7628
|
|
|
7593
|
-
var getId$
|
|
7629
|
+
var getId$3 = function getId(props) {
|
|
7594
7630
|
return props.attributes[0];
|
|
7595
7631
|
};
|
|
7596
|
-
var namespace$
|
|
7632
|
+
var namespace$1 = 'hierarchicalMenu';
|
|
7597
7633
|
|
|
7598
|
-
function getCurrentRefinement
|
|
7599
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
7634
|
+
function getCurrentRefinement(props, searchState, context) {
|
|
7635
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$1, ".").concat(getId$3(props)), null);
|
|
7600
7636
|
|
|
7601
7637
|
if (currentRefinement === '') {
|
|
7602
7638
|
return null;
|
|
@@ -7605,13 +7641,13 @@ function getCurrentRefinement$b(props, searchState, context) {
|
|
|
7605
7641
|
return currentRefinement;
|
|
7606
7642
|
}
|
|
7607
7643
|
|
|
7608
|
-
function getValue
|
|
7644
|
+
function getValue(path, props, searchState, context) {
|
|
7609
7645
|
var id = props.id,
|
|
7610
7646
|
attributes = props.attributes,
|
|
7611
7647
|
separator = props.separator,
|
|
7612
7648
|
rootPath = props.rootPath,
|
|
7613
7649
|
showParentLevel = props.showParentLevel;
|
|
7614
|
-
var currentRefinement = getCurrentRefinement
|
|
7650
|
+
var currentRefinement = getCurrentRefinement(props, searchState, context);
|
|
7615
7651
|
var nextRefinement;
|
|
7616
7652
|
|
|
7617
7653
|
if (currentRefinement === null) {
|
|
@@ -7632,14 +7668,14 @@ function getValue$2(path, props, searchState, context) {
|
|
|
7632
7668
|
return nextRefinement;
|
|
7633
7669
|
}
|
|
7634
7670
|
|
|
7635
|
-
function transformValue(value, props, searchState, context) {
|
|
7671
|
+
function transformValue$1(value, props, searchState, context) {
|
|
7636
7672
|
return value.map(function (v) {
|
|
7637
7673
|
return {
|
|
7638
7674
|
label: v.name,
|
|
7639
|
-
value: getValue
|
|
7675
|
+
value: getValue(v.path, props, searchState, context),
|
|
7640
7676
|
count: v.count,
|
|
7641
7677
|
isRefined: v.isRefined,
|
|
7642
|
-
items: v.data && transformValue(v.data, props, searchState, context)
|
|
7678
|
+
items: v.data && transformValue$1(v.data, props, searchState, context)
|
|
7643
7679
|
};
|
|
7644
7680
|
});
|
|
7645
7681
|
}
|
|
@@ -7655,20 +7691,20 @@ var truncate = function truncate() {
|
|
|
7655
7691
|
});
|
|
7656
7692
|
};
|
|
7657
7693
|
|
|
7658
|
-
function _refine$
|
|
7659
|
-
var id = getId$
|
|
7694
|
+
function _refine$1(props, searchState, nextRefinement, context) {
|
|
7695
|
+
var id = getId$3(props);
|
|
7660
7696
|
|
|
7661
7697
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7662
7698
|
|
|
7663
7699
|
var resetPage = true;
|
|
7664
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
7700
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$1);
|
|
7665
7701
|
}
|
|
7666
7702
|
|
|
7667
|
-
function _cleanUp
|
|
7668
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
7703
|
+
function _cleanUp(props, searchState, context) {
|
|
7704
|
+
return cleanUpValue(searchState, context, "".concat(namespace$1, ".").concat(getId$3(props)));
|
|
7669
7705
|
}
|
|
7670
7706
|
|
|
7671
|
-
var sortBy
|
|
7707
|
+
var sortBy = ['name:asc'];
|
|
7672
7708
|
/**
|
|
7673
7709
|
* connectHierarchicalMenu connector provides the logic to build a widget that will
|
|
7674
7710
|
* give the user the ability to explore a tree-like structure.
|
|
@@ -7750,7 +7786,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7750
7786
|
var showMore = props.showMore,
|
|
7751
7787
|
limit = props.limit,
|
|
7752
7788
|
showMoreLimit = props.showMoreLimit;
|
|
7753
|
-
var id = getId$
|
|
7789
|
+
var id = getId$3(props);
|
|
7754
7790
|
var results = getResults(searchResults, {
|
|
7755
7791
|
ais: props.contextValue,
|
|
7756
7792
|
multiIndexContext: props.indexContextValue
|
|
@@ -7760,7 +7796,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7760
7796
|
if (!isFacetPresent) {
|
|
7761
7797
|
return {
|
|
7762
7798
|
items: [],
|
|
7763
|
-
currentRefinement: getCurrentRefinement
|
|
7799
|
+
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7764
7800
|
ais: props.contextValue,
|
|
7765
7801
|
multiIndexContext: props.indexContextValue
|
|
7766
7802
|
}),
|
|
@@ -7770,16 +7806,16 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7770
7806
|
|
|
7771
7807
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7772
7808
|
var value = results.getFacetValues(id, {
|
|
7773
|
-
sortBy: sortBy
|
|
7809
|
+
sortBy: sortBy
|
|
7774
7810
|
});
|
|
7775
|
-
var items = value.data ? transformValue(value.data, props, searchState, {
|
|
7811
|
+
var items = value.data ? transformValue$1(value.data, props, searchState, {
|
|
7776
7812
|
ais: props.contextValue,
|
|
7777
7813
|
multiIndexContext: props.indexContextValue
|
|
7778
7814
|
}) : [];
|
|
7779
7815
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7780
7816
|
return {
|
|
7781
7817
|
items: truncate(transformedItems, itemsLimit),
|
|
7782
|
-
currentRefinement: getCurrentRefinement
|
|
7818
|
+
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7783
7819
|
ais: props.contextValue,
|
|
7784
7820
|
multiIndexContext: props.indexContextValue
|
|
7785
7821
|
}),
|
|
@@ -7787,13 +7823,13 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7787
7823
|
};
|
|
7788
7824
|
},
|
|
7789
7825
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7790
|
-
return _refine$
|
|
7826
|
+
return _refine$1(props, searchState, nextRefinement, {
|
|
7791
7827
|
ais: props.contextValue,
|
|
7792
7828
|
multiIndexContext: props.indexContextValue
|
|
7793
7829
|
});
|
|
7794
7830
|
},
|
|
7795
7831
|
cleanUp: function cleanUp(props, searchState) {
|
|
7796
|
-
return _cleanUp
|
|
7832
|
+
return _cleanUp(props, searchState, {
|
|
7797
7833
|
ais: props.contextValue,
|
|
7798
7834
|
multiIndexContext: props.indexContextValue
|
|
7799
7835
|
});
|
|
@@ -7807,7 +7843,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7807
7843
|
limit = props.limit,
|
|
7808
7844
|
showMoreLimit = props.showMoreLimit,
|
|
7809
7845
|
contextValue = props.contextValue;
|
|
7810
|
-
var id = getId$
|
|
7846
|
+
var id = getId$3(props);
|
|
7811
7847
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7812
7848
|
searchParameters = searchParameters.addHierarchicalFacet({
|
|
7813
7849
|
name: id,
|
|
@@ -7818,7 +7854,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7818
7854
|
}).setQueryParameters({
|
|
7819
7855
|
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, itemsLimit)
|
|
7820
7856
|
});
|
|
7821
|
-
var currentRefinement = getCurrentRefinement
|
|
7857
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7822
7858
|
ais: contextValue,
|
|
7823
7859
|
multiIndexContext: props.indexContextValue
|
|
7824
7860
|
});
|
|
@@ -7831,8 +7867,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7831
7867
|
},
|
|
7832
7868
|
getMetadata: function getMetadata(props, searchState) {
|
|
7833
7869
|
var rootAttribute = props.attributes[0];
|
|
7834
|
-
var id = getId$
|
|
7835
|
-
var currentRefinement = getCurrentRefinement
|
|
7870
|
+
var id = getId$3(props);
|
|
7871
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7836
7872
|
ais: props.contextValue,
|
|
7837
7873
|
multiIndexContext: props.indexContextValue
|
|
7838
7874
|
});
|
|
@@ -7840,7 +7876,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7840
7876
|
label: "".concat(rootAttribute, ": ").concat(currentRefinement),
|
|
7841
7877
|
attribute: rootAttribute,
|
|
7842
7878
|
value: function value(nextState) {
|
|
7843
|
-
return _refine$
|
|
7879
|
+
return _refine$1(props, nextState, '', {
|
|
7844
7880
|
ais: props.contextValue,
|
|
7845
7881
|
multiIndexContext: props.indexContextValue
|
|
7846
7882
|
});
|
|
@@ -8017,12 +8053,12 @@ var connectHits = createConnectorWithContext({
|
|
|
8017
8053
|
}
|
|
8018
8054
|
});
|
|
8019
8055
|
|
|
8020
|
-
function getId$
|
|
8056
|
+
function getId$4() {
|
|
8021
8057
|
return 'hitsPerPage';
|
|
8022
8058
|
}
|
|
8023
8059
|
|
|
8024
|
-
function getCurrentRefinement$
|
|
8025
|
-
var id = getId$
|
|
8060
|
+
function getCurrentRefinement$1(props, searchState, context) {
|
|
8061
|
+
var id = getId$4();
|
|
8026
8062
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
8027
8063
|
|
|
8028
8064
|
if (typeof currentRefinement === 'string') {
|
|
@@ -8057,7 +8093,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8057
8093
|
transformItems: PropTypes.func
|
|
8058
8094
|
},
|
|
8059
8095
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
8060
|
-
var currentRefinement = getCurrentRefinement$
|
|
8096
|
+
var currentRefinement = getCurrentRefinement$1(props, searchState, {
|
|
8061
8097
|
ais: props.contextValue,
|
|
8062
8098
|
multiIndexContext: props.indexContextValue
|
|
8063
8099
|
});
|
|
@@ -8074,7 +8110,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8074
8110
|
};
|
|
8075
8111
|
},
|
|
8076
8112
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8077
|
-
var id = getId$
|
|
8113
|
+
var id = getId$4();
|
|
8078
8114
|
|
|
8079
8115
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
8080
8116
|
|
|
@@ -8088,27 +8124,27 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8088
8124
|
return cleanUpValue(searchState, {
|
|
8089
8125
|
ais: props.contextValue,
|
|
8090
8126
|
multiIndexContext: props.indexContextValue
|
|
8091
|
-
}, getId$
|
|
8127
|
+
}, getId$4());
|
|
8092
8128
|
},
|
|
8093
8129
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8094
|
-
return searchParameters.setHitsPerPage(getCurrentRefinement$
|
|
8130
|
+
return searchParameters.setHitsPerPage(getCurrentRefinement$1(props, searchState, {
|
|
8095
8131
|
ais: props.contextValue,
|
|
8096
8132
|
multiIndexContext: props.indexContextValue
|
|
8097
8133
|
}));
|
|
8098
8134
|
},
|
|
8099
8135
|
getMetadata: function getMetadata() {
|
|
8100
8136
|
return {
|
|
8101
|
-
id: getId$
|
|
8137
|
+
id: getId$4()
|
|
8102
8138
|
};
|
|
8103
8139
|
}
|
|
8104
8140
|
});
|
|
8105
8141
|
|
|
8106
|
-
function getId$
|
|
8142
|
+
function getId$5() {
|
|
8107
8143
|
return 'page';
|
|
8108
8144
|
}
|
|
8109
8145
|
|
|
8110
|
-
function getCurrentRefinement$
|
|
8111
|
-
var id = getId$
|
|
8146
|
+
function getCurrentRefinement$2(props, searchState, context) {
|
|
8147
|
+
var id = getId$5();
|
|
8112
8148
|
var page = 1;
|
|
8113
8149
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8114
8150
|
|
|
@@ -8120,9 +8156,9 @@ function getCurrentRefinement$9(props, searchState, context) {
|
|
|
8120
8156
|
}
|
|
8121
8157
|
|
|
8122
8158
|
function getStateWithoutPage(state) {
|
|
8123
|
-
var _ref = state || {}
|
|
8124
|
-
_ref.page
|
|
8125
|
-
|
|
8159
|
+
var _ref = state || {},
|
|
8160
|
+
page = _ref.page,
|
|
8161
|
+
rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8126
8162
|
|
|
8127
8163
|
return rest;
|
|
8128
8164
|
}
|
|
@@ -8231,14 +8267,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8231
8267
|
},
|
|
8232
8268
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8233
8269
|
return searchParameters.setQueryParameters({
|
|
8234
|
-
page: getCurrentRefinement$
|
|
8270
|
+
page: getCurrentRefinement$2(props, searchState, {
|
|
8235
8271
|
ais: props.contextValue,
|
|
8236
8272
|
multiIndexContext: props.indexContextValue
|
|
8237
8273
|
}) - 1
|
|
8238
8274
|
});
|
|
8239
8275
|
},
|
|
8240
8276
|
refine: function refine(props, searchState, event, index) {
|
|
8241
|
-
var id = getId$
|
|
8277
|
+
var id = getId$5();
|
|
8242
8278
|
|
|
8243
8279
|
var nextValue = _defineProperty({}, id, index + 1);
|
|
8244
8280
|
|
|
@@ -8250,14 +8286,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8250
8286
|
}
|
|
8251
8287
|
});
|
|
8252
8288
|
|
|
8253
|
-
var namespace$
|
|
8289
|
+
var namespace$2 = 'menu';
|
|
8254
8290
|
|
|
8255
|
-
function getId$
|
|
8291
|
+
function getId$6(props) {
|
|
8256
8292
|
return props.attribute;
|
|
8257
8293
|
}
|
|
8258
8294
|
|
|
8259
|
-
function getCurrentRefinement$
|
|
8260
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8295
|
+
function getCurrentRefinement$3(props, searchState, context) {
|
|
8296
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)), null);
|
|
8261
8297
|
|
|
8262
8298
|
if (currentRefinement === '') {
|
|
8263
8299
|
return null;
|
|
@@ -8267,28 +8303,28 @@ function getCurrentRefinement$8(props, searchState, context) {
|
|
|
8267
8303
|
}
|
|
8268
8304
|
|
|
8269
8305
|
function getValue$1(name, props, searchState, context) {
|
|
8270
|
-
var currentRefinement = getCurrentRefinement$
|
|
8306
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, context);
|
|
8271
8307
|
return name === currentRefinement ? '' : name;
|
|
8272
8308
|
}
|
|
8273
8309
|
|
|
8274
|
-
function getLimit
|
|
8310
|
+
function getLimit(_ref) {
|
|
8275
8311
|
var showMore = _ref.showMore,
|
|
8276
8312
|
limit = _ref.limit,
|
|
8277
8313
|
showMoreLimit = _ref.showMoreLimit;
|
|
8278
8314
|
return showMore ? showMoreLimit : limit;
|
|
8279
8315
|
}
|
|
8280
8316
|
|
|
8281
|
-
function _refine$
|
|
8282
|
-
var id = getId$
|
|
8317
|
+
function _refine$2(props, searchState, nextRefinement, context) {
|
|
8318
|
+
var id = getId$6(props);
|
|
8283
8319
|
|
|
8284
8320
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : '');
|
|
8285
8321
|
|
|
8286
8322
|
var resetPage = true;
|
|
8287
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
8323
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$2);
|
|
8288
8324
|
}
|
|
8289
8325
|
|
|
8290
|
-
function _cleanUp$
|
|
8291
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
8326
|
+
function _cleanUp$1(props, searchState, context) {
|
|
8327
|
+
return cleanUpValue(searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)));
|
|
8292
8328
|
}
|
|
8293
8329
|
|
|
8294
8330
|
var defaultSortBy = ['count:desc', 'name:asc'];
|
|
@@ -8347,7 +8383,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8347
8383
|
if (!canRefine) {
|
|
8348
8384
|
return {
|
|
8349
8385
|
items: [],
|
|
8350
|
-
currentRefinement: getCurrentRefinement$
|
|
8386
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
8351
8387
|
ais: props.contextValue,
|
|
8352
8388
|
multiIndexContext: props.indexContextValue
|
|
8353
8389
|
}),
|
|
@@ -8394,8 +8430,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8394
8430
|
|
|
8395
8431
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
8396
8432
|
return {
|
|
8397
|
-
items: transformedItems.slice(0, getLimit
|
|
8398
|
-
currentRefinement: getCurrentRefinement$
|
|
8433
|
+
items: transformedItems.slice(0, getLimit(props)),
|
|
8434
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
8399
8435
|
ais: props.contextValue,
|
|
8400
8436
|
multiIndexContext: props.indexContextValue
|
|
8401
8437
|
}),
|
|
@@ -8405,7 +8441,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8405
8441
|
};
|
|
8406
8442
|
},
|
|
8407
8443
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8408
|
-
return _refine$
|
|
8444
|
+
return _refine$2(props, searchState, nextRefinement, {
|
|
8409
8445
|
ais: props.contextValue,
|
|
8410
8446
|
multiIndexContext: props.indexContextValue
|
|
8411
8447
|
});
|
|
@@ -8414,11 +8450,11 @@ var connectMenu = createConnectorWithContext({
|
|
|
8414
8450
|
return {
|
|
8415
8451
|
facetName: props.attribute,
|
|
8416
8452
|
query: nextRefinement,
|
|
8417
|
-
maxFacetHits: getLimit
|
|
8453
|
+
maxFacetHits: getLimit(props)
|
|
8418
8454
|
};
|
|
8419
8455
|
},
|
|
8420
8456
|
cleanUp: function cleanUp(props, searchState) {
|
|
8421
|
-
return _cleanUp$
|
|
8457
|
+
return _cleanUp$1(props, searchState, {
|
|
8422
8458
|
ais: props.contextValue,
|
|
8423
8459
|
multiIndexContext: props.indexContextValue
|
|
8424
8460
|
});
|
|
@@ -8426,10 +8462,10 @@ var connectMenu = createConnectorWithContext({
|
|
|
8426
8462
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8427
8463
|
var attribute = props.attribute;
|
|
8428
8464
|
searchParameters = searchParameters.setQueryParameters({
|
|
8429
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit
|
|
8465
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
8430
8466
|
});
|
|
8431
8467
|
searchParameters = searchParameters.addDisjunctiveFacet(attribute);
|
|
8432
|
-
var currentRefinement = getCurrentRefinement$
|
|
8468
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
8433
8469
|
ais: props.contextValue,
|
|
8434
8470
|
multiIndexContext: props.indexContextValue
|
|
8435
8471
|
});
|
|
@@ -8441,8 +8477,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8441
8477
|
return searchParameters;
|
|
8442
8478
|
},
|
|
8443
8479
|
getMetadata: function getMetadata(props, searchState) {
|
|
8444
|
-
var id = getId$
|
|
8445
|
-
var currentRefinement = getCurrentRefinement$
|
|
8480
|
+
var id = getId$6(props);
|
|
8481
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
8446
8482
|
ais: props.contextValue,
|
|
8447
8483
|
multiIndexContext: props.indexContextValue
|
|
8448
8484
|
});
|
|
@@ -8456,7 +8492,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8456
8492
|
label: "".concat(props.attribute, ": ").concat(currentRefinement),
|
|
8457
8493
|
attribute: props.attribute,
|
|
8458
8494
|
value: function value(nextState) {
|
|
8459
|
-
return _refine$
|
|
8495
|
+
return _refine$2(props, nextState, '', {
|
|
8460
8496
|
ais: props.contextValue,
|
|
8461
8497
|
multiIndexContext: props.indexContextValue
|
|
8462
8498
|
});
|
|
@@ -8472,17 +8508,14 @@ function _arrayWithHoles(arr) {
|
|
|
8472
8508
|
}
|
|
8473
8509
|
|
|
8474
8510
|
function _iterableToArrayLimit(arr, i) {
|
|
8475
|
-
|
|
8476
|
-
|
|
8477
|
-
if (_i == null) return;
|
|
8511
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
|
8478
8512
|
var _arr = [];
|
|
8479
8513
|
var _n = true;
|
|
8480
8514
|
var _d = false;
|
|
8481
|
-
|
|
8482
|
-
var _s, _e;
|
|
8515
|
+
var _e = undefined;
|
|
8483
8516
|
|
|
8484
8517
|
try {
|
|
8485
|
-
for (_i =
|
|
8518
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
8486
8519
|
_arr.push(_s.value);
|
|
8487
8520
|
|
|
8488
8521
|
if (i && _arr.length === i) break;
|
|
@@ -8540,12 +8573,12 @@ function parseItem(value) {
|
|
|
8540
8573
|
|
|
8541
8574
|
var namespace$3 = 'multiRange';
|
|
8542
8575
|
|
|
8543
|
-
function getId$
|
|
8576
|
+
function getId$7(props) {
|
|
8544
8577
|
return props.attribute;
|
|
8545
8578
|
}
|
|
8546
8579
|
|
|
8547
|
-
function getCurrentRefinement$
|
|
8548
|
-
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8580
|
+
function getCurrentRefinement$4(props, searchState, context) {
|
|
8581
|
+
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$7(props)), '');
|
|
8549
8582
|
}
|
|
8550
8583
|
|
|
8551
8584
|
function isRefinementsRangeIncludesInsideItemRange(stats, start, end) {
|
|
@@ -8564,15 +8597,15 @@ function itemHasRefinement(attribute, results, value) {
|
|
|
8564
8597
|
return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end)));
|
|
8565
8598
|
}
|
|
8566
8599
|
|
|
8567
|
-
function _refine$
|
|
8568
|
-
var nextValue = _defineProperty({}, getId$
|
|
8600
|
+
function _refine$3(props, searchState, nextRefinement, context) {
|
|
8601
|
+
var nextValue = _defineProperty({}, getId$7(props), nextRefinement);
|
|
8569
8602
|
|
|
8570
8603
|
var resetPage = true;
|
|
8571
8604
|
return refineValue(searchState, nextValue, context, resetPage, namespace$3);
|
|
8572
8605
|
}
|
|
8573
8606
|
|
|
8574
|
-
function _cleanUp$
|
|
8575
|
-
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8607
|
+
function _cleanUp$2(props, searchState, context) {
|
|
8608
|
+
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$7(props)));
|
|
8576
8609
|
}
|
|
8577
8610
|
/**
|
|
8578
8611
|
* connectNumericMenu connector provides the logic to build a widget that will
|
|
@@ -8606,7 +8639,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8606
8639
|
},
|
|
8607
8640
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
8608
8641
|
var attribute = props.attribute;
|
|
8609
|
-
var currentRefinement = getCurrentRefinement$
|
|
8642
|
+
var currentRefinement = getCurrentRefinement$4(props, searchState, {
|
|
8610
8643
|
ais: props.contextValue,
|
|
8611
8644
|
multiIndexContext: props.indexContextValue
|
|
8612
8645
|
});
|
|
@@ -8620,11 +8653,11 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8620
8653
|
label: item.label,
|
|
8621
8654
|
value: value,
|
|
8622
8655
|
isRefined: value === currentRefinement,
|
|
8623
|
-
noRefinement: results ? itemHasRefinement(getId$
|
|
8656
|
+
noRefinement: results ? itemHasRefinement(getId$7(props), results, value) : false
|
|
8624
8657
|
};
|
|
8625
8658
|
});
|
|
8626
8659
|
var stats = results && results.getFacetByName(attribute) ? results.getFacetStats(attribute) : null;
|
|
8627
|
-
var refinedItem = find
|
|
8660
|
+
var refinedItem = find(items, function (item) {
|
|
8628
8661
|
return item.isRefined === true;
|
|
8629
8662
|
});
|
|
8630
8663
|
|
|
@@ -8649,13 +8682,13 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8649
8682
|
};
|
|
8650
8683
|
},
|
|
8651
8684
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8652
|
-
return _refine$
|
|
8685
|
+
return _refine$3(props, searchState, nextRefinement, {
|
|
8653
8686
|
ais: props.contextValue,
|
|
8654
8687
|
multiIndexContext: props.indexContextValue
|
|
8655
8688
|
});
|
|
8656
8689
|
},
|
|
8657
8690
|
cleanUp: function cleanUp(props, searchState) {
|
|
8658
|
-
return _cleanUp$
|
|
8691
|
+
return _cleanUp$2(props, searchState, {
|
|
8659
8692
|
ais: props.contextValue,
|
|
8660
8693
|
multiIndexContext: props.indexContextValue
|
|
8661
8694
|
});
|
|
@@ -8663,7 +8696,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8663
8696
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8664
8697
|
var attribute = props.attribute;
|
|
8665
8698
|
|
|
8666
|
-
var _parseItem = parseItem(getCurrentRefinement$
|
|
8699
|
+
var _parseItem = parseItem(getCurrentRefinement$4(props, searchState, {
|
|
8667
8700
|
ais: props.contextValue,
|
|
8668
8701
|
multiIndexContext: props.indexContextValue
|
|
8669
8702
|
})),
|
|
@@ -8683,8 +8716,8 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8683
8716
|
return searchParameters;
|
|
8684
8717
|
},
|
|
8685
8718
|
getMetadata: function getMetadata(props, searchState) {
|
|
8686
|
-
var id = getId$
|
|
8687
|
-
var value = getCurrentRefinement$
|
|
8719
|
+
var id = getId$7(props);
|
|
8720
|
+
var value = getCurrentRefinement$4(props, searchState, {
|
|
8688
8721
|
ais: props.contextValue,
|
|
8689
8722
|
multiIndexContext: props.indexContextValue
|
|
8690
8723
|
});
|
|
@@ -8695,7 +8728,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8695
8728
|
});
|
|
8696
8729
|
|
|
8697
8730
|
if (value !== '') {
|
|
8698
|
-
var _find = find
|
|
8731
|
+
var _find = find(props.items, function (item) {
|
|
8699
8732
|
return stringifyItem(item) === value;
|
|
8700
8733
|
}),
|
|
8701
8734
|
label = _find.label;
|
|
@@ -8705,7 +8738,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8705
8738
|
attribute: props.attribute,
|
|
8706
8739
|
currentRefinement: label,
|
|
8707
8740
|
value: function value(nextState) {
|
|
8708
|
-
return _refine$
|
|
8741
|
+
return _refine$3(props, nextState, '', {
|
|
8709
8742
|
ais: props.contextValue,
|
|
8710
8743
|
multiIndexContext: props.indexContextValue
|
|
8711
8744
|
});
|
|
@@ -8721,12 +8754,12 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8721
8754
|
}
|
|
8722
8755
|
});
|
|
8723
8756
|
|
|
8724
|
-
function getId$
|
|
8757
|
+
function getId$8() {
|
|
8725
8758
|
return 'page';
|
|
8726
8759
|
}
|
|
8727
8760
|
|
|
8728
|
-
function getCurrentRefinement$
|
|
8729
|
-
var id = getId$
|
|
8761
|
+
function getCurrentRefinement$5(props, searchState, context) {
|
|
8762
|
+
var id = getId$8();
|
|
8730
8763
|
var page = 1;
|
|
8731
8764
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8732
8765
|
|
|
@@ -8737,8 +8770,8 @@ function getCurrentRefinement$6(props, searchState, context) {
|
|
|
8737
8770
|
return currentRefinement;
|
|
8738
8771
|
}
|
|
8739
8772
|
|
|
8740
|
-
function _refine$
|
|
8741
|
-
var id = getId$
|
|
8773
|
+
function _refine$4(props, searchState, nextPage, context) {
|
|
8774
|
+
var id = getId$8();
|
|
8742
8775
|
|
|
8743
8776
|
var nextValue = _defineProperty({}, id, nextPage);
|
|
8744
8777
|
|
|
@@ -8778,7 +8811,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8778
8811
|
var nbPages = results.nbPages;
|
|
8779
8812
|
return {
|
|
8780
8813
|
nbPages: nbPages,
|
|
8781
|
-
currentRefinement: getCurrentRefinement$
|
|
8814
|
+
currentRefinement: getCurrentRefinement$5(props, searchState, {
|
|
8782
8815
|
ais: props.contextValue,
|
|
8783
8816
|
multiIndexContext: props.indexContextValue
|
|
8784
8817
|
}),
|
|
@@ -8786,7 +8819,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8786
8819
|
};
|
|
8787
8820
|
},
|
|
8788
8821
|
refine: function refine(props, searchState, nextPage) {
|
|
8789
|
-
return _refine$
|
|
8822
|
+
return _refine$4(props, searchState, nextPage, {
|
|
8790
8823
|
ais: props.contextValue,
|
|
8791
8824
|
multiIndexContext: props.indexContextValue
|
|
8792
8825
|
});
|
|
@@ -8795,17 +8828,17 @@ var connectPagination = createConnectorWithContext({
|
|
|
8795
8828
|
return cleanUpValue(searchState, {
|
|
8796
8829
|
ais: props.contextValue,
|
|
8797
8830
|
multiIndexContext: props.indexContextValue
|
|
8798
|
-
}, getId$
|
|
8831
|
+
}, getId$8());
|
|
8799
8832
|
},
|
|
8800
8833
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8801
|
-
return searchParameters.setPage(getCurrentRefinement$
|
|
8834
|
+
return searchParameters.setPage(getCurrentRefinement$5(props, searchState, {
|
|
8802
8835
|
ais: props.contextValue,
|
|
8803
8836
|
multiIndexContext: props.indexContextValue
|
|
8804
8837
|
}) - 1);
|
|
8805
8838
|
},
|
|
8806
8839
|
getMetadata: function getMetadata() {
|
|
8807
8840
|
return {
|
|
8808
|
-
id: getId$
|
|
8841
|
+
id: getId$8()
|
|
8809
8842
|
};
|
|
8810
8843
|
}
|
|
8811
8844
|
});
|
|
@@ -8851,11 +8884,11 @@ var connectPoweredBy = createConnectorWithContext({
|
|
|
8851
8884
|
* @providedPropType {number} precision - Number of digits after decimal point to use.
|
|
8852
8885
|
*/
|
|
8853
8886
|
|
|
8854
|
-
function getId$
|
|
8887
|
+
function getId$9(props) {
|
|
8855
8888
|
return props.attribute;
|
|
8856
8889
|
}
|
|
8857
8890
|
|
|
8858
|
-
var namespace$
|
|
8891
|
+
var namespace$4 = 'range';
|
|
8859
8892
|
|
|
8860
8893
|
function getCurrentRange(boundaries, stats, precision) {
|
|
8861
8894
|
var pow = Math.pow(10, precision);
|
|
@@ -8885,8 +8918,8 @@ function getCurrentRange(boundaries, stats, precision) {
|
|
|
8885
8918
|
};
|
|
8886
8919
|
}
|
|
8887
8920
|
|
|
8888
|
-
function getCurrentRefinement$
|
|
8889
|
-
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8921
|
+
function getCurrentRefinement$6(props, searchState, currentRange, context) {
|
|
8922
|
+
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)), {}),
|
|
8890
8923
|
min = _getCurrentRefinement.min,
|
|
8891
8924
|
max = _getCurrentRefinement.max;
|
|
8892
8925
|
|
|
@@ -8952,7 +8985,7 @@ function nextValueForRefinement(hasBound, isReset, range, value) {
|
|
|
8952
8985
|
return next;
|
|
8953
8986
|
}
|
|
8954
8987
|
|
|
8955
|
-
function _refine$
|
|
8988
|
+
function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
8956
8989
|
var nextMin = nextRefinement.min,
|
|
8957
8990
|
nextMax = nextRefinement.max;
|
|
8958
8991
|
var currentMinRange = currentRange.min,
|
|
@@ -8976,7 +9009,7 @@ function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
|
8976
9009
|
throw Error("You can't provide max value greater than range.");
|
|
8977
9010
|
}
|
|
8978
9011
|
|
|
8979
|
-
var id = getId$
|
|
9012
|
+
var id = getId$9(props);
|
|
8980
9013
|
var resetPage = true;
|
|
8981
9014
|
|
|
8982
9015
|
var nextValue = _defineProperty({}, id, {
|
|
@@ -8984,11 +9017,11 @@ function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
|
8984
9017
|
max: nextValueForRefinement(props.max !== undefined, isMaxReset, currentMaxRange, nextMaxAsNumber)
|
|
8985
9018
|
});
|
|
8986
9019
|
|
|
8987
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9020
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$4);
|
|
8988
9021
|
}
|
|
8989
9022
|
|
|
8990
|
-
function _cleanUp$
|
|
8991
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9023
|
+
function _cleanUp$3(props, searchState, context) {
|
|
9024
|
+
return cleanUpValue(searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)));
|
|
8992
9025
|
}
|
|
8993
9026
|
|
|
8994
9027
|
var connectRange = createConnectorWithContext({
|
|
@@ -9043,7 +9076,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9043
9076
|
min: rangeMin,
|
|
9044
9077
|
max: rangeMax
|
|
9045
9078
|
};
|
|
9046
|
-
var currentRefinement = getCurrentRefinement$
|
|
9079
|
+
var currentRefinement = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9047
9080
|
ais: props.contextValue,
|
|
9048
9081
|
multiIndexContext: props.indexContextValue
|
|
9049
9082
|
});
|
|
@@ -9057,13 +9090,13 @@ var connectRange = createConnectorWithContext({
|
|
|
9057
9090
|
};
|
|
9058
9091
|
},
|
|
9059
9092
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9060
|
-
return _refine$
|
|
9093
|
+
return _refine$5(props, searchState, nextRefinement, this._currentRange, {
|
|
9061
9094
|
ais: props.contextValue,
|
|
9062
9095
|
multiIndexContext: props.indexContextValue
|
|
9063
9096
|
});
|
|
9064
9097
|
},
|
|
9065
9098
|
cleanUp: function cleanUp(props, searchState) {
|
|
9066
|
-
return _cleanUp$
|
|
9099
|
+
return _cleanUp$3(props, searchState, {
|
|
9067
9100
|
ais: props.contextValue,
|
|
9068
9101
|
multiIndexContext: props.indexContextValue
|
|
9069
9102
|
});
|
|
@@ -9071,7 +9104,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9071
9104
|
getSearchParameters: function getSearchParameters(params, props, searchState) {
|
|
9072
9105
|
var attribute = props.attribute;
|
|
9073
9106
|
|
|
9074
|
-
var _getCurrentRefinement2 = getCurrentRefinement$
|
|
9107
|
+
var _getCurrentRefinement2 = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9075
9108
|
ais: props.contextValue,
|
|
9076
9109
|
multiIndexContext: props.indexContextValue
|
|
9077
9110
|
}),
|
|
@@ -9097,7 +9130,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9097
9130
|
minRange = _this$_currentRange.min,
|
|
9098
9131
|
maxRange = _this$_currentRange.max;
|
|
9099
9132
|
|
|
9100
|
-
var _getCurrentRefinement3 = getCurrentRefinement$
|
|
9133
|
+
var _getCurrentRefinement3 = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9101
9134
|
ais: props.contextValue,
|
|
9102
9135
|
multiIndexContext: props.indexContextValue
|
|
9103
9136
|
}),
|
|
@@ -9116,7 +9149,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9116
9149
|
label: fragments.join(''),
|
|
9117
9150
|
attribute: props.attribute,
|
|
9118
9151
|
value: function value(nextState) {
|
|
9119
|
-
return _refine$
|
|
9152
|
+
return _refine$5(props, nextState, {}, _this._currentRange, {
|
|
9120
9153
|
ais: props.contextValue,
|
|
9121
9154
|
multiIndexContext: props.indexContextValue
|
|
9122
9155
|
});
|
|
@@ -9132,7 +9165,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9132
9165
|
}
|
|
9133
9166
|
|
|
9134
9167
|
return {
|
|
9135
|
-
id: getId$
|
|
9168
|
+
id: getId$9(props),
|
|
9136
9169
|
index: getIndexId({
|
|
9137
9170
|
ais: props.contextValue,
|
|
9138
9171
|
multiIndexContext: props.indexContextValue
|
|
@@ -9142,14 +9175,14 @@ var connectRange = createConnectorWithContext({
|
|
|
9142
9175
|
}
|
|
9143
9176
|
});
|
|
9144
9177
|
|
|
9145
|
-
var namespace$
|
|
9178
|
+
var namespace$5 = 'refinementList';
|
|
9146
9179
|
|
|
9147
|
-
function getId$
|
|
9180
|
+
function getId$a(props) {
|
|
9148
9181
|
return props.attribute;
|
|
9149
9182
|
}
|
|
9150
9183
|
|
|
9151
|
-
function getCurrentRefinement$
|
|
9152
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
9184
|
+
function getCurrentRefinement$7(props, searchState, context) {
|
|
9185
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$5, ".").concat(getId$a(props)), []);
|
|
9153
9186
|
|
|
9154
9187
|
if (typeof currentRefinement !== 'string') {
|
|
9155
9188
|
return currentRefinement;
|
|
@@ -9162,8 +9195,8 @@ function getCurrentRefinement$4(props, searchState, context) {
|
|
|
9162
9195
|
return [];
|
|
9163
9196
|
}
|
|
9164
9197
|
|
|
9165
|
-
function getValue(name, props, searchState, context) {
|
|
9166
|
-
var currentRefinement = getCurrentRefinement$
|
|
9198
|
+
function getValue$2(name, props, searchState, context) {
|
|
9199
|
+
var currentRefinement = getCurrentRefinement$7(props, searchState, context);
|
|
9167
9200
|
var isAnewValue = currentRefinement.indexOf(name) === -1;
|
|
9168
9201
|
var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates
|
|
9169
9202
|
: currentRefinement.filter(function (selectedValue) {
|
|
@@ -9173,15 +9206,15 @@ function getValue(name, props, searchState, context) {
|
|
|
9173
9206
|
return nextRefinement;
|
|
9174
9207
|
}
|
|
9175
9208
|
|
|
9176
|
-
function getLimit(_ref) {
|
|
9209
|
+
function getLimit$1(_ref) {
|
|
9177
9210
|
var showMore = _ref.showMore,
|
|
9178
9211
|
limit = _ref.limit,
|
|
9179
9212
|
showMoreLimit = _ref.showMoreLimit;
|
|
9180
9213
|
return showMore ? showMoreLimit : limit;
|
|
9181
9214
|
}
|
|
9182
9215
|
|
|
9183
|
-
function _refine$
|
|
9184
|
-
var id = getId$
|
|
9216
|
+
function _refine$6(props, searchState, nextRefinement, context) {
|
|
9217
|
+
var id = getId$a(props); // Setting the value to an empty string ensures that it is persisted in
|
|
9185
9218
|
// the URL as an empty value.
|
|
9186
9219
|
// This is necessary in the case where `defaultRefinement` contains one
|
|
9187
9220
|
// item and we try to deselect it. `nextSelected` would be an empty array,
|
|
@@ -9192,11 +9225,11 @@ function _refine$3(props, searchState, nextRefinement, context) {
|
|
|
9192
9225
|
var nextValue = _defineProperty({}, id, nextRefinement.length > 0 ? nextRefinement : '');
|
|
9193
9226
|
|
|
9194
9227
|
var resetPage = true;
|
|
9195
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9228
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$5);
|
|
9196
9229
|
}
|
|
9197
9230
|
|
|
9198
|
-
function _cleanUp$
|
|
9199
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9231
|
+
function _cleanUp$4(props, searchState, context) {
|
|
9232
|
+
return cleanUpValue(searchState, context, "".concat(namespace$5, ".").concat(getId$a(props)));
|
|
9200
9233
|
}
|
|
9201
9234
|
/**
|
|
9202
9235
|
* connectRefinementList connector provides the logic to build a widget that will
|
|
@@ -9223,7 +9256,7 @@ function _cleanUp$3(props, searchState, context) {
|
|
|
9223
9256
|
*/
|
|
9224
9257
|
|
|
9225
9258
|
|
|
9226
|
-
var sortBy = ['isRefined', 'count:desc', 'name:asc'];
|
|
9259
|
+
var sortBy$1 = ['isRefined', 'count:desc', 'name:asc'];
|
|
9227
9260
|
var connectRefinementList = createConnectorWithContext({
|
|
9228
9261
|
displayName: 'AlgoliaRefinementList',
|
|
9229
9262
|
propTypes: {
|
|
@@ -9261,7 +9294,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9261
9294
|
if (!canRefine) {
|
|
9262
9295
|
return {
|
|
9263
9296
|
items: [],
|
|
9264
|
-
currentRefinement: getCurrentRefinement$
|
|
9297
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, {
|
|
9265
9298
|
ais: props.contextValue,
|
|
9266
9299
|
multiIndexContext: props.indexContextValue
|
|
9267
9300
|
}),
|
|
@@ -9274,7 +9307,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9274
9307
|
var items = isFromSearch ? searchForFacetValuesResults[attribute].map(function (v) {
|
|
9275
9308
|
return {
|
|
9276
9309
|
label: v.value,
|
|
9277
|
-
value: getValue(v.value, props, searchState, {
|
|
9310
|
+
value: getValue$2(v.value, props, searchState, {
|
|
9278
9311
|
ais: props.contextValue,
|
|
9279
9312
|
multiIndexContext: props.indexContextValue
|
|
9280
9313
|
}),
|
|
@@ -9287,11 +9320,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9287
9320
|
isRefined: v.isRefined
|
|
9288
9321
|
};
|
|
9289
9322
|
}) : results.getFacetValues(attribute, {
|
|
9290
|
-
sortBy: sortBy
|
|
9323
|
+
sortBy: sortBy$1
|
|
9291
9324
|
}).map(function (v) {
|
|
9292
9325
|
return {
|
|
9293
9326
|
label: v.name,
|
|
9294
|
-
value: getValue(v.name, props, searchState, {
|
|
9327
|
+
value: getValue$2(v.name, props, searchState, {
|
|
9295
9328
|
ais: props.contextValue,
|
|
9296
9329
|
multiIndexContext: props.indexContextValue
|
|
9297
9330
|
}),
|
|
@@ -9301,8 +9334,8 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9301
9334
|
});
|
|
9302
9335
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
9303
9336
|
return {
|
|
9304
|
-
items: transformedItems.slice(0, getLimit(props)),
|
|
9305
|
-
currentRefinement: getCurrentRefinement$
|
|
9337
|
+
items: transformedItems.slice(0, getLimit$1(props)),
|
|
9338
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, {
|
|
9306
9339
|
ais: props.contextValue,
|
|
9307
9340
|
multiIndexContext: props.indexContextValue
|
|
9308
9341
|
}),
|
|
@@ -9312,7 +9345,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9312
9345
|
};
|
|
9313
9346
|
},
|
|
9314
9347
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9315
|
-
return _refine$
|
|
9348
|
+
return _refine$6(props, searchState, nextRefinement, {
|
|
9316
9349
|
ais: props.contextValue,
|
|
9317
9350
|
multiIndexContext: props.indexContextValue
|
|
9318
9351
|
});
|
|
@@ -9321,11 +9354,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9321
9354
|
return {
|
|
9322
9355
|
facetName: props.attribute,
|
|
9323
9356
|
query: nextRefinement,
|
|
9324
|
-
maxFacetHits: getLimit(props)
|
|
9357
|
+
maxFacetHits: getLimit$1(props)
|
|
9325
9358
|
};
|
|
9326
9359
|
},
|
|
9327
9360
|
cleanUp: function cleanUp(props, searchState) {
|
|
9328
|
-
return _cleanUp$
|
|
9361
|
+
return _cleanUp$4(props, searchState, {
|
|
9329
9362
|
ais: props.contextValue,
|
|
9330
9363
|
multiIndexContext: props.indexContextValue
|
|
9331
9364
|
});
|
|
@@ -9336,10 +9369,10 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9336
9369
|
var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet';
|
|
9337
9370
|
var addRefinementKey = "".concat(addKey, "Refinement");
|
|
9338
9371
|
searchParameters = searchParameters.setQueryParameters({
|
|
9339
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
9372
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit$1(props))
|
|
9340
9373
|
});
|
|
9341
9374
|
searchParameters = searchParameters[addKey](attribute);
|
|
9342
|
-
return getCurrentRefinement$
|
|
9375
|
+
return getCurrentRefinement$7(props, searchState, {
|
|
9343
9376
|
ais: props.contextValue,
|
|
9344
9377
|
multiIndexContext: props.indexContextValue
|
|
9345
9378
|
}).reduce(function (res, val) {
|
|
@@ -9347,7 +9380,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9347
9380
|
}, searchParameters);
|
|
9348
9381
|
},
|
|
9349
9382
|
getMetadata: function getMetadata(props, searchState) {
|
|
9350
|
-
var id = getId$
|
|
9383
|
+
var id = getId$a(props);
|
|
9351
9384
|
var context = {
|
|
9352
9385
|
ais: props.contextValue,
|
|
9353
9386
|
multiIndexContext: props.indexContextValue
|
|
@@ -9355,21 +9388,21 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9355
9388
|
return {
|
|
9356
9389
|
id: id,
|
|
9357
9390
|
index: getIndexId(context),
|
|
9358
|
-
items: getCurrentRefinement$
|
|
9391
|
+
items: getCurrentRefinement$7(props, searchState, context).length > 0 ? [{
|
|
9359
9392
|
attribute: props.attribute,
|
|
9360
9393
|
label: "".concat(props.attribute, ": "),
|
|
9361
|
-
currentRefinement: getCurrentRefinement$
|
|
9394
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, context),
|
|
9362
9395
|
value: function value(nextState) {
|
|
9363
|
-
return _refine$
|
|
9396
|
+
return _refine$6(props, nextState, [], context);
|
|
9364
9397
|
},
|
|
9365
|
-
items: getCurrentRefinement$
|
|
9398
|
+
items: getCurrentRefinement$7(props, searchState, context).map(function (item) {
|
|
9366
9399
|
return {
|
|
9367
9400
|
label: "".concat(item),
|
|
9368
9401
|
value: function value(nextState) {
|
|
9369
|
-
var nextSelectedItems = getCurrentRefinement$
|
|
9402
|
+
var nextSelectedItems = getCurrentRefinement$7(props, nextState, context).filter(function (other) {
|
|
9370
9403
|
return other !== item;
|
|
9371
9404
|
});
|
|
9372
|
-
return _refine$
|
|
9405
|
+
return _refine$6(props, searchState, nextSelectedItems, context);
|
|
9373
9406
|
}
|
|
9374
9407
|
};
|
|
9375
9408
|
})
|
|
@@ -9428,7 +9461,7 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9428
9461
|
// See: https://github.com/algolia/react-instantsearch/issues/164
|
|
9429
9462
|
|
|
9430
9463
|
|
|
9431
|
-
var cleanedSearchState = omit
|
|
9464
|
+
var cleanedSearchState = omit(searchState, ['configure', id]);
|
|
9432
9465
|
var hasNotChanged = shallowEqual(this._prevSearchState, cleanedSearchState);
|
|
9433
9466
|
this._prevSearchState = cleanedSearchState;
|
|
9434
9467
|
return {
|
|
@@ -9438,12 +9471,12 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9438
9471
|
}
|
|
9439
9472
|
});
|
|
9440
9473
|
|
|
9441
|
-
function getId$
|
|
9474
|
+
function getId$b() {
|
|
9442
9475
|
return 'query';
|
|
9443
9476
|
}
|
|
9444
9477
|
|
|
9445
|
-
function getCurrentRefinement$
|
|
9446
|
-
var id = getId$
|
|
9478
|
+
function getCurrentRefinement$8(props, searchState, context) {
|
|
9479
|
+
var id = getId$b();
|
|
9447
9480
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9448
9481
|
|
|
9449
9482
|
if (currentRefinement) {
|
|
@@ -9453,8 +9486,8 @@ function getCurrentRefinement$3(props, searchState, context) {
|
|
|
9453
9486
|
return '';
|
|
9454
9487
|
}
|
|
9455
9488
|
|
|
9456
|
-
function _refine$
|
|
9457
|
-
var id = getId$
|
|
9489
|
+
function _refine$7(props, searchState, nextRefinement, context) {
|
|
9490
|
+
var id = getId$b();
|
|
9458
9491
|
|
|
9459
9492
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9460
9493
|
|
|
@@ -9462,8 +9495,8 @@ function _refine$2(props, searchState, nextRefinement, context) {
|
|
|
9462
9495
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9463
9496
|
}
|
|
9464
9497
|
|
|
9465
|
-
function _cleanUp$
|
|
9466
|
-
return cleanUpValue(searchState, context, getId$
|
|
9498
|
+
function _cleanUp$5(props, searchState, context) {
|
|
9499
|
+
return cleanUpValue(searchState, context, getId$b());
|
|
9467
9500
|
}
|
|
9468
9501
|
/**
|
|
9469
9502
|
* connectSearchBox connector provides the logic to build a widget that will
|
|
@@ -9484,7 +9517,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9484
9517
|
},
|
|
9485
9518
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
9486
9519
|
return {
|
|
9487
|
-
currentRefinement: getCurrentRefinement$
|
|
9520
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
9488
9521
|
ais: props.contextValue,
|
|
9489
9522
|
multiIndexContext: props.indexContextValue
|
|
9490
9523
|
}),
|
|
@@ -9492,26 +9525,26 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9492
9525
|
};
|
|
9493
9526
|
},
|
|
9494
9527
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9495
|
-
return _refine$
|
|
9528
|
+
return _refine$7(props, searchState, nextRefinement, {
|
|
9496
9529
|
ais: props.contextValue,
|
|
9497
9530
|
multiIndexContext: props.indexContextValue
|
|
9498
9531
|
});
|
|
9499
9532
|
},
|
|
9500
9533
|
cleanUp: function cleanUp(props, searchState) {
|
|
9501
|
-
return _cleanUp$
|
|
9534
|
+
return _cleanUp$5(props, searchState, {
|
|
9502
9535
|
ais: props.contextValue,
|
|
9503
9536
|
multiIndexContext: props.indexContextValue
|
|
9504
9537
|
});
|
|
9505
9538
|
},
|
|
9506
9539
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9507
|
-
return searchParameters.setQuery(getCurrentRefinement$
|
|
9540
|
+
return searchParameters.setQuery(getCurrentRefinement$8(props, searchState, {
|
|
9508
9541
|
ais: props.contextValue,
|
|
9509
9542
|
multiIndexContext: props.indexContextValue
|
|
9510
9543
|
}));
|
|
9511
9544
|
},
|
|
9512
9545
|
getMetadata: function getMetadata(props, searchState) {
|
|
9513
|
-
var id = getId$
|
|
9514
|
-
var currentRefinement = getCurrentRefinement$
|
|
9546
|
+
var id = getId$b();
|
|
9547
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
9515
9548
|
ais: props.contextValue,
|
|
9516
9549
|
multiIndexContext: props.indexContextValue
|
|
9517
9550
|
});
|
|
@@ -9524,7 +9557,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9524
9557
|
items: currentRefinement === null ? [] : [{
|
|
9525
9558
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9526
9559
|
value: function value(nextState) {
|
|
9527
|
-
return _refine$
|
|
9560
|
+
return _refine$7(props, nextState, '', {
|
|
9528
9561
|
ais: props.contextValue,
|
|
9529
9562
|
multiIndexContext: props.indexContextValue
|
|
9530
9563
|
});
|
|
@@ -9535,12 +9568,12 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9535
9568
|
}
|
|
9536
9569
|
});
|
|
9537
9570
|
|
|
9538
|
-
function getId$
|
|
9571
|
+
function getId$c() {
|
|
9539
9572
|
return 'relevancyStrictness';
|
|
9540
9573
|
}
|
|
9541
9574
|
|
|
9542
|
-
function getCurrentRefinement$
|
|
9543
|
-
var id = getId$
|
|
9575
|
+
function getCurrentRefinement$9(props, searchState, context) {
|
|
9576
|
+
var id = getId$c();
|
|
9544
9577
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id);
|
|
9545
9578
|
return currentRefinement;
|
|
9546
9579
|
}
|
|
@@ -9566,13 +9599,13 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9566
9599
|
};
|
|
9567
9600
|
},
|
|
9568
9601
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9569
|
-
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$
|
|
9602
|
+
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$9(props, searchState, {
|
|
9570
9603
|
ais: props.contextValue,
|
|
9571
9604
|
multiIndexContext: props.indexContextValue
|
|
9572
9605
|
}));
|
|
9573
9606
|
},
|
|
9574
9607
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9575
|
-
var nextValue = _defineProperty({}, getId$
|
|
9608
|
+
var nextValue = _defineProperty({}, getId$c(), nextRefinement);
|
|
9576
9609
|
|
|
9577
9610
|
var resetPage = true;
|
|
9578
9611
|
return refineValue(searchState, nextValue, {
|
|
@@ -9582,12 +9615,12 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9582
9615
|
}
|
|
9583
9616
|
});
|
|
9584
9617
|
|
|
9585
|
-
function getId$
|
|
9618
|
+
function getId$d() {
|
|
9586
9619
|
return 'sortBy';
|
|
9587
9620
|
}
|
|
9588
9621
|
|
|
9589
|
-
function getCurrentRefinement$
|
|
9590
|
-
var id = getId$
|
|
9622
|
+
function getCurrentRefinement$a(props, searchState, context) {
|
|
9623
|
+
var id = getId$d();
|
|
9591
9624
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
9592
9625
|
|
|
9593
9626
|
if (currentRefinement) {
|
|
@@ -9624,7 +9657,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9624
9657
|
transformItems: PropTypes.func
|
|
9625
9658
|
},
|
|
9626
9659
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
9627
|
-
var currentRefinement = getCurrentRefinement$
|
|
9660
|
+
var currentRefinement = getCurrentRefinement$a(props, searchState, {
|
|
9628
9661
|
ais: props.contextValue,
|
|
9629
9662
|
multiIndexContext: props.indexContextValue
|
|
9630
9663
|
});
|
|
@@ -9641,7 +9674,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9641
9674
|
};
|
|
9642
9675
|
},
|
|
9643
9676
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9644
|
-
var id = getId$
|
|
9677
|
+
var id = getId$d();
|
|
9645
9678
|
|
|
9646
9679
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9647
9680
|
|
|
@@ -9655,10 +9688,10 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9655
9688
|
return cleanUpValue(searchState, {
|
|
9656
9689
|
ais: props.contextValue,
|
|
9657
9690
|
multiIndexContext: props.indexContextValue
|
|
9658
|
-
}, getId$
|
|
9691
|
+
}, getId$d());
|
|
9659
9692
|
},
|
|
9660
9693
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9661
|
-
var selectedIndex = getCurrentRefinement$
|
|
9694
|
+
var selectedIndex = getCurrentRefinement$a(props, searchState, {
|
|
9662
9695
|
ais: props.contextValue,
|
|
9663
9696
|
multiIndexContext: props.indexContextValue
|
|
9664
9697
|
});
|
|
@@ -9666,7 +9699,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9666
9699
|
},
|
|
9667
9700
|
getMetadata: function getMetadata() {
|
|
9668
9701
|
return {
|
|
9669
|
-
id: getId$
|
|
9702
|
+
id: getId$d()
|
|
9670
9703
|
};
|
|
9671
9704
|
}
|
|
9672
9705
|
});
|
|
@@ -9702,15 +9735,15 @@ var connectStats = createConnectorWithContext({
|
|
|
9702
9735
|
}
|
|
9703
9736
|
});
|
|
9704
9737
|
|
|
9705
|
-
function getId$
|
|
9738
|
+
function getId$e(props) {
|
|
9706
9739
|
return props.attribute;
|
|
9707
9740
|
}
|
|
9708
9741
|
|
|
9709
|
-
var namespace = 'toggle';
|
|
9742
|
+
var namespace$6 = 'toggle';
|
|
9710
9743
|
var falsyStrings = ['0', 'false', 'null', 'undefined'];
|
|
9711
9744
|
|
|
9712
|
-
function getCurrentRefinement(props, searchState, context) {
|
|
9713
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace, ".").concat(getId$
|
|
9745
|
+
function getCurrentRefinement$b(props, searchState, context) {
|
|
9746
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$6, ".").concat(getId$e(props)), false);
|
|
9714
9747
|
|
|
9715
9748
|
if (falsyStrings.indexOf(currentRefinement) !== -1) {
|
|
9716
9749
|
return false;
|
|
@@ -9719,17 +9752,17 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
9719
9752
|
return Boolean(currentRefinement);
|
|
9720
9753
|
}
|
|
9721
9754
|
|
|
9722
|
-
function _refine$
|
|
9723
|
-
var id = getId$
|
|
9755
|
+
function _refine$8(props, searchState, nextRefinement, context) {
|
|
9756
|
+
var id = getId$e(props);
|
|
9724
9757
|
|
|
9725
9758
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : false);
|
|
9726
9759
|
|
|
9727
9760
|
var resetPage = true;
|
|
9728
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
9761
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$6);
|
|
9729
9762
|
}
|
|
9730
9763
|
|
|
9731
|
-
function _cleanUp$
|
|
9732
|
-
return cleanUpValue(searchState, context, "".concat(namespace, ".").concat(getId$
|
|
9764
|
+
function _cleanUp$6(props, searchState, context) {
|
|
9765
|
+
return cleanUpValue(searchState, context, "".concat(namespace$6, ".").concat(getId$e(props)));
|
|
9733
9766
|
}
|
|
9734
9767
|
/**
|
|
9735
9768
|
* connectToggleRefinement connector provides the logic to build a widget that will
|
|
@@ -9768,14 +9801,14 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9768
9801
|
ais: props.contextValue,
|
|
9769
9802
|
multiIndexContext: props.indexContextValue
|
|
9770
9803
|
});
|
|
9771
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
9804
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
9772
9805
|
ais: props.contextValue,
|
|
9773
9806
|
multiIndexContext: props.indexContextValue
|
|
9774
9807
|
});
|
|
9775
9808
|
var allFacetValues = results && results.getFacetByName(attribute) ? results.getFacetValues(attribute) : null;
|
|
9776
9809
|
var facetValue = // Use null to always be consistent with type of the value
|
|
9777
9810
|
// count: number | null
|
|
9778
|
-
allFacetValues && allFacetValues.length ? find
|
|
9811
|
+
allFacetValues && allFacetValues.length ? find(allFacetValues, function (item) {
|
|
9779
9812
|
return item.name === value.toString();
|
|
9780
9813
|
}) : null;
|
|
9781
9814
|
var facetValueCount = facetValue && facetValue.count;
|
|
@@ -9796,13 +9829,13 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9796
9829
|
};
|
|
9797
9830
|
},
|
|
9798
9831
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9799
|
-
return _refine$
|
|
9832
|
+
return _refine$8(props, searchState, nextRefinement, {
|
|
9800
9833
|
ais: props.contextValue,
|
|
9801
9834
|
multiIndexContext: props.indexContextValue
|
|
9802
9835
|
});
|
|
9803
9836
|
},
|
|
9804
9837
|
cleanUp: function cleanUp(props, searchState) {
|
|
9805
|
-
return _cleanUp$
|
|
9838
|
+
return _cleanUp$6(props, searchState, {
|
|
9806
9839
|
ais: props.contextValue,
|
|
9807
9840
|
multiIndexContext: props.indexContextValue
|
|
9808
9841
|
});
|
|
@@ -9811,7 +9844,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9811
9844
|
var attribute = props.attribute,
|
|
9812
9845
|
value = props.value,
|
|
9813
9846
|
filter = props.filter;
|
|
9814
|
-
var checked = getCurrentRefinement(props, searchState, {
|
|
9847
|
+
var checked = getCurrentRefinement$b(props, searchState, {
|
|
9815
9848
|
ais: props.contextValue,
|
|
9816
9849
|
multiIndexContext: props.indexContextValue
|
|
9817
9850
|
});
|
|
@@ -9828,8 +9861,8 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9828
9861
|
return nextSearchParameters;
|
|
9829
9862
|
},
|
|
9830
9863
|
getMetadata: function getMetadata(props, searchState) {
|
|
9831
|
-
var id = getId$
|
|
9832
|
-
var checked = getCurrentRefinement(props, searchState, {
|
|
9864
|
+
var id = getId$e(props);
|
|
9865
|
+
var checked = getCurrentRefinement$b(props, searchState, {
|
|
9833
9866
|
ais: props.contextValue,
|
|
9834
9867
|
multiIndexContext: props.indexContextValue
|
|
9835
9868
|
});
|
|
@@ -9845,7 +9878,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9845
9878
|
currentRefinement: checked,
|
|
9846
9879
|
attribute: props.attribute,
|
|
9847
9880
|
value: function value(nextState) {
|
|
9848
|
-
return _refine$
|
|
9881
|
+
return _refine$8(props, nextState, false, {
|
|
9849
9882
|
ais: props.contextValue,
|
|
9850
9883
|
multiIndexContext: props.indexContextValue
|
|
9851
9884
|
});
|
|
@@ -9861,7 +9894,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9861
9894
|
}
|
|
9862
9895
|
});
|
|
9863
9896
|
|
|
9864
|
-
function getId() {
|
|
9897
|
+
function getId$f() {
|
|
9865
9898
|
return 'query';
|
|
9866
9899
|
}
|
|
9867
9900
|
|
|
@@ -9870,7 +9903,7 @@ function getAdditionalId() {
|
|
|
9870
9903
|
}
|
|
9871
9904
|
|
|
9872
9905
|
function getCurrentRefinementQuery(props, searchState, context) {
|
|
9873
|
-
var id = getId();
|
|
9906
|
+
var id = getId$f();
|
|
9874
9907
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9875
9908
|
|
|
9876
9909
|
if (currentRefinement) {
|
|
@@ -9891,10 +9924,10 @@ function getCurrentRefinementAdditional(props, searchState, context) {
|
|
|
9891
9924
|
return {};
|
|
9892
9925
|
}
|
|
9893
9926
|
|
|
9894
|
-
function _refine(props, searchState, nextRefinement, context) {
|
|
9927
|
+
function _refine$9(props, searchState, nextRefinement, context) {
|
|
9895
9928
|
var _nextValue;
|
|
9896
9929
|
|
|
9897
|
-
var id = getId();
|
|
9930
|
+
var id = getId$f();
|
|
9898
9931
|
var voiceParams = getAdditionalId();
|
|
9899
9932
|
var queryLanguages = props.language ? {
|
|
9900
9933
|
queryLanguages: [props.language.split('-')[0]]
|
|
@@ -9911,8 +9944,8 @@ function _refine(props, searchState, nextRefinement, context) {
|
|
|
9911
9944
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9912
9945
|
}
|
|
9913
9946
|
|
|
9914
|
-
function _cleanUp(props, searchState, context) {
|
|
9915
|
-
var interimState = cleanUpValue(searchState, context, getId());
|
|
9947
|
+
function _cleanUp$7(props, searchState, context) {
|
|
9948
|
+
var interimState = cleanUpValue(searchState, context, getId$f());
|
|
9916
9949
|
return cleanUpValue(interimState, context, getAdditionalId());
|
|
9917
9950
|
}
|
|
9918
9951
|
|
|
@@ -9931,13 +9964,13 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9931
9964
|
};
|
|
9932
9965
|
},
|
|
9933
9966
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9934
|
-
return _refine(props, searchState, nextRefinement, {
|
|
9967
|
+
return _refine$9(props, searchState, nextRefinement, {
|
|
9935
9968
|
ais: props.contextValue,
|
|
9936
9969
|
multiIndexContext: props.indexContextValue
|
|
9937
9970
|
});
|
|
9938
9971
|
},
|
|
9939
9972
|
cleanUp: function cleanUp(props, searchState) {
|
|
9940
|
-
return _cleanUp(props, searchState, {
|
|
9973
|
+
return _cleanUp$7(props, searchState, {
|
|
9941
9974
|
ais: props.contextValue,
|
|
9942
9975
|
multiIndexContext: props.indexContextValue
|
|
9943
9976
|
});
|
|
@@ -9954,7 +9987,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9954
9987
|
return searchParameters.setQuery(query).setQueryParameters(additionalParams);
|
|
9955
9988
|
},
|
|
9956
9989
|
getMetadata: function getMetadata(props, searchState) {
|
|
9957
|
-
var id = getId();
|
|
9990
|
+
var id = getId$f();
|
|
9958
9991
|
var currentRefinement = getCurrentRefinementQuery(props, searchState, {
|
|
9959
9992
|
ais: props.contextValue,
|
|
9960
9993
|
multiIndexContext: props.indexContextValue
|
|
@@ -9968,7 +10001,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9968
10001
|
items: currentRefinement === null ? [] : [{
|
|
9969
10002
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9970
10003
|
value: function value(nextState) {
|
|
9971
|
-
return _refine(props, nextState, '', {
|
|
10004
|
+
return _refine$9(props, nextState, '', {
|
|
9972
10005
|
ais: props.contextValue,
|
|
9973
10006
|
multiIndexContext: props.indexContextValue
|
|
9974
10007
|
});
|
|
@@ -10021,7 +10054,7 @@ function range(_ref) {
|
|
|
10021
10054
|
return (start + current) * limitStep;
|
|
10022
10055
|
});
|
|
10023
10056
|
}
|
|
10024
|
-
function find(array, comparator) {
|
|
10057
|
+
function find$2(array, comparator) {
|
|
10025
10058
|
if (!Array.isArray(array)) {
|
|
10026
10059
|
return undefined;
|
|
10027
10060
|
}
|
|
@@ -10035,11 +10068,11 @@ function find(array, comparator) {
|
|
|
10035
10068
|
return undefined;
|
|
10036
10069
|
}
|
|
10037
10070
|
|
|
10038
|
-
var cx
|
|
10071
|
+
var cx = createClassNames('Panel');
|
|
10039
10072
|
|
|
10040
|
-
var _createContext = createContext(function setCanRefine() {}),
|
|
10041
|
-
PanelConsumer = _createContext.Consumer,
|
|
10042
|
-
PanelProvider = _createContext.Provider;
|
|
10073
|
+
var _createContext$1 = createContext(function setCanRefine() {}),
|
|
10074
|
+
PanelConsumer = _createContext$1.Consumer,
|
|
10075
|
+
PanelProvider = _createContext$1.Provider;
|
|
10043
10076
|
|
|
10044
10077
|
var Panel =
|
|
10045
10078
|
/*#__PURE__*/
|
|
@@ -10081,16 +10114,16 @@ function (_Component) {
|
|
|
10081
10114
|
header = _this$props.header,
|
|
10082
10115
|
footer = _this$props.footer;
|
|
10083
10116
|
var canRefine = this.state.canRefine;
|
|
10084
|
-
return
|
|
10085
|
-
className: classnames(cx
|
|
10086
|
-
}, header &&
|
|
10087
|
-
className: cx
|
|
10088
|
-
}, header),
|
|
10089
|
-
className: cx
|
|
10090
|
-
},
|
|
10117
|
+
return React.createElement("div", {
|
|
10118
|
+
className: classnames(cx('', !canRefine && '-noRefinement'), className)
|
|
10119
|
+
}, header && React.createElement("div", {
|
|
10120
|
+
className: cx('header')
|
|
10121
|
+
}, header), React.createElement("div", {
|
|
10122
|
+
className: cx('body')
|
|
10123
|
+
}, React.createElement(PanelProvider, {
|
|
10091
10124
|
value: this.setCanRefine
|
|
10092
|
-
}, children)), footer &&
|
|
10093
|
-
className: cx
|
|
10125
|
+
}, children)), footer && React.createElement("div", {
|
|
10126
|
+
className: cx('footer')
|
|
10094
10127
|
}, footer));
|
|
10095
10128
|
}
|
|
10096
10129
|
}]);
|
|
@@ -10153,8 +10186,8 @@ _defineProperty(PanelCallbackHandler, "propTypes", {
|
|
|
10153
10186
|
var PanelWrapper = function PanelWrapper(_ref) {
|
|
10154
10187
|
var canRefine = _ref.canRefine,
|
|
10155
10188
|
children = _ref.children;
|
|
10156
|
-
return
|
|
10157
|
-
return
|
|
10189
|
+
return React.createElement(PanelConsumer, null, function (setCanRefine) {
|
|
10190
|
+
return React.createElement(PanelCallbackHandler, {
|
|
10158
10191
|
setCanRefine: setCanRefine,
|
|
10159
10192
|
canRefine: canRefine
|
|
10160
10193
|
}, children);
|
|
@@ -10200,7 +10233,7 @@ function (_Component) {
|
|
|
10200
10233
|
_createClass(Link, [{
|
|
10201
10234
|
key: "render",
|
|
10202
10235
|
value: function render() {
|
|
10203
|
-
return
|
|
10236
|
+
return React.createElement("a", _extends({}, this.props, {
|
|
10204
10237
|
onClick: this.onClick
|
|
10205
10238
|
}));
|
|
10206
10239
|
}
|
|
@@ -10213,8 +10246,8 @@ _defineProperty(Link, "propTypes", {
|
|
|
10213
10246
|
onClick: PropTypes.func.isRequired
|
|
10214
10247
|
});
|
|
10215
10248
|
|
|
10216
|
-
var cx$
|
|
10217
|
-
var itemsPropType
|
|
10249
|
+
var cx$1 = createClassNames('Breadcrumb');
|
|
10250
|
+
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
10218
10251
|
label: PropTypes.string.isRequired,
|
|
10219
10252
|
value: PropTypes.string.isRequired
|
|
10220
10253
|
}));
|
|
@@ -10242,10 +10275,10 @@ function (_Component) {
|
|
|
10242
10275
|
separator = _this$props.separator,
|
|
10243
10276
|
translate = _this$props.translate,
|
|
10244
10277
|
className = _this$props.className;
|
|
10245
|
-
var rootPath = canRefine ?
|
|
10246
|
-
className: cx$
|
|
10247
|
-
},
|
|
10248
|
-
className: cx$
|
|
10278
|
+
var rootPath = canRefine ? React.createElement("li", {
|
|
10279
|
+
className: cx$1('item')
|
|
10280
|
+
}, React.createElement(Link, {
|
|
10281
|
+
className: cx$1('link'),
|
|
10249
10282
|
onClick: function onClick() {
|
|
10250
10283
|
return !rootURL ? refine() : null;
|
|
10251
10284
|
},
|
|
@@ -10253,23 +10286,23 @@ function (_Component) {
|
|
|
10253
10286
|
}, translate('rootLabel'))) : null;
|
|
10254
10287
|
var breadcrumb = items.map(function (item, idx) {
|
|
10255
10288
|
var isLast = idx === items.length - 1;
|
|
10256
|
-
return
|
|
10257
|
-
className: cx$
|
|
10289
|
+
return React.createElement("li", {
|
|
10290
|
+
className: cx$1('item', isLast && 'item--selected'),
|
|
10258
10291
|
key: idx
|
|
10259
|
-
},
|
|
10260
|
-
className: cx$
|
|
10261
|
-
}, separator), !isLast ?
|
|
10262
|
-
className: cx$
|
|
10292
|
+
}, React.createElement("span", {
|
|
10293
|
+
className: cx$1('separator')
|
|
10294
|
+
}, separator), !isLast ? React.createElement(Link, {
|
|
10295
|
+
className: cx$1('link'),
|
|
10263
10296
|
onClick: function onClick() {
|
|
10264
10297
|
return refine(item.value);
|
|
10265
10298
|
},
|
|
10266
10299
|
href: createURL(item.value)
|
|
10267
10300
|
}, item.label) : item.label);
|
|
10268
10301
|
});
|
|
10269
|
-
return
|
|
10270
|
-
className: classnames(cx$
|
|
10271
|
-
},
|
|
10272
|
-
className: cx$
|
|
10302
|
+
return React.createElement("div", {
|
|
10303
|
+
className: classnames(cx$1('', !canRefine && '-noRefinement'), className)
|
|
10304
|
+
}, React.createElement("ul", {
|
|
10305
|
+
className: cx$1('list')
|
|
10273
10306
|
}, rootPath, breadcrumb));
|
|
10274
10307
|
}
|
|
10275
10308
|
}]);
|
|
@@ -10280,7 +10313,7 @@ function (_Component) {
|
|
|
10280
10313
|
_defineProperty(Breadcrumb, "propTypes", {
|
|
10281
10314
|
canRefine: PropTypes.bool.isRequired,
|
|
10282
10315
|
createURL: PropTypes.func.isRequired,
|
|
10283
|
-
items: itemsPropType
|
|
10316
|
+
items: itemsPropType,
|
|
10284
10317
|
refine: PropTypes.func.isRequired,
|
|
10285
10318
|
rootURL: PropTypes.string,
|
|
10286
10319
|
separator: PropTypes.node,
|
|
@@ -10387,12 +10420,12 @@ var Breadcrumb$1 = translatable({
|
|
|
10387
10420
|
*/
|
|
10388
10421
|
|
|
10389
10422
|
var BreadcrumbWidget = function BreadcrumbWidget(props) {
|
|
10390
|
-
return
|
|
10423
|
+
return React.createElement(PanelWrapper, props, React.createElement(Breadcrumb$1, props));
|
|
10391
10424
|
};
|
|
10392
10425
|
|
|
10393
10426
|
connectBreadcrumb(BreadcrumbWidget);
|
|
10394
10427
|
|
|
10395
|
-
var cx$
|
|
10428
|
+
var cx$2 = createClassNames('ClearRefinements');
|
|
10396
10429
|
|
|
10397
10430
|
var ClearRefinements =
|
|
10398
10431
|
/*#__PURE__*/
|
|
@@ -10414,10 +10447,10 @@ function (_Component) {
|
|
|
10414
10447
|
refine = _this$props.refine,
|
|
10415
10448
|
translate = _this$props.translate,
|
|
10416
10449
|
className = _this$props.className;
|
|
10417
|
-
return
|
|
10418
|
-
className: classnames(cx$
|
|
10419
|
-
},
|
|
10420
|
-
className: cx$
|
|
10450
|
+
return React.createElement("div", {
|
|
10451
|
+
className: classnames(cx$2(''), className)
|
|
10452
|
+
}, React.createElement("button", {
|
|
10453
|
+
className: cx$2('button', !canRefine && 'button--disabled'),
|
|
10421
10454
|
onClick: function onClick() {
|
|
10422
10455
|
return refine(items);
|
|
10423
10456
|
},
|
|
@@ -10480,44 +10513,44 @@ var ClearRefinements$1 = translatable({
|
|
|
10480
10513
|
*/
|
|
10481
10514
|
|
|
10482
10515
|
var ClearRefinementsWidget = function ClearRefinementsWidget(props) {
|
|
10483
|
-
return
|
|
10516
|
+
return React.createElement(PanelWrapper, props, React.createElement(ClearRefinements$1, props));
|
|
10484
10517
|
};
|
|
10485
10518
|
|
|
10486
10519
|
connectCurrentRefinements(ClearRefinementsWidget);
|
|
10487
10520
|
|
|
10488
|
-
var cx$
|
|
10521
|
+
var cx$3 = createClassNames('CurrentRefinements');
|
|
10489
10522
|
var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
10490
10523
|
var items = _ref.items,
|
|
10491
10524
|
canRefine = _ref.canRefine,
|
|
10492
10525
|
refine = _ref.refine,
|
|
10493
10526
|
translate = _ref.translate,
|
|
10494
10527
|
className = _ref.className;
|
|
10495
|
-
return
|
|
10496
|
-
className: classnames(cx$
|
|
10497
|
-
},
|
|
10498
|
-
className: cx$
|
|
10528
|
+
return React.createElement("div", {
|
|
10529
|
+
className: classnames(cx$3('', !canRefine && '-noRefinement'), className)
|
|
10530
|
+
}, React.createElement("ul", {
|
|
10531
|
+
className: cx$3('list', !canRefine && 'list--noRefinement')
|
|
10499
10532
|
}, items.map(function (item) {
|
|
10500
|
-
return
|
|
10533
|
+
return React.createElement("li", {
|
|
10501
10534
|
key: item.label,
|
|
10502
|
-
className: cx$
|
|
10503
|
-
},
|
|
10504
|
-
className: cx$
|
|
10535
|
+
className: cx$3('item')
|
|
10536
|
+
}, React.createElement("span", {
|
|
10537
|
+
className: cx$3('label')
|
|
10505
10538
|
}, item.label), item.items ? item.items.map(function (nest) {
|
|
10506
|
-
return
|
|
10539
|
+
return React.createElement("span", {
|
|
10507
10540
|
key: nest.label,
|
|
10508
|
-
className: cx$
|
|
10509
|
-
},
|
|
10510
|
-
className: cx$
|
|
10511
|
-
}, nest.label),
|
|
10512
|
-
className: cx$
|
|
10541
|
+
className: cx$3('category')
|
|
10542
|
+
}, React.createElement("span", {
|
|
10543
|
+
className: cx$3('categoryLabel')
|
|
10544
|
+
}, nest.label), React.createElement("button", {
|
|
10545
|
+
className: cx$3('delete'),
|
|
10513
10546
|
onClick: function onClick() {
|
|
10514
10547
|
return refine(nest.value);
|
|
10515
10548
|
}
|
|
10516
10549
|
}, translate('clearFilter', nest)));
|
|
10517
|
-
}) :
|
|
10518
|
-
className: cx$
|
|
10519
|
-
},
|
|
10520
|
-
className: cx$
|
|
10550
|
+
}) : React.createElement("span", {
|
|
10551
|
+
className: cx$3('category')
|
|
10552
|
+
}, React.createElement("button", {
|
|
10553
|
+
className: cx$3('delete'),
|
|
10521
10554
|
onClick: function onClick() {
|
|
10522
10555
|
return refine(item.value);
|
|
10523
10556
|
}
|
|
@@ -10588,33 +10621,33 @@ var CurrentRefinements$1 = translatable({
|
|
|
10588
10621
|
*/
|
|
10589
10622
|
|
|
10590
10623
|
var CurrentRefinementsWidget = function CurrentRefinementsWidget(props) {
|
|
10591
|
-
return
|
|
10624
|
+
return React.createElement(PanelWrapper, props, React.createElement(CurrentRefinements$1, props));
|
|
10592
10625
|
};
|
|
10593
10626
|
|
|
10594
10627
|
connectCurrentRefinements(CurrentRefinementsWidget);
|
|
10595
10628
|
|
|
10596
|
-
var cx$
|
|
10597
|
-
var defaultLoadingIndicator =
|
|
10629
|
+
var cx$4 = createClassNames('SearchBox');
|
|
10630
|
+
var defaultLoadingIndicator = React.createElement("svg", {
|
|
10598
10631
|
width: "18",
|
|
10599
10632
|
height: "18",
|
|
10600
10633
|
viewBox: "0 0 38 38",
|
|
10601
10634
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10602
10635
|
stroke: "#444",
|
|
10603
|
-
className: cx$
|
|
10604
|
-
},
|
|
10636
|
+
className: cx$4('loadingIcon')
|
|
10637
|
+
}, React.createElement("g", {
|
|
10605
10638
|
fill: "none",
|
|
10606
10639
|
fillRule: "evenodd"
|
|
10607
|
-
},
|
|
10640
|
+
}, React.createElement("g", {
|
|
10608
10641
|
transform: "translate(1 1)",
|
|
10609
10642
|
strokeWidth: "2"
|
|
10610
|
-
},
|
|
10643
|
+
}, React.createElement("circle", {
|
|
10611
10644
|
strokeOpacity: ".5",
|
|
10612
10645
|
cx: "18",
|
|
10613
10646
|
cy: "18",
|
|
10614
10647
|
r: "18"
|
|
10615
|
-
}),
|
|
10648
|
+
}), React.createElement("path", {
|
|
10616
10649
|
d: "M36 18c0-9.94-8.06-18-18-18"
|
|
10617
|
-
},
|
|
10650
|
+
}, React.createElement("animateTransform", {
|
|
10618
10651
|
attributeName: "transform",
|
|
10619
10652
|
type: "rotate",
|
|
10620
10653
|
from: "0 18 18",
|
|
@@ -10622,26 +10655,26 @@ var defaultLoadingIndicator = React__default.createElement("svg", {
|
|
|
10622
10655
|
dur: "1s",
|
|
10623
10656
|
repeatCount: "indefinite"
|
|
10624
10657
|
})))));
|
|
10625
|
-
var defaultReset =
|
|
10626
|
-
className: cx$
|
|
10658
|
+
var defaultReset = React.createElement("svg", {
|
|
10659
|
+
className: cx$4('resetIcon'),
|
|
10627
10660
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10628
10661
|
viewBox: "0 0 20 20",
|
|
10629
10662
|
width: "10",
|
|
10630
10663
|
height: "10"
|
|
10631
|
-
},
|
|
10664
|
+
}, React.createElement("path", {
|
|
10632
10665
|
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"
|
|
10633
10666
|
}));
|
|
10634
|
-
var defaultSubmit =
|
|
10635
|
-
className: cx$
|
|
10667
|
+
var defaultSubmit = React.createElement("svg", {
|
|
10668
|
+
className: cx$4('submitIcon'),
|
|
10636
10669
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10637
10670
|
width: "10",
|
|
10638
10671
|
height: "10",
|
|
10639
10672
|
viewBox: "0 0 40 40"
|
|
10640
|
-
},
|
|
10673
|
+
}, React.createElement("path", {
|
|
10641
10674
|
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"
|
|
10642
10675
|
}));
|
|
10643
10676
|
|
|
10644
|
-
var SearchBox
|
|
10677
|
+
var SearchBox =
|
|
10645
10678
|
/*#__PURE__*/
|
|
10646
10679
|
function (_Component) {
|
|
10647
10680
|
_inherits(SearchBox, _Component);
|
|
@@ -10803,16 +10836,16 @@ function (_Component) {
|
|
|
10803
10836
|
var isSearchStalled = this.props.showLoadingIndicator && this.props.isSearchStalled;
|
|
10804
10837
|
/* eslint-disable max-len */
|
|
10805
10838
|
|
|
10806
|
-
return
|
|
10807
|
-
className: classnames(cx$
|
|
10808
|
-
},
|
|
10839
|
+
return React.createElement("div", {
|
|
10840
|
+
className: classnames(cx$4(''), className)
|
|
10841
|
+
}, React.createElement("form", {
|
|
10809
10842
|
noValidate: true,
|
|
10810
10843
|
onSubmit: this.props.onSubmit ? this.props.onSubmit : this.onSubmit,
|
|
10811
10844
|
onReset: this.onReset,
|
|
10812
|
-
className: cx$
|
|
10845
|
+
className: cx$4('form', isSearchStalled && 'form--stalledSearch'),
|
|
10813
10846
|
action: "",
|
|
10814
10847
|
role: "search"
|
|
10815
|
-
},
|
|
10848
|
+
}, React.createElement("input", _extends({
|
|
10816
10849
|
ref: this.onInputMount,
|
|
10817
10850
|
type: "search",
|
|
10818
10851
|
placeholder: translate('placeholder'),
|
|
@@ -10826,19 +10859,19 @@ function (_Component) {
|
|
|
10826
10859
|
value: query,
|
|
10827
10860
|
onChange: this.onChange
|
|
10828
10861
|
}, searchInputEvents, {
|
|
10829
|
-
className: cx$
|
|
10830
|
-
})),
|
|
10862
|
+
className: cx$4('input')
|
|
10863
|
+
})), React.createElement("button", {
|
|
10831
10864
|
type: "submit",
|
|
10832
10865
|
title: translate('submitTitle'),
|
|
10833
|
-
className: cx$
|
|
10834
|
-
}, submit),
|
|
10866
|
+
className: cx$4('submit')
|
|
10867
|
+
}, submit), React.createElement("button", {
|
|
10835
10868
|
type: "reset",
|
|
10836
10869
|
title: translate('resetTitle'),
|
|
10837
|
-
className: cx$
|
|
10870
|
+
className: cx$4('reset'),
|
|
10838
10871
|
hidden: !query || isSearchStalled
|
|
10839
|
-
}, reset), this.props.showLoadingIndicator &&
|
|
10872
|
+
}, reset), this.props.showLoadingIndicator && React.createElement("span", {
|
|
10840
10873
|
hidden: !isSearchStalled,
|
|
10841
|
-
className: cx$
|
|
10874
|
+
className: cx$4('loadingIndicator')
|
|
10842
10875
|
}, loadingIndicator)));
|
|
10843
10876
|
/* eslint-enable */
|
|
10844
10877
|
}
|
|
@@ -10847,7 +10880,7 @@ function (_Component) {
|
|
|
10847
10880
|
return SearchBox;
|
|
10848
10881
|
}(Component);
|
|
10849
10882
|
|
|
10850
|
-
_defineProperty(SearchBox
|
|
10883
|
+
_defineProperty(SearchBox, "propTypes", {
|
|
10851
10884
|
currentRefinement: PropTypes.string,
|
|
10852
10885
|
className: PropTypes.string,
|
|
10853
10886
|
refine: PropTypes.func.isRequired,
|
|
@@ -10868,7 +10901,7 @@ _defineProperty(SearchBox$1, "propTypes", {
|
|
|
10868
10901
|
})])
|
|
10869
10902
|
});
|
|
10870
10903
|
|
|
10871
|
-
_defineProperty(SearchBox
|
|
10904
|
+
_defineProperty(SearchBox, "defaultProps", {
|
|
10872
10905
|
currentRefinement: '',
|
|
10873
10906
|
className: '',
|
|
10874
10907
|
focusShortcuts: ['s', '/'],
|
|
@@ -10881,11 +10914,11 @@ _defineProperty(SearchBox$1, "defaultProps", {
|
|
|
10881
10914
|
submit: defaultSubmit
|
|
10882
10915
|
});
|
|
10883
10916
|
|
|
10884
|
-
var SearchBox$
|
|
10917
|
+
var SearchBox$1 = translatable({
|
|
10885
10918
|
resetTitle: 'Clear the search query.',
|
|
10886
10919
|
submitTitle: 'Submit your search query.',
|
|
10887
10920
|
placeholder: 'Search here…'
|
|
10888
|
-
})(SearchBox
|
|
10921
|
+
})(SearchBox);
|
|
10889
10922
|
|
|
10890
10923
|
var itemsPropType$1 = PropTypes.arrayOf(PropTypes.shape({
|
|
10891
10924
|
value: PropTypes.any,
|
|
@@ -10931,10 +10964,10 @@ function (_Component) {
|
|
|
10931
10964
|
|
|
10932
10965
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
10933
10966
|
var itemHasChildren = item.items && Boolean(item.items.length);
|
|
10934
|
-
return
|
|
10967
|
+
return React.createElement("li", {
|
|
10935
10968
|
key: item.key || item.label,
|
|
10936
10969
|
className: _this.props.cx('item', item.isRefined && 'item--selected', item.noRefinement && 'item--noRefinement', itemHasChildren && 'item--parent')
|
|
10937
|
-
}, _this.props.renderItem(item, resetQuery), itemHasChildren &&
|
|
10970
|
+
}, _this.props.renderItem(item, resetQuery), itemHasChildren && React.createElement("ul", {
|
|
10938
10971
|
className: _this.props.cx('list', 'list--child')
|
|
10939
10972
|
}, item.items.slice(0, _this.getLimit()).map(function (child) {
|
|
10940
10973
|
return _this.renderItem(child, item);
|
|
@@ -10962,7 +10995,7 @@ function (_Component) {
|
|
|
10962
10995
|
return null;
|
|
10963
10996
|
}
|
|
10964
10997
|
|
|
10965
|
-
return
|
|
10998
|
+
return React.createElement("button", {
|
|
10966
10999
|
disabled: disabled,
|
|
10967
11000
|
className: cx('showMore', disabled && 'showMore--disabled'),
|
|
10968
11001
|
onClick: this.onShowMoreClick
|
|
@@ -10980,12 +11013,12 @@ function (_Component) {
|
|
|
10980
11013
|
translate = _this$props3.translate,
|
|
10981
11014
|
items = _this$props3.items,
|
|
10982
11015
|
selectItem = _this$props3.selectItem;
|
|
10983
|
-
var noResults = items.length === 0 && this.state.query !== '' ?
|
|
11016
|
+
var noResults = items.length === 0 && this.state.query !== '' ? React.createElement("div", {
|
|
10984
11017
|
className: cx('noResults')
|
|
10985
11018
|
}, translate('noResults')) : null;
|
|
10986
|
-
return
|
|
11019
|
+
return React.createElement("div", {
|
|
10987
11020
|
className: cx('searchBox')
|
|
10988
|
-
},
|
|
11021
|
+
}, React.createElement(SearchBox$1, {
|
|
10989
11022
|
currentRefinement: this.state.query,
|
|
10990
11023
|
refine: function refine(value) {
|
|
10991
11024
|
_this2.setState({
|
|
@@ -11021,7 +11054,7 @@ function (_Component) {
|
|
|
11021
11054
|
var rootClassName = classnames(cx('', !canRefine && '-noRefinement'), className);
|
|
11022
11055
|
|
|
11023
11056
|
if (items.length === 0) {
|
|
11024
|
-
return
|
|
11057
|
+
return React.createElement("div", {
|
|
11025
11058
|
className: rootClassName
|
|
11026
11059
|
}, searchBox);
|
|
11027
11060
|
} // Always limit the number of items we show on screen, since the actual
|
|
@@ -11029,9 +11062,9 @@ function (_Component) {
|
|
|
11029
11062
|
// option.
|
|
11030
11063
|
|
|
11031
11064
|
|
|
11032
|
-
return
|
|
11065
|
+
return React.createElement("div", {
|
|
11033
11066
|
className: rootClassName
|
|
11034
|
-
}, searchBox,
|
|
11067
|
+
}, searchBox, React.createElement("ul", {
|
|
11035
11068
|
className: cx('list', !canRefine && 'list--noRefinement')
|
|
11036
11069
|
}, items.slice(0, this.getLimit()).map(function (item) {
|
|
11037
11070
|
return _this3.renderItem(item, _this3.resetQuery);
|
|
@@ -11065,13 +11098,13 @@ _defineProperty(List, "defaultProps", {
|
|
|
11065
11098
|
isFromSearch: false
|
|
11066
11099
|
});
|
|
11067
11100
|
|
|
11068
|
-
var cx$
|
|
11069
|
-
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
11101
|
+
var cx$5 = createClassNames('HierarchicalMenu');
|
|
11102
|
+
var itemsPropType$2 = PropTypes.arrayOf(PropTypes.shape({
|
|
11070
11103
|
label: PropTypes.string.isRequired,
|
|
11071
11104
|
value: PropTypes.string,
|
|
11072
11105
|
count: PropTypes.number.isRequired,
|
|
11073
11106
|
items: function items() {
|
|
11074
|
-
return itemsPropType.apply(void 0, arguments);
|
|
11107
|
+
return itemsPropType$2.apply(void 0, arguments);
|
|
11075
11108
|
}
|
|
11076
11109
|
}));
|
|
11077
11110
|
|
|
@@ -11097,16 +11130,16 @@ function (_Component) {
|
|
|
11097
11130
|
var _this$props = _this.props,
|
|
11098
11131
|
createURL = _this$props.createURL,
|
|
11099
11132
|
refine = _this$props.refine;
|
|
11100
|
-
return
|
|
11101
|
-
className: cx$
|
|
11133
|
+
return React.createElement(Link, {
|
|
11134
|
+
className: cx$5('link'),
|
|
11102
11135
|
onClick: function onClick() {
|
|
11103
11136
|
return refine(item.value);
|
|
11104
11137
|
},
|
|
11105
11138
|
href: createURL(item.value)
|
|
11106
|
-
},
|
|
11107
|
-
className: cx$
|
|
11108
|
-
}, item.label), ' ',
|
|
11109
|
-
className: cx$
|
|
11139
|
+
}, React.createElement("span", {
|
|
11140
|
+
className: cx$5('label')
|
|
11141
|
+
}, item.label), ' ', React.createElement("span", {
|
|
11142
|
+
className: cx$5('count')
|
|
11110
11143
|
}, item.count));
|
|
11111
11144
|
});
|
|
11112
11145
|
|
|
@@ -11124,9 +11157,9 @@ function (_Component) {
|
|
|
11124
11157
|
showMoreLimit = _this$props2.showMoreLimit,
|
|
11125
11158
|
canRefine = _this$props2.canRefine,
|
|
11126
11159
|
className = _this$props2.className;
|
|
11127
|
-
return
|
|
11160
|
+
return React.createElement(List, {
|
|
11128
11161
|
renderItem: this.renderItem,
|
|
11129
|
-
cx: cx$
|
|
11162
|
+
cx: cx$5,
|
|
11130
11163
|
translate: translate,
|
|
11131
11164
|
items: items,
|
|
11132
11165
|
showMore: showMore,
|
|
@@ -11146,7 +11179,7 @@ _defineProperty(HierarchicalMenu, "propTypes", {
|
|
|
11146
11179
|
refine: PropTypes.func.isRequired,
|
|
11147
11180
|
createURL: PropTypes.func.isRequired,
|
|
11148
11181
|
canRefine: PropTypes.bool.isRequired,
|
|
11149
|
-
items: itemsPropType,
|
|
11182
|
+
items: itemsPropType$2,
|
|
11150
11183
|
showMore: PropTypes.bool,
|
|
11151
11184
|
className: PropTypes.string,
|
|
11152
11185
|
limit: PropTypes.number,
|
|
@@ -11255,12 +11288,12 @@ var HierarchicalMenu$1 = translatable({
|
|
|
11255
11288
|
*/
|
|
11256
11289
|
|
|
11257
11290
|
var HierarchicalMenuWidget = function HierarchicalMenuWidget(props) {
|
|
11258
|
-
return
|
|
11291
|
+
return React.createElement(PanelWrapper, props, React.createElement(HierarchicalMenu$1, props));
|
|
11259
11292
|
};
|
|
11260
11293
|
|
|
11261
11294
|
connectHierarchicalMenu(HierarchicalMenuWidget);
|
|
11262
11295
|
|
|
11263
|
-
var Highlight
|
|
11296
|
+
var Highlight = function Highlight(_ref) {
|
|
11264
11297
|
var cx = _ref.cx,
|
|
11265
11298
|
value = _ref.value,
|
|
11266
11299
|
highlightedTagName = _ref.highlightedTagName,
|
|
@@ -11268,11 +11301,11 @@ var Highlight$2 = function Highlight(_ref) {
|
|
|
11268
11301
|
nonHighlightedTagName = _ref.nonHighlightedTagName;
|
|
11269
11302
|
var TagName = isHighlighted ? highlightedTagName : nonHighlightedTagName;
|
|
11270
11303
|
var className = isHighlighted ? 'highlighted' : 'nonHighlighted';
|
|
11271
|
-
return
|
|
11304
|
+
return React.createElement(TagName, {
|
|
11272
11305
|
className: cx(className)
|
|
11273
11306
|
}, value);
|
|
11274
11307
|
};
|
|
11275
|
-
Highlight
|
|
11308
|
+
Highlight.propTypes = {
|
|
11276
11309
|
cx: PropTypes.func.isRequired,
|
|
11277
11310
|
value: PropTypes.string.isRequired,
|
|
11278
11311
|
isHighlighted: PropTypes.bool.isRequired,
|
|
@@ -11295,15 +11328,15 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11295
11328
|
attribute: attribute,
|
|
11296
11329
|
highlightProperty: highlightProperty
|
|
11297
11330
|
});
|
|
11298
|
-
return
|
|
11331
|
+
return React.createElement("span", {
|
|
11299
11332
|
className: classnames(cx(''), className)
|
|
11300
11333
|
}, parsedHighlightedValue.map(function (item, i) {
|
|
11301
11334
|
if (Array.isArray(item)) {
|
|
11302
11335
|
var isLast = i === parsedHighlightedValue.length - 1;
|
|
11303
|
-
return
|
|
11336
|
+
return React.createElement("span", {
|
|
11304
11337
|
key: i
|
|
11305
11338
|
}, item.map(function (element, index) {
|
|
11306
|
-
return
|
|
11339
|
+
return React.createElement(Highlight, {
|
|
11307
11340
|
cx: cx,
|
|
11308
11341
|
key: index,
|
|
11309
11342
|
value: element.value,
|
|
@@ -11311,12 +11344,12 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11311
11344
|
nonHighlightedTagName: nonHighlightedTagName,
|
|
11312
11345
|
isHighlighted: element.isHighlighted
|
|
11313
11346
|
});
|
|
11314
|
-
}), !isLast &&
|
|
11347
|
+
}), !isLast && React.createElement("span", {
|
|
11315
11348
|
className: cx('separator')
|
|
11316
11349
|
}, separator));
|
|
11317
11350
|
}
|
|
11318
11351
|
|
|
11319
|
-
return
|
|
11352
|
+
return React.createElement(Highlight, {
|
|
11320
11353
|
cx: cx,
|
|
11321
11354
|
key: i,
|
|
11322
11355
|
value: item.value,
|
|
@@ -11345,12 +11378,12 @@ Highlighter.defaultProps = {
|
|
|
11345
11378
|
separator: ', '
|
|
11346
11379
|
};
|
|
11347
11380
|
|
|
11348
|
-
var cx$
|
|
11381
|
+
var cx$6 = createClassNames('Highlight');
|
|
11349
11382
|
|
|
11350
11383
|
var Highlight$1 = function Highlight(props) {
|
|
11351
|
-
return
|
|
11384
|
+
return React.createElement(Highlighter, _extends({}, props, {
|
|
11352
11385
|
highlightProperty: "_highlightResult",
|
|
11353
|
-
cx: cx$
|
|
11386
|
+
cx: cx$6
|
|
11354
11387
|
}));
|
|
11355
11388
|
};
|
|
11356
11389
|
|
|
@@ -11395,12 +11428,12 @@ var Highlight$1 = function Highlight(props) {
|
|
|
11395
11428
|
* );
|
|
11396
11429
|
*/
|
|
11397
11430
|
|
|
11398
|
-
var Highlight = connectHighlight(Highlight$1);
|
|
11431
|
+
var Highlight$2 = connectHighlight(Highlight$1);
|
|
11399
11432
|
|
|
11400
|
-
var cx$
|
|
11433
|
+
var cx$7 = createClassNames('Hits');
|
|
11401
11434
|
|
|
11402
11435
|
var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
11403
|
-
return
|
|
11436
|
+
return React.createElement("div", {
|
|
11404
11437
|
style: {
|
|
11405
11438
|
borderBottom: '1px solid #bbb',
|
|
11406
11439
|
paddingBottom: '5px',
|
|
@@ -11410,21 +11443,21 @@ var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
|
11410
11443
|
}, JSON.stringify(props).slice(0, 100), "...");
|
|
11411
11444
|
};
|
|
11412
11445
|
|
|
11413
|
-
var Hits
|
|
11446
|
+
var Hits = function Hits(_ref) {
|
|
11414
11447
|
var hits = _ref.hits,
|
|
11415
11448
|
_ref$className = _ref.className,
|
|
11416
11449
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
11417
11450
|
_ref$hitComponent = _ref.hitComponent,
|
|
11418
11451
|
HitComponent = _ref$hitComponent === void 0 ? DefaultHitComponent : _ref$hitComponent;
|
|
11419
|
-
return
|
|
11420
|
-
className: classnames(cx$
|
|
11421
|
-
},
|
|
11422
|
-
className: cx$
|
|
11452
|
+
return React.createElement("div", {
|
|
11453
|
+
className: classnames(cx$7(''), className)
|
|
11454
|
+
}, React.createElement("ul", {
|
|
11455
|
+
className: cx$7('list')
|
|
11423
11456
|
}, hits.map(function (hit) {
|
|
11424
|
-
return
|
|
11425
|
-
className: cx$
|
|
11457
|
+
return React.createElement("li", {
|
|
11458
|
+
className: cx$7('item'),
|
|
11426
11459
|
key: hit.objectID
|
|
11427
|
-
},
|
|
11460
|
+
}, React.createElement(HitComponent, {
|
|
11428
11461
|
hit: hit
|
|
11429
11462
|
}));
|
|
11430
11463
|
})));
|
|
@@ -11433,7 +11466,7 @@ var Hits$1 = function Hits(_ref) {
|
|
|
11433
11466
|
var HitPropTypes = PropTypes.shape({
|
|
11434
11467
|
objectID: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11435
11468
|
});
|
|
11436
|
-
Hits
|
|
11469
|
+
Hits.propTypes = {
|
|
11437
11470
|
hits: PropTypes.arrayOf(HitPropTypes.isRequired).isRequired,
|
|
11438
11471
|
className: PropTypes.string,
|
|
11439
11472
|
hitComponent: PropTypes.func
|
|
@@ -11472,7 +11505,7 @@ Hits$1.propTypes = {
|
|
|
11472
11505
|
* );
|
|
11473
11506
|
*/
|
|
11474
11507
|
|
|
11475
|
-
var Hits = connectHits(Hits
|
|
11508
|
+
var Hits$1 = connectHits(Hits);
|
|
11476
11509
|
|
|
11477
11510
|
var Select =
|
|
11478
11511
|
/*#__PURE__*/
|
|
@@ -11506,12 +11539,12 @@ function (_Component) {
|
|
|
11506
11539
|
cx = _this$props.cx,
|
|
11507
11540
|
items = _this$props.items,
|
|
11508
11541
|
selectedItem = _this$props.selectedItem;
|
|
11509
|
-
return
|
|
11542
|
+
return React.createElement("select", {
|
|
11510
11543
|
className: cx('select'),
|
|
11511
11544
|
value: selectedItem,
|
|
11512
11545
|
onChange: this.onChange
|
|
11513
11546
|
}, items.map(function (item) {
|
|
11514
|
-
return
|
|
11547
|
+
return React.createElement("option", {
|
|
11515
11548
|
className: cx('option'),
|
|
11516
11549
|
key: item.key === undefined ? item.value : item.key,
|
|
11517
11550
|
disabled: item.disabled,
|
|
@@ -11536,7 +11569,7 @@ _defineProperty(Select, "propTypes", {
|
|
|
11536
11569
|
selectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11537
11570
|
});
|
|
11538
11571
|
|
|
11539
|
-
var cx$
|
|
11572
|
+
var cx$8 = createClassNames('HitsPerPage');
|
|
11540
11573
|
|
|
11541
11574
|
var HitsPerPage =
|
|
11542
11575
|
/*#__PURE__*/
|
|
@@ -11557,13 +11590,13 @@ function (_Component) {
|
|
|
11557
11590
|
currentRefinement = _this$props.currentRefinement,
|
|
11558
11591
|
refine = _this$props.refine,
|
|
11559
11592
|
className = _this$props.className;
|
|
11560
|
-
return
|
|
11561
|
-
className: classnames(cx$
|
|
11562
|
-
},
|
|
11593
|
+
return React.createElement("div", {
|
|
11594
|
+
className: classnames(cx$8(''), className)
|
|
11595
|
+
}, React.createElement(Select, {
|
|
11563
11596
|
onSelect: refine,
|
|
11564
11597
|
selectedItem: currentRefinement,
|
|
11565
11598
|
items: items,
|
|
11566
|
-
cx: cx$
|
|
11599
|
+
cx: cx$8
|
|
11567
11600
|
}));
|
|
11568
11601
|
}
|
|
11569
11602
|
}]);
|
|
@@ -11629,7 +11662,7 @@ _defineProperty(HitsPerPage, "defaultProps", {
|
|
|
11629
11662
|
|
|
11630
11663
|
connectHitsPerPage(HitsPerPage);
|
|
11631
11664
|
|
|
11632
|
-
var cx$
|
|
11665
|
+
var cx$9 = createClassNames('InfiniteHits');
|
|
11633
11666
|
|
|
11634
11667
|
var InfiniteHits =
|
|
11635
11668
|
/*#__PURE__*/
|
|
@@ -11655,25 +11688,25 @@ function (_Component) {
|
|
|
11655
11688
|
refineNext = _this$props.refineNext,
|
|
11656
11689
|
translate = _this$props.translate,
|
|
11657
11690
|
className = _this$props.className;
|
|
11658
|
-
return
|
|
11659
|
-
className: classnames(cx$
|
|
11660
|
-
}, showPrevious &&
|
|
11661
|
-
className: cx$
|
|
11691
|
+
return React.createElement("div", {
|
|
11692
|
+
className: classnames(cx$9(''), className)
|
|
11693
|
+
}, showPrevious && React.createElement("button", {
|
|
11694
|
+
className: cx$9('loadPrevious', !hasPrevious && 'loadPrevious--disabled'),
|
|
11662
11695
|
onClick: function onClick() {
|
|
11663
11696
|
return refinePrevious();
|
|
11664
11697
|
},
|
|
11665
11698
|
disabled: !hasPrevious
|
|
11666
|
-
}, translate('loadPrevious')),
|
|
11667
|
-
className: cx$
|
|
11699
|
+
}, translate('loadPrevious')), React.createElement("ul", {
|
|
11700
|
+
className: cx$9('list')
|
|
11668
11701
|
}, hits.map(function (hit) {
|
|
11669
|
-
return
|
|
11702
|
+
return React.createElement("li", {
|
|
11670
11703
|
key: hit.objectID,
|
|
11671
|
-
className: cx$
|
|
11672
|
-
},
|
|
11704
|
+
className: cx$9('item')
|
|
11705
|
+
}, React.createElement(HitComponent, {
|
|
11673
11706
|
hit: hit
|
|
11674
11707
|
}));
|
|
11675
|
-
})),
|
|
11676
|
-
className: cx$
|
|
11708
|
+
})), React.createElement("button", {
|
|
11709
|
+
className: cx$9('loadMore', !hasMore && 'loadMore--disabled'),
|
|
11677
11710
|
onClick: function onClick() {
|
|
11678
11711
|
return refineNext();
|
|
11679
11712
|
},
|
|
@@ -11700,7 +11733,7 @@ InfiniteHits.defaultProps = {
|
|
|
11700
11733
|
className: '',
|
|
11701
11734
|
showPrevious: false,
|
|
11702
11735
|
hitComponent: function hitComponent(hit) {
|
|
11703
|
-
return
|
|
11736
|
+
return React.createElement("div", {
|
|
11704
11737
|
style: {
|
|
11705
11738
|
borderBottom: '1px solid #bbb',
|
|
11706
11739
|
paddingBottom: '5px',
|
|
@@ -11754,7 +11787,7 @@ var InfiniteHits$1 = translatable({
|
|
|
11754
11787
|
|
|
11755
11788
|
connectInfiniteHits(InfiniteHits$1);
|
|
11756
11789
|
|
|
11757
|
-
var cx$
|
|
11790
|
+
var cx$a = createClassNames('Menu');
|
|
11758
11791
|
|
|
11759
11792
|
var Menu =
|
|
11760
11793
|
/*#__PURE__*/
|
|
@@ -11776,20 +11809,20 @@ function (_Component) {
|
|
|
11776
11809
|
|
|
11777
11810
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
11778
11811
|
var createURL = _this.props.createURL;
|
|
11779
|
-
var label = _this.props.isFromSearch ?
|
|
11812
|
+
var label = _this.props.isFromSearch ? React.createElement(Highlight$2, {
|
|
11780
11813
|
attribute: "label",
|
|
11781
11814
|
hit: item
|
|
11782
11815
|
}) : item.label;
|
|
11783
|
-
return
|
|
11784
|
-
className: cx$
|
|
11816
|
+
return React.createElement(Link, {
|
|
11817
|
+
className: cx$a('link'),
|
|
11785
11818
|
onClick: function onClick() {
|
|
11786
11819
|
return _this.selectItem(item, resetQuery);
|
|
11787
11820
|
},
|
|
11788
11821
|
href: createURL(item.value)
|
|
11789
|
-
},
|
|
11790
|
-
className: cx$
|
|
11791
|
-
}, label), ' ',
|
|
11792
|
-
className: cx$
|
|
11822
|
+
}, React.createElement("span", {
|
|
11823
|
+
className: cx$a('label')
|
|
11824
|
+
}, label), ' ', React.createElement("span", {
|
|
11825
|
+
className: cx$a('count')
|
|
11793
11826
|
}, item.count));
|
|
11794
11827
|
});
|
|
11795
11828
|
|
|
@@ -11816,10 +11849,10 @@ function (_Component) {
|
|
|
11816
11849
|
searchable = _this$props.searchable,
|
|
11817
11850
|
canRefine = _this$props.canRefine,
|
|
11818
11851
|
className = _this$props.className;
|
|
11819
|
-
return
|
|
11852
|
+
return React.createElement(List, {
|
|
11820
11853
|
renderItem: this.renderItem,
|
|
11821
11854
|
selectItem: this.selectItem,
|
|
11822
|
-
cx: cx$
|
|
11855
|
+
cx: cx$a,
|
|
11823
11856
|
translate: translate,
|
|
11824
11857
|
items: items,
|
|
11825
11858
|
showMore: showMore,
|
|
@@ -11924,12 +11957,12 @@ var Menu$1 = translatable({
|
|
|
11924
11957
|
*/
|
|
11925
11958
|
|
|
11926
11959
|
var MenuWidget = function MenuWidget(props) {
|
|
11927
|
-
return
|
|
11960
|
+
return React.createElement(PanelWrapper, props, React.createElement(Menu$1, props));
|
|
11928
11961
|
};
|
|
11929
11962
|
|
|
11930
11963
|
connectMenu(MenuWidget);
|
|
11931
11964
|
|
|
11932
|
-
var cx$
|
|
11965
|
+
var cx$b = createClassNames('MenuSelect');
|
|
11933
11966
|
|
|
11934
11967
|
var MenuSelect =
|
|
11935
11968
|
/*#__PURE__*/
|
|
@@ -11966,27 +11999,27 @@ function (_Component) {
|
|
|
11966
11999
|
canRefine = _this$props.canRefine,
|
|
11967
12000
|
translate = _this$props.translate,
|
|
11968
12001
|
className = _this$props.className;
|
|
11969
|
-
return
|
|
11970
|
-
className: classnames(cx$
|
|
11971
|
-
},
|
|
12002
|
+
return React.createElement("div", {
|
|
12003
|
+
className: classnames(cx$b('', !canRefine && '-noRefinement'), className)
|
|
12004
|
+
}, React.createElement("select", {
|
|
11972
12005
|
value: this.selectedValue,
|
|
11973
12006
|
onChange: this.handleSelectChange,
|
|
11974
|
-
className: cx$
|
|
11975
|
-
},
|
|
12007
|
+
className: cx$b('select')
|
|
12008
|
+
}, React.createElement("option", {
|
|
11976
12009
|
value: "ais__see__all__option",
|
|
11977
|
-
className: cx$
|
|
12010
|
+
className: cx$b('option')
|
|
11978
12011
|
}, translate('seeAllOption')), items.map(function (item) {
|
|
11979
|
-
return
|
|
12012
|
+
return React.createElement("option", {
|
|
11980
12013
|
key: item.value,
|
|
11981
12014
|
value: item.value,
|
|
11982
|
-
className: cx$
|
|
12015
|
+
className: cx$b('option')
|
|
11983
12016
|
}, item.label, " (", item.count, ")");
|
|
11984
12017
|
})));
|
|
11985
12018
|
}
|
|
11986
12019
|
}, {
|
|
11987
12020
|
key: "selectedValue",
|
|
11988
12021
|
get: function get() {
|
|
11989
|
-
var _ref2 = find(this.props.items, function (item) {
|
|
12022
|
+
var _ref2 = find$2(this.props.items, function (item) {
|
|
11990
12023
|
return item.isRefined === true;
|
|
11991
12024
|
}) || {
|
|
11992
12025
|
value: 'ais__see__all__option'
|
|
@@ -12058,12 +12091,12 @@ var MenuSelect$1 = translatable({
|
|
|
12058
12091
|
*/
|
|
12059
12092
|
|
|
12060
12093
|
var MenuSelectWidget = function MenuSelectWidget(props) {
|
|
12061
|
-
return
|
|
12094
|
+
return React.createElement(PanelWrapper, props, React.createElement(MenuSelect$1, props));
|
|
12062
12095
|
};
|
|
12063
12096
|
|
|
12064
12097
|
connectMenu(MenuSelectWidget);
|
|
12065
12098
|
|
|
12066
|
-
var cx$
|
|
12099
|
+
var cx$c = createClassNames('NumericMenu');
|
|
12067
12100
|
|
|
12068
12101
|
var NumericMenu =
|
|
12069
12102
|
/*#__PURE__*/
|
|
@@ -12087,18 +12120,18 @@ function (_Component) {
|
|
|
12087
12120
|
var _this$props = _this.props,
|
|
12088
12121
|
refine = _this$props.refine,
|
|
12089
12122
|
translate = _this$props.translate;
|
|
12090
|
-
return
|
|
12091
|
-
className: cx$
|
|
12092
|
-
},
|
|
12093
|
-
className: cx$
|
|
12123
|
+
return React.createElement("label", {
|
|
12124
|
+
className: cx$c('label')
|
|
12125
|
+
}, React.createElement("input", {
|
|
12126
|
+
className: cx$c('radio'),
|
|
12094
12127
|
type: "radio",
|
|
12095
12128
|
checked: item.isRefined,
|
|
12096
12129
|
disabled: item.noRefinement,
|
|
12097
12130
|
onChange: function onChange() {
|
|
12098
12131
|
return refine(item.value);
|
|
12099
12132
|
}
|
|
12100
|
-
}),
|
|
12101
|
-
className: cx$
|
|
12133
|
+
}), React.createElement("span", {
|
|
12134
|
+
className: cx$c('labelText')
|
|
12102
12135
|
}, item.value === '' ? translate('all') : item.label));
|
|
12103
12136
|
});
|
|
12104
12137
|
|
|
@@ -12112,11 +12145,11 @@ function (_Component) {
|
|
|
12112
12145
|
items = _this$props2.items,
|
|
12113
12146
|
canRefine = _this$props2.canRefine,
|
|
12114
12147
|
className = _this$props2.className;
|
|
12115
|
-
return
|
|
12148
|
+
return React.createElement(List, {
|
|
12116
12149
|
renderItem: this.renderItem,
|
|
12117
12150
|
showMore: false,
|
|
12118
12151
|
canRefine: canRefine,
|
|
12119
|
-
cx: cx$
|
|
12152
|
+
cx: cx$c,
|
|
12120
12153
|
items: items.map(function (item) {
|
|
12121
12154
|
return _objectSpread({}, item, {
|
|
12122
12155
|
key: item.value
|
|
@@ -12198,7 +12231,7 @@ var NumericMenu$1 = translatable({
|
|
|
12198
12231
|
*/
|
|
12199
12232
|
|
|
12200
12233
|
var NumericMenuWidget = function NumericMenuWidget(props) {
|
|
12201
|
-
return
|
|
12234
|
+
return React.createElement(PanelWrapper, props, React.createElement(NumericMenu$1, props));
|
|
12202
12235
|
};
|
|
12203
12236
|
|
|
12204
12237
|
connectNumericMenu(NumericMenuWidget);
|
|
@@ -12223,15 +12256,15 @@ function (_Component) {
|
|
|
12223
12256
|
items = _this$props.items,
|
|
12224
12257
|
onSelect = _this$props.onSelect,
|
|
12225
12258
|
canRefine = _this$props.canRefine;
|
|
12226
|
-
return
|
|
12259
|
+
return React.createElement("ul", {
|
|
12227
12260
|
className: cx('list', !canRefine && 'list--noRefinement')
|
|
12228
12261
|
}, items.map(function (item) {
|
|
12229
|
-
return
|
|
12262
|
+
return React.createElement("li", {
|
|
12230
12263
|
key: item.key === undefined ? item.value : item.key,
|
|
12231
12264
|
className: cx('item', item.selected && !item.disabled && 'item--selected', item.disabled && 'item--disabled', item.modifier)
|
|
12232
|
-
}, item.disabled ?
|
|
12265
|
+
}, item.disabled ? React.createElement("span", {
|
|
12233
12266
|
className: cx('link')
|
|
12234
|
-
}, item.label === undefined ? item.value : item.label) :
|
|
12267
|
+
}, item.label === undefined ? item.value : item.label) : React.createElement(Link, {
|
|
12235
12268
|
className: cx('link', item.selected && 'link--selected'),
|
|
12236
12269
|
"aria-label": item.ariaLabel,
|
|
12237
12270
|
href: createURL(item.value),
|
|
@@ -12261,7 +12294,7 @@ _defineProperty(LinkList, "propTypes", {
|
|
|
12261
12294
|
canRefine: PropTypes.bool.isRequired
|
|
12262
12295
|
});
|
|
12263
12296
|
|
|
12264
|
-
var cx$
|
|
12297
|
+
var cx$d = createClassNames('Pagination'); // Determines the size of the widget (the number of pages displayed - that the user can directly click on)
|
|
12265
12298
|
|
|
12266
12299
|
function calculateSize(padding, maxPages) {
|
|
12267
12300
|
return Math.min(2 * padding + 1, maxPages);
|
|
@@ -12297,7 +12330,7 @@ function getPages(currentPage, maxPages, padding) {
|
|
|
12297
12330
|
});
|
|
12298
12331
|
}
|
|
12299
12332
|
|
|
12300
|
-
var Pagination
|
|
12333
|
+
var Pagination =
|
|
12301
12334
|
/*#__PURE__*/
|
|
12302
12335
|
function (_Component) {
|
|
12303
12336
|
_inherits(Pagination, _Component);
|
|
@@ -12403,10 +12436,10 @@ function (_Component) {
|
|
|
12403
12436
|
});
|
|
12404
12437
|
}
|
|
12405
12438
|
|
|
12406
|
-
return
|
|
12407
|
-
className: classnames(cx$
|
|
12408
|
-
},
|
|
12409
|
-
cx: cx$
|
|
12439
|
+
return React.createElement("div", {
|
|
12440
|
+
className: classnames(cx$d('', !canRefine && '-noRefinement'), className)
|
|
12441
|
+
}, React.createElement(ListComponent, _extends({}, otherProps, {
|
|
12442
|
+
cx: cx$d,
|
|
12410
12443
|
items: items,
|
|
12411
12444
|
onSelect: refine,
|
|
12412
12445
|
createURL: createURL,
|
|
@@ -12418,7 +12451,7 @@ function (_Component) {
|
|
|
12418
12451
|
return Pagination;
|
|
12419
12452
|
}(Component);
|
|
12420
12453
|
|
|
12421
|
-
_defineProperty(Pagination
|
|
12454
|
+
_defineProperty(Pagination, "propTypes", {
|
|
12422
12455
|
nbPages: PropTypes.number.isRequired,
|
|
12423
12456
|
currentRefinement: PropTypes.number.isRequired,
|
|
12424
12457
|
refine: PropTypes.func.isRequired,
|
|
@@ -12435,7 +12468,7 @@ _defineProperty(Pagination$1, "propTypes", {
|
|
|
12435
12468
|
className: PropTypes.string
|
|
12436
12469
|
});
|
|
12437
12470
|
|
|
12438
|
-
_defineProperty(Pagination
|
|
12471
|
+
_defineProperty(Pagination, "defaultProps", {
|
|
12439
12472
|
listComponent: LinkList,
|
|
12440
12473
|
showFirst: true,
|
|
12441
12474
|
showPrevious: true,
|
|
@@ -12446,7 +12479,7 @@ _defineProperty(Pagination$1, "defaultProps", {
|
|
|
12446
12479
|
className: ''
|
|
12447
12480
|
});
|
|
12448
12481
|
|
|
12449
|
-
var Pagination$
|
|
12482
|
+
var Pagination$1 = translatable({
|
|
12450
12483
|
previous: '‹',
|
|
12451
12484
|
next: '›',
|
|
12452
12485
|
first: '«',
|
|
@@ -12461,7 +12494,7 @@ var Pagination$2 = translatable({
|
|
|
12461
12494
|
ariaPage: function ariaPage(currentRefinement) {
|
|
12462
12495
|
return "Page ".concat(currentRefinement.toString());
|
|
12463
12496
|
}
|
|
12464
|
-
})(Pagination
|
|
12497
|
+
})(Pagination);
|
|
12465
12498
|
|
|
12466
12499
|
/**
|
|
12467
12500
|
* The Pagination widget displays a simple pagination system allowing the user to
|
|
@@ -12518,23 +12551,23 @@ var Pagination$2 = translatable({
|
|
|
12518
12551
|
*/
|
|
12519
12552
|
|
|
12520
12553
|
var PaginationWidget = function PaginationWidget(props) {
|
|
12521
|
-
return
|
|
12554
|
+
return React.createElement(PanelWrapper, props, React.createElement(Pagination$1, props));
|
|
12522
12555
|
};
|
|
12523
12556
|
|
|
12524
|
-
var Pagination = connectPagination(PaginationWidget);
|
|
12557
|
+
var Pagination$2 = connectPagination(PaginationWidget);
|
|
12525
12558
|
|
|
12526
|
-
var cx$
|
|
12559
|
+
var cx$e = createClassNames('PoweredBy');
|
|
12527
12560
|
/* eslint-disable max-len */
|
|
12528
12561
|
|
|
12529
12562
|
var AlgoliaLogo = function AlgoliaLogo() {
|
|
12530
|
-
return
|
|
12563
|
+
return React.createElement("svg", {
|
|
12531
12564
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12532
12565
|
baseProfile: "basic",
|
|
12533
12566
|
viewBox: "0 0 1366 362",
|
|
12534
12567
|
width: "100",
|
|
12535
12568
|
height: "27",
|
|
12536
|
-
className: cx$
|
|
12537
|
-
},
|
|
12569
|
+
className: cx$e('logo')
|
|
12570
|
+
}, React.createElement("linearGradient", {
|
|
12538
12571
|
id: "g",
|
|
12539
12572
|
x1: "428.258",
|
|
12540
12573
|
x2: "434.145",
|
|
@@ -12542,19 +12575,19 @@ var AlgoliaLogo = function AlgoliaLogo() {
|
|
|
12542
12575
|
y2: "409.85",
|
|
12543
12576
|
gradientUnits: "userSpaceOnUse",
|
|
12544
12577
|
gradientTransform: "matrix(94.045 0 0 -94.072 -40381.527 38479.52)"
|
|
12545
|
-
},
|
|
12578
|
+
}, React.createElement("stop", {
|
|
12546
12579
|
offset: "0",
|
|
12547
12580
|
stopColor: "#00AEFF"
|
|
12548
|
-
}),
|
|
12581
|
+
}), React.createElement("stop", {
|
|
12549
12582
|
offset: "1",
|
|
12550
12583
|
stopColor: "#3369E7"
|
|
12551
|
-
})),
|
|
12584
|
+
})), React.createElement("path", {
|
|
12552
12585
|
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",
|
|
12553
12586
|
fill: "url(#g)"
|
|
12554
|
-
}),
|
|
12587
|
+
}), React.createElement("path", {
|
|
12555
12588
|
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",
|
|
12556
12589
|
fill: "#FFFFFF"
|
|
12557
|
-
}),
|
|
12590
|
+
}), React.createElement("path", {
|
|
12558
12591
|
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",
|
|
12559
12592
|
fill: "#182359"
|
|
12560
12593
|
}));
|
|
@@ -12580,17 +12613,17 @@ function (_Component) {
|
|
|
12580
12613
|
url = _this$props.url,
|
|
12581
12614
|
translate = _this$props.translate,
|
|
12582
12615
|
className = _this$props.className;
|
|
12583
|
-
return
|
|
12584
|
-
className: classnames(cx$
|
|
12585
|
-
},
|
|
12586
|
-
className: cx$
|
|
12587
|
-
}, translate('searchBy')), ' ',
|
|
12616
|
+
return React.createElement("div", {
|
|
12617
|
+
className: classnames(cx$e(''), className)
|
|
12618
|
+
}, React.createElement("span", {
|
|
12619
|
+
className: cx$e('text')
|
|
12620
|
+
}, translate('searchBy')), ' ', React.createElement("a", {
|
|
12588
12621
|
href: url,
|
|
12589
12622
|
target: "_blank",
|
|
12590
|
-
className: cx$
|
|
12623
|
+
className: cx$e('link'),
|
|
12591
12624
|
"aria-label": "Algolia",
|
|
12592
12625
|
rel: "noopener noreferrer"
|
|
12593
|
-
},
|
|
12626
|
+
}, React.createElement(AlgoliaLogo, null)));
|
|
12594
12627
|
}
|
|
12595
12628
|
}]);
|
|
12596
12629
|
|
|
@@ -12640,7 +12673,7 @@ var PoweredBy$1 = translatable({
|
|
|
12640
12673
|
|
|
12641
12674
|
connectPoweredBy(PoweredBy$1);
|
|
12642
12675
|
|
|
12643
|
-
var cx$
|
|
12676
|
+
var cx$f = createClassNames('RangeInput');
|
|
12644
12677
|
var RawRangeInput =
|
|
12645
12678
|
/*#__PURE__*/
|
|
12646
12679
|
function (_Component) {
|
|
@@ -12719,13 +12752,13 @@ function (_Component) {
|
|
|
12719
12752
|
max = _this$normalizeRangeF.max;
|
|
12720
12753
|
|
|
12721
12754
|
var step = 1 / Math.pow(10, precision);
|
|
12722
|
-
return
|
|
12723
|
-
className: classnames(cx$
|
|
12724
|
-
},
|
|
12725
|
-
className: cx$
|
|
12755
|
+
return React.createElement("div", {
|
|
12756
|
+
className: classnames(cx$f('', !canRefine && '-noRefinement'), className)
|
|
12757
|
+
}, React.createElement("form", {
|
|
12758
|
+
className: cx$f('form'),
|
|
12726
12759
|
onSubmit: this.onSubmit
|
|
12727
|
-
},
|
|
12728
|
-
className: cx$
|
|
12760
|
+
}, React.createElement("input", {
|
|
12761
|
+
className: cx$f('input', 'input--min'),
|
|
12729
12762
|
type: "number",
|
|
12730
12763
|
min: min,
|
|
12731
12764
|
max: max,
|
|
@@ -12738,10 +12771,10 @@ function (_Component) {
|
|
|
12738
12771
|
from: e.currentTarget.value
|
|
12739
12772
|
});
|
|
12740
12773
|
}
|
|
12741
|
-
}),
|
|
12742
|
-
className: cx$
|
|
12743
|
-
}, translate('separator')),
|
|
12744
|
-
className: cx$
|
|
12774
|
+
}), React.createElement("span", {
|
|
12775
|
+
className: cx$f('separator')
|
|
12776
|
+
}, translate('separator')), React.createElement("input", {
|
|
12777
|
+
className: cx$f('input', 'input--max'),
|
|
12745
12778
|
type: "number",
|
|
12746
12779
|
min: min,
|
|
12747
12780
|
max: max,
|
|
@@ -12754,8 +12787,8 @@ function (_Component) {
|
|
|
12754
12787
|
to: e.currentTarget.value
|
|
12755
12788
|
});
|
|
12756
12789
|
}
|
|
12757
|
-
}),
|
|
12758
|
-
className: cx$
|
|
12790
|
+
}), React.createElement("button", {
|
|
12791
|
+
className: cx$f('submit'),
|
|
12759
12792
|
type: "submit"
|
|
12760
12793
|
}, translate('submit'))));
|
|
12761
12794
|
}
|
|
@@ -12831,12 +12864,12 @@ var RangeInput = translatable({
|
|
|
12831
12864
|
*/
|
|
12832
12865
|
|
|
12833
12866
|
var RangeInputWidget = function RangeInputWidget(props) {
|
|
12834
|
-
return
|
|
12867
|
+
return React.createElement(PanelWrapper, props, React.createElement(RangeInput, props));
|
|
12835
12868
|
};
|
|
12836
12869
|
|
|
12837
12870
|
connectRange(RangeInputWidget);
|
|
12838
12871
|
|
|
12839
|
-
var cx$
|
|
12872
|
+
var cx$g = createClassNames('RatingMenu');
|
|
12840
12873
|
|
|
12841
12874
|
var RatingMenu =
|
|
12842
12875
|
/*#__PURE__*/
|
|
@@ -12887,14 +12920,14 @@ function (_Component) {
|
|
|
12887
12920
|
rating++;
|
|
12888
12921
|
}
|
|
12889
12922
|
|
|
12890
|
-
icons.push([
|
|
12923
|
+
icons.push([React.createElement("svg", {
|
|
12891
12924
|
key: icon,
|
|
12892
|
-
className: cx$
|
|
12925
|
+
className: cx$g('starIcon', icon >= lowerBound ? 'starIcon--empty' : 'starIcon--full'),
|
|
12893
12926
|
"aria-hidden": "true",
|
|
12894
12927
|
width: "24",
|
|
12895
12928
|
height: "24"
|
|
12896
|
-
},
|
|
12897
|
-
xlinkHref: "#".concat(cx$
|
|
12929
|
+
}, React.createElement("use", {
|
|
12930
|
+
xlinkHref: "#".concat(cx$g(icon >= lowerBound ? 'starEmptySymbol' : 'starSymbol'))
|
|
12898
12931
|
})), ' ']);
|
|
12899
12932
|
} // The last item of the list (the default item), should not
|
|
12900
12933
|
// be clickable if it is selected.
|
|
@@ -12908,17 +12941,17 @@ function (_Component) {
|
|
|
12908
12941
|
}),
|
|
12909
12942
|
onClick: this.onClick.bind(this, lowerBound, max)
|
|
12910
12943
|
};
|
|
12911
|
-
return
|
|
12944
|
+
return React.createElement("li", {
|
|
12912
12945
|
key: lowerBound,
|
|
12913
|
-
className: cx$
|
|
12914
|
-
},
|
|
12915
|
-
className: cx$
|
|
12946
|
+
className: cx$g('item', selected && 'item--selected', disabled && 'item--disabled')
|
|
12947
|
+
}, React.createElement("a", _extends({
|
|
12948
|
+
className: cx$g('link'),
|
|
12916
12949
|
"aria-label": "".concat(rating).concat(translate('ratingLabel'))
|
|
12917
|
-
}, onClickHandler), icons,
|
|
12918
|
-
className: cx$
|
|
12950
|
+
}, onClickHandler), icons, React.createElement("span", {
|
|
12951
|
+
className: cx$g('label'),
|
|
12919
12952
|
"aria-hidden": "true"
|
|
12920
|
-
}, translate('ratingLabel')), ' ',
|
|
12921
|
-
className: cx$
|
|
12953
|
+
}, translate('ratingLabel')), ' ', React.createElement("span", {
|
|
12954
|
+
className: cx$g('count')
|
|
12922
12955
|
}, count)));
|
|
12923
12956
|
}
|
|
12924
12957
|
}, {
|
|
@@ -12950,7 +12983,7 @@ function (_Component) {
|
|
|
12950
12983
|
start: 0,
|
|
12951
12984
|
end: Math.max(inclusiveLength, 0)
|
|
12952
12985
|
}).map(function (index) {
|
|
12953
|
-
var element = find(values, function (item) {
|
|
12986
|
+
var element = find$2(values, function (item) {
|
|
12954
12987
|
return item.value === limitMax - index;
|
|
12955
12988
|
});
|
|
12956
12989
|
var placeholder = {
|
|
@@ -12973,25 +13006,25 @@ function (_Component) {
|
|
|
12973
13006
|
createURL: createURL
|
|
12974
13007
|
});
|
|
12975
13008
|
});
|
|
12976
|
-
return
|
|
12977
|
-
className: classnames(cx$
|
|
12978
|
-
},
|
|
13009
|
+
return React.createElement("div", {
|
|
13010
|
+
className: classnames(cx$g('', !canRefine && '-noRefinement'), className)
|
|
13011
|
+
}, React.createElement("svg", {
|
|
12979
13012
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12980
13013
|
style: {
|
|
12981
13014
|
display: 'none'
|
|
12982
13015
|
}
|
|
12983
|
-
},
|
|
12984
|
-
id: cx$
|
|
13016
|
+
}, React.createElement("symbol", {
|
|
13017
|
+
id: cx$g('starSymbol'),
|
|
12985
13018
|
viewBox: "0 0 24 24"
|
|
12986
|
-
},
|
|
13019
|
+
}, React.createElement("path", {
|
|
12987
13020
|
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"
|
|
12988
|
-
})),
|
|
12989
|
-
id: cx$
|
|
13021
|
+
})), React.createElement("symbol", {
|
|
13022
|
+
id: cx$g('starEmptySymbol'),
|
|
12990
13023
|
viewBox: "0 0 24 24"
|
|
12991
|
-
},
|
|
13024
|
+
}, React.createElement("path", {
|
|
12992
13025
|
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"
|
|
12993
|
-
}))),
|
|
12994
|
-
className: cx$
|
|
13026
|
+
}))), React.createElement("ul", {
|
|
13027
|
+
className: cx$g('list', !canRefine && 'list--noRefinement')
|
|
12995
13028
|
}, items));
|
|
12996
13029
|
}
|
|
12997
13030
|
}]);
|
|
@@ -13074,12 +13107,12 @@ var RatingMenu$1 = translatable({
|
|
|
13074
13107
|
*/
|
|
13075
13108
|
|
|
13076
13109
|
var RatingMenuWidget = function RatingMenuWidget(props) {
|
|
13077
|
-
return
|
|
13110
|
+
return React.createElement(PanelWrapper, props, React.createElement(RatingMenu$1, props));
|
|
13078
13111
|
};
|
|
13079
13112
|
|
|
13080
13113
|
connectRange(RatingMenuWidget);
|
|
13081
13114
|
|
|
13082
|
-
var cx$
|
|
13115
|
+
var cx$h = createClassNames('RefinementList');
|
|
13083
13116
|
|
|
13084
13117
|
var RefinementList$1 =
|
|
13085
13118
|
/*#__PURE__*/
|
|
@@ -13110,23 +13143,23 @@ function (_Component) {
|
|
|
13110
13143
|
});
|
|
13111
13144
|
|
|
13112
13145
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
13113
|
-
var label = _this.props.isFromSearch ?
|
|
13146
|
+
var label = _this.props.isFromSearch ? React.createElement(Highlight$2, {
|
|
13114
13147
|
attribute: "label",
|
|
13115
13148
|
hit: item
|
|
13116
13149
|
}) : item.label;
|
|
13117
|
-
return
|
|
13118
|
-
className: cx$
|
|
13119
|
-
},
|
|
13120
|
-
className: cx$
|
|
13150
|
+
return React.createElement("label", {
|
|
13151
|
+
className: cx$h('label')
|
|
13152
|
+
}, React.createElement("input", {
|
|
13153
|
+
className: cx$h('checkbox'),
|
|
13121
13154
|
type: "checkbox",
|
|
13122
13155
|
checked: item.isRefined,
|
|
13123
13156
|
onChange: function onChange() {
|
|
13124
13157
|
return _this.selectItem(item, resetQuery);
|
|
13125
13158
|
}
|
|
13126
|
-
}),
|
|
13127
|
-
className: cx$
|
|
13128
|
-
}, label), ' ',
|
|
13129
|
-
className: cx$
|
|
13159
|
+
}), React.createElement("span", {
|
|
13160
|
+
className: cx$h('labelText')
|
|
13161
|
+
}, label), ' ', React.createElement("span", {
|
|
13162
|
+
className: cx$h('count')
|
|
13130
13163
|
}, item.count.toLocaleString()));
|
|
13131
13164
|
});
|
|
13132
13165
|
|
|
@@ -13147,10 +13180,10 @@ function (_Component) {
|
|
|
13147
13180
|
searchable = _this$props.searchable,
|
|
13148
13181
|
canRefine = _this$props.canRefine,
|
|
13149
13182
|
className = _this$props.className;
|
|
13150
|
-
return
|
|
13183
|
+
return React.createElement(List, {
|
|
13151
13184
|
renderItem: this.renderItem,
|
|
13152
13185
|
selectItem: this.selectItem,
|
|
13153
|
-
cx: cx$
|
|
13186
|
+
cx: cx$h,
|
|
13154
13187
|
translate: translate,
|
|
13155
13188
|
items: items,
|
|
13156
13189
|
showMore: showMore,
|
|
@@ -13259,12 +13292,12 @@ var RefinementList$2 = translatable({
|
|
|
13259
13292
|
*/
|
|
13260
13293
|
|
|
13261
13294
|
var RefinementListWidget = function RefinementListWidget(props) {
|
|
13262
|
-
return
|
|
13295
|
+
return React.createElement(PanelWrapper, props, React.createElement(RefinementList$2, props));
|
|
13263
13296
|
};
|
|
13264
13297
|
|
|
13265
|
-
var RefinementList = connectRefinementList(RefinementListWidget);
|
|
13298
|
+
var RefinementList$3 = connectRefinementList(RefinementListWidget);
|
|
13266
13299
|
|
|
13267
|
-
var cx$
|
|
13300
|
+
var cx$i = createClassNames('ScrollTo');
|
|
13268
13301
|
|
|
13269
13302
|
var ScrollTo =
|
|
13270
13303
|
/*#__PURE__*/
|
|
@@ -13293,11 +13326,11 @@ function (_Component) {
|
|
|
13293
13326
|
value: function render() {
|
|
13294
13327
|
var _this = this;
|
|
13295
13328
|
|
|
13296
|
-
return
|
|
13329
|
+
return React.createElement("div", {
|
|
13297
13330
|
ref: function ref(_ref) {
|
|
13298
13331
|
return _this.el = _ref;
|
|
13299
13332
|
},
|
|
13300
|
-
className: cx$
|
|
13333
|
+
className: cx$i('')
|
|
13301
13334
|
}, this.props.children);
|
|
13302
13335
|
}
|
|
13303
13336
|
}]);
|
|
@@ -13391,14 +13424,14 @@ connectScrollTo(ScrollTo);
|
|
|
13391
13424
|
* );
|
|
13392
13425
|
*/
|
|
13393
13426
|
|
|
13394
|
-
var SearchBox = connectSearchBox(SearchBox$
|
|
13427
|
+
var SearchBox$2 = connectSearchBox(SearchBox$1);
|
|
13395
13428
|
|
|
13396
|
-
var cx$
|
|
13429
|
+
var cx$j = createClassNames('Snippet');
|
|
13397
13430
|
|
|
13398
13431
|
var Snippet = function Snippet(props) {
|
|
13399
|
-
return
|
|
13432
|
+
return React.createElement(Highlighter, _extends({}, props, {
|
|
13400
13433
|
highlightProperty: "_snippetResult",
|
|
13401
|
-
cx: cx$
|
|
13434
|
+
cx: cx$j
|
|
13402
13435
|
}));
|
|
13403
13436
|
};
|
|
13404
13437
|
|
|
@@ -13448,11 +13481,11 @@ var Snippet = function Snippet(props) {
|
|
|
13448
13481
|
|
|
13449
13482
|
connectHighlight(Snippet);
|
|
13450
13483
|
|
|
13451
|
-
var cx$
|
|
13484
|
+
var cx$k = createClassNames('RelevantSort');
|
|
13452
13485
|
|
|
13453
13486
|
var DefaultButtonTextComponent = function DefaultButtonTextComponent(_ref) {
|
|
13454
13487
|
var isRelevantSorted = _ref.isRelevantSorted;
|
|
13455
|
-
return
|
|
13488
|
+
return React.createElement("span", null, isRelevantSorted ? 'See all results' : 'See relevant results');
|
|
13456
13489
|
};
|
|
13457
13490
|
|
|
13458
13491
|
var RelevantSort = function RelevantSort(_ref2) {
|
|
@@ -13464,18 +13497,18 @@ var RelevantSort = function RelevantSort(_ref2) {
|
|
|
13464
13497
|
ButtonTextComponent = _ref2$buttonTextCompo === void 0 ? DefaultButtonTextComponent : _ref2$buttonTextCompo,
|
|
13465
13498
|
TextComponent = _ref2.textComponent,
|
|
13466
13499
|
refine = _ref2.refine;
|
|
13467
|
-
return !isVirtualReplica ? null :
|
|
13468
|
-
className: classnames(cx$
|
|
13469
|
-
},
|
|
13470
|
-
className: cx$
|
|
13471
|
-
}, TextComponent &&
|
|
13500
|
+
return !isVirtualReplica ? null : React.createElement("div", {
|
|
13501
|
+
className: classnames(cx$k(''), className)
|
|
13502
|
+
}, React.createElement("div", {
|
|
13503
|
+
className: cx$k('text')
|
|
13504
|
+
}, TextComponent && React.createElement(TextComponent, {
|
|
13472
13505
|
isRelevantSorted: isRelevantSorted
|
|
13473
|
-
})),
|
|
13474
|
-
className: cx$
|
|
13506
|
+
})), React.createElement("button", {
|
|
13507
|
+
className: cx$k('button'),
|
|
13475
13508
|
onClick: function onClick() {
|
|
13476
13509
|
return refine(isRelevantSorted ? 0 : undefined);
|
|
13477
13510
|
}
|
|
13478
|
-
},
|
|
13511
|
+
}, React.createElement(ButtonTextComponent, {
|
|
13479
13512
|
isRelevantSorted: isRelevantSorted
|
|
13480
13513
|
})));
|
|
13481
13514
|
};
|
|
@@ -13491,7 +13524,7 @@ RelevantSort.propTypes = {
|
|
|
13491
13524
|
|
|
13492
13525
|
connectRelevantSort(RelevantSort);
|
|
13493
13526
|
|
|
13494
|
-
var cx$
|
|
13527
|
+
var cx$l = createClassNames('SortBy');
|
|
13495
13528
|
|
|
13496
13529
|
var SortBy =
|
|
13497
13530
|
/*#__PURE__*/
|
|
@@ -13512,10 +13545,10 @@ function (_Component) {
|
|
|
13512
13545
|
currentRefinement = _this$props.currentRefinement,
|
|
13513
13546
|
refine = _this$props.refine,
|
|
13514
13547
|
className = _this$props.className;
|
|
13515
|
-
return
|
|
13516
|
-
className: classnames(cx$
|
|
13517
|
-
},
|
|
13518
|
-
cx: cx$
|
|
13548
|
+
return React.createElement("div", {
|
|
13549
|
+
className: classnames(cx$l(''), className)
|
|
13550
|
+
}, React.createElement(Select, {
|
|
13551
|
+
cx: cx$l,
|
|
13519
13552
|
items: items,
|
|
13520
13553
|
selectedItem: currentRefinement,
|
|
13521
13554
|
onSelect: refine
|
|
@@ -13581,7 +13614,7 @@ _defineProperty(SortBy, "defaultProps", {
|
|
|
13581
13614
|
|
|
13582
13615
|
connectSortBy(SortBy);
|
|
13583
13616
|
|
|
13584
|
-
var cx$
|
|
13617
|
+
var cx$m = createClassNames('Stats');
|
|
13585
13618
|
|
|
13586
13619
|
var Stats = function Stats(_ref) {
|
|
13587
13620
|
var _ref$className = _ref.className,
|
|
@@ -13591,10 +13624,10 @@ var Stats = function Stats(_ref) {
|
|
|
13591
13624
|
nbSortedHits = _ref.nbSortedHits,
|
|
13592
13625
|
processingTimeMS = _ref.processingTimeMS,
|
|
13593
13626
|
translate = _ref.translate;
|
|
13594
|
-
return
|
|
13595
|
-
className: classnames(cx$
|
|
13596
|
-
},
|
|
13597
|
-
className: cx$
|
|
13627
|
+
return React.createElement("div", {
|
|
13628
|
+
className: classnames(cx$m(''), className)
|
|
13629
|
+
}, React.createElement("span", {
|
|
13630
|
+
className: cx$m('text')
|
|
13598
13631
|
}, translate('stats', nbHits, processingTimeMS, nbSortedHits, areHitsSorted)));
|
|
13599
13632
|
};
|
|
13600
13633
|
|
|
@@ -13642,7 +13675,7 @@ var Stats$1 = translatable({
|
|
|
13642
13675
|
|
|
13643
13676
|
connectStats(Stats$1);
|
|
13644
13677
|
|
|
13645
|
-
var cx$
|
|
13678
|
+
var cx$n = createClassNames('ToggleRefinement');
|
|
13646
13679
|
|
|
13647
13680
|
var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
13648
13681
|
var currentRefinement = _ref.currentRefinement,
|
|
@@ -13650,19 +13683,19 @@ var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
|
13650
13683
|
canRefine = _ref.canRefine,
|
|
13651
13684
|
refine = _ref.refine,
|
|
13652
13685
|
className = _ref.className;
|
|
13653
|
-
return
|
|
13654
|
-
className: classnames(cx$
|
|
13655
|
-
},
|
|
13656
|
-
className: cx$
|
|
13657
|
-
},
|
|
13658
|
-
className: cx$
|
|
13686
|
+
return React.createElement("div", {
|
|
13687
|
+
className: classnames(cx$n('', !canRefine && '-noRefinement'), className)
|
|
13688
|
+
}, React.createElement("label", {
|
|
13689
|
+
className: cx$n('label')
|
|
13690
|
+
}, React.createElement("input", {
|
|
13691
|
+
className: cx$n('checkbox'),
|
|
13659
13692
|
type: "checkbox",
|
|
13660
13693
|
checked: currentRefinement,
|
|
13661
13694
|
onChange: function onChange(event) {
|
|
13662
13695
|
return refine(event.target.checked);
|
|
13663
13696
|
}
|
|
13664
|
-
}),
|
|
13665
|
-
className: cx$
|
|
13697
|
+
}), React.createElement("span", {
|
|
13698
|
+
className: cx$n('labelText')
|
|
13666
13699
|
}, label)));
|
|
13667
13700
|
};
|
|
13668
13701
|
|
|
@@ -13871,11 +13904,11 @@ function createVoiceSearchHelper(_ref) {
|
|
|
13871
13904
|
};
|
|
13872
13905
|
}
|
|
13873
13906
|
|
|
13874
|
-
var cx$
|
|
13907
|
+
var cx$o = createClassNames('VoiceSearch');
|
|
13875
13908
|
|
|
13876
13909
|
var ButtonSvg = function ButtonSvg(_ref) {
|
|
13877
13910
|
var children = _ref.children;
|
|
13878
|
-
return
|
|
13911
|
+
return React.createElement("svg", {
|
|
13879
13912
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13880
13913
|
width: "16",
|
|
13881
13914
|
height: "16",
|
|
@@ -13892,36 +13925,36 @@ var DefaultButtonText = function DefaultButtonText(_ref2) {
|
|
|
13892
13925
|
var status = _ref2.status,
|
|
13893
13926
|
errorCode = _ref2.errorCode,
|
|
13894
13927
|
isListening = _ref2.isListening;
|
|
13895
|
-
return status === 'error' && errorCode === 'not-allowed' ?
|
|
13928
|
+
return status === 'error' && errorCode === 'not-allowed' ? React.createElement(ButtonSvg, null, React.createElement("line", {
|
|
13896
13929
|
x1: "1",
|
|
13897
13930
|
y1: "1",
|
|
13898
13931
|
x2: "23",
|
|
13899
13932
|
y2: "23"
|
|
13900
|
-
}),
|
|
13933
|
+
}), React.createElement("path", {
|
|
13901
13934
|
d: "M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"
|
|
13902
|
-
}),
|
|
13935
|
+
}), React.createElement("path", {
|
|
13903
13936
|
d: "M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"
|
|
13904
|
-
}),
|
|
13937
|
+
}), React.createElement("line", {
|
|
13905
13938
|
x1: "12",
|
|
13906
13939
|
y1: "19",
|
|
13907
13940
|
x2: "12",
|
|
13908
13941
|
y2: "23"
|
|
13909
|
-
}),
|
|
13942
|
+
}), React.createElement("line", {
|
|
13910
13943
|
x1: "8",
|
|
13911
13944
|
y1: "23",
|
|
13912
13945
|
x2: "16",
|
|
13913
13946
|
y2: "23"
|
|
13914
|
-
})) :
|
|
13947
|
+
})) : React.createElement(ButtonSvg, null, React.createElement("path", {
|
|
13915
13948
|
d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z",
|
|
13916
13949
|
fill: isListening ? 'currentColor' : ''
|
|
13917
|
-
}),
|
|
13950
|
+
}), React.createElement("path", {
|
|
13918
13951
|
d: "M19 10v2a7 7 0 0 1-14 0v-2"
|
|
13919
|
-
}),
|
|
13952
|
+
}), React.createElement("line", {
|
|
13920
13953
|
x1: "12",
|
|
13921
13954
|
y1: "19",
|
|
13922
13955
|
x2: "12",
|
|
13923
13956
|
y2: "23"
|
|
13924
|
-
}),
|
|
13957
|
+
}), React.createElement("line", {
|
|
13925
13958
|
x1: "8",
|
|
13926
13959
|
y1: "23",
|
|
13927
13960
|
x2: "16",
|
|
@@ -13931,7 +13964,7 @@ var DefaultButtonText = function DefaultButtonText(_ref2) {
|
|
|
13931
13964
|
|
|
13932
13965
|
var DefaultStatus = function DefaultStatus(_ref3) {
|
|
13933
13966
|
var transcript = _ref3.transcript;
|
|
13934
|
-
return
|
|
13967
|
+
return React.createElement("p", null, transcript);
|
|
13935
13968
|
};
|
|
13936
13969
|
|
|
13937
13970
|
var VoiceSearch =
|
|
@@ -14016,17 +14049,17 @@ function (_Component) {
|
|
|
14016
14049
|
isSpeechFinal: isSpeechFinal,
|
|
14017
14050
|
isBrowserSupported: isBrowserSupported()
|
|
14018
14051
|
};
|
|
14019
|
-
return
|
|
14020
|
-
className: cx$
|
|
14021
|
-
},
|
|
14022
|
-
className: cx$
|
|
14052
|
+
return React.createElement("div", {
|
|
14053
|
+
className: cx$o('')
|
|
14054
|
+
}, React.createElement("button", {
|
|
14055
|
+
className: cx$o('button'),
|
|
14023
14056
|
type: "button",
|
|
14024
14057
|
title: isBrowserSupported() ? translate('buttonTitle') : translate('disabledButtonTitle'),
|
|
14025
14058
|
onClick: this.onClick,
|
|
14026
14059
|
disabled: !isBrowserSupported()
|
|
14027
|
-
},
|
|
14028
|
-
className: cx$
|
|
14029
|
-
},
|
|
14060
|
+
}, React.createElement(ButtonTextComponent, innerProps)), React.createElement("div", {
|
|
14061
|
+
className: cx$o('status')
|
|
14062
|
+
}, React.createElement(StatusComponent, innerProps)));
|
|
14030
14063
|
}
|
|
14031
14064
|
}, {
|
|
14032
14065
|
key: "componentWillUnmount",
|
|
@@ -14053,14 +14086,14 @@ var VoiceSearch$1 = translatable({
|
|
|
14053
14086
|
|
|
14054
14087
|
connectVoiceSearch(VoiceSearch$1);
|
|
14055
14088
|
|
|
14056
|
-
var cx = createClassNames('QueryRuleCustomData');
|
|
14089
|
+
var cx$p = createClassNames('QueryRuleCustomData');
|
|
14057
14090
|
|
|
14058
14091
|
var QueryRuleCustomData = function QueryRuleCustomData(_ref) {
|
|
14059
14092
|
var items = _ref.items,
|
|
14060
14093
|
className = _ref.className,
|
|
14061
14094
|
children = _ref.children;
|
|
14062
|
-
return
|
|
14063
|
-
className: classnames(cx(''), className)
|
|
14095
|
+
return React.createElement("div", {
|
|
14096
|
+
className: classnames(cx$p(''), className)
|
|
14064
14097
|
}, children({
|
|
14065
14098
|
items: items
|
|
14066
14099
|
}));
|
|
@@ -14073,7 +14106,7 @@ QueryRuleCustomData.propTypes = {
|
|
|
14073
14106
|
};
|
|
14074
14107
|
|
|
14075
14108
|
var QueryRuleCustomDataWidget = function QueryRuleCustomDataWidget(props) {
|
|
14076
|
-
return
|
|
14109
|
+
return React.createElement(PanelWrapper, props, React.createElement(QueryRuleCustomData, props));
|
|
14077
14110
|
};
|
|
14078
14111
|
|
|
14079
14112
|
connectQueryRules(QueryRuleCustomDataWidget);
|
|
@@ -14097,52 +14130,52 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14097
14130
|
|
|
14098
14131
|
var hit = props.hit;
|
|
14099
14132
|
if (moment().isSameOrBefore(props.hit.pubDateSort)) return null;
|
|
14100
|
-
return
|
|
14133
|
+
return React.createElement(
|
|
14101
14134
|
'div',
|
|
14102
14135
|
{ key: hit.url, className: styles.article },
|
|
14103
|
-
|
|
14136
|
+
React.createElement(
|
|
14104
14137
|
'a',
|
|
14105
14138
|
{ href: '/view/' + hit.url, style: this.props.variant === 'right' ? { flexDirection: 'row-reverse' } : {} },
|
|
14106
|
-
|
|
14139
|
+
React.createElement(
|
|
14107
14140
|
'div',
|
|
14108
14141
|
{ className: styles.thumb },
|
|
14109
|
-
|
|
14142
|
+
React.createElement(
|
|
14110
14143
|
'figure',
|
|
14111
14144
|
null,
|
|
14112
|
-
|
|
14145
|
+
React.createElement(
|
|
14113
14146
|
LazyLoad,
|
|
14114
14147
|
null,
|
|
14115
|
-
|
|
14148
|
+
React.createElement('img', {
|
|
14116
14149
|
src: hit.thumbnail && hit.thumbnail.asset ? urlFor({ client: client, source: hit.thumbnail }) : hit.thumbnail && _typeof$2(hit.thumbnail === 'string') ? hit.thumbnail : this.props.defaultImage
|
|
14117
14150
|
})
|
|
14118
14151
|
)
|
|
14119
14152
|
)
|
|
14120
14153
|
),
|
|
14121
|
-
|
|
14154
|
+
React.createElement(
|
|
14122
14155
|
'div',
|
|
14123
14156
|
{ className: styles.info, style: this.props.variant === 'right' ? { padding: '0 1rem 0 0' } : { padding: ' 0 0 0 1rem' } },
|
|
14124
|
-
|
|
14157
|
+
React.createElement(
|
|
14125
14158
|
'h2',
|
|
14126
14159
|
null,
|
|
14127
14160
|
hit.title
|
|
14128
14161
|
),
|
|
14129
|
-
hit.pubDateSort &&
|
|
14162
|
+
hit.pubDateSort && React.createElement(
|
|
14130
14163
|
'p',
|
|
14131
14164
|
{ className: styles.published },
|
|
14132
14165
|
moment(hit.pubDateSort).format('MMMM Do YYYY')
|
|
14133
14166
|
),
|
|
14134
|
-
hit.authorMapping && hit.authorMapping.length > 0 &&
|
|
14167
|
+
hit.authorMapping && hit.authorMapping.length > 0 && React.createElement(
|
|
14135
14168
|
'p',
|
|
14136
14169
|
{ className: styles.author },
|
|
14137
14170
|
hit.authorMapping.map(function (author) {
|
|
14138
|
-
return
|
|
14171
|
+
return React.createElement(
|
|
14139
14172
|
'span',
|
|
14140
14173
|
null,
|
|
14141
14174
|
author.displayName
|
|
14142
14175
|
);
|
|
14143
14176
|
})
|
|
14144
14177
|
),
|
|
14145
|
-
hit.summary &&
|
|
14178
|
+
hit.summary && React.createElement('p', { dangerouslySetInnerHTML: { __html: hit.summary }, className: styles.summary })
|
|
14146
14179
|
)
|
|
14147
14180
|
)
|
|
14148
14181
|
);
|
|
@@ -14156,10 +14189,10 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14156
14189
|
styles: this.props.deckStyles,
|
|
14157
14190
|
client: this.props.sanityClient
|
|
14158
14191
|
};
|
|
14159
|
-
return
|
|
14160
|
-
|
|
14192
|
+
return React.createElement(
|
|
14193
|
+
React.Fragment,
|
|
14161
14194
|
null,
|
|
14162
|
-
|
|
14195
|
+
React.createElement(
|
|
14163
14196
|
InstantSearch,
|
|
14164
14197
|
_extends$1({
|
|
14165
14198
|
searchClient: this.props.searchClient,
|
|
@@ -14170,29 +14203,29 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14170
14203
|
indexName: this.props.indexName,
|
|
14171
14204
|
onSearchParameters: this.props.onSearchParameters
|
|
14172
14205
|
}, this.props),
|
|
14173
|
-
|
|
14174
|
-
|
|
14175
|
-
this.props.refinementAttributes &&
|
|
14206
|
+
React.createElement(Configure, { hitsPerPage: this.props.hitsPerPage || 20 }),
|
|
14207
|
+
React.createElement(SearchBox$2, null),
|
|
14208
|
+
this.props.refinementAttributes && React.createElement(
|
|
14176
14209
|
'div',
|
|
14177
14210
|
{ className: 'search_refinement' },
|
|
14178
14211
|
this.props.refinementAttributes.map(function (item, index) {
|
|
14179
|
-
return
|
|
14212
|
+
return React.createElement(
|
|
14180
14213
|
DropdownButton,
|
|
14181
14214
|
{ title: item.title },
|
|
14182
|
-
|
|
14215
|
+
React.createElement(RefinementList$3, { showMore: item.showMore, limit: item.limit, showMoreLimit: item.showMoreLimit, attribute: item.attribute })
|
|
14183
14216
|
);
|
|
14184
14217
|
})
|
|
14185
14218
|
),
|
|
14186
|
-
|
|
14219
|
+
React.createElement(
|
|
14187
14220
|
'div',
|
|
14188
14221
|
{ className: 'AlgoliaResults' },
|
|
14189
|
-
|
|
14222
|
+
React.createElement(Hits$1, { hitComponent: function hitComponent(hit) {
|
|
14190
14223
|
return _this2.Deck(_extends$1({}, hit, { propsObj: propsObj }));
|
|
14191
14224
|
} })
|
|
14192
14225
|
),
|
|
14193
|
-
|
|
14226
|
+
React.createElement(Pagination$2, null)
|
|
14194
14227
|
),
|
|
14195
|
-
|
|
14228
|
+
React.createElement(
|
|
14196
14229
|
'style',
|
|
14197
14230
|
{ jsx: 'true' },
|
|
14198
14231
|
'\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 '
|
|
@@ -14202,7 +14235,7 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14202
14235
|
}]);
|
|
14203
14236
|
|
|
14204
14237
|
return AlgoliaSearch;
|
|
14205
|
-
}(
|
|
14238
|
+
}(React.Component);
|
|
14206
14239
|
|
|
14207
14240
|
AlgoliaSearch.propTypes = {
|
|
14208
14241
|
searchState: PropTypes.object,
|