@mjhls/mjh-framework 1.0.850-beta.3 → 1.0.850
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 +31 -30
- package/dist/cjs/AD300x250x600.js +31 -30
- package/dist/cjs/AD728x90.js +34 -33
- package/dist/cjs/ADFloatingFooter.js +33 -32
- package/dist/cjs/ADFooter.js +15 -14
- package/dist/cjs/ADGutter.js +33 -32
- package/dist/cjs/{ADInfeed-98c71bcd.js → ADInfeed-fb136f1d.js} +15 -13
- package/dist/cjs/ADSkyscraper.js +33 -32
- package/dist/cjs/ADSponsoredResources.js +33 -32
- package/dist/cjs/ADWebcast.js +33 -32
- package/dist/cjs/ADWelcome.js +34 -33
- package/dist/cjs/{ADlgInfeed-9de32585.js → ADlgInfeed-d303d27e.js} +11 -10
- package/dist/cjs/AccordionPanel.js +31 -29
- package/dist/cjs/AdSlot.js +36 -35
- package/dist/cjs/AdSlotsProvider.js +21 -19
- package/dist/cjs/AlgoliaSearch.js +1087 -1068
- package/dist/cjs/AlphabeticList.js +26 -25
- package/dist/cjs/ArticleCarousel.js +24 -23
- package/dist/cjs/ArticleProgramLandingPage.js +60 -58
- package/dist/cjs/ArticleSeriesLandingPage.js +41 -40
- package/dist/cjs/ArticleSeriesListing.js +62 -61
- package/dist/cjs/Auth.js +3652 -0
- package/dist/cjs/AuthWrapper.js +311 -269
- package/dist/cjs/{AuthorComponent-bb831b74.js → AuthorComponent-c21aac7f.js} +14 -13
- package/dist/cjs/Beam.js +8 -8
- package/dist/cjs/{BlockContent-091a991f.js → BlockContent-36e54d77.js} +56 -55
- package/dist/cjs/Breadcrumbs.js +29 -27
- package/dist/cjs/CMEDeck.js +83 -83
- package/dist/cjs/Column1.js +14 -11
- package/dist/cjs/Column2.js +36 -33
- package/dist/cjs/Column3.js +62 -59
- package/dist/cjs/ConferenceArticleCard.js +38 -37
- package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
- package/dist/cjs/DeckContent.js +107 -103
- package/dist/cjs/DeckQueue.js +92 -88
- package/dist/cjs/{Dfp-26baccf1.js → Dfp-93399f8c.js} +35 -34
- package/dist/cjs/EventsDeck.js +159 -152
- package/dist/cjs/ExternalResources.js +81 -79
- package/dist/cjs/Feature.js +26 -24
- package/dist/cjs/ForbesHero.js +43 -42
- package/dist/cjs/GridContent.js +238 -233
- package/dist/cjs/GridHero.js +45 -44
- package/dist/cjs/GroupDeck.js +60 -59
- package/dist/cjs/HamMagazine.js +145 -140
- package/dist/cjs/Header.js +14 -12
- package/dist/cjs/Hero.js +13 -12
- package/dist/cjs/HighlightenVideo.js +18 -17
- package/dist/cjs/HorizontalArticleListing.js +73 -71
- package/dist/cjs/HorizontalHero.js +25 -24
- package/dist/cjs/IssueContentDeck.js +78 -73
- package/dist/cjs/IssueDeck.js +77 -72
- package/dist/cjs/IssueLanding.js +96 -92
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/LeftNav.js +41 -39
- package/dist/cjs/MasterDeck.js +81 -80
- package/dist/cjs/MediaSeriesLanding.js +1118 -1126
- package/dist/cjs/NavDvm.js +79 -74
- package/dist/cjs/{NavFooter-76c913e3.js → NavFooter-3dcd99a8.js} +15 -14
- package/dist/cjs/NavMagazine.js +152 -147
- package/dist/cjs/NavNative.js +147 -139
- package/dist/cjs/OncliveHero.js +19 -19
- package/dist/cjs/OncliveLargeHero.js +73 -72
- package/dist/cjs/PageFilter.js +15 -14
- package/dist/cjs/PartnerDetailListing.js +109 -105
- package/dist/cjs/PdfDownload.js +9 -8
- package/dist/cjs/PopUpModal.js +21 -19
- package/dist/cjs/PubSection.js +43 -40
- package/dist/cjs/PubToc.js +16 -15
- package/dist/cjs/PublicationDeck.js +67 -62
- package/dist/cjs/PublicationLanding.js +139 -135
- package/dist/cjs/QueueDeckExpanded.js +1174 -2074
- package/dist/cjs/RecentNews.js +22 -21
- package/dist/cjs/RelatedContent.js +55 -54
- package/dist/cjs/RelatedTopicsDropdown.js +32 -29
- package/dist/cjs/RolesDeck.js +32 -27
- package/dist/cjs/Search.js +22 -18
- package/dist/cjs/Segment.js +6 -6
- package/dist/cjs/SeriesListingDeck.js +38 -38
- package/dist/cjs/{SeriesSlider-8bbc989f.js → SeriesSlider-cbab9f0f.js} +40 -39
- package/dist/cjs/SetCookie.js +1 -1
- package/dist/cjs/SideFooter.js +39 -38
- package/dist/cjs/SocialIcons.js +10 -9
- package/dist/cjs/{SocialSearchComponent-cea213aa.js → SocialSearchComponent-ecb4f972.js} +40 -36
- package/dist/cjs/SocialShare.js +31 -29
- package/dist/cjs/TaxonomyCard.js +64 -59
- package/dist/cjs/TaxonomyDescription.js +56 -54
- package/dist/cjs/TemplateNormal.js +75 -74
- package/dist/cjs/ThumbnailCard.js +23 -21
- package/dist/cjs/Ustream.js +30 -29
- package/dist/cjs/VerticalHero.js +17 -16
- package/dist/cjs/VideoProgramLandingPage.js +78 -73
- package/dist/cjs/VideoSeriesCard.js +34 -33
- package/dist/cjs/VideoSeriesFilter.js +18 -18
- package/dist/cjs/VideoSeriesLandingPage.js +51 -50
- package/dist/cjs/VideoSeriesListing.js +79 -78
- package/dist/cjs/View.js +268 -263
- package/dist/cjs/YahooHero.js +42 -41
- package/dist/cjs/YoutubeGroup.js +67 -66
- package/dist/cjs/{_is-array-754e012d.js → _is-array-6128bd56.js} +6 -6
- package/dist/cjs/{_iter-detect-60b2f026.js → _iter-detect-55a5657a.js} +8 -8
- package/dist/cjs/{_object-pie-68c5bcbc.js → _object-pie-083f2dd6.js} +4 -4
- package/dist/cjs/{_object-sap-5e74ba08.js → _object-sap-a175b4a9.js} +1 -1
- package/dist/cjs/{_object-to-array-5762f850.js → _object-to-array-8fe5a54f.js} +2 -2
- package/dist/cjs/{_to-object-329a650b.js → _to-object-6de10e57.js} +8 -8
- package/dist/cjs/{asyncToGenerator-140e5f89.js → asyncToGenerator-58c289d9.js} +32 -32
- 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-f62321d4.js → core.get-iterator-method-f474eacc.js} +2 -2
- package/dist/cjs/{debounce-529c8d06.js → debounce-d4a2369b.js} +2 -2
- package/dist/cjs/{define-property-f4d12f4e.js → define-property-c88be878.js} +6 -6
- package/dist/cjs/{defineProperty-55548b25.js → defineProperty-0cb76d99.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/{es6.string.iterator-cc0bbaa4.js → es6.string.iterator-c2573ffd.js} +6 -6
- package/dist/cjs/{extends-0a918631.js → extends-29bdbc6d.js} +7 -7
- package/dist/cjs/faundadb.js +10 -327
- package/dist/cjs/{get-adbb11e3.js → get-5839e5b5.js} +21 -21
- package/dist/cjs/getRelatedArticle.js +445 -28
- package/dist/cjs/getRootDocGroup.js +6 -6
- package/dist/cjs/getSerializers.js +45 -44
- package/dist/cjs/{getTargeting-f1821260.js → getTargeting-faf37284.js} +12 -12
- package/dist/cjs/getTargeting.js +8 -8
- package/dist/cjs/iconBase-68959171.js +0 -3
- package/dist/cjs/{index-e2e62963.js → index-8041a4eb.js} +11 -1
- package/dist/cjs/{index-4151deb3.js → index-a67ab93e.js} +1009 -1558
- package/dist/cjs/index-bd6c9f56.js +211 -0
- 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 +169 -158
- package/dist/cjs/{inherits-9953db94.js → inherits-c2065b95.js} +22 -22
- package/dist/cjs/{isSymbol-04666465.js → isSymbol-03abbdf0.js} +15 -15
- package/dist/cjs/keys-7f2c2108.js +25 -0
- package/dist/cjs/{lodash-fc2922d0.js → lodash-f0783643.js} +128 -31
- package/dist/cjs/main-025fdc78.js +973 -0
- package/dist/cjs/md5-e1ca5797.js +323 -0
- 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-8f385299.js → slicedToArray-5d1bc3b3.js} +14 -14
- package/dist/cjs/{smoothscroll-5054361f.js → smoothscroll-99df7f93.js} +1 -1
- package/dist/cjs/stringify-c9ac1214.js +17 -0
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-9a3476fe.js → toConsumableArray-ddb70795.js} +9 -9
- package/dist/cjs/{toNumber-36d1e7e5.js → toNumber-5e1fac58.js} +40 -5
- package/dist/cjs/{typeof-725500bc.js → typeof-88a668c5.js} +36 -36
- package/dist/cjs/urlFor.js +3 -3
- package/dist/cjs/{ustream-api-d092dc31.js → ustream-api-b2b9092f.js} +4 -4
- package/dist/cjs/util-6f784d85.js +576 -0
- package/dist/cjs/{visibility-sensor-ad5e3116.js → visibility-sensor-eb2c5b69.js} +7 -5
- package/dist/cjs/{web.dom.iterable-a0e279c1.js → web.dom.iterable-46657b5c.js} +3 -3
- package/dist/esm/AD.js +7 -7
- package/dist/esm/AD300x250.js +27 -27
- package/dist/esm/AD300x250x600.js +27 -27
- package/dist/esm/AD728x90.js +30 -30
- package/dist/esm/ADFloatingFooter.js +29 -29
- package/dist/esm/ADFooter.js +11 -11
- package/dist/esm/ADGutter.js +29 -29
- package/dist/esm/{ADInfeed-bbdd5398.js → ADInfeed-df562a07.js} +11 -11
- package/dist/esm/ADSkyscraper.js +29 -29
- package/dist/esm/ADSponsoredResources.js +29 -29
- package/dist/esm/ADWebcast.js +29 -29
- package/dist/esm/ADWelcome.js +30 -30
- package/dist/esm/{ADlgInfeed-4473ee3b.js → ADlgInfeed-53992119.js} +8 -8
- package/dist/esm/AccordionPanel.js +24 -24
- package/dist/esm/AdSlot.js +27 -27
- package/dist/esm/AdSlotsProvider.js +14 -14
- package/dist/esm/AlgoliaSearch.js +736 -718
- package/dist/esm/AlphabeticList.js +22 -22
- package/dist/esm/ArticleCarousel.js +20 -20
- package/dist/esm/ArticleProgramLandingPage.js +56 -55
- package/dist/esm/ArticleSeriesLandingPage.js +37 -37
- package/dist/esm/ArticleSeriesListing.js +57 -57
- package/dist/esm/Auth.js +3632 -0
- package/dist/esm/AuthWrapper.js +308 -267
- package/dist/esm/{AuthorComponent-34b16174.js → AuthorComponent-5ae7409f.js} +11 -11
- package/dist/esm/Beam.js +8 -8
- package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-52cf21c5.js} +35 -35
- package/dist/esm/Breadcrumbs.js +17 -17
- package/dist/esm/CMEDeck.js +79 -79
- package/dist/esm/Column1.js +9 -9
- package/dist/esm/Column2.js +30 -30
- package/dist/esm/Column3.js +56 -56
- package/dist/esm/ConferenceArticleCard.js +35 -35
- package/dist/esm/{ConferenceBanner-8792ebd2.js → ConferenceBanner-9162d0ca.js} +4 -4
- package/dist/esm/DeckContent.js +98 -98
- package/dist/esm/DeckQueue.js +83 -83
- package/dist/esm/{Dfp-b7236041.js → Dfp-43f121ff.js} +22 -22
- package/dist/esm/EventsDeck.js +129 -129
- package/dist/esm/ExternalResources.js +74 -73
- package/dist/esm/Feature.js +18 -18
- package/dist/esm/ForbesHero.js +35 -35
- package/dist/esm/GridContent.js +201 -201
- package/dist/esm/GridHero.js +37 -37
- package/dist/esm/GroupDeck.js +47 -47
- package/dist/esm/HamMagazine.js +116 -116
- package/dist/esm/Header.js +8 -8
- package/dist/esm/Hero.js +10 -10
- package/dist/esm/HighlightenVideo.js +14 -14
- package/dist/esm/HorizontalArticleListing.js +69 -68
- package/dist/esm/HorizontalHero.js +22 -22
- package/dist/esm/IssueContentDeck.js +61 -61
- package/dist/esm/IssueDeck.js +65 -65
- package/dist/esm/IssueLanding.js +92 -89
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/LeftNav.js +35 -35
- package/dist/esm/MasterDeck.js +77 -77
- package/dist/esm/MediaSeriesLanding.js +841 -852
- package/dist/esm/NavDvm.js +59 -59
- package/dist/esm/{NavFooter-e27bd93b.js → NavFooter-c29526b7.js} +12 -12
- package/dist/esm/NavMagazine.js +126 -126
- package/dist/esm/NavNative.js +116 -116
- package/dist/esm/OncliveHero.js +16 -17
- package/dist/esm/OncliveLargeHero.js +60 -60
- package/dist/esm/PageFilter.js +12 -12
- package/dist/esm/PartnerDetailListing.js +105 -102
- package/dist/esm/PdfDownload.js +6 -6
- package/dist/esm/PopUpModal.js +14 -14
- package/dist/esm/PubSection.js +39 -37
- package/dist/esm/PubToc.js +12 -12
- package/dist/esm/PublicationDeck.js +53 -53
- package/dist/esm/PublicationLanding.js +122 -122
- package/dist/esm/QueueDeckExpanded.js +1152 -2052
- package/dist/esm/RecentNews.js +19 -19
- package/dist/esm/RelatedContent.js +48 -48
- package/dist/esm/RelatedTopicsDropdown.js +21 -21
- package/dist/esm/RolesDeck.js +25 -25
- package/dist/esm/Search.js +13 -13
- package/dist/esm/Segment.js +6 -6
- package/dist/esm/SeriesListingDeck.js +32 -32
- package/dist/esm/{SeriesSlider-a866bb21.js → SeriesSlider-5c62a578.js} +31 -31
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +34 -34
- package/dist/esm/SocialIcons.js +7 -7
- package/dist/esm/{SocialSearchComponent-03c3e869.js → SocialSearchComponent-cd38ae60.js} +30 -30
- package/dist/esm/SocialShare.js +25 -25
- package/dist/esm/TaxonomyCard.js +54 -54
- package/dist/esm/TaxonomyDescription.js +50 -49
- package/dist/esm/TemplateNormal.js +70 -70
- package/dist/esm/ThumbnailCard.js +14 -14
- package/dist/esm/Ustream.js +26 -26
- package/dist/esm/VerticalHero.js +14 -14
- package/dist/esm/VideoProgramLandingPage.js +67 -66
- package/dist/esm/VideoSeriesCard.js +26 -26
- package/dist/esm/VideoSeriesFilter.js +15 -15
- package/dist/esm/VideoSeriesLandingPage.js +42 -42
- package/dist/esm/VideoSeriesListing.js +74 -74
- package/dist/esm/View.js +248 -247
- package/dist/esm/YahooHero.js +35 -35
- package/dist/esm/YoutubeGroup.js +51 -51
- package/dist/esm/{_is-array-58e95429.js → _is-array-3e99e06e.js} +6 -6
- package/dist/esm/{_iter-detect-5d49a330.js → _iter-detect-7e5e5ce2.js} +8 -8
- package/dist/esm/{_object-pie-33c40e79.js → _object-pie-133f504a.js} +4 -4
- package/dist/esm/{_object-sap-964b6feb.js → _object-sap-f353c2a9.js} +1 -1
- package/dist/esm/{_object-to-array-7e804fce.js → _object-to-array-0f197f89.js} +2 -2
- package/dist/esm/{_to-object-a4107da3.js → _to-object-b50e61c3.js} +9 -9
- package/dist/esm/{asyncToGenerator-4877b617.js → asyncToGenerator-7f8f9219.js} +33 -33
- 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-e1de7503.js → core.get-iterator-method-133dfacd.js} +2 -2
- package/dist/esm/{debounce-9207d8ee.js → debounce-533d9748.js} +2 -2
- package/dist/esm/{define-property-8af5f002.js → define-property-fe54dc9f.js} +6 -6
- package/dist/esm/{defineProperty-94fd8bfc.js → defineProperty-f5ff6f5a.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/{es6.string.iterator-c990c18c.js → es6.string.iterator-bc33758b.js} +7 -7
- package/dist/esm/{extends-6f2fcc99.js → extends-60e0e1c6.js} +7 -7
- package/dist/esm/faundadb.js +8 -325
- package/dist/esm/{get-1e515072.js → get-3c308da4.js} +21 -21
- package/dist/esm/getRelatedArticle.js +445 -28
- package/dist/esm/getRootDocGroup.js +6 -6
- package/dist/esm/getSerializers.js +45 -44
- package/dist/esm/{getTargeting-bd800589.js → getTargeting-c3401fa7.js} +11 -11
- package/dist/esm/getTargeting.js +8 -8
- 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-d6dc592a.js → index-27e2c06e.js} +963 -1519
- package/dist/esm/{index-5f7e79e7.js → index-35bdcc81.js} +10 -10
- package/dist/esm/{index-aaa2dae0.js → index-67e1773f.js} +11 -2
- package/dist/esm/{index-ef6d5dcf.js → index-79cfd25c.js} +44 -45
- package/dist/esm/index-db3bb315.js +207 -0
- 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 +139 -132
- package/dist/esm/{inherits-cf8dde54.js → inherits-a41fe93f.js} +19 -19
- package/dist/esm/{isSymbol-1981418f.js → isSymbol-a7e9aafe.js} +15 -15
- package/dist/esm/{keys-8eda7a5c.js → keys-7a3adabf.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-4e42248e.js +321 -0
- 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-641f241f.js → slicedToArray-be2f7a22.js} +14 -14
- package/dist/esm/{smoothscroll-0cd4c7a6.js → smoothscroll-fa4e3f8c.js} +1 -1
- package/dist/esm/stringify-59c8f690.js +15 -0
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/{toConsumableArray-43aa614d.js → toConsumableArray-6d9a4616.js} +9 -9
- package/dist/esm/{toNumber-2f7a84cd.js → toNumber-5aeba6e7.js} +40 -5
- package/dist/esm/{typeof-6435ba1c.js → typeof-a286cf0c.js} +36 -36
- package/dist/esm/urlFor.js +1 -1
- package/dist/esm/{ustream-api-9a50644d.js → ustream-api-33a866b6.js} +4 -4
- package/dist/esm/util-3ab476bf.js +574 -0
- package/dist/esm/{visibility-sensor-72fd8f8b.js → visibility-sensor-f40c2564.js} +2 -2
- package/dist/esm/{web.dom.iterable-4439f05a.js → web.dom.iterable-4109ff68.js} +3 -3
- package/package.json +110 -116
- package/dist/cjs/ConferenceBanner-4a16fddc.js +0 -23
- package/dist/cjs/keys-a586b7a0.js +0 -25
- package/dist/cjs/main-02daeefe.js +0 -862
- package/dist/cjs/stringify-7c5aff47.js +0 -17
- package/dist/esm/main-e4a934b2.js +0 -851
- package/dist/esm/stringify-4330ccdc.js +0 -15
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import './
|
|
2
|
-
import './
|
|
3
|
-
import './
|
|
4
|
-
import '
|
|
5
|
-
import './_object-pie-33c40e79.js';
|
|
6
|
-
import { _ as _extends$1 } from './extends-6f2fcc99.js';
|
|
7
|
-
import './_object-sap-964b6feb.js';
|
|
8
|
-
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-cf8dde54.js';
|
|
9
|
-
import './define-property-8af5f002.js';
|
|
10
|
-
import './web.dom.iterable-4439f05a.js';
|
|
11
|
-
import { _ as _typeof$1 } from './typeof-6435ba1c.js';
|
|
12
|
-
import './_is-array-58e95429.js';
|
|
13
|
-
import React__default, { createContext, Component, Children, version as version$2 } from 'react';
|
|
14
|
-
import { E as EventEmitter } from './events-6c3a7a63.js';
|
|
1
|
+
import { _ as _extends$1 } from './extends-60e0e1c6.js';
|
|
2
|
+
import { _ as _typeof$2 } from './typeof-a286cf0c.js';
|
|
3
|
+
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-a41fe93f.js';
|
|
4
|
+
import React, { createContext, Component, Children, version as version$2 } from 'react';
|
|
15
5
|
import PropTypes from 'prop-types';
|
|
16
|
-
import {
|
|
17
|
-
import '
|
|
18
|
-
import './
|
|
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
|
|
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 './_to-object-b50e61c3.js';
|
|
14
|
+
import './_object-pie-133f504a.js';
|
|
15
|
+
import './es6.string.iterator-bc33758b.js';
|
|
16
|
+
import './web.dom.iterable-4109ff68.js';
|
|
17
|
+
import './_is-array-3e99e06e.js';
|
|
18
|
+
import './_library-528f1934.js';
|
|
19
|
+
import './_object-sap-f353c2a9.js';
|
|
20
|
+
import './define-property-fe54dc9f.js';
|
|
21
|
+
import './index-0dbff1d1.js';
|
|
22
|
+
import 'react-dom';
|
|
23
23
|
|
|
24
24
|
function _objectWithoutProperties(source, excluded) {
|
|
25
25
|
if (source == null) return {};
|
|
@@ -57,7 +57,7 @@ function _defineProperty(obj, key, value) {
|
|
|
57
57
|
|
|
58
58
|
function _objectSpread(target) {
|
|
59
59
|
for (var i = 1; i < arguments.length; i++) {
|
|
60
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
60
|
+
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
61
61
|
var ownKeys = Object.keys(source);
|
|
62
62
|
|
|
63
63
|
if (typeof Object.getOwnPropertySymbols === 'function') {
|
|
@@ -96,22 +96,33 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
96
96
|
return Constructor;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
var _typeof_1 = createCommonjsModule(function (module) {
|
|
101
100
|
function _typeof(obj) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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;
|
|
105
106
|
};
|
|
107
|
+
|
|
108
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
106
109
|
} else {
|
|
107
|
-
_typeof = function _typeof(obj) {
|
|
108
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" :
|
|
110
|
+
module.exports = _typeof = function _typeof(obj) {
|
|
111
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
109
112
|
};
|
|
113
|
+
|
|
114
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
110
115
|
}
|
|
111
116
|
|
|
112
117
|
return _typeof(obj);
|
|
113
118
|
}
|
|
114
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
|
+
|
|
115
126
|
function _assertThisInitialized(self) {
|
|
116
127
|
if (self === void 0) {
|
|
117
128
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -121,7 +132,7 @@ function _assertThisInitialized(self) {
|
|
|
121
132
|
}
|
|
122
133
|
|
|
123
134
|
function _possibleConstructorReturn(self, call) {
|
|
124
|
-
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
135
|
+
if (call && (_typeof$1(call) === "object" || typeof call === "function")) {
|
|
125
136
|
return call;
|
|
126
137
|
}
|
|
127
138
|
|
|
@@ -135,15 +146,6 @@ function _getPrototypeOf(o) {
|
|
|
135
146
|
return _getPrototypeOf(o);
|
|
136
147
|
}
|
|
137
148
|
|
|
138
|
-
function _setPrototypeOf(o, p) {
|
|
139
|
-
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
140
|
-
o.__proto__ = p;
|
|
141
|
-
return o;
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
return _setPrototypeOf(o, p);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
149
|
function _inherits(subClass, superClass) {
|
|
148
150
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
149
151
|
throw new TypeError("Super expression must either be null or a function");
|
|
@@ -294,6 +296,22 @@ var reactFastCompare = function isEqual(a, b) {
|
|
|
294
296
|
}
|
|
295
297
|
};
|
|
296
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
|
+
|
|
297
315
|
// From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
298
316
|
var shallowEqual = function shallowEqual(objA, objB) {
|
|
299
317
|
if (objA === objB) {
|
|
@@ -338,7 +356,7 @@ var removeEmptyKey = function removeEmptyKey(obj) {
|
|
|
338
356
|
return;
|
|
339
357
|
}
|
|
340
358
|
|
|
341
|
-
if (!objectHasKeys(value)) {
|
|
359
|
+
if (!objectHasKeys$1(value)) {
|
|
342
360
|
delete obj[key];
|
|
343
361
|
} else {
|
|
344
362
|
removeEmptyKey(value);
|
|
@@ -374,7 +392,7 @@ function addQueryID(hits, queryID) {
|
|
|
374
392
|
});
|
|
375
393
|
});
|
|
376
394
|
}
|
|
377
|
-
function find(array, comparator) {
|
|
395
|
+
function find$2(array, comparator) {
|
|
378
396
|
if (!Array.isArray(array)) {
|
|
379
397
|
return undefined;
|
|
380
398
|
}
|
|
@@ -387,11 +405,11 @@ function find(array, comparator) {
|
|
|
387
405
|
|
|
388
406
|
return undefined;
|
|
389
407
|
}
|
|
390
|
-
function objectHasKeys(object) {
|
|
408
|
+
function objectHasKeys$1(object) {
|
|
391
409
|
return object && Object.keys(object).length > 0;
|
|
392
410
|
} // https://github.com/babel/babel/blob/3aaafae053fa75febb3aa45d45b6f00646e30ba4/packages/babel-helpers/src/helpers.js#L604-L620
|
|
393
411
|
|
|
394
|
-
function omit(source, excluded) {
|
|
412
|
+
function omit$1(source, excluded) {
|
|
395
413
|
if (source === null || source === undefined) {
|
|
396
414
|
return {};
|
|
397
415
|
}
|
|
@@ -462,9 +480,9 @@ var instantSearchContext = createContext({
|
|
|
462
480
|
var InstantSearchConsumer = instantSearchContext.Consumer,
|
|
463
481
|
InstantSearchProvider = instantSearchContext.Provider;
|
|
464
482
|
|
|
465
|
-
var _createContext = createContext(undefined),
|
|
466
|
-
IndexConsumer = _createContext.Consumer,
|
|
467
|
-
IndexProvider = _createContext.Provider;
|
|
483
|
+
var _createContext$1 = createContext(undefined),
|
|
484
|
+
IndexConsumer = _createContext$1.Consumer,
|
|
485
|
+
IndexProvider = _createContext$1.Provider;
|
|
468
486
|
|
|
469
487
|
/**
|
|
470
488
|
* Connectors are the HOC used to transform React components
|
|
@@ -677,9 +695,9 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
677
695
|
}, {
|
|
678
696
|
key: "render",
|
|
679
697
|
value: function render() {
|
|
680
|
-
var _this$props = this.props
|
|
681
|
-
|
|
682
|
-
props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
698
|
+
var _this$props = this.props;
|
|
699
|
+
_this$props.contextValue;
|
|
700
|
+
var props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
683
701
|
|
|
684
702
|
var providedProps = this.state.providedProps;
|
|
685
703
|
|
|
@@ -694,7 +712,7 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
694
712
|
var searchForFacetValuesProps = typeof connectorDesc.searchForFacetValues === 'function' ? {
|
|
695
713
|
searchForItems: this.searchForFacetValues
|
|
696
714
|
} : {};
|
|
697
|
-
return
|
|
715
|
+
return React.createElement(Composed, _extends({}, props, providedProps, refineProps, searchForFacetValuesProps));
|
|
698
716
|
}
|
|
699
717
|
}]);
|
|
700
718
|
|
|
@@ -716,9 +734,9 @@ var createConnectorWithContext = function createConnectorWithContext(connectorDe
|
|
|
716
734
|
var Connector = createConnectorWithoutContext(connectorDesc)(Composed);
|
|
717
735
|
|
|
718
736
|
var ConnectorWrapper = function ConnectorWrapper(props) {
|
|
719
|
-
return
|
|
720
|
-
return
|
|
721
|
-
return
|
|
737
|
+
return React.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
738
|
+
return React.createElement(IndexConsumer, null, function (indexContextValue) {
|
|
739
|
+
return React.createElement(Connector, _extends({
|
|
722
740
|
contextValue: contextValue,
|
|
723
741
|
indexContextValue: indexContextValue
|
|
724
742
|
}, props));
|
|
@@ -830,7 +848,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
830
848
|
});
|
|
831
849
|
}
|
|
832
850
|
|
|
833
|
-
var version = '6.10.3';
|
|
851
|
+
var version$1 = '6.10.3';
|
|
834
852
|
|
|
835
853
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
836
854
|
return function (props, propName, componentName) {
|
|
@@ -891,7 +909,7 @@ function translatable(defaultTranslations) {
|
|
|
891
909
|
_createClass(Translatable, [{
|
|
892
910
|
key: "render",
|
|
893
911
|
value: function render() {
|
|
894
|
-
return
|
|
912
|
+
return React.createElement(Composed, _extends({
|
|
895
913
|
translate: this.translate
|
|
896
914
|
}, this.props));
|
|
897
915
|
}
|
|
@@ -1027,7 +1045,7 @@ function hasRefinements(_ref) {
|
|
|
1027
1045
|
return Object.hasOwnProperty.call(searchState, id);
|
|
1028
1046
|
}
|
|
1029
1047
|
|
|
1030
|
-
function getRefinements(_ref2) {
|
|
1048
|
+
function getRefinements$1(_ref2) {
|
|
1031
1049
|
var multiIndex = _ref2.multiIndex,
|
|
1032
1050
|
indexId = _ref2.indexId,
|
|
1033
1051
|
namespace = _ref2.namespace,
|
|
@@ -1069,7 +1087,7 @@ function getCurrentRefinementValue(props, searchState, context, id, defaultValue
|
|
|
1069
1087
|
var hasRefinementsValue = hasRefinements(args);
|
|
1070
1088
|
|
|
1071
1089
|
if (hasRefinementsValue) {
|
|
1072
|
-
return getRefinements(args);
|
|
1090
|
+
return getRefinements$1(args);
|
|
1073
1091
|
}
|
|
1074
1092
|
|
|
1075
1093
|
if (props.defaultRefinement) {
|
|
@@ -1110,10 +1128,10 @@ function cleanUpValueWithSingleIndex(_ref3) {
|
|
|
1110
1128
|
attribute = _ref3.attribute;
|
|
1111
1129
|
|
|
1112
1130
|
if (namespace) {
|
|
1113
|
-
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit(searchState[namespace], [attribute])));
|
|
1131
|
+
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit$1(searchState[namespace], [attribute])));
|
|
1114
1132
|
}
|
|
1115
1133
|
|
|
1116
|
-
return omit(searchState, [id]);
|
|
1134
|
+
return omit$1(searchState, [id]);
|
|
1117
1135
|
}
|
|
1118
1136
|
|
|
1119
1137
|
function cleanUpValueWithMultiIndex(_ref4) {
|
|
@@ -1126,20 +1144,20 @@ function cleanUpValueWithMultiIndex(_ref4) {
|
|
|
1126
1144
|
|
|
1127
1145
|
if (namespace && indexSearchState) {
|
|
1128
1146
|
return _objectSpread({}, searchState, {
|
|
1129
|
-
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])))))
|
|
1130
1148
|
});
|
|
1131
1149
|
}
|
|
1132
1150
|
|
|
1133
1151
|
if (indexSearchState) {
|
|
1134
1152
|
return _objectSpread({}, searchState, {
|
|
1135
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit(indexSearchState, [id])))
|
|
1153
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit$1(indexSearchState, [id])))
|
|
1136
1154
|
});
|
|
1137
1155
|
}
|
|
1138
1156
|
|
|
1139
1157
|
return searchState;
|
|
1140
1158
|
}
|
|
1141
1159
|
|
|
1142
|
-
function getId() {
|
|
1160
|
+
function getId$f() {
|
|
1143
1161
|
return 'configure';
|
|
1144
1162
|
}
|
|
1145
1163
|
|
|
@@ -1149,20 +1167,20 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1149
1167
|
return {};
|
|
1150
1168
|
},
|
|
1151
1169
|
getSearchParameters: function getSearchParameters(searchParameters, props) {
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1170
|
+
props.children;
|
|
1171
|
+
props.contextValue;
|
|
1172
|
+
props.indexContextValue;
|
|
1173
|
+
var items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1156
1174
|
|
|
1157
1175
|
return searchParameters.setQueryParameters(items);
|
|
1158
1176
|
},
|
|
1159
1177
|
transitionState: function transitionState(props, prevSearchState, nextSearchState) {
|
|
1160
|
-
var id = getId();
|
|
1178
|
+
var id = getId$f();
|
|
1161
1179
|
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1180
|
+
props.children;
|
|
1181
|
+
props.contextValue;
|
|
1182
|
+
props.indexContextValue;
|
|
1183
|
+
var items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1166
1184
|
|
|
1167
1185
|
var propKeys = Object.keys(props);
|
|
1168
1186
|
var nonPresentKeys = this._props ? Object.keys(this._props).filter(function (prop) {
|
|
@@ -1170,7 +1188,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1170
1188
|
}) : [];
|
|
1171
1189
|
this._props = props;
|
|
1172
1190
|
|
|
1173
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), items));
|
|
1191
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit$1(nextSearchState[id], nonPresentKeys), items));
|
|
1174
1192
|
|
|
1175
1193
|
return refineValue(nextSearchState, nextValue, {
|
|
1176
1194
|
ais: props.contextValue,
|
|
@@ -1178,7 +1196,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1178
1196
|
});
|
|
1179
1197
|
},
|
|
1180
1198
|
cleanUp: function cleanUp(props, searchState) {
|
|
1181
|
-
var id = getId();
|
|
1199
|
+
var id = getId$f();
|
|
1182
1200
|
var indexId = getIndexId({
|
|
1183
1201
|
ais: props.contextValue,
|
|
1184
1202
|
multiIndexContext: props.indexContextValue
|
|
@@ -1244,26 +1262,39 @@ var Configure = connectConfigure(function Configure() {
|
|
|
1244
1262
|
return null;
|
|
1245
1263
|
});
|
|
1246
1264
|
|
|
1247
|
-
function
|
|
1248
|
-
if (
|
|
1249
|
-
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
|
|
1250
|
-
arr2[i] = arr[i];
|
|
1251
|
-
}
|
|
1265
|
+
function _arrayLikeToArray(arr, len) {
|
|
1266
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
1252
1267
|
|
|
1253
|
-
|
|
1268
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
1269
|
+
arr2[i] = arr[i];
|
|
1254
1270
|
}
|
|
1271
|
+
|
|
1272
|
+
return arr2;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
function _arrayWithoutHoles(arr) {
|
|
1276
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
1255
1277
|
}
|
|
1256
1278
|
|
|
1257
1279
|
function _iterableToArray(iter) {
|
|
1258
|
-
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);
|
|
1259
1290
|
}
|
|
1260
1291
|
|
|
1261
1292
|
function _nonIterableSpread() {
|
|
1262
|
-
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.");
|
|
1263
1294
|
}
|
|
1264
1295
|
|
|
1265
1296
|
function _toConsumableArray(arr) {
|
|
1266
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
|
1297
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
1267
1298
|
}
|
|
1268
1299
|
|
|
1269
1300
|
function clone(value) {
|
|
@@ -1413,13 +1444,13 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
1413
1444
|
return target;
|
|
1414
1445
|
}
|
|
1415
1446
|
|
|
1416
|
-
var omit
|
|
1447
|
+
var omit = _objectWithoutPropertiesLoose;
|
|
1417
1448
|
|
|
1418
|
-
function objectHasKeys
|
|
1449
|
+
function objectHasKeys(obj) {
|
|
1419
1450
|
return obj && Object.keys(obj).length > 0;
|
|
1420
1451
|
}
|
|
1421
1452
|
|
|
1422
|
-
var objectHasKeys_1 = objectHasKeys
|
|
1453
|
+
var objectHasKeys_1 = objectHasKeys;
|
|
1423
1454
|
|
|
1424
1455
|
var isValidUserToken = function isValidUserToken(userToken) {
|
|
1425
1456
|
if (userToken === null) {
|
|
@@ -1527,7 +1558,7 @@ var lib = {
|
|
|
1527
1558
|
}
|
|
1528
1559
|
return {};
|
|
1529
1560
|
} else if (typeof attribute === 'string') {
|
|
1530
|
-
return omit
|
|
1561
|
+
return omit(refinementList, [attribute]);
|
|
1531
1562
|
} else if (typeof attribute === 'function') {
|
|
1532
1563
|
var hasChanged = false;
|
|
1533
1564
|
|
|
@@ -1572,7 +1603,7 @@ var lib = {
|
|
|
1572
1603
|
}
|
|
1573
1604
|
};
|
|
1574
1605
|
|
|
1575
|
-
var RefinementList = lib;
|
|
1606
|
+
var RefinementList$3 = lib;
|
|
1576
1607
|
|
|
1577
1608
|
/**
|
|
1578
1609
|
* isEqual, but only for numeric refinement values, possible values:
|
|
@@ -1941,22 +1972,22 @@ SearchParameters.prototype = {
|
|
|
1941
1972
|
clearRefinements: function clearRefinements(attribute) {
|
|
1942
1973
|
var patch = {
|
|
1943
1974
|
numericRefinements: this._clearNumericRefinements(attribute),
|
|
1944
|
-
facetsRefinements: RefinementList.clearRefinement(
|
|
1975
|
+
facetsRefinements: RefinementList$3.clearRefinement(
|
|
1945
1976
|
this.facetsRefinements,
|
|
1946
1977
|
attribute,
|
|
1947
1978
|
'conjunctiveFacet'
|
|
1948
1979
|
),
|
|
1949
|
-
facetsExcludes: RefinementList.clearRefinement(
|
|
1980
|
+
facetsExcludes: RefinementList$3.clearRefinement(
|
|
1950
1981
|
this.facetsExcludes,
|
|
1951
1982
|
attribute,
|
|
1952
1983
|
'exclude'
|
|
1953
1984
|
),
|
|
1954
|
-
disjunctiveFacetsRefinements: RefinementList.clearRefinement(
|
|
1985
|
+
disjunctiveFacetsRefinements: RefinementList$3.clearRefinement(
|
|
1955
1986
|
this.disjunctiveFacetsRefinements,
|
|
1956
1987
|
attribute,
|
|
1957
1988
|
'disjunctiveFacet'
|
|
1958
1989
|
),
|
|
1959
|
-
hierarchicalFacetsRefinements: RefinementList.clearRefinement(
|
|
1990
|
+
hierarchicalFacetsRefinements: RefinementList$3.clearRefinement(
|
|
1960
1991
|
this.hierarchicalFacetsRefinements,
|
|
1961
1992
|
attribute,
|
|
1962
1993
|
'hierarchicalFacet'
|
|
@@ -2232,7 +2263,7 @@ SearchParameters.prototype = {
|
|
|
2232
2263
|
}
|
|
2233
2264
|
return {};
|
|
2234
2265
|
} else if (typeof attribute === 'string') {
|
|
2235
|
-
return omit
|
|
2266
|
+
return omit(this.numericRefinements, [attribute]);
|
|
2236
2267
|
} else if (typeof attribute === 'function') {
|
|
2237
2268
|
var hasChanged = false;
|
|
2238
2269
|
var numericRefinements = this.numericRefinements;
|
|
@@ -2324,10 +2355,10 @@ SearchParameters.prototype = {
|
|
|
2324
2355
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2325
2356
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2326
2357
|
}
|
|
2327
|
-
if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2358
|
+
if (RefinementList$3.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2328
2359
|
|
|
2329
2360
|
return this.setQueryParameters({
|
|
2330
|
-
facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value)
|
|
2361
|
+
facetsRefinements: RefinementList$3.addRefinement(this.facetsRefinements, facet, value)
|
|
2331
2362
|
});
|
|
2332
2363
|
},
|
|
2333
2364
|
/**
|
|
@@ -2341,10 +2372,10 @@ SearchParameters.prototype = {
|
|
|
2341
2372
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2342
2373
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2343
2374
|
}
|
|
2344
|
-
if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2375
|
+
if (RefinementList$3.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2345
2376
|
|
|
2346
2377
|
return this.setQueryParameters({
|
|
2347
|
-
facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value)
|
|
2378
|
+
facetsExcludes: RefinementList$3.addRefinement(this.facetsExcludes, facet, value)
|
|
2348
2379
|
});
|
|
2349
2380
|
},
|
|
2350
2381
|
/**
|
|
@@ -2360,10 +2391,10 @@ SearchParameters.prototype = {
|
|
|
2360
2391
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2361
2392
|
}
|
|
2362
2393
|
|
|
2363
|
-
if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2394
|
+
if (RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2364
2395
|
|
|
2365
2396
|
return this.setQueryParameters({
|
|
2366
|
-
disjunctiveFacetsRefinements: RefinementList.addRefinement(
|
|
2397
|
+
disjunctiveFacetsRefinements: RefinementList$3.addRefinement(
|
|
2367
2398
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2368
2399
|
});
|
|
2369
2400
|
},
|
|
@@ -2448,10 +2479,10 @@ SearchParameters.prototype = {
|
|
|
2448
2479
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2449
2480
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2450
2481
|
}
|
|
2451
|
-
if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2482
|
+
if (!RefinementList$3.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2452
2483
|
|
|
2453
2484
|
return this.setQueryParameters({
|
|
2454
|
-
facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value)
|
|
2485
|
+
facetsRefinements: RefinementList$3.removeRefinement(this.facetsRefinements, facet, value)
|
|
2455
2486
|
});
|
|
2456
2487
|
},
|
|
2457
2488
|
/**
|
|
@@ -2465,10 +2496,10 @@ SearchParameters.prototype = {
|
|
|
2465
2496
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2466
2497
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2467
2498
|
}
|
|
2468
|
-
if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2499
|
+
if (!RefinementList$3.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2469
2500
|
|
|
2470
2501
|
return this.setQueryParameters({
|
|
2471
|
-
facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value)
|
|
2502
|
+
facetsExcludes: RefinementList$3.removeRefinement(this.facetsExcludes, facet, value)
|
|
2472
2503
|
});
|
|
2473
2504
|
},
|
|
2474
2505
|
/**
|
|
@@ -2483,10 +2514,10 @@ SearchParameters.prototype = {
|
|
|
2483
2514
|
throw new Error(
|
|
2484
2515
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2485
2516
|
}
|
|
2486
|
-
if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2517
|
+
if (!RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2487
2518
|
|
|
2488
2519
|
return this.setQueryParameters({
|
|
2489
|
-
disjunctiveFacetsRefinements: RefinementList.removeRefinement(
|
|
2520
|
+
disjunctiveFacetsRefinements: RefinementList$3.removeRefinement(
|
|
2490
2521
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2491
2522
|
});
|
|
2492
2523
|
},
|
|
@@ -2552,7 +2583,7 @@ SearchParameters.prototype = {
|
|
|
2552
2583
|
}
|
|
2553
2584
|
|
|
2554
2585
|
return this.setQueryParameters({
|
|
2555
|
-
facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2586
|
+
facetsRefinements: RefinementList$3.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2556
2587
|
});
|
|
2557
2588
|
},
|
|
2558
2589
|
/**
|
|
@@ -2568,7 +2599,7 @@ SearchParameters.prototype = {
|
|
|
2568
2599
|
}
|
|
2569
2600
|
|
|
2570
2601
|
return this.setQueryParameters({
|
|
2571
|
-
facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2602
|
+
facetsExcludes: RefinementList$3.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2572
2603
|
});
|
|
2573
2604
|
},
|
|
2574
2605
|
/**
|
|
@@ -2585,7 +2616,7 @@ SearchParameters.prototype = {
|
|
|
2585
2616
|
}
|
|
2586
2617
|
|
|
2587
2618
|
return this.setQueryParameters({
|
|
2588
|
-
disjunctiveFacetsRefinements: RefinementList.toggleRefinement(
|
|
2619
|
+
disjunctiveFacetsRefinements: RefinementList$3.toggleRefinement(
|
|
2589
2620
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2590
2621
|
});
|
|
2591
2622
|
},
|
|
@@ -2724,7 +2755,7 @@ SearchParameters.prototype = {
|
|
|
2724
2755
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2725
2756
|
return false;
|
|
2726
2757
|
}
|
|
2727
|
-
return RefinementList.isRefined(this.facetsRefinements, facet, value);
|
|
2758
|
+
return RefinementList$3.isRefined(this.facetsRefinements, facet, value);
|
|
2728
2759
|
},
|
|
2729
2760
|
/**
|
|
2730
2761
|
* Returns true if the facet contains exclusions or if a specific value is
|
|
@@ -2740,7 +2771,7 @@ SearchParameters.prototype = {
|
|
|
2740
2771
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2741
2772
|
return false;
|
|
2742
2773
|
}
|
|
2743
|
-
return RefinementList.isRefined(this.facetsExcludes, facet, value);
|
|
2774
|
+
return RefinementList$3.isRefined(this.facetsExcludes, facet, value);
|
|
2744
2775
|
},
|
|
2745
2776
|
/**
|
|
2746
2777
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2755,7 +2786,7 @@ SearchParameters.prototype = {
|
|
|
2755
2786
|
if (!this.isDisjunctiveFacet(facet)) {
|
|
2756
2787
|
return false;
|
|
2757
2788
|
}
|
|
2758
|
-
return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2789
|
+
return RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2759
2790
|
},
|
|
2760
2791
|
/**
|
|
2761
2792
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2941,7 +2972,7 @@ SearchParameters.prototype = {
|
|
|
2941
2972
|
var isNextValueDefined = nextWithNumbers[key] !== undefined;
|
|
2942
2973
|
|
|
2943
2974
|
if (isPreviousValueDefined && !isNextValueDefined) {
|
|
2944
|
-
return omit
|
|
2975
|
+
return omit(previous, [key]);
|
|
2945
2976
|
}
|
|
2946
2977
|
|
|
2947
2978
|
if (isNextValueDefined) {
|
|
@@ -4674,7 +4705,7 @@ var requestBuilder = {
|
|
|
4674
4705
|
|
|
4675
4706
|
var requestBuilder_1 = requestBuilder;
|
|
4676
4707
|
|
|
4677
|
-
var version
|
|
4708
|
+
var version = '3.4.4';
|
|
4678
4709
|
|
|
4679
4710
|
/**
|
|
4680
4711
|
* Event triggered when a parameter is set or updated
|
|
@@ -4781,7 +4812,7 @@ var version$1 = '3.4.4';
|
|
|
4781
4812
|
*/
|
|
4782
4813
|
function AlgoliaSearchHelper(client, index, options) {
|
|
4783
4814
|
if (typeof client.addAlgoliaAgent === 'function') {
|
|
4784
|
-
client.addAlgoliaAgent('JS Helper (' + version
|
|
4815
|
+
client.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
4785
4816
|
}
|
|
4786
4817
|
|
|
4787
4818
|
this.setClient(client);
|
|
@@ -4936,7 +4967,7 @@ AlgoliaSearchHelper.prototype.findAnswers = function(options) {
|
|
|
4936
4967
|
nbHits: options.nbHits
|
|
4937
4968
|
},
|
|
4938
4969
|
{
|
|
4939
|
-
params: omit
|
|
4970
|
+
params: omit(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
4940
4971
|
'attributesToSnippet',
|
|
4941
4972
|
'hitsPerPage',
|
|
4942
4973
|
'restrictSearchableAttributes',
|
|
@@ -6050,7 +6081,7 @@ AlgoliaSearchHelper.prototype.setClient = function(newClient) {
|
|
|
6050
6081
|
if (this.client === newClient) return this;
|
|
6051
6082
|
|
|
6052
6083
|
if (typeof newClient.addAlgoliaAgent === 'function') {
|
|
6053
|
-
newClient.addAlgoliaAgent('JS Helper (' + version
|
|
6084
|
+
newClient.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
6054
6085
|
}
|
|
6055
6086
|
this.client = newClient;
|
|
6056
6087
|
|
|
@@ -6169,7 +6200,7 @@ function algoliasearchHelper(client, index, opts) {
|
|
|
6169
6200
|
* @member module:algoliasearchHelper.version
|
|
6170
6201
|
* @type {number}
|
|
6171
6202
|
*/
|
|
6172
|
-
algoliasearchHelper.version = version
|
|
6203
|
+
algoliasearchHelper.version = version;
|
|
6173
6204
|
|
|
6174
6205
|
/**
|
|
6175
6206
|
* Constructor for the Helper.
|
|
@@ -6201,13 +6232,13 @@ function createOptionalFilter(_ref) {
|
|
|
6201
6232
|
return "".concat(attributeName, ":").concat(attributeValue, "<score=").concat(attributeScore || 1, ">");
|
|
6202
6233
|
}
|
|
6203
6234
|
|
|
6204
|
-
var defaultProps = {
|
|
6235
|
+
var defaultProps$1 = {
|
|
6205
6236
|
transformSearchParameters: function transformSearchParameters(x) {
|
|
6206
6237
|
return _objectSpread({}, x);
|
|
6207
6238
|
}
|
|
6208
6239
|
};
|
|
6209
6240
|
|
|
6210
|
-
function getId$
|
|
6241
|
+
function getId$e() {
|
|
6211
6242
|
// We store the search state of this widget in `configure`.
|
|
6212
6243
|
return 'configure';
|
|
6213
6244
|
}
|
|
@@ -6255,7 +6286,7 @@ function getSearchParametersFromProps(props) {
|
|
|
6255
6286
|
|
|
6256
6287
|
var connectConfigureRelatedItems = createConnectorWithContext({
|
|
6257
6288
|
displayName: 'AlgoliaConfigureRelatedItems',
|
|
6258
|
-
defaultProps: defaultProps,
|
|
6289
|
+
defaultProps: defaultProps$1,
|
|
6259
6290
|
getProvidedProps: function getProvidedProps() {
|
|
6260
6291
|
return {};
|
|
6261
6292
|
},
|
|
@@ -6263,7 +6294,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6263
6294
|
return searchParameters.setQueryParameters(getSearchParametersFromProps(props));
|
|
6264
6295
|
},
|
|
6265
6296
|
transitionState: function transitionState(props, _prevSearchState, nextSearchState) {
|
|
6266
|
-
var id = getId$
|
|
6297
|
+
var id = getId$e(); // We need to transform the exhaustive search parameters back to clean
|
|
6267
6298
|
// search parameters without the empty default keys so we don't pollute the
|
|
6268
6299
|
// `configure` search state.
|
|
6269
6300
|
|
|
@@ -6274,7 +6305,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6274
6305
|
}) : [];
|
|
6275
6306
|
this._searchParameters = searchParameters;
|
|
6276
6307
|
|
|
6277
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6308
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit$1(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6278
6309
|
|
|
6279
6310
|
return refineValue(nextSearchState, nextValue, {
|
|
6280
6311
|
ais: props.contextValue,
|
|
@@ -6284,7 +6315,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6284
6315
|
cleanUp: function cleanUp(props, searchState) {
|
|
6285
6316
|
var _this = this;
|
|
6286
6317
|
|
|
6287
|
-
var id = getId$
|
|
6318
|
+
var id = getId$e();
|
|
6288
6319
|
var indexId = getIndexId({
|
|
6289
6320
|
ais: props.contextValue,
|
|
6290
6321
|
multiIndexContext: props.indexContextValue
|
|
@@ -6357,7 +6388,7 @@ function getWidgetRefinements(attribute, widgetKey, searchState) {
|
|
|
6357
6388
|
}
|
|
6358
6389
|
}
|
|
6359
6390
|
|
|
6360
|
-
function getRefinements
|
|
6391
|
+
function getRefinements(attribute) {
|
|
6361
6392
|
var searchState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6362
6393
|
var refinements = Object.keys(searchState).filter(function (widgetKey) {
|
|
6363
6394
|
return searchState[widgetKey] !== undefined && searchState[widgetKey][attribute] !== undefined;
|
|
@@ -6374,7 +6405,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6374
6405
|
var searchState = _ref.searchState,
|
|
6375
6406
|
trackedFilters = _ref.trackedFilters;
|
|
6376
6407
|
var ruleContexts = Object.keys(trackedFilters).reduce(function (facets, facetName) {
|
|
6377
|
-
var facetRefinements = getRefinements
|
|
6408
|
+
var facetRefinements = getRefinements(facetName, searchState);
|
|
6378
6409
|
var getTrackedFacetValues = trackedFilters[facetName];
|
|
6379
6410
|
var trackedFacetValues = getTrackedFacetValues(facetRefinements);
|
|
6380
6411
|
return [].concat(_toConsumableArray(facets), _toConsumableArray(facetRefinements.filter(function (facetRefinement) {
|
|
@@ -6386,7 +6417,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6386
6417
|
return ruleContexts;
|
|
6387
6418
|
}
|
|
6388
6419
|
|
|
6389
|
-
var defaultProps
|
|
6420
|
+
var defaultProps = {
|
|
6390
6421
|
transformItems: function transformItems(items) {
|
|
6391
6422
|
return items;
|
|
6392
6423
|
},
|
|
@@ -6397,7 +6428,7 @@ var defaultProps$1 = {
|
|
|
6397
6428
|
};
|
|
6398
6429
|
var connectQueryRules = createConnectorWithContext({
|
|
6399
6430
|
displayName: 'AlgoliaQueryRules',
|
|
6400
|
-
defaultProps: defaultProps
|
|
6431
|
+
defaultProps: defaultProps,
|
|
6401
6432
|
getProvidedProps: function getProvidedProps(props, _1, searchResults) {
|
|
6402
6433
|
var results = getResults(searchResults, {
|
|
6403
6434
|
ais: props.contextValue,
|
|
@@ -6559,7 +6590,7 @@ function (_Component) {
|
|
|
6559
6590
|
return null;
|
|
6560
6591
|
}
|
|
6561
6592
|
|
|
6562
|
-
return
|
|
6593
|
+
return React.createElement(IndexProvider, {
|
|
6563
6594
|
value: this.state.indexContext
|
|
6564
6595
|
}, this.props.children);
|
|
6565
6596
|
}
|
|
@@ -6574,20 +6605,10 @@ _defineProperty(Index, "propTypes", {
|
|
|
6574
6605
|
children: PropTypes.node
|
|
6575
6606
|
});
|
|
6576
6607
|
|
|
6577
|
-
|
|
6578
|
-
var inferredIndexId = props.indexName;
|
|
6579
|
-
return React__default.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
6580
|
-
return React__default.createElement(Index, _extends({
|
|
6581
|
-
contextValue: contextValue,
|
|
6582
|
-
indexId: inferredIndexId
|
|
6583
|
-
}, props));
|
|
6584
|
-
});
|
|
6585
|
-
};
|
|
6586
|
-
|
|
6587
|
-
IndexWrapper.propTypes = {
|
|
6608
|
+
({
|
|
6588
6609
|
indexName: PropTypes.string.isRequired,
|
|
6589
6610
|
indexId: PropTypes.string
|
|
6590
|
-
};
|
|
6611
|
+
});
|
|
6591
6612
|
|
|
6592
6613
|
function createWidgetsManager(onWidgetsUpdate) {
|
|
6593
6614
|
var widgets = []; // Is an update scheduled?
|
|
@@ -6648,7 +6669,7 @@ function createStore(initialState) {
|
|
|
6648
6669
|
function addAlgoliaAgents(searchClient) {
|
|
6649
6670
|
if (typeof searchClient.addAlgoliaAgent === 'function') {
|
|
6650
6671
|
searchClient.addAlgoliaAgent("react (".concat(version$2, ")"));
|
|
6651
|
-
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version, ")"));
|
|
6672
|
+
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version$1, ")"));
|
|
6652
6673
|
}
|
|
6653
6674
|
}
|
|
6654
6675
|
|
|
@@ -6886,8 +6907,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6886
6907
|
nextIsSearchStalled = false;
|
|
6887
6908
|
}
|
|
6888
6909
|
|
|
6889
|
-
|
|
6890
|
-
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6910
|
+
currentState.resultsFacetValues;
|
|
6911
|
+
var partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6891
6912
|
|
|
6892
6913
|
store.setState(_objectSpread({}, partialState, {
|
|
6893
6914
|
results: results,
|
|
@@ -6908,8 +6929,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6908
6929
|
nextIsSearchStalled = false;
|
|
6909
6930
|
}
|
|
6910
6931
|
|
|
6911
|
-
|
|
6912
|
-
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6932
|
+
currentState.resultsFacetValues;
|
|
6933
|
+
var partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6913
6934
|
|
|
6914
6935
|
store.setState(_objectSpread({}, partialState, {
|
|
6915
6936
|
isSearchStalled: nextIsSearchStalled,
|
|
@@ -6921,9 +6942,9 @@ function createInstantSearchManager(_ref) {
|
|
|
6921
6942
|
function handleNewSearch() {
|
|
6922
6943
|
if (!stalledSearchTimer) {
|
|
6923
6944
|
stalledSearchTimer = setTimeout(function () {
|
|
6924
|
-
var _store$getState = store.getState()
|
|
6925
|
-
|
|
6926
|
-
partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
6945
|
+
var _store$getState = store.getState();
|
|
6946
|
+
_store$getState.resultsFacetValues;
|
|
6947
|
+
var partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
6927
6948
|
|
|
6928
6949
|
store.setState(_objectSpread({}, partialState, {
|
|
6929
6950
|
isSearchStalled: true
|
|
@@ -7388,7 +7409,7 @@ function (_Component) {
|
|
|
7388
7409
|
return null;
|
|
7389
7410
|
}
|
|
7390
7411
|
|
|
7391
|
-
return
|
|
7412
|
+
return React.createElement(InstantSearchProvider, {
|
|
7392
7413
|
value: this.state.contextValue
|
|
7393
7414
|
}, this.props.children);
|
|
7394
7415
|
}
|
|
@@ -7422,21 +7443,21 @@ _defineProperty(InstantSearch, "propTypes", {
|
|
|
7422
7443
|
stalledSearchDelay: PropTypes.number
|
|
7423
7444
|
});
|
|
7424
7445
|
|
|
7425
|
-
var getId$
|
|
7446
|
+
var getId$d = function getId(props) {
|
|
7426
7447
|
return props.attributes[0];
|
|
7427
7448
|
};
|
|
7428
|
-
var namespace = 'hierarchicalMenu';
|
|
7449
|
+
var namespace$6 = 'hierarchicalMenu';
|
|
7429
7450
|
|
|
7430
|
-
function _refine(props, searchState, nextRefinement, context) {
|
|
7431
|
-
var id = getId$
|
|
7451
|
+
function _refine$9(props, searchState, nextRefinement, context) {
|
|
7452
|
+
var id = getId$d(props);
|
|
7432
7453
|
|
|
7433
7454
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7434
7455
|
|
|
7435
7456
|
var resetPage = true;
|
|
7436
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
7457
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$6);
|
|
7437
7458
|
}
|
|
7438
7459
|
|
|
7439
|
-
function transformValue(values) {
|
|
7460
|
+
function transformValue$1(values) {
|
|
7440
7461
|
return values.reduce(function (acc, item) {
|
|
7441
7462
|
if (item.isRefined) {
|
|
7442
7463
|
acc.push({
|
|
@@ -7447,7 +7468,7 @@ function transformValue(values) {
|
|
|
7447
7468
|
}); // Create a variable in order to keep the same acc for the recursion, otherwise "reduce" returns a new one
|
|
7448
7469
|
|
|
7449
7470
|
if (item.data) {
|
|
7450
|
-
acc = acc.concat(transformValue(item.data));
|
|
7471
|
+
acc = acc.concat(transformValue$1(item.data));
|
|
7451
7472
|
}
|
|
7452
7473
|
}
|
|
7453
7474
|
|
|
@@ -7509,7 +7530,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7509
7530
|
transformItems: PropTypes.func
|
|
7510
7531
|
},
|
|
7511
7532
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
7512
|
-
var id = getId$
|
|
7533
|
+
var id = getId$d(props);
|
|
7513
7534
|
var results = getResults(searchResults, {
|
|
7514
7535
|
ais: props.contextValue,
|
|
7515
7536
|
multiIndexContext: props.indexContextValue
|
|
@@ -7524,7 +7545,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7524
7545
|
}
|
|
7525
7546
|
|
|
7526
7547
|
var values = results.getFacetValues(id);
|
|
7527
|
-
var items = values.data ? transformValue(values.data) : [];
|
|
7548
|
+
var items = values.data ? transformValue$1(values.data) : [];
|
|
7528
7549
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7529
7550
|
return {
|
|
7530
7551
|
canRefine: transformedItems.length > 0,
|
|
@@ -7532,7 +7553,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7532
7553
|
};
|
|
7533
7554
|
},
|
|
7534
7555
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7535
|
-
return _refine(props, searchState, nextRefinement, {
|
|
7556
|
+
return _refine$9(props, searchState, nextRefinement, {
|
|
7536
7557
|
ais: props.contextValue,
|
|
7537
7558
|
multiIndexContext: props.indexContextValue
|
|
7538
7559
|
});
|
|
@@ -7595,13 +7616,13 @@ var connectCurrentRefinements = createConnectorWithContext({
|
|
|
7595
7616
|
}
|
|
7596
7617
|
});
|
|
7597
7618
|
|
|
7598
|
-
var getId$
|
|
7619
|
+
var getId$c = function getId(props) {
|
|
7599
7620
|
return props.attributes[0];
|
|
7600
7621
|
};
|
|
7601
|
-
var namespace$
|
|
7622
|
+
var namespace$5 = 'hierarchicalMenu';
|
|
7602
7623
|
|
|
7603
|
-
function getCurrentRefinement(props, searchState, context) {
|
|
7604
|
-
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);
|
|
7605
7626
|
|
|
7606
7627
|
if (currentRefinement === '') {
|
|
7607
7628
|
return null;
|
|
@@ -7610,13 +7631,13 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
7610
7631
|
return currentRefinement;
|
|
7611
7632
|
}
|
|
7612
7633
|
|
|
7613
|
-
function getValue(path, props, searchState, context) {
|
|
7634
|
+
function getValue$2(path, props, searchState, context) {
|
|
7614
7635
|
var id = props.id,
|
|
7615
7636
|
attributes = props.attributes,
|
|
7616
7637
|
separator = props.separator,
|
|
7617
7638
|
rootPath = props.rootPath,
|
|
7618
7639
|
showParentLevel = props.showParentLevel;
|
|
7619
|
-
var currentRefinement = getCurrentRefinement(props, searchState, context);
|
|
7640
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, context);
|
|
7620
7641
|
var nextRefinement;
|
|
7621
7642
|
|
|
7622
7643
|
if (currentRefinement === null) {
|
|
@@ -7637,14 +7658,14 @@ function getValue(path, props, searchState, context) {
|
|
|
7637
7658
|
return nextRefinement;
|
|
7638
7659
|
}
|
|
7639
7660
|
|
|
7640
|
-
function transformValue
|
|
7661
|
+
function transformValue(value, props, searchState, context) {
|
|
7641
7662
|
return value.map(function (v) {
|
|
7642
7663
|
return {
|
|
7643
7664
|
label: v.name,
|
|
7644
|
-
value: getValue(v.path, props, searchState, context),
|
|
7665
|
+
value: getValue$2(v.path, props, searchState, context),
|
|
7645
7666
|
count: v.count,
|
|
7646
7667
|
isRefined: v.isRefined,
|
|
7647
|
-
items: v.data && transformValue
|
|
7668
|
+
items: v.data && transformValue(v.data, props, searchState, context)
|
|
7648
7669
|
};
|
|
7649
7670
|
});
|
|
7650
7671
|
}
|
|
@@ -7660,20 +7681,20 @@ var truncate = function truncate() {
|
|
|
7660
7681
|
});
|
|
7661
7682
|
};
|
|
7662
7683
|
|
|
7663
|
-
function _refine$
|
|
7664
|
-
var id = getId$
|
|
7684
|
+
function _refine$8(props, searchState, nextRefinement, context) {
|
|
7685
|
+
var id = getId$c(props);
|
|
7665
7686
|
|
|
7666
7687
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7667
7688
|
|
|
7668
7689
|
var resetPage = true;
|
|
7669
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
7690
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$5);
|
|
7670
7691
|
}
|
|
7671
7692
|
|
|
7672
|
-
function _cleanUp(props, searchState, context) {
|
|
7673
|
-
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)));
|
|
7674
7695
|
}
|
|
7675
7696
|
|
|
7676
|
-
var sortBy = ['name:asc'];
|
|
7697
|
+
var sortBy$1 = ['name:asc'];
|
|
7677
7698
|
/**
|
|
7678
7699
|
* connectHierarchicalMenu connector provides the logic to build a widget that will
|
|
7679
7700
|
* give the user the ability to explore a tree-like structure.
|
|
@@ -7755,7 +7776,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7755
7776
|
var showMore = props.showMore,
|
|
7756
7777
|
limit = props.limit,
|
|
7757
7778
|
showMoreLimit = props.showMoreLimit;
|
|
7758
|
-
var id = getId$
|
|
7779
|
+
var id = getId$c(props);
|
|
7759
7780
|
var results = getResults(searchResults, {
|
|
7760
7781
|
ais: props.contextValue,
|
|
7761
7782
|
multiIndexContext: props.indexContextValue
|
|
@@ -7765,7 +7786,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7765
7786
|
if (!isFacetPresent) {
|
|
7766
7787
|
return {
|
|
7767
7788
|
items: [],
|
|
7768
|
-
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7789
|
+
currentRefinement: getCurrentRefinement$b(props, searchState, {
|
|
7769
7790
|
ais: props.contextValue,
|
|
7770
7791
|
multiIndexContext: props.indexContextValue
|
|
7771
7792
|
}),
|
|
@@ -7775,16 +7796,16 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7775
7796
|
|
|
7776
7797
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7777
7798
|
var value = results.getFacetValues(id, {
|
|
7778
|
-
sortBy: sortBy
|
|
7799
|
+
sortBy: sortBy$1
|
|
7779
7800
|
});
|
|
7780
|
-
var items = value.data ? transformValue
|
|
7801
|
+
var items = value.data ? transformValue(value.data, props, searchState, {
|
|
7781
7802
|
ais: props.contextValue,
|
|
7782
7803
|
multiIndexContext: props.indexContextValue
|
|
7783
7804
|
}) : [];
|
|
7784
7805
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7785
7806
|
return {
|
|
7786
7807
|
items: truncate(transformedItems, itemsLimit),
|
|
7787
|
-
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7808
|
+
currentRefinement: getCurrentRefinement$b(props, searchState, {
|
|
7788
7809
|
ais: props.contextValue,
|
|
7789
7810
|
multiIndexContext: props.indexContextValue
|
|
7790
7811
|
}),
|
|
@@ -7792,13 +7813,13 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7792
7813
|
};
|
|
7793
7814
|
},
|
|
7794
7815
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7795
|
-
return _refine$
|
|
7816
|
+
return _refine$8(props, searchState, nextRefinement, {
|
|
7796
7817
|
ais: props.contextValue,
|
|
7797
7818
|
multiIndexContext: props.indexContextValue
|
|
7798
7819
|
});
|
|
7799
7820
|
},
|
|
7800
7821
|
cleanUp: function cleanUp(props, searchState) {
|
|
7801
|
-
return _cleanUp(props, searchState, {
|
|
7822
|
+
return _cleanUp$7(props, searchState, {
|
|
7802
7823
|
ais: props.contextValue,
|
|
7803
7824
|
multiIndexContext: props.indexContextValue
|
|
7804
7825
|
});
|
|
@@ -7812,7 +7833,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7812
7833
|
limit = props.limit,
|
|
7813
7834
|
showMoreLimit = props.showMoreLimit,
|
|
7814
7835
|
contextValue = props.contextValue;
|
|
7815
|
-
var id = getId$
|
|
7836
|
+
var id = getId$c(props);
|
|
7816
7837
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7817
7838
|
searchParameters = searchParameters.addHierarchicalFacet({
|
|
7818
7839
|
name: id,
|
|
@@ -7823,7 +7844,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7823
7844
|
}).setQueryParameters({
|
|
7824
7845
|
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, itemsLimit)
|
|
7825
7846
|
});
|
|
7826
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7847
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
7827
7848
|
ais: contextValue,
|
|
7828
7849
|
multiIndexContext: props.indexContextValue
|
|
7829
7850
|
});
|
|
@@ -7836,8 +7857,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7836
7857
|
},
|
|
7837
7858
|
getMetadata: function getMetadata(props, searchState) {
|
|
7838
7859
|
var rootAttribute = props.attributes[0];
|
|
7839
|
-
var id = getId$
|
|
7840
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7860
|
+
var id = getId$c(props);
|
|
7861
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
7841
7862
|
ais: props.contextValue,
|
|
7842
7863
|
multiIndexContext: props.indexContextValue
|
|
7843
7864
|
});
|
|
@@ -7845,7 +7866,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7845
7866
|
label: "".concat(rootAttribute, ": ").concat(currentRefinement),
|
|
7846
7867
|
attribute: rootAttribute,
|
|
7847
7868
|
value: function value(nextState) {
|
|
7848
|
-
return _refine$
|
|
7869
|
+
return _refine$8(props, nextState, '', {
|
|
7849
7870
|
ais: props.contextValue,
|
|
7850
7871
|
multiIndexContext: props.indexContextValue
|
|
7851
7872
|
});
|
|
@@ -8022,12 +8043,12 @@ var connectHits = createConnectorWithContext({
|
|
|
8022
8043
|
}
|
|
8023
8044
|
});
|
|
8024
8045
|
|
|
8025
|
-
function getId$
|
|
8046
|
+
function getId$b() {
|
|
8026
8047
|
return 'hitsPerPage';
|
|
8027
8048
|
}
|
|
8028
8049
|
|
|
8029
|
-
function getCurrentRefinement$
|
|
8030
|
-
var id = getId$
|
|
8050
|
+
function getCurrentRefinement$a(props, searchState, context) {
|
|
8051
|
+
var id = getId$b();
|
|
8031
8052
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
8032
8053
|
|
|
8033
8054
|
if (typeof currentRefinement === 'string') {
|
|
@@ -8062,7 +8083,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8062
8083
|
transformItems: PropTypes.func
|
|
8063
8084
|
},
|
|
8064
8085
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
8065
|
-
var currentRefinement = getCurrentRefinement$
|
|
8086
|
+
var currentRefinement = getCurrentRefinement$a(props, searchState, {
|
|
8066
8087
|
ais: props.contextValue,
|
|
8067
8088
|
multiIndexContext: props.indexContextValue
|
|
8068
8089
|
});
|
|
@@ -8079,7 +8100,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8079
8100
|
};
|
|
8080
8101
|
},
|
|
8081
8102
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8082
|
-
var id = getId$
|
|
8103
|
+
var id = getId$b();
|
|
8083
8104
|
|
|
8084
8105
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
8085
8106
|
|
|
@@ -8093,27 +8114,27 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8093
8114
|
return cleanUpValue(searchState, {
|
|
8094
8115
|
ais: props.contextValue,
|
|
8095
8116
|
multiIndexContext: props.indexContextValue
|
|
8096
|
-
}, getId$
|
|
8117
|
+
}, getId$b());
|
|
8097
8118
|
},
|
|
8098
8119
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8099
|
-
return searchParameters.setHitsPerPage(getCurrentRefinement$
|
|
8120
|
+
return searchParameters.setHitsPerPage(getCurrentRefinement$a(props, searchState, {
|
|
8100
8121
|
ais: props.contextValue,
|
|
8101
8122
|
multiIndexContext: props.indexContextValue
|
|
8102
8123
|
}));
|
|
8103
8124
|
},
|
|
8104
8125
|
getMetadata: function getMetadata() {
|
|
8105
8126
|
return {
|
|
8106
|
-
id: getId$
|
|
8127
|
+
id: getId$b()
|
|
8107
8128
|
};
|
|
8108
8129
|
}
|
|
8109
8130
|
});
|
|
8110
8131
|
|
|
8111
|
-
function getId$
|
|
8132
|
+
function getId$a() {
|
|
8112
8133
|
return 'page';
|
|
8113
8134
|
}
|
|
8114
8135
|
|
|
8115
|
-
function getCurrentRefinement$
|
|
8116
|
-
var id = getId$
|
|
8136
|
+
function getCurrentRefinement$9(props, searchState, context) {
|
|
8137
|
+
var id = getId$a();
|
|
8117
8138
|
var page = 1;
|
|
8118
8139
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8119
8140
|
|
|
@@ -8125,9 +8146,9 @@ function getCurrentRefinement$2(props, searchState, context) {
|
|
|
8125
8146
|
}
|
|
8126
8147
|
|
|
8127
8148
|
function getStateWithoutPage(state) {
|
|
8128
|
-
var _ref = state || {}
|
|
8129
|
-
|
|
8130
|
-
rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8149
|
+
var _ref = state || {};
|
|
8150
|
+
_ref.page;
|
|
8151
|
+
var rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8131
8152
|
|
|
8132
8153
|
return rest;
|
|
8133
8154
|
}
|
|
@@ -8236,14 +8257,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8236
8257
|
},
|
|
8237
8258
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8238
8259
|
return searchParameters.setQueryParameters({
|
|
8239
|
-
page: getCurrentRefinement$
|
|
8260
|
+
page: getCurrentRefinement$9(props, searchState, {
|
|
8240
8261
|
ais: props.contextValue,
|
|
8241
8262
|
multiIndexContext: props.indexContextValue
|
|
8242
8263
|
}) - 1
|
|
8243
8264
|
});
|
|
8244
8265
|
},
|
|
8245
8266
|
refine: function refine(props, searchState, event, index) {
|
|
8246
|
-
var id = getId$
|
|
8267
|
+
var id = getId$a();
|
|
8247
8268
|
|
|
8248
8269
|
var nextValue = _defineProperty({}, id, index + 1);
|
|
8249
8270
|
|
|
@@ -8255,14 +8276,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8255
8276
|
}
|
|
8256
8277
|
});
|
|
8257
8278
|
|
|
8258
|
-
var namespace$
|
|
8279
|
+
var namespace$4 = 'menu';
|
|
8259
8280
|
|
|
8260
|
-
function getId$
|
|
8281
|
+
function getId$9(props) {
|
|
8261
8282
|
return props.attribute;
|
|
8262
8283
|
}
|
|
8263
8284
|
|
|
8264
|
-
function getCurrentRefinement$
|
|
8265
|
-
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);
|
|
8266
8287
|
|
|
8267
8288
|
if (currentRefinement === '') {
|
|
8268
8289
|
return null;
|
|
@@ -8272,28 +8293,28 @@ function getCurrentRefinement$3(props, searchState, context) {
|
|
|
8272
8293
|
}
|
|
8273
8294
|
|
|
8274
8295
|
function getValue$1(name, props, searchState, context) {
|
|
8275
|
-
var currentRefinement = getCurrentRefinement$
|
|
8296
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, context);
|
|
8276
8297
|
return name === currentRefinement ? '' : name;
|
|
8277
8298
|
}
|
|
8278
8299
|
|
|
8279
|
-
function getLimit(_ref) {
|
|
8300
|
+
function getLimit$1(_ref) {
|
|
8280
8301
|
var showMore = _ref.showMore,
|
|
8281
8302
|
limit = _ref.limit,
|
|
8282
8303
|
showMoreLimit = _ref.showMoreLimit;
|
|
8283
8304
|
return showMore ? showMoreLimit : limit;
|
|
8284
8305
|
}
|
|
8285
8306
|
|
|
8286
|
-
function _refine$
|
|
8287
|
-
var id = getId$
|
|
8307
|
+
function _refine$7(props, searchState, nextRefinement, context) {
|
|
8308
|
+
var id = getId$9(props);
|
|
8288
8309
|
|
|
8289
8310
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : '');
|
|
8290
8311
|
|
|
8291
8312
|
var resetPage = true;
|
|
8292
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
8313
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$4);
|
|
8293
8314
|
}
|
|
8294
8315
|
|
|
8295
|
-
function _cleanUp$
|
|
8296
|
-
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)));
|
|
8297
8318
|
}
|
|
8298
8319
|
|
|
8299
8320
|
var defaultSortBy = ['count:desc', 'name:asc'];
|
|
@@ -8352,7 +8373,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8352
8373
|
if (!canRefine) {
|
|
8353
8374
|
return {
|
|
8354
8375
|
items: [],
|
|
8355
|
-
currentRefinement: getCurrentRefinement$
|
|
8376
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
8356
8377
|
ais: props.contextValue,
|
|
8357
8378
|
multiIndexContext: props.indexContextValue
|
|
8358
8379
|
}),
|
|
@@ -8399,8 +8420,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8399
8420
|
|
|
8400
8421
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
8401
8422
|
return {
|
|
8402
|
-
items: transformedItems.slice(0, getLimit(props)),
|
|
8403
|
-
currentRefinement: getCurrentRefinement$
|
|
8423
|
+
items: transformedItems.slice(0, getLimit$1(props)),
|
|
8424
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
8404
8425
|
ais: props.contextValue,
|
|
8405
8426
|
multiIndexContext: props.indexContextValue
|
|
8406
8427
|
}),
|
|
@@ -8410,7 +8431,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8410
8431
|
};
|
|
8411
8432
|
},
|
|
8412
8433
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8413
|
-
return _refine$
|
|
8434
|
+
return _refine$7(props, searchState, nextRefinement, {
|
|
8414
8435
|
ais: props.contextValue,
|
|
8415
8436
|
multiIndexContext: props.indexContextValue
|
|
8416
8437
|
});
|
|
@@ -8419,11 +8440,11 @@ var connectMenu = createConnectorWithContext({
|
|
|
8419
8440
|
return {
|
|
8420
8441
|
facetName: props.attribute,
|
|
8421
8442
|
query: nextRefinement,
|
|
8422
|
-
maxFacetHits: getLimit(props)
|
|
8443
|
+
maxFacetHits: getLimit$1(props)
|
|
8423
8444
|
};
|
|
8424
8445
|
},
|
|
8425
8446
|
cleanUp: function cleanUp(props, searchState) {
|
|
8426
|
-
return _cleanUp$
|
|
8447
|
+
return _cleanUp$6(props, searchState, {
|
|
8427
8448
|
ais: props.contextValue,
|
|
8428
8449
|
multiIndexContext: props.indexContextValue
|
|
8429
8450
|
});
|
|
@@ -8431,10 +8452,10 @@ var connectMenu = createConnectorWithContext({
|
|
|
8431
8452
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8432
8453
|
var attribute = props.attribute;
|
|
8433
8454
|
searchParameters = searchParameters.setQueryParameters({
|
|
8434
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
8455
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit$1(props))
|
|
8435
8456
|
});
|
|
8436
8457
|
searchParameters = searchParameters.addDisjunctiveFacet(attribute);
|
|
8437
|
-
var currentRefinement = getCurrentRefinement$
|
|
8458
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
8438
8459
|
ais: props.contextValue,
|
|
8439
8460
|
multiIndexContext: props.indexContextValue
|
|
8440
8461
|
});
|
|
@@ -8446,8 +8467,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8446
8467
|
return searchParameters;
|
|
8447
8468
|
},
|
|
8448
8469
|
getMetadata: function getMetadata(props, searchState) {
|
|
8449
|
-
var id = getId$
|
|
8450
|
-
var currentRefinement = getCurrentRefinement$
|
|
8470
|
+
var id = getId$9(props);
|
|
8471
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
8451
8472
|
ais: props.contextValue,
|
|
8452
8473
|
multiIndexContext: props.indexContextValue
|
|
8453
8474
|
});
|
|
@@ -8461,7 +8482,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8461
8482
|
label: "".concat(props.attribute, ": ").concat(currentRefinement),
|
|
8462
8483
|
attribute: props.attribute,
|
|
8463
8484
|
value: function value(nextState) {
|
|
8464
|
-
return _refine$
|
|
8485
|
+
return _refine$7(props, nextState, '', {
|
|
8465
8486
|
ais: props.contextValue,
|
|
8466
8487
|
multiIndexContext: props.indexContextValue
|
|
8467
8488
|
});
|
|
@@ -8477,10 +8498,7 @@ function _arrayWithHoles(arr) {
|
|
|
8477
8498
|
}
|
|
8478
8499
|
|
|
8479
8500
|
function _iterableToArrayLimit(arr, i) {
|
|
8480
|
-
if (!(Symbol.iterator in Object(arr)
|
|
8481
|
-
return;
|
|
8482
|
-
}
|
|
8483
|
-
|
|
8501
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
|
8484
8502
|
var _arr = [];
|
|
8485
8503
|
var _n = true;
|
|
8486
8504
|
var _d = false;
|
|
@@ -8507,11 +8525,11 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
8507
8525
|
}
|
|
8508
8526
|
|
|
8509
8527
|
function _nonIterableRest() {
|
|
8510
|
-
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.");
|
|
8511
8529
|
}
|
|
8512
8530
|
|
|
8513
8531
|
function _slicedToArray(arr, i) {
|
|
8514
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
|
8532
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
8515
8533
|
}
|
|
8516
8534
|
|
|
8517
8535
|
function stringifyItem(item) {
|
|
@@ -8545,12 +8563,12 @@ function parseItem(value) {
|
|
|
8545
8563
|
|
|
8546
8564
|
var namespace$3 = 'multiRange';
|
|
8547
8565
|
|
|
8548
|
-
function getId$
|
|
8566
|
+
function getId$8(props) {
|
|
8549
8567
|
return props.attribute;
|
|
8550
8568
|
}
|
|
8551
8569
|
|
|
8552
|
-
function getCurrentRefinement$
|
|
8553
|
-
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)), '');
|
|
8554
8572
|
}
|
|
8555
8573
|
|
|
8556
8574
|
function isRefinementsRangeIncludesInsideItemRange(stats, start, end) {
|
|
@@ -8569,15 +8587,15 @@ function itemHasRefinement(attribute, results, value) {
|
|
|
8569
8587
|
return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end)));
|
|
8570
8588
|
}
|
|
8571
8589
|
|
|
8572
|
-
function _refine$
|
|
8573
|
-
var nextValue = _defineProperty({}, getId$
|
|
8590
|
+
function _refine$6(props, searchState, nextRefinement, context) {
|
|
8591
|
+
var nextValue = _defineProperty({}, getId$8(props), nextRefinement);
|
|
8574
8592
|
|
|
8575
8593
|
var resetPage = true;
|
|
8576
8594
|
return refineValue(searchState, nextValue, context, resetPage, namespace$3);
|
|
8577
8595
|
}
|
|
8578
8596
|
|
|
8579
|
-
function _cleanUp$
|
|
8580
|
-
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)));
|
|
8581
8599
|
}
|
|
8582
8600
|
/**
|
|
8583
8601
|
* connectNumericMenu connector provides the logic to build a widget that will
|
|
@@ -8611,7 +8629,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8611
8629
|
},
|
|
8612
8630
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
8613
8631
|
var attribute = props.attribute;
|
|
8614
|
-
var currentRefinement = getCurrentRefinement$
|
|
8632
|
+
var currentRefinement = getCurrentRefinement$7(props, searchState, {
|
|
8615
8633
|
ais: props.contextValue,
|
|
8616
8634
|
multiIndexContext: props.indexContextValue
|
|
8617
8635
|
});
|
|
@@ -8625,11 +8643,11 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8625
8643
|
label: item.label,
|
|
8626
8644
|
value: value,
|
|
8627
8645
|
isRefined: value === currentRefinement,
|
|
8628
|
-
noRefinement: results ? itemHasRefinement(getId$
|
|
8646
|
+
noRefinement: results ? itemHasRefinement(getId$8(props), results, value) : false
|
|
8629
8647
|
};
|
|
8630
8648
|
});
|
|
8631
8649
|
var stats = results && results.getFacetByName(attribute) ? results.getFacetStats(attribute) : null;
|
|
8632
|
-
var refinedItem = find(items, function (item) {
|
|
8650
|
+
var refinedItem = find$2(items, function (item) {
|
|
8633
8651
|
return item.isRefined === true;
|
|
8634
8652
|
});
|
|
8635
8653
|
|
|
@@ -8654,13 +8672,13 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8654
8672
|
};
|
|
8655
8673
|
},
|
|
8656
8674
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8657
|
-
return _refine$
|
|
8675
|
+
return _refine$6(props, searchState, nextRefinement, {
|
|
8658
8676
|
ais: props.contextValue,
|
|
8659
8677
|
multiIndexContext: props.indexContextValue
|
|
8660
8678
|
});
|
|
8661
8679
|
},
|
|
8662
8680
|
cleanUp: function cleanUp(props, searchState) {
|
|
8663
|
-
return _cleanUp$
|
|
8681
|
+
return _cleanUp$5(props, searchState, {
|
|
8664
8682
|
ais: props.contextValue,
|
|
8665
8683
|
multiIndexContext: props.indexContextValue
|
|
8666
8684
|
});
|
|
@@ -8668,7 +8686,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8668
8686
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8669
8687
|
var attribute = props.attribute;
|
|
8670
8688
|
|
|
8671
|
-
var _parseItem = parseItem(getCurrentRefinement$
|
|
8689
|
+
var _parseItem = parseItem(getCurrentRefinement$7(props, searchState, {
|
|
8672
8690
|
ais: props.contextValue,
|
|
8673
8691
|
multiIndexContext: props.indexContextValue
|
|
8674
8692
|
})),
|
|
@@ -8688,8 +8706,8 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8688
8706
|
return searchParameters;
|
|
8689
8707
|
},
|
|
8690
8708
|
getMetadata: function getMetadata(props, searchState) {
|
|
8691
|
-
var id = getId$
|
|
8692
|
-
var value = getCurrentRefinement$
|
|
8709
|
+
var id = getId$8(props);
|
|
8710
|
+
var value = getCurrentRefinement$7(props, searchState, {
|
|
8693
8711
|
ais: props.contextValue,
|
|
8694
8712
|
multiIndexContext: props.indexContextValue
|
|
8695
8713
|
});
|
|
@@ -8700,7 +8718,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8700
8718
|
});
|
|
8701
8719
|
|
|
8702
8720
|
if (value !== '') {
|
|
8703
|
-
var _find = find(props.items, function (item) {
|
|
8721
|
+
var _find = find$2(props.items, function (item) {
|
|
8704
8722
|
return stringifyItem(item) === value;
|
|
8705
8723
|
}),
|
|
8706
8724
|
label = _find.label;
|
|
@@ -8710,7 +8728,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8710
8728
|
attribute: props.attribute,
|
|
8711
8729
|
currentRefinement: label,
|
|
8712
8730
|
value: function value(nextState) {
|
|
8713
|
-
return _refine$
|
|
8731
|
+
return _refine$6(props, nextState, '', {
|
|
8714
8732
|
ais: props.contextValue,
|
|
8715
8733
|
multiIndexContext: props.indexContextValue
|
|
8716
8734
|
});
|
|
@@ -8726,12 +8744,12 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8726
8744
|
}
|
|
8727
8745
|
});
|
|
8728
8746
|
|
|
8729
|
-
function getId$
|
|
8747
|
+
function getId$7() {
|
|
8730
8748
|
return 'page';
|
|
8731
8749
|
}
|
|
8732
8750
|
|
|
8733
|
-
function getCurrentRefinement$
|
|
8734
|
-
var id = getId$
|
|
8751
|
+
function getCurrentRefinement$6(props, searchState, context) {
|
|
8752
|
+
var id = getId$7();
|
|
8735
8753
|
var page = 1;
|
|
8736
8754
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8737
8755
|
|
|
@@ -8742,8 +8760,8 @@ function getCurrentRefinement$5(props, searchState, context) {
|
|
|
8742
8760
|
return currentRefinement;
|
|
8743
8761
|
}
|
|
8744
8762
|
|
|
8745
|
-
function _refine$
|
|
8746
|
-
var id = getId$
|
|
8763
|
+
function _refine$5(props, searchState, nextPage, context) {
|
|
8764
|
+
var id = getId$7();
|
|
8747
8765
|
|
|
8748
8766
|
var nextValue = _defineProperty({}, id, nextPage);
|
|
8749
8767
|
|
|
@@ -8783,7 +8801,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8783
8801
|
var nbPages = results.nbPages;
|
|
8784
8802
|
return {
|
|
8785
8803
|
nbPages: nbPages,
|
|
8786
|
-
currentRefinement: getCurrentRefinement$
|
|
8804
|
+
currentRefinement: getCurrentRefinement$6(props, searchState, {
|
|
8787
8805
|
ais: props.contextValue,
|
|
8788
8806
|
multiIndexContext: props.indexContextValue
|
|
8789
8807
|
}),
|
|
@@ -8791,7 +8809,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8791
8809
|
};
|
|
8792
8810
|
},
|
|
8793
8811
|
refine: function refine(props, searchState, nextPage) {
|
|
8794
|
-
return _refine$
|
|
8812
|
+
return _refine$5(props, searchState, nextPage, {
|
|
8795
8813
|
ais: props.contextValue,
|
|
8796
8814
|
multiIndexContext: props.indexContextValue
|
|
8797
8815
|
});
|
|
@@ -8800,17 +8818,17 @@ var connectPagination = createConnectorWithContext({
|
|
|
8800
8818
|
return cleanUpValue(searchState, {
|
|
8801
8819
|
ais: props.contextValue,
|
|
8802
8820
|
multiIndexContext: props.indexContextValue
|
|
8803
|
-
}, getId$
|
|
8821
|
+
}, getId$7());
|
|
8804
8822
|
},
|
|
8805
8823
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8806
|
-
return searchParameters.setPage(getCurrentRefinement$
|
|
8824
|
+
return searchParameters.setPage(getCurrentRefinement$6(props, searchState, {
|
|
8807
8825
|
ais: props.contextValue,
|
|
8808
8826
|
multiIndexContext: props.indexContextValue
|
|
8809
8827
|
}) - 1);
|
|
8810
8828
|
},
|
|
8811
8829
|
getMetadata: function getMetadata() {
|
|
8812
8830
|
return {
|
|
8813
|
-
id: getId$
|
|
8831
|
+
id: getId$7()
|
|
8814
8832
|
};
|
|
8815
8833
|
}
|
|
8816
8834
|
});
|
|
@@ -8856,11 +8874,11 @@ var connectPoweredBy = createConnectorWithContext({
|
|
|
8856
8874
|
* @providedPropType {number} precision - Number of digits after decimal point to use.
|
|
8857
8875
|
*/
|
|
8858
8876
|
|
|
8859
|
-
function getId$
|
|
8877
|
+
function getId$6(props) {
|
|
8860
8878
|
return props.attribute;
|
|
8861
8879
|
}
|
|
8862
8880
|
|
|
8863
|
-
var namespace$
|
|
8881
|
+
var namespace$2 = 'range';
|
|
8864
8882
|
|
|
8865
8883
|
function getCurrentRange(boundaries, stats, precision) {
|
|
8866
8884
|
var pow = Math.pow(10, precision);
|
|
@@ -8890,8 +8908,8 @@ function getCurrentRange(boundaries, stats, precision) {
|
|
|
8890
8908
|
};
|
|
8891
8909
|
}
|
|
8892
8910
|
|
|
8893
|
-
function getCurrentRefinement$
|
|
8894
|
-
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)), {}),
|
|
8895
8913
|
min = _getCurrentRefinement.min,
|
|
8896
8914
|
max = _getCurrentRefinement.max;
|
|
8897
8915
|
|
|
@@ -8957,7 +8975,7 @@ function nextValueForRefinement(hasBound, isReset, range, value) {
|
|
|
8957
8975
|
return next;
|
|
8958
8976
|
}
|
|
8959
8977
|
|
|
8960
|
-
function _refine$
|
|
8978
|
+
function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
8961
8979
|
var nextMin = nextRefinement.min,
|
|
8962
8980
|
nextMax = nextRefinement.max;
|
|
8963
8981
|
var currentMinRange = currentRange.min,
|
|
@@ -8981,7 +8999,7 @@ function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
|
8981
8999
|
throw Error("You can't provide max value greater than range.");
|
|
8982
9000
|
}
|
|
8983
9001
|
|
|
8984
|
-
var id = getId$
|
|
9002
|
+
var id = getId$6(props);
|
|
8985
9003
|
var resetPage = true;
|
|
8986
9004
|
|
|
8987
9005
|
var nextValue = _defineProperty({}, id, {
|
|
@@ -8989,11 +9007,11 @@ function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
|
8989
9007
|
max: nextValueForRefinement(props.max !== undefined, isMaxReset, currentMaxRange, nextMaxAsNumber)
|
|
8990
9008
|
});
|
|
8991
9009
|
|
|
8992
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9010
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$2);
|
|
8993
9011
|
}
|
|
8994
9012
|
|
|
8995
|
-
function _cleanUp$
|
|
8996
|
-
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)));
|
|
8997
9015
|
}
|
|
8998
9016
|
|
|
8999
9017
|
var connectRange = createConnectorWithContext({
|
|
@@ -9048,7 +9066,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9048
9066
|
min: rangeMin,
|
|
9049
9067
|
max: rangeMax
|
|
9050
9068
|
};
|
|
9051
|
-
var currentRefinement = getCurrentRefinement$
|
|
9069
|
+
var currentRefinement = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
9052
9070
|
ais: props.contextValue,
|
|
9053
9071
|
multiIndexContext: props.indexContextValue
|
|
9054
9072
|
});
|
|
@@ -9062,13 +9080,13 @@ var connectRange = createConnectorWithContext({
|
|
|
9062
9080
|
};
|
|
9063
9081
|
},
|
|
9064
9082
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9065
|
-
return _refine$
|
|
9083
|
+
return _refine$4(props, searchState, nextRefinement, this._currentRange, {
|
|
9066
9084
|
ais: props.contextValue,
|
|
9067
9085
|
multiIndexContext: props.indexContextValue
|
|
9068
9086
|
});
|
|
9069
9087
|
},
|
|
9070
9088
|
cleanUp: function cleanUp(props, searchState) {
|
|
9071
|
-
return _cleanUp$
|
|
9089
|
+
return _cleanUp$4(props, searchState, {
|
|
9072
9090
|
ais: props.contextValue,
|
|
9073
9091
|
multiIndexContext: props.indexContextValue
|
|
9074
9092
|
});
|
|
@@ -9076,7 +9094,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9076
9094
|
getSearchParameters: function getSearchParameters(params, props, searchState) {
|
|
9077
9095
|
var attribute = props.attribute;
|
|
9078
9096
|
|
|
9079
|
-
var _getCurrentRefinement2 = getCurrentRefinement$
|
|
9097
|
+
var _getCurrentRefinement2 = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
9080
9098
|
ais: props.contextValue,
|
|
9081
9099
|
multiIndexContext: props.indexContextValue
|
|
9082
9100
|
}),
|
|
@@ -9102,7 +9120,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9102
9120
|
minRange = _this$_currentRange.min,
|
|
9103
9121
|
maxRange = _this$_currentRange.max;
|
|
9104
9122
|
|
|
9105
|
-
var _getCurrentRefinement3 = getCurrentRefinement$
|
|
9123
|
+
var _getCurrentRefinement3 = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
9106
9124
|
ais: props.contextValue,
|
|
9107
9125
|
multiIndexContext: props.indexContextValue
|
|
9108
9126
|
}),
|
|
@@ -9121,7 +9139,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9121
9139
|
label: fragments.join(''),
|
|
9122
9140
|
attribute: props.attribute,
|
|
9123
9141
|
value: function value(nextState) {
|
|
9124
|
-
return _refine$
|
|
9142
|
+
return _refine$4(props, nextState, {}, _this._currentRange, {
|
|
9125
9143
|
ais: props.contextValue,
|
|
9126
9144
|
multiIndexContext: props.indexContextValue
|
|
9127
9145
|
});
|
|
@@ -9137,7 +9155,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9137
9155
|
}
|
|
9138
9156
|
|
|
9139
9157
|
return {
|
|
9140
|
-
id: getId$
|
|
9158
|
+
id: getId$6(props),
|
|
9141
9159
|
index: getIndexId({
|
|
9142
9160
|
ais: props.contextValue,
|
|
9143
9161
|
multiIndexContext: props.indexContextValue
|
|
@@ -9147,14 +9165,14 @@ var connectRange = createConnectorWithContext({
|
|
|
9147
9165
|
}
|
|
9148
9166
|
});
|
|
9149
9167
|
|
|
9150
|
-
var namespace$
|
|
9168
|
+
var namespace$1 = 'refinementList';
|
|
9151
9169
|
|
|
9152
|
-
function getId$
|
|
9170
|
+
function getId$5(props) {
|
|
9153
9171
|
return props.attribute;
|
|
9154
9172
|
}
|
|
9155
9173
|
|
|
9156
|
-
function getCurrentRefinement$
|
|
9157
|
-
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)), []);
|
|
9158
9176
|
|
|
9159
9177
|
if (typeof currentRefinement !== 'string') {
|
|
9160
9178
|
return currentRefinement;
|
|
@@ -9167,8 +9185,8 @@ function getCurrentRefinement$7(props, searchState, context) {
|
|
|
9167
9185
|
return [];
|
|
9168
9186
|
}
|
|
9169
9187
|
|
|
9170
|
-
function getValue
|
|
9171
|
-
var currentRefinement = getCurrentRefinement$
|
|
9188
|
+
function getValue(name, props, searchState, context) {
|
|
9189
|
+
var currentRefinement = getCurrentRefinement$4(props, searchState, context);
|
|
9172
9190
|
var isAnewValue = currentRefinement.indexOf(name) === -1;
|
|
9173
9191
|
var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates
|
|
9174
9192
|
: currentRefinement.filter(function (selectedValue) {
|
|
@@ -9178,15 +9196,15 @@ function getValue$2(name, props, searchState, context) {
|
|
|
9178
9196
|
return nextRefinement;
|
|
9179
9197
|
}
|
|
9180
9198
|
|
|
9181
|
-
function getLimit
|
|
9199
|
+
function getLimit(_ref) {
|
|
9182
9200
|
var showMore = _ref.showMore,
|
|
9183
9201
|
limit = _ref.limit,
|
|
9184
9202
|
showMoreLimit = _ref.showMoreLimit;
|
|
9185
9203
|
return showMore ? showMoreLimit : limit;
|
|
9186
9204
|
}
|
|
9187
9205
|
|
|
9188
|
-
function _refine$
|
|
9189
|
-
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
|
|
9190
9208
|
// the URL as an empty value.
|
|
9191
9209
|
// This is necessary in the case where `defaultRefinement` contains one
|
|
9192
9210
|
// item and we try to deselect it. `nextSelected` would be an empty array,
|
|
@@ -9197,11 +9215,11 @@ function _refine$6(props, searchState, nextRefinement, context) {
|
|
|
9197
9215
|
var nextValue = _defineProperty({}, id, nextRefinement.length > 0 ? nextRefinement : '');
|
|
9198
9216
|
|
|
9199
9217
|
var resetPage = true;
|
|
9200
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9218
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$1);
|
|
9201
9219
|
}
|
|
9202
9220
|
|
|
9203
|
-
function _cleanUp$
|
|
9204
|
-
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)));
|
|
9205
9223
|
}
|
|
9206
9224
|
/**
|
|
9207
9225
|
* connectRefinementList connector provides the logic to build a widget that will
|
|
@@ -9228,7 +9246,7 @@ function _cleanUp$4(props, searchState, context) {
|
|
|
9228
9246
|
*/
|
|
9229
9247
|
|
|
9230
9248
|
|
|
9231
|
-
var sortBy
|
|
9249
|
+
var sortBy = ['isRefined', 'count:desc', 'name:asc'];
|
|
9232
9250
|
var connectRefinementList = createConnectorWithContext({
|
|
9233
9251
|
displayName: 'AlgoliaRefinementList',
|
|
9234
9252
|
propTypes: {
|
|
@@ -9266,7 +9284,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9266
9284
|
if (!canRefine) {
|
|
9267
9285
|
return {
|
|
9268
9286
|
items: [],
|
|
9269
|
-
currentRefinement: getCurrentRefinement$
|
|
9287
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, {
|
|
9270
9288
|
ais: props.contextValue,
|
|
9271
9289
|
multiIndexContext: props.indexContextValue
|
|
9272
9290
|
}),
|
|
@@ -9279,7 +9297,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9279
9297
|
var items = isFromSearch ? searchForFacetValuesResults[attribute].map(function (v) {
|
|
9280
9298
|
return {
|
|
9281
9299
|
label: v.value,
|
|
9282
|
-
value: getValue
|
|
9300
|
+
value: getValue(v.value, props, searchState, {
|
|
9283
9301
|
ais: props.contextValue,
|
|
9284
9302
|
multiIndexContext: props.indexContextValue
|
|
9285
9303
|
}),
|
|
@@ -9292,11 +9310,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9292
9310
|
isRefined: v.isRefined
|
|
9293
9311
|
};
|
|
9294
9312
|
}) : results.getFacetValues(attribute, {
|
|
9295
|
-
sortBy: sortBy
|
|
9313
|
+
sortBy: sortBy
|
|
9296
9314
|
}).map(function (v) {
|
|
9297
9315
|
return {
|
|
9298
9316
|
label: v.name,
|
|
9299
|
-
value: getValue
|
|
9317
|
+
value: getValue(v.name, props, searchState, {
|
|
9300
9318
|
ais: props.contextValue,
|
|
9301
9319
|
multiIndexContext: props.indexContextValue
|
|
9302
9320
|
}),
|
|
@@ -9306,8 +9324,8 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9306
9324
|
});
|
|
9307
9325
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
9308
9326
|
return {
|
|
9309
|
-
items: transformedItems.slice(0, getLimit
|
|
9310
|
-
currentRefinement: getCurrentRefinement$
|
|
9327
|
+
items: transformedItems.slice(0, getLimit(props)),
|
|
9328
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, {
|
|
9311
9329
|
ais: props.contextValue,
|
|
9312
9330
|
multiIndexContext: props.indexContextValue
|
|
9313
9331
|
}),
|
|
@@ -9317,7 +9335,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9317
9335
|
};
|
|
9318
9336
|
},
|
|
9319
9337
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9320
|
-
return _refine$
|
|
9338
|
+
return _refine$3(props, searchState, nextRefinement, {
|
|
9321
9339
|
ais: props.contextValue,
|
|
9322
9340
|
multiIndexContext: props.indexContextValue
|
|
9323
9341
|
});
|
|
@@ -9326,11 +9344,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9326
9344
|
return {
|
|
9327
9345
|
facetName: props.attribute,
|
|
9328
9346
|
query: nextRefinement,
|
|
9329
|
-
maxFacetHits: getLimit
|
|
9347
|
+
maxFacetHits: getLimit(props)
|
|
9330
9348
|
};
|
|
9331
9349
|
},
|
|
9332
9350
|
cleanUp: function cleanUp(props, searchState) {
|
|
9333
|
-
return _cleanUp$
|
|
9351
|
+
return _cleanUp$3(props, searchState, {
|
|
9334
9352
|
ais: props.contextValue,
|
|
9335
9353
|
multiIndexContext: props.indexContextValue
|
|
9336
9354
|
});
|
|
@@ -9341,10 +9359,10 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9341
9359
|
var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet';
|
|
9342
9360
|
var addRefinementKey = "".concat(addKey, "Refinement");
|
|
9343
9361
|
searchParameters = searchParameters.setQueryParameters({
|
|
9344
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit
|
|
9362
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
9345
9363
|
});
|
|
9346
9364
|
searchParameters = searchParameters[addKey](attribute);
|
|
9347
|
-
return getCurrentRefinement$
|
|
9365
|
+
return getCurrentRefinement$4(props, searchState, {
|
|
9348
9366
|
ais: props.contextValue,
|
|
9349
9367
|
multiIndexContext: props.indexContextValue
|
|
9350
9368
|
}).reduce(function (res, val) {
|
|
@@ -9352,7 +9370,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9352
9370
|
}, searchParameters);
|
|
9353
9371
|
},
|
|
9354
9372
|
getMetadata: function getMetadata(props, searchState) {
|
|
9355
|
-
var id = getId$
|
|
9373
|
+
var id = getId$5(props);
|
|
9356
9374
|
var context = {
|
|
9357
9375
|
ais: props.contextValue,
|
|
9358
9376
|
multiIndexContext: props.indexContextValue
|
|
@@ -9360,21 +9378,21 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9360
9378
|
return {
|
|
9361
9379
|
id: id,
|
|
9362
9380
|
index: getIndexId(context),
|
|
9363
|
-
items: getCurrentRefinement$
|
|
9381
|
+
items: getCurrentRefinement$4(props, searchState, context).length > 0 ? [{
|
|
9364
9382
|
attribute: props.attribute,
|
|
9365
9383
|
label: "".concat(props.attribute, ": "),
|
|
9366
|
-
currentRefinement: getCurrentRefinement$
|
|
9384
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, context),
|
|
9367
9385
|
value: function value(nextState) {
|
|
9368
|
-
return _refine$
|
|
9386
|
+
return _refine$3(props, nextState, [], context);
|
|
9369
9387
|
},
|
|
9370
|
-
items: getCurrentRefinement$
|
|
9388
|
+
items: getCurrentRefinement$4(props, searchState, context).map(function (item) {
|
|
9371
9389
|
return {
|
|
9372
9390
|
label: "".concat(item),
|
|
9373
9391
|
value: function value(nextState) {
|
|
9374
|
-
var nextSelectedItems = getCurrentRefinement$
|
|
9392
|
+
var nextSelectedItems = getCurrentRefinement$4(props, nextState, context).filter(function (other) {
|
|
9375
9393
|
return other !== item;
|
|
9376
9394
|
});
|
|
9377
|
-
return _refine$
|
|
9395
|
+
return _refine$3(props, searchState, nextSelectedItems, context);
|
|
9378
9396
|
}
|
|
9379
9397
|
};
|
|
9380
9398
|
})
|
|
@@ -9433,7 +9451,7 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9433
9451
|
// See: https://github.com/algolia/react-instantsearch/issues/164
|
|
9434
9452
|
|
|
9435
9453
|
|
|
9436
|
-
var cleanedSearchState = omit(searchState, ['configure', id]);
|
|
9454
|
+
var cleanedSearchState = omit$1(searchState, ['configure', id]);
|
|
9437
9455
|
var hasNotChanged = shallowEqual(this._prevSearchState, cleanedSearchState);
|
|
9438
9456
|
this._prevSearchState = cleanedSearchState;
|
|
9439
9457
|
return {
|
|
@@ -9443,12 +9461,12 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9443
9461
|
}
|
|
9444
9462
|
});
|
|
9445
9463
|
|
|
9446
|
-
function getId$
|
|
9464
|
+
function getId$4() {
|
|
9447
9465
|
return 'query';
|
|
9448
9466
|
}
|
|
9449
9467
|
|
|
9450
|
-
function getCurrentRefinement$
|
|
9451
|
-
var id = getId$
|
|
9468
|
+
function getCurrentRefinement$3(props, searchState, context) {
|
|
9469
|
+
var id = getId$4();
|
|
9452
9470
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9453
9471
|
|
|
9454
9472
|
if (currentRefinement) {
|
|
@@ -9458,8 +9476,8 @@ function getCurrentRefinement$8(props, searchState, context) {
|
|
|
9458
9476
|
return '';
|
|
9459
9477
|
}
|
|
9460
9478
|
|
|
9461
|
-
function _refine$
|
|
9462
|
-
var id = getId$
|
|
9479
|
+
function _refine$2(props, searchState, nextRefinement, context) {
|
|
9480
|
+
var id = getId$4();
|
|
9463
9481
|
|
|
9464
9482
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9465
9483
|
|
|
@@ -9467,8 +9485,8 @@ function _refine$7(props, searchState, nextRefinement, context) {
|
|
|
9467
9485
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9468
9486
|
}
|
|
9469
9487
|
|
|
9470
|
-
function _cleanUp$
|
|
9471
|
-
return cleanUpValue(searchState, context, getId$
|
|
9488
|
+
function _cleanUp$2(props, searchState, context) {
|
|
9489
|
+
return cleanUpValue(searchState, context, getId$4());
|
|
9472
9490
|
}
|
|
9473
9491
|
/**
|
|
9474
9492
|
* connectSearchBox connector provides the logic to build a widget that will
|
|
@@ -9489,7 +9507,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9489
9507
|
},
|
|
9490
9508
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
9491
9509
|
return {
|
|
9492
|
-
currentRefinement: getCurrentRefinement$
|
|
9510
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
9493
9511
|
ais: props.contextValue,
|
|
9494
9512
|
multiIndexContext: props.indexContextValue
|
|
9495
9513
|
}),
|
|
@@ -9497,26 +9515,26 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9497
9515
|
};
|
|
9498
9516
|
},
|
|
9499
9517
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9500
|
-
return _refine$
|
|
9518
|
+
return _refine$2(props, searchState, nextRefinement, {
|
|
9501
9519
|
ais: props.contextValue,
|
|
9502
9520
|
multiIndexContext: props.indexContextValue
|
|
9503
9521
|
});
|
|
9504
9522
|
},
|
|
9505
9523
|
cleanUp: function cleanUp(props, searchState) {
|
|
9506
|
-
return _cleanUp$
|
|
9524
|
+
return _cleanUp$2(props, searchState, {
|
|
9507
9525
|
ais: props.contextValue,
|
|
9508
9526
|
multiIndexContext: props.indexContextValue
|
|
9509
9527
|
});
|
|
9510
9528
|
},
|
|
9511
9529
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9512
|
-
return searchParameters.setQuery(getCurrentRefinement$
|
|
9530
|
+
return searchParameters.setQuery(getCurrentRefinement$3(props, searchState, {
|
|
9513
9531
|
ais: props.contextValue,
|
|
9514
9532
|
multiIndexContext: props.indexContextValue
|
|
9515
9533
|
}));
|
|
9516
9534
|
},
|
|
9517
9535
|
getMetadata: function getMetadata(props, searchState) {
|
|
9518
|
-
var id = getId$
|
|
9519
|
-
var currentRefinement = getCurrentRefinement$
|
|
9536
|
+
var id = getId$4();
|
|
9537
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
9520
9538
|
ais: props.contextValue,
|
|
9521
9539
|
multiIndexContext: props.indexContextValue
|
|
9522
9540
|
});
|
|
@@ -9529,7 +9547,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9529
9547
|
items: currentRefinement === null ? [] : [{
|
|
9530
9548
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9531
9549
|
value: function value(nextState) {
|
|
9532
|
-
return _refine$
|
|
9550
|
+
return _refine$2(props, nextState, '', {
|
|
9533
9551
|
ais: props.contextValue,
|
|
9534
9552
|
multiIndexContext: props.indexContextValue
|
|
9535
9553
|
});
|
|
@@ -9540,12 +9558,12 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9540
9558
|
}
|
|
9541
9559
|
});
|
|
9542
9560
|
|
|
9543
|
-
function getId$
|
|
9561
|
+
function getId$3() {
|
|
9544
9562
|
return 'relevancyStrictness';
|
|
9545
9563
|
}
|
|
9546
9564
|
|
|
9547
|
-
function getCurrentRefinement$
|
|
9548
|
-
var id = getId$
|
|
9565
|
+
function getCurrentRefinement$2(props, searchState, context) {
|
|
9566
|
+
var id = getId$3();
|
|
9549
9567
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id);
|
|
9550
9568
|
return currentRefinement;
|
|
9551
9569
|
}
|
|
@@ -9571,13 +9589,13 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9571
9589
|
};
|
|
9572
9590
|
},
|
|
9573
9591
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9574
|
-
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$
|
|
9592
|
+
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$2(props, searchState, {
|
|
9575
9593
|
ais: props.contextValue,
|
|
9576
9594
|
multiIndexContext: props.indexContextValue
|
|
9577
9595
|
}));
|
|
9578
9596
|
},
|
|
9579
9597
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9580
|
-
var nextValue = _defineProperty({}, getId$
|
|
9598
|
+
var nextValue = _defineProperty({}, getId$3(), nextRefinement);
|
|
9581
9599
|
|
|
9582
9600
|
var resetPage = true;
|
|
9583
9601
|
return refineValue(searchState, nextValue, {
|
|
@@ -9587,12 +9605,12 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9587
9605
|
}
|
|
9588
9606
|
});
|
|
9589
9607
|
|
|
9590
|
-
function getId$
|
|
9608
|
+
function getId$2() {
|
|
9591
9609
|
return 'sortBy';
|
|
9592
9610
|
}
|
|
9593
9611
|
|
|
9594
|
-
function getCurrentRefinement$
|
|
9595
|
-
var id = getId$
|
|
9612
|
+
function getCurrentRefinement$1(props, searchState, context) {
|
|
9613
|
+
var id = getId$2();
|
|
9596
9614
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
9597
9615
|
|
|
9598
9616
|
if (currentRefinement) {
|
|
@@ -9629,7 +9647,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9629
9647
|
transformItems: PropTypes.func
|
|
9630
9648
|
},
|
|
9631
9649
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
9632
|
-
var currentRefinement = getCurrentRefinement$
|
|
9650
|
+
var currentRefinement = getCurrentRefinement$1(props, searchState, {
|
|
9633
9651
|
ais: props.contextValue,
|
|
9634
9652
|
multiIndexContext: props.indexContextValue
|
|
9635
9653
|
});
|
|
@@ -9646,7 +9664,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9646
9664
|
};
|
|
9647
9665
|
},
|
|
9648
9666
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9649
|
-
var id = getId$
|
|
9667
|
+
var id = getId$2();
|
|
9650
9668
|
|
|
9651
9669
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9652
9670
|
|
|
@@ -9660,10 +9678,10 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9660
9678
|
return cleanUpValue(searchState, {
|
|
9661
9679
|
ais: props.contextValue,
|
|
9662
9680
|
multiIndexContext: props.indexContextValue
|
|
9663
|
-
}, getId$
|
|
9681
|
+
}, getId$2());
|
|
9664
9682
|
},
|
|
9665
9683
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9666
|
-
var selectedIndex = getCurrentRefinement$
|
|
9684
|
+
var selectedIndex = getCurrentRefinement$1(props, searchState, {
|
|
9667
9685
|
ais: props.contextValue,
|
|
9668
9686
|
multiIndexContext: props.indexContextValue
|
|
9669
9687
|
});
|
|
@@ -9671,7 +9689,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9671
9689
|
},
|
|
9672
9690
|
getMetadata: function getMetadata() {
|
|
9673
9691
|
return {
|
|
9674
|
-
id: getId$
|
|
9692
|
+
id: getId$2()
|
|
9675
9693
|
};
|
|
9676
9694
|
}
|
|
9677
9695
|
});
|
|
@@ -9707,15 +9725,15 @@ var connectStats = createConnectorWithContext({
|
|
|
9707
9725
|
}
|
|
9708
9726
|
});
|
|
9709
9727
|
|
|
9710
|
-
function getId$
|
|
9728
|
+
function getId$1(props) {
|
|
9711
9729
|
return props.attribute;
|
|
9712
9730
|
}
|
|
9713
9731
|
|
|
9714
|
-
var namespace
|
|
9732
|
+
var namespace = 'toggle';
|
|
9715
9733
|
var falsyStrings = ['0', 'false', 'null', 'undefined'];
|
|
9716
9734
|
|
|
9717
|
-
function getCurrentRefinement
|
|
9718
|
-
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);
|
|
9719
9737
|
|
|
9720
9738
|
if (falsyStrings.indexOf(currentRefinement) !== -1) {
|
|
9721
9739
|
return false;
|
|
@@ -9724,17 +9742,17 @@ function getCurrentRefinement$b(props, searchState, context) {
|
|
|
9724
9742
|
return Boolean(currentRefinement);
|
|
9725
9743
|
}
|
|
9726
9744
|
|
|
9727
|
-
function _refine$
|
|
9728
|
-
var id = getId$
|
|
9745
|
+
function _refine$1(props, searchState, nextRefinement, context) {
|
|
9746
|
+
var id = getId$1(props);
|
|
9729
9747
|
|
|
9730
9748
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : false);
|
|
9731
9749
|
|
|
9732
9750
|
var resetPage = true;
|
|
9733
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace
|
|
9751
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
9734
9752
|
}
|
|
9735
9753
|
|
|
9736
|
-
function _cleanUp$
|
|
9737
|
-
return cleanUpValue(searchState, context, "".concat(namespace
|
|
9754
|
+
function _cleanUp$1(props, searchState, context) {
|
|
9755
|
+
return cleanUpValue(searchState, context, "".concat(namespace, ".").concat(getId$1(props)));
|
|
9738
9756
|
}
|
|
9739
9757
|
/**
|
|
9740
9758
|
* connectToggleRefinement connector provides the logic to build a widget that will
|
|
@@ -9773,14 +9791,14 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9773
9791
|
ais: props.contextValue,
|
|
9774
9792
|
multiIndexContext: props.indexContextValue
|
|
9775
9793
|
});
|
|
9776
|
-
var currentRefinement = getCurrentRefinement
|
|
9794
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
9777
9795
|
ais: props.contextValue,
|
|
9778
9796
|
multiIndexContext: props.indexContextValue
|
|
9779
9797
|
});
|
|
9780
9798
|
var allFacetValues = results && results.getFacetByName(attribute) ? results.getFacetValues(attribute) : null;
|
|
9781
9799
|
var facetValue = // Use null to always be consistent with type of the value
|
|
9782
9800
|
// count: number | null
|
|
9783
|
-
allFacetValues && allFacetValues.length ? find(allFacetValues, function (item) {
|
|
9801
|
+
allFacetValues && allFacetValues.length ? find$2(allFacetValues, function (item) {
|
|
9784
9802
|
return item.name === value.toString();
|
|
9785
9803
|
}) : null;
|
|
9786
9804
|
var facetValueCount = facetValue && facetValue.count;
|
|
@@ -9801,13 +9819,13 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9801
9819
|
};
|
|
9802
9820
|
},
|
|
9803
9821
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9804
|
-
return _refine$
|
|
9822
|
+
return _refine$1(props, searchState, nextRefinement, {
|
|
9805
9823
|
ais: props.contextValue,
|
|
9806
9824
|
multiIndexContext: props.indexContextValue
|
|
9807
9825
|
});
|
|
9808
9826
|
},
|
|
9809
9827
|
cleanUp: function cleanUp(props, searchState) {
|
|
9810
|
-
return _cleanUp$
|
|
9828
|
+
return _cleanUp$1(props, searchState, {
|
|
9811
9829
|
ais: props.contextValue,
|
|
9812
9830
|
multiIndexContext: props.indexContextValue
|
|
9813
9831
|
});
|
|
@@ -9816,7 +9834,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9816
9834
|
var attribute = props.attribute,
|
|
9817
9835
|
value = props.value,
|
|
9818
9836
|
filter = props.filter;
|
|
9819
|
-
var checked = getCurrentRefinement
|
|
9837
|
+
var checked = getCurrentRefinement(props, searchState, {
|
|
9820
9838
|
ais: props.contextValue,
|
|
9821
9839
|
multiIndexContext: props.indexContextValue
|
|
9822
9840
|
});
|
|
@@ -9833,8 +9851,8 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9833
9851
|
return nextSearchParameters;
|
|
9834
9852
|
},
|
|
9835
9853
|
getMetadata: function getMetadata(props, searchState) {
|
|
9836
|
-
var id = getId$
|
|
9837
|
-
var checked = getCurrentRefinement
|
|
9854
|
+
var id = getId$1(props);
|
|
9855
|
+
var checked = getCurrentRefinement(props, searchState, {
|
|
9838
9856
|
ais: props.contextValue,
|
|
9839
9857
|
multiIndexContext: props.indexContextValue
|
|
9840
9858
|
});
|
|
@@ -9850,7 +9868,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9850
9868
|
currentRefinement: checked,
|
|
9851
9869
|
attribute: props.attribute,
|
|
9852
9870
|
value: function value(nextState) {
|
|
9853
|
-
return _refine$
|
|
9871
|
+
return _refine$1(props, nextState, false, {
|
|
9854
9872
|
ais: props.contextValue,
|
|
9855
9873
|
multiIndexContext: props.indexContextValue
|
|
9856
9874
|
});
|
|
@@ -9866,7 +9884,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9866
9884
|
}
|
|
9867
9885
|
});
|
|
9868
9886
|
|
|
9869
|
-
function getId
|
|
9887
|
+
function getId() {
|
|
9870
9888
|
return 'query';
|
|
9871
9889
|
}
|
|
9872
9890
|
|
|
@@ -9875,7 +9893,7 @@ function getAdditionalId() {
|
|
|
9875
9893
|
}
|
|
9876
9894
|
|
|
9877
9895
|
function getCurrentRefinementQuery(props, searchState, context) {
|
|
9878
|
-
var id = getId
|
|
9896
|
+
var id = getId();
|
|
9879
9897
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9880
9898
|
|
|
9881
9899
|
if (currentRefinement) {
|
|
@@ -9896,10 +9914,10 @@ function getCurrentRefinementAdditional(props, searchState, context) {
|
|
|
9896
9914
|
return {};
|
|
9897
9915
|
}
|
|
9898
9916
|
|
|
9899
|
-
function _refine
|
|
9917
|
+
function _refine(props, searchState, nextRefinement, context) {
|
|
9900
9918
|
var _nextValue;
|
|
9901
9919
|
|
|
9902
|
-
var id = getId
|
|
9920
|
+
var id = getId();
|
|
9903
9921
|
var voiceParams = getAdditionalId();
|
|
9904
9922
|
var queryLanguages = props.language ? {
|
|
9905
9923
|
queryLanguages: [props.language.split('-')[0]]
|
|
@@ -9916,8 +9934,8 @@ function _refine$9(props, searchState, nextRefinement, context) {
|
|
|
9916
9934
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9917
9935
|
}
|
|
9918
9936
|
|
|
9919
|
-
function _cleanUp
|
|
9920
|
-
var interimState = cleanUpValue(searchState, context, getId
|
|
9937
|
+
function _cleanUp(props, searchState, context) {
|
|
9938
|
+
var interimState = cleanUpValue(searchState, context, getId());
|
|
9921
9939
|
return cleanUpValue(interimState, context, getAdditionalId());
|
|
9922
9940
|
}
|
|
9923
9941
|
|
|
@@ -9936,13 +9954,13 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9936
9954
|
};
|
|
9937
9955
|
},
|
|
9938
9956
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9939
|
-
return _refine
|
|
9957
|
+
return _refine(props, searchState, nextRefinement, {
|
|
9940
9958
|
ais: props.contextValue,
|
|
9941
9959
|
multiIndexContext: props.indexContextValue
|
|
9942
9960
|
});
|
|
9943
9961
|
},
|
|
9944
9962
|
cleanUp: function cleanUp(props, searchState) {
|
|
9945
|
-
return _cleanUp
|
|
9963
|
+
return _cleanUp(props, searchState, {
|
|
9946
9964
|
ais: props.contextValue,
|
|
9947
9965
|
multiIndexContext: props.indexContextValue
|
|
9948
9966
|
});
|
|
@@ -9959,7 +9977,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9959
9977
|
return searchParameters.setQuery(query).setQueryParameters(additionalParams);
|
|
9960
9978
|
},
|
|
9961
9979
|
getMetadata: function getMetadata(props, searchState) {
|
|
9962
|
-
var id = getId
|
|
9980
|
+
var id = getId();
|
|
9963
9981
|
var currentRefinement = getCurrentRefinementQuery(props, searchState, {
|
|
9964
9982
|
ais: props.contextValue,
|
|
9965
9983
|
multiIndexContext: props.indexContextValue
|
|
@@ -9973,7 +9991,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9973
9991
|
items: currentRefinement === null ? [] : [{
|
|
9974
9992
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9975
9993
|
value: function value(nextState) {
|
|
9976
|
-
return _refine
|
|
9994
|
+
return _refine(props, nextState, '', {
|
|
9977
9995
|
ais: props.contextValue,
|
|
9978
9996
|
multiIndexContext: props.indexContextValue
|
|
9979
9997
|
});
|
|
@@ -10026,7 +10044,7 @@ function range(_ref) {
|
|
|
10026
10044
|
return (start + current) * limitStep;
|
|
10027
10045
|
});
|
|
10028
10046
|
}
|
|
10029
|
-
function find
|
|
10047
|
+
function find(array, comparator) {
|
|
10030
10048
|
if (!Array.isArray(array)) {
|
|
10031
10049
|
return undefined;
|
|
10032
10050
|
}
|
|
@@ -10040,11 +10058,11 @@ function find$2(array, comparator) {
|
|
|
10040
10058
|
return undefined;
|
|
10041
10059
|
}
|
|
10042
10060
|
|
|
10043
|
-
var cx = createClassNames('Panel');
|
|
10061
|
+
var cx$p = createClassNames('Panel');
|
|
10044
10062
|
|
|
10045
|
-
var _createContext
|
|
10046
|
-
PanelConsumer = _createContext
|
|
10047
|
-
PanelProvider = _createContext
|
|
10063
|
+
var _createContext = createContext(function setCanRefine() {}),
|
|
10064
|
+
PanelConsumer = _createContext.Consumer,
|
|
10065
|
+
PanelProvider = _createContext.Provider;
|
|
10048
10066
|
|
|
10049
10067
|
var Panel =
|
|
10050
10068
|
/*#__PURE__*/
|
|
@@ -10086,16 +10104,16 @@ function (_Component) {
|
|
|
10086
10104
|
header = _this$props.header,
|
|
10087
10105
|
footer = _this$props.footer;
|
|
10088
10106
|
var canRefine = this.state.canRefine;
|
|
10089
|
-
return
|
|
10090
|
-
className: classnames(cx('', !canRefine && '-noRefinement'), className)
|
|
10091
|
-
}, header &&
|
|
10092
|
-
className: cx('header')
|
|
10093
|
-
}, header),
|
|
10094
|
-
className: cx('body')
|
|
10095
|
-
},
|
|
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, {
|
|
10096
10114
|
value: this.setCanRefine
|
|
10097
|
-
}, children)), footer &&
|
|
10098
|
-
className: cx('footer')
|
|
10115
|
+
}, children)), footer && React.createElement("div", {
|
|
10116
|
+
className: cx$p('footer')
|
|
10099
10117
|
}, footer));
|
|
10100
10118
|
}
|
|
10101
10119
|
}]);
|
|
@@ -10158,8 +10176,8 @@ _defineProperty(PanelCallbackHandler, "propTypes", {
|
|
|
10158
10176
|
var PanelWrapper = function PanelWrapper(_ref) {
|
|
10159
10177
|
var canRefine = _ref.canRefine,
|
|
10160
10178
|
children = _ref.children;
|
|
10161
|
-
return
|
|
10162
|
-
return
|
|
10179
|
+
return React.createElement(PanelConsumer, null, function (setCanRefine) {
|
|
10180
|
+
return React.createElement(PanelCallbackHandler, {
|
|
10163
10181
|
setCanRefine: setCanRefine,
|
|
10164
10182
|
canRefine: canRefine
|
|
10165
10183
|
}, children);
|
|
@@ -10205,7 +10223,7 @@ function (_Component) {
|
|
|
10205
10223
|
_createClass(Link, [{
|
|
10206
10224
|
key: "render",
|
|
10207
10225
|
value: function render() {
|
|
10208
|
-
return
|
|
10226
|
+
return React.createElement("a", _extends({}, this.props, {
|
|
10209
10227
|
onClick: this.onClick
|
|
10210
10228
|
}));
|
|
10211
10229
|
}
|
|
@@ -10218,8 +10236,8 @@ _defineProperty(Link, "propTypes", {
|
|
|
10218
10236
|
onClick: PropTypes.func.isRequired
|
|
10219
10237
|
});
|
|
10220
10238
|
|
|
10221
|
-
var cx$
|
|
10222
|
-
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
10239
|
+
var cx$o = createClassNames('Breadcrumb');
|
|
10240
|
+
var itemsPropType$2 = PropTypes.arrayOf(PropTypes.shape({
|
|
10223
10241
|
label: PropTypes.string.isRequired,
|
|
10224
10242
|
value: PropTypes.string.isRequired
|
|
10225
10243
|
}));
|
|
@@ -10247,10 +10265,10 @@ function (_Component) {
|
|
|
10247
10265
|
separator = _this$props.separator,
|
|
10248
10266
|
translate = _this$props.translate,
|
|
10249
10267
|
className = _this$props.className;
|
|
10250
|
-
var rootPath = canRefine ?
|
|
10251
|
-
className: cx$
|
|
10252
|
-
},
|
|
10253
|
-
className: cx$
|
|
10268
|
+
var rootPath = canRefine ? React.createElement("li", {
|
|
10269
|
+
className: cx$o('item')
|
|
10270
|
+
}, React.createElement(Link, {
|
|
10271
|
+
className: cx$o('link'),
|
|
10254
10272
|
onClick: function onClick() {
|
|
10255
10273
|
return !rootURL ? refine() : null;
|
|
10256
10274
|
},
|
|
@@ -10258,23 +10276,23 @@ function (_Component) {
|
|
|
10258
10276
|
}, translate('rootLabel'))) : null;
|
|
10259
10277
|
var breadcrumb = items.map(function (item, idx) {
|
|
10260
10278
|
var isLast = idx === items.length - 1;
|
|
10261
|
-
return
|
|
10262
|
-
className: cx$
|
|
10279
|
+
return React.createElement("li", {
|
|
10280
|
+
className: cx$o('item', isLast && 'item--selected'),
|
|
10263
10281
|
key: idx
|
|
10264
|
-
},
|
|
10265
|
-
className: cx$
|
|
10266
|
-
}, separator), !isLast ?
|
|
10267
|
-
className: cx$
|
|
10282
|
+
}, React.createElement("span", {
|
|
10283
|
+
className: cx$o('separator')
|
|
10284
|
+
}, separator), !isLast ? React.createElement(Link, {
|
|
10285
|
+
className: cx$o('link'),
|
|
10268
10286
|
onClick: function onClick() {
|
|
10269
10287
|
return refine(item.value);
|
|
10270
10288
|
},
|
|
10271
10289
|
href: createURL(item.value)
|
|
10272
10290
|
}, item.label) : item.label);
|
|
10273
10291
|
});
|
|
10274
|
-
return
|
|
10275
|
-
className: classnames(cx$
|
|
10276
|
-
},
|
|
10277
|
-
className: cx$
|
|
10292
|
+
return React.createElement("div", {
|
|
10293
|
+
className: classnames(cx$o('', !canRefine && '-noRefinement'), className)
|
|
10294
|
+
}, React.createElement("ul", {
|
|
10295
|
+
className: cx$o('list')
|
|
10278
10296
|
}, rootPath, breadcrumb));
|
|
10279
10297
|
}
|
|
10280
10298
|
}]);
|
|
@@ -10285,7 +10303,7 @@ function (_Component) {
|
|
|
10285
10303
|
_defineProperty(Breadcrumb, "propTypes", {
|
|
10286
10304
|
canRefine: PropTypes.bool.isRequired,
|
|
10287
10305
|
createURL: PropTypes.func.isRequired,
|
|
10288
|
-
items: itemsPropType,
|
|
10306
|
+
items: itemsPropType$2,
|
|
10289
10307
|
refine: PropTypes.func.isRequired,
|
|
10290
10308
|
rootURL: PropTypes.string,
|
|
10291
10309
|
separator: PropTypes.node,
|
|
@@ -10392,12 +10410,12 @@ var Breadcrumb$1 = translatable({
|
|
|
10392
10410
|
*/
|
|
10393
10411
|
|
|
10394
10412
|
var BreadcrumbWidget = function BreadcrumbWidget(props) {
|
|
10395
|
-
return
|
|
10413
|
+
return React.createElement(PanelWrapper, props, React.createElement(Breadcrumb$1, props));
|
|
10396
10414
|
};
|
|
10397
10415
|
|
|
10398
10416
|
connectBreadcrumb(BreadcrumbWidget);
|
|
10399
10417
|
|
|
10400
|
-
var cx$
|
|
10418
|
+
var cx$n = createClassNames('ClearRefinements');
|
|
10401
10419
|
|
|
10402
10420
|
var ClearRefinements =
|
|
10403
10421
|
/*#__PURE__*/
|
|
@@ -10419,10 +10437,10 @@ function (_Component) {
|
|
|
10419
10437
|
refine = _this$props.refine,
|
|
10420
10438
|
translate = _this$props.translate,
|
|
10421
10439
|
className = _this$props.className;
|
|
10422
|
-
return
|
|
10423
|
-
className: classnames(cx$
|
|
10424
|
-
},
|
|
10425
|
-
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'),
|
|
10426
10444
|
onClick: function onClick() {
|
|
10427
10445
|
return refine(items);
|
|
10428
10446
|
},
|
|
@@ -10485,44 +10503,44 @@ var ClearRefinements$1 = translatable({
|
|
|
10485
10503
|
*/
|
|
10486
10504
|
|
|
10487
10505
|
var ClearRefinementsWidget = function ClearRefinementsWidget(props) {
|
|
10488
|
-
return
|
|
10506
|
+
return React.createElement(PanelWrapper, props, React.createElement(ClearRefinements$1, props));
|
|
10489
10507
|
};
|
|
10490
10508
|
|
|
10491
10509
|
connectCurrentRefinements(ClearRefinementsWidget);
|
|
10492
10510
|
|
|
10493
|
-
var cx$
|
|
10511
|
+
var cx$m = createClassNames('CurrentRefinements');
|
|
10494
10512
|
var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
10495
10513
|
var items = _ref.items,
|
|
10496
10514
|
canRefine = _ref.canRefine,
|
|
10497
10515
|
refine = _ref.refine,
|
|
10498
10516
|
translate = _ref.translate,
|
|
10499
10517
|
className = _ref.className;
|
|
10500
|
-
return
|
|
10501
|
-
className: classnames(cx$
|
|
10502
|
-
},
|
|
10503
|
-
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')
|
|
10504
10522
|
}, items.map(function (item) {
|
|
10505
|
-
return
|
|
10523
|
+
return React.createElement("li", {
|
|
10506
10524
|
key: item.label,
|
|
10507
|
-
className: cx$
|
|
10508
|
-
},
|
|
10509
|
-
className: cx$
|
|
10525
|
+
className: cx$m('item')
|
|
10526
|
+
}, React.createElement("span", {
|
|
10527
|
+
className: cx$m('label')
|
|
10510
10528
|
}, item.label), item.items ? item.items.map(function (nest) {
|
|
10511
|
-
return
|
|
10529
|
+
return React.createElement("span", {
|
|
10512
10530
|
key: nest.label,
|
|
10513
|
-
className: cx$
|
|
10514
|
-
},
|
|
10515
|
-
className: cx$
|
|
10516
|
-
}, nest.label),
|
|
10517
|
-
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'),
|
|
10518
10536
|
onClick: function onClick() {
|
|
10519
10537
|
return refine(nest.value);
|
|
10520
10538
|
}
|
|
10521
10539
|
}, translate('clearFilter', nest)));
|
|
10522
|
-
}) :
|
|
10523
|
-
className: cx$
|
|
10524
|
-
},
|
|
10525
|
-
className: cx$
|
|
10540
|
+
}) : React.createElement("span", {
|
|
10541
|
+
className: cx$m('category')
|
|
10542
|
+
}, React.createElement("button", {
|
|
10543
|
+
className: cx$m('delete'),
|
|
10526
10544
|
onClick: function onClick() {
|
|
10527
10545
|
return refine(item.value);
|
|
10528
10546
|
}
|
|
@@ -10593,33 +10611,33 @@ var CurrentRefinements$1 = translatable({
|
|
|
10593
10611
|
*/
|
|
10594
10612
|
|
|
10595
10613
|
var CurrentRefinementsWidget = function CurrentRefinementsWidget(props) {
|
|
10596
|
-
return
|
|
10614
|
+
return React.createElement(PanelWrapper, props, React.createElement(CurrentRefinements$1, props));
|
|
10597
10615
|
};
|
|
10598
10616
|
|
|
10599
10617
|
connectCurrentRefinements(CurrentRefinementsWidget);
|
|
10600
10618
|
|
|
10601
|
-
var cx$
|
|
10602
|
-
var defaultLoadingIndicator =
|
|
10619
|
+
var cx$l = createClassNames('SearchBox');
|
|
10620
|
+
var defaultLoadingIndicator = React.createElement("svg", {
|
|
10603
10621
|
width: "18",
|
|
10604
10622
|
height: "18",
|
|
10605
10623
|
viewBox: "0 0 38 38",
|
|
10606
10624
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10607
10625
|
stroke: "#444",
|
|
10608
|
-
className: cx$
|
|
10609
|
-
},
|
|
10626
|
+
className: cx$l('loadingIcon')
|
|
10627
|
+
}, React.createElement("g", {
|
|
10610
10628
|
fill: "none",
|
|
10611
10629
|
fillRule: "evenodd"
|
|
10612
|
-
},
|
|
10630
|
+
}, React.createElement("g", {
|
|
10613
10631
|
transform: "translate(1 1)",
|
|
10614
10632
|
strokeWidth: "2"
|
|
10615
|
-
},
|
|
10633
|
+
}, React.createElement("circle", {
|
|
10616
10634
|
strokeOpacity: ".5",
|
|
10617
10635
|
cx: "18",
|
|
10618
10636
|
cy: "18",
|
|
10619
10637
|
r: "18"
|
|
10620
|
-
}),
|
|
10638
|
+
}), React.createElement("path", {
|
|
10621
10639
|
d: "M36 18c0-9.94-8.06-18-18-18"
|
|
10622
|
-
},
|
|
10640
|
+
}, React.createElement("animateTransform", {
|
|
10623
10641
|
attributeName: "transform",
|
|
10624
10642
|
type: "rotate",
|
|
10625
10643
|
from: "0 18 18",
|
|
@@ -10627,26 +10645,26 @@ var defaultLoadingIndicator = React__default.createElement("svg", {
|
|
|
10627
10645
|
dur: "1s",
|
|
10628
10646
|
repeatCount: "indefinite"
|
|
10629
10647
|
})))));
|
|
10630
|
-
var defaultReset =
|
|
10631
|
-
className: cx$
|
|
10648
|
+
var defaultReset = React.createElement("svg", {
|
|
10649
|
+
className: cx$l('resetIcon'),
|
|
10632
10650
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10633
10651
|
viewBox: "0 0 20 20",
|
|
10634
10652
|
width: "10",
|
|
10635
10653
|
height: "10"
|
|
10636
|
-
},
|
|
10654
|
+
}, React.createElement("path", {
|
|
10637
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"
|
|
10638
10656
|
}));
|
|
10639
|
-
var defaultSubmit =
|
|
10640
|
-
className: cx$
|
|
10657
|
+
var defaultSubmit = React.createElement("svg", {
|
|
10658
|
+
className: cx$l('submitIcon'),
|
|
10641
10659
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10642
10660
|
width: "10",
|
|
10643
10661
|
height: "10",
|
|
10644
10662
|
viewBox: "0 0 40 40"
|
|
10645
|
-
},
|
|
10663
|
+
}, React.createElement("path", {
|
|
10646
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"
|
|
10647
10665
|
}));
|
|
10648
10666
|
|
|
10649
|
-
var SearchBox =
|
|
10667
|
+
var SearchBox$1 =
|
|
10650
10668
|
/*#__PURE__*/
|
|
10651
10669
|
function (_Component) {
|
|
10652
10670
|
_inherits(SearchBox, _Component);
|
|
@@ -10808,16 +10826,16 @@ function (_Component) {
|
|
|
10808
10826
|
var isSearchStalled = this.props.showLoadingIndicator && this.props.isSearchStalled;
|
|
10809
10827
|
/* eslint-disable max-len */
|
|
10810
10828
|
|
|
10811
|
-
return
|
|
10812
|
-
className: classnames(cx$
|
|
10813
|
-
},
|
|
10829
|
+
return React.createElement("div", {
|
|
10830
|
+
className: classnames(cx$l(''), className)
|
|
10831
|
+
}, React.createElement("form", {
|
|
10814
10832
|
noValidate: true,
|
|
10815
10833
|
onSubmit: this.props.onSubmit ? this.props.onSubmit : this.onSubmit,
|
|
10816
10834
|
onReset: this.onReset,
|
|
10817
|
-
className: cx$
|
|
10835
|
+
className: cx$l('form', isSearchStalled && 'form--stalledSearch'),
|
|
10818
10836
|
action: "",
|
|
10819
10837
|
role: "search"
|
|
10820
|
-
},
|
|
10838
|
+
}, React.createElement("input", _extends({
|
|
10821
10839
|
ref: this.onInputMount,
|
|
10822
10840
|
type: "search",
|
|
10823
10841
|
placeholder: translate('placeholder'),
|
|
@@ -10831,19 +10849,19 @@ function (_Component) {
|
|
|
10831
10849
|
value: query,
|
|
10832
10850
|
onChange: this.onChange
|
|
10833
10851
|
}, searchInputEvents, {
|
|
10834
|
-
className: cx$
|
|
10835
|
-
})),
|
|
10852
|
+
className: cx$l('input')
|
|
10853
|
+
})), React.createElement("button", {
|
|
10836
10854
|
type: "submit",
|
|
10837
10855
|
title: translate('submitTitle'),
|
|
10838
|
-
className: cx$
|
|
10839
|
-
}, submit),
|
|
10856
|
+
className: cx$l('submit')
|
|
10857
|
+
}, submit), React.createElement("button", {
|
|
10840
10858
|
type: "reset",
|
|
10841
10859
|
title: translate('resetTitle'),
|
|
10842
|
-
className: cx$
|
|
10860
|
+
className: cx$l('reset'),
|
|
10843
10861
|
hidden: !query || isSearchStalled
|
|
10844
|
-
}, reset), this.props.showLoadingIndicator &&
|
|
10862
|
+
}, reset), this.props.showLoadingIndicator && React.createElement("span", {
|
|
10845
10863
|
hidden: !isSearchStalled,
|
|
10846
|
-
className: cx$
|
|
10864
|
+
className: cx$l('loadingIndicator')
|
|
10847
10865
|
}, loadingIndicator)));
|
|
10848
10866
|
/* eslint-enable */
|
|
10849
10867
|
}
|
|
@@ -10852,7 +10870,7 @@ function (_Component) {
|
|
|
10852
10870
|
return SearchBox;
|
|
10853
10871
|
}(Component);
|
|
10854
10872
|
|
|
10855
|
-
_defineProperty(SearchBox, "propTypes", {
|
|
10873
|
+
_defineProperty(SearchBox$1, "propTypes", {
|
|
10856
10874
|
currentRefinement: PropTypes.string,
|
|
10857
10875
|
className: PropTypes.string,
|
|
10858
10876
|
refine: PropTypes.func.isRequired,
|
|
@@ -10873,7 +10891,7 @@ _defineProperty(SearchBox, "propTypes", {
|
|
|
10873
10891
|
})])
|
|
10874
10892
|
});
|
|
10875
10893
|
|
|
10876
|
-
_defineProperty(SearchBox, "defaultProps", {
|
|
10894
|
+
_defineProperty(SearchBox$1, "defaultProps", {
|
|
10877
10895
|
currentRefinement: '',
|
|
10878
10896
|
className: '',
|
|
10879
10897
|
focusShortcuts: ['s', '/'],
|
|
@@ -10886,11 +10904,11 @@ _defineProperty(SearchBox, "defaultProps", {
|
|
|
10886
10904
|
submit: defaultSubmit
|
|
10887
10905
|
});
|
|
10888
10906
|
|
|
10889
|
-
var SearchBox$
|
|
10907
|
+
var SearchBox$2 = translatable({
|
|
10890
10908
|
resetTitle: 'Clear the search query.',
|
|
10891
10909
|
submitTitle: 'Submit your search query.',
|
|
10892
10910
|
placeholder: 'Search here…'
|
|
10893
|
-
})(SearchBox);
|
|
10911
|
+
})(SearchBox$1);
|
|
10894
10912
|
|
|
10895
10913
|
var itemsPropType$1 = PropTypes.arrayOf(PropTypes.shape({
|
|
10896
10914
|
value: PropTypes.any,
|
|
@@ -10936,10 +10954,10 @@ function (_Component) {
|
|
|
10936
10954
|
|
|
10937
10955
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
10938
10956
|
var itemHasChildren = item.items && Boolean(item.items.length);
|
|
10939
|
-
return
|
|
10957
|
+
return React.createElement("li", {
|
|
10940
10958
|
key: item.key || item.label,
|
|
10941
10959
|
className: _this.props.cx('item', item.isRefined && 'item--selected', item.noRefinement && 'item--noRefinement', itemHasChildren && 'item--parent')
|
|
10942
|
-
}, _this.props.renderItem(item, resetQuery), itemHasChildren &&
|
|
10960
|
+
}, _this.props.renderItem(item, resetQuery), itemHasChildren && React.createElement("ul", {
|
|
10943
10961
|
className: _this.props.cx('list', 'list--child')
|
|
10944
10962
|
}, item.items.slice(0, _this.getLimit()).map(function (child) {
|
|
10945
10963
|
return _this.renderItem(child, item);
|
|
@@ -10967,7 +10985,7 @@ function (_Component) {
|
|
|
10967
10985
|
return null;
|
|
10968
10986
|
}
|
|
10969
10987
|
|
|
10970
|
-
return
|
|
10988
|
+
return React.createElement("button", {
|
|
10971
10989
|
disabled: disabled,
|
|
10972
10990
|
className: cx('showMore', disabled && 'showMore--disabled'),
|
|
10973
10991
|
onClick: this.onShowMoreClick
|
|
@@ -10985,12 +11003,12 @@ function (_Component) {
|
|
|
10985
11003
|
translate = _this$props3.translate,
|
|
10986
11004
|
items = _this$props3.items,
|
|
10987
11005
|
selectItem = _this$props3.selectItem;
|
|
10988
|
-
var noResults = items.length === 0 && this.state.query !== '' ?
|
|
11006
|
+
var noResults = items.length === 0 && this.state.query !== '' ? React.createElement("div", {
|
|
10989
11007
|
className: cx('noResults')
|
|
10990
11008
|
}, translate('noResults')) : null;
|
|
10991
|
-
return
|
|
11009
|
+
return React.createElement("div", {
|
|
10992
11010
|
className: cx('searchBox')
|
|
10993
|
-
},
|
|
11011
|
+
}, React.createElement(SearchBox$2, {
|
|
10994
11012
|
currentRefinement: this.state.query,
|
|
10995
11013
|
refine: function refine(value) {
|
|
10996
11014
|
_this2.setState({
|
|
@@ -11026,7 +11044,7 @@ function (_Component) {
|
|
|
11026
11044
|
var rootClassName = classnames(cx('', !canRefine && '-noRefinement'), className);
|
|
11027
11045
|
|
|
11028
11046
|
if (items.length === 0) {
|
|
11029
|
-
return
|
|
11047
|
+
return React.createElement("div", {
|
|
11030
11048
|
className: rootClassName
|
|
11031
11049
|
}, searchBox);
|
|
11032
11050
|
} // Always limit the number of items we show on screen, since the actual
|
|
@@ -11034,9 +11052,9 @@ function (_Component) {
|
|
|
11034
11052
|
// option.
|
|
11035
11053
|
|
|
11036
11054
|
|
|
11037
|
-
return
|
|
11055
|
+
return React.createElement("div", {
|
|
11038
11056
|
className: rootClassName
|
|
11039
|
-
}, searchBox,
|
|
11057
|
+
}, searchBox, React.createElement("ul", {
|
|
11040
11058
|
className: cx('list', !canRefine && 'list--noRefinement')
|
|
11041
11059
|
}, items.slice(0, this.getLimit()).map(function (item) {
|
|
11042
11060
|
return _this3.renderItem(item, _this3.resetQuery);
|
|
@@ -11070,13 +11088,13 @@ _defineProperty(List, "defaultProps", {
|
|
|
11070
11088
|
isFromSearch: false
|
|
11071
11089
|
});
|
|
11072
11090
|
|
|
11073
|
-
var cx$
|
|
11074
|
-
var itemsPropType
|
|
11091
|
+
var cx$k = createClassNames('HierarchicalMenu');
|
|
11092
|
+
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
11075
11093
|
label: PropTypes.string.isRequired,
|
|
11076
11094
|
value: PropTypes.string,
|
|
11077
11095
|
count: PropTypes.number.isRequired,
|
|
11078
11096
|
items: function items() {
|
|
11079
|
-
return itemsPropType
|
|
11097
|
+
return itemsPropType.apply(void 0, arguments);
|
|
11080
11098
|
}
|
|
11081
11099
|
}));
|
|
11082
11100
|
|
|
@@ -11102,16 +11120,16 @@ function (_Component) {
|
|
|
11102
11120
|
var _this$props = _this.props,
|
|
11103
11121
|
createURL = _this$props.createURL,
|
|
11104
11122
|
refine = _this$props.refine;
|
|
11105
|
-
return
|
|
11106
|
-
className: cx$
|
|
11123
|
+
return React.createElement(Link, {
|
|
11124
|
+
className: cx$k('link'),
|
|
11107
11125
|
onClick: function onClick() {
|
|
11108
11126
|
return refine(item.value);
|
|
11109
11127
|
},
|
|
11110
11128
|
href: createURL(item.value)
|
|
11111
|
-
},
|
|
11112
|
-
className: cx$
|
|
11113
|
-
}, item.label), ' ',
|
|
11114
|
-
className: cx$
|
|
11129
|
+
}, React.createElement("span", {
|
|
11130
|
+
className: cx$k('label')
|
|
11131
|
+
}, item.label), ' ', React.createElement("span", {
|
|
11132
|
+
className: cx$k('count')
|
|
11115
11133
|
}, item.count));
|
|
11116
11134
|
});
|
|
11117
11135
|
|
|
@@ -11129,9 +11147,9 @@ function (_Component) {
|
|
|
11129
11147
|
showMoreLimit = _this$props2.showMoreLimit,
|
|
11130
11148
|
canRefine = _this$props2.canRefine,
|
|
11131
11149
|
className = _this$props2.className;
|
|
11132
|
-
return
|
|
11150
|
+
return React.createElement(List, {
|
|
11133
11151
|
renderItem: this.renderItem,
|
|
11134
|
-
cx: cx$
|
|
11152
|
+
cx: cx$k,
|
|
11135
11153
|
translate: translate,
|
|
11136
11154
|
items: items,
|
|
11137
11155
|
showMore: showMore,
|
|
@@ -11151,7 +11169,7 @@ _defineProperty(HierarchicalMenu, "propTypes", {
|
|
|
11151
11169
|
refine: PropTypes.func.isRequired,
|
|
11152
11170
|
createURL: PropTypes.func.isRequired,
|
|
11153
11171
|
canRefine: PropTypes.bool.isRequired,
|
|
11154
|
-
items: itemsPropType
|
|
11172
|
+
items: itemsPropType,
|
|
11155
11173
|
showMore: PropTypes.bool,
|
|
11156
11174
|
className: PropTypes.string,
|
|
11157
11175
|
limit: PropTypes.number,
|
|
@@ -11260,12 +11278,12 @@ var HierarchicalMenu$1 = translatable({
|
|
|
11260
11278
|
*/
|
|
11261
11279
|
|
|
11262
11280
|
var HierarchicalMenuWidget = function HierarchicalMenuWidget(props) {
|
|
11263
|
-
return
|
|
11281
|
+
return React.createElement(PanelWrapper, props, React.createElement(HierarchicalMenu$1, props));
|
|
11264
11282
|
};
|
|
11265
11283
|
|
|
11266
11284
|
connectHierarchicalMenu(HierarchicalMenuWidget);
|
|
11267
11285
|
|
|
11268
|
-
var Highlight = function Highlight(_ref) {
|
|
11286
|
+
var Highlight$2 = function Highlight(_ref) {
|
|
11269
11287
|
var cx = _ref.cx,
|
|
11270
11288
|
value = _ref.value,
|
|
11271
11289
|
highlightedTagName = _ref.highlightedTagName,
|
|
@@ -11273,11 +11291,11 @@ var Highlight = function Highlight(_ref) {
|
|
|
11273
11291
|
nonHighlightedTagName = _ref.nonHighlightedTagName;
|
|
11274
11292
|
var TagName = isHighlighted ? highlightedTagName : nonHighlightedTagName;
|
|
11275
11293
|
var className = isHighlighted ? 'highlighted' : 'nonHighlighted';
|
|
11276
|
-
return
|
|
11294
|
+
return React.createElement(TagName, {
|
|
11277
11295
|
className: cx(className)
|
|
11278
11296
|
}, value);
|
|
11279
11297
|
};
|
|
11280
|
-
Highlight.propTypes = {
|
|
11298
|
+
Highlight$2.propTypes = {
|
|
11281
11299
|
cx: PropTypes.func.isRequired,
|
|
11282
11300
|
value: PropTypes.string.isRequired,
|
|
11283
11301
|
isHighlighted: PropTypes.bool.isRequired,
|
|
@@ -11300,15 +11318,15 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11300
11318
|
attribute: attribute,
|
|
11301
11319
|
highlightProperty: highlightProperty
|
|
11302
11320
|
});
|
|
11303
|
-
return
|
|
11321
|
+
return React.createElement("span", {
|
|
11304
11322
|
className: classnames(cx(''), className)
|
|
11305
11323
|
}, parsedHighlightedValue.map(function (item, i) {
|
|
11306
11324
|
if (Array.isArray(item)) {
|
|
11307
11325
|
var isLast = i === parsedHighlightedValue.length - 1;
|
|
11308
|
-
return
|
|
11326
|
+
return React.createElement("span", {
|
|
11309
11327
|
key: i
|
|
11310
11328
|
}, item.map(function (element, index) {
|
|
11311
|
-
return
|
|
11329
|
+
return React.createElement(Highlight$2, {
|
|
11312
11330
|
cx: cx,
|
|
11313
11331
|
key: index,
|
|
11314
11332
|
value: element.value,
|
|
@@ -11316,12 +11334,12 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11316
11334
|
nonHighlightedTagName: nonHighlightedTagName,
|
|
11317
11335
|
isHighlighted: element.isHighlighted
|
|
11318
11336
|
});
|
|
11319
|
-
}), !isLast &&
|
|
11337
|
+
}), !isLast && React.createElement("span", {
|
|
11320
11338
|
className: cx('separator')
|
|
11321
11339
|
}, separator));
|
|
11322
11340
|
}
|
|
11323
11341
|
|
|
11324
|
-
return
|
|
11342
|
+
return React.createElement(Highlight$2, {
|
|
11325
11343
|
cx: cx,
|
|
11326
11344
|
key: i,
|
|
11327
11345
|
value: item.value,
|
|
@@ -11350,12 +11368,12 @@ Highlighter.defaultProps = {
|
|
|
11350
11368
|
separator: ', '
|
|
11351
11369
|
};
|
|
11352
11370
|
|
|
11353
|
-
var cx$
|
|
11371
|
+
var cx$j = createClassNames('Highlight');
|
|
11354
11372
|
|
|
11355
11373
|
var Highlight$1 = function Highlight(props) {
|
|
11356
|
-
return
|
|
11374
|
+
return React.createElement(Highlighter, _extends({}, props, {
|
|
11357
11375
|
highlightProperty: "_highlightResult",
|
|
11358
|
-
cx: cx$
|
|
11376
|
+
cx: cx$j
|
|
11359
11377
|
}));
|
|
11360
11378
|
};
|
|
11361
11379
|
|
|
@@ -11400,12 +11418,12 @@ var Highlight$1 = function Highlight(props) {
|
|
|
11400
11418
|
* );
|
|
11401
11419
|
*/
|
|
11402
11420
|
|
|
11403
|
-
var Highlight
|
|
11421
|
+
var Highlight = connectHighlight(Highlight$1);
|
|
11404
11422
|
|
|
11405
|
-
var cx$
|
|
11423
|
+
var cx$i = createClassNames('Hits');
|
|
11406
11424
|
|
|
11407
11425
|
var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
11408
|
-
return
|
|
11426
|
+
return React.createElement("div", {
|
|
11409
11427
|
style: {
|
|
11410
11428
|
borderBottom: '1px solid #bbb',
|
|
11411
11429
|
paddingBottom: '5px',
|
|
@@ -11415,21 +11433,21 @@ var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
|
11415
11433
|
}, JSON.stringify(props).slice(0, 100), "...");
|
|
11416
11434
|
};
|
|
11417
11435
|
|
|
11418
|
-
var Hits = function Hits(_ref) {
|
|
11436
|
+
var Hits$1 = function Hits(_ref) {
|
|
11419
11437
|
var hits = _ref.hits,
|
|
11420
11438
|
_ref$className = _ref.className,
|
|
11421
11439
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
11422
11440
|
_ref$hitComponent = _ref.hitComponent,
|
|
11423
11441
|
HitComponent = _ref$hitComponent === void 0 ? DefaultHitComponent : _ref$hitComponent;
|
|
11424
|
-
return
|
|
11425
|
-
className: classnames(cx$
|
|
11426
|
-
},
|
|
11427
|
-
className: cx$
|
|
11442
|
+
return React.createElement("div", {
|
|
11443
|
+
className: classnames(cx$i(''), className)
|
|
11444
|
+
}, React.createElement("ul", {
|
|
11445
|
+
className: cx$i('list')
|
|
11428
11446
|
}, hits.map(function (hit) {
|
|
11429
|
-
return
|
|
11430
|
-
className: cx$
|
|
11447
|
+
return React.createElement("li", {
|
|
11448
|
+
className: cx$i('item'),
|
|
11431
11449
|
key: hit.objectID
|
|
11432
|
-
},
|
|
11450
|
+
}, React.createElement(HitComponent, {
|
|
11433
11451
|
hit: hit
|
|
11434
11452
|
}));
|
|
11435
11453
|
})));
|
|
@@ -11438,7 +11456,7 @@ var Hits = function Hits(_ref) {
|
|
|
11438
11456
|
var HitPropTypes = PropTypes.shape({
|
|
11439
11457
|
objectID: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11440
11458
|
});
|
|
11441
|
-
Hits.propTypes = {
|
|
11459
|
+
Hits$1.propTypes = {
|
|
11442
11460
|
hits: PropTypes.arrayOf(HitPropTypes.isRequired).isRequired,
|
|
11443
11461
|
className: PropTypes.string,
|
|
11444
11462
|
hitComponent: PropTypes.func
|
|
@@ -11477,7 +11495,7 @@ Hits.propTypes = {
|
|
|
11477
11495
|
* );
|
|
11478
11496
|
*/
|
|
11479
11497
|
|
|
11480
|
-
var Hits
|
|
11498
|
+
var Hits = connectHits(Hits$1);
|
|
11481
11499
|
|
|
11482
11500
|
var Select =
|
|
11483
11501
|
/*#__PURE__*/
|
|
@@ -11511,12 +11529,12 @@ function (_Component) {
|
|
|
11511
11529
|
cx = _this$props.cx,
|
|
11512
11530
|
items = _this$props.items,
|
|
11513
11531
|
selectedItem = _this$props.selectedItem;
|
|
11514
|
-
return
|
|
11532
|
+
return React.createElement("select", {
|
|
11515
11533
|
className: cx('select'),
|
|
11516
11534
|
value: selectedItem,
|
|
11517
11535
|
onChange: this.onChange
|
|
11518
11536
|
}, items.map(function (item) {
|
|
11519
|
-
return
|
|
11537
|
+
return React.createElement("option", {
|
|
11520
11538
|
className: cx('option'),
|
|
11521
11539
|
key: item.key === undefined ? item.value : item.key,
|
|
11522
11540
|
disabled: item.disabled,
|
|
@@ -11541,7 +11559,7 @@ _defineProperty(Select, "propTypes", {
|
|
|
11541
11559
|
selectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11542
11560
|
});
|
|
11543
11561
|
|
|
11544
|
-
var cx$
|
|
11562
|
+
var cx$h = createClassNames('HitsPerPage');
|
|
11545
11563
|
|
|
11546
11564
|
var HitsPerPage =
|
|
11547
11565
|
/*#__PURE__*/
|
|
@@ -11562,13 +11580,13 @@ function (_Component) {
|
|
|
11562
11580
|
currentRefinement = _this$props.currentRefinement,
|
|
11563
11581
|
refine = _this$props.refine,
|
|
11564
11582
|
className = _this$props.className;
|
|
11565
|
-
return
|
|
11566
|
-
className: classnames(cx$
|
|
11567
|
-
},
|
|
11583
|
+
return React.createElement("div", {
|
|
11584
|
+
className: classnames(cx$h(''), className)
|
|
11585
|
+
}, React.createElement(Select, {
|
|
11568
11586
|
onSelect: refine,
|
|
11569
11587
|
selectedItem: currentRefinement,
|
|
11570
11588
|
items: items,
|
|
11571
|
-
cx: cx$
|
|
11589
|
+
cx: cx$h
|
|
11572
11590
|
}));
|
|
11573
11591
|
}
|
|
11574
11592
|
}]);
|
|
@@ -11634,7 +11652,7 @@ _defineProperty(HitsPerPage, "defaultProps", {
|
|
|
11634
11652
|
|
|
11635
11653
|
connectHitsPerPage(HitsPerPage);
|
|
11636
11654
|
|
|
11637
|
-
var cx$
|
|
11655
|
+
var cx$g = createClassNames('InfiniteHits');
|
|
11638
11656
|
|
|
11639
11657
|
var InfiniteHits =
|
|
11640
11658
|
/*#__PURE__*/
|
|
@@ -11660,25 +11678,25 @@ function (_Component) {
|
|
|
11660
11678
|
refineNext = _this$props.refineNext,
|
|
11661
11679
|
translate = _this$props.translate,
|
|
11662
11680
|
className = _this$props.className;
|
|
11663
|
-
return
|
|
11664
|
-
className: classnames(cx$
|
|
11665
|
-
}, showPrevious &&
|
|
11666
|
-
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'),
|
|
11667
11685
|
onClick: function onClick() {
|
|
11668
11686
|
return refinePrevious();
|
|
11669
11687
|
},
|
|
11670
11688
|
disabled: !hasPrevious
|
|
11671
|
-
}, translate('loadPrevious')),
|
|
11672
|
-
className: cx$
|
|
11689
|
+
}, translate('loadPrevious')), React.createElement("ul", {
|
|
11690
|
+
className: cx$g('list')
|
|
11673
11691
|
}, hits.map(function (hit) {
|
|
11674
|
-
return
|
|
11692
|
+
return React.createElement("li", {
|
|
11675
11693
|
key: hit.objectID,
|
|
11676
|
-
className: cx$
|
|
11677
|
-
},
|
|
11694
|
+
className: cx$g('item')
|
|
11695
|
+
}, React.createElement(HitComponent, {
|
|
11678
11696
|
hit: hit
|
|
11679
11697
|
}));
|
|
11680
|
-
})),
|
|
11681
|
-
className: cx$
|
|
11698
|
+
})), React.createElement("button", {
|
|
11699
|
+
className: cx$g('loadMore', !hasMore && 'loadMore--disabled'),
|
|
11682
11700
|
onClick: function onClick() {
|
|
11683
11701
|
return refineNext();
|
|
11684
11702
|
},
|
|
@@ -11705,7 +11723,7 @@ InfiniteHits.defaultProps = {
|
|
|
11705
11723
|
className: '',
|
|
11706
11724
|
showPrevious: false,
|
|
11707
11725
|
hitComponent: function hitComponent(hit) {
|
|
11708
|
-
return
|
|
11726
|
+
return React.createElement("div", {
|
|
11709
11727
|
style: {
|
|
11710
11728
|
borderBottom: '1px solid #bbb',
|
|
11711
11729
|
paddingBottom: '5px',
|
|
@@ -11759,7 +11777,7 @@ var InfiniteHits$1 = translatable({
|
|
|
11759
11777
|
|
|
11760
11778
|
connectInfiniteHits(InfiniteHits$1);
|
|
11761
11779
|
|
|
11762
|
-
var cx$
|
|
11780
|
+
var cx$f = createClassNames('Menu');
|
|
11763
11781
|
|
|
11764
11782
|
var Menu =
|
|
11765
11783
|
/*#__PURE__*/
|
|
@@ -11781,20 +11799,20 @@ function (_Component) {
|
|
|
11781
11799
|
|
|
11782
11800
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
11783
11801
|
var createURL = _this.props.createURL;
|
|
11784
|
-
var label = _this.props.isFromSearch ?
|
|
11802
|
+
var label = _this.props.isFromSearch ? React.createElement(Highlight, {
|
|
11785
11803
|
attribute: "label",
|
|
11786
11804
|
hit: item
|
|
11787
11805
|
}) : item.label;
|
|
11788
|
-
return
|
|
11789
|
-
className: cx$
|
|
11806
|
+
return React.createElement(Link, {
|
|
11807
|
+
className: cx$f('link'),
|
|
11790
11808
|
onClick: function onClick() {
|
|
11791
11809
|
return _this.selectItem(item, resetQuery);
|
|
11792
11810
|
},
|
|
11793
11811
|
href: createURL(item.value)
|
|
11794
|
-
},
|
|
11795
|
-
className: cx$
|
|
11796
|
-
}, label), ' ',
|
|
11797
|
-
className: cx$
|
|
11812
|
+
}, React.createElement("span", {
|
|
11813
|
+
className: cx$f('label')
|
|
11814
|
+
}, label), ' ', React.createElement("span", {
|
|
11815
|
+
className: cx$f('count')
|
|
11798
11816
|
}, item.count));
|
|
11799
11817
|
});
|
|
11800
11818
|
|
|
@@ -11821,10 +11839,10 @@ function (_Component) {
|
|
|
11821
11839
|
searchable = _this$props.searchable,
|
|
11822
11840
|
canRefine = _this$props.canRefine,
|
|
11823
11841
|
className = _this$props.className;
|
|
11824
|
-
return
|
|
11842
|
+
return React.createElement(List, {
|
|
11825
11843
|
renderItem: this.renderItem,
|
|
11826
11844
|
selectItem: this.selectItem,
|
|
11827
|
-
cx: cx$
|
|
11845
|
+
cx: cx$f,
|
|
11828
11846
|
translate: translate,
|
|
11829
11847
|
items: items,
|
|
11830
11848
|
showMore: showMore,
|
|
@@ -11929,12 +11947,12 @@ var Menu$1 = translatable({
|
|
|
11929
11947
|
*/
|
|
11930
11948
|
|
|
11931
11949
|
var MenuWidget = function MenuWidget(props) {
|
|
11932
|
-
return
|
|
11950
|
+
return React.createElement(PanelWrapper, props, React.createElement(Menu$1, props));
|
|
11933
11951
|
};
|
|
11934
11952
|
|
|
11935
11953
|
connectMenu(MenuWidget);
|
|
11936
11954
|
|
|
11937
|
-
var cx$
|
|
11955
|
+
var cx$e = createClassNames('MenuSelect');
|
|
11938
11956
|
|
|
11939
11957
|
var MenuSelect =
|
|
11940
11958
|
/*#__PURE__*/
|
|
@@ -11971,27 +11989,27 @@ function (_Component) {
|
|
|
11971
11989
|
canRefine = _this$props.canRefine,
|
|
11972
11990
|
translate = _this$props.translate,
|
|
11973
11991
|
className = _this$props.className;
|
|
11974
|
-
return
|
|
11975
|
-
className: classnames(cx$
|
|
11976
|
-
},
|
|
11992
|
+
return React.createElement("div", {
|
|
11993
|
+
className: classnames(cx$e('', !canRefine && '-noRefinement'), className)
|
|
11994
|
+
}, React.createElement("select", {
|
|
11977
11995
|
value: this.selectedValue,
|
|
11978
11996
|
onChange: this.handleSelectChange,
|
|
11979
|
-
className: cx$
|
|
11980
|
-
},
|
|
11997
|
+
className: cx$e('select')
|
|
11998
|
+
}, React.createElement("option", {
|
|
11981
11999
|
value: "ais__see__all__option",
|
|
11982
|
-
className: cx$
|
|
12000
|
+
className: cx$e('option')
|
|
11983
12001
|
}, translate('seeAllOption')), items.map(function (item) {
|
|
11984
|
-
return
|
|
12002
|
+
return React.createElement("option", {
|
|
11985
12003
|
key: item.value,
|
|
11986
12004
|
value: item.value,
|
|
11987
|
-
className: cx$
|
|
12005
|
+
className: cx$e('option')
|
|
11988
12006
|
}, item.label, " (", item.count, ")");
|
|
11989
12007
|
})));
|
|
11990
12008
|
}
|
|
11991
12009
|
}, {
|
|
11992
12010
|
key: "selectedValue",
|
|
11993
12011
|
get: function get() {
|
|
11994
|
-
var _ref2 = find
|
|
12012
|
+
var _ref2 = find(this.props.items, function (item) {
|
|
11995
12013
|
return item.isRefined === true;
|
|
11996
12014
|
}) || {
|
|
11997
12015
|
value: 'ais__see__all__option'
|
|
@@ -12063,12 +12081,12 @@ var MenuSelect$1 = translatable({
|
|
|
12063
12081
|
*/
|
|
12064
12082
|
|
|
12065
12083
|
var MenuSelectWidget = function MenuSelectWidget(props) {
|
|
12066
|
-
return
|
|
12084
|
+
return React.createElement(PanelWrapper, props, React.createElement(MenuSelect$1, props));
|
|
12067
12085
|
};
|
|
12068
12086
|
|
|
12069
12087
|
connectMenu(MenuSelectWidget);
|
|
12070
12088
|
|
|
12071
|
-
var cx$
|
|
12089
|
+
var cx$d = createClassNames('NumericMenu');
|
|
12072
12090
|
|
|
12073
12091
|
var NumericMenu =
|
|
12074
12092
|
/*#__PURE__*/
|
|
@@ -12092,18 +12110,18 @@ function (_Component) {
|
|
|
12092
12110
|
var _this$props = _this.props,
|
|
12093
12111
|
refine = _this$props.refine,
|
|
12094
12112
|
translate = _this$props.translate;
|
|
12095
|
-
return
|
|
12096
|
-
className: cx$
|
|
12097
|
-
},
|
|
12098
|
-
className: cx$
|
|
12113
|
+
return React.createElement("label", {
|
|
12114
|
+
className: cx$d('label')
|
|
12115
|
+
}, React.createElement("input", {
|
|
12116
|
+
className: cx$d('radio'),
|
|
12099
12117
|
type: "radio",
|
|
12100
12118
|
checked: item.isRefined,
|
|
12101
12119
|
disabled: item.noRefinement,
|
|
12102
12120
|
onChange: function onChange() {
|
|
12103
12121
|
return refine(item.value);
|
|
12104
12122
|
}
|
|
12105
|
-
}),
|
|
12106
|
-
className: cx$
|
|
12123
|
+
}), React.createElement("span", {
|
|
12124
|
+
className: cx$d('labelText')
|
|
12107
12125
|
}, item.value === '' ? translate('all') : item.label));
|
|
12108
12126
|
});
|
|
12109
12127
|
|
|
@@ -12117,11 +12135,11 @@ function (_Component) {
|
|
|
12117
12135
|
items = _this$props2.items,
|
|
12118
12136
|
canRefine = _this$props2.canRefine,
|
|
12119
12137
|
className = _this$props2.className;
|
|
12120
|
-
return
|
|
12138
|
+
return React.createElement(List, {
|
|
12121
12139
|
renderItem: this.renderItem,
|
|
12122
12140
|
showMore: false,
|
|
12123
12141
|
canRefine: canRefine,
|
|
12124
|
-
cx: cx$
|
|
12142
|
+
cx: cx$d,
|
|
12125
12143
|
items: items.map(function (item) {
|
|
12126
12144
|
return _objectSpread({}, item, {
|
|
12127
12145
|
key: item.value
|
|
@@ -12203,7 +12221,7 @@ var NumericMenu$1 = translatable({
|
|
|
12203
12221
|
*/
|
|
12204
12222
|
|
|
12205
12223
|
var NumericMenuWidget = function NumericMenuWidget(props) {
|
|
12206
|
-
return
|
|
12224
|
+
return React.createElement(PanelWrapper, props, React.createElement(NumericMenu$1, props));
|
|
12207
12225
|
};
|
|
12208
12226
|
|
|
12209
12227
|
connectNumericMenu(NumericMenuWidget);
|
|
@@ -12228,15 +12246,15 @@ function (_Component) {
|
|
|
12228
12246
|
items = _this$props.items,
|
|
12229
12247
|
onSelect = _this$props.onSelect,
|
|
12230
12248
|
canRefine = _this$props.canRefine;
|
|
12231
|
-
return
|
|
12249
|
+
return React.createElement("ul", {
|
|
12232
12250
|
className: cx('list', !canRefine && 'list--noRefinement')
|
|
12233
12251
|
}, items.map(function (item) {
|
|
12234
|
-
return
|
|
12252
|
+
return React.createElement("li", {
|
|
12235
12253
|
key: item.key === undefined ? item.value : item.key,
|
|
12236
12254
|
className: cx('item', item.selected && !item.disabled && 'item--selected', item.disabled && 'item--disabled', item.modifier)
|
|
12237
|
-
}, item.disabled ?
|
|
12255
|
+
}, item.disabled ? React.createElement("span", {
|
|
12238
12256
|
className: cx('link')
|
|
12239
|
-
}, item.label === undefined ? item.value : item.label) :
|
|
12257
|
+
}, item.label === undefined ? item.value : item.label) : React.createElement(Link, {
|
|
12240
12258
|
className: cx('link', item.selected && 'link--selected'),
|
|
12241
12259
|
"aria-label": item.ariaLabel,
|
|
12242
12260
|
href: createURL(item.value),
|
|
@@ -12266,7 +12284,7 @@ _defineProperty(LinkList, "propTypes", {
|
|
|
12266
12284
|
canRefine: PropTypes.bool.isRequired
|
|
12267
12285
|
});
|
|
12268
12286
|
|
|
12269
|
-
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)
|
|
12270
12288
|
|
|
12271
12289
|
function calculateSize(padding, maxPages) {
|
|
12272
12290
|
return Math.min(2 * padding + 1, maxPages);
|
|
@@ -12302,7 +12320,7 @@ function getPages(currentPage, maxPages, padding) {
|
|
|
12302
12320
|
});
|
|
12303
12321
|
}
|
|
12304
12322
|
|
|
12305
|
-
var Pagination =
|
|
12323
|
+
var Pagination$1 =
|
|
12306
12324
|
/*#__PURE__*/
|
|
12307
12325
|
function (_Component) {
|
|
12308
12326
|
_inherits(Pagination, _Component);
|
|
@@ -12408,10 +12426,10 @@ function (_Component) {
|
|
|
12408
12426
|
});
|
|
12409
12427
|
}
|
|
12410
12428
|
|
|
12411
|
-
return
|
|
12412
|
-
className: classnames(cx$
|
|
12413
|
-
},
|
|
12414
|
-
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,
|
|
12415
12433
|
items: items,
|
|
12416
12434
|
onSelect: refine,
|
|
12417
12435
|
createURL: createURL,
|
|
@@ -12423,7 +12441,7 @@ function (_Component) {
|
|
|
12423
12441
|
return Pagination;
|
|
12424
12442
|
}(Component);
|
|
12425
12443
|
|
|
12426
|
-
_defineProperty(Pagination, "propTypes", {
|
|
12444
|
+
_defineProperty(Pagination$1, "propTypes", {
|
|
12427
12445
|
nbPages: PropTypes.number.isRequired,
|
|
12428
12446
|
currentRefinement: PropTypes.number.isRequired,
|
|
12429
12447
|
refine: PropTypes.func.isRequired,
|
|
@@ -12440,7 +12458,7 @@ _defineProperty(Pagination, "propTypes", {
|
|
|
12440
12458
|
className: PropTypes.string
|
|
12441
12459
|
});
|
|
12442
12460
|
|
|
12443
|
-
_defineProperty(Pagination, "defaultProps", {
|
|
12461
|
+
_defineProperty(Pagination$1, "defaultProps", {
|
|
12444
12462
|
listComponent: LinkList,
|
|
12445
12463
|
showFirst: true,
|
|
12446
12464
|
showPrevious: true,
|
|
@@ -12451,7 +12469,7 @@ _defineProperty(Pagination, "defaultProps", {
|
|
|
12451
12469
|
className: ''
|
|
12452
12470
|
});
|
|
12453
12471
|
|
|
12454
|
-
var Pagination$
|
|
12472
|
+
var Pagination$2 = translatable({
|
|
12455
12473
|
previous: '‹',
|
|
12456
12474
|
next: '›',
|
|
12457
12475
|
first: '«',
|
|
@@ -12466,7 +12484,7 @@ var Pagination$1 = translatable({
|
|
|
12466
12484
|
ariaPage: function ariaPage(currentRefinement) {
|
|
12467
12485
|
return "Page ".concat(currentRefinement.toString());
|
|
12468
12486
|
}
|
|
12469
|
-
})(Pagination);
|
|
12487
|
+
})(Pagination$1);
|
|
12470
12488
|
|
|
12471
12489
|
/**
|
|
12472
12490
|
* The Pagination widget displays a simple pagination system allowing the user to
|
|
@@ -12523,23 +12541,23 @@ var Pagination$1 = translatable({
|
|
|
12523
12541
|
*/
|
|
12524
12542
|
|
|
12525
12543
|
var PaginationWidget = function PaginationWidget(props) {
|
|
12526
|
-
return
|
|
12544
|
+
return React.createElement(PanelWrapper, props, React.createElement(Pagination$2, props));
|
|
12527
12545
|
};
|
|
12528
12546
|
|
|
12529
|
-
var Pagination
|
|
12547
|
+
var Pagination = connectPagination(PaginationWidget);
|
|
12530
12548
|
|
|
12531
|
-
var cx$
|
|
12549
|
+
var cx$b = createClassNames('PoweredBy');
|
|
12532
12550
|
/* eslint-disable max-len */
|
|
12533
12551
|
|
|
12534
12552
|
var AlgoliaLogo = function AlgoliaLogo() {
|
|
12535
|
-
return
|
|
12553
|
+
return React.createElement("svg", {
|
|
12536
12554
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12537
12555
|
baseProfile: "basic",
|
|
12538
12556
|
viewBox: "0 0 1366 362",
|
|
12539
12557
|
width: "100",
|
|
12540
12558
|
height: "27",
|
|
12541
|
-
className: cx$
|
|
12542
|
-
},
|
|
12559
|
+
className: cx$b('logo')
|
|
12560
|
+
}, React.createElement("linearGradient", {
|
|
12543
12561
|
id: "g",
|
|
12544
12562
|
x1: "428.258",
|
|
12545
12563
|
x2: "434.145",
|
|
@@ -12547,19 +12565,19 @@ var AlgoliaLogo = function AlgoliaLogo() {
|
|
|
12547
12565
|
y2: "409.85",
|
|
12548
12566
|
gradientUnits: "userSpaceOnUse",
|
|
12549
12567
|
gradientTransform: "matrix(94.045 0 0 -94.072 -40381.527 38479.52)"
|
|
12550
|
-
},
|
|
12568
|
+
}, React.createElement("stop", {
|
|
12551
12569
|
offset: "0",
|
|
12552
12570
|
stopColor: "#00AEFF"
|
|
12553
|
-
}),
|
|
12571
|
+
}), React.createElement("stop", {
|
|
12554
12572
|
offset: "1",
|
|
12555
12573
|
stopColor: "#3369E7"
|
|
12556
|
-
})),
|
|
12574
|
+
})), React.createElement("path", {
|
|
12557
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",
|
|
12558
12576
|
fill: "url(#g)"
|
|
12559
|
-
}),
|
|
12577
|
+
}), React.createElement("path", {
|
|
12560
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",
|
|
12561
12579
|
fill: "#FFFFFF"
|
|
12562
|
-
}),
|
|
12580
|
+
}), React.createElement("path", {
|
|
12563
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",
|
|
12564
12582
|
fill: "#182359"
|
|
12565
12583
|
}));
|
|
@@ -12585,17 +12603,17 @@ function (_Component) {
|
|
|
12585
12603
|
url = _this$props.url,
|
|
12586
12604
|
translate = _this$props.translate,
|
|
12587
12605
|
className = _this$props.className;
|
|
12588
|
-
return
|
|
12589
|
-
className: classnames(cx$
|
|
12590
|
-
},
|
|
12591
|
-
className: cx$
|
|
12592
|
-
}, 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", {
|
|
12593
12611
|
href: url,
|
|
12594
12612
|
target: "_blank",
|
|
12595
|
-
className: cx$
|
|
12613
|
+
className: cx$b('link'),
|
|
12596
12614
|
"aria-label": "Algolia",
|
|
12597
12615
|
rel: "noopener noreferrer"
|
|
12598
|
-
},
|
|
12616
|
+
}, React.createElement(AlgoliaLogo, null)));
|
|
12599
12617
|
}
|
|
12600
12618
|
}]);
|
|
12601
12619
|
|
|
@@ -12645,7 +12663,7 @@ var PoweredBy$1 = translatable({
|
|
|
12645
12663
|
|
|
12646
12664
|
connectPoweredBy(PoweredBy$1);
|
|
12647
12665
|
|
|
12648
|
-
var cx$
|
|
12666
|
+
var cx$a = createClassNames('RangeInput');
|
|
12649
12667
|
var RawRangeInput =
|
|
12650
12668
|
/*#__PURE__*/
|
|
12651
12669
|
function (_Component) {
|
|
@@ -12724,13 +12742,13 @@ function (_Component) {
|
|
|
12724
12742
|
max = _this$normalizeRangeF.max;
|
|
12725
12743
|
|
|
12726
12744
|
var step = 1 / Math.pow(10, precision);
|
|
12727
|
-
return
|
|
12728
|
-
className: classnames(cx$
|
|
12729
|
-
},
|
|
12730
|
-
className: cx$
|
|
12745
|
+
return React.createElement("div", {
|
|
12746
|
+
className: classnames(cx$a('', !canRefine && '-noRefinement'), className)
|
|
12747
|
+
}, React.createElement("form", {
|
|
12748
|
+
className: cx$a('form'),
|
|
12731
12749
|
onSubmit: this.onSubmit
|
|
12732
|
-
},
|
|
12733
|
-
className: cx$
|
|
12750
|
+
}, React.createElement("input", {
|
|
12751
|
+
className: cx$a('input', 'input--min'),
|
|
12734
12752
|
type: "number",
|
|
12735
12753
|
min: min,
|
|
12736
12754
|
max: max,
|
|
@@ -12743,10 +12761,10 @@ function (_Component) {
|
|
|
12743
12761
|
from: e.currentTarget.value
|
|
12744
12762
|
});
|
|
12745
12763
|
}
|
|
12746
|
-
}),
|
|
12747
|
-
className: cx$
|
|
12748
|
-
}, translate('separator')),
|
|
12749
|
-
className: cx$
|
|
12764
|
+
}), React.createElement("span", {
|
|
12765
|
+
className: cx$a('separator')
|
|
12766
|
+
}, translate('separator')), React.createElement("input", {
|
|
12767
|
+
className: cx$a('input', 'input--max'),
|
|
12750
12768
|
type: "number",
|
|
12751
12769
|
min: min,
|
|
12752
12770
|
max: max,
|
|
@@ -12759,8 +12777,8 @@ function (_Component) {
|
|
|
12759
12777
|
to: e.currentTarget.value
|
|
12760
12778
|
});
|
|
12761
12779
|
}
|
|
12762
|
-
}),
|
|
12763
|
-
className: cx$
|
|
12780
|
+
}), React.createElement("button", {
|
|
12781
|
+
className: cx$a('submit'),
|
|
12764
12782
|
type: "submit"
|
|
12765
12783
|
}, translate('submit'))));
|
|
12766
12784
|
}
|
|
@@ -12836,12 +12854,12 @@ var RangeInput = translatable({
|
|
|
12836
12854
|
*/
|
|
12837
12855
|
|
|
12838
12856
|
var RangeInputWidget = function RangeInputWidget(props) {
|
|
12839
|
-
return
|
|
12857
|
+
return React.createElement(PanelWrapper, props, React.createElement(RangeInput, props));
|
|
12840
12858
|
};
|
|
12841
12859
|
|
|
12842
12860
|
connectRange(RangeInputWidget);
|
|
12843
12861
|
|
|
12844
|
-
var cx$
|
|
12862
|
+
var cx$9 = createClassNames('RatingMenu');
|
|
12845
12863
|
|
|
12846
12864
|
var RatingMenu =
|
|
12847
12865
|
/*#__PURE__*/
|
|
@@ -12892,14 +12910,14 @@ function (_Component) {
|
|
|
12892
12910
|
rating++;
|
|
12893
12911
|
}
|
|
12894
12912
|
|
|
12895
|
-
icons.push([
|
|
12913
|
+
icons.push([React.createElement("svg", {
|
|
12896
12914
|
key: icon,
|
|
12897
|
-
className: cx$
|
|
12915
|
+
className: cx$9('starIcon', icon >= lowerBound ? 'starIcon--empty' : 'starIcon--full'),
|
|
12898
12916
|
"aria-hidden": "true",
|
|
12899
12917
|
width: "24",
|
|
12900
12918
|
height: "24"
|
|
12901
|
-
},
|
|
12902
|
-
xlinkHref: "#".concat(cx$
|
|
12919
|
+
}, React.createElement("use", {
|
|
12920
|
+
xlinkHref: "#".concat(cx$9(icon >= lowerBound ? 'starEmptySymbol' : 'starSymbol'))
|
|
12903
12921
|
})), ' ']);
|
|
12904
12922
|
} // The last item of the list (the default item), should not
|
|
12905
12923
|
// be clickable if it is selected.
|
|
@@ -12913,17 +12931,17 @@ function (_Component) {
|
|
|
12913
12931
|
}),
|
|
12914
12932
|
onClick: this.onClick.bind(this, lowerBound, max)
|
|
12915
12933
|
};
|
|
12916
|
-
return
|
|
12934
|
+
return React.createElement("li", {
|
|
12917
12935
|
key: lowerBound,
|
|
12918
|
-
className: cx$
|
|
12919
|
-
},
|
|
12920
|
-
className: cx$
|
|
12936
|
+
className: cx$9('item', selected && 'item--selected', disabled && 'item--disabled')
|
|
12937
|
+
}, React.createElement("a", _extends({
|
|
12938
|
+
className: cx$9('link'),
|
|
12921
12939
|
"aria-label": "".concat(rating).concat(translate('ratingLabel'))
|
|
12922
|
-
}, onClickHandler), icons,
|
|
12923
|
-
className: cx$
|
|
12940
|
+
}, onClickHandler), icons, React.createElement("span", {
|
|
12941
|
+
className: cx$9('label'),
|
|
12924
12942
|
"aria-hidden": "true"
|
|
12925
|
-
}, translate('ratingLabel')), ' ',
|
|
12926
|
-
className: cx$
|
|
12943
|
+
}, translate('ratingLabel')), ' ', React.createElement("span", {
|
|
12944
|
+
className: cx$9('count')
|
|
12927
12945
|
}, count)));
|
|
12928
12946
|
}
|
|
12929
12947
|
}, {
|
|
@@ -12955,7 +12973,7 @@ function (_Component) {
|
|
|
12955
12973
|
start: 0,
|
|
12956
12974
|
end: Math.max(inclusiveLength, 0)
|
|
12957
12975
|
}).map(function (index) {
|
|
12958
|
-
var element = find
|
|
12976
|
+
var element = find(values, function (item) {
|
|
12959
12977
|
return item.value === limitMax - index;
|
|
12960
12978
|
});
|
|
12961
12979
|
var placeholder = {
|
|
@@ -12978,25 +12996,25 @@ function (_Component) {
|
|
|
12978
12996
|
createURL: createURL
|
|
12979
12997
|
});
|
|
12980
12998
|
});
|
|
12981
|
-
return
|
|
12982
|
-
className: classnames(cx$
|
|
12983
|
-
},
|
|
12999
|
+
return React.createElement("div", {
|
|
13000
|
+
className: classnames(cx$9('', !canRefine && '-noRefinement'), className)
|
|
13001
|
+
}, React.createElement("svg", {
|
|
12984
13002
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12985
13003
|
style: {
|
|
12986
13004
|
display: 'none'
|
|
12987
13005
|
}
|
|
12988
|
-
},
|
|
12989
|
-
id: cx$
|
|
13006
|
+
}, React.createElement("symbol", {
|
|
13007
|
+
id: cx$9('starSymbol'),
|
|
12990
13008
|
viewBox: "0 0 24 24"
|
|
12991
|
-
},
|
|
13009
|
+
}, React.createElement("path", {
|
|
12992
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"
|
|
12993
|
-
})),
|
|
12994
|
-
id: cx$
|
|
13011
|
+
})), React.createElement("symbol", {
|
|
13012
|
+
id: cx$9('starEmptySymbol'),
|
|
12995
13013
|
viewBox: "0 0 24 24"
|
|
12996
|
-
},
|
|
13014
|
+
}, React.createElement("path", {
|
|
12997
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"
|
|
12998
|
-
}))),
|
|
12999
|
-
className: cx$
|
|
13016
|
+
}))), React.createElement("ul", {
|
|
13017
|
+
className: cx$9('list', !canRefine && 'list--noRefinement')
|
|
13000
13018
|
}, items));
|
|
13001
13019
|
}
|
|
13002
13020
|
}]);
|
|
@@ -13079,12 +13097,12 @@ var RatingMenu$1 = translatable({
|
|
|
13079
13097
|
*/
|
|
13080
13098
|
|
|
13081
13099
|
var RatingMenuWidget = function RatingMenuWidget(props) {
|
|
13082
|
-
return
|
|
13100
|
+
return React.createElement(PanelWrapper, props, React.createElement(RatingMenu$1, props));
|
|
13083
13101
|
};
|
|
13084
13102
|
|
|
13085
13103
|
connectRange(RatingMenuWidget);
|
|
13086
13104
|
|
|
13087
|
-
var cx$
|
|
13105
|
+
var cx$8 = createClassNames('RefinementList');
|
|
13088
13106
|
|
|
13089
13107
|
var RefinementList$1 =
|
|
13090
13108
|
/*#__PURE__*/
|
|
@@ -13115,23 +13133,23 @@ function (_Component) {
|
|
|
13115
13133
|
});
|
|
13116
13134
|
|
|
13117
13135
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
13118
|
-
var label = _this.props.isFromSearch ?
|
|
13136
|
+
var label = _this.props.isFromSearch ? React.createElement(Highlight, {
|
|
13119
13137
|
attribute: "label",
|
|
13120
13138
|
hit: item
|
|
13121
13139
|
}) : item.label;
|
|
13122
|
-
return
|
|
13123
|
-
className: cx$
|
|
13124
|
-
},
|
|
13125
|
-
className: cx$
|
|
13140
|
+
return React.createElement("label", {
|
|
13141
|
+
className: cx$8('label')
|
|
13142
|
+
}, React.createElement("input", {
|
|
13143
|
+
className: cx$8('checkbox'),
|
|
13126
13144
|
type: "checkbox",
|
|
13127
13145
|
checked: item.isRefined,
|
|
13128
13146
|
onChange: function onChange() {
|
|
13129
13147
|
return _this.selectItem(item, resetQuery);
|
|
13130
13148
|
}
|
|
13131
|
-
}),
|
|
13132
|
-
className: cx$
|
|
13133
|
-
}, label), ' ',
|
|
13134
|
-
className: cx$
|
|
13149
|
+
}), React.createElement("span", {
|
|
13150
|
+
className: cx$8('labelText')
|
|
13151
|
+
}, label), ' ', React.createElement("span", {
|
|
13152
|
+
className: cx$8('count')
|
|
13135
13153
|
}, item.count.toLocaleString()));
|
|
13136
13154
|
});
|
|
13137
13155
|
|
|
@@ -13152,10 +13170,10 @@ function (_Component) {
|
|
|
13152
13170
|
searchable = _this$props.searchable,
|
|
13153
13171
|
canRefine = _this$props.canRefine,
|
|
13154
13172
|
className = _this$props.className;
|
|
13155
|
-
return
|
|
13173
|
+
return React.createElement(List, {
|
|
13156
13174
|
renderItem: this.renderItem,
|
|
13157
13175
|
selectItem: this.selectItem,
|
|
13158
|
-
cx: cx$
|
|
13176
|
+
cx: cx$8,
|
|
13159
13177
|
translate: translate,
|
|
13160
13178
|
items: items,
|
|
13161
13179
|
showMore: showMore,
|
|
@@ -13264,12 +13282,12 @@ var RefinementList$2 = translatable({
|
|
|
13264
13282
|
*/
|
|
13265
13283
|
|
|
13266
13284
|
var RefinementListWidget = function RefinementListWidget(props) {
|
|
13267
|
-
return
|
|
13285
|
+
return React.createElement(PanelWrapper, props, React.createElement(RefinementList$2, props));
|
|
13268
13286
|
};
|
|
13269
13287
|
|
|
13270
|
-
var RefinementList
|
|
13288
|
+
var RefinementList = connectRefinementList(RefinementListWidget);
|
|
13271
13289
|
|
|
13272
|
-
var cx$
|
|
13290
|
+
var cx$7 = createClassNames('ScrollTo');
|
|
13273
13291
|
|
|
13274
13292
|
var ScrollTo =
|
|
13275
13293
|
/*#__PURE__*/
|
|
@@ -13298,11 +13316,11 @@ function (_Component) {
|
|
|
13298
13316
|
value: function render() {
|
|
13299
13317
|
var _this = this;
|
|
13300
13318
|
|
|
13301
|
-
return
|
|
13319
|
+
return React.createElement("div", {
|
|
13302
13320
|
ref: function ref(_ref) {
|
|
13303
13321
|
return _this.el = _ref;
|
|
13304
13322
|
},
|
|
13305
|
-
className: cx$
|
|
13323
|
+
className: cx$7('')
|
|
13306
13324
|
}, this.props.children);
|
|
13307
13325
|
}
|
|
13308
13326
|
}]);
|
|
@@ -13396,14 +13414,14 @@ connectScrollTo(ScrollTo);
|
|
|
13396
13414
|
* );
|
|
13397
13415
|
*/
|
|
13398
13416
|
|
|
13399
|
-
var SearchBox
|
|
13417
|
+
var SearchBox = connectSearchBox(SearchBox$2);
|
|
13400
13418
|
|
|
13401
|
-
var cx$
|
|
13419
|
+
var cx$6 = createClassNames('Snippet');
|
|
13402
13420
|
|
|
13403
13421
|
var Snippet = function Snippet(props) {
|
|
13404
|
-
return
|
|
13422
|
+
return React.createElement(Highlighter, _extends({}, props, {
|
|
13405
13423
|
highlightProperty: "_snippetResult",
|
|
13406
|
-
cx: cx$
|
|
13424
|
+
cx: cx$6
|
|
13407
13425
|
}));
|
|
13408
13426
|
};
|
|
13409
13427
|
|
|
@@ -13453,11 +13471,11 @@ var Snippet = function Snippet(props) {
|
|
|
13453
13471
|
|
|
13454
13472
|
connectHighlight(Snippet);
|
|
13455
13473
|
|
|
13456
|
-
var cx$
|
|
13474
|
+
var cx$5 = createClassNames('RelevantSort');
|
|
13457
13475
|
|
|
13458
13476
|
var DefaultButtonTextComponent = function DefaultButtonTextComponent(_ref) {
|
|
13459
13477
|
var isRelevantSorted = _ref.isRelevantSorted;
|
|
13460
|
-
return
|
|
13478
|
+
return React.createElement("span", null, isRelevantSorted ? 'See all results' : 'See relevant results');
|
|
13461
13479
|
};
|
|
13462
13480
|
|
|
13463
13481
|
var RelevantSort = function RelevantSort(_ref2) {
|
|
@@ -13469,18 +13487,18 @@ var RelevantSort = function RelevantSort(_ref2) {
|
|
|
13469
13487
|
ButtonTextComponent = _ref2$buttonTextCompo === void 0 ? DefaultButtonTextComponent : _ref2$buttonTextCompo,
|
|
13470
13488
|
TextComponent = _ref2.textComponent,
|
|
13471
13489
|
refine = _ref2.refine;
|
|
13472
|
-
return !isVirtualReplica ? null :
|
|
13473
|
-
className: classnames(cx$
|
|
13474
|
-
},
|
|
13475
|
-
className: cx$
|
|
13476
|
-
}, 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, {
|
|
13477
13495
|
isRelevantSorted: isRelevantSorted
|
|
13478
|
-
})),
|
|
13479
|
-
className: cx$
|
|
13496
|
+
})), React.createElement("button", {
|
|
13497
|
+
className: cx$5('button'),
|
|
13480
13498
|
onClick: function onClick() {
|
|
13481
13499
|
return refine(isRelevantSorted ? 0 : undefined);
|
|
13482
13500
|
}
|
|
13483
|
-
},
|
|
13501
|
+
}, React.createElement(ButtonTextComponent, {
|
|
13484
13502
|
isRelevantSorted: isRelevantSorted
|
|
13485
13503
|
})));
|
|
13486
13504
|
};
|
|
@@ -13496,7 +13514,7 @@ RelevantSort.propTypes = {
|
|
|
13496
13514
|
|
|
13497
13515
|
connectRelevantSort(RelevantSort);
|
|
13498
13516
|
|
|
13499
|
-
var cx$
|
|
13517
|
+
var cx$4 = createClassNames('SortBy');
|
|
13500
13518
|
|
|
13501
13519
|
var SortBy =
|
|
13502
13520
|
/*#__PURE__*/
|
|
@@ -13517,10 +13535,10 @@ function (_Component) {
|
|
|
13517
13535
|
currentRefinement = _this$props.currentRefinement,
|
|
13518
13536
|
refine = _this$props.refine,
|
|
13519
13537
|
className = _this$props.className;
|
|
13520
|
-
return
|
|
13521
|
-
className: classnames(cx$
|
|
13522
|
-
},
|
|
13523
|
-
cx: cx$
|
|
13538
|
+
return React.createElement("div", {
|
|
13539
|
+
className: classnames(cx$4(''), className)
|
|
13540
|
+
}, React.createElement(Select, {
|
|
13541
|
+
cx: cx$4,
|
|
13524
13542
|
items: items,
|
|
13525
13543
|
selectedItem: currentRefinement,
|
|
13526
13544
|
onSelect: refine
|
|
@@ -13586,7 +13604,7 @@ _defineProperty(SortBy, "defaultProps", {
|
|
|
13586
13604
|
|
|
13587
13605
|
connectSortBy(SortBy);
|
|
13588
13606
|
|
|
13589
|
-
var cx$
|
|
13607
|
+
var cx$3 = createClassNames('Stats');
|
|
13590
13608
|
|
|
13591
13609
|
var Stats = function Stats(_ref) {
|
|
13592
13610
|
var _ref$className = _ref.className,
|
|
@@ -13596,10 +13614,10 @@ var Stats = function Stats(_ref) {
|
|
|
13596
13614
|
nbSortedHits = _ref.nbSortedHits,
|
|
13597
13615
|
processingTimeMS = _ref.processingTimeMS,
|
|
13598
13616
|
translate = _ref.translate;
|
|
13599
|
-
return
|
|
13600
|
-
className: classnames(cx$
|
|
13601
|
-
},
|
|
13602
|
-
className: cx$
|
|
13617
|
+
return React.createElement("div", {
|
|
13618
|
+
className: classnames(cx$3(''), className)
|
|
13619
|
+
}, React.createElement("span", {
|
|
13620
|
+
className: cx$3('text')
|
|
13603
13621
|
}, translate('stats', nbHits, processingTimeMS, nbSortedHits, areHitsSorted)));
|
|
13604
13622
|
};
|
|
13605
13623
|
|
|
@@ -13647,7 +13665,7 @@ var Stats$1 = translatable({
|
|
|
13647
13665
|
|
|
13648
13666
|
connectStats(Stats$1);
|
|
13649
13667
|
|
|
13650
|
-
var cx$
|
|
13668
|
+
var cx$2 = createClassNames('ToggleRefinement');
|
|
13651
13669
|
|
|
13652
13670
|
var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
13653
13671
|
var currentRefinement = _ref.currentRefinement,
|
|
@@ -13655,19 +13673,19 @@ var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
|
13655
13673
|
canRefine = _ref.canRefine,
|
|
13656
13674
|
refine = _ref.refine,
|
|
13657
13675
|
className = _ref.className;
|
|
13658
|
-
return
|
|
13659
|
-
className: classnames(cx$
|
|
13660
|
-
},
|
|
13661
|
-
className: cx$
|
|
13662
|
-
},
|
|
13663
|
-
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'),
|
|
13664
13682
|
type: "checkbox",
|
|
13665
13683
|
checked: currentRefinement,
|
|
13666
13684
|
onChange: function onChange(event) {
|
|
13667
13685
|
return refine(event.target.checked);
|
|
13668
13686
|
}
|
|
13669
|
-
}),
|
|
13670
|
-
className: cx$
|
|
13687
|
+
}), React.createElement("span", {
|
|
13688
|
+
className: cx$2('labelText')
|
|
13671
13689
|
}, label)));
|
|
13672
13690
|
};
|
|
13673
13691
|
|
|
@@ -13876,11 +13894,11 @@ function createVoiceSearchHelper(_ref) {
|
|
|
13876
13894
|
};
|
|
13877
13895
|
}
|
|
13878
13896
|
|
|
13879
|
-
var cx$
|
|
13897
|
+
var cx$1 = createClassNames('VoiceSearch');
|
|
13880
13898
|
|
|
13881
13899
|
var ButtonSvg = function ButtonSvg(_ref) {
|
|
13882
13900
|
var children = _ref.children;
|
|
13883
|
-
return
|
|
13901
|
+
return React.createElement("svg", {
|
|
13884
13902
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13885
13903
|
width: "16",
|
|
13886
13904
|
height: "16",
|
|
@@ -13897,36 +13915,36 @@ var DefaultButtonText = function DefaultButtonText(_ref2) {
|
|
|
13897
13915
|
var status = _ref2.status,
|
|
13898
13916
|
errorCode = _ref2.errorCode,
|
|
13899
13917
|
isListening = _ref2.isListening;
|
|
13900
|
-
return status === 'error' && errorCode === 'not-allowed' ?
|
|
13918
|
+
return status === 'error' && errorCode === 'not-allowed' ? React.createElement(ButtonSvg, null, React.createElement("line", {
|
|
13901
13919
|
x1: "1",
|
|
13902
13920
|
y1: "1",
|
|
13903
13921
|
x2: "23",
|
|
13904
13922
|
y2: "23"
|
|
13905
|
-
}),
|
|
13923
|
+
}), React.createElement("path", {
|
|
13906
13924
|
d: "M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"
|
|
13907
|
-
}),
|
|
13925
|
+
}), React.createElement("path", {
|
|
13908
13926
|
d: "M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"
|
|
13909
|
-
}),
|
|
13927
|
+
}), React.createElement("line", {
|
|
13910
13928
|
x1: "12",
|
|
13911
13929
|
y1: "19",
|
|
13912
13930
|
x2: "12",
|
|
13913
13931
|
y2: "23"
|
|
13914
|
-
}),
|
|
13932
|
+
}), React.createElement("line", {
|
|
13915
13933
|
x1: "8",
|
|
13916
13934
|
y1: "23",
|
|
13917
13935
|
x2: "16",
|
|
13918
13936
|
y2: "23"
|
|
13919
|
-
})) :
|
|
13937
|
+
})) : React.createElement(ButtonSvg, null, React.createElement("path", {
|
|
13920
13938
|
d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z",
|
|
13921
13939
|
fill: isListening ? 'currentColor' : ''
|
|
13922
|
-
}),
|
|
13940
|
+
}), React.createElement("path", {
|
|
13923
13941
|
d: "M19 10v2a7 7 0 0 1-14 0v-2"
|
|
13924
|
-
}),
|
|
13942
|
+
}), React.createElement("line", {
|
|
13925
13943
|
x1: "12",
|
|
13926
13944
|
y1: "19",
|
|
13927
13945
|
x2: "12",
|
|
13928
13946
|
y2: "23"
|
|
13929
|
-
}),
|
|
13947
|
+
}), React.createElement("line", {
|
|
13930
13948
|
x1: "8",
|
|
13931
13949
|
y1: "23",
|
|
13932
13950
|
x2: "16",
|
|
@@ -13936,7 +13954,7 @@ var DefaultButtonText = function DefaultButtonText(_ref2) {
|
|
|
13936
13954
|
|
|
13937
13955
|
var DefaultStatus = function DefaultStatus(_ref3) {
|
|
13938
13956
|
var transcript = _ref3.transcript;
|
|
13939
|
-
return
|
|
13957
|
+
return React.createElement("p", null, transcript);
|
|
13940
13958
|
};
|
|
13941
13959
|
|
|
13942
13960
|
var VoiceSearch =
|
|
@@ -14021,17 +14039,17 @@ function (_Component) {
|
|
|
14021
14039
|
isSpeechFinal: isSpeechFinal,
|
|
14022
14040
|
isBrowserSupported: isBrowserSupported()
|
|
14023
14041
|
};
|
|
14024
|
-
return
|
|
14025
|
-
className: cx$
|
|
14026
|
-
},
|
|
14027
|
-
className: cx$
|
|
14042
|
+
return React.createElement("div", {
|
|
14043
|
+
className: cx$1('')
|
|
14044
|
+
}, React.createElement("button", {
|
|
14045
|
+
className: cx$1('button'),
|
|
14028
14046
|
type: "button",
|
|
14029
14047
|
title: isBrowserSupported() ? translate('buttonTitle') : translate('disabledButtonTitle'),
|
|
14030
14048
|
onClick: this.onClick,
|
|
14031
14049
|
disabled: !isBrowserSupported()
|
|
14032
|
-
},
|
|
14033
|
-
className: cx$
|
|
14034
|
-
},
|
|
14050
|
+
}, React.createElement(ButtonTextComponent, innerProps)), React.createElement("div", {
|
|
14051
|
+
className: cx$1('status')
|
|
14052
|
+
}, React.createElement(StatusComponent, innerProps)));
|
|
14035
14053
|
}
|
|
14036
14054
|
}, {
|
|
14037
14055
|
key: "componentWillUnmount",
|
|
@@ -14058,14 +14076,14 @@ var VoiceSearch$1 = translatable({
|
|
|
14058
14076
|
|
|
14059
14077
|
connectVoiceSearch(VoiceSearch$1);
|
|
14060
14078
|
|
|
14061
|
-
var cx
|
|
14079
|
+
var cx = createClassNames('QueryRuleCustomData');
|
|
14062
14080
|
|
|
14063
14081
|
var QueryRuleCustomData = function QueryRuleCustomData(_ref) {
|
|
14064
14082
|
var items = _ref.items,
|
|
14065
14083
|
className = _ref.className,
|
|
14066
14084
|
children = _ref.children;
|
|
14067
|
-
return
|
|
14068
|
-
className: classnames(cx
|
|
14085
|
+
return React.createElement("div", {
|
|
14086
|
+
className: classnames(cx(''), className)
|
|
14069
14087
|
}, children({
|
|
14070
14088
|
items: items
|
|
14071
14089
|
}));
|
|
@@ -14078,7 +14096,7 @@ QueryRuleCustomData.propTypes = {
|
|
|
14078
14096
|
};
|
|
14079
14097
|
|
|
14080
14098
|
var QueryRuleCustomDataWidget = function QueryRuleCustomDataWidget(props) {
|
|
14081
|
-
return
|
|
14099
|
+
return React.createElement(PanelWrapper, props, React.createElement(QueryRuleCustomData, props));
|
|
14082
14100
|
};
|
|
14083
14101
|
|
|
14084
14102
|
connectQueryRules(QueryRuleCustomDataWidget);
|
|
@@ -14102,52 +14120,52 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14102
14120
|
|
|
14103
14121
|
var hit = props.hit;
|
|
14104
14122
|
if (moment().isSameOrBefore(props.hit.pubDateSort)) return null;
|
|
14105
|
-
return
|
|
14123
|
+
return React.createElement(
|
|
14106
14124
|
'div',
|
|
14107
14125
|
{ key: hit.url, className: styles.article },
|
|
14108
|
-
|
|
14126
|
+
React.createElement(
|
|
14109
14127
|
'a',
|
|
14110
14128
|
{ href: '/view/' + hit.url, style: this.props.variant === 'right' ? { flexDirection: 'row-reverse' } : {} },
|
|
14111
|
-
|
|
14129
|
+
React.createElement(
|
|
14112
14130
|
'div',
|
|
14113
14131
|
{ className: styles.thumb },
|
|
14114
|
-
|
|
14132
|
+
React.createElement(
|
|
14115
14133
|
'figure',
|
|
14116
14134
|
null,
|
|
14117
|
-
|
|
14135
|
+
React.createElement(
|
|
14118
14136
|
LazyLoad,
|
|
14119
14137
|
null,
|
|
14120
|
-
|
|
14121
|
-
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
|
|
14122
14140
|
})
|
|
14123
14141
|
)
|
|
14124
14142
|
)
|
|
14125
14143
|
),
|
|
14126
|
-
|
|
14144
|
+
React.createElement(
|
|
14127
14145
|
'div',
|
|
14128
14146
|
{ className: styles.info, style: this.props.variant === 'right' ? { padding: '0 1rem 0 0' } : { padding: ' 0 0 0 1rem' } },
|
|
14129
|
-
|
|
14147
|
+
React.createElement(
|
|
14130
14148
|
'h2',
|
|
14131
14149
|
null,
|
|
14132
14150
|
hit.title
|
|
14133
14151
|
),
|
|
14134
|
-
hit.pubDateSort &&
|
|
14152
|
+
hit.pubDateSort && React.createElement(
|
|
14135
14153
|
'p',
|
|
14136
14154
|
{ className: styles.published },
|
|
14137
14155
|
moment(hit.pubDateSort).format('MMMM Do YYYY')
|
|
14138
14156
|
),
|
|
14139
|
-
hit.authorMapping && hit.authorMapping.length > 0 &&
|
|
14157
|
+
hit.authorMapping && hit.authorMapping.length > 0 && React.createElement(
|
|
14140
14158
|
'p',
|
|
14141
14159
|
{ className: styles.author },
|
|
14142
14160
|
hit.authorMapping.map(function (author) {
|
|
14143
|
-
return
|
|
14161
|
+
return React.createElement(
|
|
14144
14162
|
'span',
|
|
14145
14163
|
null,
|
|
14146
14164
|
author.displayName
|
|
14147
14165
|
);
|
|
14148
14166
|
})
|
|
14149
14167
|
),
|
|
14150
|
-
hit.summary &&
|
|
14168
|
+
hit.summary && React.createElement('p', { dangerouslySetInnerHTML: { __html: hit.summary }, className: styles.summary })
|
|
14151
14169
|
)
|
|
14152
14170
|
)
|
|
14153
14171
|
);
|
|
@@ -14161,10 +14179,10 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14161
14179
|
styles: this.props.deckStyles,
|
|
14162
14180
|
client: this.props.sanityClient
|
|
14163
14181
|
};
|
|
14164
|
-
return
|
|
14165
|
-
|
|
14182
|
+
return React.createElement(
|
|
14183
|
+
React.Fragment,
|
|
14166
14184
|
null,
|
|
14167
|
-
|
|
14185
|
+
React.createElement(
|
|
14168
14186
|
InstantSearch,
|
|
14169
14187
|
_extends$1({
|
|
14170
14188
|
searchClient: this.props.searchClient,
|
|
@@ -14175,29 +14193,29 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14175
14193
|
indexName: this.props.indexName,
|
|
14176
14194
|
onSearchParameters: this.props.onSearchParameters
|
|
14177
14195
|
}, this.props),
|
|
14178
|
-
|
|
14179
|
-
|
|
14180
|
-
this.props.refinementAttributes &&
|
|
14196
|
+
React.createElement(Configure, { hitsPerPage: this.props.hitsPerPage || 20 }),
|
|
14197
|
+
React.createElement(SearchBox, null),
|
|
14198
|
+
this.props.refinementAttributes && React.createElement(
|
|
14181
14199
|
'div',
|
|
14182
14200
|
{ className: 'search_refinement' },
|
|
14183
14201
|
this.props.refinementAttributes.map(function (item, index) {
|
|
14184
|
-
return
|
|
14202
|
+
return React.createElement(
|
|
14185
14203
|
DropdownButton,
|
|
14186
14204
|
{ title: item.title },
|
|
14187
|
-
|
|
14205
|
+
React.createElement(RefinementList, { showMore: item.showMore, limit: item.limit, showMoreLimit: item.showMoreLimit, attribute: item.attribute })
|
|
14188
14206
|
);
|
|
14189
14207
|
})
|
|
14190
14208
|
),
|
|
14191
|
-
|
|
14209
|
+
React.createElement(
|
|
14192
14210
|
'div',
|
|
14193
14211
|
{ className: 'AlgoliaResults' },
|
|
14194
|
-
|
|
14212
|
+
React.createElement(Hits, { hitComponent: function hitComponent(hit) {
|
|
14195
14213
|
return _this2.Deck(_extends$1({}, hit, { propsObj: propsObj }));
|
|
14196
14214
|
} })
|
|
14197
14215
|
),
|
|
14198
|
-
|
|
14216
|
+
React.createElement(Pagination, null)
|
|
14199
14217
|
),
|
|
14200
|
-
|
|
14218
|
+
React.createElement(
|
|
14201
14219
|
'style',
|
|
14202
14220
|
{ jsx: 'true' },
|
|
14203
14221
|
'\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 '
|
|
@@ -14207,7 +14225,7 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14207
14225
|
}]);
|
|
14208
14226
|
|
|
14209
14227
|
return AlgoliaSearch;
|
|
14210
|
-
}(
|
|
14228
|
+
}(React.Component);
|
|
14211
14229
|
|
|
14212
14230
|
AlgoliaSearch.propTypes = {
|
|
14213
14231
|
searchState: PropTypes.object,
|