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