@mjhls/mjh-framework 1.0.885 → 1.0.886-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +168 -168
- package/dist/cjs/AD.js +9 -10
- package/dist/cjs/AD300x250.js +28 -29
- package/dist/cjs/AD300x250x600.js +28 -29
- package/dist/cjs/AD728x90.js +31 -32
- package/dist/cjs/ADFloatingFooter.js +30 -31
- package/dist/cjs/ADFooter.js +12 -13
- package/dist/cjs/ADGutter.js +30 -31
- package/dist/cjs/{ADInfeed-bce0ba07.js → ADInfeed-2e48af77.js} +13 -15
- package/dist/cjs/ADSkyscraper.js +30 -31
- package/dist/cjs/ADSponsoredResources.js +30 -31
- package/dist/cjs/ADWebcast.js +30 -31
- package/dist/cjs/ADWelcome.js +31 -32
- package/dist/cjs/{ADlgInfeed-950b414b.js → ADlgInfeed-c39c7131.js} +10 -11
- package/dist/cjs/AccordionPanel.js +27 -29
- package/dist/cjs/AdSlot.js +31 -32
- package/dist/cjs/AdSlotsProvider.js +909 -18
- package/dist/cjs/AlgoliaSearch.js +1306 -1490
- package/dist/cjs/AlphabeticList.js +23 -24
- package/dist/cjs/ArticleCarousel.js +19 -20
- package/dist/cjs/ArticleProgramLandingPage.js +57 -58
- package/dist/cjs/ArticleSeriesLandingPage.js +38 -39
- package/dist/cjs/ArticleSeriesListing.js +59 -60
- package/dist/cjs/Auth.js +1504 -680
- package/dist/cjs/AuthWrapper.js +419 -1637
- package/dist/cjs/{AuthorComponent-39b37d84.js → AuthorComponent-02e827ae.js} +13 -14
- package/dist/cjs/Beam.js +6 -6
- package/dist/cjs/{BlockContent-9ebd251f.js → BlockContent-091a991f.js} +55 -56
- package/dist/cjs/Breadcrumbs.js +25 -27
- package/dist/cjs/CMEDeck.js +81 -81
- package/dist/cjs/Column1.js +11 -14
- package/dist/cjs/Column2.js +31 -34
- package/dist/cjs/Column3.js +57 -60
- package/dist/cjs/ConferenceArticleCard.js +40 -41
- package/dist/cjs/ConferenceBanner-4a16fddc.js +23 -0
- package/dist/cjs/ContentCardPaginated.js +408 -0
- package/dist/cjs/DeckContent.js +101 -105
- package/dist/cjs/DeckQueue.js +87 -91
- package/dist/cjs/DeckQueuePaginated.js +339 -0
- package/dist/cjs/{Dfp-9be904d5.js → Dfp-f492f985.js} +31 -32
- package/dist/cjs/EventsDeck.js +150 -157
- package/dist/cjs/ExternalResources.js +78 -79
- package/dist/cjs/Feature.js +27 -29
- package/dist/cjs/ForbesHero.js +40 -41
- package/dist/cjs/GridContent.js +203 -320
- package/dist/cjs/GridContentPaginated.js +698 -0
- package/dist/cjs/GridHero.js +42 -43
- package/dist/cjs/GroupDeck.js +57 -58
- package/dist/cjs/HamMagazine.js +139 -144
- package/dist/cjs/Header.js +12 -14
- package/dist/cjs/Hero.js +15 -16
- package/dist/cjs/HighlightenVideo.js +17 -18
- package/dist/cjs/HorizontalArticleListing.js +71 -72
- package/dist/cjs/HorizontalHero.js +28 -29
- package/dist/cjs/ImageSlider-38f25e66.js +3989 -0
- package/dist/cjs/IssueContentDeck.js +71 -76
- package/dist/cjs/IssueDeck.js +70 -75
- package/dist/cjs/IssueLanding.js +93 -94
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/LeftNav.js +37 -39
- package/dist/cjs/MasterDeck.js +78 -79
- package/dist/cjs/MasterDeckPaginated.js +443 -0
- package/dist/cjs/MediaSeriesCard-8d27612b.js +9411 -0
- package/dist/cjs/MediaSeriesLanding.js +118 -9602
- package/dist/cjs/MediaSeriesLandingPaginated.js +521 -0
- package/dist/cjs/NavDvm.js +72 -77
- package/dist/cjs/{NavFooter-3dcd99a8.js → NavFooter-76c913e3.js} +14 -15
- package/dist/cjs/NavMagazine.js +146 -151
- package/dist/cjs/NavNative.js +137 -145
- package/dist/cjs/OncliveHero.js +22 -22
- package/dist/cjs/OncliveLargeHero.js +70 -71
- package/dist/cjs/PageFilter.js +12 -13
- package/dist/cjs/Pagination-90473595.js +59 -0
- package/dist/cjs/PartnerDetailListing.js +100 -2897
- package/dist/cjs/PartnerDetailListingPaginated.js +311 -0
- package/dist/cjs/PdfDownload.js +9 -10
- package/dist/cjs/PopUpModal.js +17 -19
- package/dist/cjs/PubSection.js +40 -41
- package/dist/cjs/PubToc.js +13 -14
- package/dist/cjs/PublicationDeck.js +65 -70
- package/dist/cjs/PublicationFeature-28c549f2.js +126 -0
- package/dist/cjs/PublicationLanding.js +133 -141
- package/dist/cjs/QueueDeckExpanded.js +308 -308
- package/dist/cjs/QueueDeckExpandedPaginated.js +1377 -0
- package/dist/cjs/RecentNews.js +22 -23
- package/dist/cjs/RelatedContent.js +57 -58
- package/dist/cjs/RelatedTopicsDropdown.js +29 -32
- package/dist/cjs/RolesDeck.js +27 -32
- package/dist/cjs/Schema.js +15 -16
- package/dist/cjs/Search.js +16 -20
- package/dist/cjs/Segment.js +4 -4
- package/dist/cjs/SeriesListingDeck.js +36 -36
- package/dist/cjs/{SeriesSlider-ba0c5d1a.js → SeriesSlider-49b81b0b.js} +39 -40
- package/dist/cjs/SetCookie.js +1 -1
- package/dist/cjs/SideFooter.js +36 -37
- package/dist/cjs/SocialIcons.js +9 -10
- package/dist/cjs/{SocialSearchComponent-4942ddfc.js → SocialSearchComponent-e8477ca3.js} +36 -40
- package/dist/cjs/SocialShare.js +29 -31
- package/dist/cjs/TaxonomyCard.js +61 -66
- package/dist/cjs/TaxonomyDescription.js +53 -54
- package/dist/cjs/TemplateNormal.js +72 -73
- package/dist/cjs/ThumbnailCard.js +24 -26
- package/dist/cjs/Ustream.js +28 -29
- package/dist/cjs/VerticalHero.js +19 -20
- package/dist/cjs/VideoProgramLandingPage.js +72 -76
- package/dist/cjs/VideoSeriesCard.js +32 -33
- package/dist/cjs/VideoSeriesFilter.js +16 -16
- package/dist/cjs/VideoSeriesLandingPage.js +47 -48
- package/dist/cjs/VideoSeriesListing.js +76 -77
- package/dist/cjs/View.js +264 -267
- package/dist/cjs/YahooHero.js +39 -40
- package/dist/cjs/YoutubeGroup.js +67 -68
- package/dist/cjs/{_is-array-54228b29.js → _is-array-aa52fa1e.js} +6 -6
- package/dist/cjs/{_iter-detect-b1df62f0.js → _iter-detect-05795553.js} +7 -7
- package/dist/cjs/{_object-pie-083f2dd6.js → _object-pie-68c5bcbc.js} +4 -4
- package/dist/cjs/{_object-sap-d1978572.js → _object-sap-171b9ea5.js} +1 -1
- package/dist/cjs/{_object-to-array-ce86cae7.js → _object-to-array-9bac8737.js} +2 -2
- package/dist/cjs/{asyncToGenerator-77821af0.js → asyncToGenerator-df19209d.js} +30 -30
- package/dist/cjs/{brightcove-react-player-loader.es-a195642e.js → brightcove-react-player-loader.es-156bd4d6.js} +9 -11
- package/dist/cjs/{core.get-iterator-method-5643aa10.js → core.get-iterator-method-f3c44602.js} +35 -35
- package/dist/cjs/{debounce-d4a2369b.js → debounce-529c8d06.js} +2 -2
- package/dist/cjs/{define-property-e8404b64.js → define-property-21887c62.js} +6 -6
- package/dist/cjs/{defineProperty-9673846a.js → defineProperty-77a37684.js} +1 -1
- package/dist/cjs/{entities-df1aed86.js → entities-310b46ee.js} +1 -5
- package/dist/cjs/{eq-5fc26c07.js → eq-bb2843ed.js} +1 -1
- package/dist/cjs/{extends-7c86182f.js → extends-eed4f016.js} +7 -7
- package/dist/cjs/faundadb.js +5 -5
- package/dist/cjs/{get-5839e5b5.js → get-adbb11e3.js} +21 -21
- package/dist/cjs/getQuery.js +1 -1
- package/dist/cjs/getRelatedArticle.js +16 -16
- package/dist/cjs/getRootDocGroup.js +4 -4
- package/dist/cjs/getSerializers.js +43 -43
- package/dist/cjs/{getTargeting-9d509319.js → getTargeting-8874437b.js} +12 -12
- package/dist/cjs/getTargeting.js +6 -6
- package/dist/{esm/iconBase-ccc56b97.js → cjs/iconBase-68959171.js} +8 -2
- package/dist/cjs/{index-f86bb269.js → index-3294d3bc.js} +45 -44
- package/dist/cjs/{index-6f89aea7.js → index-54adcbc3.js} +1044 -1070
- package/dist/cjs/{index-eadd5035.js → index-96b3db50.js} +15 -17
- package/dist/cjs/{index-fc2f1ca2.js → index-98e01cb9.js} +12 -13
- package/dist/cjs/{index-d48b231c.js → index-be0c82be.js} +25 -31
- package/dist/cjs/{index-50be6759.js → index-e2e62963.js} +10 -26
- package/dist/cjs/{index.es-f3e47207.js → index.es-9110add6.js} +12 -31
- package/dist/cjs/{index.esm-2bb721c8.js → index.esm-4d410430.js} +21 -21
- package/dist/cjs/{index.esm-00a6aade.js → index.esm-90433435.js} +16 -7
- package/dist/cjs/{index.esm-c1e16606.js → index.esm-e32d3e8e.js} +7 -4
- package/dist/cjs/{index.esm-f27f80d9.js → index.esm-ff47db6f.js} +13 -6
- package/dist/cjs/index.js +168 -173
- package/dist/cjs/{inherits-de66ea16.js → inherits-12d44cca.js} +18 -18
- package/dist/cjs/inherits-8d29278d.js +110 -0
- package/dist/cjs/{isSymbol-03abbdf0.js → isSymbol-04666465.js} +15 -15
- package/dist/cjs/{keys-e982b3fa.js → keys-d207942e.js} +6 -6
- package/dist/cjs/{lodash-f0783643.js → lodash-fc2922d0.js} +31 -128
- package/dist/cjs/main-02daeefe.js +862 -0
- package/dist/cjs/{md5-e1ca5797.js → md5-5039b1a6.js} +1 -1
- package/dist/cjs/{moment-aca40de1.js → moment-575fe24c.js} +9 -11
- package/dist/cjs/{react-social-icons-af932527.js → react-social-icons-f7f48f71.js} +27 -28
- package/dist/cjs/{slicedToArray-067dd3bc.js → slicedToArray-f6d4eaa8.js} +12 -12
- package/dist/cjs/{smoothscroll-99df7f93.js → smoothscroll-5054361f.js} +1 -1
- package/dist/cjs/{stringify-f7a37a8d.js → stringify-bbc68047.js} +5 -5
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-d7797c2b.js → toConsumableArray-c9b8a0d0.js} +7 -7
- package/dist/cjs/{toNumber-5e1fac58.js → toNumber-36d1e7e5.js} +5 -40
- package/dist/cjs/{typeof-567e31ff.js → typeof-5f52cf64.js} +35 -35
- package/dist/cjs/urlFor.js +6 -6
- package/dist/cjs/{ustream-api-3819e4aa.js → ustream-api-9ebe112f.js} +4 -4
- package/dist/cjs/{util-93a37fd0.js → util-f2c1b65b.js} +1 -12
- package/dist/cjs/{visibility-sensor-eb2c5b69.js → visibility-sensor-ad5e3116.js} +5 -7
- package/dist/cjs/{web.dom.iterable-d98303e0.js → web.dom.iterable-e34bf324.js} +2 -2
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +22 -22
- package/dist/esm/AD300x250x600.js +22 -22
- package/dist/esm/AD728x90.js +25 -25
- package/dist/esm/ADFloatingFooter.js +21 -21
- package/dist/esm/ADFooter.js +4 -4
- package/dist/esm/ADGutter.js +21 -21
- package/dist/esm/{ADInfeed-0a55cd2d.js → ADInfeed-d767ebe2.js} +4 -4
- package/dist/esm/ADSkyscraper.js +21 -21
- package/dist/esm/ADSponsoredResources.js +21 -21
- package/dist/esm/ADWebcast.js +21 -21
- package/dist/esm/ADWelcome.js +18 -18
- package/dist/esm/{ADlgInfeed-013e1f4a.js → ADlgInfeed-cee95aa2.js} +4 -4
- package/dist/esm/AccordionPanel.js +6 -6
- package/dist/esm/AdSlot.js +20 -20
- package/dist/esm/AdSlotsProvider.js +906 -14
- package/dist/esm/AlgoliaSearch.js +534 -717
- package/dist/esm/AlphabeticList.js +8 -8
- package/dist/esm/ArticleCarousel.js +13 -13
- package/dist/esm/ArticleProgramLandingPage.js +48 -48
- package/dist/esm/ArticleSeriesLandingPage.js +30 -30
- package/dist/esm/ArticleSeriesListing.js +31 -31
- package/dist/esm/Auth.js +1419 -591
- package/dist/esm/AuthWrapper.js +392 -1609
- package/dist/esm/{AuthorComponent-11adff02.js → AuthorComponent-e6f95c2f.js} +1 -1
- package/dist/esm/Beam.js +6 -6
- package/dist/esm/{BlockContent-1e73bd2c.js → BlockContent-e9b4ddcf.js} +34 -34
- package/dist/esm/Breadcrumbs.js +5 -5
- package/dist/esm/CMEDeck.js +22 -22
- package/dist/esm/Column2.js +14 -14
- package/dist/esm/Column3.js +31 -31
- package/dist/esm/ConferenceArticleCard.js +25 -25
- package/dist/esm/ContentCardPaginated.js +402 -0
- package/dist/esm/DeckContent.js +41 -41
- package/dist/esm/DeckQueue.js +31 -31
- package/dist/esm/DeckQueuePaginated.js +333 -0
- package/dist/esm/{Dfp-102f0beb.js → Dfp-f867d061.js} +13 -13
- package/dist/esm/EventsDeck.js +41 -41
- package/dist/esm/ExternalResources.js +45 -45
- package/dist/esm/Feature.js +7 -7
- package/dist/esm/ForbesHero.js +10 -10
- package/dist/esm/GridContent.js +48 -160
- package/dist/esm/GridContentPaginated.js +692 -0
- package/dist/esm/GridHero.js +11 -11
- package/dist/esm/GroupDeck.js +12 -12
- package/dist/esm/HamMagazine.js +35 -35
- package/dist/esm/Hero.js +7 -7
- package/dist/esm/HighlightenVideo.js +2 -2
- package/dist/esm/HorizontalArticleListing.js +46 -46
- package/dist/esm/HorizontalHero.js +8 -8
- package/dist/esm/ImageSlider-a3154b97.js +3980 -0
- package/dist/esm/IssueContentDeck.js +11 -11
- package/dist/esm/IssueDeck.js +14 -14
- package/dist/esm/IssueLanding.js +82 -82
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/LeftNav.js +20 -20
- package/dist/esm/MasterDeck.js +40 -40
- package/dist/esm/MasterDeckPaginated.js +437 -0
- package/dist/esm/MediaSeriesCard-1dd7eae8.js +9403 -0
- package/dist/esm/MediaSeriesLanding.js +76 -9556
- package/dist/esm/MediaSeriesLandingPaginated.js +516 -0
- package/dist/esm/NavDvm.js +11 -11
- package/dist/esm/NavMagazine.js +39 -39
- package/dist/esm/NavNative.js +37 -37
- package/dist/esm/OncliveHero.js +8 -7
- package/dist/esm/OncliveLargeHero.js +11 -11
- package/dist/esm/PageFilter.js +4 -4
- package/dist/esm/Pagination-683fa8ef.js +54 -0
- package/dist/esm/PartnerDetailListing.js +66 -2861
- package/dist/esm/PartnerDetailListingPaginated.js +306 -0
- package/dist/esm/PdfDownload.js +2 -2
- package/dist/esm/PopUpModal.js +4 -4
- package/dist/esm/PubSection.js +32 -32
- package/dist/esm/PubToc.js +6 -6
- package/dist/esm/PublicationDeck.js +10 -10
- package/dist/esm/PublicationFeature-fa24dedb.js +121 -0
- package/dist/esm/PublicationLanding.js +52 -56
- package/dist/esm/QueueDeckExpanded.js +36 -36
- package/dist/esm/QueueDeckExpandedPaginated.js +1371 -0
- package/dist/esm/RecentNews.js +4 -4
- package/dist/esm/RelatedContent.js +38 -38
- package/dist/esm/RelatedTopicsDropdown.js +10 -10
- package/dist/esm/Schema.js +10 -10
- package/dist/esm/Search.js +5 -5
- package/dist/esm/Segment.js +4 -4
- package/dist/esm/SeriesListingDeck.js +18 -18
- package/dist/esm/{SeriesSlider-45adb8dc.js → SeriesSlider-ce19fa25.js} +14 -14
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +15 -15
- package/dist/esm/{SocialSearchComponent-8e0fcf66.js → SocialSearchComponent-dca69151.js} +10 -10
- package/dist/esm/TaxonomyCard.js +12 -12
- package/dist/esm/TaxonomyDescription.js +44 -44
- package/dist/esm/TemplateNormal.js +46 -46
- package/dist/esm/ThumbnailCard.js +10 -10
- package/dist/esm/Ustream.js +12 -12
- package/dist/esm/VerticalHero.js +6 -6
- package/dist/esm/VideoProgramLandingPage.js +49 -49
- package/dist/esm/VideoSeriesCard.js +14 -14
- package/dist/esm/VideoSeriesFilter.js +7 -7
- package/dist/esm/VideoSeriesLandingPage.js +36 -36
- package/dist/esm/VideoSeriesListing.js +31 -31
- package/dist/esm/View.js +90 -89
- package/dist/esm/YahooHero.js +13 -13
- package/dist/esm/YoutubeGroup.js +21 -21
- package/dist/esm/{_is-array-8d21b9e3.js → _is-array-4df618a6.js} +6 -6
- package/dist/esm/{_iter-detect-98db3b07.js → _iter-detect-130ee549.js} +7 -7
- package/dist/esm/{_object-pie-133f504a.js → _object-pie-33c40e79.js} +4 -4
- package/dist/esm/{_object-sap-7cee6f84.js → _object-sap-8b8ea5a9.js} +1 -1
- package/dist/esm/{_object-to-array-2300e51b.js → _object-to-array-c54dd835.js} +2 -2
- package/dist/esm/{asyncToGenerator-5ef104a7.js → asyncToGenerator-7bf8bc4d.js} +30 -30
- package/dist/esm/{brightcove-react-player-loader.es-57a70a56.js → brightcove-react-player-loader.es-83f53e4e.js} +4 -5
- package/dist/esm/{core.get-iterator-method-ea258bb1.js → core.get-iterator-method-86d4db69.js} +36 -36
- package/dist/esm/{debounce-533d9748.js → debounce-9207d8ee.js} +2 -2
- package/dist/esm/define-property-6d26cb48.js +18 -0
- package/dist/esm/{defineProperty-8c30428f.js → defineProperty-d7d9b577.js} +1 -1
- package/dist/esm/{entities-6d9154b4.js → entities-7cc3bf45.js} +1 -5
- package/dist/esm/{eq-bdcbf886.js → eq-b470f743.js} +1 -1
- package/dist/esm/{extends-6d8e3924.js → extends-5b1796d4.js} +7 -7
- package/dist/esm/faundadb.js +5 -5
- package/dist/esm/{get-3c308da4.js → get-1e515072.js} +21 -21
- package/dist/esm/getQuery.js +1 -1
- package/dist/esm/getRelatedArticle.js +11 -11
- package/dist/esm/getRootDocGroup.js +4 -4
- package/dist/esm/getSerializers.js +43 -43
- package/dist/esm/{getTargeting-4061f839.js → getTargeting-277c801e.js} +11 -11
- package/dist/esm/getTargeting.js +6 -6
- package/dist/{cjs/iconBase-be4097c0.js → esm/iconBase-602d52fe.js} +8 -33
- package/dist/esm/{index-f0fc23eb.js → index-41a678ea.js} +4 -4
- package/dist/esm/{index-755f2cc2.js → index-5f7e79e7.js} +6 -6
- package/dist/esm/{index-3f5c03b2.js → index-73819142.js} +25 -31
- package/dist/esm/{index-98ca9cec.js → index-aaa2dae0.js} +11 -26
- package/dist/esm/{index-ca0c9ff5.js → index-d1476645.js} +599 -615
- package/dist/esm/{index-79cfd25c.js → index-ef6d5dcf.js} +45 -44
- package/dist/esm/{index.es-a6137319.js → index.es-29c1cef5.js} +5 -23
- package/dist/esm/{index.esm-f6156a57.js → index.esm-29e48d38.js} +16 -7
- package/dist/esm/{index.esm-d4932dea.js → index.esm-cf08bf18.js} +13 -6
- package/dist/esm/{index.esm-9b042655.js → index.esm-f8aaeeeb.js} +7 -4
- package/dist/esm/{index.esm-37268dca.js → index.esm-fd746768.js} +5 -4
- package/dist/esm/index.js +122 -124
- package/dist/esm/{inherits-a6ba2ec4.js → inherits-2409637d.js} +18 -18
- package/dist/esm/inherits-77d5e4fc.js +101 -0
- package/dist/esm/{isSymbol-a7e9aafe.js → isSymbol-1981418f.js} +15 -15
- package/dist/esm/{keys-31dcdb31.js → keys-69989821.js} +6 -6
- package/dist/esm/{lodash-f97fd99a.js → lodash-17fdfebb.js} +31 -128
- package/dist/esm/main-c0612122.js +851 -0
- package/dist/esm/{md5-4e42248e.js → md5-9be0e905.js} +1 -1
- package/dist/esm/{moment-bc12cb97.js → moment-e2f9b20c.js} +9 -11
- package/dist/esm/{react-social-icons-9be47857.js → react-social-icons-a7d5c5c7.js} +16 -16
- package/dist/esm/{slicedToArray-6ebcbfea.js → slicedToArray-67a08c9c.js} +12 -12
- package/dist/esm/{smoothscroll-fa4e3f8c.js → smoothscroll-0cd4c7a6.js} +1 -1
- package/dist/esm/stringify-70b72959.js +15 -0
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/{toConsumableArray-f7074d7c.js → toConsumableArray-32282905.js} +7 -7
- package/dist/esm/{toNumber-5aeba6e7.js → toNumber-2f7a84cd.js} +5 -40
- package/dist/esm/{typeof-e9fc0c5d.js → typeof-c05a82ba.js} +35 -35
- package/dist/esm/urlFor.js +4 -4
- package/dist/esm/{ustream-api-d3714624.js → ustream-api-4c4fe0ba.js} +4 -4
- package/dist/esm/{util-8ed16d48.js → util-7700fc59.js} +1 -12
- package/dist/esm/{web.dom.iterable-ab4dea5c.js → web.dom.iterable-f8f967cd.js} +2 -2
- package/package.json +112 -111
- package/dist/cjs/ConferenceBanner-6c9e718a.js +0 -24
- package/dist/cjs/defineProperty-e0fb52c5.js +0 -73
- package/dist/cjs/main-f1c77adb.js +0 -973
- package/dist/cjs/typeof-1358762e.js +0 -33
- package/dist/esm/define-property-5f1bda73.js +0 -18
- package/dist/esm/defineProperty-23a8f8cd.js +0 -68
- package/dist/esm/main-1894c974.js +0 -961
- package/dist/esm/stringify-2b084bee.js +0 -15
- package/dist/esm/typeof-2f07d0e8.js +0 -30
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { _ as _extends$1 } from './extends-6d8e3924.js';
|
|
2
|
-
import { _ as _typeof$2 } from './typeof-e9fc0c5d.js';
|
|
3
|
-
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-a6ba2ec4.js';
|
|
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
1
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
14
|
-
import './core.get-iterator-method-
|
|
15
|
-
import './_object-pie-133f504a.js';
|
|
16
|
-
import './web.dom.iterable-ab4dea5c.js';
|
|
17
|
-
import './_is-array-8d21b9e3.js';
|
|
2
|
+
import './core.get-iterator-method-86d4db69.js';
|
|
18
3
|
import './_library-528f1934.js';
|
|
19
|
-
import './_object-
|
|
20
|
-
import './
|
|
21
|
-
import './
|
|
22
|
-
import './
|
|
4
|
+
import './_object-pie-33c40e79.js';
|
|
5
|
+
import { _ as _extends$1 } from './extends-5b1796d4.js';
|
|
6
|
+
import './_object-sap-8b8ea5a9.js';
|
|
7
|
+
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-2409637d.js';
|
|
8
|
+
import './define-property-6d26cb48.js';
|
|
9
|
+
import './web.dom.iterable-f8f967cd.js';
|
|
10
|
+
import { _ as _typeof$1 } from './typeof-c05a82ba.js';
|
|
11
|
+
import './_is-array-4df618a6.js';
|
|
12
|
+
import React__default, { createContext, Component, Children, version as version$2 } from 'react';
|
|
13
|
+
import { E as EventEmitter } from './events-6c3a7a63.js';
|
|
14
|
+
import PropTypes from 'prop-types';
|
|
15
|
+
import { m as moment } from './moment-e2f9b20c.js';
|
|
23
16
|
import 'react-dom';
|
|
17
|
+
import './slicedToArray-67a08c9c.js';
|
|
18
|
+
import './index-73819142.js';
|
|
19
|
+
import urlFor from './urlFor.js';
|
|
20
|
+
import { L as LazyLoad } from './index-5f7e79e7.js';
|
|
21
|
+
import { DropdownButton } from 'react-bootstrap';
|
|
22
|
+
import { _ as _objectWithoutPropertiesLoose$1, a as _extends, c as classnames } from './index-aaa2dae0.js';
|
|
23
|
+
import { _ as _defineProperty, a as _typeof, b as _inherits, c as _classCallCheck, d as _possibleConstructorReturn, e as _getPrototypeOf, f as _assertThisInitialized, g as _createClass } from './inherits-77d5e4fc.js';
|
|
24
24
|
|
|
25
25
|
function _objectWithoutProperties(source, excluded) {
|
|
26
26
|
if (source == null) return {};
|
|
@@ -41,24 +41,9 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
41
41
|
return target;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
function _defineProperty(obj, key, value) {
|
|
45
|
-
if (key in obj) {
|
|
46
|
-
Object.defineProperty(obj, key, {
|
|
47
|
-
value: value,
|
|
48
|
-
enumerable: true,
|
|
49
|
-
configurable: true,
|
|
50
|
-
writable: true
|
|
51
|
-
});
|
|
52
|
-
} else {
|
|
53
|
-
obj[key] = value;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return obj;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
44
|
function _objectSpread(target) {
|
|
60
45
|
for (var i = 1; i < arguments.length; i++) {
|
|
61
|
-
var source = arguments[i] != null ?
|
|
46
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
62
47
|
var ownKeys = Object.keys(source);
|
|
63
48
|
|
|
64
49
|
if (typeof Object.getOwnPropertySymbols === 'function') {
|
|
@@ -75,66 +60,6 @@ function _objectSpread(target) {
|
|
|
75
60
|
return target;
|
|
76
61
|
}
|
|
77
62
|
|
|
78
|
-
function _classCallCheck(instance, Constructor) {
|
|
79
|
-
if (!(instance instanceof Constructor)) {
|
|
80
|
-
throw new TypeError("Cannot call a class as a function");
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function _defineProperties(target, props) {
|
|
85
|
-
for (var i = 0; i < props.length; i++) {
|
|
86
|
-
var descriptor = props[i];
|
|
87
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
88
|
-
descriptor.configurable = true;
|
|
89
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
90
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
95
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
96
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
97
|
-
return Constructor;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function _assertThisInitialized(self) {
|
|
101
|
-
if (self === void 0) {
|
|
102
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return self;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function _possibleConstructorReturn(self, call) {
|
|
109
|
-
if (call && (_typeof$1(call) === "object" || typeof call === "function")) {
|
|
110
|
-
return call;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
return _assertThisInitialized(self);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function _getPrototypeOf(o) {
|
|
117
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
118
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
119
|
-
};
|
|
120
|
-
return _getPrototypeOf(o);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function _inherits(subClass, superClass) {
|
|
124
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
125
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
129
|
-
constructor: {
|
|
130
|
-
value: subClass,
|
|
131
|
-
writable: true,
|
|
132
|
-
configurable: true
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
63
|
/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */
|
|
139
64
|
|
|
140
65
|
var hasElementType = typeof Element !== 'undefined';
|
|
@@ -270,22 +195,6 @@ var reactFastCompare = function isEqual(a, b) {
|
|
|
270
195
|
}
|
|
271
196
|
};
|
|
272
197
|
|
|
273
|
-
function _typeof(obj) {
|
|
274
|
-
"@babel/helpers - typeof";
|
|
275
|
-
|
|
276
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
277
|
-
_typeof = function _typeof(obj) {
|
|
278
|
-
return typeof obj;
|
|
279
|
-
};
|
|
280
|
-
} else {
|
|
281
|
-
_typeof = function _typeof(obj) {
|
|
282
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
return _typeof(obj);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
198
|
// From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
290
199
|
var shallowEqual = function shallowEqual(objA, objB) {
|
|
291
200
|
if (objA === objB) {
|
|
@@ -330,7 +239,7 @@ var removeEmptyKey = function removeEmptyKey(obj) {
|
|
|
330
239
|
return;
|
|
331
240
|
}
|
|
332
241
|
|
|
333
|
-
if (!objectHasKeys
|
|
242
|
+
if (!objectHasKeys(value)) {
|
|
334
243
|
delete obj[key];
|
|
335
244
|
} else {
|
|
336
245
|
removeEmptyKey(value);
|
|
@@ -366,7 +275,7 @@ function addQueryID(hits, queryID) {
|
|
|
366
275
|
});
|
|
367
276
|
});
|
|
368
277
|
}
|
|
369
|
-
function find
|
|
278
|
+
function find(array, comparator) {
|
|
370
279
|
if (!Array.isArray(array)) {
|
|
371
280
|
return undefined;
|
|
372
281
|
}
|
|
@@ -379,11 +288,11 @@ function find$2(array, comparator) {
|
|
|
379
288
|
|
|
380
289
|
return undefined;
|
|
381
290
|
}
|
|
382
|
-
function objectHasKeys
|
|
291
|
+
function objectHasKeys(object) {
|
|
383
292
|
return object && Object.keys(object).length > 0;
|
|
384
293
|
} // https://github.com/babel/babel/blob/3aaafae053fa75febb3aa45d45b6f00646e30ba4/packages/babel-helpers/src/helpers.js#L604-L620
|
|
385
294
|
|
|
386
|
-
function omit
|
|
295
|
+
function omit(source, excluded) {
|
|
387
296
|
if (source === null || source === undefined) {
|
|
388
297
|
return {};
|
|
389
298
|
}
|
|
@@ -454,9 +363,9 @@ var instantSearchContext = createContext({
|
|
|
454
363
|
var InstantSearchConsumer = instantSearchContext.Consumer,
|
|
455
364
|
InstantSearchProvider = instantSearchContext.Provider;
|
|
456
365
|
|
|
457
|
-
var _createContext
|
|
458
|
-
IndexConsumer = _createContext
|
|
459
|
-
IndexProvider = _createContext
|
|
366
|
+
var _createContext = createContext(undefined),
|
|
367
|
+
IndexConsumer = _createContext.Consumer,
|
|
368
|
+
IndexProvider = _createContext.Provider;
|
|
460
369
|
|
|
461
370
|
/**
|
|
462
371
|
* Connectors are the HOC used to transform React components
|
|
@@ -669,9 +578,9 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
669
578
|
}, {
|
|
670
579
|
key: "render",
|
|
671
580
|
value: function render() {
|
|
672
|
-
var _this$props = this.props
|
|
673
|
-
_this$props.contextValue
|
|
674
|
-
|
|
581
|
+
var _this$props = this.props,
|
|
582
|
+
contextValue = _this$props.contextValue,
|
|
583
|
+
props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
675
584
|
|
|
676
585
|
var providedProps = this.state.providedProps;
|
|
677
586
|
|
|
@@ -822,7 +731,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
822
731
|
});
|
|
823
732
|
}
|
|
824
733
|
|
|
825
|
-
var version
|
|
734
|
+
var version = '6.10.3';
|
|
826
735
|
|
|
827
736
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
828
737
|
return function (props, propName, componentName) {
|
|
@@ -1019,7 +928,7 @@ function hasRefinements(_ref) {
|
|
|
1019
928
|
return Object.hasOwnProperty.call(searchState, id);
|
|
1020
929
|
}
|
|
1021
930
|
|
|
1022
|
-
function getRefinements
|
|
931
|
+
function getRefinements(_ref2) {
|
|
1023
932
|
var multiIndex = _ref2.multiIndex,
|
|
1024
933
|
indexId = _ref2.indexId,
|
|
1025
934
|
namespace = _ref2.namespace,
|
|
@@ -1061,7 +970,7 @@ function getCurrentRefinementValue(props, searchState, context, id, defaultValue
|
|
|
1061
970
|
var hasRefinementsValue = hasRefinements(args);
|
|
1062
971
|
|
|
1063
972
|
if (hasRefinementsValue) {
|
|
1064
|
-
return getRefinements
|
|
973
|
+
return getRefinements(args);
|
|
1065
974
|
}
|
|
1066
975
|
|
|
1067
976
|
if (props.defaultRefinement) {
|
|
@@ -1102,10 +1011,10 @@ function cleanUpValueWithSingleIndex(_ref3) {
|
|
|
1102
1011
|
attribute = _ref3.attribute;
|
|
1103
1012
|
|
|
1104
1013
|
if (namespace) {
|
|
1105
|
-
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit
|
|
1014
|
+
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit(searchState[namespace], [attribute])));
|
|
1106
1015
|
}
|
|
1107
1016
|
|
|
1108
|
-
return omit
|
|
1017
|
+
return omit(searchState, [id]);
|
|
1109
1018
|
}
|
|
1110
1019
|
|
|
1111
1020
|
function cleanUpValueWithMultiIndex(_ref4) {
|
|
@@ -1118,20 +1027,20 @@ function cleanUpValueWithMultiIndex(_ref4) {
|
|
|
1118
1027
|
|
|
1119
1028
|
if (namespace && indexSearchState) {
|
|
1120
1029
|
return _objectSpread({}, searchState, {
|
|
1121
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit
|
|
1030
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit(indexSearchState[namespace], [attribute])))))
|
|
1122
1031
|
});
|
|
1123
1032
|
}
|
|
1124
1033
|
|
|
1125
1034
|
if (indexSearchState) {
|
|
1126
1035
|
return _objectSpread({}, searchState, {
|
|
1127
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit
|
|
1036
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit(indexSearchState, [id])))
|
|
1128
1037
|
});
|
|
1129
1038
|
}
|
|
1130
1039
|
|
|
1131
1040
|
return searchState;
|
|
1132
1041
|
}
|
|
1133
1042
|
|
|
1134
|
-
function getId
|
|
1043
|
+
function getId() {
|
|
1135
1044
|
return 'configure';
|
|
1136
1045
|
}
|
|
1137
1046
|
|
|
@@ -1141,20 +1050,20 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1141
1050
|
return {};
|
|
1142
1051
|
},
|
|
1143
1052
|
getSearchParameters: function getSearchParameters(searchParameters, props) {
|
|
1144
|
-
props.children
|
|
1145
|
-
props.contextValue
|
|
1146
|
-
props.indexContextValue
|
|
1147
|
-
|
|
1053
|
+
var children = props.children,
|
|
1054
|
+
contextValue = props.contextValue,
|
|
1055
|
+
indexContextValue = props.indexContextValue,
|
|
1056
|
+
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1148
1057
|
|
|
1149
1058
|
return searchParameters.setQueryParameters(items);
|
|
1150
1059
|
},
|
|
1151
1060
|
transitionState: function transitionState(props, prevSearchState, nextSearchState) {
|
|
1152
|
-
var id = getId
|
|
1061
|
+
var id = getId();
|
|
1153
1062
|
|
|
1154
|
-
props.children
|
|
1155
|
-
props.contextValue
|
|
1156
|
-
props.indexContextValue
|
|
1157
|
-
|
|
1063
|
+
var children = props.children,
|
|
1064
|
+
contextValue = props.contextValue,
|
|
1065
|
+
indexContextValue = props.indexContextValue,
|
|
1066
|
+
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1158
1067
|
|
|
1159
1068
|
var propKeys = Object.keys(props);
|
|
1160
1069
|
var nonPresentKeys = this._props ? Object.keys(this._props).filter(function (prop) {
|
|
@@ -1162,7 +1071,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1162
1071
|
}) : [];
|
|
1163
1072
|
this._props = props;
|
|
1164
1073
|
|
|
1165
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit
|
|
1074
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), items));
|
|
1166
1075
|
|
|
1167
1076
|
return refineValue(nextSearchState, nextValue, {
|
|
1168
1077
|
ais: props.contextValue,
|
|
@@ -1170,7 +1079,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1170
1079
|
});
|
|
1171
1080
|
},
|
|
1172
1081
|
cleanUp: function cleanUp(props, searchState) {
|
|
1173
|
-
var id = getId
|
|
1082
|
+
var id = getId();
|
|
1174
1083
|
var indexId = getIndexId({
|
|
1175
1084
|
ais: props.contextValue,
|
|
1176
1085
|
multiIndexContext: props.indexContextValue
|
|
@@ -1236,39 +1145,26 @@ var Configure = connectConfigure(function Configure() {
|
|
|
1236
1145
|
return null;
|
|
1237
1146
|
});
|
|
1238
1147
|
|
|
1239
|
-
function
|
|
1240
|
-
if (
|
|
1148
|
+
function _arrayWithoutHoles(arr) {
|
|
1149
|
+
if (Array.isArray(arr)) {
|
|
1150
|
+
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
|
|
1151
|
+
arr2[i] = arr[i];
|
|
1152
|
+
}
|
|
1241
1153
|
|
|
1242
|
-
|
|
1243
|
-
arr2[i] = arr[i];
|
|
1154
|
+
return arr2;
|
|
1244
1155
|
}
|
|
1245
|
-
|
|
1246
|
-
return arr2;
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
function _arrayWithoutHoles(arr) {
|
|
1250
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
1251
1156
|
}
|
|
1252
1157
|
|
|
1253
1158
|
function _iterableToArray(iter) {
|
|
1254
|
-
if (
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
1258
|
-
if (!o) return;
|
|
1259
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1260
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1261
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1262
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1263
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1159
|
+
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
|
|
1264
1160
|
}
|
|
1265
1161
|
|
|
1266
1162
|
function _nonIterableSpread() {
|
|
1267
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance
|
|
1163
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
|
1268
1164
|
}
|
|
1269
1165
|
|
|
1270
1166
|
function _toConsumableArray(arr) {
|
|
1271
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) ||
|
|
1167
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
|
1272
1168
|
}
|
|
1273
1169
|
|
|
1274
1170
|
function clone(value) {
|
|
@@ -1418,13 +1314,13 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
1418
1314
|
return target;
|
|
1419
1315
|
}
|
|
1420
1316
|
|
|
1421
|
-
var omit = _objectWithoutPropertiesLoose;
|
|
1317
|
+
var omit$1 = _objectWithoutPropertiesLoose;
|
|
1422
1318
|
|
|
1423
|
-
function objectHasKeys(obj) {
|
|
1319
|
+
function objectHasKeys$1(obj) {
|
|
1424
1320
|
return obj && Object.keys(obj).length > 0;
|
|
1425
1321
|
}
|
|
1426
1322
|
|
|
1427
|
-
var objectHasKeys_1 = objectHasKeys;
|
|
1323
|
+
var objectHasKeys_1 = objectHasKeys$1;
|
|
1428
1324
|
|
|
1429
1325
|
var isValidUserToken = function isValidUserToken(userToken) {
|
|
1430
1326
|
if (userToken === null) {
|
|
@@ -1532,7 +1428,7 @@ var lib = {
|
|
|
1532
1428
|
}
|
|
1533
1429
|
return {};
|
|
1534
1430
|
} else if (typeof attribute === 'string') {
|
|
1535
|
-
return omit(refinementList, [attribute]);
|
|
1431
|
+
return omit$1(refinementList, [attribute]);
|
|
1536
1432
|
} else if (typeof attribute === 'function') {
|
|
1537
1433
|
var hasChanged = false;
|
|
1538
1434
|
|
|
@@ -1577,7 +1473,7 @@ var lib = {
|
|
|
1577
1473
|
}
|
|
1578
1474
|
};
|
|
1579
1475
|
|
|
1580
|
-
var RefinementList
|
|
1476
|
+
var RefinementList = lib;
|
|
1581
1477
|
|
|
1582
1478
|
/**
|
|
1583
1479
|
* isEqual, but only for numeric refinement values, possible values:
|
|
@@ -1946,22 +1842,22 @@ SearchParameters.prototype = {
|
|
|
1946
1842
|
clearRefinements: function clearRefinements(attribute) {
|
|
1947
1843
|
var patch = {
|
|
1948
1844
|
numericRefinements: this._clearNumericRefinements(attribute),
|
|
1949
|
-
facetsRefinements: RefinementList
|
|
1845
|
+
facetsRefinements: RefinementList.clearRefinement(
|
|
1950
1846
|
this.facetsRefinements,
|
|
1951
1847
|
attribute,
|
|
1952
1848
|
'conjunctiveFacet'
|
|
1953
1849
|
),
|
|
1954
|
-
facetsExcludes: RefinementList
|
|
1850
|
+
facetsExcludes: RefinementList.clearRefinement(
|
|
1955
1851
|
this.facetsExcludes,
|
|
1956
1852
|
attribute,
|
|
1957
1853
|
'exclude'
|
|
1958
1854
|
),
|
|
1959
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
1855
|
+
disjunctiveFacetsRefinements: RefinementList.clearRefinement(
|
|
1960
1856
|
this.disjunctiveFacetsRefinements,
|
|
1961
1857
|
attribute,
|
|
1962
1858
|
'disjunctiveFacet'
|
|
1963
1859
|
),
|
|
1964
|
-
hierarchicalFacetsRefinements: RefinementList
|
|
1860
|
+
hierarchicalFacetsRefinements: RefinementList.clearRefinement(
|
|
1965
1861
|
this.hierarchicalFacetsRefinements,
|
|
1966
1862
|
attribute,
|
|
1967
1863
|
'hierarchicalFacet'
|
|
@@ -2237,7 +2133,7 @@ SearchParameters.prototype = {
|
|
|
2237
2133
|
}
|
|
2238
2134
|
return {};
|
|
2239
2135
|
} else if (typeof attribute === 'string') {
|
|
2240
|
-
return omit(this.numericRefinements, [attribute]);
|
|
2136
|
+
return omit$1(this.numericRefinements, [attribute]);
|
|
2241
2137
|
} else if (typeof attribute === 'function') {
|
|
2242
2138
|
var hasChanged = false;
|
|
2243
2139
|
var numericRefinements = this.numericRefinements;
|
|
@@ -2329,10 +2225,10 @@ SearchParameters.prototype = {
|
|
|
2329
2225
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2330
2226
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2331
2227
|
}
|
|
2332
|
-
if (RefinementList
|
|
2228
|
+
if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2333
2229
|
|
|
2334
2230
|
return this.setQueryParameters({
|
|
2335
|
-
facetsRefinements: RefinementList
|
|
2231
|
+
facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value)
|
|
2336
2232
|
});
|
|
2337
2233
|
},
|
|
2338
2234
|
/**
|
|
@@ -2346,10 +2242,10 @@ SearchParameters.prototype = {
|
|
|
2346
2242
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2347
2243
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2348
2244
|
}
|
|
2349
|
-
if (RefinementList
|
|
2245
|
+
if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2350
2246
|
|
|
2351
2247
|
return this.setQueryParameters({
|
|
2352
|
-
facetsExcludes: RefinementList
|
|
2248
|
+
facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value)
|
|
2353
2249
|
});
|
|
2354
2250
|
},
|
|
2355
2251
|
/**
|
|
@@ -2365,10 +2261,10 @@ SearchParameters.prototype = {
|
|
|
2365
2261
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2366
2262
|
}
|
|
2367
2263
|
|
|
2368
|
-
if (RefinementList
|
|
2264
|
+
if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2369
2265
|
|
|
2370
2266
|
return this.setQueryParameters({
|
|
2371
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2267
|
+
disjunctiveFacetsRefinements: RefinementList.addRefinement(
|
|
2372
2268
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2373
2269
|
});
|
|
2374
2270
|
},
|
|
@@ -2453,10 +2349,10 @@ SearchParameters.prototype = {
|
|
|
2453
2349
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2454
2350
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2455
2351
|
}
|
|
2456
|
-
if (!RefinementList
|
|
2352
|
+
if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2457
2353
|
|
|
2458
2354
|
return this.setQueryParameters({
|
|
2459
|
-
facetsRefinements: RefinementList
|
|
2355
|
+
facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value)
|
|
2460
2356
|
});
|
|
2461
2357
|
},
|
|
2462
2358
|
/**
|
|
@@ -2470,10 +2366,10 @@ SearchParameters.prototype = {
|
|
|
2470
2366
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2471
2367
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2472
2368
|
}
|
|
2473
|
-
if (!RefinementList
|
|
2369
|
+
if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2474
2370
|
|
|
2475
2371
|
return this.setQueryParameters({
|
|
2476
|
-
facetsExcludes: RefinementList
|
|
2372
|
+
facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value)
|
|
2477
2373
|
});
|
|
2478
2374
|
},
|
|
2479
2375
|
/**
|
|
@@ -2488,10 +2384,10 @@ SearchParameters.prototype = {
|
|
|
2488
2384
|
throw new Error(
|
|
2489
2385
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2490
2386
|
}
|
|
2491
|
-
if (!RefinementList
|
|
2387
|
+
if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2492
2388
|
|
|
2493
2389
|
return this.setQueryParameters({
|
|
2494
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2390
|
+
disjunctiveFacetsRefinements: RefinementList.removeRefinement(
|
|
2495
2391
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2496
2392
|
});
|
|
2497
2393
|
},
|
|
@@ -2557,7 +2453,7 @@ SearchParameters.prototype = {
|
|
|
2557
2453
|
}
|
|
2558
2454
|
|
|
2559
2455
|
return this.setQueryParameters({
|
|
2560
|
-
facetsRefinements: RefinementList
|
|
2456
|
+
facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2561
2457
|
});
|
|
2562
2458
|
},
|
|
2563
2459
|
/**
|
|
@@ -2573,7 +2469,7 @@ SearchParameters.prototype = {
|
|
|
2573
2469
|
}
|
|
2574
2470
|
|
|
2575
2471
|
return this.setQueryParameters({
|
|
2576
|
-
facetsExcludes: RefinementList
|
|
2472
|
+
facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2577
2473
|
});
|
|
2578
2474
|
},
|
|
2579
2475
|
/**
|
|
@@ -2590,7 +2486,7 @@ SearchParameters.prototype = {
|
|
|
2590
2486
|
}
|
|
2591
2487
|
|
|
2592
2488
|
return this.setQueryParameters({
|
|
2593
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2489
|
+
disjunctiveFacetsRefinements: RefinementList.toggleRefinement(
|
|
2594
2490
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2595
2491
|
});
|
|
2596
2492
|
},
|
|
@@ -2729,7 +2625,7 @@ SearchParameters.prototype = {
|
|
|
2729
2625
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2730
2626
|
return false;
|
|
2731
2627
|
}
|
|
2732
|
-
return RefinementList
|
|
2628
|
+
return RefinementList.isRefined(this.facetsRefinements, facet, value);
|
|
2733
2629
|
},
|
|
2734
2630
|
/**
|
|
2735
2631
|
* Returns true if the facet contains exclusions or if a specific value is
|
|
@@ -2745,7 +2641,7 @@ SearchParameters.prototype = {
|
|
|
2745
2641
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2746
2642
|
return false;
|
|
2747
2643
|
}
|
|
2748
|
-
return RefinementList
|
|
2644
|
+
return RefinementList.isRefined(this.facetsExcludes, facet, value);
|
|
2749
2645
|
},
|
|
2750
2646
|
/**
|
|
2751
2647
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2760,7 +2656,7 @@ SearchParameters.prototype = {
|
|
|
2760
2656
|
if (!this.isDisjunctiveFacet(facet)) {
|
|
2761
2657
|
return false;
|
|
2762
2658
|
}
|
|
2763
|
-
return RefinementList
|
|
2659
|
+
return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2764
2660
|
},
|
|
2765
2661
|
/**
|
|
2766
2662
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2946,7 +2842,7 @@ SearchParameters.prototype = {
|
|
|
2946
2842
|
var isNextValueDefined = nextWithNumbers[key] !== undefined;
|
|
2947
2843
|
|
|
2948
2844
|
if (isPreviousValueDefined && !isNextValueDefined) {
|
|
2949
|
-
return omit(previous, [key]);
|
|
2845
|
+
return omit$1(previous, [key]);
|
|
2950
2846
|
}
|
|
2951
2847
|
|
|
2952
2848
|
if (isNextValueDefined) {
|
|
@@ -4051,29 +3947,20 @@ function extractNormalizedFacetValues(results, attribute) {
|
|
|
4051
3947
|
}
|
|
4052
3948
|
|
|
4053
3949
|
/**
|
|
4054
|
-
* Sort nodes of a hierarchical
|
|
3950
|
+
* Sort nodes of a hierarchical facet results
|
|
4055
3951
|
* @private
|
|
4056
|
-
* @param {
|
|
4057
|
-
* @param {HierarchicalFacet|Array} node node upon which we want to apply the sort
|
|
4058
|
-
* @param {string[]} names attribute names
|
|
4059
|
-
* @param {number} [level=0] current index in the names array
|
|
3952
|
+
* @param {HierarchicalFacet} node node to upon which we want to apply the sort
|
|
4060
3953
|
*/
|
|
4061
|
-
function recSort(sortFn, node
|
|
4062
|
-
level = level || 0;
|
|
4063
|
-
|
|
4064
|
-
if (Array.isArray(node)) {
|
|
4065
|
-
return sortFn(node, names[level]);
|
|
4066
|
-
}
|
|
4067
|
-
|
|
3954
|
+
function recSort(sortFn, node) {
|
|
4068
3955
|
if (!node.data || node.data.length === 0) {
|
|
4069
3956
|
return node;
|
|
4070
3957
|
}
|
|
4071
3958
|
|
|
4072
3959
|
var children = node.data.map(function(childNode) {
|
|
4073
|
-
return recSort(sortFn, childNode
|
|
3960
|
+
return recSort(sortFn, childNode);
|
|
4074
3961
|
});
|
|
4075
|
-
var sortedChildren = sortFn(children
|
|
4076
|
-
var newNode =
|
|
3962
|
+
var sortedChildren = sortFn(children);
|
|
3963
|
+
var newNode = merge_1({}, node, {data: sortedChildren});
|
|
4077
3964
|
return newNode;
|
|
4078
3965
|
}
|
|
4079
3966
|
|
|
@@ -4083,72 +3970,6 @@ function vanillaSortFn(order, data) {
|
|
|
4083
3970
|
return data.sort(order);
|
|
4084
3971
|
}
|
|
4085
3972
|
|
|
4086
|
-
/**
|
|
4087
|
-
* @typedef FacetOrdering
|
|
4088
|
-
* @type {Object}
|
|
4089
|
-
* @property {string[]} [order]
|
|
4090
|
-
* @property {'count' | 'alpha' | 'hidden'} [sortRemainingBy]
|
|
4091
|
-
*/
|
|
4092
|
-
|
|
4093
|
-
/**
|
|
4094
|
-
* Sorts facet arrays via their facet ordering
|
|
4095
|
-
* @param {Array} facetValues the values
|
|
4096
|
-
* @param {FacetOrdering} facetOrdering the ordering
|
|
4097
|
-
* @returns {Array}
|
|
4098
|
-
*/
|
|
4099
|
-
function sortViaFacetOrdering(facetValues, facetOrdering) {
|
|
4100
|
-
var orderedFacets = [];
|
|
4101
|
-
var remainingFacets = [];
|
|
4102
|
-
|
|
4103
|
-
var order = facetOrdering.order || [];
|
|
4104
|
-
/**
|
|
4105
|
-
* an object with the keys being the values in order, the values their index:
|
|
4106
|
-
* ['one', 'two'] -> { one: 0, two: 1 }
|
|
4107
|
-
*/
|
|
4108
|
-
var reverseOrder = order.reduce(function(acc, name, i) {
|
|
4109
|
-
acc[name] = i;
|
|
4110
|
-
return acc;
|
|
4111
|
-
}, {});
|
|
4112
|
-
|
|
4113
|
-
facetValues.forEach(function(item) {
|
|
4114
|
-
// hierarchical facets get sorted using their raw name
|
|
4115
|
-
var name = item.path || item.name;
|
|
4116
|
-
if (reverseOrder[name] !== undefined) {
|
|
4117
|
-
orderedFacets[reverseOrder[name]] = item;
|
|
4118
|
-
} else {
|
|
4119
|
-
remainingFacets.push(item);
|
|
4120
|
-
}
|
|
4121
|
-
});
|
|
4122
|
-
|
|
4123
|
-
var sortRemainingBy = facetOrdering.sortRemainingBy;
|
|
4124
|
-
var ordering;
|
|
4125
|
-
if (sortRemainingBy === 'hidden') {
|
|
4126
|
-
return orderedFacets;
|
|
4127
|
-
} else if (sortRemainingBy === 'alpha') {
|
|
4128
|
-
ordering = [['path', 'name'], ['asc', 'asc']];
|
|
4129
|
-
} else {
|
|
4130
|
-
ordering = [['count'], ['desc']];
|
|
4131
|
-
}
|
|
4132
|
-
|
|
4133
|
-
return orderedFacets.concat(
|
|
4134
|
-
orderBy_1(remainingFacets, ordering[0], ordering[1])
|
|
4135
|
-
);
|
|
4136
|
-
}
|
|
4137
|
-
|
|
4138
|
-
/**
|
|
4139
|
-
* @param {SearchResults} results the search results class
|
|
4140
|
-
* @param {string} attribute the attribute to retrieve ordering of
|
|
4141
|
-
* @returns {FacetOrdering=}
|
|
4142
|
-
*/
|
|
4143
|
-
function getFacetOrdering(results, attribute) {
|
|
4144
|
-
return (
|
|
4145
|
-
results.renderingContent &&
|
|
4146
|
-
results.renderingContent.facetOrdering &&
|
|
4147
|
-
results.renderingContent.facetOrdering.values &&
|
|
4148
|
-
results.renderingContent.facetOrdering.values[attribute]
|
|
4149
|
-
);
|
|
4150
|
-
}
|
|
4151
|
-
|
|
4152
3973
|
/**
|
|
4153
3974
|
* Get a the list of values for a given facet attribute. Those values are sorted
|
|
4154
3975
|
* refinement first, descending count (bigger value on top), and name ascending
|
|
@@ -4161,9 +3982,6 @@ function getFacetOrdering(results, attribute) {
|
|
|
4161
3982
|
* might not be respected if you have facet values that are already refined.
|
|
4162
3983
|
* @param {string} attribute attribute name
|
|
4163
3984
|
* @param {object} opts configuration options.
|
|
4164
|
-
* @param {boolean} [opts.facetOrdering]
|
|
4165
|
-
* Force the use of facetOrdering from the result if a sortBy is present. If
|
|
4166
|
-
* sortBy isn't present, facetOrdering will be used automatically.
|
|
4167
3985
|
* @param {Array.<string> | function} opts.sortBy
|
|
4168
3986
|
* When using strings, it consists of
|
|
4169
3987
|
* the name of the [FacetValue](#SearchResults.FacetValue) or the
|
|
@@ -4203,41 +4021,30 @@ SearchResults.prototype.getFacetValues = function(attribute, opts) {
|
|
|
4203
4021
|
return undefined;
|
|
4204
4022
|
}
|
|
4205
4023
|
|
|
4206
|
-
var options = defaultsPure({}, opts, {
|
|
4207
|
-
sortBy: SearchResults.DEFAULT_SORT,
|
|
4208
|
-
// if no sortBy is given, attempt to sort based on facetOrdering
|
|
4209
|
-
// if it is given, we still allow to sort via facet ordering first
|
|
4210
|
-
facetOrdering: !(opts && opts.sortBy)
|
|
4211
|
-
});
|
|
4212
|
-
|
|
4213
|
-
var results = this;
|
|
4214
|
-
var attributes;
|
|
4215
|
-
if (Array.isArray(facetValues)) {
|
|
4216
|
-
attributes = [attribute];
|
|
4217
|
-
} else {
|
|
4218
|
-
var config = results._state.getHierarchicalFacetByName(facetValues.name);
|
|
4219
|
-
attributes = config.attributes;
|
|
4220
|
-
}
|
|
4024
|
+
var options = defaultsPure({}, opts, {sortBy: SearchResults.DEFAULT_SORT});
|
|
4221
4025
|
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
return sortViaFacetOrdering(data, facetOrdering);
|
|
4227
|
-
}
|
|
4026
|
+
if (Array.isArray(options.sortBy)) {
|
|
4027
|
+
var order = formatSort(options.sortBy, SearchResults.DEFAULT_SORT);
|
|
4028
|
+
if (Array.isArray(facetValues)) {
|
|
4029
|
+
return orderBy_1(facetValues, order[0], order[1]);
|
|
4228
4030
|
}
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4031
|
+
// If facetValues is not an array, it's an object thus a hierarchical facet object
|
|
4032
|
+
return recSort(function(hierarchicalFacetValues) {
|
|
4033
|
+
return orderBy_1(hierarchicalFacetValues, order[0], order[1]);
|
|
4034
|
+
}, facetValues);
|
|
4035
|
+
} else if (typeof options.sortBy === 'function') {
|
|
4036
|
+
if (Array.isArray(facetValues)) {
|
|
4037
|
+
return facetValues.sort(options.sortBy);
|
|
4235
4038
|
}
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
);
|
|
4240
|
-
}
|
|
4039
|
+
// If facetValues is not an array, it's an object thus a hierarchical facet object
|
|
4040
|
+
return recSort(function(data) {
|
|
4041
|
+
return vanillaSortFn(options.sortBy, data);
|
|
4042
|
+
}, facetValues);
|
|
4043
|
+
}
|
|
4044
|
+
throw new Error(
|
|
4045
|
+
'options.sortBy is optional but if defined it must be ' +
|
|
4046
|
+
'either an array of string (predicates) or a sorting function'
|
|
4047
|
+
);
|
|
4241
4048
|
};
|
|
4242
4049
|
|
|
4243
4050
|
/**
|
|
@@ -4768,7 +4575,7 @@ var requestBuilder = {
|
|
|
4768
4575
|
|
|
4769
4576
|
var requestBuilder_1 = requestBuilder;
|
|
4770
4577
|
|
|
4771
|
-
var version = '3.
|
|
4578
|
+
var version$1 = '3.4.4';
|
|
4772
4579
|
|
|
4773
4580
|
/**
|
|
4774
4581
|
* Event triggered when a parameter is set or updated
|
|
@@ -4875,7 +4682,7 @@ var version = '3.5.3';
|
|
|
4875
4682
|
*/
|
|
4876
4683
|
function AlgoliaSearchHelper(client, index, options) {
|
|
4877
4684
|
if (typeof client.addAlgoliaAgent === 'function') {
|
|
4878
|
-
client.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
4685
|
+
client.addAlgoliaAgent('JS Helper (' + version$1 + ')');
|
|
4879
4686
|
}
|
|
4880
4687
|
|
|
4881
4688
|
this.setClient(client);
|
|
@@ -5030,7 +4837,7 @@ AlgoliaSearchHelper.prototype.findAnswers = function(options) {
|
|
|
5030
4837
|
nbHits: options.nbHits
|
|
5031
4838
|
},
|
|
5032
4839
|
{
|
|
5033
|
-
params: omit(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
4840
|
+
params: omit$1(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
5034
4841
|
'attributesToSnippet',
|
|
5035
4842
|
'hitsPerPage',
|
|
5036
4843
|
'restrictSearchableAttributes',
|
|
@@ -6144,7 +5951,7 @@ AlgoliaSearchHelper.prototype.setClient = function(newClient) {
|
|
|
6144
5951
|
if (this.client === newClient) return this;
|
|
6145
5952
|
|
|
6146
5953
|
if (typeof newClient.addAlgoliaAgent === 'function') {
|
|
6147
|
-
newClient.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
5954
|
+
newClient.addAlgoliaAgent('JS Helper (' + version$1 + ')');
|
|
6148
5955
|
}
|
|
6149
5956
|
this.client = newClient;
|
|
6150
5957
|
|
|
@@ -6263,7 +6070,7 @@ function algoliasearchHelper(client, index, opts) {
|
|
|
6263
6070
|
* @member module:algoliasearchHelper.version
|
|
6264
6071
|
* @type {number}
|
|
6265
6072
|
*/
|
|
6266
|
-
algoliasearchHelper.version = version;
|
|
6073
|
+
algoliasearchHelper.version = version$1;
|
|
6267
6074
|
|
|
6268
6075
|
/**
|
|
6269
6076
|
* Constructor for the Helper.
|
|
@@ -6295,13 +6102,13 @@ function createOptionalFilter(_ref) {
|
|
|
6295
6102
|
return "".concat(attributeName, ":").concat(attributeValue, "<score=").concat(attributeScore || 1, ">");
|
|
6296
6103
|
}
|
|
6297
6104
|
|
|
6298
|
-
var defaultProps
|
|
6105
|
+
var defaultProps = {
|
|
6299
6106
|
transformSearchParameters: function transformSearchParameters(x) {
|
|
6300
6107
|
return _objectSpread({}, x);
|
|
6301
6108
|
}
|
|
6302
6109
|
};
|
|
6303
6110
|
|
|
6304
|
-
function getId$
|
|
6111
|
+
function getId$1() {
|
|
6305
6112
|
// We store the search state of this widget in `configure`.
|
|
6306
6113
|
return 'configure';
|
|
6307
6114
|
}
|
|
@@ -6349,7 +6156,7 @@ function getSearchParametersFromProps(props) {
|
|
|
6349
6156
|
|
|
6350
6157
|
var connectConfigureRelatedItems = createConnectorWithContext({
|
|
6351
6158
|
displayName: 'AlgoliaConfigureRelatedItems',
|
|
6352
|
-
defaultProps: defaultProps
|
|
6159
|
+
defaultProps: defaultProps,
|
|
6353
6160
|
getProvidedProps: function getProvidedProps() {
|
|
6354
6161
|
return {};
|
|
6355
6162
|
},
|
|
@@ -6357,7 +6164,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6357
6164
|
return searchParameters.setQueryParameters(getSearchParametersFromProps(props));
|
|
6358
6165
|
},
|
|
6359
6166
|
transitionState: function transitionState(props, _prevSearchState, nextSearchState) {
|
|
6360
|
-
var id = getId$
|
|
6167
|
+
var id = getId$1(); // We need to transform the exhaustive search parameters back to clean
|
|
6361
6168
|
// search parameters without the empty default keys so we don't pollute the
|
|
6362
6169
|
// `configure` search state.
|
|
6363
6170
|
|
|
@@ -6368,7 +6175,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6368
6175
|
}) : [];
|
|
6369
6176
|
this._searchParameters = searchParameters;
|
|
6370
6177
|
|
|
6371
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit
|
|
6178
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6372
6179
|
|
|
6373
6180
|
return refineValue(nextSearchState, nextValue, {
|
|
6374
6181
|
ais: props.contextValue,
|
|
@@ -6378,7 +6185,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6378
6185
|
cleanUp: function cleanUp(props, searchState) {
|
|
6379
6186
|
var _this = this;
|
|
6380
6187
|
|
|
6381
|
-
var id = getId$
|
|
6188
|
+
var id = getId$1();
|
|
6382
6189
|
var indexId = getIndexId({
|
|
6383
6190
|
ais: props.contextValue,
|
|
6384
6191
|
multiIndexContext: props.indexContextValue
|
|
@@ -6451,7 +6258,7 @@ function getWidgetRefinements(attribute, widgetKey, searchState) {
|
|
|
6451
6258
|
}
|
|
6452
6259
|
}
|
|
6453
6260
|
|
|
6454
|
-
function getRefinements(attribute) {
|
|
6261
|
+
function getRefinements$1(attribute) {
|
|
6455
6262
|
var searchState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6456
6263
|
var refinements = Object.keys(searchState).filter(function (widgetKey) {
|
|
6457
6264
|
return searchState[widgetKey] !== undefined && searchState[widgetKey][attribute] !== undefined;
|
|
@@ -6468,7 +6275,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6468
6275
|
var searchState = _ref.searchState,
|
|
6469
6276
|
trackedFilters = _ref.trackedFilters;
|
|
6470
6277
|
var ruleContexts = Object.keys(trackedFilters).reduce(function (facets, facetName) {
|
|
6471
|
-
var facetRefinements = getRefinements(facetName, searchState);
|
|
6278
|
+
var facetRefinements = getRefinements$1(facetName, searchState);
|
|
6472
6279
|
var getTrackedFacetValues = trackedFilters[facetName];
|
|
6473
6280
|
var trackedFacetValues = getTrackedFacetValues(facetRefinements);
|
|
6474
6281
|
return [].concat(_toConsumableArray(facets), _toConsumableArray(facetRefinements.filter(function (facetRefinement) {
|
|
@@ -6480,7 +6287,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6480
6287
|
return ruleContexts;
|
|
6481
6288
|
}
|
|
6482
6289
|
|
|
6483
|
-
var defaultProps = {
|
|
6290
|
+
var defaultProps$1 = {
|
|
6484
6291
|
transformItems: function transformItems(items) {
|
|
6485
6292
|
return items;
|
|
6486
6293
|
},
|
|
@@ -6491,7 +6298,7 @@ var defaultProps = {
|
|
|
6491
6298
|
};
|
|
6492
6299
|
var connectQueryRules = createConnectorWithContext({
|
|
6493
6300
|
displayName: 'AlgoliaQueryRules',
|
|
6494
|
-
defaultProps: defaultProps,
|
|
6301
|
+
defaultProps: defaultProps$1,
|
|
6495
6302
|
getProvidedProps: function getProvidedProps(props, _1, searchResults) {
|
|
6496
6303
|
var results = getResults(searchResults, {
|
|
6497
6304
|
ais: props.contextValue,
|
|
@@ -6668,10 +6475,20 @@ _defineProperty(Index, "propTypes", {
|
|
|
6668
6475
|
children: PropTypes.node
|
|
6669
6476
|
});
|
|
6670
6477
|
|
|
6671
|
-
({
|
|
6478
|
+
var IndexWrapper = function IndexWrapper(props) {
|
|
6479
|
+
var inferredIndexId = props.indexName;
|
|
6480
|
+
return React__default.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
6481
|
+
return React__default.createElement(Index, _extends({
|
|
6482
|
+
contextValue: contextValue,
|
|
6483
|
+
indexId: inferredIndexId
|
|
6484
|
+
}, props));
|
|
6485
|
+
});
|
|
6486
|
+
};
|
|
6487
|
+
|
|
6488
|
+
IndexWrapper.propTypes = {
|
|
6672
6489
|
indexName: PropTypes.string.isRequired,
|
|
6673
6490
|
indexId: PropTypes.string
|
|
6674
|
-
}
|
|
6491
|
+
};
|
|
6675
6492
|
|
|
6676
6493
|
function createWidgetsManager(onWidgetsUpdate) {
|
|
6677
6494
|
var widgets = []; // Is an update scheduled?
|
|
@@ -6732,7 +6549,7 @@ function createStore(initialState) {
|
|
|
6732
6549
|
function addAlgoliaAgents(searchClient) {
|
|
6733
6550
|
if (typeof searchClient.addAlgoliaAgent === 'function') {
|
|
6734
6551
|
searchClient.addAlgoliaAgent("react (".concat(version$2, ")"));
|
|
6735
|
-
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version
|
|
6552
|
+
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version, ")"));
|
|
6736
6553
|
}
|
|
6737
6554
|
}
|
|
6738
6555
|
|
|
@@ -6904,7 +6721,7 @@ function createInstantSearchManager(_ref) {
|
|
|
6904
6721
|
|
|
6905
6722
|
function search() {
|
|
6906
6723
|
if (!skip) {
|
|
6907
|
-
var _getSearchParameters = getSearchParameters(
|
|
6724
|
+
var _getSearchParameters = getSearchParameters(),
|
|
6908
6725
|
mainParameters = _getSearchParameters.mainParameters,
|
|
6909
6726
|
derivedParameters = _getSearchParameters.derivedParameters; // We have to call `slice` because the method `detach` on the derived
|
|
6910
6727
|
// helpers mutates the value `derivedHelpers`. The `forEach` loop does
|
|
@@ -6970,8 +6787,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6970
6787
|
nextIsSearchStalled = false;
|
|
6971
6788
|
}
|
|
6972
6789
|
|
|
6973
|
-
currentState.resultsFacetValues
|
|
6974
|
-
|
|
6790
|
+
var resultsFacetValues = currentState.resultsFacetValues,
|
|
6791
|
+
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6975
6792
|
|
|
6976
6793
|
store.setState(_objectSpread({}, partialState, {
|
|
6977
6794
|
results: results,
|
|
@@ -6992,8 +6809,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6992
6809
|
nextIsSearchStalled = false;
|
|
6993
6810
|
}
|
|
6994
6811
|
|
|
6995
|
-
currentState.resultsFacetValues
|
|
6996
|
-
|
|
6812
|
+
var resultsFacetValues = currentState.resultsFacetValues,
|
|
6813
|
+
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6997
6814
|
|
|
6998
6815
|
store.setState(_objectSpread({}, partialState, {
|
|
6999
6816
|
isSearchStalled: nextIsSearchStalled,
|
|
@@ -7005,9 +6822,9 @@ function createInstantSearchManager(_ref) {
|
|
|
7005
6822
|
function handleNewSearch() {
|
|
7006
6823
|
if (!stalledSearchTimer) {
|
|
7007
6824
|
stalledSearchTimer = setTimeout(function () {
|
|
7008
|
-
var _store$getState = store.getState()
|
|
7009
|
-
_store$getState.resultsFacetValues
|
|
7010
|
-
|
|
6825
|
+
var _store$getState = store.getState(),
|
|
6826
|
+
resultsFacetValues = _store$getState.resultsFacetValues,
|
|
6827
|
+
partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
7011
6828
|
|
|
7012
6829
|
store.setState(_objectSpread({}, partialState, {
|
|
7013
6830
|
isSearchStalled: true
|
|
@@ -7506,21 +7323,21 @@ _defineProperty(InstantSearch, "propTypes", {
|
|
|
7506
7323
|
stalledSearchDelay: PropTypes.number
|
|
7507
7324
|
});
|
|
7508
7325
|
|
|
7509
|
-
var getId$
|
|
7326
|
+
var getId$2 = function getId(props) {
|
|
7510
7327
|
return props.attributes[0];
|
|
7511
7328
|
};
|
|
7512
|
-
var namespace
|
|
7329
|
+
var namespace = 'hierarchicalMenu';
|
|
7513
7330
|
|
|
7514
|
-
function _refine
|
|
7515
|
-
var id = getId$
|
|
7331
|
+
function _refine(props, searchState, nextRefinement, context) {
|
|
7332
|
+
var id = getId$2(props);
|
|
7516
7333
|
|
|
7517
7334
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7518
7335
|
|
|
7519
7336
|
var resetPage = true;
|
|
7520
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace
|
|
7337
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
7521
7338
|
}
|
|
7522
7339
|
|
|
7523
|
-
function transformValue
|
|
7340
|
+
function transformValue(values) {
|
|
7524
7341
|
return values.reduce(function (acc, item) {
|
|
7525
7342
|
if (item.isRefined) {
|
|
7526
7343
|
acc.push({
|
|
@@ -7531,7 +7348,7 @@ function transformValue$1(values) {
|
|
|
7531
7348
|
}); // Create a variable in order to keep the same acc for the recursion, otherwise "reduce" returns a new one
|
|
7532
7349
|
|
|
7533
7350
|
if (item.data) {
|
|
7534
|
-
acc = acc.concat(transformValue
|
|
7351
|
+
acc = acc.concat(transformValue(item.data));
|
|
7535
7352
|
}
|
|
7536
7353
|
}
|
|
7537
7354
|
|
|
@@ -7593,7 +7410,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7593
7410
|
transformItems: PropTypes.func
|
|
7594
7411
|
},
|
|
7595
7412
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
7596
|
-
var id = getId$
|
|
7413
|
+
var id = getId$2(props);
|
|
7597
7414
|
var results = getResults(searchResults, {
|
|
7598
7415
|
ais: props.contextValue,
|
|
7599
7416
|
multiIndexContext: props.indexContextValue
|
|
@@ -7608,7 +7425,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7608
7425
|
}
|
|
7609
7426
|
|
|
7610
7427
|
var values = results.getFacetValues(id);
|
|
7611
|
-
var items = values.data ? transformValue
|
|
7428
|
+
var items = values.data ? transformValue(values.data) : [];
|
|
7612
7429
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7613
7430
|
return {
|
|
7614
7431
|
canRefine: transformedItems.length > 0,
|
|
@@ -7616,7 +7433,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7616
7433
|
};
|
|
7617
7434
|
},
|
|
7618
7435
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7619
|
-
return _refine
|
|
7436
|
+
return _refine(props, searchState, nextRefinement, {
|
|
7620
7437
|
ais: props.contextValue,
|
|
7621
7438
|
multiIndexContext: props.indexContextValue
|
|
7622
7439
|
});
|
|
@@ -7679,13 +7496,13 @@ var connectCurrentRefinements = createConnectorWithContext({
|
|
|
7679
7496
|
}
|
|
7680
7497
|
});
|
|
7681
7498
|
|
|
7682
|
-
var getId$
|
|
7499
|
+
var getId$3 = function getId(props) {
|
|
7683
7500
|
return props.attributes[0];
|
|
7684
7501
|
};
|
|
7685
|
-
var namespace$
|
|
7502
|
+
var namespace$1 = 'hierarchicalMenu';
|
|
7686
7503
|
|
|
7687
|
-
function getCurrentRefinement
|
|
7688
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
7504
|
+
function getCurrentRefinement(props, searchState, context) {
|
|
7505
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$1, ".").concat(getId$3(props)), null);
|
|
7689
7506
|
|
|
7690
7507
|
if (currentRefinement === '') {
|
|
7691
7508
|
return null;
|
|
@@ -7694,13 +7511,13 @@ function getCurrentRefinement$b(props, searchState, context) {
|
|
|
7694
7511
|
return currentRefinement;
|
|
7695
7512
|
}
|
|
7696
7513
|
|
|
7697
|
-
function getValue
|
|
7514
|
+
function getValue(path, props, searchState, context) {
|
|
7698
7515
|
var id = props.id,
|
|
7699
7516
|
attributes = props.attributes,
|
|
7700
7517
|
separator = props.separator,
|
|
7701
7518
|
rootPath = props.rootPath,
|
|
7702
7519
|
showParentLevel = props.showParentLevel;
|
|
7703
|
-
var currentRefinement = getCurrentRefinement
|
|
7520
|
+
var currentRefinement = getCurrentRefinement(props, searchState, context);
|
|
7704
7521
|
var nextRefinement;
|
|
7705
7522
|
|
|
7706
7523
|
if (currentRefinement === null) {
|
|
@@ -7721,14 +7538,14 @@ function getValue$2(path, props, searchState, context) {
|
|
|
7721
7538
|
return nextRefinement;
|
|
7722
7539
|
}
|
|
7723
7540
|
|
|
7724
|
-
function transformValue(value, props, searchState, context) {
|
|
7541
|
+
function transformValue$1(value, props, searchState, context) {
|
|
7725
7542
|
return value.map(function (v) {
|
|
7726
7543
|
return {
|
|
7727
7544
|
label: v.name,
|
|
7728
|
-
value: getValue
|
|
7545
|
+
value: getValue(v.path, props, searchState, context),
|
|
7729
7546
|
count: v.count,
|
|
7730
7547
|
isRefined: v.isRefined,
|
|
7731
|
-
items: v.data && transformValue(v.data, props, searchState, context)
|
|
7548
|
+
items: v.data && transformValue$1(v.data, props, searchState, context)
|
|
7732
7549
|
};
|
|
7733
7550
|
});
|
|
7734
7551
|
}
|
|
@@ -7744,20 +7561,20 @@ var truncate = function truncate() {
|
|
|
7744
7561
|
});
|
|
7745
7562
|
};
|
|
7746
7563
|
|
|
7747
|
-
function _refine$
|
|
7748
|
-
var id = getId$
|
|
7564
|
+
function _refine$1(props, searchState, nextRefinement, context) {
|
|
7565
|
+
var id = getId$3(props);
|
|
7749
7566
|
|
|
7750
7567
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7751
7568
|
|
|
7752
7569
|
var resetPage = true;
|
|
7753
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
7570
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$1);
|
|
7754
7571
|
}
|
|
7755
7572
|
|
|
7756
|
-
function _cleanUp
|
|
7757
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
7573
|
+
function _cleanUp(props, searchState, context) {
|
|
7574
|
+
return cleanUpValue(searchState, context, "".concat(namespace$1, ".").concat(getId$3(props)));
|
|
7758
7575
|
}
|
|
7759
7576
|
|
|
7760
|
-
var sortBy
|
|
7577
|
+
var sortBy = ['name:asc'];
|
|
7761
7578
|
/**
|
|
7762
7579
|
* connectHierarchicalMenu connector provides the logic to build a widget that will
|
|
7763
7580
|
* give the user the ability to explore a tree-like structure.
|
|
@@ -7839,7 +7656,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7839
7656
|
var showMore = props.showMore,
|
|
7840
7657
|
limit = props.limit,
|
|
7841
7658
|
showMoreLimit = props.showMoreLimit;
|
|
7842
|
-
var id = getId$
|
|
7659
|
+
var id = getId$3(props);
|
|
7843
7660
|
var results = getResults(searchResults, {
|
|
7844
7661
|
ais: props.contextValue,
|
|
7845
7662
|
multiIndexContext: props.indexContextValue
|
|
@@ -7849,7 +7666,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7849
7666
|
if (!isFacetPresent) {
|
|
7850
7667
|
return {
|
|
7851
7668
|
items: [],
|
|
7852
|
-
currentRefinement: getCurrentRefinement
|
|
7669
|
+
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7853
7670
|
ais: props.contextValue,
|
|
7854
7671
|
multiIndexContext: props.indexContextValue
|
|
7855
7672
|
}),
|
|
@@ -7859,16 +7676,16 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7859
7676
|
|
|
7860
7677
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7861
7678
|
var value = results.getFacetValues(id, {
|
|
7862
|
-
sortBy: sortBy
|
|
7679
|
+
sortBy: sortBy
|
|
7863
7680
|
});
|
|
7864
|
-
var items = value.data ? transformValue(value.data, props, searchState, {
|
|
7681
|
+
var items = value.data ? transformValue$1(value.data, props, searchState, {
|
|
7865
7682
|
ais: props.contextValue,
|
|
7866
7683
|
multiIndexContext: props.indexContextValue
|
|
7867
7684
|
}) : [];
|
|
7868
7685
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7869
7686
|
return {
|
|
7870
7687
|
items: truncate(transformedItems, itemsLimit),
|
|
7871
|
-
currentRefinement: getCurrentRefinement
|
|
7688
|
+
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7872
7689
|
ais: props.contextValue,
|
|
7873
7690
|
multiIndexContext: props.indexContextValue
|
|
7874
7691
|
}),
|
|
@@ -7876,13 +7693,13 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7876
7693
|
};
|
|
7877
7694
|
},
|
|
7878
7695
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7879
|
-
return _refine$
|
|
7696
|
+
return _refine$1(props, searchState, nextRefinement, {
|
|
7880
7697
|
ais: props.contextValue,
|
|
7881
7698
|
multiIndexContext: props.indexContextValue
|
|
7882
7699
|
});
|
|
7883
7700
|
},
|
|
7884
7701
|
cleanUp: function cleanUp(props, searchState) {
|
|
7885
|
-
return _cleanUp
|
|
7702
|
+
return _cleanUp(props, searchState, {
|
|
7886
7703
|
ais: props.contextValue,
|
|
7887
7704
|
multiIndexContext: props.indexContextValue
|
|
7888
7705
|
});
|
|
@@ -7896,7 +7713,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7896
7713
|
limit = props.limit,
|
|
7897
7714
|
showMoreLimit = props.showMoreLimit,
|
|
7898
7715
|
contextValue = props.contextValue;
|
|
7899
|
-
var id = getId$
|
|
7716
|
+
var id = getId$3(props);
|
|
7900
7717
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7901
7718
|
searchParameters = searchParameters.addHierarchicalFacet({
|
|
7902
7719
|
name: id,
|
|
@@ -7907,7 +7724,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7907
7724
|
}).setQueryParameters({
|
|
7908
7725
|
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, itemsLimit)
|
|
7909
7726
|
});
|
|
7910
|
-
var currentRefinement = getCurrentRefinement
|
|
7727
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7911
7728
|
ais: contextValue,
|
|
7912
7729
|
multiIndexContext: props.indexContextValue
|
|
7913
7730
|
});
|
|
@@ -7920,8 +7737,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7920
7737
|
},
|
|
7921
7738
|
getMetadata: function getMetadata(props, searchState) {
|
|
7922
7739
|
var rootAttribute = props.attributes[0];
|
|
7923
|
-
var id = getId$
|
|
7924
|
-
var currentRefinement = getCurrentRefinement
|
|
7740
|
+
var id = getId$3(props);
|
|
7741
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7925
7742
|
ais: props.contextValue,
|
|
7926
7743
|
multiIndexContext: props.indexContextValue
|
|
7927
7744
|
});
|
|
@@ -7929,7 +7746,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7929
7746
|
label: "".concat(rootAttribute, ": ").concat(currentRefinement),
|
|
7930
7747
|
attribute: rootAttribute,
|
|
7931
7748
|
value: function value(nextState) {
|
|
7932
|
-
return _refine$
|
|
7749
|
+
return _refine$1(props, nextState, '', {
|
|
7933
7750
|
ais: props.contextValue,
|
|
7934
7751
|
multiIndexContext: props.indexContextValue
|
|
7935
7752
|
});
|
|
@@ -8106,12 +7923,12 @@ var connectHits = createConnectorWithContext({
|
|
|
8106
7923
|
}
|
|
8107
7924
|
});
|
|
8108
7925
|
|
|
8109
|
-
function getId$
|
|
7926
|
+
function getId$4() {
|
|
8110
7927
|
return 'hitsPerPage';
|
|
8111
7928
|
}
|
|
8112
7929
|
|
|
8113
|
-
function getCurrentRefinement$
|
|
8114
|
-
var id = getId$
|
|
7930
|
+
function getCurrentRefinement$1(props, searchState, context) {
|
|
7931
|
+
var id = getId$4();
|
|
8115
7932
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
8116
7933
|
|
|
8117
7934
|
if (typeof currentRefinement === 'string') {
|
|
@@ -8146,7 +7963,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8146
7963
|
transformItems: PropTypes.func
|
|
8147
7964
|
},
|
|
8148
7965
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
8149
|
-
var currentRefinement = getCurrentRefinement$
|
|
7966
|
+
var currentRefinement = getCurrentRefinement$1(props, searchState, {
|
|
8150
7967
|
ais: props.contextValue,
|
|
8151
7968
|
multiIndexContext: props.indexContextValue
|
|
8152
7969
|
});
|
|
@@ -8163,7 +7980,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8163
7980
|
};
|
|
8164
7981
|
},
|
|
8165
7982
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8166
|
-
var id = getId$
|
|
7983
|
+
var id = getId$4();
|
|
8167
7984
|
|
|
8168
7985
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
8169
7986
|
|
|
@@ -8177,27 +7994,27 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8177
7994
|
return cleanUpValue(searchState, {
|
|
8178
7995
|
ais: props.contextValue,
|
|
8179
7996
|
multiIndexContext: props.indexContextValue
|
|
8180
|
-
}, getId$
|
|
7997
|
+
}, getId$4());
|
|
8181
7998
|
},
|
|
8182
7999
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8183
|
-
return searchParameters.setHitsPerPage(getCurrentRefinement$
|
|
8000
|
+
return searchParameters.setHitsPerPage(getCurrentRefinement$1(props, searchState, {
|
|
8184
8001
|
ais: props.contextValue,
|
|
8185
8002
|
multiIndexContext: props.indexContextValue
|
|
8186
8003
|
}));
|
|
8187
8004
|
},
|
|
8188
8005
|
getMetadata: function getMetadata() {
|
|
8189
8006
|
return {
|
|
8190
|
-
id: getId$
|
|
8007
|
+
id: getId$4()
|
|
8191
8008
|
};
|
|
8192
8009
|
}
|
|
8193
8010
|
});
|
|
8194
8011
|
|
|
8195
|
-
function getId$
|
|
8012
|
+
function getId$5() {
|
|
8196
8013
|
return 'page';
|
|
8197
8014
|
}
|
|
8198
8015
|
|
|
8199
|
-
function getCurrentRefinement$
|
|
8200
|
-
var id = getId$
|
|
8016
|
+
function getCurrentRefinement$2(props, searchState, context) {
|
|
8017
|
+
var id = getId$5();
|
|
8201
8018
|
var page = 1;
|
|
8202
8019
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8203
8020
|
|
|
@@ -8209,9 +8026,9 @@ function getCurrentRefinement$9(props, searchState, context) {
|
|
|
8209
8026
|
}
|
|
8210
8027
|
|
|
8211
8028
|
function getStateWithoutPage(state) {
|
|
8212
|
-
var _ref = state || {}
|
|
8213
|
-
_ref.page
|
|
8214
|
-
|
|
8029
|
+
var _ref = state || {},
|
|
8030
|
+
page = _ref.page,
|
|
8031
|
+
rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8215
8032
|
|
|
8216
8033
|
return rest;
|
|
8217
8034
|
}
|
|
@@ -8320,14 +8137,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8320
8137
|
},
|
|
8321
8138
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8322
8139
|
return searchParameters.setQueryParameters({
|
|
8323
|
-
page: getCurrentRefinement$
|
|
8140
|
+
page: getCurrentRefinement$2(props, searchState, {
|
|
8324
8141
|
ais: props.contextValue,
|
|
8325
8142
|
multiIndexContext: props.indexContextValue
|
|
8326
8143
|
}) - 1
|
|
8327
8144
|
});
|
|
8328
8145
|
},
|
|
8329
8146
|
refine: function refine(props, searchState, event, index) {
|
|
8330
|
-
var id = getId$
|
|
8147
|
+
var id = getId$5();
|
|
8331
8148
|
|
|
8332
8149
|
var nextValue = _defineProperty({}, id, index + 1);
|
|
8333
8150
|
|
|
@@ -8339,14 +8156,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8339
8156
|
}
|
|
8340
8157
|
});
|
|
8341
8158
|
|
|
8342
|
-
var namespace$
|
|
8159
|
+
var namespace$2 = 'menu';
|
|
8343
8160
|
|
|
8344
|
-
function getId$
|
|
8161
|
+
function getId$6(props) {
|
|
8345
8162
|
return props.attribute;
|
|
8346
8163
|
}
|
|
8347
8164
|
|
|
8348
|
-
function getCurrentRefinement$
|
|
8349
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8165
|
+
function getCurrentRefinement$3(props, searchState, context) {
|
|
8166
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)), null);
|
|
8350
8167
|
|
|
8351
8168
|
if (currentRefinement === '') {
|
|
8352
8169
|
return null;
|
|
@@ -8356,28 +8173,28 @@ function getCurrentRefinement$8(props, searchState, context) {
|
|
|
8356
8173
|
}
|
|
8357
8174
|
|
|
8358
8175
|
function getValue$1(name, props, searchState, context) {
|
|
8359
|
-
var currentRefinement = getCurrentRefinement$
|
|
8176
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, context);
|
|
8360
8177
|
return name === currentRefinement ? '' : name;
|
|
8361
8178
|
}
|
|
8362
8179
|
|
|
8363
|
-
function getLimit
|
|
8180
|
+
function getLimit(_ref) {
|
|
8364
8181
|
var showMore = _ref.showMore,
|
|
8365
8182
|
limit = _ref.limit,
|
|
8366
8183
|
showMoreLimit = _ref.showMoreLimit;
|
|
8367
8184
|
return showMore ? showMoreLimit : limit;
|
|
8368
8185
|
}
|
|
8369
8186
|
|
|
8370
|
-
function _refine$
|
|
8371
|
-
var id = getId$
|
|
8187
|
+
function _refine$2(props, searchState, nextRefinement, context) {
|
|
8188
|
+
var id = getId$6(props);
|
|
8372
8189
|
|
|
8373
8190
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : '');
|
|
8374
8191
|
|
|
8375
8192
|
var resetPage = true;
|
|
8376
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
8193
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$2);
|
|
8377
8194
|
}
|
|
8378
8195
|
|
|
8379
|
-
function _cleanUp$
|
|
8380
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
8196
|
+
function _cleanUp$1(props, searchState, context) {
|
|
8197
|
+
return cleanUpValue(searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)));
|
|
8381
8198
|
}
|
|
8382
8199
|
|
|
8383
8200
|
var defaultSortBy = ['count:desc', 'name:asc'];
|
|
@@ -8436,7 +8253,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8436
8253
|
if (!canRefine) {
|
|
8437
8254
|
return {
|
|
8438
8255
|
items: [],
|
|
8439
|
-
currentRefinement: getCurrentRefinement$
|
|
8256
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
8440
8257
|
ais: props.contextValue,
|
|
8441
8258
|
multiIndexContext: props.indexContextValue
|
|
8442
8259
|
}),
|
|
@@ -8483,8 +8300,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8483
8300
|
|
|
8484
8301
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
8485
8302
|
return {
|
|
8486
|
-
items: transformedItems.slice(0, getLimit
|
|
8487
|
-
currentRefinement: getCurrentRefinement$
|
|
8303
|
+
items: transformedItems.slice(0, getLimit(props)),
|
|
8304
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
8488
8305
|
ais: props.contextValue,
|
|
8489
8306
|
multiIndexContext: props.indexContextValue
|
|
8490
8307
|
}),
|
|
@@ -8494,7 +8311,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8494
8311
|
};
|
|
8495
8312
|
},
|
|
8496
8313
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8497
|
-
return _refine$
|
|
8314
|
+
return _refine$2(props, searchState, nextRefinement, {
|
|
8498
8315
|
ais: props.contextValue,
|
|
8499
8316
|
multiIndexContext: props.indexContextValue
|
|
8500
8317
|
});
|
|
@@ -8503,11 +8320,11 @@ var connectMenu = createConnectorWithContext({
|
|
|
8503
8320
|
return {
|
|
8504
8321
|
facetName: props.attribute,
|
|
8505
8322
|
query: nextRefinement,
|
|
8506
|
-
maxFacetHits: getLimit
|
|
8323
|
+
maxFacetHits: getLimit(props)
|
|
8507
8324
|
};
|
|
8508
8325
|
},
|
|
8509
8326
|
cleanUp: function cleanUp(props, searchState) {
|
|
8510
|
-
return _cleanUp$
|
|
8327
|
+
return _cleanUp$1(props, searchState, {
|
|
8511
8328
|
ais: props.contextValue,
|
|
8512
8329
|
multiIndexContext: props.indexContextValue
|
|
8513
8330
|
});
|
|
@@ -8515,10 +8332,10 @@ var connectMenu = createConnectorWithContext({
|
|
|
8515
8332
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8516
8333
|
var attribute = props.attribute;
|
|
8517
8334
|
searchParameters = searchParameters.setQueryParameters({
|
|
8518
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit
|
|
8335
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
8519
8336
|
});
|
|
8520
8337
|
searchParameters = searchParameters.addDisjunctiveFacet(attribute);
|
|
8521
|
-
var currentRefinement = getCurrentRefinement$
|
|
8338
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
8522
8339
|
ais: props.contextValue,
|
|
8523
8340
|
multiIndexContext: props.indexContextValue
|
|
8524
8341
|
});
|
|
@@ -8530,8 +8347,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8530
8347
|
return searchParameters;
|
|
8531
8348
|
},
|
|
8532
8349
|
getMetadata: function getMetadata(props, searchState) {
|
|
8533
|
-
var id = getId$
|
|
8534
|
-
var currentRefinement = getCurrentRefinement$
|
|
8350
|
+
var id = getId$6(props);
|
|
8351
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
8535
8352
|
ais: props.contextValue,
|
|
8536
8353
|
multiIndexContext: props.indexContextValue
|
|
8537
8354
|
});
|
|
@@ -8545,7 +8362,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8545
8362
|
label: "".concat(props.attribute, ": ").concat(currentRefinement),
|
|
8546
8363
|
attribute: props.attribute,
|
|
8547
8364
|
value: function value(nextState) {
|
|
8548
|
-
return _refine$
|
|
8365
|
+
return _refine$2(props, nextState, '', {
|
|
8549
8366
|
ais: props.contextValue,
|
|
8550
8367
|
multiIndexContext: props.indexContextValue
|
|
8551
8368
|
});
|
|
@@ -8561,17 +8378,17 @@ function _arrayWithHoles(arr) {
|
|
|
8561
8378
|
}
|
|
8562
8379
|
|
|
8563
8380
|
function _iterableToArrayLimit(arr, i) {
|
|
8564
|
-
|
|
8381
|
+
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
|
|
8382
|
+
return;
|
|
8383
|
+
}
|
|
8565
8384
|
|
|
8566
|
-
if (_i == null) return;
|
|
8567
8385
|
var _arr = [];
|
|
8568
8386
|
var _n = true;
|
|
8569
8387
|
var _d = false;
|
|
8570
|
-
|
|
8571
|
-
var _s, _e;
|
|
8388
|
+
var _e = undefined;
|
|
8572
8389
|
|
|
8573
8390
|
try {
|
|
8574
|
-
for (_i =
|
|
8391
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
8575
8392
|
_arr.push(_s.value);
|
|
8576
8393
|
|
|
8577
8394
|
if (i && _arr.length === i) break;
|
|
@@ -8591,11 +8408,11 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
8591
8408
|
}
|
|
8592
8409
|
|
|
8593
8410
|
function _nonIterableRest() {
|
|
8594
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
8411
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
8595
8412
|
}
|
|
8596
8413
|
|
|
8597
8414
|
function _slicedToArray(arr, i) {
|
|
8598
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) ||
|
|
8415
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
|
8599
8416
|
}
|
|
8600
8417
|
|
|
8601
8418
|
function stringifyItem(item) {
|
|
@@ -8622,19 +8439,19 @@ function parseItem(value) {
|
|
|
8622
8439
|
endStr = _value$split2[1];
|
|
8623
8440
|
|
|
8624
8441
|
return {
|
|
8625
|
-
start: startStr.length > 0 ?
|
|
8626
|
-
end: endStr.length > 0 ?
|
|
8442
|
+
start: startStr.length > 0 ? parseInt(startStr, 10) : null,
|
|
8443
|
+
end: endStr.length > 0 ? parseInt(endStr, 10) : null
|
|
8627
8444
|
};
|
|
8628
8445
|
}
|
|
8629
8446
|
|
|
8630
8447
|
var namespace$3 = 'multiRange';
|
|
8631
8448
|
|
|
8632
|
-
function getId$
|
|
8449
|
+
function getId$7(props) {
|
|
8633
8450
|
return props.attribute;
|
|
8634
8451
|
}
|
|
8635
8452
|
|
|
8636
|
-
function getCurrentRefinement$
|
|
8637
|
-
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8453
|
+
function getCurrentRefinement$4(props, searchState, context) {
|
|
8454
|
+
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$7(props)), '');
|
|
8638
8455
|
}
|
|
8639
8456
|
|
|
8640
8457
|
function isRefinementsRangeIncludesInsideItemRange(stats, start, end) {
|
|
@@ -8653,15 +8470,15 @@ function itemHasRefinement(attribute, results, value) {
|
|
|
8653
8470
|
return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end)));
|
|
8654
8471
|
}
|
|
8655
8472
|
|
|
8656
|
-
function _refine$
|
|
8657
|
-
var nextValue = _defineProperty({}, getId$
|
|
8473
|
+
function _refine$3(props, searchState, nextRefinement, context) {
|
|
8474
|
+
var nextValue = _defineProperty({}, getId$7(props), nextRefinement);
|
|
8658
8475
|
|
|
8659
8476
|
var resetPage = true;
|
|
8660
8477
|
return refineValue(searchState, nextValue, context, resetPage, namespace$3);
|
|
8661
8478
|
}
|
|
8662
8479
|
|
|
8663
|
-
function _cleanUp$
|
|
8664
|
-
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8480
|
+
function _cleanUp$2(props, searchState, context) {
|
|
8481
|
+
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$7(props)));
|
|
8665
8482
|
}
|
|
8666
8483
|
/**
|
|
8667
8484
|
* connectNumericMenu connector provides the logic to build a widget that will
|
|
@@ -8695,7 +8512,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8695
8512
|
},
|
|
8696
8513
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
8697
8514
|
var attribute = props.attribute;
|
|
8698
|
-
var currentRefinement = getCurrentRefinement$
|
|
8515
|
+
var currentRefinement = getCurrentRefinement$4(props, searchState, {
|
|
8699
8516
|
ais: props.contextValue,
|
|
8700
8517
|
multiIndexContext: props.indexContextValue
|
|
8701
8518
|
});
|
|
@@ -8709,11 +8526,11 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8709
8526
|
label: item.label,
|
|
8710
8527
|
value: value,
|
|
8711
8528
|
isRefined: value === currentRefinement,
|
|
8712
|
-
noRefinement: results ? itemHasRefinement(getId$
|
|
8529
|
+
noRefinement: results ? itemHasRefinement(getId$7(props), results, value) : false
|
|
8713
8530
|
};
|
|
8714
8531
|
});
|
|
8715
8532
|
var stats = results && results.getFacetByName(attribute) ? results.getFacetStats(attribute) : null;
|
|
8716
|
-
var refinedItem = find
|
|
8533
|
+
var refinedItem = find(items, function (item) {
|
|
8717
8534
|
return item.isRefined === true;
|
|
8718
8535
|
});
|
|
8719
8536
|
|
|
@@ -8738,13 +8555,13 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8738
8555
|
};
|
|
8739
8556
|
},
|
|
8740
8557
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8741
|
-
return _refine$
|
|
8558
|
+
return _refine$3(props, searchState, nextRefinement, {
|
|
8742
8559
|
ais: props.contextValue,
|
|
8743
8560
|
multiIndexContext: props.indexContextValue
|
|
8744
8561
|
});
|
|
8745
8562
|
},
|
|
8746
8563
|
cleanUp: function cleanUp(props, searchState) {
|
|
8747
|
-
return _cleanUp$
|
|
8564
|
+
return _cleanUp$2(props, searchState, {
|
|
8748
8565
|
ais: props.contextValue,
|
|
8749
8566
|
multiIndexContext: props.indexContextValue
|
|
8750
8567
|
});
|
|
@@ -8752,7 +8569,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8752
8569
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8753
8570
|
var attribute = props.attribute;
|
|
8754
8571
|
|
|
8755
|
-
var _parseItem = parseItem(getCurrentRefinement$
|
|
8572
|
+
var _parseItem = parseItem(getCurrentRefinement$4(props, searchState, {
|
|
8756
8573
|
ais: props.contextValue,
|
|
8757
8574
|
multiIndexContext: props.indexContextValue
|
|
8758
8575
|
})),
|
|
@@ -8772,8 +8589,8 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8772
8589
|
return searchParameters;
|
|
8773
8590
|
},
|
|
8774
8591
|
getMetadata: function getMetadata(props, searchState) {
|
|
8775
|
-
var id = getId$
|
|
8776
|
-
var value = getCurrentRefinement$
|
|
8592
|
+
var id = getId$7(props);
|
|
8593
|
+
var value = getCurrentRefinement$4(props, searchState, {
|
|
8777
8594
|
ais: props.contextValue,
|
|
8778
8595
|
multiIndexContext: props.indexContextValue
|
|
8779
8596
|
});
|
|
@@ -8784,7 +8601,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8784
8601
|
});
|
|
8785
8602
|
|
|
8786
8603
|
if (value !== '') {
|
|
8787
|
-
var _find = find
|
|
8604
|
+
var _find = find(props.items, function (item) {
|
|
8788
8605
|
return stringifyItem(item) === value;
|
|
8789
8606
|
}),
|
|
8790
8607
|
label = _find.label;
|
|
@@ -8794,7 +8611,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8794
8611
|
attribute: props.attribute,
|
|
8795
8612
|
currentRefinement: label,
|
|
8796
8613
|
value: function value(nextState) {
|
|
8797
|
-
return _refine$
|
|
8614
|
+
return _refine$3(props, nextState, '', {
|
|
8798
8615
|
ais: props.contextValue,
|
|
8799
8616
|
multiIndexContext: props.indexContextValue
|
|
8800
8617
|
});
|
|
@@ -8810,12 +8627,12 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8810
8627
|
}
|
|
8811
8628
|
});
|
|
8812
8629
|
|
|
8813
|
-
function getId$
|
|
8630
|
+
function getId$8() {
|
|
8814
8631
|
return 'page';
|
|
8815
8632
|
}
|
|
8816
8633
|
|
|
8817
|
-
function getCurrentRefinement$
|
|
8818
|
-
var id = getId$
|
|
8634
|
+
function getCurrentRefinement$5(props, searchState, context) {
|
|
8635
|
+
var id = getId$8();
|
|
8819
8636
|
var page = 1;
|
|
8820
8637
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8821
8638
|
|
|
@@ -8826,8 +8643,8 @@ function getCurrentRefinement$6(props, searchState, context) {
|
|
|
8826
8643
|
return currentRefinement;
|
|
8827
8644
|
}
|
|
8828
8645
|
|
|
8829
|
-
function _refine$
|
|
8830
|
-
var id = getId$
|
|
8646
|
+
function _refine$4(props, searchState, nextPage, context) {
|
|
8647
|
+
var id = getId$8();
|
|
8831
8648
|
|
|
8832
8649
|
var nextValue = _defineProperty({}, id, nextPage);
|
|
8833
8650
|
|
|
@@ -8867,7 +8684,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8867
8684
|
var nbPages = results.nbPages;
|
|
8868
8685
|
return {
|
|
8869
8686
|
nbPages: nbPages,
|
|
8870
|
-
currentRefinement: getCurrentRefinement$
|
|
8687
|
+
currentRefinement: getCurrentRefinement$5(props, searchState, {
|
|
8871
8688
|
ais: props.contextValue,
|
|
8872
8689
|
multiIndexContext: props.indexContextValue
|
|
8873
8690
|
}),
|
|
@@ -8875,7 +8692,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8875
8692
|
};
|
|
8876
8693
|
},
|
|
8877
8694
|
refine: function refine(props, searchState, nextPage) {
|
|
8878
|
-
return _refine$
|
|
8695
|
+
return _refine$4(props, searchState, nextPage, {
|
|
8879
8696
|
ais: props.contextValue,
|
|
8880
8697
|
multiIndexContext: props.indexContextValue
|
|
8881
8698
|
});
|
|
@@ -8884,17 +8701,17 @@ var connectPagination = createConnectorWithContext({
|
|
|
8884
8701
|
return cleanUpValue(searchState, {
|
|
8885
8702
|
ais: props.contextValue,
|
|
8886
8703
|
multiIndexContext: props.indexContextValue
|
|
8887
|
-
}, getId$
|
|
8704
|
+
}, getId$8());
|
|
8888
8705
|
},
|
|
8889
8706
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8890
|
-
return searchParameters.setPage(getCurrentRefinement$
|
|
8707
|
+
return searchParameters.setPage(getCurrentRefinement$5(props, searchState, {
|
|
8891
8708
|
ais: props.contextValue,
|
|
8892
8709
|
multiIndexContext: props.indexContextValue
|
|
8893
8710
|
}) - 1);
|
|
8894
8711
|
},
|
|
8895
8712
|
getMetadata: function getMetadata() {
|
|
8896
8713
|
return {
|
|
8897
|
-
id: getId$
|
|
8714
|
+
id: getId$8()
|
|
8898
8715
|
};
|
|
8899
8716
|
}
|
|
8900
8717
|
});
|
|
@@ -8940,11 +8757,11 @@ var connectPoweredBy = createConnectorWithContext({
|
|
|
8940
8757
|
* @providedPropType {number} precision - Number of digits after decimal point to use.
|
|
8941
8758
|
*/
|
|
8942
8759
|
|
|
8943
|
-
function getId$
|
|
8760
|
+
function getId$9(props) {
|
|
8944
8761
|
return props.attribute;
|
|
8945
8762
|
}
|
|
8946
8763
|
|
|
8947
|
-
var namespace$
|
|
8764
|
+
var namespace$4 = 'range';
|
|
8948
8765
|
|
|
8949
8766
|
function getCurrentRange(boundaries, stats, precision) {
|
|
8950
8767
|
var pow = Math.pow(10, precision);
|
|
@@ -8974,8 +8791,8 @@ function getCurrentRange(boundaries, stats, precision) {
|
|
|
8974
8791
|
};
|
|
8975
8792
|
}
|
|
8976
8793
|
|
|
8977
|
-
function getCurrentRefinement$
|
|
8978
|
-
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8794
|
+
function getCurrentRefinement$6(props, searchState, currentRange, context) {
|
|
8795
|
+
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)), {}),
|
|
8979
8796
|
min = _getCurrentRefinement.min,
|
|
8980
8797
|
max = _getCurrentRefinement.max;
|
|
8981
8798
|
|
|
@@ -9041,7 +8858,7 @@ function nextValueForRefinement(hasBound, isReset, range, value) {
|
|
|
9041
8858
|
return next;
|
|
9042
8859
|
}
|
|
9043
8860
|
|
|
9044
|
-
function _refine$
|
|
8861
|
+
function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
9045
8862
|
var nextMin = nextRefinement.min,
|
|
9046
8863
|
nextMax = nextRefinement.max;
|
|
9047
8864
|
var currentMinRange = currentRange.min,
|
|
@@ -9065,7 +8882,7 @@ function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
|
9065
8882
|
throw Error("You can't provide max value greater than range.");
|
|
9066
8883
|
}
|
|
9067
8884
|
|
|
9068
|
-
var id = getId$
|
|
8885
|
+
var id = getId$9(props);
|
|
9069
8886
|
var resetPage = true;
|
|
9070
8887
|
|
|
9071
8888
|
var nextValue = _defineProperty({}, id, {
|
|
@@ -9073,11 +8890,11 @@ function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
|
9073
8890
|
max: nextValueForRefinement(props.max !== undefined, isMaxReset, currentMaxRange, nextMaxAsNumber)
|
|
9074
8891
|
});
|
|
9075
8892
|
|
|
9076
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
8893
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$4);
|
|
9077
8894
|
}
|
|
9078
8895
|
|
|
9079
|
-
function _cleanUp$
|
|
9080
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
8896
|
+
function _cleanUp$3(props, searchState, context) {
|
|
8897
|
+
return cleanUpValue(searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)));
|
|
9081
8898
|
}
|
|
9082
8899
|
|
|
9083
8900
|
var connectRange = createConnectorWithContext({
|
|
@@ -9132,7 +8949,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9132
8949
|
min: rangeMin,
|
|
9133
8950
|
max: rangeMax
|
|
9134
8951
|
};
|
|
9135
|
-
var currentRefinement = getCurrentRefinement$
|
|
8952
|
+
var currentRefinement = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9136
8953
|
ais: props.contextValue,
|
|
9137
8954
|
multiIndexContext: props.indexContextValue
|
|
9138
8955
|
});
|
|
@@ -9146,13 +8963,13 @@ var connectRange = createConnectorWithContext({
|
|
|
9146
8963
|
};
|
|
9147
8964
|
},
|
|
9148
8965
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9149
|
-
return _refine$
|
|
8966
|
+
return _refine$5(props, searchState, nextRefinement, this._currentRange, {
|
|
9150
8967
|
ais: props.contextValue,
|
|
9151
8968
|
multiIndexContext: props.indexContextValue
|
|
9152
8969
|
});
|
|
9153
8970
|
},
|
|
9154
8971
|
cleanUp: function cleanUp(props, searchState) {
|
|
9155
|
-
return _cleanUp$
|
|
8972
|
+
return _cleanUp$3(props, searchState, {
|
|
9156
8973
|
ais: props.contextValue,
|
|
9157
8974
|
multiIndexContext: props.indexContextValue
|
|
9158
8975
|
});
|
|
@@ -9160,7 +8977,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9160
8977
|
getSearchParameters: function getSearchParameters(params, props, searchState) {
|
|
9161
8978
|
var attribute = props.attribute;
|
|
9162
8979
|
|
|
9163
|
-
var _getCurrentRefinement2 = getCurrentRefinement$
|
|
8980
|
+
var _getCurrentRefinement2 = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9164
8981
|
ais: props.contextValue,
|
|
9165
8982
|
multiIndexContext: props.indexContextValue
|
|
9166
8983
|
}),
|
|
@@ -9186,7 +9003,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9186
9003
|
minRange = _this$_currentRange.min,
|
|
9187
9004
|
maxRange = _this$_currentRange.max;
|
|
9188
9005
|
|
|
9189
|
-
var _getCurrentRefinement3 = getCurrentRefinement$
|
|
9006
|
+
var _getCurrentRefinement3 = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9190
9007
|
ais: props.contextValue,
|
|
9191
9008
|
multiIndexContext: props.indexContextValue
|
|
9192
9009
|
}),
|
|
@@ -9205,7 +9022,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9205
9022
|
label: fragments.join(''),
|
|
9206
9023
|
attribute: props.attribute,
|
|
9207
9024
|
value: function value(nextState) {
|
|
9208
|
-
return _refine$
|
|
9025
|
+
return _refine$5(props, nextState, {}, _this._currentRange, {
|
|
9209
9026
|
ais: props.contextValue,
|
|
9210
9027
|
multiIndexContext: props.indexContextValue
|
|
9211
9028
|
});
|
|
@@ -9221,7 +9038,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9221
9038
|
}
|
|
9222
9039
|
|
|
9223
9040
|
return {
|
|
9224
|
-
id: getId$
|
|
9041
|
+
id: getId$9(props),
|
|
9225
9042
|
index: getIndexId({
|
|
9226
9043
|
ais: props.contextValue,
|
|
9227
9044
|
multiIndexContext: props.indexContextValue
|
|
@@ -9231,14 +9048,14 @@ var connectRange = createConnectorWithContext({
|
|
|
9231
9048
|
}
|
|
9232
9049
|
});
|
|
9233
9050
|
|
|
9234
|
-
var namespace$
|
|
9051
|
+
var namespace$5 = 'refinementList';
|
|
9235
9052
|
|
|
9236
|
-
function getId$
|
|
9053
|
+
function getId$a(props) {
|
|
9237
9054
|
return props.attribute;
|
|
9238
9055
|
}
|
|
9239
9056
|
|
|
9240
|
-
function getCurrentRefinement$
|
|
9241
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
9057
|
+
function getCurrentRefinement$7(props, searchState, context) {
|
|
9058
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$5, ".").concat(getId$a(props)), []);
|
|
9242
9059
|
|
|
9243
9060
|
if (typeof currentRefinement !== 'string') {
|
|
9244
9061
|
return currentRefinement;
|
|
@@ -9251,8 +9068,8 @@ function getCurrentRefinement$4(props, searchState, context) {
|
|
|
9251
9068
|
return [];
|
|
9252
9069
|
}
|
|
9253
9070
|
|
|
9254
|
-
function getValue(name, props, searchState, context) {
|
|
9255
|
-
var currentRefinement = getCurrentRefinement$
|
|
9071
|
+
function getValue$2(name, props, searchState, context) {
|
|
9072
|
+
var currentRefinement = getCurrentRefinement$7(props, searchState, context);
|
|
9256
9073
|
var isAnewValue = currentRefinement.indexOf(name) === -1;
|
|
9257
9074
|
var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates
|
|
9258
9075
|
: currentRefinement.filter(function (selectedValue) {
|
|
@@ -9262,15 +9079,15 @@ function getValue(name, props, searchState, context) {
|
|
|
9262
9079
|
return nextRefinement;
|
|
9263
9080
|
}
|
|
9264
9081
|
|
|
9265
|
-
function getLimit(_ref) {
|
|
9082
|
+
function getLimit$1(_ref) {
|
|
9266
9083
|
var showMore = _ref.showMore,
|
|
9267
9084
|
limit = _ref.limit,
|
|
9268
9085
|
showMoreLimit = _ref.showMoreLimit;
|
|
9269
9086
|
return showMore ? showMoreLimit : limit;
|
|
9270
9087
|
}
|
|
9271
9088
|
|
|
9272
|
-
function _refine$
|
|
9273
|
-
var id = getId$
|
|
9089
|
+
function _refine$6(props, searchState, nextRefinement, context) {
|
|
9090
|
+
var id = getId$a(props); // Setting the value to an empty string ensures that it is persisted in
|
|
9274
9091
|
// the URL as an empty value.
|
|
9275
9092
|
// This is necessary in the case where `defaultRefinement` contains one
|
|
9276
9093
|
// item and we try to deselect it. `nextSelected` would be an empty array,
|
|
@@ -9281,11 +9098,11 @@ function _refine$3(props, searchState, nextRefinement, context) {
|
|
|
9281
9098
|
var nextValue = _defineProperty({}, id, nextRefinement.length > 0 ? nextRefinement : '');
|
|
9282
9099
|
|
|
9283
9100
|
var resetPage = true;
|
|
9284
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9101
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$5);
|
|
9285
9102
|
}
|
|
9286
9103
|
|
|
9287
|
-
function _cleanUp$
|
|
9288
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9104
|
+
function _cleanUp$4(props, searchState, context) {
|
|
9105
|
+
return cleanUpValue(searchState, context, "".concat(namespace$5, ".").concat(getId$a(props)));
|
|
9289
9106
|
}
|
|
9290
9107
|
/**
|
|
9291
9108
|
* connectRefinementList connector provides the logic to build a widget that will
|
|
@@ -9312,7 +9129,7 @@ function _cleanUp$3(props, searchState, context) {
|
|
|
9312
9129
|
*/
|
|
9313
9130
|
|
|
9314
9131
|
|
|
9315
|
-
var sortBy = ['isRefined', 'count:desc', 'name:asc'];
|
|
9132
|
+
var sortBy$1 = ['isRefined', 'count:desc', 'name:asc'];
|
|
9316
9133
|
var connectRefinementList = createConnectorWithContext({
|
|
9317
9134
|
displayName: 'AlgoliaRefinementList',
|
|
9318
9135
|
propTypes: {
|
|
@@ -9350,7 +9167,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9350
9167
|
if (!canRefine) {
|
|
9351
9168
|
return {
|
|
9352
9169
|
items: [],
|
|
9353
|
-
currentRefinement: getCurrentRefinement$
|
|
9170
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, {
|
|
9354
9171
|
ais: props.contextValue,
|
|
9355
9172
|
multiIndexContext: props.indexContextValue
|
|
9356
9173
|
}),
|
|
@@ -9363,7 +9180,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9363
9180
|
var items = isFromSearch ? searchForFacetValuesResults[attribute].map(function (v) {
|
|
9364
9181
|
return {
|
|
9365
9182
|
label: v.value,
|
|
9366
|
-
value: getValue(v.value, props, searchState, {
|
|
9183
|
+
value: getValue$2(v.value, props, searchState, {
|
|
9367
9184
|
ais: props.contextValue,
|
|
9368
9185
|
multiIndexContext: props.indexContextValue
|
|
9369
9186
|
}),
|
|
@@ -9376,11 +9193,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9376
9193
|
isRefined: v.isRefined
|
|
9377
9194
|
};
|
|
9378
9195
|
}) : results.getFacetValues(attribute, {
|
|
9379
|
-
sortBy: sortBy
|
|
9196
|
+
sortBy: sortBy$1
|
|
9380
9197
|
}).map(function (v) {
|
|
9381
9198
|
return {
|
|
9382
9199
|
label: v.name,
|
|
9383
|
-
value: getValue(v.name, props, searchState, {
|
|
9200
|
+
value: getValue$2(v.name, props, searchState, {
|
|
9384
9201
|
ais: props.contextValue,
|
|
9385
9202
|
multiIndexContext: props.indexContextValue
|
|
9386
9203
|
}),
|
|
@@ -9390,8 +9207,8 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9390
9207
|
});
|
|
9391
9208
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
9392
9209
|
return {
|
|
9393
|
-
items: transformedItems.slice(0, getLimit(props)),
|
|
9394
|
-
currentRefinement: getCurrentRefinement$
|
|
9210
|
+
items: transformedItems.slice(0, getLimit$1(props)),
|
|
9211
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, {
|
|
9395
9212
|
ais: props.contextValue,
|
|
9396
9213
|
multiIndexContext: props.indexContextValue
|
|
9397
9214
|
}),
|
|
@@ -9401,7 +9218,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9401
9218
|
};
|
|
9402
9219
|
},
|
|
9403
9220
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9404
|
-
return _refine$
|
|
9221
|
+
return _refine$6(props, searchState, nextRefinement, {
|
|
9405
9222
|
ais: props.contextValue,
|
|
9406
9223
|
multiIndexContext: props.indexContextValue
|
|
9407
9224
|
});
|
|
@@ -9410,11 +9227,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9410
9227
|
return {
|
|
9411
9228
|
facetName: props.attribute,
|
|
9412
9229
|
query: nextRefinement,
|
|
9413
|
-
maxFacetHits: getLimit(props)
|
|
9230
|
+
maxFacetHits: getLimit$1(props)
|
|
9414
9231
|
};
|
|
9415
9232
|
},
|
|
9416
9233
|
cleanUp: function cleanUp(props, searchState) {
|
|
9417
|
-
return _cleanUp$
|
|
9234
|
+
return _cleanUp$4(props, searchState, {
|
|
9418
9235
|
ais: props.contextValue,
|
|
9419
9236
|
multiIndexContext: props.indexContextValue
|
|
9420
9237
|
});
|
|
@@ -9425,10 +9242,10 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9425
9242
|
var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet';
|
|
9426
9243
|
var addRefinementKey = "".concat(addKey, "Refinement");
|
|
9427
9244
|
searchParameters = searchParameters.setQueryParameters({
|
|
9428
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
9245
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit$1(props))
|
|
9429
9246
|
});
|
|
9430
9247
|
searchParameters = searchParameters[addKey](attribute);
|
|
9431
|
-
return getCurrentRefinement$
|
|
9248
|
+
return getCurrentRefinement$7(props, searchState, {
|
|
9432
9249
|
ais: props.contextValue,
|
|
9433
9250
|
multiIndexContext: props.indexContextValue
|
|
9434
9251
|
}).reduce(function (res, val) {
|
|
@@ -9436,7 +9253,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9436
9253
|
}, searchParameters);
|
|
9437
9254
|
},
|
|
9438
9255
|
getMetadata: function getMetadata(props, searchState) {
|
|
9439
|
-
var id = getId$
|
|
9256
|
+
var id = getId$a(props);
|
|
9440
9257
|
var context = {
|
|
9441
9258
|
ais: props.contextValue,
|
|
9442
9259
|
multiIndexContext: props.indexContextValue
|
|
@@ -9444,21 +9261,21 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9444
9261
|
return {
|
|
9445
9262
|
id: id,
|
|
9446
9263
|
index: getIndexId(context),
|
|
9447
|
-
items: getCurrentRefinement$
|
|
9264
|
+
items: getCurrentRefinement$7(props, searchState, context).length > 0 ? [{
|
|
9448
9265
|
attribute: props.attribute,
|
|
9449
9266
|
label: "".concat(props.attribute, ": "),
|
|
9450
|
-
currentRefinement: getCurrentRefinement$
|
|
9267
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, context),
|
|
9451
9268
|
value: function value(nextState) {
|
|
9452
|
-
return _refine$
|
|
9269
|
+
return _refine$6(props, nextState, [], context);
|
|
9453
9270
|
},
|
|
9454
|
-
items: getCurrentRefinement$
|
|
9271
|
+
items: getCurrentRefinement$7(props, searchState, context).map(function (item) {
|
|
9455
9272
|
return {
|
|
9456
9273
|
label: "".concat(item),
|
|
9457
9274
|
value: function value(nextState) {
|
|
9458
|
-
var nextSelectedItems = getCurrentRefinement$
|
|
9275
|
+
var nextSelectedItems = getCurrentRefinement$7(props, nextState, context).filter(function (other) {
|
|
9459
9276
|
return other !== item;
|
|
9460
9277
|
});
|
|
9461
|
-
return _refine$
|
|
9278
|
+
return _refine$6(props, searchState, nextSelectedItems, context);
|
|
9462
9279
|
}
|
|
9463
9280
|
};
|
|
9464
9281
|
})
|
|
@@ -9517,7 +9334,7 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9517
9334
|
// See: https://github.com/algolia/react-instantsearch/issues/164
|
|
9518
9335
|
|
|
9519
9336
|
|
|
9520
|
-
var cleanedSearchState = omit
|
|
9337
|
+
var cleanedSearchState = omit(searchState, ['configure', id]);
|
|
9521
9338
|
var hasNotChanged = shallowEqual(this._prevSearchState, cleanedSearchState);
|
|
9522
9339
|
this._prevSearchState = cleanedSearchState;
|
|
9523
9340
|
return {
|
|
@@ -9527,12 +9344,12 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9527
9344
|
}
|
|
9528
9345
|
});
|
|
9529
9346
|
|
|
9530
|
-
function getId$
|
|
9347
|
+
function getId$b() {
|
|
9531
9348
|
return 'query';
|
|
9532
9349
|
}
|
|
9533
9350
|
|
|
9534
|
-
function getCurrentRefinement$
|
|
9535
|
-
var id = getId$
|
|
9351
|
+
function getCurrentRefinement$8(props, searchState, context) {
|
|
9352
|
+
var id = getId$b();
|
|
9536
9353
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9537
9354
|
|
|
9538
9355
|
if (currentRefinement) {
|
|
@@ -9542,8 +9359,8 @@ function getCurrentRefinement$3(props, searchState, context) {
|
|
|
9542
9359
|
return '';
|
|
9543
9360
|
}
|
|
9544
9361
|
|
|
9545
|
-
function _refine$
|
|
9546
|
-
var id = getId$
|
|
9362
|
+
function _refine$7(props, searchState, nextRefinement, context) {
|
|
9363
|
+
var id = getId$b();
|
|
9547
9364
|
|
|
9548
9365
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9549
9366
|
|
|
@@ -9551,8 +9368,8 @@ function _refine$2(props, searchState, nextRefinement, context) {
|
|
|
9551
9368
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9552
9369
|
}
|
|
9553
9370
|
|
|
9554
|
-
function _cleanUp$
|
|
9555
|
-
return cleanUpValue(searchState, context, getId$
|
|
9371
|
+
function _cleanUp$5(props, searchState, context) {
|
|
9372
|
+
return cleanUpValue(searchState, context, getId$b());
|
|
9556
9373
|
}
|
|
9557
9374
|
/**
|
|
9558
9375
|
* connectSearchBox connector provides the logic to build a widget that will
|
|
@@ -9573,7 +9390,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9573
9390
|
},
|
|
9574
9391
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
9575
9392
|
return {
|
|
9576
|
-
currentRefinement: getCurrentRefinement$
|
|
9393
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
9577
9394
|
ais: props.contextValue,
|
|
9578
9395
|
multiIndexContext: props.indexContextValue
|
|
9579
9396
|
}),
|
|
@@ -9581,26 +9398,26 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9581
9398
|
};
|
|
9582
9399
|
},
|
|
9583
9400
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9584
|
-
return _refine$
|
|
9401
|
+
return _refine$7(props, searchState, nextRefinement, {
|
|
9585
9402
|
ais: props.contextValue,
|
|
9586
9403
|
multiIndexContext: props.indexContextValue
|
|
9587
9404
|
});
|
|
9588
9405
|
},
|
|
9589
9406
|
cleanUp: function cleanUp(props, searchState) {
|
|
9590
|
-
return _cleanUp$
|
|
9407
|
+
return _cleanUp$5(props, searchState, {
|
|
9591
9408
|
ais: props.contextValue,
|
|
9592
9409
|
multiIndexContext: props.indexContextValue
|
|
9593
9410
|
});
|
|
9594
9411
|
},
|
|
9595
9412
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9596
|
-
return searchParameters.setQuery(getCurrentRefinement$
|
|
9413
|
+
return searchParameters.setQuery(getCurrentRefinement$8(props, searchState, {
|
|
9597
9414
|
ais: props.contextValue,
|
|
9598
9415
|
multiIndexContext: props.indexContextValue
|
|
9599
9416
|
}));
|
|
9600
9417
|
},
|
|
9601
9418
|
getMetadata: function getMetadata(props, searchState) {
|
|
9602
|
-
var id = getId$
|
|
9603
|
-
var currentRefinement = getCurrentRefinement$
|
|
9419
|
+
var id = getId$b();
|
|
9420
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
9604
9421
|
ais: props.contextValue,
|
|
9605
9422
|
multiIndexContext: props.indexContextValue
|
|
9606
9423
|
});
|
|
@@ -9613,7 +9430,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9613
9430
|
items: currentRefinement === null ? [] : [{
|
|
9614
9431
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9615
9432
|
value: function value(nextState) {
|
|
9616
|
-
return _refine$
|
|
9433
|
+
return _refine$7(props, nextState, '', {
|
|
9617
9434
|
ais: props.contextValue,
|
|
9618
9435
|
multiIndexContext: props.indexContextValue
|
|
9619
9436
|
});
|
|
@@ -9624,12 +9441,12 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9624
9441
|
}
|
|
9625
9442
|
});
|
|
9626
9443
|
|
|
9627
|
-
function getId$
|
|
9444
|
+
function getId$c() {
|
|
9628
9445
|
return 'relevancyStrictness';
|
|
9629
9446
|
}
|
|
9630
9447
|
|
|
9631
|
-
function getCurrentRefinement$
|
|
9632
|
-
var id = getId$
|
|
9448
|
+
function getCurrentRefinement$9(props, searchState, context) {
|
|
9449
|
+
var id = getId$c();
|
|
9633
9450
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id);
|
|
9634
9451
|
return currentRefinement;
|
|
9635
9452
|
}
|
|
@@ -9655,13 +9472,13 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9655
9472
|
};
|
|
9656
9473
|
},
|
|
9657
9474
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9658
|
-
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$
|
|
9475
|
+
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$9(props, searchState, {
|
|
9659
9476
|
ais: props.contextValue,
|
|
9660
9477
|
multiIndexContext: props.indexContextValue
|
|
9661
9478
|
}));
|
|
9662
9479
|
},
|
|
9663
9480
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9664
|
-
var nextValue = _defineProperty({}, getId$
|
|
9481
|
+
var nextValue = _defineProperty({}, getId$c(), nextRefinement);
|
|
9665
9482
|
|
|
9666
9483
|
var resetPage = true;
|
|
9667
9484
|
return refineValue(searchState, nextValue, {
|
|
@@ -9671,12 +9488,12 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9671
9488
|
}
|
|
9672
9489
|
});
|
|
9673
9490
|
|
|
9674
|
-
function getId$
|
|
9491
|
+
function getId$d() {
|
|
9675
9492
|
return 'sortBy';
|
|
9676
9493
|
}
|
|
9677
9494
|
|
|
9678
|
-
function getCurrentRefinement$
|
|
9679
|
-
var id = getId$
|
|
9495
|
+
function getCurrentRefinement$a(props, searchState, context) {
|
|
9496
|
+
var id = getId$d();
|
|
9680
9497
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
9681
9498
|
|
|
9682
9499
|
if (currentRefinement) {
|
|
@@ -9713,7 +9530,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9713
9530
|
transformItems: PropTypes.func
|
|
9714
9531
|
},
|
|
9715
9532
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
9716
|
-
var currentRefinement = getCurrentRefinement$
|
|
9533
|
+
var currentRefinement = getCurrentRefinement$a(props, searchState, {
|
|
9717
9534
|
ais: props.contextValue,
|
|
9718
9535
|
multiIndexContext: props.indexContextValue
|
|
9719
9536
|
});
|
|
@@ -9730,7 +9547,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9730
9547
|
};
|
|
9731
9548
|
},
|
|
9732
9549
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9733
|
-
var id = getId$
|
|
9550
|
+
var id = getId$d();
|
|
9734
9551
|
|
|
9735
9552
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9736
9553
|
|
|
@@ -9744,10 +9561,10 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9744
9561
|
return cleanUpValue(searchState, {
|
|
9745
9562
|
ais: props.contextValue,
|
|
9746
9563
|
multiIndexContext: props.indexContextValue
|
|
9747
|
-
}, getId$
|
|
9564
|
+
}, getId$d());
|
|
9748
9565
|
},
|
|
9749
9566
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9750
|
-
var selectedIndex = getCurrentRefinement$
|
|
9567
|
+
var selectedIndex = getCurrentRefinement$a(props, searchState, {
|
|
9751
9568
|
ais: props.contextValue,
|
|
9752
9569
|
multiIndexContext: props.indexContextValue
|
|
9753
9570
|
});
|
|
@@ -9755,7 +9572,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9755
9572
|
},
|
|
9756
9573
|
getMetadata: function getMetadata() {
|
|
9757
9574
|
return {
|
|
9758
|
-
id: getId$
|
|
9575
|
+
id: getId$d()
|
|
9759
9576
|
};
|
|
9760
9577
|
}
|
|
9761
9578
|
});
|
|
@@ -9791,15 +9608,15 @@ var connectStats = createConnectorWithContext({
|
|
|
9791
9608
|
}
|
|
9792
9609
|
});
|
|
9793
9610
|
|
|
9794
|
-
function getId$
|
|
9611
|
+
function getId$e(props) {
|
|
9795
9612
|
return props.attribute;
|
|
9796
9613
|
}
|
|
9797
9614
|
|
|
9798
|
-
var namespace = 'toggle';
|
|
9615
|
+
var namespace$6 = 'toggle';
|
|
9799
9616
|
var falsyStrings = ['0', 'false', 'null', 'undefined'];
|
|
9800
9617
|
|
|
9801
|
-
function getCurrentRefinement(props, searchState, context) {
|
|
9802
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace, ".").concat(getId$
|
|
9618
|
+
function getCurrentRefinement$b(props, searchState, context) {
|
|
9619
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$6, ".").concat(getId$e(props)), false);
|
|
9803
9620
|
|
|
9804
9621
|
if (falsyStrings.indexOf(currentRefinement) !== -1) {
|
|
9805
9622
|
return false;
|
|
@@ -9808,17 +9625,17 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
9808
9625
|
return Boolean(currentRefinement);
|
|
9809
9626
|
}
|
|
9810
9627
|
|
|
9811
|
-
function _refine$
|
|
9812
|
-
var id = getId$
|
|
9628
|
+
function _refine$8(props, searchState, nextRefinement, context) {
|
|
9629
|
+
var id = getId$e(props);
|
|
9813
9630
|
|
|
9814
9631
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : false);
|
|
9815
9632
|
|
|
9816
9633
|
var resetPage = true;
|
|
9817
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
9634
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$6);
|
|
9818
9635
|
}
|
|
9819
9636
|
|
|
9820
|
-
function _cleanUp$
|
|
9821
|
-
return cleanUpValue(searchState, context, "".concat(namespace, ".").concat(getId$
|
|
9637
|
+
function _cleanUp$6(props, searchState, context) {
|
|
9638
|
+
return cleanUpValue(searchState, context, "".concat(namespace$6, ".").concat(getId$e(props)));
|
|
9822
9639
|
}
|
|
9823
9640
|
/**
|
|
9824
9641
|
* connectToggleRefinement connector provides the logic to build a widget that will
|
|
@@ -9857,14 +9674,14 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9857
9674
|
ais: props.contextValue,
|
|
9858
9675
|
multiIndexContext: props.indexContextValue
|
|
9859
9676
|
});
|
|
9860
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
9677
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
9861
9678
|
ais: props.contextValue,
|
|
9862
9679
|
multiIndexContext: props.indexContextValue
|
|
9863
9680
|
});
|
|
9864
9681
|
var allFacetValues = results && results.getFacetByName(attribute) ? results.getFacetValues(attribute) : null;
|
|
9865
9682
|
var facetValue = // Use null to always be consistent with type of the value
|
|
9866
9683
|
// count: number | null
|
|
9867
|
-
allFacetValues && allFacetValues.length ? find
|
|
9684
|
+
allFacetValues && allFacetValues.length ? find(allFacetValues, function (item) {
|
|
9868
9685
|
return item.name === value.toString();
|
|
9869
9686
|
}) : null;
|
|
9870
9687
|
var facetValueCount = facetValue && facetValue.count;
|
|
@@ -9885,13 +9702,13 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9885
9702
|
};
|
|
9886
9703
|
},
|
|
9887
9704
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9888
|
-
return _refine$
|
|
9705
|
+
return _refine$8(props, searchState, nextRefinement, {
|
|
9889
9706
|
ais: props.contextValue,
|
|
9890
9707
|
multiIndexContext: props.indexContextValue
|
|
9891
9708
|
});
|
|
9892
9709
|
},
|
|
9893
9710
|
cleanUp: function cleanUp(props, searchState) {
|
|
9894
|
-
return _cleanUp$
|
|
9711
|
+
return _cleanUp$6(props, searchState, {
|
|
9895
9712
|
ais: props.contextValue,
|
|
9896
9713
|
multiIndexContext: props.indexContextValue
|
|
9897
9714
|
});
|
|
@@ -9900,7 +9717,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9900
9717
|
var attribute = props.attribute,
|
|
9901
9718
|
value = props.value,
|
|
9902
9719
|
filter = props.filter;
|
|
9903
|
-
var checked = getCurrentRefinement(props, searchState, {
|
|
9720
|
+
var checked = getCurrentRefinement$b(props, searchState, {
|
|
9904
9721
|
ais: props.contextValue,
|
|
9905
9722
|
multiIndexContext: props.indexContextValue
|
|
9906
9723
|
});
|
|
@@ -9917,8 +9734,8 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9917
9734
|
return nextSearchParameters;
|
|
9918
9735
|
},
|
|
9919
9736
|
getMetadata: function getMetadata(props, searchState) {
|
|
9920
|
-
var id = getId$
|
|
9921
|
-
var checked = getCurrentRefinement(props, searchState, {
|
|
9737
|
+
var id = getId$e(props);
|
|
9738
|
+
var checked = getCurrentRefinement$b(props, searchState, {
|
|
9922
9739
|
ais: props.contextValue,
|
|
9923
9740
|
multiIndexContext: props.indexContextValue
|
|
9924
9741
|
});
|
|
@@ -9934,7 +9751,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9934
9751
|
currentRefinement: checked,
|
|
9935
9752
|
attribute: props.attribute,
|
|
9936
9753
|
value: function value(nextState) {
|
|
9937
|
-
return _refine$
|
|
9754
|
+
return _refine$8(props, nextState, false, {
|
|
9938
9755
|
ais: props.contextValue,
|
|
9939
9756
|
multiIndexContext: props.indexContextValue
|
|
9940
9757
|
});
|
|
@@ -9950,7 +9767,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9950
9767
|
}
|
|
9951
9768
|
});
|
|
9952
9769
|
|
|
9953
|
-
function getId() {
|
|
9770
|
+
function getId$f() {
|
|
9954
9771
|
return 'query';
|
|
9955
9772
|
}
|
|
9956
9773
|
|
|
@@ -9959,7 +9776,7 @@ function getAdditionalId() {
|
|
|
9959
9776
|
}
|
|
9960
9777
|
|
|
9961
9778
|
function getCurrentRefinementQuery(props, searchState, context) {
|
|
9962
|
-
var id = getId();
|
|
9779
|
+
var id = getId$f();
|
|
9963
9780
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9964
9781
|
|
|
9965
9782
|
if (currentRefinement) {
|
|
@@ -9980,10 +9797,10 @@ function getCurrentRefinementAdditional(props, searchState, context) {
|
|
|
9980
9797
|
return {};
|
|
9981
9798
|
}
|
|
9982
9799
|
|
|
9983
|
-
function _refine(props, searchState, nextRefinement, context) {
|
|
9800
|
+
function _refine$9(props, searchState, nextRefinement, context) {
|
|
9984
9801
|
var _nextValue;
|
|
9985
9802
|
|
|
9986
|
-
var id = getId();
|
|
9803
|
+
var id = getId$f();
|
|
9987
9804
|
var voiceParams = getAdditionalId();
|
|
9988
9805
|
var queryLanguages = props.language ? {
|
|
9989
9806
|
queryLanguages: [props.language.split('-')[0]]
|
|
@@ -10000,8 +9817,8 @@ function _refine(props, searchState, nextRefinement, context) {
|
|
|
10000
9817
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
10001
9818
|
}
|
|
10002
9819
|
|
|
10003
|
-
function _cleanUp(props, searchState, context) {
|
|
10004
|
-
var interimState = cleanUpValue(searchState, context, getId());
|
|
9820
|
+
function _cleanUp$7(props, searchState, context) {
|
|
9821
|
+
var interimState = cleanUpValue(searchState, context, getId$f());
|
|
10005
9822
|
return cleanUpValue(interimState, context, getAdditionalId());
|
|
10006
9823
|
}
|
|
10007
9824
|
|
|
@@ -10020,13 +9837,13 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
10020
9837
|
};
|
|
10021
9838
|
},
|
|
10022
9839
|
refine: function refine(props, searchState, nextRefinement) {
|
|
10023
|
-
return _refine(props, searchState, nextRefinement, {
|
|
9840
|
+
return _refine$9(props, searchState, nextRefinement, {
|
|
10024
9841
|
ais: props.contextValue,
|
|
10025
9842
|
multiIndexContext: props.indexContextValue
|
|
10026
9843
|
});
|
|
10027
9844
|
},
|
|
10028
9845
|
cleanUp: function cleanUp(props, searchState) {
|
|
10029
|
-
return _cleanUp(props, searchState, {
|
|
9846
|
+
return _cleanUp$7(props, searchState, {
|
|
10030
9847
|
ais: props.contextValue,
|
|
10031
9848
|
multiIndexContext: props.indexContextValue
|
|
10032
9849
|
});
|
|
@@ -10043,7 +9860,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
10043
9860
|
return searchParameters.setQuery(query).setQueryParameters(additionalParams);
|
|
10044
9861
|
},
|
|
10045
9862
|
getMetadata: function getMetadata(props, searchState) {
|
|
10046
|
-
var id = getId();
|
|
9863
|
+
var id = getId$f();
|
|
10047
9864
|
var currentRefinement = getCurrentRefinementQuery(props, searchState, {
|
|
10048
9865
|
ais: props.contextValue,
|
|
10049
9866
|
multiIndexContext: props.indexContextValue
|
|
@@ -10057,7 +9874,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
10057
9874
|
items: currentRefinement === null ? [] : [{
|
|
10058
9875
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
10059
9876
|
value: function value(nextState) {
|
|
10060
|
-
return _refine(props, nextState, '', {
|
|
9877
|
+
return _refine$9(props, nextState, '', {
|
|
10061
9878
|
ais: props.contextValue,
|
|
10062
9879
|
multiIndexContext: props.indexContextValue
|
|
10063
9880
|
});
|
|
@@ -10110,7 +9927,7 @@ function range(_ref) {
|
|
|
10110
9927
|
return (start + current) * limitStep;
|
|
10111
9928
|
});
|
|
10112
9929
|
}
|
|
10113
|
-
function find(array, comparator) {
|
|
9930
|
+
function find$2(array, comparator) {
|
|
10114
9931
|
if (!Array.isArray(array)) {
|
|
10115
9932
|
return undefined;
|
|
10116
9933
|
}
|
|
@@ -10124,11 +9941,11 @@ function find(array, comparator) {
|
|
|
10124
9941
|
return undefined;
|
|
10125
9942
|
}
|
|
10126
9943
|
|
|
10127
|
-
var cx
|
|
9944
|
+
var cx = createClassNames('Panel');
|
|
10128
9945
|
|
|
10129
|
-
var _createContext = createContext(function setCanRefine() {}),
|
|
10130
|
-
PanelConsumer = _createContext.Consumer,
|
|
10131
|
-
PanelProvider = _createContext.Provider;
|
|
9946
|
+
var _createContext$1 = createContext(function setCanRefine() {}),
|
|
9947
|
+
PanelConsumer = _createContext$1.Consumer,
|
|
9948
|
+
PanelProvider = _createContext$1.Provider;
|
|
10132
9949
|
|
|
10133
9950
|
var Panel =
|
|
10134
9951
|
/*#__PURE__*/
|
|
@@ -10171,15 +9988,15 @@ function (_Component) {
|
|
|
10171
9988
|
footer = _this$props.footer;
|
|
10172
9989
|
var canRefine = this.state.canRefine;
|
|
10173
9990
|
return React__default.createElement("div", {
|
|
10174
|
-
className: classnames(cx
|
|
9991
|
+
className: classnames(cx('', !canRefine && '-noRefinement'), className)
|
|
10175
9992
|
}, header && React__default.createElement("div", {
|
|
10176
|
-
className: cx
|
|
9993
|
+
className: cx('header')
|
|
10177
9994
|
}, header), React__default.createElement("div", {
|
|
10178
|
-
className: cx
|
|
9995
|
+
className: cx('body')
|
|
10179
9996
|
}, React__default.createElement(PanelProvider, {
|
|
10180
9997
|
value: this.setCanRefine
|
|
10181
9998
|
}, children)), footer && React__default.createElement("div", {
|
|
10182
|
-
className: cx
|
|
9999
|
+
className: cx('footer')
|
|
10183
10000
|
}, footer));
|
|
10184
10001
|
}
|
|
10185
10002
|
}]);
|
|
@@ -10302,8 +10119,8 @@ _defineProperty(Link, "propTypes", {
|
|
|
10302
10119
|
onClick: PropTypes.func.isRequired
|
|
10303
10120
|
});
|
|
10304
10121
|
|
|
10305
|
-
var cx$
|
|
10306
|
-
var itemsPropType
|
|
10122
|
+
var cx$1 = createClassNames('Breadcrumb');
|
|
10123
|
+
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
10307
10124
|
label: PropTypes.string.isRequired,
|
|
10308
10125
|
value: PropTypes.string.isRequired
|
|
10309
10126
|
}));
|
|
@@ -10332,9 +10149,9 @@ function (_Component) {
|
|
|
10332
10149
|
translate = _this$props.translate,
|
|
10333
10150
|
className = _this$props.className;
|
|
10334
10151
|
var rootPath = canRefine ? React__default.createElement("li", {
|
|
10335
|
-
className: cx$
|
|
10152
|
+
className: cx$1('item')
|
|
10336
10153
|
}, React__default.createElement(Link, {
|
|
10337
|
-
className: cx$
|
|
10154
|
+
className: cx$1('link'),
|
|
10338
10155
|
onClick: function onClick() {
|
|
10339
10156
|
return !rootURL ? refine() : null;
|
|
10340
10157
|
},
|
|
@@ -10343,12 +10160,12 @@ function (_Component) {
|
|
|
10343
10160
|
var breadcrumb = items.map(function (item, idx) {
|
|
10344
10161
|
var isLast = idx === items.length - 1;
|
|
10345
10162
|
return React__default.createElement("li", {
|
|
10346
|
-
className: cx$
|
|
10163
|
+
className: cx$1('item', isLast && 'item--selected'),
|
|
10347
10164
|
key: idx
|
|
10348
10165
|
}, React__default.createElement("span", {
|
|
10349
|
-
className: cx$
|
|
10166
|
+
className: cx$1('separator')
|
|
10350
10167
|
}, separator), !isLast ? React__default.createElement(Link, {
|
|
10351
|
-
className: cx$
|
|
10168
|
+
className: cx$1('link'),
|
|
10352
10169
|
onClick: function onClick() {
|
|
10353
10170
|
return refine(item.value);
|
|
10354
10171
|
},
|
|
@@ -10356,9 +10173,9 @@ function (_Component) {
|
|
|
10356
10173
|
}, item.label) : item.label);
|
|
10357
10174
|
});
|
|
10358
10175
|
return React__default.createElement("div", {
|
|
10359
|
-
className: classnames(cx$
|
|
10176
|
+
className: classnames(cx$1('', !canRefine && '-noRefinement'), className)
|
|
10360
10177
|
}, React__default.createElement("ul", {
|
|
10361
|
-
className: cx$
|
|
10178
|
+
className: cx$1('list')
|
|
10362
10179
|
}, rootPath, breadcrumb));
|
|
10363
10180
|
}
|
|
10364
10181
|
}]);
|
|
@@ -10369,7 +10186,7 @@ function (_Component) {
|
|
|
10369
10186
|
_defineProperty(Breadcrumb, "propTypes", {
|
|
10370
10187
|
canRefine: PropTypes.bool.isRequired,
|
|
10371
10188
|
createURL: PropTypes.func.isRequired,
|
|
10372
|
-
items: itemsPropType
|
|
10189
|
+
items: itemsPropType,
|
|
10373
10190
|
refine: PropTypes.func.isRequired,
|
|
10374
10191
|
rootURL: PropTypes.string,
|
|
10375
10192
|
separator: PropTypes.node,
|
|
@@ -10481,7 +10298,7 @@ var BreadcrumbWidget = function BreadcrumbWidget(props) {
|
|
|
10481
10298
|
|
|
10482
10299
|
connectBreadcrumb(BreadcrumbWidget);
|
|
10483
10300
|
|
|
10484
|
-
var cx$
|
|
10301
|
+
var cx$2 = createClassNames('ClearRefinements');
|
|
10485
10302
|
|
|
10486
10303
|
var ClearRefinements =
|
|
10487
10304
|
/*#__PURE__*/
|
|
@@ -10504,9 +10321,9 @@ function (_Component) {
|
|
|
10504
10321
|
translate = _this$props.translate,
|
|
10505
10322
|
className = _this$props.className;
|
|
10506
10323
|
return React__default.createElement("div", {
|
|
10507
|
-
className: classnames(cx$
|
|
10324
|
+
className: classnames(cx$2(''), className)
|
|
10508
10325
|
}, React__default.createElement("button", {
|
|
10509
|
-
className: cx$
|
|
10326
|
+
className: cx$2('button', !canRefine && 'button--disabled'),
|
|
10510
10327
|
onClick: function onClick() {
|
|
10511
10328
|
return refine(items);
|
|
10512
10329
|
},
|
|
@@ -10574,7 +10391,7 @@ var ClearRefinementsWidget = function ClearRefinementsWidget(props) {
|
|
|
10574
10391
|
|
|
10575
10392
|
connectCurrentRefinements(ClearRefinementsWidget);
|
|
10576
10393
|
|
|
10577
|
-
var cx$
|
|
10394
|
+
var cx$3 = createClassNames('CurrentRefinements');
|
|
10578
10395
|
var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
10579
10396
|
var items = _ref.items,
|
|
10580
10397
|
canRefine = _ref.canRefine,
|
|
@@ -10582,31 +10399,31 @@ var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
|
10582
10399
|
translate = _ref.translate,
|
|
10583
10400
|
className = _ref.className;
|
|
10584
10401
|
return React__default.createElement("div", {
|
|
10585
|
-
className: classnames(cx$
|
|
10402
|
+
className: classnames(cx$3('', !canRefine && '-noRefinement'), className)
|
|
10586
10403
|
}, React__default.createElement("ul", {
|
|
10587
|
-
className: cx$
|
|
10404
|
+
className: cx$3('list', !canRefine && 'list--noRefinement')
|
|
10588
10405
|
}, items.map(function (item) {
|
|
10589
10406
|
return React__default.createElement("li", {
|
|
10590
10407
|
key: item.label,
|
|
10591
|
-
className: cx$
|
|
10408
|
+
className: cx$3('item')
|
|
10592
10409
|
}, React__default.createElement("span", {
|
|
10593
|
-
className: cx$
|
|
10410
|
+
className: cx$3('label')
|
|
10594
10411
|
}, item.label), item.items ? item.items.map(function (nest) {
|
|
10595
10412
|
return React__default.createElement("span", {
|
|
10596
10413
|
key: nest.label,
|
|
10597
|
-
className: cx$
|
|
10414
|
+
className: cx$3('category')
|
|
10598
10415
|
}, React__default.createElement("span", {
|
|
10599
|
-
className: cx$
|
|
10416
|
+
className: cx$3('categoryLabel')
|
|
10600
10417
|
}, nest.label), React__default.createElement("button", {
|
|
10601
|
-
className: cx$
|
|
10418
|
+
className: cx$3('delete'),
|
|
10602
10419
|
onClick: function onClick() {
|
|
10603
10420
|
return refine(nest.value);
|
|
10604
10421
|
}
|
|
10605
10422
|
}, translate('clearFilter', nest)));
|
|
10606
10423
|
}) : React__default.createElement("span", {
|
|
10607
|
-
className: cx$
|
|
10424
|
+
className: cx$3('category')
|
|
10608
10425
|
}, React__default.createElement("button", {
|
|
10609
|
-
className: cx$
|
|
10426
|
+
className: cx$3('delete'),
|
|
10610
10427
|
onClick: function onClick() {
|
|
10611
10428
|
return refine(item.value);
|
|
10612
10429
|
}
|
|
@@ -10682,14 +10499,14 @@ var CurrentRefinementsWidget = function CurrentRefinementsWidget(props) {
|
|
|
10682
10499
|
|
|
10683
10500
|
connectCurrentRefinements(CurrentRefinementsWidget);
|
|
10684
10501
|
|
|
10685
|
-
var cx$
|
|
10502
|
+
var cx$4 = createClassNames('SearchBox');
|
|
10686
10503
|
var defaultLoadingIndicator = React__default.createElement("svg", {
|
|
10687
10504
|
width: "18",
|
|
10688
10505
|
height: "18",
|
|
10689
10506
|
viewBox: "0 0 38 38",
|
|
10690
10507
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10691
10508
|
stroke: "#444",
|
|
10692
|
-
className: cx$
|
|
10509
|
+
className: cx$4('loadingIcon')
|
|
10693
10510
|
}, React__default.createElement("g", {
|
|
10694
10511
|
fill: "none",
|
|
10695
10512
|
fillRule: "evenodd"
|
|
@@ -10712,7 +10529,7 @@ var defaultLoadingIndicator = React__default.createElement("svg", {
|
|
|
10712
10529
|
repeatCount: "indefinite"
|
|
10713
10530
|
})))));
|
|
10714
10531
|
var defaultReset = React__default.createElement("svg", {
|
|
10715
|
-
className: cx$
|
|
10532
|
+
className: cx$4('resetIcon'),
|
|
10716
10533
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10717
10534
|
viewBox: "0 0 20 20",
|
|
10718
10535
|
width: "10",
|
|
@@ -10721,7 +10538,7 @@ var defaultReset = React__default.createElement("svg", {
|
|
|
10721
10538
|
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"
|
|
10722
10539
|
}));
|
|
10723
10540
|
var defaultSubmit = React__default.createElement("svg", {
|
|
10724
|
-
className: cx$
|
|
10541
|
+
className: cx$4('submitIcon'),
|
|
10725
10542
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10726
10543
|
width: "10",
|
|
10727
10544
|
height: "10",
|
|
@@ -10730,7 +10547,7 @@ var defaultSubmit = React__default.createElement("svg", {
|
|
|
10730
10547
|
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"
|
|
10731
10548
|
}));
|
|
10732
10549
|
|
|
10733
|
-
var SearchBox
|
|
10550
|
+
var SearchBox =
|
|
10734
10551
|
/*#__PURE__*/
|
|
10735
10552
|
function (_Component) {
|
|
10736
10553
|
_inherits(SearchBox, _Component);
|
|
@@ -10893,12 +10710,12 @@ function (_Component) {
|
|
|
10893
10710
|
/* eslint-disable max-len */
|
|
10894
10711
|
|
|
10895
10712
|
return React__default.createElement("div", {
|
|
10896
|
-
className: classnames(cx$
|
|
10713
|
+
className: classnames(cx$4(''), className)
|
|
10897
10714
|
}, React__default.createElement("form", {
|
|
10898
10715
|
noValidate: true,
|
|
10899
10716
|
onSubmit: this.props.onSubmit ? this.props.onSubmit : this.onSubmit,
|
|
10900
10717
|
onReset: this.onReset,
|
|
10901
|
-
className: cx$
|
|
10718
|
+
className: cx$4('form', isSearchStalled && 'form--stalledSearch'),
|
|
10902
10719
|
action: "",
|
|
10903
10720
|
role: "search"
|
|
10904
10721
|
}, React__default.createElement("input", _extends({
|
|
@@ -10915,19 +10732,19 @@ function (_Component) {
|
|
|
10915
10732
|
value: query,
|
|
10916
10733
|
onChange: this.onChange
|
|
10917
10734
|
}, searchInputEvents, {
|
|
10918
|
-
className: cx$
|
|
10735
|
+
className: cx$4('input')
|
|
10919
10736
|
})), React__default.createElement("button", {
|
|
10920
10737
|
type: "submit",
|
|
10921
10738
|
title: translate('submitTitle'),
|
|
10922
|
-
className: cx$
|
|
10739
|
+
className: cx$4('submit')
|
|
10923
10740
|
}, submit), React__default.createElement("button", {
|
|
10924
10741
|
type: "reset",
|
|
10925
10742
|
title: translate('resetTitle'),
|
|
10926
|
-
className: cx$
|
|
10743
|
+
className: cx$4('reset'),
|
|
10927
10744
|
hidden: !query || isSearchStalled
|
|
10928
10745
|
}, reset), this.props.showLoadingIndicator && React__default.createElement("span", {
|
|
10929
10746
|
hidden: !isSearchStalled,
|
|
10930
|
-
className: cx$
|
|
10747
|
+
className: cx$4('loadingIndicator')
|
|
10931
10748
|
}, loadingIndicator)));
|
|
10932
10749
|
/* eslint-enable */
|
|
10933
10750
|
}
|
|
@@ -10936,7 +10753,7 @@ function (_Component) {
|
|
|
10936
10753
|
return SearchBox;
|
|
10937
10754
|
}(Component);
|
|
10938
10755
|
|
|
10939
|
-
_defineProperty(SearchBox
|
|
10756
|
+
_defineProperty(SearchBox, "propTypes", {
|
|
10940
10757
|
currentRefinement: PropTypes.string,
|
|
10941
10758
|
className: PropTypes.string,
|
|
10942
10759
|
refine: PropTypes.func.isRequired,
|
|
@@ -10957,7 +10774,7 @@ _defineProperty(SearchBox$1, "propTypes", {
|
|
|
10957
10774
|
})])
|
|
10958
10775
|
});
|
|
10959
10776
|
|
|
10960
|
-
_defineProperty(SearchBox
|
|
10777
|
+
_defineProperty(SearchBox, "defaultProps", {
|
|
10961
10778
|
currentRefinement: '',
|
|
10962
10779
|
className: '',
|
|
10963
10780
|
focusShortcuts: ['s', '/'],
|
|
@@ -10970,11 +10787,11 @@ _defineProperty(SearchBox$1, "defaultProps", {
|
|
|
10970
10787
|
submit: defaultSubmit
|
|
10971
10788
|
});
|
|
10972
10789
|
|
|
10973
|
-
var SearchBox$
|
|
10790
|
+
var SearchBox$1 = translatable({
|
|
10974
10791
|
resetTitle: 'Clear the search query.',
|
|
10975
10792
|
submitTitle: 'Submit your search query.',
|
|
10976
10793
|
placeholder: 'Search here…'
|
|
10977
|
-
})(SearchBox
|
|
10794
|
+
})(SearchBox);
|
|
10978
10795
|
|
|
10979
10796
|
var itemsPropType$1 = PropTypes.arrayOf(PropTypes.shape({
|
|
10980
10797
|
value: PropTypes.any,
|
|
@@ -11074,7 +10891,7 @@ function (_Component) {
|
|
|
11074
10891
|
}, translate('noResults')) : null;
|
|
11075
10892
|
return React__default.createElement("div", {
|
|
11076
10893
|
className: cx('searchBox')
|
|
11077
|
-
}, React__default.createElement(SearchBox$
|
|
10894
|
+
}, React__default.createElement(SearchBox$1, {
|
|
11078
10895
|
currentRefinement: this.state.query,
|
|
11079
10896
|
refine: function refine(value) {
|
|
11080
10897
|
_this2.setState({
|
|
@@ -11089,7 +10906,7 @@ function (_Component) {
|
|
|
11089
10906
|
e.preventDefault();
|
|
11090
10907
|
e.stopPropagation();
|
|
11091
10908
|
|
|
11092
|
-
if (isFromSearch
|
|
10909
|
+
if (isFromSearch) {
|
|
11093
10910
|
selectItem(items[0], _this2.resetQuery);
|
|
11094
10911
|
}
|
|
11095
10912
|
}
|
|
@@ -11154,13 +10971,13 @@ _defineProperty(List, "defaultProps", {
|
|
|
11154
10971
|
isFromSearch: false
|
|
11155
10972
|
});
|
|
11156
10973
|
|
|
11157
|
-
var cx$
|
|
11158
|
-
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
10974
|
+
var cx$5 = createClassNames('HierarchicalMenu');
|
|
10975
|
+
var itemsPropType$2 = PropTypes.arrayOf(PropTypes.shape({
|
|
11159
10976
|
label: PropTypes.string.isRequired,
|
|
11160
10977
|
value: PropTypes.string,
|
|
11161
10978
|
count: PropTypes.number.isRequired,
|
|
11162
10979
|
items: function items() {
|
|
11163
|
-
return itemsPropType.apply(void 0, arguments);
|
|
10980
|
+
return itemsPropType$2.apply(void 0, arguments);
|
|
11164
10981
|
}
|
|
11165
10982
|
}));
|
|
11166
10983
|
|
|
@@ -11187,15 +11004,15 @@ function (_Component) {
|
|
|
11187
11004
|
createURL = _this$props.createURL,
|
|
11188
11005
|
refine = _this$props.refine;
|
|
11189
11006
|
return React__default.createElement(Link, {
|
|
11190
|
-
className: cx$
|
|
11007
|
+
className: cx$5('link'),
|
|
11191
11008
|
onClick: function onClick() {
|
|
11192
11009
|
return refine(item.value);
|
|
11193
11010
|
},
|
|
11194
11011
|
href: createURL(item.value)
|
|
11195
11012
|
}, React__default.createElement("span", {
|
|
11196
|
-
className: cx$
|
|
11013
|
+
className: cx$5('label')
|
|
11197
11014
|
}, item.label), ' ', React__default.createElement("span", {
|
|
11198
|
-
className: cx$
|
|
11015
|
+
className: cx$5('count')
|
|
11199
11016
|
}, item.count));
|
|
11200
11017
|
});
|
|
11201
11018
|
|
|
@@ -11215,7 +11032,7 @@ function (_Component) {
|
|
|
11215
11032
|
className = _this$props2.className;
|
|
11216
11033
|
return React__default.createElement(List, {
|
|
11217
11034
|
renderItem: this.renderItem,
|
|
11218
|
-
cx: cx$
|
|
11035
|
+
cx: cx$5,
|
|
11219
11036
|
translate: translate,
|
|
11220
11037
|
items: items,
|
|
11221
11038
|
showMore: showMore,
|
|
@@ -11235,7 +11052,7 @@ _defineProperty(HierarchicalMenu, "propTypes", {
|
|
|
11235
11052
|
refine: PropTypes.func.isRequired,
|
|
11236
11053
|
createURL: PropTypes.func.isRequired,
|
|
11237
11054
|
canRefine: PropTypes.bool.isRequired,
|
|
11238
|
-
items: itemsPropType,
|
|
11055
|
+
items: itemsPropType$2,
|
|
11239
11056
|
showMore: PropTypes.bool,
|
|
11240
11057
|
className: PropTypes.string,
|
|
11241
11058
|
limit: PropTypes.number,
|
|
@@ -11349,7 +11166,7 @@ var HierarchicalMenuWidget = function HierarchicalMenuWidget(props) {
|
|
|
11349
11166
|
|
|
11350
11167
|
connectHierarchicalMenu(HierarchicalMenuWidget);
|
|
11351
11168
|
|
|
11352
|
-
var Highlight
|
|
11169
|
+
var Highlight = function Highlight(_ref) {
|
|
11353
11170
|
var cx = _ref.cx,
|
|
11354
11171
|
value = _ref.value,
|
|
11355
11172
|
highlightedTagName = _ref.highlightedTagName,
|
|
@@ -11361,7 +11178,7 @@ var Highlight$2 = function Highlight(_ref) {
|
|
|
11361
11178
|
className: cx(className)
|
|
11362
11179
|
}, value);
|
|
11363
11180
|
};
|
|
11364
|
-
Highlight
|
|
11181
|
+
Highlight.propTypes = {
|
|
11365
11182
|
cx: PropTypes.func.isRequired,
|
|
11366
11183
|
value: PropTypes.string.isRequired,
|
|
11367
11184
|
isHighlighted: PropTypes.bool.isRequired,
|
|
@@ -11392,7 +11209,7 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11392
11209
|
return React__default.createElement("span", {
|
|
11393
11210
|
key: i
|
|
11394
11211
|
}, item.map(function (element, index) {
|
|
11395
|
-
return React__default.createElement(Highlight
|
|
11212
|
+
return React__default.createElement(Highlight, {
|
|
11396
11213
|
cx: cx,
|
|
11397
11214
|
key: index,
|
|
11398
11215
|
value: element.value,
|
|
@@ -11405,7 +11222,7 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11405
11222
|
}, separator));
|
|
11406
11223
|
}
|
|
11407
11224
|
|
|
11408
|
-
return React__default.createElement(Highlight
|
|
11225
|
+
return React__default.createElement(Highlight, {
|
|
11409
11226
|
cx: cx,
|
|
11410
11227
|
key: i,
|
|
11411
11228
|
value: item.value,
|
|
@@ -11434,12 +11251,12 @@ Highlighter.defaultProps = {
|
|
|
11434
11251
|
separator: ', '
|
|
11435
11252
|
};
|
|
11436
11253
|
|
|
11437
|
-
var cx$
|
|
11254
|
+
var cx$6 = createClassNames('Highlight');
|
|
11438
11255
|
|
|
11439
11256
|
var Highlight$1 = function Highlight(props) {
|
|
11440
11257
|
return React__default.createElement(Highlighter, _extends({}, props, {
|
|
11441
11258
|
highlightProperty: "_highlightResult",
|
|
11442
|
-
cx: cx$
|
|
11259
|
+
cx: cx$6
|
|
11443
11260
|
}));
|
|
11444
11261
|
};
|
|
11445
11262
|
|
|
@@ -11484,9 +11301,9 @@ var Highlight$1 = function Highlight(props) {
|
|
|
11484
11301
|
* );
|
|
11485
11302
|
*/
|
|
11486
11303
|
|
|
11487
|
-
var Highlight = connectHighlight(Highlight$1);
|
|
11304
|
+
var Highlight$2 = connectHighlight(Highlight$1);
|
|
11488
11305
|
|
|
11489
|
-
var cx$
|
|
11306
|
+
var cx$7 = createClassNames('Hits');
|
|
11490
11307
|
|
|
11491
11308
|
var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
11492
11309
|
return React__default.createElement("div", {
|
|
@@ -11499,19 +11316,19 @@ var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
|
11499
11316
|
}, JSON.stringify(props).slice(0, 100), "...");
|
|
11500
11317
|
};
|
|
11501
11318
|
|
|
11502
|
-
var Hits
|
|
11319
|
+
var Hits = function Hits(_ref) {
|
|
11503
11320
|
var hits = _ref.hits,
|
|
11504
11321
|
_ref$className = _ref.className,
|
|
11505
11322
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
11506
11323
|
_ref$hitComponent = _ref.hitComponent,
|
|
11507
11324
|
HitComponent = _ref$hitComponent === void 0 ? DefaultHitComponent : _ref$hitComponent;
|
|
11508
11325
|
return React__default.createElement("div", {
|
|
11509
|
-
className: classnames(cx$
|
|
11326
|
+
className: classnames(cx$7(''), className)
|
|
11510
11327
|
}, React__default.createElement("ul", {
|
|
11511
|
-
className: cx$
|
|
11328
|
+
className: cx$7('list')
|
|
11512
11329
|
}, hits.map(function (hit) {
|
|
11513
11330
|
return React__default.createElement("li", {
|
|
11514
|
-
className: cx$
|
|
11331
|
+
className: cx$7('item'),
|
|
11515
11332
|
key: hit.objectID
|
|
11516
11333
|
}, React__default.createElement(HitComponent, {
|
|
11517
11334
|
hit: hit
|
|
@@ -11522,7 +11339,7 @@ var Hits$1 = function Hits(_ref) {
|
|
|
11522
11339
|
var HitPropTypes = PropTypes.shape({
|
|
11523
11340
|
objectID: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11524
11341
|
});
|
|
11525
|
-
Hits
|
|
11342
|
+
Hits.propTypes = {
|
|
11526
11343
|
hits: PropTypes.arrayOf(HitPropTypes.isRequired).isRequired,
|
|
11527
11344
|
className: PropTypes.string,
|
|
11528
11345
|
hitComponent: PropTypes.func
|
|
@@ -11561,7 +11378,7 @@ Hits$1.propTypes = {
|
|
|
11561
11378
|
* );
|
|
11562
11379
|
*/
|
|
11563
11380
|
|
|
11564
|
-
var Hits = connectHits(Hits
|
|
11381
|
+
var Hits$1 = connectHits(Hits);
|
|
11565
11382
|
|
|
11566
11383
|
var Select =
|
|
11567
11384
|
/*#__PURE__*/
|
|
@@ -11625,7 +11442,7 @@ _defineProperty(Select, "propTypes", {
|
|
|
11625
11442
|
selectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11626
11443
|
});
|
|
11627
11444
|
|
|
11628
|
-
var cx$
|
|
11445
|
+
var cx$8 = createClassNames('HitsPerPage');
|
|
11629
11446
|
|
|
11630
11447
|
var HitsPerPage =
|
|
11631
11448
|
/*#__PURE__*/
|
|
@@ -11647,12 +11464,12 @@ function (_Component) {
|
|
|
11647
11464
|
refine = _this$props.refine,
|
|
11648
11465
|
className = _this$props.className;
|
|
11649
11466
|
return React__default.createElement("div", {
|
|
11650
|
-
className: classnames(cx$
|
|
11467
|
+
className: classnames(cx$8(''), className)
|
|
11651
11468
|
}, React__default.createElement(Select, {
|
|
11652
11469
|
onSelect: refine,
|
|
11653
11470
|
selectedItem: currentRefinement,
|
|
11654
11471
|
items: items,
|
|
11655
|
-
cx: cx$
|
|
11472
|
+
cx: cx$8
|
|
11656
11473
|
}));
|
|
11657
11474
|
}
|
|
11658
11475
|
}]);
|
|
@@ -11718,7 +11535,7 @@ _defineProperty(HitsPerPage, "defaultProps", {
|
|
|
11718
11535
|
|
|
11719
11536
|
connectHitsPerPage(HitsPerPage);
|
|
11720
11537
|
|
|
11721
|
-
var cx$
|
|
11538
|
+
var cx$9 = createClassNames('InfiniteHits');
|
|
11722
11539
|
|
|
11723
11540
|
var InfiniteHits =
|
|
11724
11541
|
/*#__PURE__*/
|
|
@@ -11745,24 +11562,24 @@ function (_Component) {
|
|
|
11745
11562
|
translate = _this$props.translate,
|
|
11746
11563
|
className = _this$props.className;
|
|
11747
11564
|
return React__default.createElement("div", {
|
|
11748
|
-
className: classnames(cx$
|
|
11565
|
+
className: classnames(cx$9(''), className)
|
|
11749
11566
|
}, showPrevious && React__default.createElement("button", {
|
|
11750
|
-
className: cx$
|
|
11567
|
+
className: cx$9('loadPrevious', !hasPrevious && 'loadPrevious--disabled'),
|
|
11751
11568
|
onClick: function onClick() {
|
|
11752
11569
|
return refinePrevious();
|
|
11753
11570
|
},
|
|
11754
11571
|
disabled: !hasPrevious
|
|
11755
11572
|
}, translate('loadPrevious')), React__default.createElement("ul", {
|
|
11756
|
-
className: cx$
|
|
11573
|
+
className: cx$9('list')
|
|
11757
11574
|
}, hits.map(function (hit) {
|
|
11758
11575
|
return React__default.createElement("li", {
|
|
11759
11576
|
key: hit.objectID,
|
|
11760
|
-
className: cx$
|
|
11577
|
+
className: cx$9('item')
|
|
11761
11578
|
}, React__default.createElement(HitComponent, {
|
|
11762
11579
|
hit: hit
|
|
11763
11580
|
}));
|
|
11764
11581
|
})), React__default.createElement("button", {
|
|
11765
|
-
className: cx$
|
|
11582
|
+
className: cx$9('loadMore', !hasMore && 'loadMore--disabled'),
|
|
11766
11583
|
onClick: function onClick() {
|
|
11767
11584
|
return refineNext();
|
|
11768
11585
|
},
|
|
@@ -11843,7 +11660,7 @@ var InfiniteHits$1 = translatable({
|
|
|
11843
11660
|
|
|
11844
11661
|
connectInfiniteHits(InfiniteHits$1);
|
|
11845
11662
|
|
|
11846
|
-
var cx$
|
|
11663
|
+
var cx$a = createClassNames('Menu');
|
|
11847
11664
|
|
|
11848
11665
|
var Menu =
|
|
11849
11666
|
/*#__PURE__*/
|
|
@@ -11865,20 +11682,20 @@ function (_Component) {
|
|
|
11865
11682
|
|
|
11866
11683
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
11867
11684
|
var createURL = _this.props.createURL;
|
|
11868
|
-
var label = _this.props.isFromSearch ? React__default.createElement(Highlight, {
|
|
11685
|
+
var label = _this.props.isFromSearch ? React__default.createElement(Highlight$2, {
|
|
11869
11686
|
attribute: "label",
|
|
11870
11687
|
hit: item
|
|
11871
11688
|
}) : item.label;
|
|
11872
11689
|
return React__default.createElement(Link, {
|
|
11873
|
-
className: cx$
|
|
11690
|
+
className: cx$a('link'),
|
|
11874
11691
|
onClick: function onClick() {
|
|
11875
11692
|
return _this.selectItem(item, resetQuery);
|
|
11876
11693
|
},
|
|
11877
11694
|
href: createURL(item.value)
|
|
11878
11695
|
}, React__default.createElement("span", {
|
|
11879
|
-
className: cx$
|
|
11696
|
+
className: cx$a('label')
|
|
11880
11697
|
}, label), ' ', React__default.createElement("span", {
|
|
11881
|
-
className: cx$
|
|
11698
|
+
className: cx$a('count')
|
|
11882
11699
|
}, item.count));
|
|
11883
11700
|
});
|
|
11884
11701
|
|
|
@@ -11908,7 +11725,7 @@ function (_Component) {
|
|
|
11908
11725
|
return React__default.createElement(List, {
|
|
11909
11726
|
renderItem: this.renderItem,
|
|
11910
11727
|
selectItem: this.selectItem,
|
|
11911
|
-
cx: cx$
|
|
11728
|
+
cx: cx$a,
|
|
11912
11729
|
translate: translate,
|
|
11913
11730
|
items: items,
|
|
11914
11731
|
showMore: showMore,
|
|
@@ -12018,7 +11835,7 @@ var MenuWidget = function MenuWidget(props) {
|
|
|
12018
11835
|
|
|
12019
11836
|
connectMenu(MenuWidget);
|
|
12020
11837
|
|
|
12021
|
-
var cx$
|
|
11838
|
+
var cx$b = createClassNames('MenuSelect');
|
|
12022
11839
|
|
|
12023
11840
|
var MenuSelect =
|
|
12024
11841
|
/*#__PURE__*/
|
|
@@ -12056,26 +11873,26 @@ function (_Component) {
|
|
|
12056
11873
|
translate = _this$props.translate,
|
|
12057
11874
|
className = _this$props.className;
|
|
12058
11875
|
return React__default.createElement("div", {
|
|
12059
|
-
className: classnames(cx$
|
|
11876
|
+
className: classnames(cx$b('', !canRefine && '-noRefinement'), className)
|
|
12060
11877
|
}, React__default.createElement("select", {
|
|
12061
11878
|
value: this.selectedValue,
|
|
12062
11879
|
onChange: this.handleSelectChange,
|
|
12063
|
-
className: cx$
|
|
11880
|
+
className: cx$b('select')
|
|
12064
11881
|
}, React__default.createElement("option", {
|
|
12065
11882
|
value: "ais__see__all__option",
|
|
12066
|
-
className: cx$
|
|
11883
|
+
className: cx$b('option')
|
|
12067
11884
|
}, translate('seeAllOption')), items.map(function (item) {
|
|
12068
11885
|
return React__default.createElement("option", {
|
|
12069
11886
|
key: item.value,
|
|
12070
11887
|
value: item.value,
|
|
12071
|
-
className: cx$
|
|
11888
|
+
className: cx$b('option')
|
|
12072
11889
|
}, item.label, " (", item.count, ")");
|
|
12073
11890
|
})));
|
|
12074
11891
|
}
|
|
12075
11892
|
}, {
|
|
12076
11893
|
key: "selectedValue",
|
|
12077
11894
|
get: function get() {
|
|
12078
|
-
var _ref2 = find(this.props.items, function (item) {
|
|
11895
|
+
var _ref2 = find$2(this.props.items, function (item) {
|
|
12079
11896
|
return item.isRefined === true;
|
|
12080
11897
|
}) || {
|
|
12081
11898
|
value: 'ais__see__all__option'
|
|
@@ -12152,7 +11969,7 @@ var MenuSelectWidget = function MenuSelectWidget(props) {
|
|
|
12152
11969
|
|
|
12153
11970
|
connectMenu(MenuSelectWidget);
|
|
12154
11971
|
|
|
12155
|
-
var cx$
|
|
11972
|
+
var cx$c = createClassNames('NumericMenu');
|
|
12156
11973
|
|
|
12157
11974
|
var NumericMenu =
|
|
12158
11975
|
/*#__PURE__*/
|
|
@@ -12177,9 +11994,9 @@ function (_Component) {
|
|
|
12177
11994
|
refine = _this$props.refine,
|
|
12178
11995
|
translate = _this$props.translate;
|
|
12179
11996
|
return React__default.createElement("label", {
|
|
12180
|
-
className: cx$
|
|
11997
|
+
className: cx$c('label')
|
|
12181
11998
|
}, React__default.createElement("input", {
|
|
12182
|
-
className: cx$
|
|
11999
|
+
className: cx$c('radio'),
|
|
12183
12000
|
type: "radio",
|
|
12184
12001
|
checked: item.isRefined,
|
|
12185
12002
|
disabled: item.noRefinement,
|
|
@@ -12187,7 +12004,7 @@ function (_Component) {
|
|
|
12187
12004
|
return refine(item.value);
|
|
12188
12005
|
}
|
|
12189
12006
|
}), React__default.createElement("span", {
|
|
12190
|
-
className: cx$
|
|
12007
|
+
className: cx$c('labelText')
|
|
12191
12008
|
}, item.value === '' ? translate('all') : item.label));
|
|
12192
12009
|
});
|
|
12193
12010
|
|
|
@@ -12205,7 +12022,7 @@ function (_Component) {
|
|
|
12205
12022
|
renderItem: this.renderItem,
|
|
12206
12023
|
showMore: false,
|
|
12207
12024
|
canRefine: canRefine,
|
|
12208
|
-
cx: cx$
|
|
12025
|
+
cx: cx$c,
|
|
12209
12026
|
items: items.map(function (item) {
|
|
12210
12027
|
return _objectSpread({}, item, {
|
|
12211
12028
|
key: item.value
|
|
@@ -12350,7 +12167,7 @@ _defineProperty(LinkList, "propTypes", {
|
|
|
12350
12167
|
canRefine: PropTypes.bool.isRequired
|
|
12351
12168
|
});
|
|
12352
12169
|
|
|
12353
|
-
var cx$
|
|
12170
|
+
var cx$d = createClassNames('Pagination'); // Determines the size of the widget (the number of pages displayed - that the user can directly click on)
|
|
12354
12171
|
|
|
12355
12172
|
function calculateSize(padding, maxPages) {
|
|
12356
12173
|
return Math.min(2 * padding + 1, maxPages);
|
|
@@ -12386,7 +12203,7 @@ function getPages(currentPage, maxPages, padding) {
|
|
|
12386
12203
|
});
|
|
12387
12204
|
}
|
|
12388
12205
|
|
|
12389
|
-
var Pagination
|
|
12206
|
+
var Pagination =
|
|
12390
12207
|
/*#__PURE__*/
|
|
12391
12208
|
function (_Component) {
|
|
12392
12209
|
_inherits(Pagination, _Component);
|
|
@@ -12493,9 +12310,9 @@ function (_Component) {
|
|
|
12493
12310
|
}
|
|
12494
12311
|
|
|
12495
12312
|
return React__default.createElement("div", {
|
|
12496
|
-
className: classnames(cx$
|
|
12313
|
+
className: classnames(cx$d('', !canRefine && '-noRefinement'), className)
|
|
12497
12314
|
}, React__default.createElement(ListComponent, _extends({}, otherProps, {
|
|
12498
|
-
cx: cx$
|
|
12315
|
+
cx: cx$d,
|
|
12499
12316
|
items: items,
|
|
12500
12317
|
onSelect: refine,
|
|
12501
12318
|
createURL: createURL,
|
|
@@ -12507,7 +12324,7 @@ function (_Component) {
|
|
|
12507
12324
|
return Pagination;
|
|
12508
12325
|
}(Component);
|
|
12509
12326
|
|
|
12510
|
-
_defineProperty(Pagination
|
|
12327
|
+
_defineProperty(Pagination, "propTypes", {
|
|
12511
12328
|
nbPages: PropTypes.number.isRequired,
|
|
12512
12329
|
currentRefinement: PropTypes.number.isRequired,
|
|
12513
12330
|
refine: PropTypes.func.isRequired,
|
|
@@ -12524,7 +12341,7 @@ _defineProperty(Pagination$1, "propTypes", {
|
|
|
12524
12341
|
className: PropTypes.string
|
|
12525
12342
|
});
|
|
12526
12343
|
|
|
12527
|
-
_defineProperty(Pagination
|
|
12344
|
+
_defineProperty(Pagination, "defaultProps", {
|
|
12528
12345
|
listComponent: LinkList,
|
|
12529
12346
|
showFirst: true,
|
|
12530
12347
|
showPrevious: true,
|
|
@@ -12535,7 +12352,7 @@ _defineProperty(Pagination$1, "defaultProps", {
|
|
|
12535
12352
|
className: ''
|
|
12536
12353
|
});
|
|
12537
12354
|
|
|
12538
|
-
var Pagination$
|
|
12355
|
+
var Pagination$1 = translatable({
|
|
12539
12356
|
previous: '‹',
|
|
12540
12357
|
next: '›',
|
|
12541
12358
|
first: '«',
|
|
@@ -12550,7 +12367,7 @@ var Pagination$2 = translatable({
|
|
|
12550
12367
|
ariaPage: function ariaPage(currentRefinement) {
|
|
12551
12368
|
return "Page ".concat(currentRefinement.toString());
|
|
12552
12369
|
}
|
|
12553
|
-
})(Pagination
|
|
12370
|
+
})(Pagination);
|
|
12554
12371
|
|
|
12555
12372
|
/**
|
|
12556
12373
|
* The Pagination widget displays a simple pagination system allowing the user to
|
|
@@ -12607,12 +12424,12 @@ var Pagination$2 = translatable({
|
|
|
12607
12424
|
*/
|
|
12608
12425
|
|
|
12609
12426
|
var PaginationWidget = function PaginationWidget(props) {
|
|
12610
|
-
return React__default.createElement(PanelWrapper, props, React__default.createElement(Pagination$
|
|
12427
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(Pagination$1, props));
|
|
12611
12428
|
};
|
|
12612
12429
|
|
|
12613
|
-
var Pagination = connectPagination(PaginationWidget);
|
|
12430
|
+
var Pagination$2 = connectPagination(PaginationWidget);
|
|
12614
12431
|
|
|
12615
|
-
var cx$
|
|
12432
|
+
var cx$e = createClassNames('PoweredBy');
|
|
12616
12433
|
/* eslint-disable max-len */
|
|
12617
12434
|
|
|
12618
12435
|
var AlgoliaLogo = function AlgoliaLogo() {
|
|
@@ -12622,7 +12439,7 @@ var AlgoliaLogo = function AlgoliaLogo() {
|
|
|
12622
12439
|
viewBox: "0 0 1366 362",
|
|
12623
12440
|
width: "100",
|
|
12624
12441
|
height: "27",
|
|
12625
|
-
className: cx$
|
|
12442
|
+
className: cx$e('logo')
|
|
12626
12443
|
}, React__default.createElement("linearGradient", {
|
|
12627
12444
|
id: "g",
|
|
12628
12445
|
x1: "428.258",
|
|
@@ -12670,13 +12487,13 @@ function (_Component) {
|
|
|
12670
12487
|
translate = _this$props.translate,
|
|
12671
12488
|
className = _this$props.className;
|
|
12672
12489
|
return React__default.createElement("div", {
|
|
12673
|
-
className: classnames(cx$
|
|
12490
|
+
className: classnames(cx$e(''), className)
|
|
12674
12491
|
}, React__default.createElement("span", {
|
|
12675
|
-
className: cx$
|
|
12492
|
+
className: cx$e('text')
|
|
12676
12493
|
}, translate('searchBy')), ' ', React__default.createElement("a", {
|
|
12677
12494
|
href: url,
|
|
12678
12495
|
target: "_blank",
|
|
12679
|
-
className: cx$
|
|
12496
|
+
className: cx$e('link'),
|
|
12680
12497
|
"aria-label": "Algolia",
|
|
12681
12498
|
rel: "noopener noreferrer"
|
|
12682
12499
|
}, React__default.createElement(AlgoliaLogo, null)));
|
|
@@ -12729,7 +12546,7 @@ var PoweredBy$1 = translatable({
|
|
|
12729
12546
|
|
|
12730
12547
|
connectPoweredBy(PoweredBy$1);
|
|
12731
12548
|
|
|
12732
|
-
var cx$
|
|
12549
|
+
var cx$f = createClassNames('RangeInput');
|
|
12733
12550
|
var RawRangeInput =
|
|
12734
12551
|
/*#__PURE__*/
|
|
12735
12552
|
function (_Component) {
|
|
@@ -12809,12 +12626,12 @@ function (_Component) {
|
|
|
12809
12626
|
|
|
12810
12627
|
var step = 1 / Math.pow(10, precision);
|
|
12811
12628
|
return React__default.createElement("div", {
|
|
12812
|
-
className: classnames(cx$
|
|
12629
|
+
className: classnames(cx$f('', !canRefine && '-noRefinement'), className)
|
|
12813
12630
|
}, React__default.createElement("form", {
|
|
12814
|
-
className: cx$
|
|
12631
|
+
className: cx$f('form'),
|
|
12815
12632
|
onSubmit: this.onSubmit
|
|
12816
12633
|
}, React__default.createElement("input", {
|
|
12817
|
-
className: cx$
|
|
12634
|
+
className: cx$f('input', 'input--min'),
|
|
12818
12635
|
type: "number",
|
|
12819
12636
|
min: min,
|
|
12820
12637
|
max: max,
|
|
@@ -12828,9 +12645,9 @@ function (_Component) {
|
|
|
12828
12645
|
});
|
|
12829
12646
|
}
|
|
12830
12647
|
}), React__default.createElement("span", {
|
|
12831
|
-
className: cx$
|
|
12648
|
+
className: cx$f('separator')
|
|
12832
12649
|
}, translate('separator')), React__default.createElement("input", {
|
|
12833
|
-
className: cx$
|
|
12650
|
+
className: cx$f('input', 'input--max'),
|
|
12834
12651
|
type: "number",
|
|
12835
12652
|
min: min,
|
|
12836
12653
|
max: max,
|
|
@@ -12844,7 +12661,7 @@ function (_Component) {
|
|
|
12844
12661
|
});
|
|
12845
12662
|
}
|
|
12846
12663
|
}), React__default.createElement("button", {
|
|
12847
|
-
className: cx$
|
|
12664
|
+
className: cx$f('submit'),
|
|
12848
12665
|
type: "submit"
|
|
12849
12666
|
}, translate('submit'))));
|
|
12850
12667
|
}
|
|
@@ -12925,7 +12742,7 @@ var RangeInputWidget = function RangeInputWidget(props) {
|
|
|
12925
12742
|
|
|
12926
12743
|
connectRange(RangeInputWidget);
|
|
12927
12744
|
|
|
12928
|
-
var cx$
|
|
12745
|
+
var cx$g = createClassNames('RatingMenu');
|
|
12929
12746
|
|
|
12930
12747
|
var RatingMenu =
|
|
12931
12748
|
/*#__PURE__*/
|
|
@@ -12978,12 +12795,12 @@ function (_Component) {
|
|
|
12978
12795
|
|
|
12979
12796
|
icons.push([React__default.createElement("svg", {
|
|
12980
12797
|
key: icon,
|
|
12981
|
-
className: cx$
|
|
12798
|
+
className: cx$g('starIcon', icon >= lowerBound ? 'starIcon--empty' : 'starIcon--full'),
|
|
12982
12799
|
"aria-hidden": "true",
|
|
12983
12800
|
width: "24",
|
|
12984
12801
|
height: "24"
|
|
12985
12802
|
}, React__default.createElement("use", {
|
|
12986
|
-
xlinkHref: "#".concat(cx$
|
|
12803
|
+
xlinkHref: "#".concat(cx$g(icon >= lowerBound ? 'starEmptySymbol' : 'starSymbol'))
|
|
12987
12804
|
})), ' ']);
|
|
12988
12805
|
} // The last item of the list (the default item), should not
|
|
12989
12806
|
// be clickable if it is selected.
|
|
@@ -12999,15 +12816,15 @@ function (_Component) {
|
|
|
12999
12816
|
};
|
|
13000
12817
|
return React__default.createElement("li", {
|
|
13001
12818
|
key: lowerBound,
|
|
13002
|
-
className: cx$
|
|
12819
|
+
className: cx$g('item', selected && 'item--selected', disabled && 'item--disabled')
|
|
13003
12820
|
}, React__default.createElement("a", _extends({
|
|
13004
|
-
className: cx$
|
|
12821
|
+
className: cx$g('link'),
|
|
13005
12822
|
"aria-label": "".concat(rating).concat(translate('ratingLabel'))
|
|
13006
12823
|
}, onClickHandler), icons, React__default.createElement("span", {
|
|
13007
|
-
className: cx$
|
|
12824
|
+
className: cx$g('label'),
|
|
13008
12825
|
"aria-hidden": "true"
|
|
13009
12826
|
}, translate('ratingLabel')), ' ', React__default.createElement("span", {
|
|
13010
|
-
className: cx$
|
|
12827
|
+
className: cx$g('count')
|
|
13011
12828
|
}, count)));
|
|
13012
12829
|
}
|
|
13013
12830
|
}, {
|
|
@@ -13039,7 +12856,7 @@ function (_Component) {
|
|
|
13039
12856
|
start: 0,
|
|
13040
12857
|
end: Math.max(inclusiveLength, 0)
|
|
13041
12858
|
}).map(function (index) {
|
|
13042
|
-
var element = find(values, function (item) {
|
|
12859
|
+
var element = find$2(values, function (item) {
|
|
13043
12860
|
return item.value === limitMax - index;
|
|
13044
12861
|
});
|
|
13045
12862
|
var placeholder = {
|
|
@@ -13063,24 +12880,24 @@ function (_Component) {
|
|
|
13063
12880
|
});
|
|
13064
12881
|
});
|
|
13065
12882
|
return React__default.createElement("div", {
|
|
13066
|
-
className: classnames(cx$
|
|
12883
|
+
className: classnames(cx$g('', !canRefine && '-noRefinement'), className)
|
|
13067
12884
|
}, React__default.createElement("svg", {
|
|
13068
12885
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13069
12886
|
style: {
|
|
13070
12887
|
display: 'none'
|
|
13071
12888
|
}
|
|
13072
12889
|
}, React__default.createElement("symbol", {
|
|
13073
|
-
id: cx$
|
|
12890
|
+
id: cx$g('starSymbol'),
|
|
13074
12891
|
viewBox: "0 0 24 24"
|
|
13075
12892
|
}, React__default.createElement("path", {
|
|
13076
12893
|
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"
|
|
13077
12894
|
})), React__default.createElement("symbol", {
|
|
13078
|
-
id: cx$
|
|
12895
|
+
id: cx$g('starEmptySymbol'),
|
|
13079
12896
|
viewBox: "0 0 24 24"
|
|
13080
12897
|
}, React__default.createElement("path", {
|
|
13081
12898
|
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"
|
|
13082
12899
|
}))), React__default.createElement("ul", {
|
|
13083
|
-
className: cx$
|
|
12900
|
+
className: cx$g('list', !canRefine && 'list--noRefinement')
|
|
13084
12901
|
}, items));
|
|
13085
12902
|
}
|
|
13086
12903
|
}]);
|
|
@@ -13168,7 +12985,7 @@ var RatingMenuWidget = function RatingMenuWidget(props) {
|
|
|
13168
12985
|
|
|
13169
12986
|
connectRange(RatingMenuWidget);
|
|
13170
12987
|
|
|
13171
|
-
var cx$
|
|
12988
|
+
var cx$h = createClassNames('RefinementList');
|
|
13172
12989
|
|
|
13173
12990
|
var RefinementList$1 =
|
|
13174
12991
|
/*#__PURE__*/
|
|
@@ -13199,23 +13016,23 @@ function (_Component) {
|
|
|
13199
13016
|
});
|
|
13200
13017
|
|
|
13201
13018
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
13202
|
-
var label = _this.props.isFromSearch ? React__default.createElement(Highlight, {
|
|
13019
|
+
var label = _this.props.isFromSearch ? React__default.createElement(Highlight$2, {
|
|
13203
13020
|
attribute: "label",
|
|
13204
13021
|
hit: item
|
|
13205
13022
|
}) : item.label;
|
|
13206
13023
|
return React__default.createElement("label", {
|
|
13207
|
-
className: cx$
|
|
13024
|
+
className: cx$h('label')
|
|
13208
13025
|
}, React__default.createElement("input", {
|
|
13209
|
-
className: cx$
|
|
13026
|
+
className: cx$h('checkbox'),
|
|
13210
13027
|
type: "checkbox",
|
|
13211
13028
|
checked: item.isRefined,
|
|
13212
13029
|
onChange: function onChange() {
|
|
13213
13030
|
return _this.selectItem(item, resetQuery);
|
|
13214
13031
|
}
|
|
13215
13032
|
}), React__default.createElement("span", {
|
|
13216
|
-
className: cx$
|
|
13033
|
+
className: cx$h('labelText')
|
|
13217
13034
|
}, label), ' ', React__default.createElement("span", {
|
|
13218
|
-
className: cx$
|
|
13035
|
+
className: cx$h('count')
|
|
13219
13036
|
}, item.count.toLocaleString()));
|
|
13220
13037
|
});
|
|
13221
13038
|
|
|
@@ -13239,7 +13056,7 @@ function (_Component) {
|
|
|
13239
13056
|
return React__default.createElement(List, {
|
|
13240
13057
|
renderItem: this.renderItem,
|
|
13241
13058
|
selectItem: this.selectItem,
|
|
13242
|
-
cx: cx$
|
|
13059
|
+
cx: cx$h,
|
|
13243
13060
|
translate: translate,
|
|
13244
13061
|
items: items,
|
|
13245
13062
|
showMore: showMore,
|
|
@@ -13351,9 +13168,9 @@ var RefinementListWidget = function RefinementListWidget(props) {
|
|
|
13351
13168
|
return React__default.createElement(PanelWrapper, props, React__default.createElement(RefinementList$2, props));
|
|
13352
13169
|
};
|
|
13353
13170
|
|
|
13354
|
-
var RefinementList = connectRefinementList(RefinementListWidget);
|
|
13171
|
+
var RefinementList$3 = connectRefinementList(RefinementListWidget);
|
|
13355
13172
|
|
|
13356
|
-
var cx$
|
|
13173
|
+
var cx$i = createClassNames('ScrollTo');
|
|
13357
13174
|
|
|
13358
13175
|
var ScrollTo =
|
|
13359
13176
|
/*#__PURE__*/
|
|
@@ -13386,7 +13203,7 @@ function (_Component) {
|
|
|
13386
13203
|
ref: function ref(_ref) {
|
|
13387
13204
|
return _this.el = _ref;
|
|
13388
13205
|
},
|
|
13389
|
-
className: cx$
|
|
13206
|
+
className: cx$i('')
|
|
13390
13207
|
}, this.props.children);
|
|
13391
13208
|
}
|
|
13392
13209
|
}]);
|
|
@@ -13480,14 +13297,14 @@ connectScrollTo(ScrollTo);
|
|
|
13480
13297
|
* );
|
|
13481
13298
|
*/
|
|
13482
13299
|
|
|
13483
|
-
var SearchBox = connectSearchBox(SearchBox$
|
|
13300
|
+
var SearchBox$2 = connectSearchBox(SearchBox$1);
|
|
13484
13301
|
|
|
13485
|
-
var cx$
|
|
13302
|
+
var cx$j = createClassNames('Snippet');
|
|
13486
13303
|
|
|
13487
13304
|
var Snippet = function Snippet(props) {
|
|
13488
13305
|
return React__default.createElement(Highlighter, _extends({}, props, {
|
|
13489
13306
|
highlightProperty: "_snippetResult",
|
|
13490
|
-
cx: cx$
|
|
13307
|
+
cx: cx$j
|
|
13491
13308
|
}));
|
|
13492
13309
|
};
|
|
13493
13310
|
|
|
@@ -13537,7 +13354,7 @@ var Snippet = function Snippet(props) {
|
|
|
13537
13354
|
|
|
13538
13355
|
connectHighlight(Snippet);
|
|
13539
13356
|
|
|
13540
|
-
var cx$
|
|
13357
|
+
var cx$k = createClassNames('RelevantSort');
|
|
13541
13358
|
|
|
13542
13359
|
var DefaultButtonTextComponent = function DefaultButtonTextComponent(_ref) {
|
|
13543
13360
|
var isRelevantSorted = _ref.isRelevantSorted;
|
|
@@ -13554,13 +13371,13 @@ var RelevantSort = function RelevantSort(_ref2) {
|
|
|
13554
13371
|
TextComponent = _ref2.textComponent,
|
|
13555
13372
|
refine = _ref2.refine;
|
|
13556
13373
|
return !isVirtualReplica ? null : React__default.createElement("div", {
|
|
13557
|
-
className: classnames(cx$
|
|
13374
|
+
className: classnames(cx$k(''), className)
|
|
13558
13375
|
}, React__default.createElement("div", {
|
|
13559
|
-
className: cx$
|
|
13376
|
+
className: cx$k('text')
|
|
13560
13377
|
}, TextComponent && React__default.createElement(TextComponent, {
|
|
13561
13378
|
isRelevantSorted: isRelevantSorted
|
|
13562
13379
|
})), React__default.createElement("button", {
|
|
13563
|
-
className: cx$
|
|
13380
|
+
className: cx$k('button'),
|
|
13564
13381
|
onClick: function onClick() {
|
|
13565
13382
|
return refine(isRelevantSorted ? 0 : undefined);
|
|
13566
13383
|
}
|
|
@@ -13580,7 +13397,7 @@ RelevantSort.propTypes = {
|
|
|
13580
13397
|
|
|
13581
13398
|
connectRelevantSort(RelevantSort);
|
|
13582
13399
|
|
|
13583
|
-
var cx$
|
|
13400
|
+
var cx$l = createClassNames('SortBy');
|
|
13584
13401
|
|
|
13585
13402
|
var SortBy =
|
|
13586
13403
|
/*#__PURE__*/
|
|
@@ -13602,9 +13419,9 @@ function (_Component) {
|
|
|
13602
13419
|
refine = _this$props.refine,
|
|
13603
13420
|
className = _this$props.className;
|
|
13604
13421
|
return React__default.createElement("div", {
|
|
13605
|
-
className: classnames(cx$
|
|
13422
|
+
className: classnames(cx$l(''), className)
|
|
13606
13423
|
}, React__default.createElement(Select, {
|
|
13607
|
-
cx: cx$
|
|
13424
|
+
cx: cx$l,
|
|
13608
13425
|
items: items,
|
|
13609
13426
|
selectedItem: currentRefinement,
|
|
13610
13427
|
onSelect: refine
|
|
@@ -13670,7 +13487,7 @@ _defineProperty(SortBy, "defaultProps", {
|
|
|
13670
13487
|
|
|
13671
13488
|
connectSortBy(SortBy);
|
|
13672
13489
|
|
|
13673
|
-
var cx$
|
|
13490
|
+
var cx$m = createClassNames('Stats');
|
|
13674
13491
|
|
|
13675
13492
|
var Stats = function Stats(_ref) {
|
|
13676
13493
|
var _ref$className = _ref.className,
|
|
@@ -13681,9 +13498,9 @@ var Stats = function Stats(_ref) {
|
|
|
13681
13498
|
processingTimeMS = _ref.processingTimeMS,
|
|
13682
13499
|
translate = _ref.translate;
|
|
13683
13500
|
return React__default.createElement("div", {
|
|
13684
|
-
className: classnames(cx$
|
|
13501
|
+
className: classnames(cx$m(''), className)
|
|
13685
13502
|
}, React__default.createElement("span", {
|
|
13686
|
-
className: cx$
|
|
13503
|
+
className: cx$m('text')
|
|
13687
13504
|
}, translate('stats', nbHits, processingTimeMS, nbSortedHits, areHitsSorted)));
|
|
13688
13505
|
};
|
|
13689
13506
|
|
|
@@ -13731,7 +13548,7 @@ var Stats$1 = translatable({
|
|
|
13731
13548
|
|
|
13732
13549
|
connectStats(Stats$1);
|
|
13733
13550
|
|
|
13734
|
-
var cx$
|
|
13551
|
+
var cx$n = createClassNames('ToggleRefinement');
|
|
13735
13552
|
|
|
13736
13553
|
var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
13737
13554
|
var currentRefinement = _ref.currentRefinement,
|
|
@@ -13740,18 +13557,18 @@ var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
|
13740
13557
|
refine = _ref.refine,
|
|
13741
13558
|
className = _ref.className;
|
|
13742
13559
|
return React__default.createElement("div", {
|
|
13743
|
-
className: classnames(cx$
|
|
13560
|
+
className: classnames(cx$n('', !canRefine && '-noRefinement'), className)
|
|
13744
13561
|
}, React__default.createElement("label", {
|
|
13745
|
-
className: cx$
|
|
13562
|
+
className: cx$n('label')
|
|
13746
13563
|
}, React__default.createElement("input", {
|
|
13747
|
-
className: cx$
|
|
13564
|
+
className: cx$n('checkbox'),
|
|
13748
13565
|
type: "checkbox",
|
|
13749
13566
|
checked: currentRefinement,
|
|
13750
13567
|
onChange: function onChange(event) {
|
|
13751
13568
|
return refine(event.target.checked);
|
|
13752
13569
|
}
|
|
13753
13570
|
}), React__default.createElement("span", {
|
|
13754
|
-
className: cx$
|
|
13571
|
+
className: cx$n('labelText')
|
|
13755
13572
|
}, label)));
|
|
13756
13573
|
};
|
|
13757
13574
|
|
|
@@ -13960,7 +13777,7 @@ function createVoiceSearchHelper(_ref) {
|
|
|
13960
13777
|
};
|
|
13961
13778
|
}
|
|
13962
13779
|
|
|
13963
|
-
var cx$
|
|
13780
|
+
var cx$o = createClassNames('VoiceSearch');
|
|
13964
13781
|
|
|
13965
13782
|
var ButtonSvg = function ButtonSvg(_ref) {
|
|
13966
13783
|
var children = _ref.children;
|
|
@@ -14106,15 +13923,15 @@ function (_Component) {
|
|
|
14106
13923
|
isBrowserSupported: isBrowserSupported()
|
|
14107
13924
|
};
|
|
14108
13925
|
return React__default.createElement("div", {
|
|
14109
|
-
className: cx$
|
|
13926
|
+
className: cx$o('')
|
|
14110
13927
|
}, React__default.createElement("button", {
|
|
14111
|
-
className: cx$
|
|
13928
|
+
className: cx$o('button'),
|
|
14112
13929
|
type: "button",
|
|
14113
13930
|
title: isBrowserSupported() ? translate('buttonTitle') : translate('disabledButtonTitle'),
|
|
14114
13931
|
onClick: this.onClick,
|
|
14115
13932
|
disabled: !isBrowserSupported()
|
|
14116
13933
|
}, React__default.createElement(ButtonTextComponent, innerProps)), React__default.createElement("div", {
|
|
14117
|
-
className: cx$
|
|
13934
|
+
className: cx$o('status')
|
|
14118
13935
|
}, React__default.createElement(StatusComponent, innerProps)));
|
|
14119
13936
|
}
|
|
14120
13937
|
}, {
|
|
@@ -14142,14 +13959,14 @@ var VoiceSearch$1 = translatable({
|
|
|
14142
13959
|
|
|
14143
13960
|
connectVoiceSearch(VoiceSearch$1);
|
|
14144
13961
|
|
|
14145
|
-
var cx = createClassNames('QueryRuleCustomData');
|
|
13962
|
+
var cx$p = createClassNames('QueryRuleCustomData');
|
|
14146
13963
|
|
|
14147
13964
|
var QueryRuleCustomData = function QueryRuleCustomData(_ref) {
|
|
14148
13965
|
var items = _ref.items,
|
|
14149
13966
|
className = _ref.className,
|
|
14150
13967
|
children = _ref.children;
|
|
14151
13968
|
return React__default.createElement("div", {
|
|
14152
|
-
className: classnames(cx(''), className)
|
|
13969
|
+
className: classnames(cx$p(''), className)
|
|
14153
13970
|
}, children({
|
|
14154
13971
|
items: items
|
|
14155
13972
|
}));
|
|
@@ -14202,7 +14019,7 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14202
14019
|
LazyLoad,
|
|
14203
14020
|
{ once: true },
|
|
14204
14021
|
React__default.createElement('img', {
|
|
14205
|
-
src: hit.thumbnail && hit.thumbnail.asset ? urlFor({ client: client, source: hit.thumbnail }) : hit.thumbnail && _typeof$
|
|
14022
|
+
src: hit.thumbnail && hit.thumbnail.asset ? urlFor({ client: client, source: hit.thumbnail }) : hit.thumbnail && _typeof$1(hit.thumbnail === 'string') ? hit.thumbnail : this.props.defaultImage
|
|
14206
14023
|
})
|
|
14207
14024
|
)
|
|
14208
14025
|
)
|
|
@@ -14264,7 +14081,7 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14264
14081
|
onSearchParameters: this.props.onSearchParameters
|
|
14265
14082
|
}, this.props),
|
|
14266
14083
|
React__default.createElement(Configure, { hitsPerPage: this.props.hitsPerPage || 20 }),
|
|
14267
|
-
React__default.createElement(SearchBox, null),
|
|
14084
|
+
React__default.createElement(SearchBox$2, null),
|
|
14268
14085
|
this.props.refinementAttributes && React__default.createElement(
|
|
14269
14086
|
'div',
|
|
14270
14087
|
{ className: 'search_refinement' },
|
|
@@ -14272,18 +14089,18 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14272
14089
|
return React__default.createElement(
|
|
14273
14090
|
DropdownButton,
|
|
14274
14091
|
{ title: item.title },
|
|
14275
|
-
React__default.createElement(RefinementList, { showMore: item.showMore, limit: item.limit, showMoreLimit: item.showMoreLimit, attribute: item.attribute })
|
|
14092
|
+
React__default.createElement(RefinementList$3, { showMore: item.showMore, limit: item.limit, showMoreLimit: item.showMoreLimit, attribute: item.attribute })
|
|
14276
14093
|
);
|
|
14277
14094
|
})
|
|
14278
14095
|
),
|
|
14279
14096
|
React__default.createElement(
|
|
14280
14097
|
'div',
|
|
14281
14098
|
{ className: 'AlgoliaResults' },
|
|
14282
|
-
React__default.createElement(Hits, { hitComponent: function hitComponent(hit) {
|
|
14099
|
+
React__default.createElement(Hits$1, { hitComponent: function hitComponent(hit) {
|
|
14283
14100
|
return _this2.Deck(_extends$1({}, hit, { propsObj: propsObj }));
|
|
14284
14101
|
} })
|
|
14285
14102
|
),
|
|
14286
|
-
React__default.createElement(Pagination, null)
|
|
14103
|
+
React__default.createElement(Pagination$2, null)
|
|
14287
14104
|
),
|
|
14288
14105
|
React__default.createElement(
|
|
14289
14106
|
'style',
|