@mjhls/mjh-framework 1.0.880-beta.0 → 1.0.880
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 +10 -9
- package/dist/cjs/AD300x250.js +29 -28
- package/dist/cjs/AD300x250x600.js +29 -28
- package/dist/cjs/AD728x90.js +32 -31
- package/dist/cjs/ADFloatingFooter.js +31 -30
- package/dist/cjs/ADFooter.js +13 -12
- package/dist/cjs/ADGutter.js +31 -30
- package/dist/cjs/{ADInfeed-2e48af77.js → ADInfeed-9a2e923a.js} +15 -13
- package/dist/cjs/ADSkyscraper.js +31 -30
- package/dist/cjs/ADSponsoredResources.js +31 -30
- package/dist/cjs/ADWebcast.js +31 -30
- package/dist/cjs/ADWelcome.js +32 -31
- package/dist/cjs/{ADlgInfeed-c39c7131.js → ADlgInfeed-957a1996.js} +11 -10
- package/dist/cjs/AccordionPanel.js +29 -27
- package/dist/cjs/AdSlot.js +32 -31
- package/dist/cjs/AdSlotsProvider.js +18 -909
- package/dist/cjs/AlgoliaSearch.js +1391 -1272
- package/dist/cjs/AlphabeticList.js +24 -23
- package/dist/cjs/ArticleCarousel.js +21 -19
- package/dist/cjs/ArticleProgramLandingPage.js +61 -59
- package/dist/cjs/ArticleSeriesLandingPage.js +44 -38
- package/dist/cjs/ArticleSeriesListing.js +60 -58
- package/dist/cjs/Auth.js +680 -1504
- package/dist/cjs/AuthWrapper.js +309 -267
- package/dist/cjs/{AuthorComponent-02e827ae.js → AuthorComponent-39b37d84.js} +14 -13
- package/dist/cjs/Beam.js +6 -6
- package/dist/cjs/{BlockContent-9c6b07ad.js → BlockContent-36e54d77.js} +56 -55
- package/dist/cjs/Breadcrumbs.js +27 -25
- package/dist/cjs/CMEDeck.js +81 -81
- package/dist/cjs/Column1.js +14 -11
- package/dist/cjs/Column2.js +34 -31
- package/dist/cjs/Column3.js +60 -57
- package/dist/cjs/ConferenceArticleCard.js +43 -41
- package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
- package/dist/cjs/DeckContent.js +105 -100
- package/dist/cjs/DeckQueue.js +91 -86
- package/dist/cjs/{Dfp-14d2455c.js → Dfp-9be904d5.js} +33 -32
- package/dist/cjs/EventsDeck.js +157 -150
- package/dist/cjs/ExternalResources.js +80 -78
- package/dist/cjs/Feature.js +31 -28
- package/dist/cjs/ForbesHero.js +43 -41
- package/dist/cjs/GridContent.js +237 -231
- package/dist/cjs/GridHero.js +45 -43
- package/dist/cjs/GroupDeck.js +60 -58
- package/dist/cjs/HamMagazine.js +143 -138
- package/dist/cjs/Header.js +14 -12
- package/dist/cjs/Hero.js +16 -14
- package/dist/cjs/HighlightenVideo.js +18 -17
- package/dist/cjs/HorizontalArticleListing.js +72 -70
- package/dist/cjs/HorizontalHero.js +30 -28
- package/dist/cjs/IssueContentDeck.js +77 -71
- package/dist/cjs/IssueDeck.js +76 -70
- package/dist/cjs/IssueLanding.js +94 -91
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/LeftNav.js +39 -37
- package/dist/cjs/MasterDeck.js +355 -227
- package/dist/cjs/MediaSeriesLanding.js +1118 -1126
- package/dist/cjs/NavDvm.js +77 -72
- package/dist/cjs/{NavFooter-76c913e3.js → NavFooter-3dcd99a8.js} +15 -14
- package/dist/cjs/NavMagazine.js +150 -145
- package/dist/cjs/NavNative.js +145 -137
- package/dist/cjs/OncliveHero.js +24 -23
- package/dist/cjs/OncliveLargeHero.js +75 -73
- package/dist/cjs/PageFilter.js +13 -12
- package/dist/cjs/PartnerDetailListing.js +119 -3917
- package/dist/cjs/PdfDownload.js +9 -8
- package/dist/cjs/PopUpModal.js +19 -17
- package/dist/cjs/PubSection.js +41 -38
- package/dist/cjs/PubToc.js +14 -13
- package/dist/cjs/PublicationDeck.js +71 -65
- package/dist/cjs/PublicationLanding.js +137 -133
- package/dist/cjs/QueueDeckExpanded.js +1173 -1001
- package/dist/cjs/RecentNews.js +22 -21
- package/dist/cjs/RelatedContent.js +59 -57
- package/dist/cjs/RelatedTopicsDropdown.js +32 -29
- package/dist/cjs/RolesDeck.js +32 -27
- package/dist/cjs/Search.js +20 -16
- package/dist/cjs/Segment.js +4 -4
- package/dist/cjs/SeriesListingDeck.js +37 -36
- package/dist/cjs/{SeriesSlider-ec146338.js → SeriesSlider-ce3261cb.js} +41 -40
- package/dist/cjs/SetCookie.js +1 -1
- package/dist/cjs/SideFooter.js +37 -36
- package/dist/cjs/SocialIcons.js +10 -9
- package/dist/cjs/{SocialSearchComponent-e8477ca3.js → SocialSearchComponent-5ec44406.js} +40 -36
- package/dist/cjs/SocialShare.js +31 -29
- package/dist/cjs/TaxonomyCard.js +67 -61
- package/dist/cjs/TaxonomyDescription.js +55 -53
- package/dist/cjs/TemplateNormal.js +73 -72
- package/dist/cjs/ThumbnailCard.js +26 -23
- package/dist/cjs/Ustream.js +28 -27
- package/dist/cjs/VerticalHero.js +22 -20
- package/dist/cjs/VideoProgramLandingPage.js +78 -73
- package/dist/cjs/VideoSeriesCard.js +34 -32
- package/dist/cjs/VideoSeriesFilter.js +16 -16
- package/dist/cjs/VideoSeriesLandingPage.js +52 -48
- package/dist/cjs/VideoSeriesListing.js +77 -75
- package/dist/cjs/View.js +275 -271
- package/dist/cjs/YahooHero.js +42 -40
- package/dist/cjs/YoutubeGroup.js +68 -66
- package/dist/cjs/{_is-array-aa52fa1e.js → _is-array-54228b29.js} +6 -6
- package/dist/cjs/{_iter-detect-05795553.js → _iter-detect-b1df62f0.js} +7 -7
- package/dist/cjs/{_object-pie-68c5bcbc.js → _object-pie-083f2dd6.js} +4 -4
- package/dist/cjs/{_object-sap-171b9ea5.js → _object-sap-d1978572.js} +1 -1
- package/dist/cjs/{_object-to-array-9bac8737.js → _object-to-array-ce86cae7.js} +2 -2
- package/dist/cjs/{asyncToGenerator-df19209d.js → asyncToGenerator-77821af0.js} +30 -30
- package/dist/cjs/{brightcove-react-player-loader.es-156bd4d6.js → brightcove-react-player-loader.es-a195642e.js} +11 -9
- package/dist/cjs/{core.get-iterator-method-f3c44602.js → core.get-iterator-method-5643aa10.js} +35 -35
- package/dist/cjs/{debounce-529c8d06.js → debounce-d4a2369b.js} +2 -2
- package/dist/cjs/{define-property-21887c62.js → define-property-e8404b64.js} +6 -6
- package/dist/cjs/{defineProperty-77a37684.js → defineProperty-9673846a.js} +1 -1
- package/dist/cjs/{entities-310b46ee.js → entities-3f9d0f2f.js} +1 -1
- package/dist/cjs/{eq-bb2843ed.js → eq-5fc26c07.js} +1 -1
- package/dist/cjs/{extends-eed4f016.js → extends-7c86182f.js} +7 -7
- package/dist/cjs/faundadb.js +19 -19
- package/dist/cjs/{get-adbb11e3.js → get-5839e5b5.js} +21 -21
- package/dist/cjs/getRelatedArticle.js +18 -18
- package/dist/cjs/getRootDocGroup.js +6 -6
- package/dist/cjs/getSerializers.js +43 -42
- package/dist/cjs/{getTargeting-8874437b.js → getTargeting-9d509319.js} +12 -12
- package/dist/cjs/getTargeting.js +6 -6
- package/dist/cjs/iconBase-68959171.js +0 -3
- package/dist/cjs/{index-17c6af5a.js → index-22bdde81.js} +1093 -1067
- package/dist/cjs/{index-e2e62963.js → index-8041a4eb.js} +11 -1
- package/dist/cjs/{index-96b3db50.js → index-eadd5035.js} +17 -15
- package/dist/cjs/{urlFor-3a61226f.js → index-efca863c.js} +37 -88
- package/dist/cjs/{index-3294d3bc.js → index-f86bb269.js} +44 -45
- package/dist/cjs/{index-98e01cb9.js → index-fc2f1ca2.js} +13 -12
- package/dist/cjs/{index.es-9110add6.js → index.es-f3e47207.js} +31 -12
- package/dist/cjs/{index.esm-ff47db6f.js → index.esm-05850a2f.js} +5 -12
- package/dist/cjs/{index.esm-e32d3e8e.js → index.esm-44f3e2d0.js} +3 -6
- package/dist/cjs/{index.esm-4d410430.js → index.esm-8123cf40.js} +20 -20
- package/dist/cjs/{index.esm-90433435.js → index.esm-974f47d9.js} +6 -15
- package/dist/cjs/index.js +170 -164
- package/dist/cjs/{inherits-cba9c846.js → inherits-de66ea16.js} +19 -19
- package/dist/cjs/{isSymbol-04666465.js → isSymbol-03abbdf0.js} +15 -15
- package/dist/cjs/{keys-d207942e.js → keys-e982b3fa.js} +6 -6
- package/dist/cjs/{lodash-fc2922d0.js → lodash-f0783643.js} +128 -31
- package/dist/cjs/main-025fdc78.js +973 -0
- package/dist/cjs/{md5-5039b1a6.js → md5-e1ca5797.js} +1 -1
- package/dist/cjs/{moment-575fe24c.js → moment-aca40de1.js} +11 -9
- package/dist/cjs/{react-social-icons-f7f48f71.js → react-social-icons-af932527.js} +28 -27
- package/dist/cjs/{slicedToArray-f6d4eaa8.js → slicedToArray-067dd3bc.js} +12 -12
- package/dist/cjs/{smoothscroll-5054361f.js → smoothscroll-99df7f93.js} +1 -1
- package/dist/cjs/{stringify-bbc68047.js → stringify-f7a37a8d.js} +5 -5
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-c9b8a0d0.js → toConsumableArray-d7797c2b.js} +7 -7
- package/dist/cjs/{toNumber-36d1e7e5.js → toNumber-5e1fac58.js} +40 -5
- package/dist/cjs/{typeof-5f52cf64.js → typeof-567e31ff.js} +35 -35
- package/dist/cjs/urlFor.js +59 -5
- package/dist/cjs/{ustream-api-9ebe112f.js → ustream-api-3819e4aa.js} +4 -4
- package/dist/cjs/{util-f2c1b65b.js → util-6f784d85.js} +1 -1
- package/dist/cjs/{visibility-sensor-ad5e3116.js → visibility-sensor-eb2c5b69.js} +7 -5
- package/dist/cjs/{web.dom.iterable-e34bf324.js → web.dom.iterable-d98303e0.js} +2 -2
- package/dist/esm/AD.js +7 -7
- package/dist/esm/AD300x250.js +25 -25
- package/dist/esm/AD300x250x600.js +25 -25
- package/dist/esm/AD728x90.js +28 -28
- package/dist/esm/ADFloatingFooter.js +27 -27
- package/dist/esm/ADFooter.js +9 -9
- package/dist/esm/ADGutter.js +27 -27
- package/dist/esm/{ADInfeed-0c13c803.js → ADInfeed-8c5f8c58.js} +11 -11
- package/dist/esm/ADSkyscraper.js +27 -27
- package/dist/esm/ADSponsoredResources.js +27 -27
- package/dist/esm/ADWebcast.js +27 -27
- package/dist/esm/ADWelcome.js +28 -28
- package/dist/esm/{ADlgInfeed-e4e2031a.js → ADlgInfeed-2316e091.js} +8 -8
- package/dist/esm/AccordionPanel.js +22 -22
- package/dist/esm/AdSlot.js +23 -23
- package/dist/esm/AdSlotsProvider.js +15 -907
- package/dist/esm/AlgoliaSearch.js +820 -702
- package/dist/esm/AlphabeticList.js +20 -20
- package/dist/esm/ArticleCarousel.js +17 -16
- package/dist/esm/ArticleProgramLandingPage.js +54 -53
- package/dist/esm/ArticleSeriesLandingPage.js +38 -33
- package/dist/esm/ArticleSeriesListing.js +55 -54
- package/dist/esm/Auth.js +659 -1487
- package/dist/esm/AuthWrapper.js +306 -265
- package/dist/esm/{AuthorComponent-e6f95c2f.js → AuthorComponent-46a745ba.js} +11 -11
- package/dist/esm/Beam.js +6 -6
- package/dist/esm/{BlockContent-f4515898.js → BlockContent-52cf21c5.js} +35 -35
- package/dist/esm/Breadcrumbs.js +15 -15
- package/dist/esm/CMEDeck.js +77 -77
- package/dist/esm/Column1.js +9 -9
- package/dist/esm/Column2.js +28 -28
- package/dist/esm/Column3.js +54 -54
- package/dist/esm/ConferenceArticleCard.js +38 -37
- package/dist/esm/{ConferenceBanner-8792ebd2.js → ConferenceBanner-9162d0ca.js} +4 -4
- package/dist/esm/DeckContent.js +96 -95
- package/dist/esm/DeckQueue.js +82 -81
- package/dist/esm/{Dfp-f867d061.js → Dfp-4ca12f2e.js} +20 -20
- package/dist/esm/EventsDeck.js +129 -129
- package/dist/esm/ExternalResources.js +73 -72
- package/dist/esm/Feature.js +22 -21
- package/dist/esm/ForbesHero.js +33 -32
- package/dist/esm/GridContent.js +199 -198
- package/dist/esm/GridHero.js +35 -34
- package/dist/esm/GroupDeck.js +45 -44
- package/dist/esm/HamMagazine.js +114 -114
- package/dist/esm/Header.js +8 -8
- package/dist/esm/Hero.js +13 -12
- package/dist/esm/HighlightenVideo.js +14 -14
- package/dist/esm/HorizontalArticleListing.js +68 -67
- package/dist/esm/HorizontalHero.js +25 -24
- package/dist/esm/IssueContentDeck.js +59 -58
- package/dist/esm/IssueDeck.js +63 -62
- package/dist/esm/IssueLanding.js +90 -88
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/LeftNav.js +33 -33
- package/dist/esm/MasterDeck.js +350 -223
- package/dist/esm/MediaSeriesLanding.js +839 -850
- package/dist/esm/NavDvm.js +57 -57
- package/dist/esm/{NavFooter-e27bd93b.js → NavFooter-c29526b7.js} +12 -12
- package/dist/esm/NavMagazine.js +124 -124
- package/dist/esm/NavNative.js +114 -114
- package/dist/esm/OncliveHero.js +20 -20
- package/dist/esm/OncliveLargeHero.js +58 -57
- package/dist/esm/PageFilter.js +10 -10
- package/dist/esm/PartnerDetailListing.js +112 -3910
- package/dist/esm/PdfDownload.js +6 -6
- package/dist/esm/PopUpModal.js +12 -12
- package/dist/esm/PubSection.js +37 -35
- package/dist/esm/PubToc.js +10 -10
- package/dist/esm/PublicationDeck.js +56 -55
- package/dist/esm/PublicationLanding.js +120 -120
- package/dist/esm/QueueDeckExpanded.js +1166 -994
- package/dist/esm/RecentNews.js +19 -19
- package/dist/esm/RelatedContent.js +51 -50
- package/dist/esm/RelatedTopicsDropdown.js +21 -21
- package/dist/esm/RolesDeck.js +25 -25
- package/dist/esm/Search.js +11 -11
- package/dist/esm/Segment.js +4 -4
- package/dist/esm/SeriesListingDeck.js +31 -30
- package/dist/esm/{SeriesSlider-d6561e33.js → SeriesSlider-7a6c45ce.js} +31 -31
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +32 -32
- package/dist/esm/SocialIcons.js +7 -7
- package/dist/esm/{SocialSearchComponent-b5be0e6c.js → SocialSearchComponent-bdecba55.js} +30 -30
- package/dist/esm/SocialShare.js +25 -25
- package/dist/esm/TaxonomyCard.js +56 -55
- package/dist/esm/TaxonomyDescription.js +49 -48
- package/dist/esm/TemplateNormal.js +68 -68
- package/dist/esm/ThumbnailCard.js +17 -16
- package/dist/esm/Ustream.js +24 -24
- package/dist/esm/VerticalHero.js +17 -16
- package/dist/esm/VideoProgramLandingPage.js +65 -64
- package/dist/esm/VideoSeriesCard.js +26 -25
- package/dist/esm/VideoSeriesFilter.js +13 -13
- package/dist/esm/VideoSeriesLandingPage.js +42 -39
- package/dist/esm/VideoSeriesListing.js +72 -71
- package/dist/esm/View.js +246 -246
- package/dist/esm/YahooHero.js +33 -32
- package/dist/esm/YoutubeGroup.js +52 -51
- package/dist/esm/{_is-array-4df618a6.js → _is-array-893ab020.js} +6 -6
- package/dist/esm/{_iter-detect-130ee549.js → _iter-detect-f089461c.js} +7 -7
- package/dist/esm/{_object-pie-33c40e79.js → _object-pie-133f504a.js} +4 -4
- package/dist/esm/{_object-sap-8b8ea5a9.js → _object-sap-169d6272.js} +1 -1
- package/dist/esm/{_object-to-array-c54dd835.js → _object-to-array-50a6b9a3.js} +2 -2
- package/dist/esm/{asyncToGenerator-64812e90.js → asyncToGenerator-b4dfe691.js} +31 -31
- package/dist/esm/{brightcove-react-player-loader.es-83f53e4e.js → brightcove-react-player-loader.es-b43c695a.js} +7 -6
- package/dist/esm/{core.get-iterator-method-86d4db69.js → core.get-iterator-method-e903ff31.js} +36 -36
- package/dist/esm/{debounce-9207d8ee.js → debounce-533d9748.js} +2 -2
- package/dist/esm/{define-property-6d26cb48.js → define-property-99e66838.js} +6 -6
- package/dist/esm/{defineProperty-d7d9b577.js → defineProperty-8fa0bc8d.js} +1 -1
- package/dist/esm/{entities-7cc3bf45.js → entities-932b50cf.js} +1 -1
- package/dist/esm/{eq-b470f743.js → eq-bdcbf886.js} +1 -1
- package/dist/esm/{extends-5b1796d4.js → extends-dc6a71fd.js} +7 -7
- package/dist/esm/faundadb.js +5 -5
- package/dist/esm/{get-1e515072.js → get-3c308da4.js} +21 -21
- package/dist/esm/getRelatedArticle.js +12 -12
- package/dist/esm/getRootDocGroup.js +4 -4
- package/dist/esm/getSerializers.js +43 -42
- package/dist/esm/{getTargeting-277c801e.js → getTargeting-ff2c9409.js} +11 -11
- package/dist/esm/getTargeting.js +6 -6
- package/dist/esm/{urlFor-23b2244b.js → index-0dbff1d1.js} +37 -88
- package/dist/esm/{index-41a678ea.js → index-2446af28.js} +6 -6
- package/dist/esm/{index-5f7e79e7.js → index-35bdcc81.js} +10 -10
- package/dist/esm/{index-aaa2dae0.js → index-67e1773f.js} +11 -2
- package/dist/esm/{index-ef6d5dcf.js → index-79cfd25c.js} +44 -45
- package/dist/esm/{index-a35a5c39.js → index-c9bfc91f.js} +1017 -1001
- package/dist/esm/{index.es-29c1cef5.js → index.es-c6222053.js} +28 -10
- package/dist/esm/{index.esm-29e48d38.js → index.esm-3fdda599.js} +6 -15
- package/dist/esm/{index.esm-fd746768.js → index.esm-8016b507.js} +17 -18
- package/dist/esm/{index.esm-cf08bf18.js → index.esm-a8ff922c.js} +5 -12
- package/dist/esm/{index.esm-f8aaeeeb.js → index.esm-c6715e80.js} +3 -6
- package/dist/esm/index.js +140 -137
- package/dist/esm/{inherits-2409637d.js → inherits-8a801a18.js} +18 -18
- package/dist/esm/{isSymbol-1981418f.js → isSymbol-a7e9aafe.js} +15 -15
- package/dist/esm/{keys-69989821.js → keys-425c8ab0.js} +6 -6
- package/dist/esm/{lodash-17fdfebb.js → lodash-f97fd99a.js} +128 -31
- package/dist/esm/main-4136096f.js +961 -0
- package/dist/esm/{md5-9be0e905.js → md5-4e42248e.js} +1 -1
- package/dist/esm/{moment-e2f9b20c.js → moment-bc12cb97.js} +11 -9
- package/dist/esm/{react-social-icons-a7d5c5c7.js → react-social-icons-91f9716f.js} +20 -20
- package/dist/esm/{slicedToArray-67a08c9c.js → slicedToArray-ca2c8b8d.js} +12 -12
- package/dist/esm/{smoothscroll-0cd4c7a6.js → smoothscroll-fa4e3f8c.js} +1 -1
- package/dist/esm/stringify-c21932b3.js +15 -0
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/{toConsumableArray-32282905.js → toConsumableArray-7b1c0e23.js} +7 -7
- package/dist/esm/{toNumber-2f7a84cd.js → toNumber-5aeba6e7.js} +40 -5
- package/dist/esm/{typeof-c05a82ba.js → typeof-83d9eb10.js} +35 -35
- package/dist/esm/urlFor.js +62 -4
- package/dist/esm/{ustream-api-4c4fe0ba.js → ustream-api-41166338.js} +4 -4
- package/dist/esm/{util-7700fc59.js → util-3ab476bf.js} +1 -1
- package/dist/esm/{visibility-sensor-72fd8f8b.js → visibility-sensor-f40c2564.js} +2 -2
- package/dist/esm/{web.dom.iterable-f8f967cd.js → web.dom.iterable-fdf034f5.js} +2 -2
- package/package.json +111 -112
- package/dist/cjs/ConferenceBanner-4a16fddc.js +0 -23
- package/dist/cjs/Pagination-9cb60fba.js +0 -61
- package/dist/cjs/inherits-8d29278d.js +0 -110
- package/dist/cjs/main-02daeefe.js +0 -862
- package/dist/esm/Pagination-256b60e5.js +0 -56
- package/dist/esm/inherits-77d5e4fc.js +0 -101
- package/dist/esm/main-c0612122.js +0 -851
- package/dist/esm/stringify-70b72959.js +0 -15
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import './
|
|
2
|
-
import './
|
|
3
|
-
import './
|
|
4
|
-
import '
|
|
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';
|
|
1
|
+
import { _ as _extends$1 } from './extends-dc6a71fd.js';
|
|
2
|
+
import { _ as _typeof$2 } from './typeof-83d9eb10.js';
|
|
3
|
+
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-8a801a18.js';
|
|
4
|
+
import React, { createContext, Component, Children, version as version$2 } from 'react';
|
|
14
5
|
import PropTypes from 'prop-types';
|
|
15
|
-
import {
|
|
16
|
-
import '
|
|
17
|
-
import './
|
|
18
|
-
import { u as urlFor } from './urlFor-23b2244b.js';
|
|
19
|
-
import { L as LazyLoad } from './index-5f7e79e7.js';
|
|
6
|
+
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
7
|
+
import { _ as _objectWithoutPropertiesLoose$1, a as _setPrototypeOf, b as _extends, c as classnames } from './index-67e1773f.js';
|
|
8
|
+
import { E as EventEmitter } from './events-6c3a7a63.js';
|
|
20
9
|
import { DropdownButton } from 'react-bootstrap';
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
10
|
+
import urlFor from './urlFor.js';
|
|
11
|
+
import { m as moment } from './moment-bc12cb97.js';
|
|
12
|
+
import { L as LazyLoad } from './index-35bdcc81.js';
|
|
13
|
+
import './core.get-iterator-method-e903ff31.js';
|
|
14
|
+
import './_object-pie-133f504a.js';
|
|
15
|
+
import './web.dom.iterable-fdf034f5.js';
|
|
16
|
+
import './_is-array-893ab020.js';
|
|
17
|
+
import './_library-528f1934.js';
|
|
18
|
+
import './_object-sap-169d6272.js';
|
|
19
|
+
import './define-property-99e66838.js';
|
|
20
|
+
import './slicedToArray-ca2c8b8d.js';
|
|
21
|
+
import './index-0dbff1d1.js';
|
|
22
|
+
import 'react-dom';
|
|
23
23
|
|
|
24
24
|
function _objectWithoutProperties(source, excluded) {
|
|
25
25
|
if (source == null) return {};
|
|
@@ -40,9 +40,24 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
40
40
|
return target;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
function _defineProperty(obj, key, value) {
|
|
44
|
+
if (key in obj) {
|
|
45
|
+
Object.defineProperty(obj, key, {
|
|
46
|
+
value: value,
|
|
47
|
+
enumerable: true,
|
|
48
|
+
configurable: true,
|
|
49
|
+
writable: true
|
|
50
|
+
});
|
|
51
|
+
} else {
|
|
52
|
+
obj[key] = value;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return obj;
|
|
56
|
+
}
|
|
57
|
+
|
|
43
58
|
function _objectSpread(target) {
|
|
44
59
|
for (var i = 1; i < arguments.length; i++) {
|
|
45
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
60
|
+
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
46
61
|
var ownKeys = Object.keys(source);
|
|
47
62
|
|
|
48
63
|
if (typeof Object.getOwnPropertySymbols === 'function') {
|
|
@@ -59,6 +74,93 @@ function _objectSpread(target) {
|
|
|
59
74
|
return target;
|
|
60
75
|
}
|
|
61
76
|
|
|
77
|
+
function _classCallCheck(instance, Constructor) {
|
|
78
|
+
if (!(instance instanceof Constructor)) {
|
|
79
|
+
throw new TypeError("Cannot call a class as a function");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function _defineProperties(target, props) {
|
|
84
|
+
for (var i = 0; i < props.length; i++) {
|
|
85
|
+
var descriptor = props[i];
|
|
86
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
87
|
+
descriptor.configurable = true;
|
|
88
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
89
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
94
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
95
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
96
|
+
return Constructor;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
var _typeof_1 = createCommonjsModule(function (module) {
|
|
100
|
+
function _typeof(obj) {
|
|
101
|
+
"@babel/helpers - typeof";
|
|
102
|
+
|
|
103
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
104
|
+
module.exports = _typeof = function _typeof(obj) {
|
|
105
|
+
return typeof obj;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
109
|
+
} else {
|
|
110
|
+
module.exports = _typeof = function _typeof(obj) {
|
|
111
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return _typeof(obj);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
module.exports = _typeof;
|
|
121
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
var _typeof$1 = unwrapExports(_typeof_1);
|
|
125
|
+
|
|
126
|
+
function _assertThisInitialized(self) {
|
|
127
|
+
if (self === void 0) {
|
|
128
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return self;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function _possibleConstructorReturn(self, call) {
|
|
135
|
+
if (call && (_typeof$1(call) === "object" || typeof call === "function")) {
|
|
136
|
+
return call;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return _assertThisInitialized(self);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function _getPrototypeOf(o) {
|
|
143
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
144
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
145
|
+
};
|
|
146
|
+
return _getPrototypeOf(o);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function _inherits(subClass, superClass) {
|
|
150
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
151
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
155
|
+
constructor: {
|
|
156
|
+
value: subClass,
|
|
157
|
+
writable: true,
|
|
158
|
+
configurable: true
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
162
|
+
}
|
|
163
|
+
|
|
62
164
|
/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */
|
|
63
165
|
|
|
64
166
|
var hasElementType = typeof Element !== 'undefined';
|
|
@@ -194,6 +296,22 @@ var reactFastCompare = function isEqual(a, b) {
|
|
|
194
296
|
}
|
|
195
297
|
};
|
|
196
298
|
|
|
299
|
+
function _typeof(obj) {
|
|
300
|
+
"@babel/helpers - typeof";
|
|
301
|
+
|
|
302
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
303
|
+
_typeof = function _typeof(obj) {
|
|
304
|
+
return typeof obj;
|
|
305
|
+
};
|
|
306
|
+
} else {
|
|
307
|
+
_typeof = function _typeof(obj) {
|
|
308
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return _typeof(obj);
|
|
313
|
+
}
|
|
314
|
+
|
|
197
315
|
// From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
198
316
|
var shallowEqual = function shallowEqual(objA, objB) {
|
|
199
317
|
if (objA === objB) {
|
|
@@ -238,7 +356,7 @@ var removeEmptyKey = function removeEmptyKey(obj) {
|
|
|
238
356
|
return;
|
|
239
357
|
}
|
|
240
358
|
|
|
241
|
-
if (!objectHasKeys(value)) {
|
|
359
|
+
if (!objectHasKeys$1(value)) {
|
|
242
360
|
delete obj[key];
|
|
243
361
|
} else {
|
|
244
362
|
removeEmptyKey(value);
|
|
@@ -274,7 +392,7 @@ function addQueryID(hits, queryID) {
|
|
|
274
392
|
});
|
|
275
393
|
});
|
|
276
394
|
}
|
|
277
|
-
function find(array, comparator) {
|
|
395
|
+
function find$2(array, comparator) {
|
|
278
396
|
if (!Array.isArray(array)) {
|
|
279
397
|
return undefined;
|
|
280
398
|
}
|
|
@@ -287,11 +405,11 @@ function find(array, comparator) {
|
|
|
287
405
|
|
|
288
406
|
return undefined;
|
|
289
407
|
}
|
|
290
|
-
function objectHasKeys(object) {
|
|
408
|
+
function objectHasKeys$1(object) {
|
|
291
409
|
return object && Object.keys(object).length > 0;
|
|
292
410
|
} // https://github.com/babel/babel/blob/3aaafae053fa75febb3aa45d45b6f00646e30ba4/packages/babel-helpers/src/helpers.js#L604-L620
|
|
293
411
|
|
|
294
|
-
function omit(source, excluded) {
|
|
412
|
+
function omit$1(source, excluded) {
|
|
295
413
|
if (source === null || source === undefined) {
|
|
296
414
|
return {};
|
|
297
415
|
}
|
|
@@ -362,9 +480,9 @@ var instantSearchContext = createContext({
|
|
|
362
480
|
var InstantSearchConsumer = instantSearchContext.Consumer,
|
|
363
481
|
InstantSearchProvider = instantSearchContext.Provider;
|
|
364
482
|
|
|
365
|
-
var _createContext = createContext(undefined),
|
|
366
|
-
IndexConsumer = _createContext.Consumer,
|
|
367
|
-
IndexProvider = _createContext.Provider;
|
|
483
|
+
var _createContext$1 = createContext(undefined),
|
|
484
|
+
IndexConsumer = _createContext$1.Consumer,
|
|
485
|
+
IndexProvider = _createContext$1.Provider;
|
|
368
486
|
|
|
369
487
|
/**
|
|
370
488
|
* Connectors are the HOC used to transform React components
|
|
@@ -577,9 +695,9 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
577
695
|
}, {
|
|
578
696
|
key: "render",
|
|
579
697
|
value: function render() {
|
|
580
|
-
var _this$props = this.props
|
|
581
|
-
|
|
582
|
-
props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
698
|
+
var _this$props = this.props;
|
|
699
|
+
_this$props.contextValue;
|
|
700
|
+
var props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
583
701
|
|
|
584
702
|
var providedProps = this.state.providedProps;
|
|
585
703
|
|
|
@@ -594,7 +712,7 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
594
712
|
var searchForFacetValuesProps = typeof connectorDesc.searchForFacetValues === 'function' ? {
|
|
595
713
|
searchForItems: this.searchForFacetValues
|
|
596
714
|
} : {};
|
|
597
|
-
return
|
|
715
|
+
return React.createElement(Composed, _extends({}, props, providedProps, refineProps, searchForFacetValuesProps));
|
|
598
716
|
}
|
|
599
717
|
}]);
|
|
600
718
|
|
|
@@ -616,9 +734,9 @@ var createConnectorWithContext = function createConnectorWithContext(connectorDe
|
|
|
616
734
|
var Connector = createConnectorWithoutContext(connectorDesc)(Composed);
|
|
617
735
|
|
|
618
736
|
var ConnectorWrapper = function ConnectorWrapper(props) {
|
|
619
|
-
return
|
|
620
|
-
return
|
|
621
|
-
return
|
|
737
|
+
return React.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
738
|
+
return React.createElement(IndexConsumer, null, function (indexContextValue) {
|
|
739
|
+
return React.createElement(Connector, _extends({
|
|
622
740
|
contextValue: contextValue,
|
|
623
741
|
indexContextValue: indexContextValue
|
|
624
742
|
}, props));
|
|
@@ -730,7 +848,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
730
848
|
});
|
|
731
849
|
}
|
|
732
850
|
|
|
733
|
-
var version = '6.10.3';
|
|
851
|
+
var version$1 = '6.10.3';
|
|
734
852
|
|
|
735
853
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
736
854
|
return function (props, propName, componentName) {
|
|
@@ -791,7 +909,7 @@ function translatable(defaultTranslations) {
|
|
|
791
909
|
_createClass(Translatable, [{
|
|
792
910
|
key: "render",
|
|
793
911
|
value: function render() {
|
|
794
|
-
return
|
|
912
|
+
return React.createElement(Composed, _extends({
|
|
795
913
|
translate: this.translate
|
|
796
914
|
}, this.props));
|
|
797
915
|
}
|
|
@@ -927,7 +1045,7 @@ function hasRefinements(_ref) {
|
|
|
927
1045
|
return Object.hasOwnProperty.call(searchState, id);
|
|
928
1046
|
}
|
|
929
1047
|
|
|
930
|
-
function getRefinements(_ref2) {
|
|
1048
|
+
function getRefinements$1(_ref2) {
|
|
931
1049
|
var multiIndex = _ref2.multiIndex,
|
|
932
1050
|
indexId = _ref2.indexId,
|
|
933
1051
|
namespace = _ref2.namespace,
|
|
@@ -969,7 +1087,7 @@ function getCurrentRefinementValue(props, searchState, context, id, defaultValue
|
|
|
969
1087
|
var hasRefinementsValue = hasRefinements(args);
|
|
970
1088
|
|
|
971
1089
|
if (hasRefinementsValue) {
|
|
972
|
-
return getRefinements(args);
|
|
1090
|
+
return getRefinements$1(args);
|
|
973
1091
|
}
|
|
974
1092
|
|
|
975
1093
|
if (props.defaultRefinement) {
|
|
@@ -1010,10 +1128,10 @@ function cleanUpValueWithSingleIndex(_ref3) {
|
|
|
1010
1128
|
attribute = _ref3.attribute;
|
|
1011
1129
|
|
|
1012
1130
|
if (namespace) {
|
|
1013
|
-
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit(searchState[namespace], [attribute])));
|
|
1131
|
+
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit$1(searchState[namespace], [attribute])));
|
|
1014
1132
|
}
|
|
1015
1133
|
|
|
1016
|
-
return omit(searchState, [id]);
|
|
1134
|
+
return omit$1(searchState, [id]);
|
|
1017
1135
|
}
|
|
1018
1136
|
|
|
1019
1137
|
function cleanUpValueWithMultiIndex(_ref4) {
|
|
@@ -1026,20 +1144,20 @@ function cleanUpValueWithMultiIndex(_ref4) {
|
|
|
1026
1144
|
|
|
1027
1145
|
if (namespace && indexSearchState) {
|
|
1028
1146
|
return _objectSpread({}, searchState, {
|
|
1029
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit(indexSearchState[namespace], [attribute])))))
|
|
1147
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit$1(indexSearchState[namespace], [attribute])))))
|
|
1030
1148
|
});
|
|
1031
1149
|
}
|
|
1032
1150
|
|
|
1033
1151
|
if (indexSearchState) {
|
|
1034
1152
|
return _objectSpread({}, searchState, {
|
|
1035
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit(indexSearchState, [id])))
|
|
1153
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit$1(indexSearchState, [id])))
|
|
1036
1154
|
});
|
|
1037
1155
|
}
|
|
1038
1156
|
|
|
1039
1157
|
return searchState;
|
|
1040
1158
|
}
|
|
1041
1159
|
|
|
1042
|
-
function getId() {
|
|
1160
|
+
function getId$f() {
|
|
1043
1161
|
return 'configure';
|
|
1044
1162
|
}
|
|
1045
1163
|
|
|
@@ -1049,20 +1167,20 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1049
1167
|
return {};
|
|
1050
1168
|
},
|
|
1051
1169
|
getSearchParameters: function getSearchParameters(searchParameters, props) {
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1170
|
+
props.children;
|
|
1171
|
+
props.contextValue;
|
|
1172
|
+
props.indexContextValue;
|
|
1173
|
+
var items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1056
1174
|
|
|
1057
1175
|
return searchParameters.setQueryParameters(items);
|
|
1058
1176
|
},
|
|
1059
1177
|
transitionState: function transitionState(props, prevSearchState, nextSearchState) {
|
|
1060
|
-
var id = getId();
|
|
1178
|
+
var id = getId$f();
|
|
1061
1179
|
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1180
|
+
props.children;
|
|
1181
|
+
props.contextValue;
|
|
1182
|
+
props.indexContextValue;
|
|
1183
|
+
var items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1066
1184
|
|
|
1067
1185
|
var propKeys = Object.keys(props);
|
|
1068
1186
|
var nonPresentKeys = this._props ? Object.keys(this._props).filter(function (prop) {
|
|
@@ -1070,7 +1188,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1070
1188
|
}) : [];
|
|
1071
1189
|
this._props = props;
|
|
1072
1190
|
|
|
1073
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), items));
|
|
1191
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit$1(nextSearchState[id], nonPresentKeys), items));
|
|
1074
1192
|
|
|
1075
1193
|
return refineValue(nextSearchState, nextValue, {
|
|
1076
1194
|
ais: props.contextValue,
|
|
@@ -1078,7 +1196,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1078
1196
|
});
|
|
1079
1197
|
},
|
|
1080
1198
|
cleanUp: function cleanUp(props, searchState) {
|
|
1081
|
-
var id = getId();
|
|
1199
|
+
var id = getId$f();
|
|
1082
1200
|
var indexId = getIndexId({
|
|
1083
1201
|
ais: props.contextValue,
|
|
1084
1202
|
multiIndexContext: props.indexContextValue
|
|
@@ -1144,26 +1262,39 @@ var Configure = connectConfigure(function Configure() {
|
|
|
1144
1262
|
return null;
|
|
1145
1263
|
});
|
|
1146
1264
|
|
|
1147
|
-
function
|
|
1148
|
-
if (
|
|
1149
|
-
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
|
|
1150
|
-
arr2[i] = arr[i];
|
|
1151
|
-
}
|
|
1265
|
+
function _arrayLikeToArray(arr, len) {
|
|
1266
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
1152
1267
|
|
|
1153
|
-
|
|
1268
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
1269
|
+
arr2[i] = arr[i];
|
|
1154
1270
|
}
|
|
1271
|
+
|
|
1272
|
+
return arr2;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
function _arrayWithoutHoles(arr) {
|
|
1276
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
1155
1277
|
}
|
|
1156
1278
|
|
|
1157
1279
|
function _iterableToArray(iter) {
|
|
1158
|
-
if (Symbol.iterator in Object(iter)
|
|
1280
|
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
1284
|
+
if (!o) return;
|
|
1285
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1286
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1287
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1288
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1289
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1159
1290
|
}
|
|
1160
1291
|
|
|
1161
1292
|
function _nonIterableSpread() {
|
|
1162
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
|
1293
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1163
1294
|
}
|
|
1164
1295
|
|
|
1165
1296
|
function _toConsumableArray(arr) {
|
|
1166
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
|
1297
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
1167
1298
|
}
|
|
1168
1299
|
|
|
1169
1300
|
function clone(value) {
|
|
@@ -1313,13 +1444,13 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
1313
1444
|
return target;
|
|
1314
1445
|
}
|
|
1315
1446
|
|
|
1316
|
-
var omit
|
|
1447
|
+
var omit = _objectWithoutPropertiesLoose;
|
|
1317
1448
|
|
|
1318
|
-
function objectHasKeys
|
|
1449
|
+
function objectHasKeys(obj) {
|
|
1319
1450
|
return obj && Object.keys(obj).length > 0;
|
|
1320
1451
|
}
|
|
1321
1452
|
|
|
1322
|
-
var objectHasKeys_1 = objectHasKeys
|
|
1453
|
+
var objectHasKeys_1 = objectHasKeys;
|
|
1323
1454
|
|
|
1324
1455
|
var isValidUserToken = function isValidUserToken(userToken) {
|
|
1325
1456
|
if (userToken === null) {
|
|
@@ -1427,7 +1558,7 @@ var lib = {
|
|
|
1427
1558
|
}
|
|
1428
1559
|
return {};
|
|
1429
1560
|
} else if (typeof attribute === 'string') {
|
|
1430
|
-
return omit
|
|
1561
|
+
return omit(refinementList, [attribute]);
|
|
1431
1562
|
} else if (typeof attribute === 'function') {
|
|
1432
1563
|
var hasChanged = false;
|
|
1433
1564
|
|
|
@@ -1472,7 +1603,7 @@ var lib = {
|
|
|
1472
1603
|
}
|
|
1473
1604
|
};
|
|
1474
1605
|
|
|
1475
|
-
var RefinementList = lib;
|
|
1606
|
+
var RefinementList$3 = lib;
|
|
1476
1607
|
|
|
1477
1608
|
/**
|
|
1478
1609
|
* isEqual, but only for numeric refinement values, possible values:
|
|
@@ -1841,22 +1972,22 @@ SearchParameters.prototype = {
|
|
|
1841
1972
|
clearRefinements: function clearRefinements(attribute) {
|
|
1842
1973
|
var patch = {
|
|
1843
1974
|
numericRefinements: this._clearNumericRefinements(attribute),
|
|
1844
|
-
facetsRefinements: RefinementList.clearRefinement(
|
|
1975
|
+
facetsRefinements: RefinementList$3.clearRefinement(
|
|
1845
1976
|
this.facetsRefinements,
|
|
1846
1977
|
attribute,
|
|
1847
1978
|
'conjunctiveFacet'
|
|
1848
1979
|
),
|
|
1849
|
-
facetsExcludes: RefinementList.clearRefinement(
|
|
1980
|
+
facetsExcludes: RefinementList$3.clearRefinement(
|
|
1850
1981
|
this.facetsExcludes,
|
|
1851
1982
|
attribute,
|
|
1852
1983
|
'exclude'
|
|
1853
1984
|
),
|
|
1854
|
-
disjunctiveFacetsRefinements: RefinementList.clearRefinement(
|
|
1985
|
+
disjunctiveFacetsRefinements: RefinementList$3.clearRefinement(
|
|
1855
1986
|
this.disjunctiveFacetsRefinements,
|
|
1856
1987
|
attribute,
|
|
1857
1988
|
'disjunctiveFacet'
|
|
1858
1989
|
),
|
|
1859
|
-
hierarchicalFacetsRefinements: RefinementList.clearRefinement(
|
|
1990
|
+
hierarchicalFacetsRefinements: RefinementList$3.clearRefinement(
|
|
1860
1991
|
this.hierarchicalFacetsRefinements,
|
|
1861
1992
|
attribute,
|
|
1862
1993
|
'hierarchicalFacet'
|
|
@@ -2132,7 +2263,7 @@ SearchParameters.prototype = {
|
|
|
2132
2263
|
}
|
|
2133
2264
|
return {};
|
|
2134
2265
|
} else if (typeof attribute === 'string') {
|
|
2135
|
-
return omit
|
|
2266
|
+
return omit(this.numericRefinements, [attribute]);
|
|
2136
2267
|
} else if (typeof attribute === 'function') {
|
|
2137
2268
|
var hasChanged = false;
|
|
2138
2269
|
var numericRefinements = this.numericRefinements;
|
|
@@ -2224,10 +2355,10 @@ SearchParameters.prototype = {
|
|
|
2224
2355
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2225
2356
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2226
2357
|
}
|
|
2227
|
-
if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2358
|
+
if (RefinementList$3.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2228
2359
|
|
|
2229
2360
|
return this.setQueryParameters({
|
|
2230
|
-
facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value)
|
|
2361
|
+
facetsRefinements: RefinementList$3.addRefinement(this.facetsRefinements, facet, value)
|
|
2231
2362
|
});
|
|
2232
2363
|
},
|
|
2233
2364
|
/**
|
|
@@ -2241,10 +2372,10 @@ SearchParameters.prototype = {
|
|
|
2241
2372
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2242
2373
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2243
2374
|
}
|
|
2244
|
-
if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2375
|
+
if (RefinementList$3.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2245
2376
|
|
|
2246
2377
|
return this.setQueryParameters({
|
|
2247
|
-
facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value)
|
|
2378
|
+
facetsExcludes: RefinementList$3.addRefinement(this.facetsExcludes, facet, value)
|
|
2248
2379
|
});
|
|
2249
2380
|
},
|
|
2250
2381
|
/**
|
|
@@ -2260,10 +2391,10 @@ SearchParameters.prototype = {
|
|
|
2260
2391
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2261
2392
|
}
|
|
2262
2393
|
|
|
2263
|
-
if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2394
|
+
if (RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2264
2395
|
|
|
2265
2396
|
return this.setQueryParameters({
|
|
2266
|
-
disjunctiveFacetsRefinements: RefinementList.addRefinement(
|
|
2397
|
+
disjunctiveFacetsRefinements: RefinementList$3.addRefinement(
|
|
2267
2398
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2268
2399
|
});
|
|
2269
2400
|
},
|
|
@@ -2348,10 +2479,10 @@ SearchParameters.prototype = {
|
|
|
2348
2479
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2349
2480
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2350
2481
|
}
|
|
2351
|
-
if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2482
|
+
if (!RefinementList$3.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2352
2483
|
|
|
2353
2484
|
return this.setQueryParameters({
|
|
2354
|
-
facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value)
|
|
2485
|
+
facetsRefinements: RefinementList$3.removeRefinement(this.facetsRefinements, facet, value)
|
|
2355
2486
|
});
|
|
2356
2487
|
},
|
|
2357
2488
|
/**
|
|
@@ -2365,10 +2496,10 @@ SearchParameters.prototype = {
|
|
|
2365
2496
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2366
2497
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2367
2498
|
}
|
|
2368
|
-
if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2499
|
+
if (!RefinementList$3.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2369
2500
|
|
|
2370
2501
|
return this.setQueryParameters({
|
|
2371
|
-
facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value)
|
|
2502
|
+
facetsExcludes: RefinementList$3.removeRefinement(this.facetsExcludes, facet, value)
|
|
2372
2503
|
});
|
|
2373
2504
|
},
|
|
2374
2505
|
/**
|
|
@@ -2383,10 +2514,10 @@ SearchParameters.prototype = {
|
|
|
2383
2514
|
throw new Error(
|
|
2384
2515
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2385
2516
|
}
|
|
2386
|
-
if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2517
|
+
if (!RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2387
2518
|
|
|
2388
2519
|
return this.setQueryParameters({
|
|
2389
|
-
disjunctiveFacetsRefinements: RefinementList.removeRefinement(
|
|
2520
|
+
disjunctiveFacetsRefinements: RefinementList$3.removeRefinement(
|
|
2390
2521
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2391
2522
|
});
|
|
2392
2523
|
},
|
|
@@ -2452,7 +2583,7 @@ SearchParameters.prototype = {
|
|
|
2452
2583
|
}
|
|
2453
2584
|
|
|
2454
2585
|
return this.setQueryParameters({
|
|
2455
|
-
facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2586
|
+
facetsRefinements: RefinementList$3.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2456
2587
|
});
|
|
2457
2588
|
},
|
|
2458
2589
|
/**
|
|
@@ -2468,7 +2599,7 @@ SearchParameters.prototype = {
|
|
|
2468
2599
|
}
|
|
2469
2600
|
|
|
2470
2601
|
return this.setQueryParameters({
|
|
2471
|
-
facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2602
|
+
facetsExcludes: RefinementList$3.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2472
2603
|
});
|
|
2473
2604
|
},
|
|
2474
2605
|
/**
|
|
@@ -2485,7 +2616,7 @@ SearchParameters.prototype = {
|
|
|
2485
2616
|
}
|
|
2486
2617
|
|
|
2487
2618
|
return this.setQueryParameters({
|
|
2488
|
-
disjunctiveFacetsRefinements: RefinementList.toggleRefinement(
|
|
2619
|
+
disjunctiveFacetsRefinements: RefinementList$3.toggleRefinement(
|
|
2489
2620
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2490
2621
|
});
|
|
2491
2622
|
},
|
|
@@ -2624,7 +2755,7 @@ SearchParameters.prototype = {
|
|
|
2624
2755
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2625
2756
|
return false;
|
|
2626
2757
|
}
|
|
2627
|
-
return RefinementList.isRefined(this.facetsRefinements, facet, value);
|
|
2758
|
+
return RefinementList$3.isRefined(this.facetsRefinements, facet, value);
|
|
2628
2759
|
},
|
|
2629
2760
|
/**
|
|
2630
2761
|
* Returns true if the facet contains exclusions or if a specific value is
|
|
@@ -2640,7 +2771,7 @@ SearchParameters.prototype = {
|
|
|
2640
2771
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2641
2772
|
return false;
|
|
2642
2773
|
}
|
|
2643
|
-
return RefinementList.isRefined(this.facetsExcludes, facet, value);
|
|
2774
|
+
return RefinementList$3.isRefined(this.facetsExcludes, facet, value);
|
|
2644
2775
|
},
|
|
2645
2776
|
/**
|
|
2646
2777
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2655,7 +2786,7 @@ SearchParameters.prototype = {
|
|
|
2655
2786
|
if (!this.isDisjunctiveFacet(facet)) {
|
|
2656
2787
|
return false;
|
|
2657
2788
|
}
|
|
2658
|
-
return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2789
|
+
return RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2659
2790
|
},
|
|
2660
2791
|
/**
|
|
2661
2792
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2841,7 +2972,7 @@ SearchParameters.prototype = {
|
|
|
2841
2972
|
var isNextValueDefined = nextWithNumbers[key] !== undefined;
|
|
2842
2973
|
|
|
2843
2974
|
if (isPreviousValueDefined && !isNextValueDefined) {
|
|
2844
|
-
return omit
|
|
2975
|
+
return omit(previous, [key]);
|
|
2845
2976
|
}
|
|
2846
2977
|
|
|
2847
2978
|
if (isNextValueDefined) {
|
|
@@ -4574,7 +4705,7 @@ var requestBuilder = {
|
|
|
4574
4705
|
|
|
4575
4706
|
var requestBuilder_1 = requestBuilder;
|
|
4576
4707
|
|
|
4577
|
-
var version
|
|
4708
|
+
var version = '3.4.4';
|
|
4578
4709
|
|
|
4579
4710
|
/**
|
|
4580
4711
|
* Event triggered when a parameter is set or updated
|
|
@@ -4681,7 +4812,7 @@ var version$1 = '3.4.4';
|
|
|
4681
4812
|
*/
|
|
4682
4813
|
function AlgoliaSearchHelper(client, index, options) {
|
|
4683
4814
|
if (typeof client.addAlgoliaAgent === 'function') {
|
|
4684
|
-
client.addAlgoliaAgent('JS Helper (' + version
|
|
4815
|
+
client.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
4685
4816
|
}
|
|
4686
4817
|
|
|
4687
4818
|
this.setClient(client);
|
|
@@ -4836,7 +4967,7 @@ AlgoliaSearchHelper.prototype.findAnswers = function(options) {
|
|
|
4836
4967
|
nbHits: options.nbHits
|
|
4837
4968
|
},
|
|
4838
4969
|
{
|
|
4839
|
-
params: omit
|
|
4970
|
+
params: omit(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
4840
4971
|
'attributesToSnippet',
|
|
4841
4972
|
'hitsPerPage',
|
|
4842
4973
|
'restrictSearchableAttributes',
|
|
@@ -5950,7 +6081,7 @@ AlgoliaSearchHelper.prototype.setClient = function(newClient) {
|
|
|
5950
6081
|
if (this.client === newClient) return this;
|
|
5951
6082
|
|
|
5952
6083
|
if (typeof newClient.addAlgoliaAgent === 'function') {
|
|
5953
|
-
newClient.addAlgoliaAgent('JS Helper (' + version
|
|
6084
|
+
newClient.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
5954
6085
|
}
|
|
5955
6086
|
this.client = newClient;
|
|
5956
6087
|
|
|
@@ -6069,7 +6200,7 @@ function algoliasearchHelper(client, index, opts) {
|
|
|
6069
6200
|
* @member module:algoliasearchHelper.version
|
|
6070
6201
|
* @type {number}
|
|
6071
6202
|
*/
|
|
6072
|
-
algoliasearchHelper.version = version
|
|
6203
|
+
algoliasearchHelper.version = version;
|
|
6073
6204
|
|
|
6074
6205
|
/**
|
|
6075
6206
|
* Constructor for the Helper.
|
|
@@ -6101,13 +6232,13 @@ function createOptionalFilter(_ref) {
|
|
|
6101
6232
|
return "".concat(attributeName, ":").concat(attributeValue, "<score=").concat(attributeScore || 1, ">");
|
|
6102
6233
|
}
|
|
6103
6234
|
|
|
6104
|
-
var defaultProps = {
|
|
6235
|
+
var defaultProps$1 = {
|
|
6105
6236
|
transformSearchParameters: function transformSearchParameters(x) {
|
|
6106
6237
|
return _objectSpread({}, x);
|
|
6107
6238
|
}
|
|
6108
6239
|
};
|
|
6109
6240
|
|
|
6110
|
-
function getId$
|
|
6241
|
+
function getId$e() {
|
|
6111
6242
|
// We store the search state of this widget in `configure`.
|
|
6112
6243
|
return 'configure';
|
|
6113
6244
|
}
|
|
@@ -6155,7 +6286,7 @@ function getSearchParametersFromProps(props) {
|
|
|
6155
6286
|
|
|
6156
6287
|
var connectConfigureRelatedItems = createConnectorWithContext({
|
|
6157
6288
|
displayName: 'AlgoliaConfigureRelatedItems',
|
|
6158
|
-
defaultProps: defaultProps,
|
|
6289
|
+
defaultProps: defaultProps$1,
|
|
6159
6290
|
getProvidedProps: function getProvidedProps() {
|
|
6160
6291
|
return {};
|
|
6161
6292
|
},
|
|
@@ -6163,7 +6294,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6163
6294
|
return searchParameters.setQueryParameters(getSearchParametersFromProps(props));
|
|
6164
6295
|
},
|
|
6165
6296
|
transitionState: function transitionState(props, _prevSearchState, nextSearchState) {
|
|
6166
|
-
var id = getId$
|
|
6297
|
+
var id = getId$e(); // We need to transform the exhaustive search parameters back to clean
|
|
6167
6298
|
// search parameters without the empty default keys so we don't pollute the
|
|
6168
6299
|
// `configure` search state.
|
|
6169
6300
|
|
|
@@ -6174,7 +6305,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6174
6305
|
}) : [];
|
|
6175
6306
|
this._searchParameters = searchParameters;
|
|
6176
6307
|
|
|
6177
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6308
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit$1(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6178
6309
|
|
|
6179
6310
|
return refineValue(nextSearchState, nextValue, {
|
|
6180
6311
|
ais: props.contextValue,
|
|
@@ -6184,7 +6315,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6184
6315
|
cleanUp: function cleanUp(props, searchState) {
|
|
6185
6316
|
var _this = this;
|
|
6186
6317
|
|
|
6187
|
-
var id = getId$
|
|
6318
|
+
var id = getId$e();
|
|
6188
6319
|
var indexId = getIndexId({
|
|
6189
6320
|
ais: props.contextValue,
|
|
6190
6321
|
multiIndexContext: props.indexContextValue
|
|
@@ -6257,7 +6388,7 @@ function getWidgetRefinements(attribute, widgetKey, searchState) {
|
|
|
6257
6388
|
}
|
|
6258
6389
|
}
|
|
6259
6390
|
|
|
6260
|
-
function getRefinements
|
|
6391
|
+
function getRefinements(attribute) {
|
|
6261
6392
|
var searchState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6262
6393
|
var refinements = Object.keys(searchState).filter(function (widgetKey) {
|
|
6263
6394
|
return searchState[widgetKey] !== undefined && searchState[widgetKey][attribute] !== undefined;
|
|
@@ -6274,7 +6405,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6274
6405
|
var searchState = _ref.searchState,
|
|
6275
6406
|
trackedFilters = _ref.trackedFilters;
|
|
6276
6407
|
var ruleContexts = Object.keys(trackedFilters).reduce(function (facets, facetName) {
|
|
6277
|
-
var facetRefinements = getRefinements
|
|
6408
|
+
var facetRefinements = getRefinements(facetName, searchState);
|
|
6278
6409
|
var getTrackedFacetValues = trackedFilters[facetName];
|
|
6279
6410
|
var trackedFacetValues = getTrackedFacetValues(facetRefinements);
|
|
6280
6411
|
return [].concat(_toConsumableArray(facets), _toConsumableArray(facetRefinements.filter(function (facetRefinement) {
|
|
@@ -6286,7 +6417,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6286
6417
|
return ruleContexts;
|
|
6287
6418
|
}
|
|
6288
6419
|
|
|
6289
|
-
var defaultProps
|
|
6420
|
+
var defaultProps = {
|
|
6290
6421
|
transformItems: function transformItems(items) {
|
|
6291
6422
|
return items;
|
|
6292
6423
|
},
|
|
@@ -6297,7 +6428,7 @@ var defaultProps$1 = {
|
|
|
6297
6428
|
};
|
|
6298
6429
|
var connectQueryRules = createConnectorWithContext({
|
|
6299
6430
|
displayName: 'AlgoliaQueryRules',
|
|
6300
|
-
defaultProps: defaultProps
|
|
6431
|
+
defaultProps: defaultProps,
|
|
6301
6432
|
getProvidedProps: function getProvidedProps(props, _1, searchResults) {
|
|
6302
6433
|
var results = getResults(searchResults, {
|
|
6303
6434
|
ais: props.contextValue,
|
|
@@ -6459,7 +6590,7 @@ function (_Component) {
|
|
|
6459
6590
|
return null;
|
|
6460
6591
|
}
|
|
6461
6592
|
|
|
6462
|
-
return
|
|
6593
|
+
return React.createElement(IndexProvider, {
|
|
6463
6594
|
value: this.state.indexContext
|
|
6464
6595
|
}, this.props.children);
|
|
6465
6596
|
}
|
|
@@ -6474,20 +6605,10 @@ _defineProperty(Index, "propTypes", {
|
|
|
6474
6605
|
children: PropTypes.node
|
|
6475
6606
|
});
|
|
6476
6607
|
|
|
6477
|
-
|
|
6478
|
-
var inferredIndexId = props.indexName;
|
|
6479
|
-
return React__default.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
6480
|
-
return React__default.createElement(Index, _extends({
|
|
6481
|
-
contextValue: contextValue,
|
|
6482
|
-
indexId: inferredIndexId
|
|
6483
|
-
}, props));
|
|
6484
|
-
});
|
|
6485
|
-
};
|
|
6486
|
-
|
|
6487
|
-
IndexWrapper.propTypes = {
|
|
6608
|
+
({
|
|
6488
6609
|
indexName: PropTypes.string.isRequired,
|
|
6489
6610
|
indexId: PropTypes.string
|
|
6490
|
-
};
|
|
6611
|
+
});
|
|
6491
6612
|
|
|
6492
6613
|
function createWidgetsManager(onWidgetsUpdate) {
|
|
6493
6614
|
var widgets = []; // Is an update scheduled?
|
|
@@ -6548,7 +6669,7 @@ function createStore(initialState) {
|
|
|
6548
6669
|
function addAlgoliaAgents(searchClient) {
|
|
6549
6670
|
if (typeof searchClient.addAlgoliaAgent === 'function') {
|
|
6550
6671
|
searchClient.addAlgoliaAgent("react (".concat(version$2, ")"));
|
|
6551
|
-
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version, ")"));
|
|
6672
|
+
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version$1, ")"));
|
|
6552
6673
|
}
|
|
6553
6674
|
}
|
|
6554
6675
|
|
|
@@ -6786,8 +6907,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6786
6907
|
nextIsSearchStalled = false;
|
|
6787
6908
|
}
|
|
6788
6909
|
|
|
6789
|
-
|
|
6790
|
-
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6910
|
+
currentState.resultsFacetValues;
|
|
6911
|
+
var partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6791
6912
|
|
|
6792
6913
|
store.setState(_objectSpread({}, partialState, {
|
|
6793
6914
|
results: results,
|
|
@@ -6808,8 +6929,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6808
6929
|
nextIsSearchStalled = false;
|
|
6809
6930
|
}
|
|
6810
6931
|
|
|
6811
|
-
|
|
6812
|
-
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6932
|
+
currentState.resultsFacetValues;
|
|
6933
|
+
var partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6813
6934
|
|
|
6814
6935
|
store.setState(_objectSpread({}, partialState, {
|
|
6815
6936
|
isSearchStalled: nextIsSearchStalled,
|
|
@@ -6821,9 +6942,9 @@ function createInstantSearchManager(_ref) {
|
|
|
6821
6942
|
function handleNewSearch() {
|
|
6822
6943
|
if (!stalledSearchTimer) {
|
|
6823
6944
|
stalledSearchTimer = setTimeout(function () {
|
|
6824
|
-
var _store$getState = store.getState()
|
|
6825
|
-
|
|
6826
|
-
partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
6945
|
+
var _store$getState = store.getState();
|
|
6946
|
+
_store$getState.resultsFacetValues;
|
|
6947
|
+
var partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
6827
6948
|
|
|
6828
6949
|
store.setState(_objectSpread({}, partialState, {
|
|
6829
6950
|
isSearchStalled: true
|
|
@@ -7288,7 +7409,7 @@ function (_Component) {
|
|
|
7288
7409
|
return null;
|
|
7289
7410
|
}
|
|
7290
7411
|
|
|
7291
|
-
return
|
|
7412
|
+
return React.createElement(InstantSearchProvider, {
|
|
7292
7413
|
value: this.state.contextValue
|
|
7293
7414
|
}, this.props.children);
|
|
7294
7415
|
}
|
|
@@ -7322,21 +7443,21 @@ _defineProperty(InstantSearch, "propTypes", {
|
|
|
7322
7443
|
stalledSearchDelay: PropTypes.number
|
|
7323
7444
|
});
|
|
7324
7445
|
|
|
7325
|
-
var getId$
|
|
7446
|
+
var getId$d = function getId(props) {
|
|
7326
7447
|
return props.attributes[0];
|
|
7327
7448
|
};
|
|
7328
|
-
var namespace = 'hierarchicalMenu';
|
|
7449
|
+
var namespace$6 = 'hierarchicalMenu';
|
|
7329
7450
|
|
|
7330
|
-
function _refine(props, searchState, nextRefinement, context) {
|
|
7331
|
-
var id = getId$
|
|
7451
|
+
function _refine$9(props, searchState, nextRefinement, context) {
|
|
7452
|
+
var id = getId$d(props);
|
|
7332
7453
|
|
|
7333
7454
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7334
7455
|
|
|
7335
7456
|
var resetPage = true;
|
|
7336
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
7457
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$6);
|
|
7337
7458
|
}
|
|
7338
7459
|
|
|
7339
|
-
function transformValue(values) {
|
|
7460
|
+
function transformValue$1(values) {
|
|
7340
7461
|
return values.reduce(function (acc, item) {
|
|
7341
7462
|
if (item.isRefined) {
|
|
7342
7463
|
acc.push({
|
|
@@ -7347,7 +7468,7 @@ function transformValue(values) {
|
|
|
7347
7468
|
}); // Create a variable in order to keep the same acc for the recursion, otherwise "reduce" returns a new one
|
|
7348
7469
|
|
|
7349
7470
|
if (item.data) {
|
|
7350
|
-
acc = acc.concat(transformValue(item.data));
|
|
7471
|
+
acc = acc.concat(transformValue$1(item.data));
|
|
7351
7472
|
}
|
|
7352
7473
|
}
|
|
7353
7474
|
|
|
@@ -7409,7 +7530,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7409
7530
|
transformItems: PropTypes.func
|
|
7410
7531
|
},
|
|
7411
7532
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
7412
|
-
var id = getId$
|
|
7533
|
+
var id = getId$d(props);
|
|
7413
7534
|
var results = getResults(searchResults, {
|
|
7414
7535
|
ais: props.contextValue,
|
|
7415
7536
|
multiIndexContext: props.indexContextValue
|
|
@@ -7424,7 +7545,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7424
7545
|
}
|
|
7425
7546
|
|
|
7426
7547
|
var values = results.getFacetValues(id);
|
|
7427
|
-
var items = values.data ? transformValue(values.data) : [];
|
|
7548
|
+
var items = values.data ? transformValue$1(values.data) : [];
|
|
7428
7549
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7429
7550
|
return {
|
|
7430
7551
|
canRefine: transformedItems.length > 0,
|
|
@@ -7432,7 +7553,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7432
7553
|
};
|
|
7433
7554
|
},
|
|
7434
7555
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7435
|
-
return _refine(props, searchState, nextRefinement, {
|
|
7556
|
+
return _refine$9(props, searchState, nextRefinement, {
|
|
7436
7557
|
ais: props.contextValue,
|
|
7437
7558
|
multiIndexContext: props.indexContextValue
|
|
7438
7559
|
});
|
|
@@ -7495,13 +7616,13 @@ var connectCurrentRefinements = createConnectorWithContext({
|
|
|
7495
7616
|
}
|
|
7496
7617
|
});
|
|
7497
7618
|
|
|
7498
|
-
var getId$
|
|
7619
|
+
var getId$c = function getId(props) {
|
|
7499
7620
|
return props.attributes[0];
|
|
7500
7621
|
};
|
|
7501
|
-
var namespace$
|
|
7622
|
+
var namespace$5 = 'hierarchicalMenu';
|
|
7502
7623
|
|
|
7503
|
-
function getCurrentRefinement(props, searchState, context) {
|
|
7504
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
7624
|
+
function getCurrentRefinement$b(props, searchState, context) {
|
|
7625
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$5, ".").concat(getId$c(props)), null);
|
|
7505
7626
|
|
|
7506
7627
|
if (currentRefinement === '') {
|
|
7507
7628
|
return null;
|
|
@@ -7510,13 +7631,13 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
7510
7631
|
return currentRefinement;
|
|
7511
7632
|
}
|
|
7512
7633
|
|
|
7513
|
-
function getValue(path, props, searchState, context) {
|
|
7634
|
+
function getValue$2(path, props, searchState, context) {
|
|
7514
7635
|
var id = props.id,
|
|
7515
7636
|
attributes = props.attributes,
|
|
7516
7637
|
separator = props.separator,
|
|
7517
7638
|
rootPath = props.rootPath,
|
|
7518
7639
|
showParentLevel = props.showParentLevel;
|
|
7519
|
-
var currentRefinement = getCurrentRefinement(props, searchState, context);
|
|
7640
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, context);
|
|
7520
7641
|
var nextRefinement;
|
|
7521
7642
|
|
|
7522
7643
|
if (currentRefinement === null) {
|
|
@@ -7537,14 +7658,14 @@ function getValue(path, props, searchState, context) {
|
|
|
7537
7658
|
return nextRefinement;
|
|
7538
7659
|
}
|
|
7539
7660
|
|
|
7540
|
-
function transformValue
|
|
7661
|
+
function transformValue(value, props, searchState, context) {
|
|
7541
7662
|
return value.map(function (v) {
|
|
7542
7663
|
return {
|
|
7543
7664
|
label: v.name,
|
|
7544
|
-
value: getValue(v.path, props, searchState, context),
|
|
7665
|
+
value: getValue$2(v.path, props, searchState, context),
|
|
7545
7666
|
count: v.count,
|
|
7546
7667
|
isRefined: v.isRefined,
|
|
7547
|
-
items: v.data && transformValue
|
|
7668
|
+
items: v.data && transformValue(v.data, props, searchState, context)
|
|
7548
7669
|
};
|
|
7549
7670
|
});
|
|
7550
7671
|
}
|
|
@@ -7560,20 +7681,20 @@ var truncate = function truncate() {
|
|
|
7560
7681
|
});
|
|
7561
7682
|
};
|
|
7562
7683
|
|
|
7563
|
-
function _refine$
|
|
7564
|
-
var id = getId$
|
|
7684
|
+
function _refine$8(props, searchState, nextRefinement, context) {
|
|
7685
|
+
var id = getId$c(props);
|
|
7565
7686
|
|
|
7566
7687
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7567
7688
|
|
|
7568
7689
|
var resetPage = true;
|
|
7569
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
7690
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$5);
|
|
7570
7691
|
}
|
|
7571
7692
|
|
|
7572
|
-
function _cleanUp(props, searchState, context) {
|
|
7573
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
7693
|
+
function _cleanUp$7(props, searchState, context) {
|
|
7694
|
+
return cleanUpValue(searchState, context, "".concat(namespace$5, ".").concat(getId$c(props)));
|
|
7574
7695
|
}
|
|
7575
7696
|
|
|
7576
|
-
var sortBy = ['name:asc'];
|
|
7697
|
+
var sortBy$1 = ['name:asc'];
|
|
7577
7698
|
/**
|
|
7578
7699
|
* connectHierarchicalMenu connector provides the logic to build a widget that will
|
|
7579
7700
|
* give the user the ability to explore a tree-like structure.
|
|
@@ -7655,7 +7776,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7655
7776
|
var showMore = props.showMore,
|
|
7656
7777
|
limit = props.limit,
|
|
7657
7778
|
showMoreLimit = props.showMoreLimit;
|
|
7658
|
-
var id = getId$
|
|
7779
|
+
var id = getId$c(props);
|
|
7659
7780
|
var results = getResults(searchResults, {
|
|
7660
7781
|
ais: props.contextValue,
|
|
7661
7782
|
multiIndexContext: props.indexContextValue
|
|
@@ -7665,7 +7786,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7665
7786
|
if (!isFacetPresent) {
|
|
7666
7787
|
return {
|
|
7667
7788
|
items: [],
|
|
7668
|
-
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7789
|
+
currentRefinement: getCurrentRefinement$b(props, searchState, {
|
|
7669
7790
|
ais: props.contextValue,
|
|
7670
7791
|
multiIndexContext: props.indexContextValue
|
|
7671
7792
|
}),
|
|
@@ -7675,16 +7796,16 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7675
7796
|
|
|
7676
7797
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7677
7798
|
var value = results.getFacetValues(id, {
|
|
7678
|
-
sortBy: sortBy
|
|
7799
|
+
sortBy: sortBy$1
|
|
7679
7800
|
});
|
|
7680
|
-
var items = value.data ? transformValue
|
|
7801
|
+
var items = value.data ? transformValue(value.data, props, searchState, {
|
|
7681
7802
|
ais: props.contextValue,
|
|
7682
7803
|
multiIndexContext: props.indexContextValue
|
|
7683
7804
|
}) : [];
|
|
7684
7805
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7685
7806
|
return {
|
|
7686
7807
|
items: truncate(transformedItems, itemsLimit),
|
|
7687
|
-
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7808
|
+
currentRefinement: getCurrentRefinement$b(props, searchState, {
|
|
7688
7809
|
ais: props.contextValue,
|
|
7689
7810
|
multiIndexContext: props.indexContextValue
|
|
7690
7811
|
}),
|
|
@@ -7692,13 +7813,13 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7692
7813
|
};
|
|
7693
7814
|
},
|
|
7694
7815
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7695
|
-
return _refine$
|
|
7816
|
+
return _refine$8(props, searchState, nextRefinement, {
|
|
7696
7817
|
ais: props.contextValue,
|
|
7697
7818
|
multiIndexContext: props.indexContextValue
|
|
7698
7819
|
});
|
|
7699
7820
|
},
|
|
7700
7821
|
cleanUp: function cleanUp(props, searchState) {
|
|
7701
|
-
return _cleanUp(props, searchState, {
|
|
7822
|
+
return _cleanUp$7(props, searchState, {
|
|
7702
7823
|
ais: props.contextValue,
|
|
7703
7824
|
multiIndexContext: props.indexContextValue
|
|
7704
7825
|
});
|
|
@@ -7712,7 +7833,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7712
7833
|
limit = props.limit,
|
|
7713
7834
|
showMoreLimit = props.showMoreLimit,
|
|
7714
7835
|
contextValue = props.contextValue;
|
|
7715
|
-
var id = getId$
|
|
7836
|
+
var id = getId$c(props);
|
|
7716
7837
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7717
7838
|
searchParameters = searchParameters.addHierarchicalFacet({
|
|
7718
7839
|
name: id,
|
|
@@ -7723,7 +7844,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7723
7844
|
}).setQueryParameters({
|
|
7724
7845
|
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, itemsLimit)
|
|
7725
7846
|
});
|
|
7726
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7847
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
7727
7848
|
ais: contextValue,
|
|
7728
7849
|
multiIndexContext: props.indexContextValue
|
|
7729
7850
|
});
|
|
@@ -7736,8 +7857,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7736
7857
|
},
|
|
7737
7858
|
getMetadata: function getMetadata(props, searchState) {
|
|
7738
7859
|
var rootAttribute = props.attributes[0];
|
|
7739
|
-
var id = getId$
|
|
7740
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7860
|
+
var id = getId$c(props);
|
|
7861
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
7741
7862
|
ais: props.contextValue,
|
|
7742
7863
|
multiIndexContext: props.indexContextValue
|
|
7743
7864
|
});
|
|
@@ -7745,7 +7866,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7745
7866
|
label: "".concat(rootAttribute, ": ").concat(currentRefinement),
|
|
7746
7867
|
attribute: rootAttribute,
|
|
7747
7868
|
value: function value(nextState) {
|
|
7748
|
-
return _refine$
|
|
7869
|
+
return _refine$8(props, nextState, '', {
|
|
7749
7870
|
ais: props.contextValue,
|
|
7750
7871
|
multiIndexContext: props.indexContextValue
|
|
7751
7872
|
});
|
|
@@ -7922,12 +8043,12 @@ var connectHits = createConnectorWithContext({
|
|
|
7922
8043
|
}
|
|
7923
8044
|
});
|
|
7924
8045
|
|
|
7925
|
-
function getId$
|
|
8046
|
+
function getId$b() {
|
|
7926
8047
|
return 'hitsPerPage';
|
|
7927
8048
|
}
|
|
7928
8049
|
|
|
7929
|
-
function getCurrentRefinement$
|
|
7930
|
-
var id = getId$
|
|
8050
|
+
function getCurrentRefinement$a(props, searchState, context) {
|
|
8051
|
+
var id = getId$b();
|
|
7931
8052
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
7932
8053
|
|
|
7933
8054
|
if (typeof currentRefinement === 'string') {
|
|
@@ -7962,7 +8083,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
7962
8083
|
transformItems: PropTypes.func
|
|
7963
8084
|
},
|
|
7964
8085
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
7965
|
-
var currentRefinement = getCurrentRefinement$
|
|
8086
|
+
var currentRefinement = getCurrentRefinement$a(props, searchState, {
|
|
7966
8087
|
ais: props.contextValue,
|
|
7967
8088
|
multiIndexContext: props.indexContextValue
|
|
7968
8089
|
});
|
|
@@ -7979,7 +8100,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
7979
8100
|
};
|
|
7980
8101
|
},
|
|
7981
8102
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7982
|
-
var id = getId$
|
|
8103
|
+
var id = getId$b();
|
|
7983
8104
|
|
|
7984
8105
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
7985
8106
|
|
|
@@ -7993,27 +8114,27 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
7993
8114
|
return cleanUpValue(searchState, {
|
|
7994
8115
|
ais: props.contextValue,
|
|
7995
8116
|
multiIndexContext: props.indexContextValue
|
|
7996
|
-
}, getId$
|
|
8117
|
+
}, getId$b());
|
|
7997
8118
|
},
|
|
7998
8119
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
7999
|
-
return searchParameters.setHitsPerPage(getCurrentRefinement$
|
|
8120
|
+
return searchParameters.setHitsPerPage(getCurrentRefinement$a(props, searchState, {
|
|
8000
8121
|
ais: props.contextValue,
|
|
8001
8122
|
multiIndexContext: props.indexContextValue
|
|
8002
8123
|
}));
|
|
8003
8124
|
},
|
|
8004
8125
|
getMetadata: function getMetadata() {
|
|
8005
8126
|
return {
|
|
8006
|
-
id: getId$
|
|
8127
|
+
id: getId$b()
|
|
8007
8128
|
};
|
|
8008
8129
|
}
|
|
8009
8130
|
});
|
|
8010
8131
|
|
|
8011
|
-
function getId$
|
|
8132
|
+
function getId$a() {
|
|
8012
8133
|
return 'page';
|
|
8013
8134
|
}
|
|
8014
8135
|
|
|
8015
|
-
function getCurrentRefinement$
|
|
8016
|
-
var id = getId$
|
|
8136
|
+
function getCurrentRefinement$9(props, searchState, context) {
|
|
8137
|
+
var id = getId$a();
|
|
8017
8138
|
var page = 1;
|
|
8018
8139
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8019
8140
|
|
|
@@ -8025,9 +8146,9 @@ function getCurrentRefinement$2(props, searchState, context) {
|
|
|
8025
8146
|
}
|
|
8026
8147
|
|
|
8027
8148
|
function getStateWithoutPage(state) {
|
|
8028
|
-
var _ref = state || {}
|
|
8029
|
-
|
|
8030
|
-
rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8149
|
+
var _ref = state || {};
|
|
8150
|
+
_ref.page;
|
|
8151
|
+
var rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8031
8152
|
|
|
8032
8153
|
return rest;
|
|
8033
8154
|
}
|
|
@@ -8136,14 +8257,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8136
8257
|
},
|
|
8137
8258
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8138
8259
|
return searchParameters.setQueryParameters({
|
|
8139
|
-
page: getCurrentRefinement$
|
|
8260
|
+
page: getCurrentRefinement$9(props, searchState, {
|
|
8140
8261
|
ais: props.contextValue,
|
|
8141
8262
|
multiIndexContext: props.indexContextValue
|
|
8142
8263
|
}) - 1
|
|
8143
8264
|
});
|
|
8144
8265
|
},
|
|
8145
8266
|
refine: function refine(props, searchState, event, index) {
|
|
8146
|
-
var id = getId$
|
|
8267
|
+
var id = getId$a();
|
|
8147
8268
|
|
|
8148
8269
|
var nextValue = _defineProperty({}, id, index + 1);
|
|
8149
8270
|
|
|
@@ -8155,14 +8276,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8155
8276
|
}
|
|
8156
8277
|
});
|
|
8157
8278
|
|
|
8158
|
-
var namespace$
|
|
8279
|
+
var namespace$4 = 'menu';
|
|
8159
8280
|
|
|
8160
|
-
function getId$
|
|
8281
|
+
function getId$9(props) {
|
|
8161
8282
|
return props.attribute;
|
|
8162
8283
|
}
|
|
8163
8284
|
|
|
8164
|
-
function getCurrentRefinement$
|
|
8165
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8285
|
+
function getCurrentRefinement$8(props, searchState, context) {
|
|
8286
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)), null);
|
|
8166
8287
|
|
|
8167
8288
|
if (currentRefinement === '') {
|
|
8168
8289
|
return null;
|
|
@@ -8172,28 +8293,28 @@ function getCurrentRefinement$3(props, searchState, context) {
|
|
|
8172
8293
|
}
|
|
8173
8294
|
|
|
8174
8295
|
function getValue$1(name, props, searchState, context) {
|
|
8175
|
-
var currentRefinement = getCurrentRefinement$
|
|
8296
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, context);
|
|
8176
8297
|
return name === currentRefinement ? '' : name;
|
|
8177
8298
|
}
|
|
8178
8299
|
|
|
8179
|
-
function getLimit(_ref) {
|
|
8300
|
+
function getLimit$1(_ref) {
|
|
8180
8301
|
var showMore = _ref.showMore,
|
|
8181
8302
|
limit = _ref.limit,
|
|
8182
8303
|
showMoreLimit = _ref.showMoreLimit;
|
|
8183
8304
|
return showMore ? showMoreLimit : limit;
|
|
8184
8305
|
}
|
|
8185
8306
|
|
|
8186
|
-
function _refine$
|
|
8187
|
-
var id = getId$
|
|
8307
|
+
function _refine$7(props, searchState, nextRefinement, context) {
|
|
8308
|
+
var id = getId$9(props);
|
|
8188
8309
|
|
|
8189
8310
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : '');
|
|
8190
8311
|
|
|
8191
8312
|
var resetPage = true;
|
|
8192
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
8313
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$4);
|
|
8193
8314
|
}
|
|
8194
8315
|
|
|
8195
|
-
function _cleanUp$
|
|
8196
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
8316
|
+
function _cleanUp$6(props, searchState, context) {
|
|
8317
|
+
return cleanUpValue(searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)));
|
|
8197
8318
|
}
|
|
8198
8319
|
|
|
8199
8320
|
var defaultSortBy = ['count:desc', 'name:asc'];
|
|
@@ -8252,7 +8373,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8252
8373
|
if (!canRefine) {
|
|
8253
8374
|
return {
|
|
8254
8375
|
items: [],
|
|
8255
|
-
currentRefinement: getCurrentRefinement$
|
|
8376
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
8256
8377
|
ais: props.contextValue,
|
|
8257
8378
|
multiIndexContext: props.indexContextValue
|
|
8258
8379
|
}),
|
|
@@ -8299,8 +8420,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8299
8420
|
|
|
8300
8421
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
8301
8422
|
return {
|
|
8302
|
-
items: transformedItems.slice(0, getLimit(props)),
|
|
8303
|
-
currentRefinement: getCurrentRefinement$
|
|
8423
|
+
items: transformedItems.slice(0, getLimit$1(props)),
|
|
8424
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
8304
8425
|
ais: props.contextValue,
|
|
8305
8426
|
multiIndexContext: props.indexContextValue
|
|
8306
8427
|
}),
|
|
@@ -8310,7 +8431,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8310
8431
|
};
|
|
8311
8432
|
},
|
|
8312
8433
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8313
|
-
return _refine$
|
|
8434
|
+
return _refine$7(props, searchState, nextRefinement, {
|
|
8314
8435
|
ais: props.contextValue,
|
|
8315
8436
|
multiIndexContext: props.indexContextValue
|
|
8316
8437
|
});
|
|
@@ -8319,11 +8440,11 @@ var connectMenu = createConnectorWithContext({
|
|
|
8319
8440
|
return {
|
|
8320
8441
|
facetName: props.attribute,
|
|
8321
8442
|
query: nextRefinement,
|
|
8322
|
-
maxFacetHits: getLimit(props)
|
|
8443
|
+
maxFacetHits: getLimit$1(props)
|
|
8323
8444
|
};
|
|
8324
8445
|
},
|
|
8325
8446
|
cleanUp: function cleanUp(props, searchState) {
|
|
8326
|
-
return _cleanUp$
|
|
8447
|
+
return _cleanUp$6(props, searchState, {
|
|
8327
8448
|
ais: props.contextValue,
|
|
8328
8449
|
multiIndexContext: props.indexContextValue
|
|
8329
8450
|
});
|
|
@@ -8331,10 +8452,10 @@ var connectMenu = createConnectorWithContext({
|
|
|
8331
8452
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8332
8453
|
var attribute = props.attribute;
|
|
8333
8454
|
searchParameters = searchParameters.setQueryParameters({
|
|
8334
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
8455
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit$1(props))
|
|
8335
8456
|
});
|
|
8336
8457
|
searchParameters = searchParameters.addDisjunctiveFacet(attribute);
|
|
8337
|
-
var currentRefinement = getCurrentRefinement$
|
|
8458
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
8338
8459
|
ais: props.contextValue,
|
|
8339
8460
|
multiIndexContext: props.indexContextValue
|
|
8340
8461
|
});
|
|
@@ -8346,8 +8467,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8346
8467
|
return searchParameters;
|
|
8347
8468
|
},
|
|
8348
8469
|
getMetadata: function getMetadata(props, searchState) {
|
|
8349
|
-
var id = getId$
|
|
8350
|
-
var currentRefinement = getCurrentRefinement$
|
|
8470
|
+
var id = getId$9(props);
|
|
8471
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
8351
8472
|
ais: props.contextValue,
|
|
8352
8473
|
multiIndexContext: props.indexContextValue
|
|
8353
8474
|
});
|
|
@@ -8361,7 +8482,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8361
8482
|
label: "".concat(props.attribute, ": ").concat(currentRefinement),
|
|
8362
8483
|
attribute: props.attribute,
|
|
8363
8484
|
value: function value(nextState) {
|
|
8364
|
-
return _refine$
|
|
8485
|
+
return _refine$7(props, nextState, '', {
|
|
8365
8486
|
ais: props.contextValue,
|
|
8366
8487
|
multiIndexContext: props.indexContextValue
|
|
8367
8488
|
});
|
|
@@ -8377,10 +8498,7 @@ function _arrayWithHoles(arr) {
|
|
|
8377
8498
|
}
|
|
8378
8499
|
|
|
8379
8500
|
function _iterableToArrayLimit(arr, i) {
|
|
8380
|
-
if (!(Symbol.iterator in Object(arr)
|
|
8381
|
-
return;
|
|
8382
|
-
}
|
|
8383
|
-
|
|
8501
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
|
8384
8502
|
var _arr = [];
|
|
8385
8503
|
var _n = true;
|
|
8386
8504
|
var _d = false;
|
|
@@ -8407,11 +8525,11 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
8407
8525
|
}
|
|
8408
8526
|
|
|
8409
8527
|
function _nonIterableRest() {
|
|
8410
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
8528
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8411
8529
|
}
|
|
8412
8530
|
|
|
8413
8531
|
function _slicedToArray(arr, i) {
|
|
8414
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
|
8532
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
8415
8533
|
}
|
|
8416
8534
|
|
|
8417
8535
|
function stringifyItem(item) {
|
|
@@ -8445,12 +8563,12 @@ function parseItem(value) {
|
|
|
8445
8563
|
|
|
8446
8564
|
var namespace$3 = 'multiRange';
|
|
8447
8565
|
|
|
8448
|
-
function getId$
|
|
8566
|
+
function getId$8(props) {
|
|
8449
8567
|
return props.attribute;
|
|
8450
8568
|
}
|
|
8451
8569
|
|
|
8452
|
-
function getCurrentRefinement$
|
|
8453
|
-
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8570
|
+
function getCurrentRefinement$7(props, searchState, context) {
|
|
8571
|
+
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$8(props)), '');
|
|
8454
8572
|
}
|
|
8455
8573
|
|
|
8456
8574
|
function isRefinementsRangeIncludesInsideItemRange(stats, start, end) {
|
|
@@ -8469,15 +8587,15 @@ function itemHasRefinement(attribute, results, value) {
|
|
|
8469
8587
|
return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end)));
|
|
8470
8588
|
}
|
|
8471
8589
|
|
|
8472
|
-
function _refine$
|
|
8473
|
-
var nextValue = _defineProperty({}, getId$
|
|
8590
|
+
function _refine$6(props, searchState, nextRefinement, context) {
|
|
8591
|
+
var nextValue = _defineProperty({}, getId$8(props), nextRefinement);
|
|
8474
8592
|
|
|
8475
8593
|
var resetPage = true;
|
|
8476
8594
|
return refineValue(searchState, nextValue, context, resetPage, namespace$3);
|
|
8477
8595
|
}
|
|
8478
8596
|
|
|
8479
|
-
function _cleanUp$
|
|
8480
|
-
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8597
|
+
function _cleanUp$5(props, searchState, context) {
|
|
8598
|
+
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$8(props)));
|
|
8481
8599
|
}
|
|
8482
8600
|
/**
|
|
8483
8601
|
* connectNumericMenu connector provides the logic to build a widget that will
|
|
@@ -8511,7 +8629,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8511
8629
|
},
|
|
8512
8630
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
8513
8631
|
var attribute = props.attribute;
|
|
8514
|
-
var currentRefinement = getCurrentRefinement$
|
|
8632
|
+
var currentRefinement = getCurrentRefinement$7(props, searchState, {
|
|
8515
8633
|
ais: props.contextValue,
|
|
8516
8634
|
multiIndexContext: props.indexContextValue
|
|
8517
8635
|
});
|
|
@@ -8525,11 +8643,11 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8525
8643
|
label: item.label,
|
|
8526
8644
|
value: value,
|
|
8527
8645
|
isRefined: value === currentRefinement,
|
|
8528
|
-
noRefinement: results ? itemHasRefinement(getId$
|
|
8646
|
+
noRefinement: results ? itemHasRefinement(getId$8(props), results, value) : false
|
|
8529
8647
|
};
|
|
8530
8648
|
});
|
|
8531
8649
|
var stats = results && results.getFacetByName(attribute) ? results.getFacetStats(attribute) : null;
|
|
8532
|
-
var refinedItem = find(items, function (item) {
|
|
8650
|
+
var refinedItem = find$2(items, function (item) {
|
|
8533
8651
|
return item.isRefined === true;
|
|
8534
8652
|
});
|
|
8535
8653
|
|
|
@@ -8554,13 +8672,13 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8554
8672
|
};
|
|
8555
8673
|
},
|
|
8556
8674
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8557
|
-
return _refine$
|
|
8675
|
+
return _refine$6(props, searchState, nextRefinement, {
|
|
8558
8676
|
ais: props.contextValue,
|
|
8559
8677
|
multiIndexContext: props.indexContextValue
|
|
8560
8678
|
});
|
|
8561
8679
|
},
|
|
8562
8680
|
cleanUp: function cleanUp(props, searchState) {
|
|
8563
|
-
return _cleanUp$
|
|
8681
|
+
return _cleanUp$5(props, searchState, {
|
|
8564
8682
|
ais: props.contextValue,
|
|
8565
8683
|
multiIndexContext: props.indexContextValue
|
|
8566
8684
|
});
|
|
@@ -8568,7 +8686,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8568
8686
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8569
8687
|
var attribute = props.attribute;
|
|
8570
8688
|
|
|
8571
|
-
var _parseItem = parseItem(getCurrentRefinement$
|
|
8689
|
+
var _parseItem = parseItem(getCurrentRefinement$7(props, searchState, {
|
|
8572
8690
|
ais: props.contextValue,
|
|
8573
8691
|
multiIndexContext: props.indexContextValue
|
|
8574
8692
|
})),
|
|
@@ -8588,8 +8706,8 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8588
8706
|
return searchParameters;
|
|
8589
8707
|
},
|
|
8590
8708
|
getMetadata: function getMetadata(props, searchState) {
|
|
8591
|
-
var id = getId$
|
|
8592
|
-
var value = getCurrentRefinement$
|
|
8709
|
+
var id = getId$8(props);
|
|
8710
|
+
var value = getCurrentRefinement$7(props, searchState, {
|
|
8593
8711
|
ais: props.contextValue,
|
|
8594
8712
|
multiIndexContext: props.indexContextValue
|
|
8595
8713
|
});
|
|
@@ -8600,7 +8718,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8600
8718
|
});
|
|
8601
8719
|
|
|
8602
8720
|
if (value !== '') {
|
|
8603
|
-
var _find = find(props.items, function (item) {
|
|
8721
|
+
var _find = find$2(props.items, function (item) {
|
|
8604
8722
|
return stringifyItem(item) === value;
|
|
8605
8723
|
}),
|
|
8606
8724
|
label = _find.label;
|
|
@@ -8610,7 +8728,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8610
8728
|
attribute: props.attribute,
|
|
8611
8729
|
currentRefinement: label,
|
|
8612
8730
|
value: function value(nextState) {
|
|
8613
|
-
return _refine$
|
|
8731
|
+
return _refine$6(props, nextState, '', {
|
|
8614
8732
|
ais: props.contextValue,
|
|
8615
8733
|
multiIndexContext: props.indexContextValue
|
|
8616
8734
|
});
|
|
@@ -8626,12 +8744,12 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8626
8744
|
}
|
|
8627
8745
|
});
|
|
8628
8746
|
|
|
8629
|
-
function getId$
|
|
8747
|
+
function getId$7() {
|
|
8630
8748
|
return 'page';
|
|
8631
8749
|
}
|
|
8632
8750
|
|
|
8633
|
-
function getCurrentRefinement$
|
|
8634
|
-
var id = getId$
|
|
8751
|
+
function getCurrentRefinement$6(props, searchState, context) {
|
|
8752
|
+
var id = getId$7();
|
|
8635
8753
|
var page = 1;
|
|
8636
8754
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8637
8755
|
|
|
@@ -8642,8 +8760,8 @@ function getCurrentRefinement$5(props, searchState, context) {
|
|
|
8642
8760
|
return currentRefinement;
|
|
8643
8761
|
}
|
|
8644
8762
|
|
|
8645
|
-
function _refine$
|
|
8646
|
-
var id = getId$
|
|
8763
|
+
function _refine$5(props, searchState, nextPage, context) {
|
|
8764
|
+
var id = getId$7();
|
|
8647
8765
|
|
|
8648
8766
|
var nextValue = _defineProperty({}, id, nextPage);
|
|
8649
8767
|
|
|
@@ -8683,7 +8801,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8683
8801
|
var nbPages = results.nbPages;
|
|
8684
8802
|
return {
|
|
8685
8803
|
nbPages: nbPages,
|
|
8686
|
-
currentRefinement: getCurrentRefinement$
|
|
8804
|
+
currentRefinement: getCurrentRefinement$6(props, searchState, {
|
|
8687
8805
|
ais: props.contextValue,
|
|
8688
8806
|
multiIndexContext: props.indexContextValue
|
|
8689
8807
|
}),
|
|
@@ -8691,7 +8809,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8691
8809
|
};
|
|
8692
8810
|
},
|
|
8693
8811
|
refine: function refine(props, searchState, nextPage) {
|
|
8694
|
-
return _refine$
|
|
8812
|
+
return _refine$5(props, searchState, nextPage, {
|
|
8695
8813
|
ais: props.contextValue,
|
|
8696
8814
|
multiIndexContext: props.indexContextValue
|
|
8697
8815
|
});
|
|
@@ -8700,17 +8818,17 @@ var connectPagination = createConnectorWithContext({
|
|
|
8700
8818
|
return cleanUpValue(searchState, {
|
|
8701
8819
|
ais: props.contextValue,
|
|
8702
8820
|
multiIndexContext: props.indexContextValue
|
|
8703
|
-
}, getId$
|
|
8821
|
+
}, getId$7());
|
|
8704
8822
|
},
|
|
8705
8823
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8706
|
-
return searchParameters.setPage(getCurrentRefinement$
|
|
8824
|
+
return searchParameters.setPage(getCurrentRefinement$6(props, searchState, {
|
|
8707
8825
|
ais: props.contextValue,
|
|
8708
8826
|
multiIndexContext: props.indexContextValue
|
|
8709
8827
|
}) - 1);
|
|
8710
8828
|
},
|
|
8711
8829
|
getMetadata: function getMetadata() {
|
|
8712
8830
|
return {
|
|
8713
|
-
id: getId$
|
|
8831
|
+
id: getId$7()
|
|
8714
8832
|
};
|
|
8715
8833
|
}
|
|
8716
8834
|
});
|
|
@@ -8756,11 +8874,11 @@ var connectPoweredBy = createConnectorWithContext({
|
|
|
8756
8874
|
* @providedPropType {number} precision - Number of digits after decimal point to use.
|
|
8757
8875
|
*/
|
|
8758
8876
|
|
|
8759
|
-
function getId$
|
|
8877
|
+
function getId$6(props) {
|
|
8760
8878
|
return props.attribute;
|
|
8761
8879
|
}
|
|
8762
8880
|
|
|
8763
|
-
var namespace$
|
|
8881
|
+
var namespace$2 = 'range';
|
|
8764
8882
|
|
|
8765
8883
|
function getCurrentRange(boundaries, stats, precision) {
|
|
8766
8884
|
var pow = Math.pow(10, precision);
|
|
@@ -8790,8 +8908,8 @@ function getCurrentRange(boundaries, stats, precision) {
|
|
|
8790
8908
|
};
|
|
8791
8909
|
}
|
|
8792
8910
|
|
|
8793
|
-
function getCurrentRefinement$
|
|
8794
|
-
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8911
|
+
function getCurrentRefinement$5(props, searchState, currentRange, context) {
|
|
8912
|
+
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)), {}),
|
|
8795
8913
|
min = _getCurrentRefinement.min,
|
|
8796
8914
|
max = _getCurrentRefinement.max;
|
|
8797
8915
|
|
|
@@ -8857,7 +8975,7 @@ function nextValueForRefinement(hasBound, isReset, range, value) {
|
|
|
8857
8975
|
return next;
|
|
8858
8976
|
}
|
|
8859
8977
|
|
|
8860
|
-
function _refine$
|
|
8978
|
+
function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
8861
8979
|
var nextMin = nextRefinement.min,
|
|
8862
8980
|
nextMax = nextRefinement.max;
|
|
8863
8981
|
var currentMinRange = currentRange.min,
|
|
@@ -8881,7 +8999,7 @@ function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
|
8881
8999
|
throw Error("You can't provide max value greater than range.");
|
|
8882
9000
|
}
|
|
8883
9001
|
|
|
8884
|
-
var id = getId$
|
|
9002
|
+
var id = getId$6(props);
|
|
8885
9003
|
var resetPage = true;
|
|
8886
9004
|
|
|
8887
9005
|
var nextValue = _defineProperty({}, id, {
|
|
@@ -8889,11 +9007,11 @@ function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
|
8889
9007
|
max: nextValueForRefinement(props.max !== undefined, isMaxReset, currentMaxRange, nextMaxAsNumber)
|
|
8890
9008
|
});
|
|
8891
9009
|
|
|
8892
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9010
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$2);
|
|
8893
9011
|
}
|
|
8894
9012
|
|
|
8895
|
-
function _cleanUp$
|
|
8896
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9013
|
+
function _cleanUp$4(props, searchState, context) {
|
|
9014
|
+
return cleanUpValue(searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)));
|
|
8897
9015
|
}
|
|
8898
9016
|
|
|
8899
9017
|
var connectRange = createConnectorWithContext({
|
|
@@ -8948,7 +9066,7 @@ var connectRange = createConnectorWithContext({
|
|
|
8948
9066
|
min: rangeMin,
|
|
8949
9067
|
max: rangeMax
|
|
8950
9068
|
};
|
|
8951
|
-
var currentRefinement = getCurrentRefinement$
|
|
9069
|
+
var currentRefinement = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
8952
9070
|
ais: props.contextValue,
|
|
8953
9071
|
multiIndexContext: props.indexContextValue
|
|
8954
9072
|
});
|
|
@@ -8962,13 +9080,13 @@ var connectRange = createConnectorWithContext({
|
|
|
8962
9080
|
};
|
|
8963
9081
|
},
|
|
8964
9082
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8965
|
-
return _refine$
|
|
9083
|
+
return _refine$4(props, searchState, nextRefinement, this._currentRange, {
|
|
8966
9084
|
ais: props.contextValue,
|
|
8967
9085
|
multiIndexContext: props.indexContextValue
|
|
8968
9086
|
});
|
|
8969
9087
|
},
|
|
8970
9088
|
cleanUp: function cleanUp(props, searchState) {
|
|
8971
|
-
return _cleanUp$
|
|
9089
|
+
return _cleanUp$4(props, searchState, {
|
|
8972
9090
|
ais: props.contextValue,
|
|
8973
9091
|
multiIndexContext: props.indexContextValue
|
|
8974
9092
|
});
|
|
@@ -8976,7 +9094,7 @@ var connectRange = createConnectorWithContext({
|
|
|
8976
9094
|
getSearchParameters: function getSearchParameters(params, props, searchState) {
|
|
8977
9095
|
var attribute = props.attribute;
|
|
8978
9096
|
|
|
8979
|
-
var _getCurrentRefinement2 = getCurrentRefinement$
|
|
9097
|
+
var _getCurrentRefinement2 = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
8980
9098
|
ais: props.contextValue,
|
|
8981
9099
|
multiIndexContext: props.indexContextValue
|
|
8982
9100
|
}),
|
|
@@ -9002,7 +9120,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9002
9120
|
minRange = _this$_currentRange.min,
|
|
9003
9121
|
maxRange = _this$_currentRange.max;
|
|
9004
9122
|
|
|
9005
|
-
var _getCurrentRefinement3 = getCurrentRefinement$
|
|
9123
|
+
var _getCurrentRefinement3 = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
9006
9124
|
ais: props.contextValue,
|
|
9007
9125
|
multiIndexContext: props.indexContextValue
|
|
9008
9126
|
}),
|
|
@@ -9021,7 +9139,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9021
9139
|
label: fragments.join(''),
|
|
9022
9140
|
attribute: props.attribute,
|
|
9023
9141
|
value: function value(nextState) {
|
|
9024
|
-
return _refine$
|
|
9142
|
+
return _refine$4(props, nextState, {}, _this._currentRange, {
|
|
9025
9143
|
ais: props.contextValue,
|
|
9026
9144
|
multiIndexContext: props.indexContextValue
|
|
9027
9145
|
});
|
|
@@ -9037,7 +9155,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9037
9155
|
}
|
|
9038
9156
|
|
|
9039
9157
|
return {
|
|
9040
|
-
id: getId$
|
|
9158
|
+
id: getId$6(props),
|
|
9041
9159
|
index: getIndexId({
|
|
9042
9160
|
ais: props.contextValue,
|
|
9043
9161
|
multiIndexContext: props.indexContextValue
|
|
@@ -9047,14 +9165,14 @@ var connectRange = createConnectorWithContext({
|
|
|
9047
9165
|
}
|
|
9048
9166
|
});
|
|
9049
9167
|
|
|
9050
|
-
var namespace$
|
|
9168
|
+
var namespace$1 = 'refinementList';
|
|
9051
9169
|
|
|
9052
|
-
function getId$
|
|
9170
|
+
function getId$5(props) {
|
|
9053
9171
|
return props.attribute;
|
|
9054
9172
|
}
|
|
9055
9173
|
|
|
9056
|
-
function getCurrentRefinement$
|
|
9057
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
9174
|
+
function getCurrentRefinement$4(props, searchState, context) {
|
|
9175
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$1, ".").concat(getId$5(props)), []);
|
|
9058
9176
|
|
|
9059
9177
|
if (typeof currentRefinement !== 'string') {
|
|
9060
9178
|
return currentRefinement;
|
|
@@ -9067,8 +9185,8 @@ function getCurrentRefinement$7(props, searchState, context) {
|
|
|
9067
9185
|
return [];
|
|
9068
9186
|
}
|
|
9069
9187
|
|
|
9070
|
-
function getValue
|
|
9071
|
-
var currentRefinement = getCurrentRefinement$
|
|
9188
|
+
function getValue(name, props, searchState, context) {
|
|
9189
|
+
var currentRefinement = getCurrentRefinement$4(props, searchState, context);
|
|
9072
9190
|
var isAnewValue = currentRefinement.indexOf(name) === -1;
|
|
9073
9191
|
var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates
|
|
9074
9192
|
: currentRefinement.filter(function (selectedValue) {
|
|
@@ -9078,15 +9196,15 @@ function getValue$2(name, props, searchState, context) {
|
|
|
9078
9196
|
return nextRefinement;
|
|
9079
9197
|
}
|
|
9080
9198
|
|
|
9081
|
-
function getLimit
|
|
9199
|
+
function getLimit(_ref) {
|
|
9082
9200
|
var showMore = _ref.showMore,
|
|
9083
9201
|
limit = _ref.limit,
|
|
9084
9202
|
showMoreLimit = _ref.showMoreLimit;
|
|
9085
9203
|
return showMore ? showMoreLimit : limit;
|
|
9086
9204
|
}
|
|
9087
9205
|
|
|
9088
|
-
function _refine$
|
|
9089
|
-
var id = getId$
|
|
9206
|
+
function _refine$3(props, searchState, nextRefinement, context) {
|
|
9207
|
+
var id = getId$5(props); // Setting the value to an empty string ensures that it is persisted in
|
|
9090
9208
|
// the URL as an empty value.
|
|
9091
9209
|
// This is necessary in the case where `defaultRefinement` contains one
|
|
9092
9210
|
// item and we try to deselect it. `nextSelected` would be an empty array,
|
|
@@ -9097,11 +9215,11 @@ function _refine$6(props, searchState, nextRefinement, context) {
|
|
|
9097
9215
|
var nextValue = _defineProperty({}, id, nextRefinement.length > 0 ? nextRefinement : '');
|
|
9098
9216
|
|
|
9099
9217
|
var resetPage = true;
|
|
9100
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9218
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$1);
|
|
9101
9219
|
}
|
|
9102
9220
|
|
|
9103
|
-
function _cleanUp$
|
|
9104
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9221
|
+
function _cleanUp$3(props, searchState, context) {
|
|
9222
|
+
return cleanUpValue(searchState, context, "".concat(namespace$1, ".").concat(getId$5(props)));
|
|
9105
9223
|
}
|
|
9106
9224
|
/**
|
|
9107
9225
|
* connectRefinementList connector provides the logic to build a widget that will
|
|
@@ -9128,7 +9246,7 @@ function _cleanUp$4(props, searchState, context) {
|
|
|
9128
9246
|
*/
|
|
9129
9247
|
|
|
9130
9248
|
|
|
9131
|
-
var sortBy
|
|
9249
|
+
var sortBy = ['isRefined', 'count:desc', 'name:asc'];
|
|
9132
9250
|
var connectRefinementList = createConnectorWithContext({
|
|
9133
9251
|
displayName: 'AlgoliaRefinementList',
|
|
9134
9252
|
propTypes: {
|
|
@@ -9166,7 +9284,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9166
9284
|
if (!canRefine) {
|
|
9167
9285
|
return {
|
|
9168
9286
|
items: [],
|
|
9169
|
-
currentRefinement: getCurrentRefinement$
|
|
9287
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, {
|
|
9170
9288
|
ais: props.contextValue,
|
|
9171
9289
|
multiIndexContext: props.indexContextValue
|
|
9172
9290
|
}),
|
|
@@ -9179,7 +9297,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9179
9297
|
var items = isFromSearch ? searchForFacetValuesResults[attribute].map(function (v) {
|
|
9180
9298
|
return {
|
|
9181
9299
|
label: v.value,
|
|
9182
|
-
value: getValue
|
|
9300
|
+
value: getValue(v.value, props, searchState, {
|
|
9183
9301
|
ais: props.contextValue,
|
|
9184
9302
|
multiIndexContext: props.indexContextValue
|
|
9185
9303
|
}),
|
|
@@ -9192,11 +9310,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9192
9310
|
isRefined: v.isRefined
|
|
9193
9311
|
};
|
|
9194
9312
|
}) : results.getFacetValues(attribute, {
|
|
9195
|
-
sortBy: sortBy
|
|
9313
|
+
sortBy: sortBy
|
|
9196
9314
|
}).map(function (v) {
|
|
9197
9315
|
return {
|
|
9198
9316
|
label: v.name,
|
|
9199
|
-
value: getValue
|
|
9317
|
+
value: getValue(v.name, props, searchState, {
|
|
9200
9318
|
ais: props.contextValue,
|
|
9201
9319
|
multiIndexContext: props.indexContextValue
|
|
9202
9320
|
}),
|
|
@@ -9206,8 +9324,8 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9206
9324
|
});
|
|
9207
9325
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
9208
9326
|
return {
|
|
9209
|
-
items: transformedItems.slice(0, getLimit
|
|
9210
|
-
currentRefinement: getCurrentRefinement$
|
|
9327
|
+
items: transformedItems.slice(0, getLimit(props)),
|
|
9328
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, {
|
|
9211
9329
|
ais: props.contextValue,
|
|
9212
9330
|
multiIndexContext: props.indexContextValue
|
|
9213
9331
|
}),
|
|
@@ -9217,7 +9335,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9217
9335
|
};
|
|
9218
9336
|
},
|
|
9219
9337
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9220
|
-
return _refine$
|
|
9338
|
+
return _refine$3(props, searchState, nextRefinement, {
|
|
9221
9339
|
ais: props.contextValue,
|
|
9222
9340
|
multiIndexContext: props.indexContextValue
|
|
9223
9341
|
});
|
|
@@ -9226,11 +9344,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9226
9344
|
return {
|
|
9227
9345
|
facetName: props.attribute,
|
|
9228
9346
|
query: nextRefinement,
|
|
9229
|
-
maxFacetHits: getLimit
|
|
9347
|
+
maxFacetHits: getLimit(props)
|
|
9230
9348
|
};
|
|
9231
9349
|
},
|
|
9232
9350
|
cleanUp: function cleanUp(props, searchState) {
|
|
9233
|
-
return _cleanUp$
|
|
9351
|
+
return _cleanUp$3(props, searchState, {
|
|
9234
9352
|
ais: props.contextValue,
|
|
9235
9353
|
multiIndexContext: props.indexContextValue
|
|
9236
9354
|
});
|
|
@@ -9241,10 +9359,10 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9241
9359
|
var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet';
|
|
9242
9360
|
var addRefinementKey = "".concat(addKey, "Refinement");
|
|
9243
9361
|
searchParameters = searchParameters.setQueryParameters({
|
|
9244
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit
|
|
9362
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
9245
9363
|
});
|
|
9246
9364
|
searchParameters = searchParameters[addKey](attribute);
|
|
9247
|
-
return getCurrentRefinement$
|
|
9365
|
+
return getCurrentRefinement$4(props, searchState, {
|
|
9248
9366
|
ais: props.contextValue,
|
|
9249
9367
|
multiIndexContext: props.indexContextValue
|
|
9250
9368
|
}).reduce(function (res, val) {
|
|
@@ -9252,7 +9370,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9252
9370
|
}, searchParameters);
|
|
9253
9371
|
},
|
|
9254
9372
|
getMetadata: function getMetadata(props, searchState) {
|
|
9255
|
-
var id = getId$
|
|
9373
|
+
var id = getId$5(props);
|
|
9256
9374
|
var context = {
|
|
9257
9375
|
ais: props.contextValue,
|
|
9258
9376
|
multiIndexContext: props.indexContextValue
|
|
@@ -9260,21 +9378,21 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9260
9378
|
return {
|
|
9261
9379
|
id: id,
|
|
9262
9380
|
index: getIndexId(context),
|
|
9263
|
-
items: getCurrentRefinement$
|
|
9381
|
+
items: getCurrentRefinement$4(props, searchState, context).length > 0 ? [{
|
|
9264
9382
|
attribute: props.attribute,
|
|
9265
9383
|
label: "".concat(props.attribute, ": "),
|
|
9266
|
-
currentRefinement: getCurrentRefinement$
|
|
9384
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, context),
|
|
9267
9385
|
value: function value(nextState) {
|
|
9268
|
-
return _refine$
|
|
9386
|
+
return _refine$3(props, nextState, [], context);
|
|
9269
9387
|
},
|
|
9270
|
-
items: getCurrentRefinement$
|
|
9388
|
+
items: getCurrentRefinement$4(props, searchState, context).map(function (item) {
|
|
9271
9389
|
return {
|
|
9272
9390
|
label: "".concat(item),
|
|
9273
9391
|
value: function value(nextState) {
|
|
9274
|
-
var nextSelectedItems = getCurrentRefinement$
|
|
9392
|
+
var nextSelectedItems = getCurrentRefinement$4(props, nextState, context).filter(function (other) {
|
|
9275
9393
|
return other !== item;
|
|
9276
9394
|
});
|
|
9277
|
-
return _refine$
|
|
9395
|
+
return _refine$3(props, searchState, nextSelectedItems, context);
|
|
9278
9396
|
}
|
|
9279
9397
|
};
|
|
9280
9398
|
})
|
|
@@ -9333,7 +9451,7 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9333
9451
|
// See: https://github.com/algolia/react-instantsearch/issues/164
|
|
9334
9452
|
|
|
9335
9453
|
|
|
9336
|
-
var cleanedSearchState = omit(searchState, ['configure', id]);
|
|
9454
|
+
var cleanedSearchState = omit$1(searchState, ['configure', id]);
|
|
9337
9455
|
var hasNotChanged = shallowEqual(this._prevSearchState, cleanedSearchState);
|
|
9338
9456
|
this._prevSearchState = cleanedSearchState;
|
|
9339
9457
|
return {
|
|
@@ -9343,12 +9461,12 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9343
9461
|
}
|
|
9344
9462
|
});
|
|
9345
9463
|
|
|
9346
|
-
function getId$
|
|
9464
|
+
function getId$4() {
|
|
9347
9465
|
return 'query';
|
|
9348
9466
|
}
|
|
9349
9467
|
|
|
9350
|
-
function getCurrentRefinement$
|
|
9351
|
-
var id = getId$
|
|
9468
|
+
function getCurrentRefinement$3(props, searchState, context) {
|
|
9469
|
+
var id = getId$4();
|
|
9352
9470
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9353
9471
|
|
|
9354
9472
|
if (currentRefinement) {
|
|
@@ -9358,8 +9476,8 @@ function getCurrentRefinement$8(props, searchState, context) {
|
|
|
9358
9476
|
return '';
|
|
9359
9477
|
}
|
|
9360
9478
|
|
|
9361
|
-
function _refine$
|
|
9362
|
-
var id = getId$
|
|
9479
|
+
function _refine$2(props, searchState, nextRefinement, context) {
|
|
9480
|
+
var id = getId$4();
|
|
9363
9481
|
|
|
9364
9482
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9365
9483
|
|
|
@@ -9367,8 +9485,8 @@ function _refine$7(props, searchState, nextRefinement, context) {
|
|
|
9367
9485
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9368
9486
|
}
|
|
9369
9487
|
|
|
9370
|
-
function _cleanUp$
|
|
9371
|
-
return cleanUpValue(searchState, context, getId$
|
|
9488
|
+
function _cleanUp$2(props, searchState, context) {
|
|
9489
|
+
return cleanUpValue(searchState, context, getId$4());
|
|
9372
9490
|
}
|
|
9373
9491
|
/**
|
|
9374
9492
|
* connectSearchBox connector provides the logic to build a widget that will
|
|
@@ -9389,7 +9507,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9389
9507
|
},
|
|
9390
9508
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
9391
9509
|
return {
|
|
9392
|
-
currentRefinement: getCurrentRefinement$
|
|
9510
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
9393
9511
|
ais: props.contextValue,
|
|
9394
9512
|
multiIndexContext: props.indexContextValue
|
|
9395
9513
|
}),
|
|
@@ -9397,26 +9515,26 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9397
9515
|
};
|
|
9398
9516
|
},
|
|
9399
9517
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9400
|
-
return _refine$
|
|
9518
|
+
return _refine$2(props, searchState, nextRefinement, {
|
|
9401
9519
|
ais: props.contextValue,
|
|
9402
9520
|
multiIndexContext: props.indexContextValue
|
|
9403
9521
|
});
|
|
9404
9522
|
},
|
|
9405
9523
|
cleanUp: function cleanUp(props, searchState) {
|
|
9406
|
-
return _cleanUp$
|
|
9524
|
+
return _cleanUp$2(props, searchState, {
|
|
9407
9525
|
ais: props.contextValue,
|
|
9408
9526
|
multiIndexContext: props.indexContextValue
|
|
9409
9527
|
});
|
|
9410
9528
|
},
|
|
9411
9529
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9412
|
-
return searchParameters.setQuery(getCurrentRefinement$
|
|
9530
|
+
return searchParameters.setQuery(getCurrentRefinement$3(props, searchState, {
|
|
9413
9531
|
ais: props.contextValue,
|
|
9414
9532
|
multiIndexContext: props.indexContextValue
|
|
9415
9533
|
}));
|
|
9416
9534
|
},
|
|
9417
9535
|
getMetadata: function getMetadata(props, searchState) {
|
|
9418
|
-
var id = getId$
|
|
9419
|
-
var currentRefinement = getCurrentRefinement$
|
|
9536
|
+
var id = getId$4();
|
|
9537
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
9420
9538
|
ais: props.contextValue,
|
|
9421
9539
|
multiIndexContext: props.indexContextValue
|
|
9422
9540
|
});
|
|
@@ -9429,7 +9547,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9429
9547
|
items: currentRefinement === null ? [] : [{
|
|
9430
9548
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9431
9549
|
value: function value(nextState) {
|
|
9432
|
-
return _refine$
|
|
9550
|
+
return _refine$2(props, nextState, '', {
|
|
9433
9551
|
ais: props.contextValue,
|
|
9434
9552
|
multiIndexContext: props.indexContextValue
|
|
9435
9553
|
});
|
|
@@ -9440,12 +9558,12 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9440
9558
|
}
|
|
9441
9559
|
});
|
|
9442
9560
|
|
|
9443
|
-
function getId$
|
|
9561
|
+
function getId$3() {
|
|
9444
9562
|
return 'relevancyStrictness';
|
|
9445
9563
|
}
|
|
9446
9564
|
|
|
9447
|
-
function getCurrentRefinement$
|
|
9448
|
-
var id = getId$
|
|
9565
|
+
function getCurrentRefinement$2(props, searchState, context) {
|
|
9566
|
+
var id = getId$3();
|
|
9449
9567
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id);
|
|
9450
9568
|
return currentRefinement;
|
|
9451
9569
|
}
|
|
@@ -9471,13 +9589,13 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9471
9589
|
};
|
|
9472
9590
|
},
|
|
9473
9591
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9474
|
-
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$
|
|
9592
|
+
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$2(props, searchState, {
|
|
9475
9593
|
ais: props.contextValue,
|
|
9476
9594
|
multiIndexContext: props.indexContextValue
|
|
9477
9595
|
}));
|
|
9478
9596
|
},
|
|
9479
9597
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9480
|
-
var nextValue = _defineProperty({}, getId$
|
|
9598
|
+
var nextValue = _defineProperty({}, getId$3(), nextRefinement);
|
|
9481
9599
|
|
|
9482
9600
|
var resetPage = true;
|
|
9483
9601
|
return refineValue(searchState, nextValue, {
|
|
@@ -9487,12 +9605,12 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9487
9605
|
}
|
|
9488
9606
|
});
|
|
9489
9607
|
|
|
9490
|
-
function getId$
|
|
9608
|
+
function getId$2() {
|
|
9491
9609
|
return 'sortBy';
|
|
9492
9610
|
}
|
|
9493
9611
|
|
|
9494
|
-
function getCurrentRefinement$
|
|
9495
|
-
var id = getId$
|
|
9612
|
+
function getCurrentRefinement$1(props, searchState, context) {
|
|
9613
|
+
var id = getId$2();
|
|
9496
9614
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
9497
9615
|
|
|
9498
9616
|
if (currentRefinement) {
|
|
@@ -9529,7 +9647,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9529
9647
|
transformItems: PropTypes.func
|
|
9530
9648
|
},
|
|
9531
9649
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
9532
|
-
var currentRefinement = getCurrentRefinement$
|
|
9650
|
+
var currentRefinement = getCurrentRefinement$1(props, searchState, {
|
|
9533
9651
|
ais: props.contextValue,
|
|
9534
9652
|
multiIndexContext: props.indexContextValue
|
|
9535
9653
|
});
|
|
@@ -9546,7 +9664,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9546
9664
|
};
|
|
9547
9665
|
},
|
|
9548
9666
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9549
|
-
var id = getId$
|
|
9667
|
+
var id = getId$2();
|
|
9550
9668
|
|
|
9551
9669
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9552
9670
|
|
|
@@ -9560,10 +9678,10 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9560
9678
|
return cleanUpValue(searchState, {
|
|
9561
9679
|
ais: props.contextValue,
|
|
9562
9680
|
multiIndexContext: props.indexContextValue
|
|
9563
|
-
}, getId$
|
|
9681
|
+
}, getId$2());
|
|
9564
9682
|
},
|
|
9565
9683
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9566
|
-
var selectedIndex = getCurrentRefinement$
|
|
9684
|
+
var selectedIndex = getCurrentRefinement$1(props, searchState, {
|
|
9567
9685
|
ais: props.contextValue,
|
|
9568
9686
|
multiIndexContext: props.indexContextValue
|
|
9569
9687
|
});
|
|
@@ -9571,7 +9689,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9571
9689
|
},
|
|
9572
9690
|
getMetadata: function getMetadata() {
|
|
9573
9691
|
return {
|
|
9574
|
-
id: getId$
|
|
9692
|
+
id: getId$2()
|
|
9575
9693
|
};
|
|
9576
9694
|
}
|
|
9577
9695
|
});
|
|
@@ -9607,15 +9725,15 @@ var connectStats = createConnectorWithContext({
|
|
|
9607
9725
|
}
|
|
9608
9726
|
});
|
|
9609
9727
|
|
|
9610
|
-
function getId$
|
|
9728
|
+
function getId$1(props) {
|
|
9611
9729
|
return props.attribute;
|
|
9612
9730
|
}
|
|
9613
9731
|
|
|
9614
|
-
var namespace
|
|
9732
|
+
var namespace = 'toggle';
|
|
9615
9733
|
var falsyStrings = ['0', 'false', 'null', 'undefined'];
|
|
9616
9734
|
|
|
9617
|
-
function getCurrentRefinement
|
|
9618
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace
|
|
9735
|
+
function getCurrentRefinement(props, searchState, context) {
|
|
9736
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace, ".").concat(getId$1(props)), false);
|
|
9619
9737
|
|
|
9620
9738
|
if (falsyStrings.indexOf(currentRefinement) !== -1) {
|
|
9621
9739
|
return false;
|
|
@@ -9624,17 +9742,17 @@ function getCurrentRefinement$b(props, searchState, context) {
|
|
|
9624
9742
|
return Boolean(currentRefinement);
|
|
9625
9743
|
}
|
|
9626
9744
|
|
|
9627
|
-
function _refine$
|
|
9628
|
-
var id = getId$
|
|
9745
|
+
function _refine$1(props, searchState, nextRefinement, context) {
|
|
9746
|
+
var id = getId$1(props);
|
|
9629
9747
|
|
|
9630
9748
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : false);
|
|
9631
9749
|
|
|
9632
9750
|
var resetPage = true;
|
|
9633
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace
|
|
9751
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
9634
9752
|
}
|
|
9635
9753
|
|
|
9636
|
-
function _cleanUp$
|
|
9637
|
-
return cleanUpValue(searchState, context, "".concat(namespace
|
|
9754
|
+
function _cleanUp$1(props, searchState, context) {
|
|
9755
|
+
return cleanUpValue(searchState, context, "".concat(namespace, ".").concat(getId$1(props)));
|
|
9638
9756
|
}
|
|
9639
9757
|
/**
|
|
9640
9758
|
* connectToggleRefinement connector provides the logic to build a widget that will
|
|
@@ -9673,14 +9791,14 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9673
9791
|
ais: props.contextValue,
|
|
9674
9792
|
multiIndexContext: props.indexContextValue
|
|
9675
9793
|
});
|
|
9676
|
-
var currentRefinement = getCurrentRefinement
|
|
9794
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
9677
9795
|
ais: props.contextValue,
|
|
9678
9796
|
multiIndexContext: props.indexContextValue
|
|
9679
9797
|
});
|
|
9680
9798
|
var allFacetValues = results && results.getFacetByName(attribute) ? results.getFacetValues(attribute) : null;
|
|
9681
9799
|
var facetValue = // Use null to always be consistent with type of the value
|
|
9682
9800
|
// count: number | null
|
|
9683
|
-
allFacetValues && allFacetValues.length ? find(allFacetValues, function (item) {
|
|
9801
|
+
allFacetValues && allFacetValues.length ? find$2(allFacetValues, function (item) {
|
|
9684
9802
|
return item.name === value.toString();
|
|
9685
9803
|
}) : null;
|
|
9686
9804
|
var facetValueCount = facetValue && facetValue.count;
|
|
@@ -9701,13 +9819,13 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9701
9819
|
};
|
|
9702
9820
|
},
|
|
9703
9821
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9704
|
-
return _refine$
|
|
9822
|
+
return _refine$1(props, searchState, nextRefinement, {
|
|
9705
9823
|
ais: props.contextValue,
|
|
9706
9824
|
multiIndexContext: props.indexContextValue
|
|
9707
9825
|
});
|
|
9708
9826
|
},
|
|
9709
9827
|
cleanUp: function cleanUp(props, searchState) {
|
|
9710
|
-
return _cleanUp$
|
|
9828
|
+
return _cleanUp$1(props, searchState, {
|
|
9711
9829
|
ais: props.contextValue,
|
|
9712
9830
|
multiIndexContext: props.indexContextValue
|
|
9713
9831
|
});
|
|
@@ -9716,7 +9834,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9716
9834
|
var attribute = props.attribute,
|
|
9717
9835
|
value = props.value,
|
|
9718
9836
|
filter = props.filter;
|
|
9719
|
-
var checked = getCurrentRefinement
|
|
9837
|
+
var checked = getCurrentRefinement(props, searchState, {
|
|
9720
9838
|
ais: props.contextValue,
|
|
9721
9839
|
multiIndexContext: props.indexContextValue
|
|
9722
9840
|
});
|
|
@@ -9733,8 +9851,8 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9733
9851
|
return nextSearchParameters;
|
|
9734
9852
|
},
|
|
9735
9853
|
getMetadata: function getMetadata(props, searchState) {
|
|
9736
|
-
var id = getId$
|
|
9737
|
-
var checked = getCurrentRefinement
|
|
9854
|
+
var id = getId$1(props);
|
|
9855
|
+
var checked = getCurrentRefinement(props, searchState, {
|
|
9738
9856
|
ais: props.contextValue,
|
|
9739
9857
|
multiIndexContext: props.indexContextValue
|
|
9740
9858
|
});
|
|
@@ -9750,7 +9868,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9750
9868
|
currentRefinement: checked,
|
|
9751
9869
|
attribute: props.attribute,
|
|
9752
9870
|
value: function value(nextState) {
|
|
9753
|
-
return _refine$
|
|
9871
|
+
return _refine$1(props, nextState, false, {
|
|
9754
9872
|
ais: props.contextValue,
|
|
9755
9873
|
multiIndexContext: props.indexContextValue
|
|
9756
9874
|
});
|
|
@@ -9766,7 +9884,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9766
9884
|
}
|
|
9767
9885
|
});
|
|
9768
9886
|
|
|
9769
|
-
function getId
|
|
9887
|
+
function getId() {
|
|
9770
9888
|
return 'query';
|
|
9771
9889
|
}
|
|
9772
9890
|
|
|
@@ -9775,7 +9893,7 @@ function getAdditionalId() {
|
|
|
9775
9893
|
}
|
|
9776
9894
|
|
|
9777
9895
|
function getCurrentRefinementQuery(props, searchState, context) {
|
|
9778
|
-
var id = getId
|
|
9896
|
+
var id = getId();
|
|
9779
9897
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9780
9898
|
|
|
9781
9899
|
if (currentRefinement) {
|
|
@@ -9796,10 +9914,10 @@ function getCurrentRefinementAdditional(props, searchState, context) {
|
|
|
9796
9914
|
return {};
|
|
9797
9915
|
}
|
|
9798
9916
|
|
|
9799
|
-
function _refine
|
|
9917
|
+
function _refine(props, searchState, nextRefinement, context) {
|
|
9800
9918
|
var _nextValue;
|
|
9801
9919
|
|
|
9802
|
-
var id = getId
|
|
9920
|
+
var id = getId();
|
|
9803
9921
|
var voiceParams = getAdditionalId();
|
|
9804
9922
|
var queryLanguages = props.language ? {
|
|
9805
9923
|
queryLanguages: [props.language.split('-')[0]]
|
|
@@ -9816,8 +9934,8 @@ function _refine$9(props, searchState, nextRefinement, context) {
|
|
|
9816
9934
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9817
9935
|
}
|
|
9818
9936
|
|
|
9819
|
-
function _cleanUp
|
|
9820
|
-
var interimState = cleanUpValue(searchState, context, getId
|
|
9937
|
+
function _cleanUp(props, searchState, context) {
|
|
9938
|
+
var interimState = cleanUpValue(searchState, context, getId());
|
|
9821
9939
|
return cleanUpValue(interimState, context, getAdditionalId());
|
|
9822
9940
|
}
|
|
9823
9941
|
|
|
@@ -9836,13 +9954,13 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9836
9954
|
};
|
|
9837
9955
|
},
|
|
9838
9956
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9839
|
-
return _refine
|
|
9957
|
+
return _refine(props, searchState, nextRefinement, {
|
|
9840
9958
|
ais: props.contextValue,
|
|
9841
9959
|
multiIndexContext: props.indexContextValue
|
|
9842
9960
|
});
|
|
9843
9961
|
},
|
|
9844
9962
|
cleanUp: function cleanUp(props, searchState) {
|
|
9845
|
-
return _cleanUp
|
|
9963
|
+
return _cleanUp(props, searchState, {
|
|
9846
9964
|
ais: props.contextValue,
|
|
9847
9965
|
multiIndexContext: props.indexContextValue
|
|
9848
9966
|
});
|
|
@@ -9859,7 +9977,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9859
9977
|
return searchParameters.setQuery(query).setQueryParameters(additionalParams);
|
|
9860
9978
|
},
|
|
9861
9979
|
getMetadata: function getMetadata(props, searchState) {
|
|
9862
|
-
var id = getId
|
|
9980
|
+
var id = getId();
|
|
9863
9981
|
var currentRefinement = getCurrentRefinementQuery(props, searchState, {
|
|
9864
9982
|
ais: props.contextValue,
|
|
9865
9983
|
multiIndexContext: props.indexContextValue
|
|
@@ -9873,7 +9991,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9873
9991
|
items: currentRefinement === null ? [] : [{
|
|
9874
9992
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9875
9993
|
value: function value(nextState) {
|
|
9876
|
-
return _refine
|
|
9994
|
+
return _refine(props, nextState, '', {
|
|
9877
9995
|
ais: props.contextValue,
|
|
9878
9996
|
multiIndexContext: props.indexContextValue
|
|
9879
9997
|
});
|
|
@@ -9926,7 +10044,7 @@ function range(_ref) {
|
|
|
9926
10044
|
return (start + current) * limitStep;
|
|
9927
10045
|
});
|
|
9928
10046
|
}
|
|
9929
|
-
function find
|
|
10047
|
+
function find(array, comparator) {
|
|
9930
10048
|
if (!Array.isArray(array)) {
|
|
9931
10049
|
return undefined;
|
|
9932
10050
|
}
|
|
@@ -9940,11 +10058,11 @@ function find$2(array, comparator) {
|
|
|
9940
10058
|
return undefined;
|
|
9941
10059
|
}
|
|
9942
10060
|
|
|
9943
|
-
var cx = createClassNames('Panel');
|
|
10061
|
+
var cx$p = createClassNames('Panel');
|
|
9944
10062
|
|
|
9945
|
-
var _createContext
|
|
9946
|
-
PanelConsumer = _createContext
|
|
9947
|
-
PanelProvider = _createContext
|
|
10063
|
+
var _createContext = createContext(function setCanRefine() {}),
|
|
10064
|
+
PanelConsumer = _createContext.Consumer,
|
|
10065
|
+
PanelProvider = _createContext.Provider;
|
|
9948
10066
|
|
|
9949
10067
|
var Panel =
|
|
9950
10068
|
/*#__PURE__*/
|
|
@@ -9986,16 +10104,16 @@ function (_Component) {
|
|
|
9986
10104
|
header = _this$props.header,
|
|
9987
10105
|
footer = _this$props.footer;
|
|
9988
10106
|
var canRefine = this.state.canRefine;
|
|
9989
|
-
return
|
|
9990
|
-
className: classnames(cx('', !canRefine && '-noRefinement'), className)
|
|
9991
|
-
}, header &&
|
|
9992
|
-
className: cx('header')
|
|
9993
|
-
}, header),
|
|
9994
|
-
className: cx('body')
|
|
9995
|
-
},
|
|
10107
|
+
return React.createElement("div", {
|
|
10108
|
+
className: classnames(cx$p('', !canRefine && '-noRefinement'), className)
|
|
10109
|
+
}, header && React.createElement("div", {
|
|
10110
|
+
className: cx$p('header')
|
|
10111
|
+
}, header), React.createElement("div", {
|
|
10112
|
+
className: cx$p('body')
|
|
10113
|
+
}, React.createElement(PanelProvider, {
|
|
9996
10114
|
value: this.setCanRefine
|
|
9997
|
-
}, children)), footer &&
|
|
9998
|
-
className: cx('footer')
|
|
10115
|
+
}, children)), footer && React.createElement("div", {
|
|
10116
|
+
className: cx$p('footer')
|
|
9999
10117
|
}, footer));
|
|
10000
10118
|
}
|
|
10001
10119
|
}]);
|
|
@@ -10058,8 +10176,8 @@ _defineProperty(PanelCallbackHandler, "propTypes", {
|
|
|
10058
10176
|
var PanelWrapper = function PanelWrapper(_ref) {
|
|
10059
10177
|
var canRefine = _ref.canRefine,
|
|
10060
10178
|
children = _ref.children;
|
|
10061
|
-
return
|
|
10062
|
-
return
|
|
10179
|
+
return React.createElement(PanelConsumer, null, function (setCanRefine) {
|
|
10180
|
+
return React.createElement(PanelCallbackHandler, {
|
|
10063
10181
|
setCanRefine: setCanRefine,
|
|
10064
10182
|
canRefine: canRefine
|
|
10065
10183
|
}, children);
|
|
@@ -10105,7 +10223,7 @@ function (_Component) {
|
|
|
10105
10223
|
_createClass(Link, [{
|
|
10106
10224
|
key: "render",
|
|
10107
10225
|
value: function render() {
|
|
10108
|
-
return
|
|
10226
|
+
return React.createElement("a", _extends({}, this.props, {
|
|
10109
10227
|
onClick: this.onClick
|
|
10110
10228
|
}));
|
|
10111
10229
|
}
|
|
@@ -10118,8 +10236,8 @@ _defineProperty(Link, "propTypes", {
|
|
|
10118
10236
|
onClick: PropTypes.func.isRequired
|
|
10119
10237
|
});
|
|
10120
10238
|
|
|
10121
|
-
var cx$
|
|
10122
|
-
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
10239
|
+
var cx$o = createClassNames('Breadcrumb');
|
|
10240
|
+
var itemsPropType$2 = PropTypes.arrayOf(PropTypes.shape({
|
|
10123
10241
|
label: PropTypes.string.isRequired,
|
|
10124
10242
|
value: PropTypes.string.isRequired
|
|
10125
10243
|
}));
|
|
@@ -10147,10 +10265,10 @@ function (_Component) {
|
|
|
10147
10265
|
separator = _this$props.separator,
|
|
10148
10266
|
translate = _this$props.translate,
|
|
10149
10267
|
className = _this$props.className;
|
|
10150
|
-
var rootPath = canRefine ?
|
|
10151
|
-
className: cx$
|
|
10152
|
-
},
|
|
10153
|
-
className: cx$
|
|
10268
|
+
var rootPath = canRefine ? React.createElement("li", {
|
|
10269
|
+
className: cx$o('item')
|
|
10270
|
+
}, React.createElement(Link, {
|
|
10271
|
+
className: cx$o('link'),
|
|
10154
10272
|
onClick: function onClick() {
|
|
10155
10273
|
return !rootURL ? refine() : null;
|
|
10156
10274
|
},
|
|
@@ -10158,23 +10276,23 @@ function (_Component) {
|
|
|
10158
10276
|
}, translate('rootLabel'))) : null;
|
|
10159
10277
|
var breadcrumb = items.map(function (item, idx) {
|
|
10160
10278
|
var isLast = idx === items.length - 1;
|
|
10161
|
-
return
|
|
10162
|
-
className: cx$
|
|
10279
|
+
return React.createElement("li", {
|
|
10280
|
+
className: cx$o('item', isLast && 'item--selected'),
|
|
10163
10281
|
key: idx
|
|
10164
|
-
},
|
|
10165
|
-
className: cx$
|
|
10166
|
-
}, separator), !isLast ?
|
|
10167
|
-
className: cx$
|
|
10282
|
+
}, React.createElement("span", {
|
|
10283
|
+
className: cx$o('separator')
|
|
10284
|
+
}, separator), !isLast ? React.createElement(Link, {
|
|
10285
|
+
className: cx$o('link'),
|
|
10168
10286
|
onClick: function onClick() {
|
|
10169
10287
|
return refine(item.value);
|
|
10170
10288
|
},
|
|
10171
10289
|
href: createURL(item.value)
|
|
10172
10290
|
}, item.label) : item.label);
|
|
10173
10291
|
});
|
|
10174
|
-
return
|
|
10175
|
-
className: classnames(cx$
|
|
10176
|
-
},
|
|
10177
|
-
className: cx$
|
|
10292
|
+
return React.createElement("div", {
|
|
10293
|
+
className: classnames(cx$o('', !canRefine && '-noRefinement'), className)
|
|
10294
|
+
}, React.createElement("ul", {
|
|
10295
|
+
className: cx$o('list')
|
|
10178
10296
|
}, rootPath, breadcrumb));
|
|
10179
10297
|
}
|
|
10180
10298
|
}]);
|
|
@@ -10185,7 +10303,7 @@ function (_Component) {
|
|
|
10185
10303
|
_defineProperty(Breadcrumb, "propTypes", {
|
|
10186
10304
|
canRefine: PropTypes.bool.isRequired,
|
|
10187
10305
|
createURL: PropTypes.func.isRequired,
|
|
10188
|
-
items: itemsPropType,
|
|
10306
|
+
items: itemsPropType$2,
|
|
10189
10307
|
refine: PropTypes.func.isRequired,
|
|
10190
10308
|
rootURL: PropTypes.string,
|
|
10191
10309
|
separator: PropTypes.node,
|
|
@@ -10292,12 +10410,12 @@ var Breadcrumb$1 = translatable({
|
|
|
10292
10410
|
*/
|
|
10293
10411
|
|
|
10294
10412
|
var BreadcrumbWidget = function BreadcrumbWidget(props) {
|
|
10295
|
-
return
|
|
10413
|
+
return React.createElement(PanelWrapper, props, React.createElement(Breadcrumb$1, props));
|
|
10296
10414
|
};
|
|
10297
10415
|
|
|
10298
10416
|
connectBreadcrumb(BreadcrumbWidget);
|
|
10299
10417
|
|
|
10300
|
-
var cx$
|
|
10418
|
+
var cx$n = createClassNames('ClearRefinements');
|
|
10301
10419
|
|
|
10302
10420
|
var ClearRefinements =
|
|
10303
10421
|
/*#__PURE__*/
|
|
@@ -10319,10 +10437,10 @@ function (_Component) {
|
|
|
10319
10437
|
refine = _this$props.refine,
|
|
10320
10438
|
translate = _this$props.translate,
|
|
10321
10439
|
className = _this$props.className;
|
|
10322
|
-
return
|
|
10323
|
-
className: classnames(cx$
|
|
10324
|
-
},
|
|
10325
|
-
className: cx$
|
|
10440
|
+
return React.createElement("div", {
|
|
10441
|
+
className: classnames(cx$n(''), className)
|
|
10442
|
+
}, React.createElement("button", {
|
|
10443
|
+
className: cx$n('button', !canRefine && 'button--disabled'),
|
|
10326
10444
|
onClick: function onClick() {
|
|
10327
10445
|
return refine(items);
|
|
10328
10446
|
},
|
|
@@ -10385,44 +10503,44 @@ var ClearRefinements$1 = translatable({
|
|
|
10385
10503
|
*/
|
|
10386
10504
|
|
|
10387
10505
|
var ClearRefinementsWidget = function ClearRefinementsWidget(props) {
|
|
10388
|
-
return
|
|
10506
|
+
return React.createElement(PanelWrapper, props, React.createElement(ClearRefinements$1, props));
|
|
10389
10507
|
};
|
|
10390
10508
|
|
|
10391
10509
|
connectCurrentRefinements(ClearRefinementsWidget);
|
|
10392
10510
|
|
|
10393
|
-
var cx$
|
|
10511
|
+
var cx$m = createClassNames('CurrentRefinements');
|
|
10394
10512
|
var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
10395
10513
|
var items = _ref.items,
|
|
10396
10514
|
canRefine = _ref.canRefine,
|
|
10397
10515
|
refine = _ref.refine,
|
|
10398
10516
|
translate = _ref.translate,
|
|
10399
10517
|
className = _ref.className;
|
|
10400
|
-
return
|
|
10401
|
-
className: classnames(cx$
|
|
10402
|
-
},
|
|
10403
|
-
className: cx$
|
|
10518
|
+
return React.createElement("div", {
|
|
10519
|
+
className: classnames(cx$m('', !canRefine && '-noRefinement'), className)
|
|
10520
|
+
}, React.createElement("ul", {
|
|
10521
|
+
className: cx$m('list', !canRefine && 'list--noRefinement')
|
|
10404
10522
|
}, items.map(function (item) {
|
|
10405
|
-
return
|
|
10523
|
+
return React.createElement("li", {
|
|
10406
10524
|
key: item.label,
|
|
10407
|
-
className: cx$
|
|
10408
|
-
},
|
|
10409
|
-
className: cx$
|
|
10525
|
+
className: cx$m('item')
|
|
10526
|
+
}, React.createElement("span", {
|
|
10527
|
+
className: cx$m('label')
|
|
10410
10528
|
}, item.label), item.items ? item.items.map(function (nest) {
|
|
10411
|
-
return
|
|
10529
|
+
return React.createElement("span", {
|
|
10412
10530
|
key: nest.label,
|
|
10413
|
-
className: cx$
|
|
10414
|
-
},
|
|
10415
|
-
className: cx$
|
|
10416
|
-
}, nest.label),
|
|
10417
|
-
className: cx$
|
|
10531
|
+
className: cx$m('category')
|
|
10532
|
+
}, React.createElement("span", {
|
|
10533
|
+
className: cx$m('categoryLabel')
|
|
10534
|
+
}, nest.label), React.createElement("button", {
|
|
10535
|
+
className: cx$m('delete'),
|
|
10418
10536
|
onClick: function onClick() {
|
|
10419
10537
|
return refine(nest.value);
|
|
10420
10538
|
}
|
|
10421
10539
|
}, translate('clearFilter', nest)));
|
|
10422
|
-
}) :
|
|
10423
|
-
className: cx$
|
|
10424
|
-
},
|
|
10425
|
-
className: cx$
|
|
10540
|
+
}) : React.createElement("span", {
|
|
10541
|
+
className: cx$m('category')
|
|
10542
|
+
}, React.createElement("button", {
|
|
10543
|
+
className: cx$m('delete'),
|
|
10426
10544
|
onClick: function onClick() {
|
|
10427
10545
|
return refine(item.value);
|
|
10428
10546
|
}
|
|
@@ -10493,33 +10611,33 @@ var CurrentRefinements$1 = translatable({
|
|
|
10493
10611
|
*/
|
|
10494
10612
|
|
|
10495
10613
|
var CurrentRefinementsWidget = function CurrentRefinementsWidget(props) {
|
|
10496
|
-
return
|
|
10614
|
+
return React.createElement(PanelWrapper, props, React.createElement(CurrentRefinements$1, props));
|
|
10497
10615
|
};
|
|
10498
10616
|
|
|
10499
10617
|
connectCurrentRefinements(CurrentRefinementsWidget);
|
|
10500
10618
|
|
|
10501
|
-
var cx$
|
|
10502
|
-
var defaultLoadingIndicator =
|
|
10619
|
+
var cx$l = createClassNames('SearchBox');
|
|
10620
|
+
var defaultLoadingIndicator = React.createElement("svg", {
|
|
10503
10621
|
width: "18",
|
|
10504
10622
|
height: "18",
|
|
10505
10623
|
viewBox: "0 0 38 38",
|
|
10506
10624
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10507
10625
|
stroke: "#444",
|
|
10508
|
-
className: cx$
|
|
10509
|
-
},
|
|
10626
|
+
className: cx$l('loadingIcon')
|
|
10627
|
+
}, React.createElement("g", {
|
|
10510
10628
|
fill: "none",
|
|
10511
10629
|
fillRule: "evenodd"
|
|
10512
|
-
},
|
|
10630
|
+
}, React.createElement("g", {
|
|
10513
10631
|
transform: "translate(1 1)",
|
|
10514
10632
|
strokeWidth: "2"
|
|
10515
|
-
},
|
|
10633
|
+
}, React.createElement("circle", {
|
|
10516
10634
|
strokeOpacity: ".5",
|
|
10517
10635
|
cx: "18",
|
|
10518
10636
|
cy: "18",
|
|
10519
10637
|
r: "18"
|
|
10520
|
-
}),
|
|
10638
|
+
}), React.createElement("path", {
|
|
10521
10639
|
d: "M36 18c0-9.94-8.06-18-18-18"
|
|
10522
|
-
},
|
|
10640
|
+
}, React.createElement("animateTransform", {
|
|
10523
10641
|
attributeName: "transform",
|
|
10524
10642
|
type: "rotate",
|
|
10525
10643
|
from: "0 18 18",
|
|
@@ -10527,26 +10645,26 @@ var defaultLoadingIndicator = React__default.createElement("svg", {
|
|
|
10527
10645
|
dur: "1s",
|
|
10528
10646
|
repeatCount: "indefinite"
|
|
10529
10647
|
})))));
|
|
10530
|
-
var defaultReset =
|
|
10531
|
-
className: cx$
|
|
10648
|
+
var defaultReset = React.createElement("svg", {
|
|
10649
|
+
className: cx$l('resetIcon'),
|
|
10532
10650
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10533
10651
|
viewBox: "0 0 20 20",
|
|
10534
10652
|
width: "10",
|
|
10535
10653
|
height: "10"
|
|
10536
|
-
},
|
|
10654
|
+
}, React.createElement("path", {
|
|
10537
10655
|
d: "M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"
|
|
10538
10656
|
}));
|
|
10539
|
-
var defaultSubmit =
|
|
10540
|
-
className: cx$
|
|
10657
|
+
var defaultSubmit = React.createElement("svg", {
|
|
10658
|
+
className: cx$l('submitIcon'),
|
|
10541
10659
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10542
10660
|
width: "10",
|
|
10543
10661
|
height: "10",
|
|
10544
10662
|
viewBox: "0 0 40 40"
|
|
10545
|
-
},
|
|
10663
|
+
}, React.createElement("path", {
|
|
10546
10664
|
d: "M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"
|
|
10547
10665
|
}));
|
|
10548
10666
|
|
|
10549
|
-
var SearchBox =
|
|
10667
|
+
var SearchBox$1 =
|
|
10550
10668
|
/*#__PURE__*/
|
|
10551
10669
|
function (_Component) {
|
|
10552
10670
|
_inherits(SearchBox, _Component);
|
|
@@ -10708,16 +10826,16 @@ function (_Component) {
|
|
|
10708
10826
|
var isSearchStalled = this.props.showLoadingIndicator && this.props.isSearchStalled;
|
|
10709
10827
|
/* eslint-disable max-len */
|
|
10710
10828
|
|
|
10711
|
-
return
|
|
10712
|
-
className: classnames(cx$
|
|
10713
|
-
},
|
|
10829
|
+
return React.createElement("div", {
|
|
10830
|
+
className: classnames(cx$l(''), className)
|
|
10831
|
+
}, React.createElement("form", {
|
|
10714
10832
|
noValidate: true,
|
|
10715
10833
|
onSubmit: this.props.onSubmit ? this.props.onSubmit : this.onSubmit,
|
|
10716
10834
|
onReset: this.onReset,
|
|
10717
|
-
className: cx$
|
|
10835
|
+
className: cx$l('form', isSearchStalled && 'form--stalledSearch'),
|
|
10718
10836
|
action: "",
|
|
10719
10837
|
role: "search"
|
|
10720
|
-
},
|
|
10838
|
+
}, React.createElement("input", _extends({
|
|
10721
10839
|
ref: this.onInputMount,
|
|
10722
10840
|
type: "search",
|
|
10723
10841
|
placeholder: translate('placeholder'),
|
|
@@ -10731,19 +10849,19 @@ function (_Component) {
|
|
|
10731
10849
|
value: query,
|
|
10732
10850
|
onChange: this.onChange
|
|
10733
10851
|
}, searchInputEvents, {
|
|
10734
|
-
className: cx$
|
|
10735
|
-
})),
|
|
10852
|
+
className: cx$l('input')
|
|
10853
|
+
})), React.createElement("button", {
|
|
10736
10854
|
type: "submit",
|
|
10737
10855
|
title: translate('submitTitle'),
|
|
10738
|
-
className: cx$
|
|
10739
|
-
}, submit),
|
|
10856
|
+
className: cx$l('submit')
|
|
10857
|
+
}, submit), React.createElement("button", {
|
|
10740
10858
|
type: "reset",
|
|
10741
10859
|
title: translate('resetTitle'),
|
|
10742
|
-
className: cx$
|
|
10860
|
+
className: cx$l('reset'),
|
|
10743
10861
|
hidden: !query || isSearchStalled
|
|
10744
|
-
}, reset), this.props.showLoadingIndicator &&
|
|
10862
|
+
}, reset), this.props.showLoadingIndicator && React.createElement("span", {
|
|
10745
10863
|
hidden: !isSearchStalled,
|
|
10746
|
-
className: cx$
|
|
10864
|
+
className: cx$l('loadingIndicator')
|
|
10747
10865
|
}, loadingIndicator)));
|
|
10748
10866
|
/* eslint-enable */
|
|
10749
10867
|
}
|
|
@@ -10752,7 +10870,7 @@ function (_Component) {
|
|
|
10752
10870
|
return SearchBox;
|
|
10753
10871
|
}(Component);
|
|
10754
10872
|
|
|
10755
|
-
_defineProperty(SearchBox, "propTypes", {
|
|
10873
|
+
_defineProperty(SearchBox$1, "propTypes", {
|
|
10756
10874
|
currentRefinement: PropTypes.string,
|
|
10757
10875
|
className: PropTypes.string,
|
|
10758
10876
|
refine: PropTypes.func.isRequired,
|
|
@@ -10773,7 +10891,7 @@ _defineProperty(SearchBox, "propTypes", {
|
|
|
10773
10891
|
})])
|
|
10774
10892
|
});
|
|
10775
10893
|
|
|
10776
|
-
_defineProperty(SearchBox, "defaultProps", {
|
|
10894
|
+
_defineProperty(SearchBox$1, "defaultProps", {
|
|
10777
10895
|
currentRefinement: '',
|
|
10778
10896
|
className: '',
|
|
10779
10897
|
focusShortcuts: ['s', '/'],
|
|
@@ -10786,11 +10904,11 @@ _defineProperty(SearchBox, "defaultProps", {
|
|
|
10786
10904
|
submit: defaultSubmit
|
|
10787
10905
|
});
|
|
10788
10906
|
|
|
10789
|
-
var SearchBox$
|
|
10907
|
+
var SearchBox$2 = translatable({
|
|
10790
10908
|
resetTitle: 'Clear the search query.',
|
|
10791
10909
|
submitTitle: 'Submit your search query.',
|
|
10792
10910
|
placeholder: 'Search here…'
|
|
10793
|
-
})(SearchBox);
|
|
10911
|
+
})(SearchBox$1);
|
|
10794
10912
|
|
|
10795
10913
|
var itemsPropType$1 = PropTypes.arrayOf(PropTypes.shape({
|
|
10796
10914
|
value: PropTypes.any,
|
|
@@ -10836,10 +10954,10 @@ function (_Component) {
|
|
|
10836
10954
|
|
|
10837
10955
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
10838
10956
|
var itemHasChildren = item.items && Boolean(item.items.length);
|
|
10839
|
-
return
|
|
10957
|
+
return React.createElement("li", {
|
|
10840
10958
|
key: item.key || item.label,
|
|
10841
10959
|
className: _this.props.cx('item', item.isRefined && 'item--selected', item.noRefinement && 'item--noRefinement', itemHasChildren && 'item--parent')
|
|
10842
|
-
}, _this.props.renderItem(item, resetQuery), itemHasChildren &&
|
|
10960
|
+
}, _this.props.renderItem(item, resetQuery), itemHasChildren && React.createElement("ul", {
|
|
10843
10961
|
className: _this.props.cx('list', 'list--child')
|
|
10844
10962
|
}, item.items.slice(0, _this.getLimit()).map(function (child) {
|
|
10845
10963
|
return _this.renderItem(child, item);
|
|
@@ -10867,7 +10985,7 @@ function (_Component) {
|
|
|
10867
10985
|
return null;
|
|
10868
10986
|
}
|
|
10869
10987
|
|
|
10870
|
-
return
|
|
10988
|
+
return React.createElement("button", {
|
|
10871
10989
|
disabled: disabled,
|
|
10872
10990
|
className: cx('showMore', disabled && 'showMore--disabled'),
|
|
10873
10991
|
onClick: this.onShowMoreClick
|
|
@@ -10885,12 +11003,12 @@ function (_Component) {
|
|
|
10885
11003
|
translate = _this$props3.translate,
|
|
10886
11004
|
items = _this$props3.items,
|
|
10887
11005
|
selectItem = _this$props3.selectItem;
|
|
10888
|
-
var noResults = items.length === 0 && this.state.query !== '' ?
|
|
11006
|
+
var noResults = items.length === 0 && this.state.query !== '' ? React.createElement("div", {
|
|
10889
11007
|
className: cx('noResults')
|
|
10890
11008
|
}, translate('noResults')) : null;
|
|
10891
|
-
return
|
|
11009
|
+
return React.createElement("div", {
|
|
10892
11010
|
className: cx('searchBox')
|
|
10893
|
-
},
|
|
11011
|
+
}, React.createElement(SearchBox$2, {
|
|
10894
11012
|
currentRefinement: this.state.query,
|
|
10895
11013
|
refine: function refine(value) {
|
|
10896
11014
|
_this2.setState({
|
|
@@ -10926,7 +11044,7 @@ function (_Component) {
|
|
|
10926
11044
|
var rootClassName = classnames(cx('', !canRefine && '-noRefinement'), className);
|
|
10927
11045
|
|
|
10928
11046
|
if (items.length === 0) {
|
|
10929
|
-
return
|
|
11047
|
+
return React.createElement("div", {
|
|
10930
11048
|
className: rootClassName
|
|
10931
11049
|
}, searchBox);
|
|
10932
11050
|
} // Always limit the number of items we show on screen, since the actual
|
|
@@ -10934,9 +11052,9 @@ function (_Component) {
|
|
|
10934
11052
|
// option.
|
|
10935
11053
|
|
|
10936
11054
|
|
|
10937
|
-
return
|
|
11055
|
+
return React.createElement("div", {
|
|
10938
11056
|
className: rootClassName
|
|
10939
|
-
}, searchBox,
|
|
11057
|
+
}, searchBox, React.createElement("ul", {
|
|
10940
11058
|
className: cx('list', !canRefine && 'list--noRefinement')
|
|
10941
11059
|
}, items.slice(0, this.getLimit()).map(function (item) {
|
|
10942
11060
|
return _this3.renderItem(item, _this3.resetQuery);
|
|
@@ -10970,13 +11088,13 @@ _defineProperty(List, "defaultProps", {
|
|
|
10970
11088
|
isFromSearch: false
|
|
10971
11089
|
});
|
|
10972
11090
|
|
|
10973
|
-
var cx$
|
|
10974
|
-
var itemsPropType
|
|
11091
|
+
var cx$k = createClassNames('HierarchicalMenu');
|
|
11092
|
+
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
10975
11093
|
label: PropTypes.string.isRequired,
|
|
10976
11094
|
value: PropTypes.string,
|
|
10977
11095
|
count: PropTypes.number.isRequired,
|
|
10978
11096
|
items: function items() {
|
|
10979
|
-
return itemsPropType
|
|
11097
|
+
return itemsPropType.apply(void 0, arguments);
|
|
10980
11098
|
}
|
|
10981
11099
|
}));
|
|
10982
11100
|
|
|
@@ -11002,16 +11120,16 @@ function (_Component) {
|
|
|
11002
11120
|
var _this$props = _this.props,
|
|
11003
11121
|
createURL = _this$props.createURL,
|
|
11004
11122
|
refine = _this$props.refine;
|
|
11005
|
-
return
|
|
11006
|
-
className: cx$
|
|
11123
|
+
return React.createElement(Link, {
|
|
11124
|
+
className: cx$k('link'),
|
|
11007
11125
|
onClick: function onClick() {
|
|
11008
11126
|
return refine(item.value);
|
|
11009
11127
|
},
|
|
11010
11128
|
href: createURL(item.value)
|
|
11011
|
-
},
|
|
11012
|
-
className: cx$
|
|
11013
|
-
}, item.label), ' ',
|
|
11014
|
-
className: cx$
|
|
11129
|
+
}, React.createElement("span", {
|
|
11130
|
+
className: cx$k('label')
|
|
11131
|
+
}, item.label), ' ', React.createElement("span", {
|
|
11132
|
+
className: cx$k('count')
|
|
11015
11133
|
}, item.count));
|
|
11016
11134
|
});
|
|
11017
11135
|
|
|
@@ -11029,9 +11147,9 @@ function (_Component) {
|
|
|
11029
11147
|
showMoreLimit = _this$props2.showMoreLimit,
|
|
11030
11148
|
canRefine = _this$props2.canRefine,
|
|
11031
11149
|
className = _this$props2.className;
|
|
11032
|
-
return
|
|
11150
|
+
return React.createElement(List, {
|
|
11033
11151
|
renderItem: this.renderItem,
|
|
11034
|
-
cx: cx$
|
|
11152
|
+
cx: cx$k,
|
|
11035
11153
|
translate: translate,
|
|
11036
11154
|
items: items,
|
|
11037
11155
|
showMore: showMore,
|
|
@@ -11051,7 +11169,7 @@ _defineProperty(HierarchicalMenu, "propTypes", {
|
|
|
11051
11169
|
refine: PropTypes.func.isRequired,
|
|
11052
11170
|
createURL: PropTypes.func.isRequired,
|
|
11053
11171
|
canRefine: PropTypes.bool.isRequired,
|
|
11054
|
-
items: itemsPropType
|
|
11172
|
+
items: itemsPropType,
|
|
11055
11173
|
showMore: PropTypes.bool,
|
|
11056
11174
|
className: PropTypes.string,
|
|
11057
11175
|
limit: PropTypes.number,
|
|
@@ -11160,12 +11278,12 @@ var HierarchicalMenu$1 = translatable({
|
|
|
11160
11278
|
*/
|
|
11161
11279
|
|
|
11162
11280
|
var HierarchicalMenuWidget = function HierarchicalMenuWidget(props) {
|
|
11163
|
-
return
|
|
11281
|
+
return React.createElement(PanelWrapper, props, React.createElement(HierarchicalMenu$1, props));
|
|
11164
11282
|
};
|
|
11165
11283
|
|
|
11166
11284
|
connectHierarchicalMenu(HierarchicalMenuWidget);
|
|
11167
11285
|
|
|
11168
|
-
var Highlight = function Highlight(_ref) {
|
|
11286
|
+
var Highlight$2 = function Highlight(_ref) {
|
|
11169
11287
|
var cx = _ref.cx,
|
|
11170
11288
|
value = _ref.value,
|
|
11171
11289
|
highlightedTagName = _ref.highlightedTagName,
|
|
@@ -11173,11 +11291,11 @@ var Highlight = function Highlight(_ref) {
|
|
|
11173
11291
|
nonHighlightedTagName = _ref.nonHighlightedTagName;
|
|
11174
11292
|
var TagName = isHighlighted ? highlightedTagName : nonHighlightedTagName;
|
|
11175
11293
|
var className = isHighlighted ? 'highlighted' : 'nonHighlighted';
|
|
11176
|
-
return
|
|
11294
|
+
return React.createElement(TagName, {
|
|
11177
11295
|
className: cx(className)
|
|
11178
11296
|
}, value);
|
|
11179
11297
|
};
|
|
11180
|
-
Highlight.propTypes = {
|
|
11298
|
+
Highlight$2.propTypes = {
|
|
11181
11299
|
cx: PropTypes.func.isRequired,
|
|
11182
11300
|
value: PropTypes.string.isRequired,
|
|
11183
11301
|
isHighlighted: PropTypes.bool.isRequired,
|
|
@@ -11200,15 +11318,15 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11200
11318
|
attribute: attribute,
|
|
11201
11319
|
highlightProperty: highlightProperty
|
|
11202
11320
|
});
|
|
11203
|
-
return
|
|
11321
|
+
return React.createElement("span", {
|
|
11204
11322
|
className: classnames(cx(''), className)
|
|
11205
11323
|
}, parsedHighlightedValue.map(function (item, i) {
|
|
11206
11324
|
if (Array.isArray(item)) {
|
|
11207
11325
|
var isLast = i === parsedHighlightedValue.length - 1;
|
|
11208
|
-
return
|
|
11326
|
+
return React.createElement("span", {
|
|
11209
11327
|
key: i
|
|
11210
11328
|
}, item.map(function (element, index) {
|
|
11211
|
-
return
|
|
11329
|
+
return React.createElement(Highlight$2, {
|
|
11212
11330
|
cx: cx,
|
|
11213
11331
|
key: index,
|
|
11214
11332
|
value: element.value,
|
|
@@ -11216,12 +11334,12 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11216
11334
|
nonHighlightedTagName: nonHighlightedTagName,
|
|
11217
11335
|
isHighlighted: element.isHighlighted
|
|
11218
11336
|
});
|
|
11219
|
-
}), !isLast &&
|
|
11337
|
+
}), !isLast && React.createElement("span", {
|
|
11220
11338
|
className: cx('separator')
|
|
11221
11339
|
}, separator));
|
|
11222
11340
|
}
|
|
11223
11341
|
|
|
11224
|
-
return
|
|
11342
|
+
return React.createElement(Highlight$2, {
|
|
11225
11343
|
cx: cx,
|
|
11226
11344
|
key: i,
|
|
11227
11345
|
value: item.value,
|
|
@@ -11250,12 +11368,12 @@ Highlighter.defaultProps = {
|
|
|
11250
11368
|
separator: ', '
|
|
11251
11369
|
};
|
|
11252
11370
|
|
|
11253
|
-
var cx$
|
|
11371
|
+
var cx$j = createClassNames('Highlight');
|
|
11254
11372
|
|
|
11255
11373
|
var Highlight$1 = function Highlight(props) {
|
|
11256
|
-
return
|
|
11374
|
+
return React.createElement(Highlighter, _extends({}, props, {
|
|
11257
11375
|
highlightProperty: "_highlightResult",
|
|
11258
|
-
cx: cx$
|
|
11376
|
+
cx: cx$j
|
|
11259
11377
|
}));
|
|
11260
11378
|
};
|
|
11261
11379
|
|
|
@@ -11300,12 +11418,12 @@ var Highlight$1 = function Highlight(props) {
|
|
|
11300
11418
|
* );
|
|
11301
11419
|
*/
|
|
11302
11420
|
|
|
11303
|
-
var Highlight
|
|
11421
|
+
var Highlight = connectHighlight(Highlight$1);
|
|
11304
11422
|
|
|
11305
|
-
var cx$
|
|
11423
|
+
var cx$i = createClassNames('Hits');
|
|
11306
11424
|
|
|
11307
11425
|
var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
11308
|
-
return
|
|
11426
|
+
return React.createElement("div", {
|
|
11309
11427
|
style: {
|
|
11310
11428
|
borderBottom: '1px solid #bbb',
|
|
11311
11429
|
paddingBottom: '5px',
|
|
@@ -11315,21 +11433,21 @@ var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
|
11315
11433
|
}, JSON.stringify(props).slice(0, 100), "...");
|
|
11316
11434
|
};
|
|
11317
11435
|
|
|
11318
|
-
var Hits = function Hits(_ref) {
|
|
11436
|
+
var Hits$1 = function Hits(_ref) {
|
|
11319
11437
|
var hits = _ref.hits,
|
|
11320
11438
|
_ref$className = _ref.className,
|
|
11321
11439
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
11322
11440
|
_ref$hitComponent = _ref.hitComponent,
|
|
11323
11441
|
HitComponent = _ref$hitComponent === void 0 ? DefaultHitComponent : _ref$hitComponent;
|
|
11324
|
-
return
|
|
11325
|
-
className: classnames(cx$
|
|
11326
|
-
},
|
|
11327
|
-
className: cx$
|
|
11442
|
+
return React.createElement("div", {
|
|
11443
|
+
className: classnames(cx$i(''), className)
|
|
11444
|
+
}, React.createElement("ul", {
|
|
11445
|
+
className: cx$i('list')
|
|
11328
11446
|
}, hits.map(function (hit) {
|
|
11329
|
-
return
|
|
11330
|
-
className: cx$
|
|
11447
|
+
return React.createElement("li", {
|
|
11448
|
+
className: cx$i('item'),
|
|
11331
11449
|
key: hit.objectID
|
|
11332
|
-
},
|
|
11450
|
+
}, React.createElement(HitComponent, {
|
|
11333
11451
|
hit: hit
|
|
11334
11452
|
}));
|
|
11335
11453
|
})));
|
|
@@ -11338,7 +11456,7 @@ var Hits = function Hits(_ref) {
|
|
|
11338
11456
|
var HitPropTypes = PropTypes.shape({
|
|
11339
11457
|
objectID: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11340
11458
|
});
|
|
11341
|
-
Hits.propTypes = {
|
|
11459
|
+
Hits$1.propTypes = {
|
|
11342
11460
|
hits: PropTypes.arrayOf(HitPropTypes.isRequired).isRequired,
|
|
11343
11461
|
className: PropTypes.string,
|
|
11344
11462
|
hitComponent: PropTypes.func
|
|
@@ -11377,7 +11495,7 @@ Hits.propTypes = {
|
|
|
11377
11495
|
* );
|
|
11378
11496
|
*/
|
|
11379
11497
|
|
|
11380
|
-
var Hits
|
|
11498
|
+
var Hits = connectHits(Hits$1);
|
|
11381
11499
|
|
|
11382
11500
|
var Select =
|
|
11383
11501
|
/*#__PURE__*/
|
|
@@ -11411,12 +11529,12 @@ function (_Component) {
|
|
|
11411
11529
|
cx = _this$props.cx,
|
|
11412
11530
|
items = _this$props.items,
|
|
11413
11531
|
selectedItem = _this$props.selectedItem;
|
|
11414
|
-
return
|
|
11532
|
+
return React.createElement("select", {
|
|
11415
11533
|
className: cx('select'),
|
|
11416
11534
|
value: selectedItem,
|
|
11417
11535
|
onChange: this.onChange
|
|
11418
11536
|
}, items.map(function (item) {
|
|
11419
|
-
return
|
|
11537
|
+
return React.createElement("option", {
|
|
11420
11538
|
className: cx('option'),
|
|
11421
11539
|
key: item.key === undefined ? item.value : item.key,
|
|
11422
11540
|
disabled: item.disabled,
|
|
@@ -11441,7 +11559,7 @@ _defineProperty(Select, "propTypes", {
|
|
|
11441
11559
|
selectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11442
11560
|
});
|
|
11443
11561
|
|
|
11444
|
-
var cx$
|
|
11562
|
+
var cx$h = createClassNames('HitsPerPage');
|
|
11445
11563
|
|
|
11446
11564
|
var HitsPerPage =
|
|
11447
11565
|
/*#__PURE__*/
|
|
@@ -11462,13 +11580,13 @@ function (_Component) {
|
|
|
11462
11580
|
currentRefinement = _this$props.currentRefinement,
|
|
11463
11581
|
refine = _this$props.refine,
|
|
11464
11582
|
className = _this$props.className;
|
|
11465
|
-
return
|
|
11466
|
-
className: classnames(cx$
|
|
11467
|
-
},
|
|
11583
|
+
return React.createElement("div", {
|
|
11584
|
+
className: classnames(cx$h(''), className)
|
|
11585
|
+
}, React.createElement(Select, {
|
|
11468
11586
|
onSelect: refine,
|
|
11469
11587
|
selectedItem: currentRefinement,
|
|
11470
11588
|
items: items,
|
|
11471
|
-
cx: cx$
|
|
11589
|
+
cx: cx$h
|
|
11472
11590
|
}));
|
|
11473
11591
|
}
|
|
11474
11592
|
}]);
|
|
@@ -11534,7 +11652,7 @@ _defineProperty(HitsPerPage, "defaultProps", {
|
|
|
11534
11652
|
|
|
11535
11653
|
connectHitsPerPage(HitsPerPage);
|
|
11536
11654
|
|
|
11537
|
-
var cx$
|
|
11655
|
+
var cx$g = createClassNames('InfiniteHits');
|
|
11538
11656
|
|
|
11539
11657
|
var InfiniteHits =
|
|
11540
11658
|
/*#__PURE__*/
|
|
@@ -11560,25 +11678,25 @@ function (_Component) {
|
|
|
11560
11678
|
refineNext = _this$props.refineNext,
|
|
11561
11679
|
translate = _this$props.translate,
|
|
11562
11680
|
className = _this$props.className;
|
|
11563
|
-
return
|
|
11564
|
-
className: classnames(cx$
|
|
11565
|
-
}, showPrevious &&
|
|
11566
|
-
className: cx$
|
|
11681
|
+
return React.createElement("div", {
|
|
11682
|
+
className: classnames(cx$g(''), className)
|
|
11683
|
+
}, showPrevious && React.createElement("button", {
|
|
11684
|
+
className: cx$g('loadPrevious', !hasPrevious && 'loadPrevious--disabled'),
|
|
11567
11685
|
onClick: function onClick() {
|
|
11568
11686
|
return refinePrevious();
|
|
11569
11687
|
},
|
|
11570
11688
|
disabled: !hasPrevious
|
|
11571
|
-
}, translate('loadPrevious')),
|
|
11572
|
-
className: cx$
|
|
11689
|
+
}, translate('loadPrevious')), React.createElement("ul", {
|
|
11690
|
+
className: cx$g('list')
|
|
11573
11691
|
}, hits.map(function (hit) {
|
|
11574
|
-
return
|
|
11692
|
+
return React.createElement("li", {
|
|
11575
11693
|
key: hit.objectID,
|
|
11576
|
-
className: cx$
|
|
11577
|
-
},
|
|
11694
|
+
className: cx$g('item')
|
|
11695
|
+
}, React.createElement(HitComponent, {
|
|
11578
11696
|
hit: hit
|
|
11579
11697
|
}));
|
|
11580
|
-
})),
|
|
11581
|
-
className: cx$
|
|
11698
|
+
})), React.createElement("button", {
|
|
11699
|
+
className: cx$g('loadMore', !hasMore && 'loadMore--disabled'),
|
|
11582
11700
|
onClick: function onClick() {
|
|
11583
11701
|
return refineNext();
|
|
11584
11702
|
},
|
|
@@ -11605,7 +11723,7 @@ InfiniteHits.defaultProps = {
|
|
|
11605
11723
|
className: '',
|
|
11606
11724
|
showPrevious: false,
|
|
11607
11725
|
hitComponent: function hitComponent(hit) {
|
|
11608
|
-
return
|
|
11726
|
+
return React.createElement("div", {
|
|
11609
11727
|
style: {
|
|
11610
11728
|
borderBottom: '1px solid #bbb',
|
|
11611
11729
|
paddingBottom: '5px',
|
|
@@ -11659,7 +11777,7 @@ var InfiniteHits$1 = translatable({
|
|
|
11659
11777
|
|
|
11660
11778
|
connectInfiniteHits(InfiniteHits$1);
|
|
11661
11779
|
|
|
11662
|
-
var cx$
|
|
11780
|
+
var cx$f = createClassNames('Menu');
|
|
11663
11781
|
|
|
11664
11782
|
var Menu =
|
|
11665
11783
|
/*#__PURE__*/
|
|
@@ -11681,20 +11799,20 @@ function (_Component) {
|
|
|
11681
11799
|
|
|
11682
11800
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
11683
11801
|
var createURL = _this.props.createURL;
|
|
11684
|
-
var label = _this.props.isFromSearch ?
|
|
11802
|
+
var label = _this.props.isFromSearch ? React.createElement(Highlight, {
|
|
11685
11803
|
attribute: "label",
|
|
11686
11804
|
hit: item
|
|
11687
11805
|
}) : item.label;
|
|
11688
|
-
return
|
|
11689
|
-
className: cx$
|
|
11806
|
+
return React.createElement(Link, {
|
|
11807
|
+
className: cx$f('link'),
|
|
11690
11808
|
onClick: function onClick() {
|
|
11691
11809
|
return _this.selectItem(item, resetQuery);
|
|
11692
11810
|
},
|
|
11693
11811
|
href: createURL(item.value)
|
|
11694
|
-
},
|
|
11695
|
-
className: cx$
|
|
11696
|
-
}, label), ' ',
|
|
11697
|
-
className: cx$
|
|
11812
|
+
}, React.createElement("span", {
|
|
11813
|
+
className: cx$f('label')
|
|
11814
|
+
}, label), ' ', React.createElement("span", {
|
|
11815
|
+
className: cx$f('count')
|
|
11698
11816
|
}, item.count));
|
|
11699
11817
|
});
|
|
11700
11818
|
|
|
@@ -11721,10 +11839,10 @@ function (_Component) {
|
|
|
11721
11839
|
searchable = _this$props.searchable,
|
|
11722
11840
|
canRefine = _this$props.canRefine,
|
|
11723
11841
|
className = _this$props.className;
|
|
11724
|
-
return
|
|
11842
|
+
return React.createElement(List, {
|
|
11725
11843
|
renderItem: this.renderItem,
|
|
11726
11844
|
selectItem: this.selectItem,
|
|
11727
|
-
cx: cx$
|
|
11845
|
+
cx: cx$f,
|
|
11728
11846
|
translate: translate,
|
|
11729
11847
|
items: items,
|
|
11730
11848
|
showMore: showMore,
|
|
@@ -11829,12 +11947,12 @@ var Menu$1 = translatable({
|
|
|
11829
11947
|
*/
|
|
11830
11948
|
|
|
11831
11949
|
var MenuWidget = function MenuWidget(props) {
|
|
11832
|
-
return
|
|
11950
|
+
return React.createElement(PanelWrapper, props, React.createElement(Menu$1, props));
|
|
11833
11951
|
};
|
|
11834
11952
|
|
|
11835
11953
|
connectMenu(MenuWidget);
|
|
11836
11954
|
|
|
11837
|
-
var cx$
|
|
11955
|
+
var cx$e = createClassNames('MenuSelect');
|
|
11838
11956
|
|
|
11839
11957
|
var MenuSelect =
|
|
11840
11958
|
/*#__PURE__*/
|
|
@@ -11871,27 +11989,27 @@ function (_Component) {
|
|
|
11871
11989
|
canRefine = _this$props.canRefine,
|
|
11872
11990
|
translate = _this$props.translate,
|
|
11873
11991
|
className = _this$props.className;
|
|
11874
|
-
return
|
|
11875
|
-
className: classnames(cx$
|
|
11876
|
-
},
|
|
11992
|
+
return React.createElement("div", {
|
|
11993
|
+
className: classnames(cx$e('', !canRefine && '-noRefinement'), className)
|
|
11994
|
+
}, React.createElement("select", {
|
|
11877
11995
|
value: this.selectedValue,
|
|
11878
11996
|
onChange: this.handleSelectChange,
|
|
11879
|
-
className: cx$
|
|
11880
|
-
},
|
|
11997
|
+
className: cx$e('select')
|
|
11998
|
+
}, React.createElement("option", {
|
|
11881
11999
|
value: "ais__see__all__option",
|
|
11882
|
-
className: cx$
|
|
12000
|
+
className: cx$e('option')
|
|
11883
12001
|
}, translate('seeAllOption')), items.map(function (item) {
|
|
11884
|
-
return
|
|
12002
|
+
return React.createElement("option", {
|
|
11885
12003
|
key: item.value,
|
|
11886
12004
|
value: item.value,
|
|
11887
|
-
className: cx$
|
|
12005
|
+
className: cx$e('option')
|
|
11888
12006
|
}, item.label, " (", item.count, ")");
|
|
11889
12007
|
})));
|
|
11890
12008
|
}
|
|
11891
12009
|
}, {
|
|
11892
12010
|
key: "selectedValue",
|
|
11893
12011
|
get: function get() {
|
|
11894
|
-
var _ref2 = find
|
|
12012
|
+
var _ref2 = find(this.props.items, function (item) {
|
|
11895
12013
|
return item.isRefined === true;
|
|
11896
12014
|
}) || {
|
|
11897
12015
|
value: 'ais__see__all__option'
|
|
@@ -11963,12 +12081,12 @@ var MenuSelect$1 = translatable({
|
|
|
11963
12081
|
*/
|
|
11964
12082
|
|
|
11965
12083
|
var MenuSelectWidget = function MenuSelectWidget(props) {
|
|
11966
|
-
return
|
|
12084
|
+
return React.createElement(PanelWrapper, props, React.createElement(MenuSelect$1, props));
|
|
11967
12085
|
};
|
|
11968
12086
|
|
|
11969
12087
|
connectMenu(MenuSelectWidget);
|
|
11970
12088
|
|
|
11971
|
-
var cx$
|
|
12089
|
+
var cx$d = createClassNames('NumericMenu');
|
|
11972
12090
|
|
|
11973
12091
|
var NumericMenu =
|
|
11974
12092
|
/*#__PURE__*/
|
|
@@ -11992,18 +12110,18 @@ function (_Component) {
|
|
|
11992
12110
|
var _this$props = _this.props,
|
|
11993
12111
|
refine = _this$props.refine,
|
|
11994
12112
|
translate = _this$props.translate;
|
|
11995
|
-
return
|
|
11996
|
-
className: cx$
|
|
11997
|
-
},
|
|
11998
|
-
className: cx$
|
|
12113
|
+
return React.createElement("label", {
|
|
12114
|
+
className: cx$d('label')
|
|
12115
|
+
}, React.createElement("input", {
|
|
12116
|
+
className: cx$d('radio'),
|
|
11999
12117
|
type: "radio",
|
|
12000
12118
|
checked: item.isRefined,
|
|
12001
12119
|
disabled: item.noRefinement,
|
|
12002
12120
|
onChange: function onChange() {
|
|
12003
12121
|
return refine(item.value);
|
|
12004
12122
|
}
|
|
12005
|
-
}),
|
|
12006
|
-
className: cx$
|
|
12123
|
+
}), React.createElement("span", {
|
|
12124
|
+
className: cx$d('labelText')
|
|
12007
12125
|
}, item.value === '' ? translate('all') : item.label));
|
|
12008
12126
|
});
|
|
12009
12127
|
|
|
@@ -12017,11 +12135,11 @@ function (_Component) {
|
|
|
12017
12135
|
items = _this$props2.items,
|
|
12018
12136
|
canRefine = _this$props2.canRefine,
|
|
12019
12137
|
className = _this$props2.className;
|
|
12020
|
-
return
|
|
12138
|
+
return React.createElement(List, {
|
|
12021
12139
|
renderItem: this.renderItem,
|
|
12022
12140
|
showMore: false,
|
|
12023
12141
|
canRefine: canRefine,
|
|
12024
|
-
cx: cx$
|
|
12142
|
+
cx: cx$d,
|
|
12025
12143
|
items: items.map(function (item) {
|
|
12026
12144
|
return _objectSpread({}, item, {
|
|
12027
12145
|
key: item.value
|
|
@@ -12103,7 +12221,7 @@ var NumericMenu$1 = translatable({
|
|
|
12103
12221
|
*/
|
|
12104
12222
|
|
|
12105
12223
|
var NumericMenuWidget = function NumericMenuWidget(props) {
|
|
12106
|
-
return
|
|
12224
|
+
return React.createElement(PanelWrapper, props, React.createElement(NumericMenu$1, props));
|
|
12107
12225
|
};
|
|
12108
12226
|
|
|
12109
12227
|
connectNumericMenu(NumericMenuWidget);
|
|
@@ -12128,15 +12246,15 @@ function (_Component) {
|
|
|
12128
12246
|
items = _this$props.items,
|
|
12129
12247
|
onSelect = _this$props.onSelect,
|
|
12130
12248
|
canRefine = _this$props.canRefine;
|
|
12131
|
-
return
|
|
12249
|
+
return React.createElement("ul", {
|
|
12132
12250
|
className: cx('list', !canRefine && 'list--noRefinement')
|
|
12133
12251
|
}, items.map(function (item) {
|
|
12134
|
-
return
|
|
12252
|
+
return React.createElement("li", {
|
|
12135
12253
|
key: item.key === undefined ? item.value : item.key,
|
|
12136
12254
|
className: cx('item', item.selected && !item.disabled && 'item--selected', item.disabled && 'item--disabled', item.modifier)
|
|
12137
|
-
}, item.disabled ?
|
|
12255
|
+
}, item.disabled ? React.createElement("span", {
|
|
12138
12256
|
className: cx('link')
|
|
12139
|
-
}, item.label === undefined ? item.value : item.label) :
|
|
12257
|
+
}, item.label === undefined ? item.value : item.label) : React.createElement(Link, {
|
|
12140
12258
|
className: cx('link', item.selected && 'link--selected'),
|
|
12141
12259
|
"aria-label": item.ariaLabel,
|
|
12142
12260
|
href: createURL(item.value),
|
|
@@ -12166,7 +12284,7 @@ _defineProperty(LinkList, "propTypes", {
|
|
|
12166
12284
|
canRefine: PropTypes.bool.isRequired
|
|
12167
12285
|
});
|
|
12168
12286
|
|
|
12169
|
-
var cx$
|
|
12287
|
+
var cx$c = createClassNames('Pagination'); // Determines the size of the widget (the number of pages displayed - that the user can directly click on)
|
|
12170
12288
|
|
|
12171
12289
|
function calculateSize(padding, maxPages) {
|
|
12172
12290
|
return Math.min(2 * padding + 1, maxPages);
|
|
@@ -12202,7 +12320,7 @@ function getPages(currentPage, maxPages, padding) {
|
|
|
12202
12320
|
});
|
|
12203
12321
|
}
|
|
12204
12322
|
|
|
12205
|
-
var Pagination =
|
|
12323
|
+
var Pagination$1 =
|
|
12206
12324
|
/*#__PURE__*/
|
|
12207
12325
|
function (_Component) {
|
|
12208
12326
|
_inherits(Pagination, _Component);
|
|
@@ -12308,10 +12426,10 @@ function (_Component) {
|
|
|
12308
12426
|
});
|
|
12309
12427
|
}
|
|
12310
12428
|
|
|
12311
|
-
return
|
|
12312
|
-
className: classnames(cx$
|
|
12313
|
-
},
|
|
12314
|
-
cx: cx$
|
|
12429
|
+
return React.createElement("div", {
|
|
12430
|
+
className: classnames(cx$c('', !canRefine && '-noRefinement'), className)
|
|
12431
|
+
}, React.createElement(ListComponent, _extends({}, otherProps, {
|
|
12432
|
+
cx: cx$c,
|
|
12315
12433
|
items: items,
|
|
12316
12434
|
onSelect: refine,
|
|
12317
12435
|
createURL: createURL,
|
|
@@ -12323,7 +12441,7 @@ function (_Component) {
|
|
|
12323
12441
|
return Pagination;
|
|
12324
12442
|
}(Component);
|
|
12325
12443
|
|
|
12326
|
-
_defineProperty(Pagination, "propTypes", {
|
|
12444
|
+
_defineProperty(Pagination$1, "propTypes", {
|
|
12327
12445
|
nbPages: PropTypes.number.isRequired,
|
|
12328
12446
|
currentRefinement: PropTypes.number.isRequired,
|
|
12329
12447
|
refine: PropTypes.func.isRequired,
|
|
@@ -12340,7 +12458,7 @@ _defineProperty(Pagination, "propTypes", {
|
|
|
12340
12458
|
className: PropTypes.string
|
|
12341
12459
|
});
|
|
12342
12460
|
|
|
12343
|
-
_defineProperty(Pagination, "defaultProps", {
|
|
12461
|
+
_defineProperty(Pagination$1, "defaultProps", {
|
|
12344
12462
|
listComponent: LinkList,
|
|
12345
12463
|
showFirst: true,
|
|
12346
12464
|
showPrevious: true,
|
|
@@ -12351,7 +12469,7 @@ _defineProperty(Pagination, "defaultProps", {
|
|
|
12351
12469
|
className: ''
|
|
12352
12470
|
});
|
|
12353
12471
|
|
|
12354
|
-
var Pagination$
|
|
12472
|
+
var Pagination$2 = translatable({
|
|
12355
12473
|
previous: '‹',
|
|
12356
12474
|
next: '›',
|
|
12357
12475
|
first: '«',
|
|
@@ -12366,7 +12484,7 @@ var Pagination$1 = translatable({
|
|
|
12366
12484
|
ariaPage: function ariaPage(currentRefinement) {
|
|
12367
12485
|
return "Page ".concat(currentRefinement.toString());
|
|
12368
12486
|
}
|
|
12369
|
-
})(Pagination);
|
|
12487
|
+
})(Pagination$1);
|
|
12370
12488
|
|
|
12371
12489
|
/**
|
|
12372
12490
|
* The Pagination widget displays a simple pagination system allowing the user to
|
|
@@ -12423,23 +12541,23 @@ var Pagination$1 = translatable({
|
|
|
12423
12541
|
*/
|
|
12424
12542
|
|
|
12425
12543
|
var PaginationWidget = function PaginationWidget(props) {
|
|
12426
|
-
return
|
|
12544
|
+
return React.createElement(PanelWrapper, props, React.createElement(Pagination$2, props));
|
|
12427
12545
|
};
|
|
12428
12546
|
|
|
12429
|
-
var Pagination
|
|
12547
|
+
var Pagination = connectPagination(PaginationWidget);
|
|
12430
12548
|
|
|
12431
|
-
var cx$
|
|
12549
|
+
var cx$b = createClassNames('PoweredBy');
|
|
12432
12550
|
/* eslint-disable max-len */
|
|
12433
12551
|
|
|
12434
12552
|
var AlgoliaLogo = function AlgoliaLogo() {
|
|
12435
|
-
return
|
|
12553
|
+
return React.createElement("svg", {
|
|
12436
12554
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12437
12555
|
baseProfile: "basic",
|
|
12438
12556
|
viewBox: "0 0 1366 362",
|
|
12439
12557
|
width: "100",
|
|
12440
12558
|
height: "27",
|
|
12441
|
-
className: cx$
|
|
12442
|
-
},
|
|
12559
|
+
className: cx$b('logo')
|
|
12560
|
+
}, React.createElement("linearGradient", {
|
|
12443
12561
|
id: "g",
|
|
12444
12562
|
x1: "428.258",
|
|
12445
12563
|
x2: "434.145",
|
|
@@ -12447,19 +12565,19 @@ var AlgoliaLogo = function AlgoliaLogo() {
|
|
|
12447
12565
|
y2: "409.85",
|
|
12448
12566
|
gradientUnits: "userSpaceOnUse",
|
|
12449
12567
|
gradientTransform: "matrix(94.045 0 0 -94.072 -40381.527 38479.52)"
|
|
12450
|
-
},
|
|
12568
|
+
}, React.createElement("stop", {
|
|
12451
12569
|
offset: "0",
|
|
12452
12570
|
stopColor: "#00AEFF"
|
|
12453
|
-
}),
|
|
12571
|
+
}), React.createElement("stop", {
|
|
12454
12572
|
offset: "1",
|
|
12455
12573
|
stopColor: "#3369E7"
|
|
12456
|
-
})),
|
|
12574
|
+
})), React.createElement("path", {
|
|
12457
12575
|
d: "M61.8 15.4h242.8c23.9 0 43.4 19.4 43.4 43.4v242.9c0 23.9-19.4 43.4-43.4 43.4H61.8c-23.9 0-43.4-19.4-43.4-43.4v-243c0-23.9 19.4-43.3 43.4-43.3z",
|
|
12458
12576
|
fill: "url(#g)"
|
|
12459
|
-
}),
|
|
12577
|
+
}), React.createElement("path", {
|
|
12460
12578
|
d: "M187 98.7c-51.4 0-93.1 41.7-93.1 93.2S135.6 285 187 285s93.1-41.7 93.1-93.2-41.6-93.1-93.1-93.1zm0 158.8c-36.2 0-65.6-29.4-65.6-65.6s29.4-65.6 65.6-65.6 65.6 29.4 65.6 65.6-29.3 65.6-65.6 65.6zm0-117.8v48.9c0 1.4 1.5 2.4 2.8 1.7l43.4-22.5c1-.5 1.3-1.7.8-2.7-9-15.8-25.7-26.6-45-27.3-1 0-2 .8-2 1.9zm-60.8-35.9l-5.7-5.7c-5.6-5.6-14.6-5.6-20.2 0l-6.8 6.8c-5.6 5.6-5.6 14.6 0 20.2l5.6 5.6c.9.9 2.2.7 3-.2 3.3-4.5 6.9-8.8 10.9-12.8 4.1-4.1 8.3-7.7 12.9-11 1-.6 1.1-2 .3-2.9zM217.5 89V77.7c0-7.9-6.4-14.3-14.3-14.3h-33.3c-7.9 0-14.3 6.4-14.3 14.3v11.6c0 1.3 1.2 2.2 2.5 1.9 9.3-2.7 19.1-4.1 29-4.1 9.5 0 18.9 1.3 28 3.8 1.2.3 2.4-.6 2.4-1.9z",
|
|
12461
12579
|
fill: "#FFFFFF"
|
|
12462
|
-
}),
|
|
12580
|
+
}), React.createElement("path", {
|
|
12463
12581
|
d: "M842.5 267.6c0 26.7-6.8 46.2-20.5 58.6-13.7 12.4-34.6 18.6-62.8 18.6-10.3 0-31.7-2-48.8-5.8l6.3-31c14.3 3 33.2 3.8 43.1 3.8 15.7 0 26.9-3.2 33.6-9.6s10-15.9 10-28.5v-6.4c-3.9 1.9-9 3.8-15.3 5.8-6.3 1.9-13.6 2.9-21.8 2.9-10.8 0-20.6-1.7-29.5-5.1-8.9-3.4-16.6-8.4-22.9-15-6.3-6.6-11.3-14.9-14.8-24.8s-5.3-27.6-5.3-40.6c0-12.2 1.9-27.5 5.6-37.7 3.8-10.2 9.2-19 16.5-26.3 7.2-7.3 16-12.9 26.3-17s22.4-6.7 35.5-6.7c12.7 0 24.4 1.6 35.8 3.5 11.4 1.9 21.1 3.9 29 6.1v155.2zm-108.7-77.2c0 16.4 3.6 34.6 10.8 42.2 7.2 7.6 16.5 11.4 27.9 11.4 6.2 0 12.1-.9 17.6-2.6 5.5-1.7 9.9-3.7 13.4-6.1v-97.1c-2.8-.6-14.5-3-25.8-3.3-14.2-.4-25 5.4-32.6 14.7-7.5 9.3-11.3 25.6-11.3 40.8zm294.3 0c0 13.2-1.9 23.2-5.8 34.1s-9.4 20.2-16.5 27.9c-7.1 7.7-15.6 13.7-25.6 17.9s-25.4 6.6-33.1 6.6c-7.7-.1-23-2.3-32.9-6.6-9.9-4.3-18.4-10.2-25.5-17.9-7.1-7.7-12.6-17-16.6-27.9s-6-20.9-6-34.1c0-13.2 1.8-25.9 5.8-36.7 4-10.8 9.6-20 16.8-27.7s15.8-13.6 25.6-17.8c9.9-4.2 20.8-6.2 32.6-6.2s22.7 2.1 32.7 6.2c10 4.2 18.6 10.1 25.6 17.8 7.1 7.7 12.6 16.9 16.6 27.7 4.2 10.8 6.3 23.5 6.3 36.7zm-40 .1c0-16.9-3.7-31-10.9-40.8-7.2-9.9-17.3-14.8-30.2-14.8-12.9 0-23 4.9-30.2 14.8-7.2 9.9-10.7 23.9-10.7 40.8 0 17.1 3.6 28.6 10.8 38.5 7.2 10 17.3 14.9 30.2 14.9 12.9 0 23-5 30.2-14.9 7.2-10 10.8-21.4 10.8-38.5zm127.1 86.4c-64.1.3-64.1-51.8-64.1-60.1L1051 32l39.1-6.2v183.6c0 4.7 0 34.5 25.1 34.6v32.9zm68.9 0h-39.3V108.1l39.3-6.2v175zm-19.7-193.5c13.1 0 23.8-10.6 23.8-23.7S1177.6 36 1164.4 36s-23.8 10.6-23.8 23.7 10.7 23.7 23.8 23.7zm117.4 18.6c12.9 0 23.8 1.6 32.6 4.8 8.8 3.2 15.9 7.7 21.1 13.4s8.9 13.5 11.1 21.7c2.3 8.2 3.4 17.2 3.4 27.1v100.6c-6 1.3-15.1 2.8-27.3 4.6s-25.9 2.7-41.1 2.7c-10.1 0-19.4-1-27.7-2.9-8.4-1.9-15.5-5-21.5-9.3-5.9-4.3-10.5-9.8-13.9-16.6-3.3-6.8-5-16.4-5-26.4 0-9.6 1.9-15.7 5.6-22.3 3.8-6.6 8.9-12 15.3-16.2 6.5-4.2 13.9-7.2 22.4-9s17.4-2.7 26.6-2.7c4.3 0 8.8.3 13.6.8s9.8 1.4 15.2 2.7v-6.4c0-4.5-.5-8.8-1.6-12.8-1.1-4.1-3-7.6-5.6-10.7-2.7-3.1-6.2-5.5-10.6-7.2s-10-3-16.7-3c-9 0-17.2 1.1-24.7 2.4-7.5 1.3-13.7 2.8-18.4 4.5l-4.7-32.1c4.9-1.7 12.2-3.4 21.6-5.1s19.5-2.6 30.3-2.6zm3.3 141.9c12 0 20.9-.7 27.1-1.9v-39.8c-2.2-.6-5.3-1.3-9.4-1.9-4.1-.6-8.6-1-13.6-1-4.3 0-8.7.3-13.1 1-4.4.6-8.4 1.8-11.9 3.5s-6.4 4.1-8.5 7.2c-2.2 3.1-3.2 4.9-3.2 9.6 0 9.2 3.2 14.5 9 18 5.9 3.6 13.7 5.3 23.6 5.3zM512.9 103c12.9 0 23.8 1.6 32.6 4.8 8.8 3.2 15.9 7.7 21.1 13.4 5.3 5.8 8.9 13.5 11.1 21.7 2.3 8.2 3.4 17.2 3.4 27.1v100.6c-6 1.3-15.1 2.8-27.3 4.6-12.2 1.8-25.9 2.7-41.1 2.7-10.1 0-19.4-1-27.7-2.9-8.4-1.9-15.5-5-21.5-9.3-5.9-4.3-10.5-9.8-13.9-16.6-3.3-6.8-5-16.4-5-26.4 0-9.6 1.9-15.7 5.6-22.3 3.8-6.6 8.9-12 15.3-16.2 6.5-4.2 13.9-7.2 22.4-9s17.4-2.7 26.6-2.7c4.3 0 8.8.3 13.6.8 4.7.5 9.8 1.4 15.2 2.7v-6.4c0-4.5-.5-8.8-1.6-12.8-1.1-4.1-3-7.6-5.6-10.7-2.7-3.1-6.2-5.5-10.6-7.2-4.4-1.7-10-3-16.7-3-9 0-17.2 1.1-24.7 2.4-7.5 1.3-13.7 2.8-18.4 4.5l-4.7-32.1c4.9-1.7 12.2-3.4 21.6-5.1 9.4-1.8 19.5-2.6 30.3-2.6zm3.4 142c12 0 20.9-.7 27.1-1.9v-39.8c-2.2-.6-5.3-1.3-9.4-1.9-4.1-.6-8.6-1-13.6-1-4.3 0-8.7.3-13.1 1-4.4.6-8.4 1.8-11.9 3.5s-6.4 4.1-8.5 7.2c-2.2 3.1-3.2 4.9-3.2 9.6 0 9.2 3.2 14.5 9 18s13.7 5.3 23.6 5.3zm158.5 31.9c-64.1.3-64.1-51.8-64.1-60.1L610.6 32l39.1-6.2v183.6c0 4.7 0 34.5 25.1 34.6v32.9z",
|
|
12464
12582
|
fill: "#182359"
|
|
12465
12583
|
}));
|
|
@@ -12485,17 +12603,17 @@ function (_Component) {
|
|
|
12485
12603
|
url = _this$props.url,
|
|
12486
12604
|
translate = _this$props.translate,
|
|
12487
12605
|
className = _this$props.className;
|
|
12488
|
-
return
|
|
12489
|
-
className: classnames(cx$
|
|
12490
|
-
},
|
|
12491
|
-
className: cx$
|
|
12492
|
-
}, translate('searchBy')), ' ',
|
|
12606
|
+
return React.createElement("div", {
|
|
12607
|
+
className: classnames(cx$b(''), className)
|
|
12608
|
+
}, React.createElement("span", {
|
|
12609
|
+
className: cx$b('text')
|
|
12610
|
+
}, translate('searchBy')), ' ', React.createElement("a", {
|
|
12493
12611
|
href: url,
|
|
12494
12612
|
target: "_blank",
|
|
12495
|
-
className: cx$
|
|
12613
|
+
className: cx$b('link'),
|
|
12496
12614
|
"aria-label": "Algolia",
|
|
12497
12615
|
rel: "noopener noreferrer"
|
|
12498
|
-
},
|
|
12616
|
+
}, React.createElement(AlgoliaLogo, null)));
|
|
12499
12617
|
}
|
|
12500
12618
|
}]);
|
|
12501
12619
|
|
|
@@ -12545,7 +12663,7 @@ var PoweredBy$1 = translatable({
|
|
|
12545
12663
|
|
|
12546
12664
|
connectPoweredBy(PoweredBy$1);
|
|
12547
12665
|
|
|
12548
|
-
var cx$
|
|
12666
|
+
var cx$a = createClassNames('RangeInput');
|
|
12549
12667
|
var RawRangeInput =
|
|
12550
12668
|
/*#__PURE__*/
|
|
12551
12669
|
function (_Component) {
|
|
@@ -12624,13 +12742,13 @@ function (_Component) {
|
|
|
12624
12742
|
max = _this$normalizeRangeF.max;
|
|
12625
12743
|
|
|
12626
12744
|
var step = 1 / Math.pow(10, precision);
|
|
12627
|
-
return
|
|
12628
|
-
className: classnames(cx$
|
|
12629
|
-
},
|
|
12630
|
-
className: cx$
|
|
12745
|
+
return React.createElement("div", {
|
|
12746
|
+
className: classnames(cx$a('', !canRefine && '-noRefinement'), className)
|
|
12747
|
+
}, React.createElement("form", {
|
|
12748
|
+
className: cx$a('form'),
|
|
12631
12749
|
onSubmit: this.onSubmit
|
|
12632
|
-
},
|
|
12633
|
-
className: cx$
|
|
12750
|
+
}, React.createElement("input", {
|
|
12751
|
+
className: cx$a('input', 'input--min'),
|
|
12634
12752
|
type: "number",
|
|
12635
12753
|
min: min,
|
|
12636
12754
|
max: max,
|
|
@@ -12643,10 +12761,10 @@ function (_Component) {
|
|
|
12643
12761
|
from: e.currentTarget.value
|
|
12644
12762
|
});
|
|
12645
12763
|
}
|
|
12646
|
-
}),
|
|
12647
|
-
className: cx$
|
|
12648
|
-
}, translate('separator')),
|
|
12649
|
-
className: cx$
|
|
12764
|
+
}), React.createElement("span", {
|
|
12765
|
+
className: cx$a('separator')
|
|
12766
|
+
}, translate('separator')), React.createElement("input", {
|
|
12767
|
+
className: cx$a('input', 'input--max'),
|
|
12650
12768
|
type: "number",
|
|
12651
12769
|
min: min,
|
|
12652
12770
|
max: max,
|
|
@@ -12659,8 +12777,8 @@ function (_Component) {
|
|
|
12659
12777
|
to: e.currentTarget.value
|
|
12660
12778
|
});
|
|
12661
12779
|
}
|
|
12662
|
-
}),
|
|
12663
|
-
className: cx$
|
|
12780
|
+
}), React.createElement("button", {
|
|
12781
|
+
className: cx$a('submit'),
|
|
12664
12782
|
type: "submit"
|
|
12665
12783
|
}, translate('submit'))));
|
|
12666
12784
|
}
|
|
@@ -12736,12 +12854,12 @@ var RangeInput = translatable({
|
|
|
12736
12854
|
*/
|
|
12737
12855
|
|
|
12738
12856
|
var RangeInputWidget = function RangeInputWidget(props) {
|
|
12739
|
-
return
|
|
12857
|
+
return React.createElement(PanelWrapper, props, React.createElement(RangeInput, props));
|
|
12740
12858
|
};
|
|
12741
12859
|
|
|
12742
12860
|
connectRange(RangeInputWidget);
|
|
12743
12861
|
|
|
12744
|
-
var cx$
|
|
12862
|
+
var cx$9 = createClassNames('RatingMenu');
|
|
12745
12863
|
|
|
12746
12864
|
var RatingMenu =
|
|
12747
12865
|
/*#__PURE__*/
|
|
@@ -12792,14 +12910,14 @@ function (_Component) {
|
|
|
12792
12910
|
rating++;
|
|
12793
12911
|
}
|
|
12794
12912
|
|
|
12795
|
-
icons.push([
|
|
12913
|
+
icons.push([React.createElement("svg", {
|
|
12796
12914
|
key: icon,
|
|
12797
|
-
className: cx$
|
|
12915
|
+
className: cx$9('starIcon', icon >= lowerBound ? 'starIcon--empty' : 'starIcon--full'),
|
|
12798
12916
|
"aria-hidden": "true",
|
|
12799
12917
|
width: "24",
|
|
12800
12918
|
height: "24"
|
|
12801
|
-
},
|
|
12802
|
-
xlinkHref: "#".concat(cx$
|
|
12919
|
+
}, React.createElement("use", {
|
|
12920
|
+
xlinkHref: "#".concat(cx$9(icon >= lowerBound ? 'starEmptySymbol' : 'starSymbol'))
|
|
12803
12921
|
})), ' ']);
|
|
12804
12922
|
} // The last item of the list (the default item), should not
|
|
12805
12923
|
// be clickable if it is selected.
|
|
@@ -12813,17 +12931,17 @@ function (_Component) {
|
|
|
12813
12931
|
}),
|
|
12814
12932
|
onClick: this.onClick.bind(this, lowerBound, max)
|
|
12815
12933
|
};
|
|
12816
|
-
return
|
|
12934
|
+
return React.createElement("li", {
|
|
12817
12935
|
key: lowerBound,
|
|
12818
|
-
className: cx$
|
|
12819
|
-
},
|
|
12820
|
-
className: cx$
|
|
12936
|
+
className: cx$9('item', selected && 'item--selected', disabled && 'item--disabled')
|
|
12937
|
+
}, React.createElement("a", _extends({
|
|
12938
|
+
className: cx$9('link'),
|
|
12821
12939
|
"aria-label": "".concat(rating).concat(translate('ratingLabel'))
|
|
12822
|
-
}, onClickHandler), icons,
|
|
12823
|
-
className: cx$
|
|
12940
|
+
}, onClickHandler), icons, React.createElement("span", {
|
|
12941
|
+
className: cx$9('label'),
|
|
12824
12942
|
"aria-hidden": "true"
|
|
12825
|
-
}, translate('ratingLabel')), ' ',
|
|
12826
|
-
className: cx$
|
|
12943
|
+
}, translate('ratingLabel')), ' ', React.createElement("span", {
|
|
12944
|
+
className: cx$9('count')
|
|
12827
12945
|
}, count)));
|
|
12828
12946
|
}
|
|
12829
12947
|
}, {
|
|
@@ -12855,7 +12973,7 @@ function (_Component) {
|
|
|
12855
12973
|
start: 0,
|
|
12856
12974
|
end: Math.max(inclusiveLength, 0)
|
|
12857
12975
|
}).map(function (index) {
|
|
12858
|
-
var element = find
|
|
12976
|
+
var element = find(values, function (item) {
|
|
12859
12977
|
return item.value === limitMax - index;
|
|
12860
12978
|
});
|
|
12861
12979
|
var placeholder = {
|
|
@@ -12878,25 +12996,25 @@ function (_Component) {
|
|
|
12878
12996
|
createURL: createURL
|
|
12879
12997
|
});
|
|
12880
12998
|
});
|
|
12881
|
-
return
|
|
12882
|
-
className: classnames(cx$
|
|
12883
|
-
},
|
|
12999
|
+
return React.createElement("div", {
|
|
13000
|
+
className: classnames(cx$9('', !canRefine && '-noRefinement'), className)
|
|
13001
|
+
}, React.createElement("svg", {
|
|
12884
13002
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12885
13003
|
style: {
|
|
12886
13004
|
display: 'none'
|
|
12887
13005
|
}
|
|
12888
|
-
},
|
|
12889
|
-
id: cx$
|
|
13006
|
+
}, React.createElement("symbol", {
|
|
13007
|
+
id: cx$9('starSymbol'),
|
|
12890
13008
|
viewBox: "0 0 24 24"
|
|
12891
|
-
},
|
|
13009
|
+
}, React.createElement("path", {
|
|
12892
13010
|
d: "M12 .288l2.833 8.718h9.167l-7.417 5.389 2.833 8.718-7.416-5.388-7.417 5.388 2.833-8.718-7.416-5.389h9.167z"
|
|
12893
|
-
})),
|
|
12894
|
-
id: cx$
|
|
13011
|
+
})), React.createElement("symbol", {
|
|
13012
|
+
id: cx$9('starEmptySymbol'),
|
|
12895
13013
|
viewBox: "0 0 24 24"
|
|
12896
|
-
},
|
|
13014
|
+
}, React.createElement("path", {
|
|
12897
13015
|
d: "M12 6.76l1.379 4.246h4.465l-3.612 2.625 1.379 4.246-3.611-2.625-3.612 2.625 1.379-4.246-3.612-2.625h4.465l1.38-4.246zm0-6.472l-2.833 8.718h-9.167l7.416 5.389-2.833 8.718 7.417-5.388 7.416 5.388-2.833-8.718 7.417-5.389h-9.167l-2.833-8.718z"
|
|
12898
|
-
}))),
|
|
12899
|
-
className: cx$
|
|
13016
|
+
}))), React.createElement("ul", {
|
|
13017
|
+
className: cx$9('list', !canRefine && 'list--noRefinement')
|
|
12900
13018
|
}, items));
|
|
12901
13019
|
}
|
|
12902
13020
|
}]);
|
|
@@ -12979,12 +13097,12 @@ var RatingMenu$1 = translatable({
|
|
|
12979
13097
|
*/
|
|
12980
13098
|
|
|
12981
13099
|
var RatingMenuWidget = function RatingMenuWidget(props) {
|
|
12982
|
-
return
|
|
13100
|
+
return React.createElement(PanelWrapper, props, React.createElement(RatingMenu$1, props));
|
|
12983
13101
|
};
|
|
12984
13102
|
|
|
12985
13103
|
connectRange(RatingMenuWidget);
|
|
12986
13104
|
|
|
12987
|
-
var cx$
|
|
13105
|
+
var cx$8 = createClassNames('RefinementList');
|
|
12988
13106
|
|
|
12989
13107
|
var RefinementList$1 =
|
|
12990
13108
|
/*#__PURE__*/
|
|
@@ -13015,23 +13133,23 @@ function (_Component) {
|
|
|
13015
13133
|
});
|
|
13016
13134
|
|
|
13017
13135
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
13018
|
-
var label = _this.props.isFromSearch ?
|
|
13136
|
+
var label = _this.props.isFromSearch ? React.createElement(Highlight, {
|
|
13019
13137
|
attribute: "label",
|
|
13020
13138
|
hit: item
|
|
13021
13139
|
}) : item.label;
|
|
13022
|
-
return
|
|
13023
|
-
className: cx$
|
|
13024
|
-
},
|
|
13025
|
-
className: cx$
|
|
13140
|
+
return React.createElement("label", {
|
|
13141
|
+
className: cx$8('label')
|
|
13142
|
+
}, React.createElement("input", {
|
|
13143
|
+
className: cx$8('checkbox'),
|
|
13026
13144
|
type: "checkbox",
|
|
13027
13145
|
checked: item.isRefined,
|
|
13028
13146
|
onChange: function onChange() {
|
|
13029
13147
|
return _this.selectItem(item, resetQuery);
|
|
13030
13148
|
}
|
|
13031
|
-
}),
|
|
13032
|
-
className: cx$
|
|
13033
|
-
}, label), ' ',
|
|
13034
|
-
className: cx$
|
|
13149
|
+
}), React.createElement("span", {
|
|
13150
|
+
className: cx$8('labelText')
|
|
13151
|
+
}, label), ' ', React.createElement("span", {
|
|
13152
|
+
className: cx$8('count')
|
|
13035
13153
|
}, item.count.toLocaleString()));
|
|
13036
13154
|
});
|
|
13037
13155
|
|
|
@@ -13052,10 +13170,10 @@ function (_Component) {
|
|
|
13052
13170
|
searchable = _this$props.searchable,
|
|
13053
13171
|
canRefine = _this$props.canRefine,
|
|
13054
13172
|
className = _this$props.className;
|
|
13055
|
-
return
|
|
13173
|
+
return React.createElement(List, {
|
|
13056
13174
|
renderItem: this.renderItem,
|
|
13057
13175
|
selectItem: this.selectItem,
|
|
13058
|
-
cx: cx$
|
|
13176
|
+
cx: cx$8,
|
|
13059
13177
|
translate: translate,
|
|
13060
13178
|
items: items,
|
|
13061
13179
|
showMore: showMore,
|
|
@@ -13164,12 +13282,12 @@ var RefinementList$2 = translatable({
|
|
|
13164
13282
|
*/
|
|
13165
13283
|
|
|
13166
13284
|
var RefinementListWidget = function RefinementListWidget(props) {
|
|
13167
|
-
return
|
|
13285
|
+
return React.createElement(PanelWrapper, props, React.createElement(RefinementList$2, props));
|
|
13168
13286
|
};
|
|
13169
13287
|
|
|
13170
|
-
var RefinementList
|
|
13288
|
+
var RefinementList = connectRefinementList(RefinementListWidget);
|
|
13171
13289
|
|
|
13172
|
-
var cx$
|
|
13290
|
+
var cx$7 = createClassNames('ScrollTo');
|
|
13173
13291
|
|
|
13174
13292
|
var ScrollTo =
|
|
13175
13293
|
/*#__PURE__*/
|
|
@@ -13198,11 +13316,11 @@ function (_Component) {
|
|
|
13198
13316
|
value: function render() {
|
|
13199
13317
|
var _this = this;
|
|
13200
13318
|
|
|
13201
|
-
return
|
|
13319
|
+
return React.createElement("div", {
|
|
13202
13320
|
ref: function ref(_ref) {
|
|
13203
13321
|
return _this.el = _ref;
|
|
13204
13322
|
},
|
|
13205
|
-
className: cx$
|
|
13323
|
+
className: cx$7('')
|
|
13206
13324
|
}, this.props.children);
|
|
13207
13325
|
}
|
|
13208
13326
|
}]);
|
|
@@ -13296,14 +13414,14 @@ connectScrollTo(ScrollTo);
|
|
|
13296
13414
|
* );
|
|
13297
13415
|
*/
|
|
13298
13416
|
|
|
13299
|
-
var SearchBox
|
|
13417
|
+
var SearchBox = connectSearchBox(SearchBox$2);
|
|
13300
13418
|
|
|
13301
|
-
var cx$
|
|
13419
|
+
var cx$6 = createClassNames('Snippet');
|
|
13302
13420
|
|
|
13303
13421
|
var Snippet = function Snippet(props) {
|
|
13304
|
-
return
|
|
13422
|
+
return React.createElement(Highlighter, _extends({}, props, {
|
|
13305
13423
|
highlightProperty: "_snippetResult",
|
|
13306
|
-
cx: cx$
|
|
13424
|
+
cx: cx$6
|
|
13307
13425
|
}));
|
|
13308
13426
|
};
|
|
13309
13427
|
|
|
@@ -13353,11 +13471,11 @@ var Snippet = function Snippet(props) {
|
|
|
13353
13471
|
|
|
13354
13472
|
connectHighlight(Snippet);
|
|
13355
13473
|
|
|
13356
|
-
var cx$
|
|
13474
|
+
var cx$5 = createClassNames('RelevantSort');
|
|
13357
13475
|
|
|
13358
13476
|
var DefaultButtonTextComponent = function DefaultButtonTextComponent(_ref) {
|
|
13359
13477
|
var isRelevantSorted = _ref.isRelevantSorted;
|
|
13360
|
-
return
|
|
13478
|
+
return React.createElement("span", null, isRelevantSorted ? 'See all results' : 'See relevant results');
|
|
13361
13479
|
};
|
|
13362
13480
|
|
|
13363
13481
|
var RelevantSort = function RelevantSort(_ref2) {
|
|
@@ -13369,18 +13487,18 @@ var RelevantSort = function RelevantSort(_ref2) {
|
|
|
13369
13487
|
ButtonTextComponent = _ref2$buttonTextCompo === void 0 ? DefaultButtonTextComponent : _ref2$buttonTextCompo,
|
|
13370
13488
|
TextComponent = _ref2.textComponent,
|
|
13371
13489
|
refine = _ref2.refine;
|
|
13372
|
-
return !isVirtualReplica ? null :
|
|
13373
|
-
className: classnames(cx$
|
|
13374
|
-
},
|
|
13375
|
-
className: cx$
|
|
13376
|
-
}, TextComponent &&
|
|
13490
|
+
return !isVirtualReplica ? null : React.createElement("div", {
|
|
13491
|
+
className: classnames(cx$5(''), className)
|
|
13492
|
+
}, React.createElement("div", {
|
|
13493
|
+
className: cx$5('text')
|
|
13494
|
+
}, TextComponent && React.createElement(TextComponent, {
|
|
13377
13495
|
isRelevantSorted: isRelevantSorted
|
|
13378
|
-
})),
|
|
13379
|
-
className: cx$
|
|
13496
|
+
})), React.createElement("button", {
|
|
13497
|
+
className: cx$5('button'),
|
|
13380
13498
|
onClick: function onClick() {
|
|
13381
13499
|
return refine(isRelevantSorted ? 0 : undefined);
|
|
13382
13500
|
}
|
|
13383
|
-
},
|
|
13501
|
+
}, React.createElement(ButtonTextComponent, {
|
|
13384
13502
|
isRelevantSorted: isRelevantSorted
|
|
13385
13503
|
})));
|
|
13386
13504
|
};
|
|
@@ -13396,7 +13514,7 @@ RelevantSort.propTypes = {
|
|
|
13396
13514
|
|
|
13397
13515
|
connectRelevantSort(RelevantSort);
|
|
13398
13516
|
|
|
13399
|
-
var cx$
|
|
13517
|
+
var cx$4 = createClassNames('SortBy');
|
|
13400
13518
|
|
|
13401
13519
|
var SortBy =
|
|
13402
13520
|
/*#__PURE__*/
|
|
@@ -13417,10 +13535,10 @@ function (_Component) {
|
|
|
13417
13535
|
currentRefinement = _this$props.currentRefinement,
|
|
13418
13536
|
refine = _this$props.refine,
|
|
13419
13537
|
className = _this$props.className;
|
|
13420
|
-
return
|
|
13421
|
-
className: classnames(cx$
|
|
13422
|
-
},
|
|
13423
|
-
cx: cx$
|
|
13538
|
+
return React.createElement("div", {
|
|
13539
|
+
className: classnames(cx$4(''), className)
|
|
13540
|
+
}, React.createElement(Select, {
|
|
13541
|
+
cx: cx$4,
|
|
13424
13542
|
items: items,
|
|
13425
13543
|
selectedItem: currentRefinement,
|
|
13426
13544
|
onSelect: refine
|
|
@@ -13486,7 +13604,7 @@ _defineProperty(SortBy, "defaultProps", {
|
|
|
13486
13604
|
|
|
13487
13605
|
connectSortBy(SortBy);
|
|
13488
13606
|
|
|
13489
|
-
var cx$
|
|
13607
|
+
var cx$3 = createClassNames('Stats');
|
|
13490
13608
|
|
|
13491
13609
|
var Stats = function Stats(_ref) {
|
|
13492
13610
|
var _ref$className = _ref.className,
|
|
@@ -13496,10 +13614,10 @@ var Stats = function Stats(_ref) {
|
|
|
13496
13614
|
nbSortedHits = _ref.nbSortedHits,
|
|
13497
13615
|
processingTimeMS = _ref.processingTimeMS,
|
|
13498
13616
|
translate = _ref.translate;
|
|
13499
|
-
return
|
|
13500
|
-
className: classnames(cx$
|
|
13501
|
-
},
|
|
13502
|
-
className: cx$
|
|
13617
|
+
return React.createElement("div", {
|
|
13618
|
+
className: classnames(cx$3(''), className)
|
|
13619
|
+
}, React.createElement("span", {
|
|
13620
|
+
className: cx$3('text')
|
|
13503
13621
|
}, translate('stats', nbHits, processingTimeMS, nbSortedHits, areHitsSorted)));
|
|
13504
13622
|
};
|
|
13505
13623
|
|
|
@@ -13547,7 +13665,7 @@ var Stats$1 = translatable({
|
|
|
13547
13665
|
|
|
13548
13666
|
connectStats(Stats$1);
|
|
13549
13667
|
|
|
13550
|
-
var cx$
|
|
13668
|
+
var cx$2 = createClassNames('ToggleRefinement');
|
|
13551
13669
|
|
|
13552
13670
|
var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
13553
13671
|
var currentRefinement = _ref.currentRefinement,
|
|
@@ -13555,19 +13673,19 @@ var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
|
13555
13673
|
canRefine = _ref.canRefine,
|
|
13556
13674
|
refine = _ref.refine,
|
|
13557
13675
|
className = _ref.className;
|
|
13558
|
-
return
|
|
13559
|
-
className: classnames(cx$
|
|
13560
|
-
},
|
|
13561
|
-
className: cx$
|
|
13562
|
-
},
|
|
13563
|
-
className: cx$
|
|
13676
|
+
return React.createElement("div", {
|
|
13677
|
+
className: classnames(cx$2('', !canRefine && '-noRefinement'), className)
|
|
13678
|
+
}, React.createElement("label", {
|
|
13679
|
+
className: cx$2('label')
|
|
13680
|
+
}, React.createElement("input", {
|
|
13681
|
+
className: cx$2('checkbox'),
|
|
13564
13682
|
type: "checkbox",
|
|
13565
13683
|
checked: currentRefinement,
|
|
13566
13684
|
onChange: function onChange(event) {
|
|
13567
13685
|
return refine(event.target.checked);
|
|
13568
13686
|
}
|
|
13569
|
-
}),
|
|
13570
|
-
className: cx$
|
|
13687
|
+
}), React.createElement("span", {
|
|
13688
|
+
className: cx$2('labelText')
|
|
13571
13689
|
}, label)));
|
|
13572
13690
|
};
|
|
13573
13691
|
|
|
@@ -13776,11 +13894,11 @@ function createVoiceSearchHelper(_ref) {
|
|
|
13776
13894
|
};
|
|
13777
13895
|
}
|
|
13778
13896
|
|
|
13779
|
-
var cx$
|
|
13897
|
+
var cx$1 = createClassNames('VoiceSearch');
|
|
13780
13898
|
|
|
13781
13899
|
var ButtonSvg = function ButtonSvg(_ref) {
|
|
13782
13900
|
var children = _ref.children;
|
|
13783
|
-
return
|
|
13901
|
+
return React.createElement("svg", {
|
|
13784
13902
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13785
13903
|
width: "16",
|
|
13786
13904
|
height: "16",
|
|
@@ -13797,36 +13915,36 @@ var DefaultButtonText = function DefaultButtonText(_ref2) {
|
|
|
13797
13915
|
var status = _ref2.status,
|
|
13798
13916
|
errorCode = _ref2.errorCode,
|
|
13799
13917
|
isListening = _ref2.isListening;
|
|
13800
|
-
return status === 'error' && errorCode === 'not-allowed' ?
|
|
13918
|
+
return status === 'error' && errorCode === 'not-allowed' ? React.createElement(ButtonSvg, null, React.createElement("line", {
|
|
13801
13919
|
x1: "1",
|
|
13802
13920
|
y1: "1",
|
|
13803
13921
|
x2: "23",
|
|
13804
13922
|
y2: "23"
|
|
13805
|
-
}),
|
|
13923
|
+
}), React.createElement("path", {
|
|
13806
13924
|
d: "M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"
|
|
13807
|
-
}),
|
|
13925
|
+
}), React.createElement("path", {
|
|
13808
13926
|
d: "M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"
|
|
13809
|
-
}),
|
|
13927
|
+
}), React.createElement("line", {
|
|
13810
13928
|
x1: "12",
|
|
13811
13929
|
y1: "19",
|
|
13812
13930
|
x2: "12",
|
|
13813
13931
|
y2: "23"
|
|
13814
|
-
}),
|
|
13932
|
+
}), React.createElement("line", {
|
|
13815
13933
|
x1: "8",
|
|
13816
13934
|
y1: "23",
|
|
13817
13935
|
x2: "16",
|
|
13818
13936
|
y2: "23"
|
|
13819
|
-
})) :
|
|
13937
|
+
})) : React.createElement(ButtonSvg, null, React.createElement("path", {
|
|
13820
13938
|
d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z",
|
|
13821
13939
|
fill: isListening ? 'currentColor' : ''
|
|
13822
|
-
}),
|
|
13940
|
+
}), React.createElement("path", {
|
|
13823
13941
|
d: "M19 10v2a7 7 0 0 1-14 0v-2"
|
|
13824
|
-
}),
|
|
13942
|
+
}), React.createElement("line", {
|
|
13825
13943
|
x1: "12",
|
|
13826
13944
|
y1: "19",
|
|
13827
13945
|
x2: "12",
|
|
13828
13946
|
y2: "23"
|
|
13829
|
-
}),
|
|
13947
|
+
}), React.createElement("line", {
|
|
13830
13948
|
x1: "8",
|
|
13831
13949
|
y1: "23",
|
|
13832
13950
|
x2: "16",
|
|
@@ -13836,7 +13954,7 @@ var DefaultButtonText = function DefaultButtonText(_ref2) {
|
|
|
13836
13954
|
|
|
13837
13955
|
var DefaultStatus = function DefaultStatus(_ref3) {
|
|
13838
13956
|
var transcript = _ref3.transcript;
|
|
13839
|
-
return
|
|
13957
|
+
return React.createElement("p", null, transcript);
|
|
13840
13958
|
};
|
|
13841
13959
|
|
|
13842
13960
|
var VoiceSearch =
|
|
@@ -13921,17 +14039,17 @@ function (_Component) {
|
|
|
13921
14039
|
isSpeechFinal: isSpeechFinal,
|
|
13922
14040
|
isBrowserSupported: isBrowserSupported()
|
|
13923
14041
|
};
|
|
13924
|
-
return
|
|
13925
|
-
className: cx$
|
|
13926
|
-
},
|
|
13927
|
-
className: cx$
|
|
14042
|
+
return React.createElement("div", {
|
|
14043
|
+
className: cx$1('')
|
|
14044
|
+
}, React.createElement("button", {
|
|
14045
|
+
className: cx$1('button'),
|
|
13928
14046
|
type: "button",
|
|
13929
14047
|
title: isBrowserSupported() ? translate('buttonTitle') : translate('disabledButtonTitle'),
|
|
13930
14048
|
onClick: this.onClick,
|
|
13931
14049
|
disabled: !isBrowserSupported()
|
|
13932
|
-
},
|
|
13933
|
-
className: cx$
|
|
13934
|
-
},
|
|
14050
|
+
}, React.createElement(ButtonTextComponent, innerProps)), React.createElement("div", {
|
|
14051
|
+
className: cx$1('status')
|
|
14052
|
+
}, React.createElement(StatusComponent, innerProps)));
|
|
13935
14053
|
}
|
|
13936
14054
|
}, {
|
|
13937
14055
|
key: "componentWillUnmount",
|
|
@@ -13958,14 +14076,14 @@ var VoiceSearch$1 = translatable({
|
|
|
13958
14076
|
|
|
13959
14077
|
connectVoiceSearch(VoiceSearch$1);
|
|
13960
14078
|
|
|
13961
|
-
var cx
|
|
14079
|
+
var cx = createClassNames('QueryRuleCustomData');
|
|
13962
14080
|
|
|
13963
14081
|
var QueryRuleCustomData = function QueryRuleCustomData(_ref) {
|
|
13964
14082
|
var items = _ref.items,
|
|
13965
14083
|
className = _ref.className,
|
|
13966
14084
|
children = _ref.children;
|
|
13967
|
-
return
|
|
13968
|
-
className: classnames(cx
|
|
14085
|
+
return React.createElement("div", {
|
|
14086
|
+
className: classnames(cx(''), className)
|
|
13969
14087
|
}, children({
|
|
13970
14088
|
items: items
|
|
13971
14089
|
}));
|
|
@@ -13978,7 +14096,7 @@ QueryRuleCustomData.propTypes = {
|
|
|
13978
14096
|
};
|
|
13979
14097
|
|
|
13980
14098
|
var QueryRuleCustomDataWidget = function QueryRuleCustomDataWidget(props) {
|
|
13981
|
-
return
|
|
14099
|
+
return React.createElement(PanelWrapper, props, React.createElement(QueryRuleCustomData, props));
|
|
13982
14100
|
};
|
|
13983
14101
|
|
|
13984
14102
|
connectQueryRules(QueryRuleCustomDataWidget);
|
|
@@ -14002,57 +14120,57 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14002
14120
|
|
|
14003
14121
|
var hit = props.hit;
|
|
14004
14122
|
if (moment().isSameOrBefore(props.hit.pubDateSort)) return null;
|
|
14005
|
-
return
|
|
14123
|
+
return React.createElement(
|
|
14006
14124
|
'div',
|
|
14007
14125
|
{ key: hit.url, className: 'hitResult ' + styles.article },
|
|
14008
|
-
|
|
14126
|
+
React.createElement(
|
|
14009
14127
|
'a',
|
|
14010
14128
|
{ href: '/view/' + hit.url, style: this.props.variant === 'right' ? { flexDirection: 'row-reverse' } : {} },
|
|
14011
|
-
|
|
14129
|
+
React.createElement(
|
|
14012
14130
|
'div',
|
|
14013
14131
|
{ className: styles.thumb },
|
|
14014
|
-
|
|
14132
|
+
React.createElement(
|
|
14015
14133
|
'figure',
|
|
14016
14134
|
null,
|
|
14017
|
-
|
|
14135
|
+
React.createElement(
|
|
14018
14136
|
LazyLoad,
|
|
14019
14137
|
{ once: true },
|
|
14020
|
-
|
|
14021
|
-
src: hit.thumbnail && hit.thumbnail.asset ? urlFor({ client: client, source: hit.thumbnail }) : hit.thumbnail && _typeof$
|
|
14138
|
+
React.createElement('img', {
|
|
14139
|
+
src: hit.thumbnail && hit.thumbnail.asset ? urlFor({ client: client, source: hit.thumbnail }) : hit.thumbnail && _typeof$2(hit.thumbnail === 'string') ? hit.thumbnail : this.props.defaultImage
|
|
14022
14140
|
})
|
|
14023
14141
|
)
|
|
14024
14142
|
)
|
|
14025
14143
|
)
|
|
14026
14144
|
),
|
|
14027
|
-
|
|
14145
|
+
React.createElement(
|
|
14028
14146
|
'div',
|
|
14029
14147
|
{ className: styles.info, style: this.props.variant === 'right' ? { padding: '0 1rem 0 0' } : { padding: ' 0 0 0 1rem' } },
|
|
14030
|
-
|
|
14148
|
+
React.createElement(
|
|
14031
14149
|
'a',
|
|
14032
14150
|
{ href: '/view/' + hit.url },
|
|
14033
|
-
|
|
14151
|
+
React.createElement(
|
|
14034
14152
|
'h2',
|
|
14035
14153
|
null,
|
|
14036
14154
|
hit.title
|
|
14037
14155
|
)
|
|
14038
14156
|
),
|
|
14039
|
-
hit.pubDateSort &&
|
|
14157
|
+
hit.pubDateSort && React.createElement(
|
|
14040
14158
|
'p',
|
|
14041
14159
|
{ className: styles.published },
|
|
14042
14160
|
moment(hit.pubDateSort).format('MMMM Do YYYY')
|
|
14043
14161
|
),
|
|
14044
|
-
hit.authorMapping && hit.authorMapping.length > 0 &&
|
|
14162
|
+
hit.authorMapping && hit.authorMapping.length > 0 && React.createElement(
|
|
14045
14163
|
'p',
|
|
14046
14164
|
{ className: styles.author },
|
|
14047
14165
|
hit.authorMapping.map(function (author) {
|
|
14048
|
-
return
|
|
14166
|
+
return React.createElement(
|
|
14049
14167
|
'span',
|
|
14050
14168
|
null,
|
|
14051
14169
|
author.displayName
|
|
14052
14170
|
);
|
|
14053
14171
|
})
|
|
14054
14172
|
),
|
|
14055
|
-
hit.summary &&
|
|
14173
|
+
hit.summary && React.createElement('p', { dangerouslySetInnerHTML: { __html: hit.summary }, className: styles.summary })
|
|
14056
14174
|
)
|
|
14057
14175
|
);
|
|
14058
14176
|
}
|
|
@@ -14065,10 +14183,10 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14065
14183
|
styles: this.props.deckStyles,
|
|
14066
14184
|
client: this.props.sanityClient
|
|
14067
14185
|
};
|
|
14068
|
-
return
|
|
14069
|
-
|
|
14186
|
+
return React.createElement(
|
|
14187
|
+
React.Fragment,
|
|
14070
14188
|
null,
|
|
14071
|
-
|
|
14189
|
+
React.createElement(
|
|
14072
14190
|
InstantSearch,
|
|
14073
14191
|
_extends$1({
|
|
14074
14192
|
searchClient: this.props.searchClient,
|
|
@@ -14079,29 +14197,29 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14079
14197
|
indexName: this.props.indexName,
|
|
14080
14198
|
onSearchParameters: this.props.onSearchParameters
|
|
14081
14199
|
}, this.props),
|
|
14082
|
-
|
|
14083
|
-
|
|
14084
|
-
this.props.refinementAttributes &&
|
|
14200
|
+
React.createElement(Configure, { hitsPerPage: this.props.hitsPerPage || 20 }),
|
|
14201
|
+
React.createElement(SearchBox, null),
|
|
14202
|
+
this.props.refinementAttributes && React.createElement(
|
|
14085
14203
|
'div',
|
|
14086
14204
|
{ className: 'search_refinement' },
|
|
14087
14205
|
this.props.refinementAttributes.map(function (item, index) {
|
|
14088
|
-
return
|
|
14206
|
+
return React.createElement(
|
|
14089
14207
|
DropdownButton,
|
|
14090
14208
|
{ title: item.title },
|
|
14091
|
-
|
|
14209
|
+
React.createElement(RefinementList, { showMore: item.showMore, limit: item.limit, showMoreLimit: item.showMoreLimit, attribute: item.attribute })
|
|
14092
14210
|
);
|
|
14093
14211
|
})
|
|
14094
14212
|
),
|
|
14095
|
-
|
|
14213
|
+
React.createElement(
|
|
14096
14214
|
'div',
|
|
14097
14215
|
{ className: 'AlgoliaResults' },
|
|
14098
|
-
|
|
14216
|
+
React.createElement(Hits, { hitComponent: function hitComponent(hit) {
|
|
14099
14217
|
return _this2.Deck(_extends$1({}, hit, { propsObj: propsObj }));
|
|
14100
14218
|
} })
|
|
14101
14219
|
),
|
|
14102
|
-
|
|
14220
|
+
React.createElement(Pagination, null)
|
|
14103
14221
|
),
|
|
14104
|
-
|
|
14222
|
+
React.createElement(
|
|
14105
14223
|
'style',
|
|
14106
14224
|
{ jsx: 'true' },
|
|
14107
14225
|
'\n .hitResult {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-bottom: 1rem;\n border-bottom: 1px solid #00000024;\n padding: 1rem 0;\n }\n .hitResult > a:first-child {\n width: 30%;\n }\n .hitResult > a:first-child > div{\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n .hitResult > div:last-child > a {\n margin-bottom: .5rem;\n width: 100%;\n }\n @media only screen and (max-width: 568px) {\n .hitResult {\n flex-direction: column;\n align-items: center;\n border: none;\n padding: 0;\n }\n .hitResult > a:first-child {\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n }\n .AlgoliaResults {\n padding-left: 15px;\n margin-top: 3rem;\n }\n\n .search_refinement {\n display: flex;\n margin: 2rem 0;\n }\n\n .search_refinement > div {\n padding-right: 1rem;\n max-height: 500px;\n }\n\n .ais-Hits-list {\n margin: 0;\n list-style: none;\n padding-inline-start: 0;\n }\n .ais-Pagination-list {\n list-style: none;\n }\n .ais-Pagination-list {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n .ais-Pagination-item + .ais-Pagination-item {\n margin-left: 0.3rem;\n }\n .ais-Pagination-link {\n padding: 0.3rem 0.6rem;\n display: block;\n border: 1px solid var(--search-primary);\n border-radius: 5px;\n transition: background-color 0.2s ease-out;\n }\n .ais-Pagination-link:focus,\n .ais-Pagination-link:hover {\n background-color: var(--search-secondary);\n color: #fff;\n }\n .ais-Pagination-item--disabled .ais-Pagination-link {\n opacity: 0.6;\n cursor: not-allowed;\n color: var(--search-secondary);\n }\n .ais-Pagination-item--disabled .ais-Pagination-link:focus,\n .ais-Pagination-item--disabled .ais-Pagination-link:hover {\n color: #fff;\n background-color: var(--search-secondary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link {\n color: #fff;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link:focus,\n .ais-Pagination-item--selected .ais-Pagination-link:hover {\n color: #fff;\n }\n .ais-Pagination-list,\n .ais-Results-list {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .ais-Pagination-list,\n .ais-PoweredBy,\n .ais-RangeInput-form,\n .ais-RatingMenu-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .ais-RefinementList-item {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .ais-RefinementList-list {\n margin: 0;\n padding: 0 1rem;\n width: max-content;\n }\n .ais-SearchBox-form {\n width: 100%;\n border-radius: 5px;\n height: 48px;\n }\n .ais-SearchBox-input {\n padding: 0.5rem;\n border-radius: 5px;\n width: calc(100% - 150px);\n height: 48px;\n border: 0;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit {\n width: 78px;\n border-radius: 5px;\n padding: 7px;\n margin-left: 5px;\n height: 48px;\n background-color: var(--search-primary);\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit > svg {\n fill: #fff;\n }\n .search_refinement > .dropdown > button {\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n\n .ais-SearchBox-reset {\n height: 48px;\n width: 48px;\n color: #fff;\n background-color: var(--search-primary);\n border: 0;\n margin-left: 5px;\n border-radius: 5px;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-reset > svg {\n fill: #fff;\n }\n .ais-RefinementList-checkbox {\n margin-right: 5px;\n }\n\n .ais-RefinementList-showMore {\n padding: 0.5rem;\n border: 0;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n color: #fff;\n border: 1px solid;\n border-radius: 5px;\n margin-left: 1rem;\n }\n '
|
|
@@ -14111,7 +14229,7 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14111
14229
|
}]);
|
|
14112
14230
|
|
|
14113
14231
|
return AlgoliaSearch;
|
|
14114
|
-
}(
|
|
14232
|
+
}(React.Component);
|
|
14115
14233
|
|
|
14116
14234
|
AlgoliaSearch.propTypes = {
|
|
14117
14235
|
searchState: PropTypes.object,
|