@mjhls/mjh-framework 1.0.850-affiliatefix-v1 → 1.0.850-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +168 -168
- package/dist/cjs/AD.js +9 -10
- package/dist/cjs/AD300x250.js +30 -31
- package/dist/cjs/AD300x250x600.js +30 -31
- package/dist/cjs/AD728x90.js +33 -34
- package/dist/cjs/ADFloatingFooter.js +32 -33
- package/dist/cjs/ADFooter.js +14 -15
- package/dist/cjs/ADGutter.js +32 -33
- package/dist/cjs/{ADInfeed-859820d9.js → ADInfeed-98c71bcd.js} +13 -15
- package/dist/cjs/ADSkyscraper.js +32 -33
- package/dist/cjs/ADSponsoredResources.js +32 -33
- package/dist/cjs/ADWebcast.js +32 -33
- package/dist/cjs/ADWelcome.js +33 -34
- package/dist/cjs/{ADlgInfeed-da3a36a6.js → ADlgInfeed-9de32585.js} +10 -11
- package/dist/cjs/AccordionPanel.js +29 -31
- package/dist/cjs/AdSlot.js +101 -34
- package/dist/cjs/AdSlotsProvider.js +33 -25
- package/dist/cjs/AlgoliaSearch.js +1080 -1076
- package/dist/cjs/AlphabeticList.js +25 -26
- package/dist/cjs/ArticleCarousel.js +23 -24
- package/dist/cjs/ArticleProgramLandingPage.js +58 -60
- package/dist/cjs/ArticleSeriesLandingPage.js +40 -41
- package/dist/cjs/ArticleSeriesListing.js +61 -62
- package/dist/cjs/AuthWrapper.js +423 -1739
- package/dist/cjs/{AuthorComponent-c21aac7f.js → AuthorComponent-bb831b74.js} +13 -14
- package/dist/cjs/Beam.js +8 -8
- package/dist/cjs/{BlockContent-36e54d77.js → BlockContent-091a991f.js} +55 -56
- package/dist/cjs/Breadcrumbs.js +27 -29
- package/dist/cjs/CMEDeck.js +83 -83
- package/dist/cjs/Column1.js +11 -14
- package/dist/cjs/Column2.js +33 -36
- package/dist/cjs/Column3.js +59 -62
- package/dist/cjs/ConferenceArticleCard.js +37 -38
- package/dist/cjs/ConferenceBanner-4a16fddc.js +23 -0
- package/dist/cjs/DeckContent.js +103 -107
- package/dist/cjs/DeckQueue.js +90 -94
- package/dist/cjs/{Dfp-93399f8c.js → Dfp-26baccf1.js} +34 -35
- package/dist/cjs/EventsDeck.js +152 -159
- package/dist/cjs/ExternalResources.js +79 -81
- package/dist/cjs/Feature.js +24 -26
- package/dist/cjs/ForbesHero.js +42 -43
- package/dist/cjs/GridContent.js +304 -190
- package/dist/cjs/GridHero.js +44 -45
- package/dist/cjs/GroupDeck.js +59 -60
- package/dist/cjs/HamMagazine.js +141 -146
- package/dist/cjs/Header.js +12 -14
- package/dist/cjs/Hero.js +12 -13
- package/dist/cjs/HighlightenVideo.js +17 -18
- package/dist/cjs/HorizontalArticleListing.js +71 -73
- package/dist/cjs/HorizontalHero.js +25 -26
- package/dist/cjs/IssueContentDeck.js +73 -78
- package/dist/cjs/IssueDeck.js +72 -77
- package/dist/cjs/IssueLanding.js +92 -96
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/LeftNav.js +39 -41
- package/dist/cjs/MasterDeck.js +80 -81
- package/dist/cjs/MediaSeriesLanding.js +1138 -1230
- package/dist/cjs/NavDvm.js +74 -79
- package/dist/cjs/{NavFooter-3dcd99a8.js → NavFooter-76c913e3.js} +14 -15
- package/dist/cjs/NavMagazine.js +148 -153
- package/dist/cjs/NavNative.js +145 -153
- package/dist/cjs/OncliveHero.js +19 -19
- package/dist/cjs/OncliveLargeHero.js +72 -73
- package/dist/cjs/PageFilter.js +14 -15
- package/dist/cjs/PartnerDetailListing.js +106 -115
- package/dist/cjs/PdfDownload.js +9 -10
- package/dist/cjs/PopUpModal.js +19 -21
- package/dist/cjs/PubSection.js +40 -43
- package/dist/cjs/PubToc.js +15 -16
- package/dist/cjs/PublicationDeck.js +62 -67
- package/dist/cjs/PublicationLanding.js +135 -139
- package/dist/cjs/QueueDeckExpanded.js +2172 -1167
- package/dist/cjs/RecentNews.js +22 -23
- package/dist/cjs/RelatedContent.js +54 -55
- package/dist/cjs/RelatedTopicsDropdown.js +29 -32
- package/dist/cjs/RolesDeck.js +27 -32
- package/dist/cjs/Search.js +18 -22
- package/dist/cjs/Segment.js +368 -343
- package/dist/cjs/SeriesListingDeck.js +38 -38
- package/dist/cjs/{SeriesSlider-34c6cc2b.js → SeriesSlider-8bbc989f.js} +39 -40
- package/dist/cjs/SetCookie.js +1 -1
- package/dist/cjs/SideFooter.js +38 -39
- package/dist/cjs/SocialIcons.js +9 -10
- package/dist/cjs/{SocialSearchComponent-948138c7.js → SocialSearchComponent-cea213aa.js} +36 -40
- package/dist/cjs/SocialShare.js +29 -31
- package/dist/cjs/TaxonomyCard.js +59 -64
- package/dist/cjs/TaxonomyDescription.js +54 -56
- package/dist/cjs/TemplateNormal.js +74 -75
- package/dist/cjs/ThumbnailCard.js +21 -23
- package/dist/cjs/Ustream.js +30 -31
- package/dist/cjs/VerticalHero.js +16 -17
- package/dist/cjs/VideoProgramLandingPage.js +73 -78
- package/dist/cjs/VideoSeriesCard.js +33 -34
- package/dist/cjs/VideoSeriesFilter.js +18 -18
- package/dist/cjs/VideoSeriesLandingPage.js +50 -51
- package/dist/cjs/VideoSeriesListing.js +82 -81
- package/dist/cjs/View.js +342 -266
- package/dist/cjs/YahooHero.js +41 -42
- package/dist/cjs/YoutubeGroup.js +66 -67
- package/dist/cjs/{_is-array-6128bd56.js → _is-array-754e012d.js} +6 -6
- package/dist/cjs/{_iter-detect-55a5657a.js → _iter-detect-60b2f026.js} +8 -8
- package/dist/cjs/{_object-pie-083f2dd6.js → _object-pie-68c5bcbc.js} +4 -4
- package/dist/cjs/{_object-sap-a175b4a9.js → _object-sap-5e74ba08.js} +1 -1
- package/dist/cjs/{_object-to-array-8fe5a54f.js → _object-to-array-5762f850.js} +2 -2
- package/dist/cjs/{_to-object-6de10e57.js → _to-object-329a650b.js} +8 -8
- package/dist/cjs/{asyncToGenerator-58c289d9.js → asyncToGenerator-140e5f89.js} +32 -32
- package/dist/cjs/{brightcove-react-player-loader.es-a195642e.js → brightcove-react-player-loader.es-156bd4d6.js} +9 -11
- package/dist/cjs/{core.get-iterator-method-f474eacc.js → core.get-iterator-method-f62321d4.js} +2 -2
- package/dist/cjs/{debounce-d4a2369b.js → debounce-529c8d06.js} +2 -2
- package/dist/cjs/{define-property-c88be878.js → define-property-f4d12f4e.js} +6 -6
- package/dist/cjs/{defineProperty-0cb76d99.js → defineProperty-55548b25.js} +1 -1
- package/dist/cjs/{entities-3f9d0f2f.js → entities-310b46ee.js} +1 -1
- package/dist/cjs/{eq-5fc26c07.js → eq-bb2843ed.js} +1 -1
- package/dist/cjs/{es6.string.iterator-c2573ffd.js → es6.string.iterator-cc0bbaa4.js} +6 -6
- package/dist/cjs/{extends-29bdbc6d.js → extends-0a918631.js} +7 -7
- package/dist/cjs/faundadb.js +327 -10
- package/dist/cjs/{get-5839e5b5.js → get-adbb11e3.js} +21 -21
- package/dist/cjs/getQuery.js +2 -2
- package/dist/cjs/getRelatedArticle.js +28 -445
- package/dist/cjs/getRootDocGroup.js +6 -6
- package/dist/cjs/getSerializers.js +44 -45
- package/dist/cjs/{getTargeting-be6168ad.js → getTargeting-f1821260.js} +26 -17
- package/dist/cjs/getTargeting.js +8 -8
- package/dist/{esm/iconBase-ccc56b97.js → cjs/iconBase-68959171.js} +8 -2
- package/dist/cjs/{index-f86bb269.js → index-3294d3bc.js} +45 -44
- package/dist/cjs/{index-060c5d65.js → index-4151deb3.js} +1615 -1009
- package/dist/cjs/{index-eadd5035.js → index-96b3db50.js} +15 -17
- package/dist/cjs/{index-fc2f1ca2.js → index-98e01cb9.js} +12 -13
- package/dist/cjs/{index-efca863c.js → index-be0c82be.js} +30 -36
- package/dist/cjs/{index-50be6759.js → index-e2e62963.js} +10 -26
- package/dist/cjs/{index.es-f3e47207.js → index.es-9110add6.js} +12 -31
- package/dist/cjs/{index.esm-2bb721c8.js → index.esm-4d410430.js} +21 -21
- package/dist/cjs/{index.esm-00a6aade.js → index.esm-90433435.js} +16 -7
- package/dist/cjs/{index.esm-c1e16606.js → index.esm-e32d3e8e.js} +7 -4
- package/dist/cjs/{index.esm-f27f80d9.js → index.esm-ff47db6f.js} +13 -6
- package/dist/cjs/index.js +158 -170
- package/dist/cjs/{inherits-c2065b95.js → inherits-9953db94.js} +22 -22
- package/dist/cjs/{isSymbol-03abbdf0.js → isSymbol-04666465.js} +15 -15
- package/dist/cjs/keys-a586b7a0.js +25 -0
- package/dist/cjs/{lodash-f0783643.js → lodash-fc2922d0.js} +31 -128
- package/dist/cjs/main-02daeefe.js +862 -0
- package/dist/cjs/{moment-aca40de1.js → moment-575fe24c.js} +9 -11
- package/dist/cjs/{react-social-icons-af932527.js → react-social-icons-f7f48f71.js} +27 -28
- package/dist/cjs/{slicedToArray-5d1bc3b3.js → slicedToArray-8f385299.js} +14 -14
- package/dist/cjs/{smoothscroll-99df7f93.js → smoothscroll-5054361f.js} +1 -1
- package/dist/cjs/stringify-7c5aff47.js +17 -0
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-ddb70795.js → toConsumableArray-9a3476fe.js} +9 -9
- package/dist/cjs/{toNumber-5e1fac58.js → toNumber-36d1e7e5.js} +5 -40
- package/dist/cjs/{typeof-88a668c5.js → typeof-725500bc.js} +36 -36
- package/dist/cjs/urlFor.js +3 -3
- package/dist/cjs/{ustream-api-b2b9092f.js → ustream-api-d092dc31.js} +4 -4
- package/dist/cjs/{visibility-sensor-eb2c5b69.js → visibility-sensor-ad5e3116.js} +5 -7
- package/dist/cjs/{web.dom.iterable-46657b5c.js → web.dom.iterable-a0e279c1.js} +3 -3
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +24 -24
- package/dist/esm/AD300x250x600.js +24 -24
- package/dist/esm/AD728x90.js +27 -27
- package/dist/esm/ADFloatingFooter.js +23 -23
- package/dist/esm/ADFooter.js +6 -6
- package/dist/esm/ADGutter.js +23 -23
- package/dist/esm/{ADInfeed-4bf3b2f9.js → ADInfeed-bbdd5398.js} +6 -6
- package/dist/esm/ADSkyscraper.js +23 -23
- package/dist/esm/ADSponsoredResources.js +23 -23
- package/dist/esm/ADWebcast.js +23 -23
- package/dist/esm/ADWelcome.js +20 -20
- package/dist/esm/{ADlgInfeed-a3377c4a.js → ADlgInfeed-4473ee3b.js} +4 -4
- package/dist/esm/AccordionPanel.js +8 -8
- package/dist/esm/AdSlot.js +92 -24
- package/dist/esm/AdSlotsProvider.js +27 -17
- package/dist/esm/AlgoliaSearch.js +530 -525
- package/dist/esm/AlphabeticList.js +10 -10
- package/dist/esm/ArticleCarousel.js +17 -17
- package/dist/esm/ArticleProgramLandingPage.js +49 -50
- package/dist/esm/ArticleSeriesLandingPage.js +32 -32
- package/dist/esm/ArticleSeriesListing.js +34 -34
- package/dist/esm/AuthWrapper.js +396 -1711
- package/dist/esm/{AuthorComponent-30aeba69.js → AuthorComponent-34b16174.js} +1 -1
- package/dist/esm/Beam.js +8 -8
- package/dist/esm/{BlockContent-c99c9a8d.js → BlockContent-e9b4ddcf.js} +34 -34
- package/dist/esm/Breadcrumbs.js +7 -7
- package/dist/esm/CMEDeck.js +24 -24
- package/dist/esm/Column1.js +4 -4
- package/dist/esm/Column2.js +21 -21
- package/dist/esm/Column3.js +39 -39
- package/dist/esm/ConferenceArticleCard.js +22 -22
- package/dist/esm/DeckContent.js +57 -57
- package/dist/esm/DeckQueue.js +50 -50
- package/dist/esm/{Dfp-2c43d2a0.js → Dfp-b7236041.js} +15 -15
- package/dist/esm/EventsDeck.js +67 -67
- package/dist/esm/ExternalResources.js +47 -48
- package/dist/esm/Feature.js +4 -4
- package/dist/esm/ForbesHero.js +12 -12
- package/dist/esm/GridContent.js +200 -82
- package/dist/esm/GridHero.js +13 -13
- package/dist/esm/GroupDeck.js +14 -14
- package/dist/esm/HamMagazine.js +39 -39
- package/dist/esm/Hero.js +4 -4
- package/dist/esm/HighlightenVideo.js +2 -2
- package/dist/esm/HorizontalArticleListing.js +46 -47
- package/dist/esm/HorizontalHero.js +5 -5
- package/dist/esm/IssueContentDeck.js +27 -27
- package/dist/esm/IssueDeck.js +37 -37
- package/dist/esm/IssueLanding.js +81 -84
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/LeftNav.js +22 -22
- package/dist/esm/MasterDeck.js +45 -45
- package/dist/esm/MediaSeriesLanding.js +662 -751
- package/dist/esm/NavDvm.js +16 -16
- package/dist/esm/NavMagazine.js +44 -44
- package/dist/esm/NavNative.js +49 -49
- package/dist/esm/OncliveHero.js +5 -4
- package/dist/esm/OncliveLargeHero.js +13 -13
- package/dist/esm/PageFilter.js +6 -6
- package/dist/esm/PartnerDetailListing.js +55 -63
- package/dist/esm/PdfDownload.js +2 -2
- package/dist/esm/PopUpModal.js +6 -6
- package/dist/esm/PubSection.js +32 -34
- package/dist/esm/PubToc.js +8 -8
- package/dist/esm/PublicationDeck.js +24 -24
- package/dist/esm/PublicationLanding.js +76 -76
- package/dist/esm/QueueDeckExpanded.js +2102 -1097
- package/dist/esm/RecentNews.js +4 -4
- package/dist/esm/RelatedContent.js +35 -35
- package/dist/esm/RelatedTopicsDropdown.js +10 -10
- package/dist/esm/RolesDeck.js +12 -12
- package/dist/esm/Search.js +8 -8
- package/dist/esm/Segment.js +368 -343
- package/dist/esm/SeriesListingDeck.js +20 -20
- package/dist/esm/{SeriesSlider-5d5c08f4.js → SeriesSlider-a866bb21.js} +14 -14
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +17 -17
- package/dist/esm/{SocialSearchComponent-db963c3e.js → SocialSearchComponent-03c3e869.js} +12 -12
- package/dist/esm/TaxonomyCard.js +25 -25
- package/dist/esm/TaxonomyDescription.js +45 -46
- package/dist/esm/TemplateNormal.js +50 -50
- package/dist/esm/ThumbnailCard.js +7 -7
- package/dist/esm/Ustream.js +14 -14
- package/dist/esm/VerticalHero.js +3 -3
- package/dist/esm/VideoProgramLandingPage.js +53 -54
- package/dist/esm/VideoSeriesCard.js +14 -14
- package/dist/esm/VideoSeriesFilter.js +9 -9
- package/dist/esm/VideoSeriesLandingPage.js +38 -38
- package/dist/esm/VideoSeriesListing.js +39 -37
- package/dist/esm/View.js +173 -93
- package/dist/esm/YahooHero.js +15 -15
- package/dist/esm/YoutubeGroup.js +26 -26
- package/dist/esm/{_is-array-3e99e06e.js → _is-array-58e95429.js} +6 -6
- package/dist/esm/{_iter-detect-7e5e5ce2.js → _iter-detect-5d49a330.js} +8 -8
- package/dist/esm/{_object-pie-133f504a.js → _object-pie-33c40e79.js} +4 -4
- package/dist/esm/{_object-sap-f353c2a9.js → _object-sap-964b6feb.js} +1 -1
- package/dist/esm/{_object-to-array-0f197f89.js → _object-to-array-7e804fce.js} +2 -2
- package/dist/esm/{_to-object-b50e61c3.js → _to-object-a4107da3.js} +9 -9
- package/dist/esm/{asyncToGenerator-7f8f9219.js → asyncToGenerator-4877b617.js} +33 -33
- package/dist/esm/{brightcove-react-player-loader.es-57a70a56.js → brightcove-react-player-loader.es-83f53e4e.js} +4 -5
- package/dist/esm/{core.get-iterator-method-133dfacd.js → core.get-iterator-method-e1de7503.js} +2 -2
- package/dist/esm/{debounce-533d9748.js → debounce-9207d8ee.js} +2 -2
- package/dist/esm/{define-property-fe54dc9f.js → define-property-8af5f002.js} +6 -6
- package/dist/esm/{defineProperty-f5ff6f5a.js → defineProperty-94fd8bfc.js} +1 -1
- package/dist/esm/{entities-932b50cf.js → entities-7cc3bf45.js} +1 -1
- package/dist/esm/{eq-bdcbf886.js → eq-b470f743.js} +1 -1
- package/dist/esm/{es6.string.iterator-bc33758b.js → es6.string.iterator-c990c18c.js} +7 -7
- package/dist/esm/{extends-60e0e1c6.js → extends-6f2fcc99.js} +7 -7
- package/dist/esm/faundadb.js +325 -8
- package/dist/esm/{get-3c308da4.js → get-1e515072.js} +21 -21
- package/dist/esm/getQuery.js +2 -2
- package/dist/esm/getRelatedArticle.js +28 -445
- package/dist/esm/getRootDocGroup.js +6 -6
- package/dist/esm/getSerializers.js +44 -45
- package/dist/esm/{getTargeting-68291ce9.js → getTargeting-bd800589.js} +25 -16
- package/dist/esm/getTargeting.js +8 -8
- package/dist/{cjs/iconBase-be4097c0.js → esm/iconBase-602d52fe.js} +8 -33
- package/dist/esm/{index-f0fc23eb.js → index-41a678ea.js} +4 -4
- package/dist/esm/{index-755f2cc2.js → index-5f7e79e7.js} +6 -6
- package/dist/esm/{index-0dbff1d1.js → index-73819142.js} +30 -36
- package/dist/esm/{index-98ca9cec.js → index-aaa2dae0.js} +11 -26
- package/dist/esm/{index-01d53c17.js → index-d6dc592a.js} +1261 -648
- package/dist/esm/{index-79cfd25c.js → index-ef6d5dcf.js} +45 -44
- package/dist/esm/{index.es-a6137319.js → index.es-29c1cef5.js} +5 -23
- package/dist/esm/{index.esm-f6156a57.js → index.esm-29e48d38.js} +16 -7
- package/dist/esm/{index.esm-d4932dea.js → index.esm-cf08bf18.js} +13 -6
- package/dist/esm/{index.esm-9b042655.js → index.esm-f8aaeeeb.js} +7 -4
- package/dist/esm/{index.esm-37268dca.js → index.esm-fd746768.js} +5 -4
- package/dist/esm/index.js +117 -125
- package/dist/esm/{inherits-a41fe93f.js → inherits-cf8dde54.js} +19 -19
- package/dist/esm/{isSymbol-a7e9aafe.js → isSymbol-1981418f.js} +15 -15
- package/dist/esm/{keys-7a3adabf.js → keys-8eda7a5c.js} +6 -6
- package/dist/esm/{lodash-f97fd99a.js → lodash-17fdfebb.js} +31 -128
- package/dist/esm/main-e4a934b2.js +851 -0
- package/dist/esm/{moment-bc12cb97.js → moment-e2f9b20c.js} +9 -11
- package/dist/esm/{react-social-icons-9be47857.js → react-social-icons-a7d5c5c7.js} +16 -16
- package/dist/esm/{slicedToArray-be2f7a22.js → slicedToArray-641f241f.js} +14 -14
- package/dist/esm/{smoothscroll-fa4e3f8c.js → smoothscroll-0cd4c7a6.js} +1 -1
- package/dist/esm/stringify-4330ccdc.js +15 -0
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/{toConsumableArray-6d9a4616.js → toConsumableArray-43aa614d.js} +9 -9
- package/dist/esm/{toNumber-5aeba6e7.js → toNumber-2f7a84cd.js} +5 -40
- package/dist/esm/{typeof-a286cf0c.js → typeof-6435ba1c.js} +36 -36
- package/dist/esm/urlFor.js +1 -1
- package/dist/esm/{ustream-api-33a866b6.js → ustream-api-9a50644d.js} +4 -4
- package/dist/esm/{web.dom.iterable-4109ff68.js → web.dom.iterable-4439f05a.js} +3 -3
- package/package.json +116 -110
- package/dist/cjs/Auth.js +0 -3652
- package/dist/cjs/ConferenceBanner-6c9e718a.js +0 -24
- package/dist/cjs/index-bd6c9f56.js +0 -211
- package/dist/cjs/keys-7f2c2108.js +0 -25
- package/dist/cjs/main-f1c77adb.js +0 -973
- package/dist/cjs/md5-e1ca5797.js +0 -323
- package/dist/cjs/stringify-c9ac1214.js +0 -17
- package/dist/cjs/typeof-1358762e.js +0 -33
- package/dist/cjs/util-6f784d85.js +0 -576
- package/dist/esm/Auth.js +0 -3632
- package/dist/esm/index-db3bb315.js +0 -207
- package/dist/esm/main-d4165069.js +0 -961
- package/dist/esm/md5-4e42248e.js +0 -321
- package/dist/esm/stringify-59c8f690.js +0 -15
- package/dist/esm/typeof-2f07d0e8.js +0 -30
- package/dist/esm/util-3ab476bf.js +0 -574
|
@@ -1,26 +1,25 @@
|
|
|
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__default, { createContext, Component, Children, version as version$2 } from 'react';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
import { _ as _typeof$1 } from './typeof-2f07d0e8.js';
|
|
7
|
-
import { _ as _objectWithoutPropertiesLoose$1, a as _setPrototypeOf, b as _extends, c as classnames } from './index-98ca9cec.js';
|
|
8
|
-
import { E as EventEmitter } from './events-6c3a7a63.js';
|
|
9
|
-
import { DropdownButton } from 'react-bootstrap';
|
|
10
|
-
import urlFor from './urlFor.js';
|
|
11
|
-
import { m as moment } from './moment-bc12cb97.js';
|
|
12
|
-
import { L as LazyLoad } from './index-755f2cc2.js';
|
|
13
1
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
14
|
-
import './_to-object-
|
|
15
|
-
import './
|
|
16
|
-
import './es6.string.iterator-bc33758b.js';
|
|
17
|
-
import './web.dom.iterable-4109ff68.js';
|
|
18
|
-
import './_is-array-3e99e06e.js';
|
|
2
|
+
import './_to-object-a4107da3.js';
|
|
3
|
+
import './es6.string.iterator-c990c18c.js';
|
|
19
4
|
import './_library-528f1934.js';
|
|
20
|
-
import './_object-
|
|
21
|
-
import './
|
|
22
|
-
import './
|
|
5
|
+
import './_object-pie-33c40e79.js';
|
|
6
|
+
import { _ as _extends$1 } from './extends-6f2fcc99.js';
|
|
7
|
+
import './_object-sap-964b6feb.js';
|
|
8
|
+
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-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';
|
|
15
|
+
import PropTypes from 'prop-types';
|
|
16
|
+
import { m as moment } from './moment-e2f9b20c.js';
|
|
23
17
|
import 'react-dom';
|
|
18
|
+
import './index-73819142.js';
|
|
19
|
+
import urlFor from './urlFor.js';
|
|
20
|
+
import { L as LazyLoad } from './index-5f7e79e7.js';
|
|
21
|
+
import { DropdownButton } from 'react-bootstrap';
|
|
22
|
+
import { _ as _objectWithoutPropertiesLoose$1, a as _extends, c as classnames } from './index-aaa2dae0.js';
|
|
24
23
|
|
|
25
24
|
function _objectWithoutProperties(source, excluded) {
|
|
26
25
|
if (source == null) return {};
|
|
@@ -58,7 +57,7 @@ function _defineProperty(obj, key, value) {
|
|
|
58
57
|
|
|
59
58
|
function _objectSpread(target) {
|
|
60
59
|
for (var i = 1; i < arguments.length; i++) {
|
|
61
|
-
var source = arguments[i] != null ?
|
|
60
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
62
61
|
var ownKeys = Object.keys(source);
|
|
63
62
|
|
|
64
63
|
if (typeof Object.getOwnPropertySymbols === 'function') {
|
|
@@ -97,6 +96,22 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
97
96
|
return Constructor;
|
|
98
97
|
}
|
|
99
98
|
|
|
99
|
+
function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
|
|
100
|
+
|
|
101
|
+
function _typeof(obj) {
|
|
102
|
+
if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
|
|
103
|
+
_typeof = function _typeof(obj) {
|
|
104
|
+
return _typeof2(obj);
|
|
105
|
+
};
|
|
106
|
+
} else {
|
|
107
|
+
_typeof = function _typeof(obj) {
|
|
108
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return _typeof(obj);
|
|
113
|
+
}
|
|
114
|
+
|
|
100
115
|
function _assertThisInitialized(self) {
|
|
101
116
|
if (self === void 0) {
|
|
102
117
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -106,7 +121,7 @@ function _assertThisInitialized(self) {
|
|
|
106
121
|
}
|
|
107
122
|
|
|
108
123
|
function _possibleConstructorReturn(self, call) {
|
|
109
|
-
if (call && (_typeof
|
|
124
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
110
125
|
return call;
|
|
111
126
|
}
|
|
112
127
|
|
|
@@ -120,6 +135,15 @@ function _getPrototypeOf(o) {
|
|
|
120
135
|
return _getPrototypeOf(o);
|
|
121
136
|
}
|
|
122
137
|
|
|
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
|
+
|
|
123
147
|
function _inherits(subClass, superClass) {
|
|
124
148
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
125
149
|
throw new TypeError("Super expression must either be null or a function");
|
|
@@ -270,22 +294,6 @@ var reactFastCompare = function isEqual(a, b) {
|
|
|
270
294
|
}
|
|
271
295
|
};
|
|
272
296
|
|
|
273
|
-
function _typeof(obj) {
|
|
274
|
-
"@babel/helpers - typeof";
|
|
275
|
-
|
|
276
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
277
|
-
_typeof = function _typeof(obj) {
|
|
278
|
-
return typeof obj;
|
|
279
|
-
};
|
|
280
|
-
} else {
|
|
281
|
-
_typeof = function _typeof(obj) {
|
|
282
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
return _typeof(obj);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
297
|
// From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
290
298
|
var shallowEqual = function shallowEqual(objA, objB) {
|
|
291
299
|
if (objA === objB) {
|
|
@@ -330,7 +338,7 @@ var removeEmptyKey = function removeEmptyKey(obj) {
|
|
|
330
338
|
return;
|
|
331
339
|
}
|
|
332
340
|
|
|
333
|
-
if (!objectHasKeys
|
|
341
|
+
if (!objectHasKeys(value)) {
|
|
334
342
|
delete obj[key];
|
|
335
343
|
} else {
|
|
336
344
|
removeEmptyKey(value);
|
|
@@ -366,7 +374,7 @@ function addQueryID(hits, queryID) {
|
|
|
366
374
|
});
|
|
367
375
|
});
|
|
368
376
|
}
|
|
369
|
-
function find
|
|
377
|
+
function find(array, comparator) {
|
|
370
378
|
if (!Array.isArray(array)) {
|
|
371
379
|
return undefined;
|
|
372
380
|
}
|
|
@@ -379,11 +387,11 @@ function find$2(array, comparator) {
|
|
|
379
387
|
|
|
380
388
|
return undefined;
|
|
381
389
|
}
|
|
382
|
-
function objectHasKeys
|
|
390
|
+
function objectHasKeys(object) {
|
|
383
391
|
return object && Object.keys(object).length > 0;
|
|
384
392
|
} // https://github.com/babel/babel/blob/3aaafae053fa75febb3aa45d45b6f00646e30ba4/packages/babel-helpers/src/helpers.js#L604-L620
|
|
385
393
|
|
|
386
|
-
function omit
|
|
394
|
+
function omit(source, excluded) {
|
|
387
395
|
if (source === null || source === undefined) {
|
|
388
396
|
return {};
|
|
389
397
|
}
|
|
@@ -454,9 +462,9 @@ var instantSearchContext = createContext({
|
|
|
454
462
|
var InstantSearchConsumer = instantSearchContext.Consumer,
|
|
455
463
|
InstantSearchProvider = instantSearchContext.Provider;
|
|
456
464
|
|
|
457
|
-
var _createContext
|
|
458
|
-
IndexConsumer = _createContext
|
|
459
|
-
IndexProvider = _createContext
|
|
465
|
+
var _createContext = createContext(undefined),
|
|
466
|
+
IndexConsumer = _createContext.Consumer,
|
|
467
|
+
IndexProvider = _createContext.Provider;
|
|
460
468
|
|
|
461
469
|
/**
|
|
462
470
|
* Connectors are the HOC used to transform React components
|
|
@@ -669,9 +677,9 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
669
677
|
}, {
|
|
670
678
|
key: "render",
|
|
671
679
|
value: function render() {
|
|
672
|
-
var _this$props = this.props
|
|
673
|
-
_this$props.contextValue
|
|
674
|
-
|
|
680
|
+
var _this$props = this.props,
|
|
681
|
+
contextValue = _this$props.contextValue,
|
|
682
|
+
props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
675
683
|
|
|
676
684
|
var providedProps = this.state.providedProps;
|
|
677
685
|
|
|
@@ -822,7 +830,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
822
830
|
});
|
|
823
831
|
}
|
|
824
832
|
|
|
825
|
-
var version
|
|
833
|
+
var version = '6.10.3';
|
|
826
834
|
|
|
827
835
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
828
836
|
return function (props, propName, componentName) {
|
|
@@ -1019,7 +1027,7 @@ function hasRefinements(_ref) {
|
|
|
1019
1027
|
return Object.hasOwnProperty.call(searchState, id);
|
|
1020
1028
|
}
|
|
1021
1029
|
|
|
1022
|
-
function getRefinements
|
|
1030
|
+
function getRefinements(_ref2) {
|
|
1023
1031
|
var multiIndex = _ref2.multiIndex,
|
|
1024
1032
|
indexId = _ref2.indexId,
|
|
1025
1033
|
namespace = _ref2.namespace,
|
|
@@ -1061,7 +1069,7 @@ function getCurrentRefinementValue(props, searchState, context, id, defaultValue
|
|
|
1061
1069
|
var hasRefinementsValue = hasRefinements(args);
|
|
1062
1070
|
|
|
1063
1071
|
if (hasRefinementsValue) {
|
|
1064
|
-
return getRefinements
|
|
1072
|
+
return getRefinements(args);
|
|
1065
1073
|
}
|
|
1066
1074
|
|
|
1067
1075
|
if (props.defaultRefinement) {
|
|
@@ -1102,10 +1110,10 @@ function cleanUpValueWithSingleIndex(_ref3) {
|
|
|
1102
1110
|
attribute = _ref3.attribute;
|
|
1103
1111
|
|
|
1104
1112
|
if (namespace) {
|
|
1105
|
-
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit
|
|
1113
|
+
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit(searchState[namespace], [attribute])));
|
|
1106
1114
|
}
|
|
1107
1115
|
|
|
1108
|
-
return omit
|
|
1116
|
+
return omit(searchState, [id]);
|
|
1109
1117
|
}
|
|
1110
1118
|
|
|
1111
1119
|
function cleanUpValueWithMultiIndex(_ref4) {
|
|
@@ -1118,20 +1126,20 @@ function cleanUpValueWithMultiIndex(_ref4) {
|
|
|
1118
1126
|
|
|
1119
1127
|
if (namespace && indexSearchState) {
|
|
1120
1128
|
return _objectSpread({}, searchState, {
|
|
1121
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit
|
|
1129
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit(indexSearchState[namespace], [attribute])))))
|
|
1122
1130
|
});
|
|
1123
1131
|
}
|
|
1124
1132
|
|
|
1125
1133
|
if (indexSearchState) {
|
|
1126
1134
|
return _objectSpread({}, searchState, {
|
|
1127
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit
|
|
1135
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit(indexSearchState, [id])))
|
|
1128
1136
|
});
|
|
1129
1137
|
}
|
|
1130
1138
|
|
|
1131
1139
|
return searchState;
|
|
1132
1140
|
}
|
|
1133
1141
|
|
|
1134
|
-
function getId
|
|
1142
|
+
function getId() {
|
|
1135
1143
|
return 'configure';
|
|
1136
1144
|
}
|
|
1137
1145
|
|
|
@@ -1141,20 +1149,20 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1141
1149
|
return {};
|
|
1142
1150
|
},
|
|
1143
1151
|
getSearchParameters: function getSearchParameters(searchParameters, props) {
|
|
1144
|
-
props.children
|
|
1145
|
-
props.contextValue
|
|
1146
|
-
props.indexContextValue
|
|
1147
|
-
|
|
1152
|
+
var children = props.children,
|
|
1153
|
+
contextValue = props.contextValue,
|
|
1154
|
+
indexContextValue = props.indexContextValue,
|
|
1155
|
+
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1148
1156
|
|
|
1149
1157
|
return searchParameters.setQueryParameters(items);
|
|
1150
1158
|
},
|
|
1151
1159
|
transitionState: function transitionState(props, prevSearchState, nextSearchState) {
|
|
1152
|
-
var id = getId
|
|
1160
|
+
var id = getId();
|
|
1153
1161
|
|
|
1154
|
-
props.children
|
|
1155
|
-
props.contextValue
|
|
1156
|
-
props.indexContextValue
|
|
1157
|
-
|
|
1162
|
+
var children = props.children,
|
|
1163
|
+
contextValue = props.contextValue,
|
|
1164
|
+
indexContextValue = props.indexContextValue,
|
|
1165
|
+
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1158
1166
|
|
|
1159
1167
|
var propKeys = Object.keys(props);
|
|
1160
1168
|
var nonPresentKeys = this._props ? Object.keys(this._props).filter(function (prop) {
|
|
@@ -1162,7 +1170,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1162
1170
|
}) : [];
|
|
1163
1171
|
this._props = props;
|
|
1164
1172
|
|
|
1165
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit
|
|
1173
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), items));
|
|
1166
1174
|
|
|
1167
1175
|
return refineValue(nextSearchState, nextValue, {
|
|
1168
1176
|
ais: props.contextValue,
|
|
@@ -1170,7 +1178,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1170
1178
|
});
|
|
1171
1179
|
},
|
|
1172
1180
|
cleanUp: function cleanUp(props, searchState) {
|
|
1173
|
-
var id = getId
|
|
1181
|
+
var id = getId();
|
|
1174
1182
|
var indexId = getIndexId({
|
|
1175
1183
|
ais: props.contextValue,
|
|
1176
1184
|
multiIndexContext: props.indexContextValue
|
|
@@ -1236,39 +1244,26 @@ var Configure = connectConfigure(function Configure() {
|
|
|
1236
1244
|
return null;
|
|
1237
1245
|
});
|
|
1238
1246
|
|
|
1239
|
-
function
|
|
1240
|
-
if (
|
|
1247
|
+
function _arrayWithoutHoles(arr) {
|
|
1248
|
+
if (Array.isArray(arr)) {
|
|
1249
|
+
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
|
|
1250
|
+
arr2[i] = arr[i];
|
|
1251
|
+
}
|
|
1241
1252
|
|
|
1242
|
-
|
|
1243
|
-
arr2[i] = arr[i];
|
|
1253
|
+
return arr2;
|
|
1244
1254
|
}
|
|
1245
|
-
|
|
1246
|
-
return arr2;
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
function _arrayWithoutHoles(arr) {
|
|
1250
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
1251
1255
|
}
|
|
1252
1256
|
|
|
1253
1257
|
function _iterableToArray(iter) {
|
|
1254
|
-
if (
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
1258
|
-
if (!o) return;
|
|
1259
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1260
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1261
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1262
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1263
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1258
|
+
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
|
|
1264
1259
|
}
|
|
1265
1260
|
|
|
1266
1261
|
function _nonIterableSpread() {
|
|
1267
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance
|
|
1262
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
|
1268
1263
|
}
|
|
1269
1264
|
|
|
1270
1265
|
function _toConsumableArray(arr) {
|
|
1271
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) ||
|
|
1266
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
|
1272
1267
|
}
|
|
1273
1268
|
|
|
1274
1269
|
function clone(value) {
|
|
@@ -1418,13 +1413,13 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
1418
1413
|
return target;
|
|
1419
1414
|
}
|
|
1420
1415
|
|
|
1421
|
-
var omit = _objectWithoutPropertiesLoose;
|
|
1416
|
+
var omit$1 = _objectWithoutPropertiesLoose;
|
|
1422
1417
|
|
|
1423
|
-
function objectHasKeys(obj) {
|
|
1418
|
+
function objectHasKeys$1(obj) {
|
|
1424
1419
|
return obj && Object.keys(obj).length > 0;
|
|
1425
1420
|
}
|
|
1426
1421
|
|
|
1427
|
-
var objectHasKeys_1 = objectHasKeys;
|
|
1422
|
+
var objectHasKeys_1 = objectHasKeys$1;
|
|
1428
1423
|
|
|
1429
1424
|
var isValidUserToken = function isValidUserToken(userToken) {
|
|
1430
1425
|
if (userToken === null) {
|
|
@@ -1532,7 +1527,7 @@ var lib = {
|
|
|
1532
1527
|
}
|
|
1533
1528
|
return {};
|
|
1534
1529
|
} else if (typeof attribute === 'string') {
|
|
1535
|
-
return omit(refinementList, [attribute]);
|
|
1530
|
+
return omit$1(refinementList, [attribute]);
|
|
1536
1531
|
} else if (typeof attribute === 'function') {
|
|
1537
1532
|
var hasChanged = false;
|
|
1538
1533
|
|
|
@@ -1577,7 +1572,7 @@ var lib = {
|
|
|
1577
1572
|
}
|
|
1578
1573
|
};
|
|
1579
1574
|
|
|
1580
|
-
var RefinementList
|
|
1575
|
+
var RefinementList = lib;
|
|
1581
1576
|
|
|
1582
1577
|
/**
|
|
1583
1578
|
* isEqual, but only for numeric refinement values, possible values:
|
|
@@ -1946,22 +1941,22 @@ SearchParameters.prototype = {
|
|
|
1946
1941
|
clearRefinements: function clearRefinements(attribute) {
|
|
1947
1942
|
var patch = {
|
|
1948
1943
|
numericRefinements: this._clearNumericRefinements(attribute),
|
|
1949
|
-
facetsRefinements: RefinementList
|
|
1944
|
+
facetsRefinements: RefinementList.clearRefinement(
|
|
1950
1945
|
this.facetsRefinements,
|
|
1951
1946
|
attribute,
|
|
1952
1947
|
'conjunctiveFacet'
|
|
1953
1948
|
),
|
|
1954
|
-
facetsExcludes: RefinementList
|
|
1949
|
+
facetsExcludes: RefinementList.clearRefinement(
|
|
1955
1950
|
this.facetsExcludes,
|
|
1956
1951
|
attribute,
|
|
1957
1952
|
'exclude'
|
|
1958
1953
|
),
|
|
1959
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
1954
|
+
disjunctiveFacetsRefinements: RefinementList.clearRefinement(
|
|
1960
1955
|
this.disjunctiveFacetsRefinements,
|
|
1961
1956
|
attribute,
|
|
1962
1957
|
'disjunctiveFacet'
|
|
1963
1958
|
),
|
|
1964
|
-
hierarchicalFacetsRefinements: RefinementList
|
|
1959
|
+
hierarchicalFacetsRefinements: RefinementList.clearRefinement(
|
|
1965
1960
|
this.hierarchicalFacetsRefinements,
|
|
1966
1961
|
attribute,
|
|
1967
1962
|
'hierarchicalFacet'
|
|
@@ -2237,7 +2232,7 @@ SearchParameters.prototype = {
|
|
|
2237
2232
|
}
|
|
2238
2233
|
return {};
|
|
2239
2234
|
} else if (typeof attribute === 'string') {
|
|
2240
|
-
return omit(this.numericRefinements, [attribute]);
|
|
2235
|
+
return omit$1(this.numericRefinements, [attribute]);
|
|
2241
2236
|
} else if (typeof attribute === 'function') {
|
|
2242
2237
|
var hasChanged = false;
|
|
2243
2238
|
var numericRefinements = this.numericRefinements;
|
|
@@ -2329,10 +2324,10 @@ SearchParameters.prototype = {
|
|
|
2329
2324
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2330
2325
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2331
2326
|
}
|
|
2332
|
-
if (RefinementList
|
|
2327
|
+
if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2333
2328
|
|
|
2334
2329
|
return this.setQueryParameters({
|
|
2335
|
-
facetsRefinements: RefinementList
|
|
2330
|
+
facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value)
|
|
2336
2331
|
});
|
|
2337
2332
|
},
|
|
2338
2333
|
/**
|
|
@@ -2346,10 +2341,10 @@ SearchParameters.prototype = {
|
|
|
2346
2341
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2347
2342
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2348
2343
|
}
|
|
2349
|
-
if (RefinementList
|
|
2344
|
+
if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2350
2345
|
|
|
2351
2346
|
return this.setQueryParameters({
|
|
2352
|
-
facetsExcludes: RefinementList
|
|
2347
|
+
facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value)
|
|
2353
2348
|
});
|
|
2354
2349
|
},
|
|
2355
2350
|
/**
|
|
@@ -2365,10 +2360,10 @@ SearchParameters.prototype = {
|
|
|
2365
2360
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2366
2361
|
}
|
|
2367
2362
|
|
|
2368
|
-
if (RefinementList
|
|
2363
|
+
if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2369
2364
|
|
|
2370
2365
|
return this.setQueryParameters({
|
|
2371
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2366
|
+
disjunctiveFacetsRefinements: RefinementList.addRefinement(
|
|
2372
2367
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2373
2368
|
});
|
|
2374
2369
|
},
|
|
@@ -2453,10 +2448,10 @@ SearchParameters.prototype = {
|
|
|
2453
2448
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2454
2449
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2455
2450
|
}
|
|
2456
|
-
if (!RefinementList
|
|
2451
|
+
if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2457
2452
|
|
|
2458
2453
|
return this.setQueryParameters({
|
|
2459
|
-
facetsRefinements: RefinementList
|
|
2454
|
+
facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value)
|
|
2460
2455
|
});
|
|
2461
2456
|
},
|
|
2462
2457
|
/**
|
|
@@ -2470,10 +2465,10 @@ SearchParameters.prototype = {
|
|
|
2470
2465
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2471
2466
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2472
2467
|
}
|
|
2473
|
-
if (!RefinementList
|
|
2468
|
+
if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2474
2469
|
|
|
2475
2470
|
return this.setQueryParameters({
|
|
2476
|
-
facetsExcludes: RefinementList
|
|
2471
|
+
facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value)
|
|
2477
2472
|
});
|
|
2478
2473
|
},
|
|
2479
2474
|
/**
|
|
@@ -2488,10 +2483,10 @@ SearchParameters.prototype = {
|
|
|
2488
2483
|
throw new Error(
|
|
2489
2484
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2490
2485
|
}
|
|
2491
|
-
if (!RefinementList
|
|
2486
|
+
if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2492
2487
|
|
|
2493
2488
|
return this.setQueryParameters({
|
|
2494
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2489
|
+
disjunctiveFacetsRefinements: RefinementList.removeRefinement(
|
|
2495
2490
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2496
2491
|
});
|
|
2497
2492
|
},
|
|
@@ -2557,7 +2552,7 @@ SearchParameters.prototype = {
|
|
|
2557
2552
|
}
|
|
2558
2553
|
|
|
2559
2554
|
return this.setQueryParameters({
|
|
2560
|
-
facetsRefinements: RefinementList
|
|
2555
|
+
facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2561
2556
|
});
|
|
2562
2557
|
},
|
|
2563
2558
|
/**
|
|
@@ -2573,7 +2568,7 @@ SearchParameters.prototype = {
|
|
|
2573
2568
|
}
|
|
2574
2569
|
|
|
2575
2570
|
return this.setQueryParameters({
|
|
2576
|
-
facetsExcludes: RefinementList
|
|
2571
|
+
facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2577
2572
|
});
|
|
2578
2573
|
},
|
|
2579
2574
|
/**
|
|
@@ -2590,7 +2585,7 @@ SearchParameters.prototype = {
|
|
|
2590
2585
|
}
|
|
2591
2586
|
|
|
2592
2587
|
return this.setQueryParameters({
|
|
2593
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2588
|
+
disjunctiveFacetsRefinements: RefinementList.toggleRefinement(
|
|
2594
2589
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2595
2590
|
});
|
|
2596
2591
|
},
|
|
@@ -2729,7 +2724,7 @@ SearchParameters.prototype = {
|
|
|
2729
2724
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2730
2725
|
return false;
|
|
2731
2726
|
}
|
|
2732
|
-
return RefinementList
|
|
2727
|
+
return RefinementList.isRefined(this.facetsRefinements, facet, value);
|
|
2733
2728
|
},
|
|
2734
2729
|
/**
|
|
2735
2730
|
* Returns true if the facet contains exclusions or if a specific value is
|
|
@@ -2745,7 +2740,7 @@ SearchParameters.prototype = {
|
|
|
2745
2740
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2746
2741
|
return false;
|
|
2747
2742
|
}
|
|
2748
|
-
return RefinementList
|
|
2743
|
+
return RefinementList.isRefined(this.facetsExcludes, facet, value);
|
|
2749
2744
|
},
|
|
2750
2745
|
/**
|
|
2751
2746
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2760,7 +2755,7 @@ SearchParameters.prototype = {
|
|
|
2760
2755
|
if (!this.isDisjunctiveFacet(facet)) {
|
|
2761
2756
|
return false;
|
|
2762
2757
|
}
|
|
2763
|
-
return RefinementList
|
|
2758
|
+
return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2764
2759
|
},
|
|
2765
2760
|
/**
|
|
2766
2761
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2946,7 +2941,7 @@ SearchParameters.prototype = {
|
|
|
2946
2941
|
var isNextValueDefined = nextWithNumbers[key] !== undefined;
|
|
2947
2942
|
|
|
2948
2943
|
if (isPreviousValueDefined && !isNextValueDefined) {
|
|
2949
|
-
return omit(previous, [key]);
|
|
2944
|
+
return omit$1(previous, [key]);
|
|
2950
2945
|
}
|
|
2951
2946
|
|
|
2952
2947
|
if (isNextValueDefined) {
|
|
@@ -4679,7 +4674,7 @@ var requestBuilder = {
|
|
|
4679
4674
|
|
|
4680
4675
|
var requestBuilder_1 = requestBuilder;
|
|
4681
4676
|
|
|
4682
|
-
var version = '3.4.4';
|
|
4677
|
+
var version$1 = '3.4.4';
|
|
4683
4678
|
|
|
4684
4679
|
/**
|
|
4685
4680
|
* Event triggered when a parameter is set or updated
|
|
@@ -4786,7 +4781,7 @@ var version = '3.4.4';
|
|
|
4786
4781
|
*/
|
|
4787
4782
|
function AlgoliaSearchHelper(client, index, options) {
|
|
4788
4783
|
if (typeof client.addAlgoliaAgent === 'function') {
|
|
4789
|
-
client.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
4784
|
+
client.addAlgoliaAgent('JS Helper (' + version$1 + ')');
|
|
4790
4785
|
}
|
|
4791
4786
|
|
|
4792
4787
|
this.setClient(client);
|
|
@@ -4941,7 +4936,7 @@ AlgoliaSearchHelper.prototype.findAnswers = function(options) {
|
|
|
4941
4936
|
nbHits: options.nbHits
|
|
4942
4937
|
},
|
|
4943
4938
|
{
|
|
4944
|
-
params: omit(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
4939
|
+
params: omit$1(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
4945
4940
|
'attributesToSnippet',
|
|
4946
4941
|
'hitsPerPage',
|
|
4947
4942
|
'restrictSearchableAttributes',
|
|
@@ -6055,7 +6050,7 @@ AlgoliaSearchHelper.prototype.setClient = function(newClient) {
|
|
|
6055
6050
|
if (this.client === newClient) return this;
|
|
6056
6051
|
|
|
6057
6052
|
if (typeof newClient.addAlgoliaAgent === 'function') {
|
|
6058
|
-
newClient.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
6053
|
+
newClient.addAlgoliaAgent('JS Helper (' + version$1 + ')');
|
|
6059
6054
|
}
|
|
6060
6055
|
this.client = newClient;
|
|
6061
6056
|
|
|
@@ -6174,7 +6169,7 @@ function algoliasearchHelper(client, index, opts) {
|
|
|
6174
6169
|
* @member module:algoliasearchHelper.version
|
|
6175
6170
|
* @type {number}
|
|
6176
6171
|
*/
|
|
6177
|
-
algoliasearchHelper.version = version;
|
|
6172
|
+
algoliasearchHelper.version = version$1;
|
|
6178
6173
|
|
|
6179
6174
|
/**
|
|
6180
6175
|
* Constructor for the Helper.
|
|
@@ -6206,13 +6201,13 @@ function createOptionalFilter(_ref) {
|
|
|
6206
6201
|
return "".concat(attributeName, ":").concat(attributeValue, "<score=").concat(attributeScore || 1, ">");
|
|
6207
6202
|
}
|
|
6208
6203
|
|
|
6209
|
-
var defaultProps
|
|
6204
|
+
var defaultProps = {
|
|
6210
6205
|
transformSearchParameters: function transformSearchParameters(x) {
|
|
6211
6206
|
return _objectSpread({}, x);
|
|
6212
6207
|
}
|
|
6213
6208
|
};
|
|
6214
6209
|
|
|
6215
|
-
function getId$
|
|
6210
|
+
function getId$1() {
|
|
6216
6211
|
// We store the search state of this widget in `configure`.
|
|
6217
6212
|
return 'configure';
|
|
6218
6213
|
}
|
|
@@ -6260,7 +6255,7 @@ function getSearchParametersFromProps(props) {
|
|
|
6260
6255
|
|
|
6261
6256
|
var connectConfigureRelatedItems = createConnectorWithContext({
|
|
6262
6257
|
displayName: 'AlgoliaConfigureRelatedItems',
|
|
6263
|
-
defaultProps: defaultProps
|
|
6258
|
+
defaultProps: defaultProps,
|
|
6264
6259
|
getProvidedProps: function getProvidedProps() {
|
|
6265
6260
|
return {};
|
|
6266
6261
|
},
|
|
@@ -6268,7 +6263,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6268
6263
|
return searchParameters.setQueryParameters(getSearchParametersFromProps(props));
|
|
6269
6264
|
},
|
|
6270
6265
|
transitionState: function transitionState(props, _prevSearchState, nextSearchState) {
|
|
6271
|
-
var id = getId$
|
|
6266
|
+
var id = getId$1(); // We need to transform the exhaustive search parameters back to clean
|
|
6272
6267
|
// search parameters without the empty default keys so we don't pollute the
|
|
6273
6268
|
// `configure` search state.
|
|
6274
6269
|
|
|
@@ -6279,7 +6274,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6279
6274
|
}) : [];
|
|
6280
6275
|
this._searchParameters = searchParameters;
|
|
6281
6276
|
|
|
6282
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit
|
|
6277
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6283
6278
|
|
|
6284
6279
|
return refineValue(nextSearchState, nextValue, {
|
|
6285
6280
|
ais: props.contextValue,
|
|
@@ -6289,7 +6284,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6289
6284
|
cleanUp: function cleanUp(props, searchState) {
|
|
6290
6285
|
var _this = this;
|
|
6291
6286
|
|
|
6292
|
-
var id = getId$
|
|
6287
|
+
var id = getId$1();
|
|
6293
6288
|
var indexId = getIndexId({
|
|
6294
6289
|
ais: props.contextValue,
|
|
6295
6290
|
multiIndexContext: props.indexContextValue
|
|
@@ -6362,7 +6357,7 @@ function getWidgetRefinements(attribute, widgetKey, searchState) {
|
|
|
6362
6357
|
}
|
|
6363
6358
|
}
|
|
6364
6359
|
|
|
6365
|
-
function getRefinements(attribute) {
|
|
6360
|
+
function getRefinements$1(attribute) {
|
|
6366
6361
|
var searchState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6367
6362
|
var refinements = Object.keys(searchState).filter(function (widgetKey) {
|
|
6368
6363
|
return searchState[widgetKey] !== undefined && searchState[widgetKey][attribute] !== undefined;
|
|
@@ -6379,7 +6374,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6379
6374
|
var searchState = _ref.searchState,
|
|
6380
6375
|
trackedFilters = _ref.trackedFilters;
|
|
6381
6376
|
var ruleContexts = Object.keys(trackedFilters).reduce(function (facets, facetName) {
|
|
6382
|
-
var facetRefinements = getRefinements(facetName, searchState);
|
|
6377
|
+
var facetRefinements = getRefinements$1(facetName, searchState);
|
|
6383
6378
|
var getTrackedFacetValues = trackedFilters[facetName];
|
|
6384
6379
|
var trackedFacetValues = getTrackedFacetValues(facetRefinements);
|
|
6385
6380
|
return [].concat(_toConsumableArray(facets), _toConsumableArray(facetRefinements.filter(function (facetRefinement) {
|
|
@@ -6391,7 +6386,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6391
6386
|
return ruleContexts;
|
|
6392
6387
|
}
|
|
6393
6388
|
|
|
6394
|
-
var defaultProps = {
|
|
6389
|
+
var defaultProps$1 = {
|
|
6395
6390
|
transformItems: function transformItems(items) {
|
|
6396
6391
|
return items;
|
|
6397
6392
|
},
|
|
@@ -6402,7 +6397,7 @@ var defaultProps = {
|
|
|
6402
6397
|
};
|
|
6403
6398
|
var connectQueryRules = createConnectorWithContext({
|
|
6404
6399
|
displayName: 'AlgoliaQueryRules',
|
|
6405
|
-
defaultProps: defaultProps,
|
|
6400
|
+
defaultProps: defaultProps$1,
|
|
6406
6401
|
getProvidedProps: function getProvidedProps(props, _1, searchResults) {
|
|
6407
6402
|
var results = getResults(searchResults, {
|
|
6408
6403
|
ais: props.contextValue,
|
|
@@ -6579,10 +6574,20 @@ _defineProperty(Index, "propTypes", {
|
|
|
6579
6574
|
children: PropTypes.node
|
|
6580
6575
|
});
|
|
6581
6576
|
|
|
6582
|
-
({
|
|
6577
|
+
var IndexWrapper = function IndexWrapper(props) {
|
|
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 = {
|
|
6583
6588
|
indexName: PropTypes.string.isRequired,
|
|
6584
6589
|
indexId: PropTypes.string
|
|
6585
|
-
}
|
|
6590
|
+
};
|
|
6586
6591
|
|
|
6587
6592
|
function createWidgetsManager(onWidgetsUpdate) {
|
|
6588
6593
|
var widgets = []; // Is an update scheduled?
|
|
@@ -6643,7 +6648,7 @@ function createStore(initialState) {
|
|
|
6643
6648
|
function addAlgoliaAgents(searchClient) {
|
|
6644
6649
|
if (typeof searchClient.addAlgoliaAgent === 'function') {
|
|
6645
6650
|
searchClient.addAlgoliaAgent("react (".concat(version$2, ")"));
|
|
6646
|
-
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version
|
|
6651
|
+
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version, ")"));
|
|
6647
6652
|
}
|
|
6648
6653
|
}
|
|
6649
6654
|
|
|
@@ -6881,8 +6886,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6881
6886
|
nextIsSearchStalled = false;
|
|
6882
6887
|
}
|
|
6883
6888
|
|
|
6884
|
-
currentState.resultsFacetValues
|
|
6885
|
-
|
|
6889
|
+
var resultsFacetValues = currentState.resultsFacetValues,
|
|
6890
|
+
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6886
6891
|
|
|
6887
6892
|
store.setState(_objectSpread({}, partialState, {
|
|
6888
6893
|
results: results,
|
|
@@ -6903,8 +6908,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6903
6908
|
nextIsSearchStalled = false;
|
|
6904
6909
|
}
|
|
6905
6910
|
|
|
6906
|
-
currentState.resultsFacetValues
|
|
6907
|
-
|
|
6911
|
+
var resultsFacetValues = currentState.resultsFacetValues,
|
|
6912
|
+
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6908
6913
|
|
|
6909
6914
|
store.setState(_objectSpread({}, partialState, {
|
|
6910
6915
|
isSearchStalled: nextIsSearchStalled,
|
|
@@ -6916,9 +6921,9 @@ function createInstantSearchManager(_ref) {
|
|
|
6916
6921
|
function handleNewSearch() {
|
|
6917
6922
|
if (!stalledSearchTimer) {
|
|
6918
6923
|
stalledSearchTimer = setTimeout(function () {
|
|
6919
|
-
var _store$getState = store.getState()
|
|
6920
|
-
_store$getState.resultsFacetValues
|
|
6921
|
-
|
|
6924
|
+
var _store$getState = store.getState(),
|
|
6925
|
+
resultsFacetValues = _store$getState.resultsFacetValues,
|
|
6926
|
+
partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
6922
6927
|
|
|
6923
6928
|
store.setState(_objectSpread({}, partialState, {
|
|
6924
6929
|
isSearchStalled: true
|
|
@@ -7417,21 +7422,21 @@ _defineProperty(InstantSearch, "propTypes", {
|
|
|
7417
7422
|
stalledSearchDelay: PropTypes.number
|
|
7418
7423
|
});
|
|
7419
7424
|
|
|
7420
|
-
var getId$
|
|
7425
|
+
var getId$2 = function getId(props) {
|
|
7421
7426
|
return props.attributes[0];
|
|
7422
7427
|
};
|
|
7423
|
-
var namespace
|
|
7428
|
+
var namespace = 'hierarchicalMenu';
|
|
7424
7429
|
|
|
7425
|
-
function _refine
|
|
7426
|
-
var id = getId$
|
|
7430
|
+
function _refine(props, searchState, nextRefinement, context) {
|
|
7431
|
+
var id = getId$2(props);
|
|
7427
7432
|
|
|
7428
7433
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7429
7434
|
|
|
7430
7435
|
var resetPage = true;
|
|
7431
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace
|
|
7436
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
7432
7437
|
}
|
|
7433
7438
|
|
|
7434
|
-
function transformValue
|
|
7439
|
+
function transformValue(values) {
|
|
7435
7440
|
return values.reduce(function (acc, item) {
|
|
7436
7441
|
if (item.isRefined) {
|
|
7437
7442
|
acc.push({
|
|
@@ -7442,7 +7447,7 @@ function transformValue$1(values) {
|
|
|
7442
7447
|
}); // Create a variable in order to keep the same acc for the recursion, otherwise "reduce" returns a new one
|
|
7443
7448
|
|
|
7444
7449
|
if (item.data) {
|
|
7445
|
-
acc = acc.concat(transformValue
|
|
7450
|
+
acc = acc.concat(transformValue(item.data));
|
|
7446
7451
|
}
|
|
7447
7452
|
}
|
|
7448
7453
|
|
|
@@ -7504,7 +7509,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7504
7509
|
transformItems: PropTypes.func
|
|
7505
7510
|
},
|
|
7506
7511
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
7507
|
-
var id = getId$
|
|
7512
|
+
var id = getId$2(props);
|
|
7508
7513
|
var results = getResults(searchResults, {
|
|
7509
7514
|
ais: props.contextValue,
|
|
7510
7515
|
multiIndexContext: props.indexContextValue
|
|
@@ -7519,7 +7524,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7519
7524
|
}
|
|
7520
7525
|
|
|
7521
7526
|
var values = results.getFacetValues(id);
|
|
7522
|
-
var items = values.data ? transformValue
|
|
7527
|
+
var items = values.data ? transformValue(values.data) : [];
|
|
7523
7528
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7524
7529
|
return {
|
|
7525
7530
|
canRefine: transformedItems.length > 0,
|
|
@@ -7527,7 +7532,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7527
7532
|
};
|
|
7528
7533
|
},
|
|
7529
7534
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7530
|
-
return _refine
|
|
7535
|
+
return _refine(props, searchState, nextRefinement, {
|
|
7531
7536
|
ais: props.contextValue,
|
|
7532
7537
|
multiIndexContext: props.indexContextValue
|
|
7533
7538
|
});
|
|
@@ -7590,13 +7595,13 @@ var connectCurrentRefinements = createConnectorWithContext({
|
|
|
7590
7595
|
}
|
|
7591
7596
|
});
|
|
7592
7597
|
|
|
7593
|
-
var getId$
|
|
7598
|
+
var getId$3 = function getId(props) {
|
|
7594
7599
|
return props.attributes[0];
|
|
7595
7600
|
};
|
|
7596
|
-
var namespace$
|
|
7601
|
+
var namespace$1 = 'hierarchicalMenu';
|
|
7597
7602
|
|
|
7598
|
-
function getCurrentRefinement
|
|
7599
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
7603
|
+
function getCurrentRefinement(props, searchState, context) {
|
|
7604
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$1, ".").concat(getId$3(props)), null);
|
|
7600
7605
|
|
|
7601
7606
|
if (currentRefinement === '') {
|
|
7602
7607
|
return null;
|
|
@@ -7605,13 +7610,13 @@ function getCurrentRefinement$b(props, searchState, context) {
|
|
|
7605
7610
|
return currentRefinement;
|
|
7606
7611
|
}
|
|
7607
7612
|
|
|
7608
|
-
function getValue
|
|
7613
|
+
function getValue(path, props, searchState, context) {
|
|
7609
7614
|
var id = props.id,
|
|
7610
7615
|
attributes = props.attributes,
|
|
7611
7616
|
separator = props.separator,
|
|
7612
7617
|
rootPath = props.rootPath,
|
|
7613
7618
|
showParentLevel = props.showParentLevel;
|
|
7614
|
-
var currentRefinement = getCurrentRefinement
|
|
7619
|
+
var currentRefinement = getCurrentRefinement(props, searchState, context);
|
|
7615
7620
|
var nextRefinement;
|
|
7616
7621
|
|
|
7617
7622
|
if (currentRefinement === null) {
|
|
@@ -7632,14 +7637,14 @@ function getValue$2(path, props, searchState, context) {
|
|
|
7632
7637
|
return nextRefinement;
|
|
7633
7638
|
}
|
|
7634
7639
|
|
|
7635
|
-
function transformValue(value, props, searchState, context) {
|
|
7640
|
+
function transformValue$1(value, props, searchState, context) {
|
|
7636
7641
|
return value.map(function (v) {
|
|
7637
7642
|
return {
|
|
7638
7643
|
label: v.name,
|
|
7639
|
-
value: getValue
|
|
7644
|
+
value: getValue(v.path, props, searchState, context),
|
|
7640
7645
|
count: v.count,
|
|
7641
7646
|
isRefined: v.isRefined,
|
|
7642
|
-
items: v.data && transformValue(v.data, props, searchState, context)
|
|
7647
|
+
items: v.data && transformValue$1(v.data, props, searchState, context)
|
|
7643
7648
|
};
|
|
7644
7649
|
});
|
|
7645
7650
|
}
|
|
@@ -7655,20 +7660,20 @@ var truncate = function truncate() {
|
|
|
7655
7660
|
});
|
|
7656
7661
|
};
|
|
7657
7662
|
|
|
7658
|
-
function _refine$
|
|
7659
|
-
var id = getId$
|
|
7663
|
+
function _refine$1(props, searchState, nextRefinement, context) {
|
|
7664
|
+
var id = getId$3(props);
|
|
7660
7665
|
|
|
7661
7666
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7662
7667
|
|
|
7663
7668
|
var resetPage = true;
|
|
7664
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
7669
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$1);
|
|
7665
7670
|
}
|
|
7666
7671
|
|
|
7667
|
-
function _cleanUp
|
|
7668
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
7672
|
+
function _cleanUp(props, searchState, context) {
|
|
7673
|
+
return cleanUpValue(searchState, context, "".concat(namespace$1, ".").concat(getId$3(props)));
|
|
7669
7674
|
}
|
|
7670
7675
|
|
|
7671
|
-
var sortBy
|
|
7676
|
+
var sortBy = ['name:asc'];
|
|
7672
7677
|
/**
|
|
7673
7678
|
* connectHierarchicalMenu connector provides the logic to build a widget that will
|
|
7674
7679
|
* give the user the ability to explore a tree-like structure.
|
|
@@ -7750,7 +7755,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7750
7755
|
var showMore = props.showMore,
|
|
7751
7756
|
limit = props.limit,
|
|
7752
7757
|
showMoreLimit = props.showMoreLimit;
|
|
7753
|
-
var id = getId$
|
|
7758
|
+
var id = getId$3(props);
|
|
7754
7759
|
var results = getResults(searchResults, {
|
|
7755
7760
|
ais: props.contextValue,
|
|
7756
7761
|
multiIndexContext: props.indexContextValue
|
|
@@ -7760,7 +7765,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7760
7765
|
if (!isFacetPresent) {
|
|
7761
7766
|
return {
|
|
7762
7767
|
items: [],
|
|
7763
|
-
currentRefinement: getCurrentRefinement
|
|
7768
|
+
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7764
7769
|
ais: props.contextValue,
|
|
7765
7770
|
multiIndexContext: props.indexContextValue
|
|
7766
7771
|
}),
|
|
@@ -7770,16 +7775,16 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7770
7775
|
|
|
7771
7776
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7772
7777
|
var value = results.getFacetValues(id, {
|
|
7773
|
-
sortBy: sortBy
|
|
7778
|
+
sortBy: sortBy
|
|
7774
7779
|
});
|
|
7775
|
-
var items = value.data ? transformValue(value.data, props, searchState, {
|
|
7780
|
+
var items = value.data ? transformValue$1(value.data, props, searchState, {
|
|
7776
7781
|
ais: props.contextValue,
|
|
7777
7782
|
multiIndexContext: props.indexContextValue
|
|
7778
7783
|
}) : [];
|
|
7779
7784
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7780
7785
|
return {
|
|
7781
7786
|
items: truncate(transformedItems, itemsLimit),
|
|
7782
|
-
currentRefinement: getCurrentRefinement
|
|
7787
|
+
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7783
7788
|
ais: props.contextValue,
|
|
7784
7789
|
multiIndexContext: props.indexContextValue
|
|
7785
7790
|
}),
|
|
@@ -7787,13 +7792,13 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7787
7792
|
};
|
|
7788
7793
|
},
|
|
7789
7794
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7790
|
-
return _refine$
|
|
7795
|
+
return _refine$1(props, searchState, nextRefinement, {
|
|
7791
7796
|
ais: props.contextValue,
|
|
7792
7797
|
multiIndexContext: props.indexContextValue
|
|
7793
7798
|
});
|
|
7794
7799
|
},
|
|
7795
7800
|
cleanUp: function cleanUp(props, searchState) {
|
|
7796
|
-
return _cleanUp
|
|
7801
|
+
return _cleanUp(props, searchState, {
|
|
7797
7802
|
ais: props.contextValue,
|
|
7798
7803
|
multiIndexContext: props.indexContextValue
|
|
7799
7804
|
});
|
|
@@ -7807,7 +7812,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7807
7812
|
limit = props.limit,
|
|
7808
7813
|
showMoreLimit = props.showMoreLimit,
|
|
7809
7814
|
contextValue = props.contextValue;
|
|
7810
|
-
var id = getId$
|
|
7815
|
+
var id = getId$3(props);
|
|
7811
7816
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7812
7817
|
searchParameters = searchParameters.addHierarchicalFacet({
|
|
7813
7818
|
name: id,
|
|
@@ -7818,7 +7823,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7818
7823
|
}).setQueryParameters({
|
|
7819
7824
|
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, itemsLimit)
|
|
7820
7825
|
});
|
|
7821
|
-
var currentRefinement = getCurrentRefinement
|
|
7826
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7822
7827
|
ais: contextValue,
|
|
7823
7828
|
multiIndexContext: props.indexContextValue
|
|
7824
7829
|
});
|
|
@@ -7831,8 +7836,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7831
7836
|
},
|
|
7832
7837
|
getMetadata: function getMetadata(props, searchState) {
|
|
7833
7838
|
var rootAttribute = props.attributes[0];
|
|
7834
|
-
var id = getId$
|
|
7835
|
-
var currentRefinement = getCurrentRefinement
|
|
7839
|
+
var id = getId$3(props);
|
|
7840
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7836
7841
|
ais: props.contextValue,
|
|
7837
7842
|
multiIndexContext: props.indexContextValue
|
|
7838
7843
|
});
|
|
@@ -7840,7 +7845,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7840
7845
|
label: "".concat(rootAttribute, ": ").concat(currentRefinement),
|
|
7841
7846
|
attribute: rootAttribute,
|
|
7842
7847
|
value: function value(nextState) {
|
|
7843
|
-
return _refine$
|
|
7848
|
+
return _refine$1(props, nextState, '', {
|
|
7844
7849
|
ais: props.contextValue,
|
|
7845
7850
|
multiIndexContext: props.indexContextValue
|
|
7846
7851
|
});
|
|
@@ -8017,12 +8022,12 @@ var connectHits = createConnectorWithContext({
|
|
|
8017
8022
|
}
|
|
8018
8023
|
});
|
|
8019
8024
|
|
|
8020
|
-
function getId$
|
|
8025
|
+
function getId$4() {
|
|
8021
8026
|
return 'hitsPerPage';
|
|
8022
8027
|
}
|
|
8023
8028
|
|
|
8024
|
-
function getCurrentRefinement$
|
|
8025
|
-
var id = getId$
|
|
8029
|
+
function getCurrentRefinement$1(props, searchState, context) {
|
|
8030
|
+
var id = getId$4();
|
|
8026
8031
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
8027
8032
|
|
|
8028
8033
|
if (typeof currentRefinement === 'string') {
|
|
@@ -8057,7 +8062,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8057
8062
|
transformItems: PropTypes.func
|
|
8058
8063
|
},
|
|
8059
8064
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
8060
|
-
var currentRefinement = getCurrentRefinement$
|
|
8065
|
+
var currentRefinement = getCurrentRefinement$1(props, searchState, {
|
|
8061
8066
|
ais: props.contextValue,
|
|
8062
8067
|
multiIndexContext: props.indexContextValue
|
|
8063
8068
|
});
|
|
@@ -8074,7 +8079,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8074
8079
|
};
|
|
8075
8080
|
},
|
|
8076
8081
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8077
|
-
var id = getId$
|
|
8082
|
+
var id = getId$4();
|
|
8078
8083
|
|
|
8079
8084
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
8080
8085
|
|
|
@@ -8088,27 +8093,27 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8088
8093
|
return cleanUpValue(searchState, {
|
|
8089
8094
|
ais: props.contextValue,
|
|
8090
8095
|
multiIndexContext: props.indexContextValue
|
|
8091
|
-
}, getId$
|
|
8096
|
+
}, getId$4());
|
|
8092
8097
|
},
|
|
8093
8098
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8094
|
-
return searchParameters.setHitsPerPage(getCurrentRefinement$
|
|
8099
|
+
return searchParameters.setHitsPerPage(getCurrentRefinement$1(props, searchState, {
|
|
8095
8100
|
ais: props.contextValue,
|
|
8096
8101
|
multiIndexContext: props.indexContextValue
|
|
8097
8102
|
}));
|
|
8098
8103
|
},
|
|
8099
8104
|
getMetadata: function getMetadata() {
|
|
8100
8105
|
return {
|
|
8101
|
-
id: getId$
|
|
8106
|
+
id: getId$4()
|
|
8102
8107
|
};
|
|
8103
8108
|
}
|
|
8104
8109
|
});
|
|
8105
8110
|
|
|
8106
|
-
function getId$
|
|
8111
|
+
function getId$5() {
|
|
8107
8112
|
return 'page';
|
|
8108
8113
|
}
|
|
8109
8114
|
|
|
8110
|
-
function getCurrentRefinement$
|
|
8111
|
-
var id = getId$
|
|
8115
|
+
function getCurrentRefinement$2(props, searchState, context) {
|
|
8116
|
+
var id = getId$5();
|
|
8112
8117
|
var page = 1;
|
|
8113
8118
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8114
8119
|
|
|
@@ -8120,9 +8125,9 @@ function getCurrentRefinement$9(props, searchState, context) {
|
|
|
8120
8125
|
}
|
|
8121
8126
|
|
|
8122
8127
|
function getStateWithoutPage(state) {
|
|
8123
|
-
var _ref = state || {}
|
|
8124
|
-
_ref.page
|
|
8125
|
-
|
|
8128
|
+
var _ref = state || {},
|
|
8129
|
+
page = _ref.page,
|
|
8130
|
+
rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8126
8131
|
|
|
8127
8132
|
return rest;
|
|
8128
8133
|
}
|
|
@@ -8231,14 +8236,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8231
8236
|
},
|
|
8232
8237
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8233
8238
|
return searchParameters.setQueryParameters({
|
|
8234
|
-
page: getCurrentRefinement$
|
|
8239
|
+
page: getCurrentRefinement$2(props, searchState, {
|
|
8235
8240
|
ais: props.contextValue,
|
|
8236
8241
|
multiIndexContext: props.indexContextValue
|
|
8237
8242
|
}) - 1
|
|
8238
8243
|
});
|
|
8239
8244
|
},
|
|
8240
8245
|
refine: function refine(props, searchState, event, index) {
|
|
8241
|
-
var id = getId$
|
|
8246
|
+
var id = getId$5();
|
|
8242
8247
|
|
|
8243
8248
|
var nextValue = _defineProperty({}, id, index + 1);
|
|
8244
8249
|
|
|
@@ -8250,14 +8255,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8250
8255
|
}
|
|
8251
8256
|
});
|
|
8252
8257
|
|
|
8253
|
-
var namespace$
|
|
8258
|
+
var namespace$2 = 'menu';
|
|
8254
8259
|
|
|
8255
|
-
function getId$
|
|
8260
|
+
function getId$6(props) {
|
|
8256
8261
|
return props.attribute;
|
|
8257
8262
|
}
|
|
8258
8263
|
|
|
8259
|
-
function getCurrentRefinement$
|
|
8260
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8264
|
+
function getCurrentRefinement$3(props, searchState, context) {
|
|
8265
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)), null);
|
|
8261
8266
|
|
|
8262
8267
|
if (currentRefinement === '') {
|
|
8263
8268
|
return null;
|
|
@@ -8267,28 +8272,28 @@ function getCurrentRefinement$8(props, searchState, context) {
|
|
|
8267
8272
|
}
|
|
8268
8273
|
|
|
8269
8274
|
function getValue$1(name, props, searchState, context) {
|
|
8270
|
-
var currentRefinement = getCurrentRefinement$
|
|
8275
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, context);
|
|
8271
8276
|
return name === currentRefinement ? '' : name;
|
|
8272
8277
|
}
|
|
8273
8278
|
|
|
8274
|
-
function getLimit
|
|
8279
|
+
function getLimit(_ref) {
|
|
8275
8280
|
var showMore = _ref.showMore,
|
|
8276
8281
|
limit = _ref.limit,
|
|
8277
8282
|
showMoreLimit = _ref.showMoreLimit;
|
|
8278
8283
|
return showMore ? showMoreLimit : limit;
|
|
8279
8284
|
}
|
|
8280
8285
|
|
|
8281
|
-
function _refine$
|
|
8282
|
-
var id = getId$
|
|
8286
|
+
function _refine$2(props, searchState, nextRefinement, context) {
|
|
8287
|
+
var id = getId$6(props);
|
|
8283
8288
|
|
|
8284
8289
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : '');
|
|
8285
8290
|
|
|
8286
8291
|
var resetPage = true;
|
|
8287
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
8292
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$2);
|
|
8288
8293
|
}
|
|
8289
8294
|
|
|
8290
|
-
function _cleanUp$
|
|
8291
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
8295
|
+
function _cleanUp$1(props, searchState, context) {
|
|
8296
|
+
return cleanUpValue(searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)));
|
|
8292
8297
|
}
|
|
8293
8298
|
|
|
8294
8299
|
var defaultSortBy = ['count:desc', 'name:asc'];
|
|
@@ -8347,7 +8352,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8347
8352
|
if (!canRefine) {
|
|
8348
8353
|
return {
|
|
8349
8354
|
items: [],
|
|
8350
|
-
currentRefinement: getCurrentRefinement$
|
|
8355
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
8351
8356
|
ais: props.contextValue,
|
|
8352
8357
|
multiIndexContext: props.indexContextValue
|
|
8353
8358
|
}),
|
|
@@ -8394,8 +8399,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8394
8399
|
|
|
8395
8400
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
8396
8401
|
return {
|
|
8397
|
-
items: transformedItems.slice(0, getLimit
|
|
8398
|
-
currentRefinement: getCurrentRefinement$
|
|
8402
|
+
items: transformedItems.slice(0, getLimit(props)),
|
|
8403
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
8399
8404
|
ais: props.contextValue,
|
|
8400
8405
|
multiIndexContext: props.indexContextValue
|
|
8401
8406
|
}),
|
|
@@ -8405,7 +8410,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8405
8410
|
};
|
|
8406
8411
|
},
|
|
8407
8412
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8408
|
-
return _refine$
|
|
8413
|
+
return _refine$2(props, searchState, nextRefinement, {
|
|
8409
8414
|
ais: props.contextValue,
|
|
8410
8415
|
multiIndexContext: props.indexContextValue
|
|
8411
8416
|
});
|
|
@@ -8414,11 +8419,11 @@ var connectMenu = createConnectorWithContext({
|
|
|
8414
8419
|
return {
|
|
8415
8420
|
facetName: props.attribute,
|
|
8416
8421
|
query: nextRefinement,
|
|
8417
|
-
maxFacetHits: getLimit
|
|
8422
|
+
maxFacetHits: getLimit(props)
|
|
8418
8423
|
};
|
|
8419
8424
|
},
|
|
8420
8425
|
cleanUp: function cleanUp(props, searchState) {
|
|
8421
|
-
return _cleanUp$
|
|
8426
|
+
return _cleanUp$1(props, searchState, {
|
|
8422
8427
|
ais: props.contextValue,
|
|
8423
8428
|
multiIndexContext: props.indexContextValue
|
|
8424
8429
|
});
|
|
@@ -8426,10 +8431,10 @@ var connectMenu = createConnectorWithContext({
|
|
|
8426
8431
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8427
8432
|
var attribute = props.attribute;
|
|
8428
8433
|
searchParameters = searchParameters.setQueryParameters({
|
|
8429
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit
|
|
8434
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
8430
8435
|
});
|
|
8431
8436
|
searchParameters = searchParameters.addDisjunctiveFacet(attribute);
|
|
8432
|
-
var currentRefinement = getCurrentRefinement$
|
|
8437
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
8433
8438
|
ais: props.contextValue,
|
|
8434
8439
|
multiIndexContext: props.indexContextValue
|
|
8435
8440
|
});
|
|
@@ -8441,8 +8446,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8441
8446
|
return searchParameters;
|
|
8442
8447
|
},
|
|
8443
8448
|
getMetadata: function getMetadata(props, searchState) {
|
|
8444
|
-
var id = getId$
|
|
8445
|
-
var currentRefinement = getCurrentRefinement$
|
|
8449
|
+
var id = getId$6(props);
|
|
8450
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
8446
8451
|
ais: props.contextValue,
|
|
8447
8452
|
multiIndexContext: props.indexContextValue
|
|
8448
8453
|
});
|
|
@@ -8456,7 +8461,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8456
8461
|
label: "".concat(props.attribute, ": ").concat(currentRefinement),
|
|
8457
8462
|
attribute: props.attribute,
|
|
8458
8463
|
value: function value(nextState) {
|
|
8459
|
-
return _refine$
|
|
8464
|
+
return _refine$2(props, nextState, '', {
|
|
8460
8465
|
ais: props.contextValue,
|
|
8461
8466
|
multiIndexContext: props.indexContextValue
|
|
8462
8467
|
});
|
|
@@ -8472,17 +8477,17 @@ function _arrayWithHoles(arr) {
|
|
|
8472
8477
|
}
|
|
8473
8478
|
|
|
8474
8479
|
function _iterableToArrayLimit(arr, i) {
|
|
8475
|
-
|
|
8480
|
+
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
|
|
8481
|
+
return;
|
|
8482
|
+
}
|
|
8476
8483
|
|
|
8477
|
-
if (_i == null) return;
|
|
8478
8484
|
var _arr = [];
|
|
8479
8485
|
var _n = true;
|
|
8480
8486
|
var _d = false;
|
|
8481
|
-
|
|
8482
|
-
var _s, _e;
|
|
8487
|
+
var _e = undefined;
|
|
8483
8488
|
|
|
8484
8489
|
try {
|
|
8485
|
-
for (_i =
|
|
8490
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
8486
8491
|
_arr.push(_s.value);
|
|
8487
8492
|
|
|
8488
8493
|
if (i && _arr.length === i) break;
|
|
@@ -8502,11 +8507,11 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
8502
8507
|
}
|
|
8503
8508
|
|
|
8504
8509
|
function _nonIterableRest() {
|
|
8505
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
8510
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
8506
8511
|
}
|
|
8507
8512
|
|
|
8508
8513
|
function _slicedToArray(arr, i) {
|
|
8509
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) ||
|
|
8514
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
|
8510
8515
|
}
|
|
8511
8516
|
|
|
8512
8517
|
function stringifyItem(item) {
|
|
@@ -8533,19 +8538,19 @@ function parseItem(value) {
|
|
|
8533
8538
|
endStr = _value$split2[1];
|
|
8534
8539
|
|
|
8535
8540
|
return {
|
|
8536
|
-
start: startStr.length > 0 ?
|
|
8537
|
-
end: endStr.length > 0 ?
|
|
8541
|
+
start: startStr.length > 0 ? parseInt(startStr, 10) : null,
|
|
8542
|
+
end: endStr.length > 0 ? parseInt(endStr, 10) : null
|
|
8538
8543
|
};
|
|
8539
8544
|
}
|
|
8540
8545
|
|
|
8541
8546
|
var namespace$3 = 'multiRange';
|
|
8542
8547
|
|
|
8543
|
-
function getId$
|
|
8548
|
+
function getId$7(props) {
|
|
8544
8549
|
return props.attribute;
|
|
8545
8550
|
}
|
|
8546
8551
|
|
|
8547
|
-
function getCurrentRefinement$
|
|
8548
|
-
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8552
|
+
function getCurrentRefinement$4(props, searchState, context) {
|
|
8553
|
+
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$7(props)), '');
|
|
8549
8554
|
}
|
|
8550
8555
|
|
|
8551
8556
|
function isRefinementsRangeIncludesInsideItemRange(stats, start, end) {
|
|
@@ -8564,15 +8569,15 @@ function itemHasRefinement(attribute, results, value) {
|
|
|
8564
8569
|
return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end)));
|
|
8565
8570
|
}
|
|
8566
8571
|
|
|
8567
|
-
function _refine$
|
|
8568
|
-
var nextValue = _defineProperty({}, getId$
|
|
8572
|
+
function _refine$3(props, searchState, nextRefinement, context) {
|
|
8573
|
+
var nextValue = _defineProperty({}, getId$7(props), nextRefinement);
|
|
8569
8574
|
|
|
8570
8575
|
var resetPage = true;
|
|
8571
8576
|
return refineValue(searchState, nextValue, context, resetPage, namespace$3);
|
|
8572
8577
|
}
|
|
8573
8578
|
|
|
8574
|
-
function _cleanUp$
|
|
8575
|
-
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8579
|
+
function _cleanUp$2(props, searchState, context) {
|
|
8580
|
+
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$7(props)));
|
|
8576
8581
|
}
|
|
8577
8582
|
/**
|
|
8578
8583
|
* connectNumericMenu connector provides the logic to build a widget that will
|
|
@@ -8606,7 +8611,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8606
8611
|
},
|
|
8607
8612
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
8608
8613
|
var attribute = props.attribute;
|
|
8609
|
-
var currentRefinement = getCurrentRefinement$
|
|
8614
|
+
var currentRefinement = getCurrentRefinement$4(props, searchState, {
|
|
8610
8615
|
ais: props.contextValue,
|
|
8611
8616
|
multiIndexContext: props.indexContextValue
|
|
8612
8617
|
});
|
|
@@ -8620,11 +8625,11 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8620
8625
|
label: item.label,
|
|
8621
8626
|
value: value,
|
|
8622
8627
|
isRefined: value === currentRefinement,
|
|
8623
|
-
noRefinement: results ? itemHasRefinement(getId$
|
|
8628
|
+
noRefinement: results ? itemHasRefinement(getId$7(props), results, value) : false
|
|
8624
8629
|
};
|
|
8625
8630
|
});
|
|
8626
8631
|
var stats = results && results.getFacetByName(attribute) ? results.getFacetStats(attribute) : null;
|
|
8627
|
-
var refinedItem = find
|
|
8632
|
+
var refinedItem = find(items, function (item) {
|
|
8628
8633
|
return item.isRefined === true;
|
|
8629
8634
|
});
|
|
8630
8635
|
|
|
@@ -8649,13 +8654,13 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8649
8654
|
};
|
|
8650
8655
|
},
|
|
8651
8656
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8652
|
-
return _refine$
|
|
8657
|
+
return _refine$3(props, searchState, nextRefinement, {
|
|
8653
8658
|
ais: props.contextValue,
|
|
8654
8659
|
multiIndexContext: props.indexContextValue
|
|
8655
8660
|
});
|
|
8656
8661
|
},
|
|
8657
8662
|
cleanUp: function cleanUp(props, searchState) {
|
|
8658
|
-
return _cleanUp$
|
|
8663
|
+
return _cleanUp$2(props, searchState, {
|
|
8659
8664
|
ais: props.contextValue,
|
|
8660
8665
|
multiIndexContext: props.indexContextValue
|
|
8661
8666
|
});
|
|
@@ -8663,7 +8668,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8663
8668
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8664
8669
|
var attribute = props.attribute;
|
|
8665
8670
|
|
|
8666
|
-
var _parseItem = parseItem(getCurrentRefinement$
|
|
8671
|
+
var _parseItem = parseItem(getCurrentRefinement$4(props, searchState, {
|
|
8667
8672
|
ais: props.contextValue,
|
|
8668
8673
|
multiIndexContext: props.indexContextValue
|
|
8669
8674
|
})),
|
|
@@ -8683,8 +8688,8 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8683
8688
|
return searchParameters;
|
|
8684
8689
|
},
|
|
8685
8690
|
getMetadata: function getMetadata(props, searchState) {
|
|
8686
|
-
var id = getId$
|
|
8687
|
-
var value = getCurrentRefinement$
|
|
8691
|
+
var id = getId$7(props);
|
|
8692
|
+
var value = getCurrentRefinement$4(props, searchState, {
|
|
8688
8693
|
ais: props.contextValue,
|
|
8689
8694
|
multiIndexContext: props.indexContextValue
|
|
8690
8695
|
});
|
|
@@ -8695,7 +8700,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8695
8700
|
});
|
|
8696
8701
|
|
|
8697
8702
|
if (value !== '') {
|
|
8698
|
-
var _find = find
|
|
8703
|
+
var _find = find(props.items, function (item) {
|
|
8699
8704
|
return stringifyItem(item) === value;
|
|
8700
8705
|
}),
|
|
8701
8706
|
label = _find.label;
|
|
@@ -8705,7 +8710,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8705
8710
|
attribute: props.attribute,
|
|
8706
8711
|
currentRefinement: label,
|
|
8707
8712
|
value: function value(nextState) {
|
|
8708
|
-
return _refine$
|
|
8713
|
+
return _refine$3(props, nextState, '', {
|
|
8709
8714
|
ais: props.contextValue,
|
|
8710
8715
|
multiIndexContext: props.indexContextValue
|
|
8711
8716
|
});
|
|
@@ -8721,12 +8726,12 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8721
8726
|
}
|
|
8722
8727
|
});
|
|
8723
8728
|
|
|
8724
|
-
function getId$
|
|
8729
|
+
function getId$8() {
|
|
8725
8730
|
return 'page';
|
|
8726
8731
|
}
|
|
8727
8732
|
|
|
8728
|
-
function getCurrentRefinement$
|
|
8729
|
-
var id = getId$
|
|
8733
|
+
function getCurrentRefinement$5(props, searchState, context) {
|
|
8734
|
+
var id = getId$8();
|
|
8730
8735
|
var page = 1;
|
|
8731
8736
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8732
8737
|
|
|
@@ -8737,8 +8742,8 @@ function getCurrentRefinement$6(props, searchState, context) {
|
|
|
8737
8742
|
return currentRefinement;
|
|
8738
8743
|
}
|
|
8739
8744
|
|
|
8740
|
-
function _refine$
|
|
8741
|
-
var id = getId$
|
|
8745
|
+
function _refine$4(props, searchState, nextPage, context) {
|
|
8746
|
+
var id = getId$8();
|
|
8742
8747
|
|
|
8743
8748
|
var nextValue = _defineProperty({}, id, nextPage);
|
|
8744
8749
|
|
|
@@ -8778,7 +8783,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8778
8783
|
var nbPages = results.nbPages;
|
|
8779
8784
|
return {
|
|
8780
8785
|
nbPages: nbPages,
|
|
8781
|
-
currentRefinement: getCurrentRefinement$
|
|
8786
|
+
currentRefinement: getCurrentRefinement$5(props, searchState, {
|
|
8782
8787
|
ais: props.contextValue,
|
|
8783
8788
|
multiIndexContext: props.indexContextValue
|
|
8784
8789
|
}),
|
|
@@ -8786,7 +8791,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8786
8791
|
};
|
|
8787
8792
|
},
|
|
8788
8793
|
refine: function refine(props, searchState, nextPage) {
|
|
8789
|
-
return _refine$
|
|
8794
|
+
return _refine$4(props, searchState, nextPage, {
|
|
8790
8795
|
ais: props.contextValue,
|
|
8791
8796
|
multiIndexContext: props.indexContextValue
|
|
8792
8797
|
});
|
|
@@ -8795,17 +8800,17 @@ var connectPagination = createConnectorWithContext({
|
|
|
8795
8800
|
return cleanUpValue(searchState, {
|
|
8796
8801
|
ais: props.contextValue,
|
|
8797
8802
|
multiIndexContext: props.indexContextValue
|
|
8798
|
-
}, getId$
|
|
8803
|
+
}, getId$8());
|
|
8799
8804
|
},
|
|
8800
8805
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8801
|
-
return searchParameters.setPage(getCurrentRefinement$
|
|
8806
|
+
return searchParameters.setPage(getCurrentRefinement$5(props, searchState, {
|
|
8802
8807
|
ais: props.contextValue,
|
|
8803
8808
|
multiIndexContext: props.indexContextValue
|
|
8804
8809
|
}) - 1);
|
|
8805
8810
|
},
|
|
8806
8811
|
getMetadata: function getMetadata() {
|
|
8807
8812
|
return {
|
|
8808
|
-
id: getId$
|
|
8813
|
+
id: getId$8()
|
|
8809
8814
|
};
|
|
8810
8815
|
}
|
|
8811
8816
|
});
|
|
@@ -8851,11 +8856,11 @@ var connectPoweredBy = createConnectorWithContext({
|
|
|
8851
8856
|
* @providedPropType {number} precision - Number of digits after decimal point to use.
|
|
8852
8857
|
*/
|
|
8853
8858
|
|
|
8854
|
-
function getId$
|
|
8859
|
+
function getId$9(props) {
|
|
8855
8860
|
return props.attribute;
|
|
8856
8861
|
}
|
|
8857
8862
|
|
|
8858
|
-
var namespace$
|
|
8863
|
+
var namespace$4 = 'range';
|
|
8859
8864
|
|
|
8860
8865
|
function getCurrentRange(boundaries, stats, precision) {
|
|
8861
8866
|
var pow = Math.pow(10, precision);
|
|
@@ -8885,8 +8890,8 @@ function getCurrentRange(boundaries, stats, precision) {
|
|
|
8885
8890
|
};
|
|
8886
8891
|
}
|
|
8887
8892
|
|
|
8888
|
-
function getCurrentRefinement$
|
|
8889
|
-
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8893
|
+
function getCurrentRefinement$6(props, searchState, currentRange, context) {
|
|
8894
|
+
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)), {}),
|
|
8890
8895
|
min = _getCurrentRefinement.min,
|
|
8891
8896
|
max = _getCurrentRefinement.max;
|
|
8892
8897
|
|
|
@@ -8952,7 +8957,7 @@ function nextValueForRefinement(hasBound, isReset, range, value) {
|
|
|
8952
8957
|
return next;
|
|
8953
8958
|
}
|
|
8954
8959
|
|
|
8955
|
-
function _refine$
|
|
8960
|
+
function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
8956
8961
|
var nextMin = nextRefinement.min,
|
|
8957
8962
|
nextMax = nextRefinement.max;
|
|
8958
8963
|
var currentMinRange = currentRange.min,
|
|
@@ -8976,7 +8981,7 @@ function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
|
8976
8981
|
throw Error("You can't provide max value greater than range.");
|
|
8977
8982
|
}
|
|
8978
8983
|
|
|
8979
|
-
var id = getId$
|
|
8984
|
+
var id = getId$9(props);
|
|
8980
8985
|
var resetPage = true;
|
|
8981
8986
|
|
|
8982
8987
|
var nextValue = _defineProperty({}, id, {
|
|
@@ -8984,11 +8989,11 @@ function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
|
8984
8989
|
max: nextValueForRefinement(props.max !== undefined, isMaxReset, currentMaxRange, nextMaxAsNumber)
|
|
8985
8990
|
});
|
|
8986
8991
|
|
|
8987
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
8992
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$4);
|
|
8988
8993
|
}
|
|
8989
8994
|
|
|
8990
|
-
function _cleanUp$
|
|
8991
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
8995
|
+
function _cleanUp$3(props, searchState, context) {
|
|
8996
|
+
return cleanUpValue(searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)));
|
|
8992
8997
|
}
|
|
8993
8998
|
|
|
8994
8999
|
var connectRange = createConnectorWithContext({
|
|
@@ -9043,7 +9048,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9043
9048
|
min: rangeMin,
|
|
9044
9049
|
max: rangeMax
|
|
9045
9050
|
};
|
|
9046
|
-
var currentRefinement = getCurrentRefinement$
|
|
9051
|
+
var currentRefinement = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9047
9052
|
ais: props.contextValue,
|
|
9048
9053
|
multiIndexContext: props.indexContextValue
|
|
9049
9054
|
});
|
|
@@ -9057,13 +9062,13 @@ var connectRange = createConnectorWithContext({
|
|
|
9057
9062
|
};
|
|
9058
9063
|
},
|
|
9059
9064
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9060
|
-
return _refine$
|
|
9065
|
+
return _refine$5(props, searchState, nextRefinement, this._currentRange, {
|
|
9061
9066
|
ais: props.contextValue,
|
|
9062
9067
|
multiIndexContext: props.indexContextValue
|
|
9063
9068
|
});
|
|
9064
9069
|
},
|
|
9065
9070
|
cleanUp: function cleanUp(props, searchState) {
|
|
9066
|
-
return _cleanUp$
|
|
9071
|
+
return _cleanUp$3(props, searchState, {
|
|
9067
9072
|
ais: props.contextValue,
|
|
9068
9073
|
multiIndexContext: props.indexContextValue
|
|
9069
9074
|
});
|
|
@@ -9071,7 +9076,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9071
9076
|
getSearchParameters: function getSearchParameters(params, props, searchState) {
|
|
9072
9077
|
var attribute = props.attribute;
|
|
9073
9078
|
|
|
9074
|
-
var _getCurrentRefinement2 = getCurrentRefinement$
|
|
9079
|
+
var _getCurrentRefinement2 = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9075
9080
|
ais: props.contextValue,
|
|
9076
9081
|
multiIndexContext: props.indexContextValue
|
|
9077
9082
|
}),
|
|
@@ -9097,7 +9102,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9097
9102
|
minRange = _this$_currentRange.min,
|
|
9098
9103
|
maxRange = _this$_currentRange.max;
|
|
9099
9104
|
|
|
9100
|
-
var _getCurrentRefinement3 = getCurrentRefinement$
|
|
9105
|
+
var _getCurrentRefinement3 = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9101
9106
|
ais: props.contextValue,
|
|
9102
9107
|
multiIndexContext: props.indexContextValue
|
|
9103
9108
|
}),
|
|
@@ -9116,7 +9121,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9116
9121
|
label: fragments.join(''),
|
|
9117
9122
|
attribute: props.attribute,
|
|
9118
9123
|
value: function value(nextState) {
|
|
9119
|
-
return _refine$
|
|
9124
|
+
return _refine$5(props, nextState, {}, _this._currentRange, {
|
|
9120
9125
|
ais: props.contextValue,
|
|
9121
9126
|
multiIndexContext: props.indexContextValue
|
|
9122
9127
|
});
|
|
@@ -9132,7 +9137,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9132
9137
|
}
|
|
9133
9138
|
|
|
9134
9139
|
return {
|
|
9135
|
-
id: getId$
|
|
9140
|
+
id: getId$9(props),
|
|
9136
9141
|
index: getIndexId({
|
|
9137
9142
|
ais: props.contextValue,
|
|
9138
9143
|
multiIndexContext: props.indexContextValue
|
|
@@ -9142,14 +9147,14 @@ var connectRange = createConnectorWithContext({
|
|
|
9142
9147
|
}
|
|
9143
9148
|
});
|
|
9144
9149
|
|
|
9145
|
-
var namespace$
|
|
9150
|
+
var namespace$5 = 'refinementList';
|
|
9146
9151
|
|
|
9147
|
-
function getId$
|
|
9152
|
+
function getId$a(props) {
|
|
9148
9153
|
return props.attribute;
|
|
9149
9154
|
}
|
|
9150
9155
|
|
|
9151
|
-
function getCurrentRefinement$
|
|
9152
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
9156
|
+
function getCurrentRefinement$7(props, searchState, context) {
|
|
9157
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$5, ".").concat(getId$a(props)), []);
|
|
9153
9158
|
|
|
9154
9159
|
if (typeof currentRefinement !== 'string') {
|
|
9155
9160
|
return currentRefinement;
|
|
@@ -9162,8 +9167,8 @@ function getCurrentRefinement$4(props, searchState, context) {
|
|
|
9162
9167
|
return [];
|
|
9163
9168
|
}
|
|
9164
9169
|
|
|
9165
|
-
function getValue(name, props, searchState, context) {
|
|
9166
|
-
var currentRefinement = getCurrentRefinement$
|
|
9170
|
+
function getValue$2(name, props, searchState, context) {
|
|
9171
|
+
var currentRefinement = getCurrentRefinement$7(props, searchState, context);
|
|
9167
9172
|
var isAnewValue = currentRefinement.indexOf(name) === -1;
|
|
9168
9173
|
var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates
|
|
9169
9174
|
: currentRefinement.filter(function (selectedValue) {
|
|
@@ -9173,15 +9178,15 @@ function getValue(name, props, searchState, context) {
|
|
|
9173
9178
|
return nextRefinement;
|
|
9174
9179
|
}
|
|
9175
9180
|
|
|
9176
|
-
function getLimit(_ref) {
|
|
9181
|
+
function getLimit$1(_ref) {
|
|
9177
9182
|
var showMore = _ref.showMore,
|
|
9178
9183
|
limit = _ref.limit,
|
|
9179
9184
|
showMoreLimit = _ref.showMoreLimit;
|
|
9180
9185
|
return showMore ? showMoreLimit : limit;
|
|
9181
9186
|
}
|
|
9182
9187
|
|
|
9183
|
-
function _refine$
|
|
9184
|
-
var id = getId$
|
|
9188
|
+
function _refine$6(props, searchState, nextRefinement, context) {
|
|
9189
|
+
var id = getId$a(props); // Setting the value to an empty string ensures that it is persisted in
|
|
9185
9190
|
// the URL as an empty value.
|
|
9186
9191
|
// This is necessary in the case where `defaultRefinement` contains one
|
|
9187
9192
|
// item and we try to deselect it. `nextSelected` would be an empty array,
|
|
@@ -9192,11 +9197,11 @@ function _refine$3(props, searchState, nextRefinement, context) {
|
|
|
9192
9197
|
var nextValue = _defineProperty({}, id, nextRefinement.length > 0 ? nextRefinement : '');
|
|
9193
9198
|
|
|
9194
9199
|
var resetPage = true;
|
|
9195
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9200
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$5);
|
|
9196
9201
|
}
|
|
9197
9202
|
|
|
9198
|
-
function _cleanUp$
|
|
9199
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9203
|
+
function _cleanUp$4(props, searchState, context) {
|
|
9204
|
+
return cleanUpValue(searchState, context, "".concat(namespace$5, ".").concat(getId$a(props)));
|
|
9200
9205
|
}
|
|
9201
9206
|
/**
|
|
9202
9207
|
* connectRefinementList connector provides the logic to build a widget that will
|
|
@@ -9223,7 +9228,7 @@ function _cleanUp$3(props, searchState, context) {
|
|
|
9223
9228
|
*/
|
|
9224
9229
|
|
|
9225
9230
|
|
|
9226
|
-
var sortBy = ['isRefined', 'count:desc', 'name:asc'];
|
|
9231
|
+
var sortBy$1 = ['isRefined', 'count:desc', 'name:asc'];
|
|
9227
9232
|
var connectRefinementList = createConnectorWithContext({
|
|
9228
9233
|
displayName: 'AlgoliaRefinementList',
|
|
9229
9234
|
propTypes: {
|
|
@@ -9261,7 +9266,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9261
9266
|
if (!canRefine) {
|
|
9262
9267
|
return {
|
|
9263
9268
|
items: [],
|
|
9264
|
-
currentRefinement: getCurrentRefinement$
|
|
9269
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, {
|
|
9265
9270
|
ais: props.contextValue,
|
|
9266
9271
|
multiIndexContext: props.indexContextValue
|
|
9267
9272
|
}),
|
|
@@ -9274,7 +9279,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9274
9279
|
var items = isFromSearch ? searchForFacetValuesResults[attribute].map(function (v) {
|
|
9275
9280
|
return {
|
|
9276
9281
|
label: v.value,
|
|
9277
|
-
value: getValue(v.value, props, searchState, {
|
|
9282
|
+
value: getValue$2(v.value, props, searchState, {
|
|
9278
9283
|
ais: props.contextValue,
|
|
9279
9284
|
multiIndexContext: props.indexContextValue
|
|
9280
9285
|
}),
|
|
@@ -9287,11 +9292,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9287
9292
|
isRefined: v.isRefined
|
|
9288
9293
|
};
|
|
9289
9294
|
}) : results.getFacetValues(attribute, {
|
|
9290
|
-
sortBy: sortBy
|
|
9295
|
+
sortBy: sortBy$1
|
|
9291
9296
|
}).map(function (v) {
|
|
9292
9297
|
return {
|
|
9293
9298
|
label: v.name,
|
|
9294
|
-
value: getValue(v.name, props, searchState, {
|
|
9299
|
+
value: getValue$2(v.name, props, searchState, {
|
|
9295
9300
|
ais: props.contextValue,
|
|
9296
9301
|
multiIndexContext: props.indexContextValue
|
|
9297
9302
|
}),
|
|
@@ -9301,8 +9306,8 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9301
9306
|
});
|
|
9302
9307
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
9303
9308
|
return {
|
|
9304
|
-
items: transformedItems.slice(0, getLimit(props)),
|
|
9305
|
-
currentRefinement: getCurrentRefinement$
|
|
9309
|
+
items: transformedItems.slice(0, getLimit$1(props)),
|
|
9310
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, {
|
|
9306
9311
|
ais: props.contextValue,
|
|
9307
9312
|
multiIndexContext: props.indexContextValue
|
|
9308
9313
|
}),
|
|
@@ -9312,7 +9317,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9312
9317
|
};
|
|
9313
9318
|
},
|
|
9314
9319
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9315
|
-
return _refine$
|
|
9320
|
+
return _refine$6(props, searchState, nextRefinement, {
|
|
9316
9321
|
ais: props.contextValue,
|
|
9317
9322
|
multiIndexContext: props.indexContextValue
|
|
9318
9323
|
});
|
|
@@ -9321,11 +9326,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9321
9326
|
return {
|
|
9322
9327
|
facetName: props.attribute,
|
|
9323
9328
|
query: nextRefinement,
|
|
9324
|
-
maxFacetHits: getLimit(props)
|
|
9329
|
+
maxFacetHits: getLimit$1(props)
|
|
9325
9330
|
};
|
|
9326
9331
|
},
|
|
9327
9332
|
cleanUp: function cleanUp(props, searchState) {
|
|
9328
|
-
return _cleanUp$
|
|
9333
|
+
return _cleanUp$4(props, searchState, {
|
|
9329
9334
|
ais: props.contextValue,
|
|
9330
9335
|
multiIndexContext: props.indexContextValue
|
|
9331
9336
|
});
|
|
@@ -9336,10 +9341,10 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9336
9341
|
var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet';
|
|
9337
9342
|
var addRefinementKey = "".concat(addKey, "Refinement");
|
|
9338
9343
|
searchParameters = searchParameters.setQueryParameters({
|
|
9339
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
9344
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit$1(props))
|
|
9340
9345
|
});
|
|
9341
9346
|
searchParameters = searchParameters[addKey](attribute);
|
|
9342
|
-
return getCurrentRefinement$
|
|
9347
|
+
return getCurrentRefinement$7(props, searchState, {
|
|
9343
9348
|
ais: props.contextValue,
|
|
9344
9349
|
multiIndexContext: props.indexContextValue
|
|
9345
9350
|
}).reduce(function (res, val) {
|
|
@@ -9347,7 +9352,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9347
9352
|
}, searchParameters);
|
|
9348
9353
|
},
|
|
9349
9354
|
getMetadata: function getMetadata(props, searchState) {
|
|
9350
|
-
var id = getId$
|
|
9355
|
+
var id = getId$a(props);
|
|
9351
9356
|
var context = {
|
|
9352
9357
|
ais: props.contextValue,
|
|
9353
9358
|
multiIndexContext: props.indexContextValue
|
|
@@ -9355,21 +9360,21 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9355
9360
|
return {
|
|
9356
9361
|
id: id,
|
|
9357
9362
|
index: getIndexId(context),
|
|
9358
|
-
items: getCurrentRefinement$
|
|
9363
|
+
items: getCurrentRefinement$7(props, searchState, context).length > 0 ? [{
|
|
9359
9364
|
attribute: props.attribute,
|
|
9360
9365
|
label: "".concat(props.attribute, ": "),
|
|
9361
|
-
currentRefinement: getCurrentRefinement$
|
|
9366
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, context),
|
|
9362
9367
|
value: function value(nextState) {
|
|
9363
|
-
return _refine$
|
|
9368
|
+
return _refine$6(props, nextState, [], context);
|
|
9364
9369
|
},
|
|
9365
|
-
items: getCurrentRefinement$
|
|
9370
|
+
items: getCurrentRefinement$7(props, searchState, context).map(function (item) {
|
|
9366
9371
|
return {
|
|
9367
9372
|
label: "".concat(item),
|
|
9368
9373
|
value: function value(nextState) {
|
|
9369
|
-
var nextSelectedItems = getCurrentRefinement$
|
|
9374
|
+
var nextSelectedItems = getCurrentRefinement$7(props, nextState, context).filter(function (other) {
|
|
9370
9375
|
return other !== item;
|
|
9371
9376
|
});
|
|
9372
|
-
return _refine$
|
|
9377
|
+
return _refine$6(props, searchState, nextSelectedItems, context);
|
|
9373
9378
|
}
|
|
9374
9379
|
};
|
|
9375
9380
|
})
|
|
@@ -9428,7 +9433,7 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9428
9433
|
// See: https://github.com/algolia/react-instantsearch/issues/164
|
|
9429
9434
|
|
|
9430
9435
|
|
|
9431
|
-
var cleanedSearchState = omit
|
|
9436
|
+
var cleanedSearchState = omit(searchState, ['configure', id]);
|
|
9432
9437
|
var hasNotChanged = shallowEqual(this._prevSearchState, cleanedSearchState);
|
|
9433
9438
|
this._prevSearchState = cleanedSearchState;
|
|
9434
9439
|
return {
|
|
@@ -9438,12 +9443,12 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9438
9443
|
}
|
|
9439
9444
|
});
|
|
9440
9445
|
|
|
9441
|
-
function getId$
|
|
9446
|
+
function getId$b() {
|
|
9442
9447
|
return 'query';
|
|
9443
9448
|
}
|
|
9444
9449
|
|
|
9445
|
-
function getCurrentRefinement$
|
|
9446
|
-
var id = getId$
|
|
9450
|
+
function getCurrentRefinement$8(props, searchState, context) {
|
|
9451
|
+
var id = getId$b();
|
|
9447
9452
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9448
9453
|
|
|
9449
9454
|
if (currentRefinement) {
|
|
@@ -9453,8 +9458,8 @@ function getCurrentRefinement$3(props, searchState, context) {
|
|
|
9453
9458
|
return '';
|
|
9454
9459
|
}
|
|
9455
9460
|
|
|
9456
|
-
function _refine$
|
|
9457
|
-
var id = getId$
|
|
9461
|
+
function _refine$7(props, searchState, nextRefinement, context) {
|
|
9462
|
+
var id = getId$b();
|
|
9458
9463
|
|
|
9459
9464
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9460
9465
|
|
|
@@ -9462,8 +9467,8 @@ function _refine$2(props, searchState, nextRefinement, context) {
|
|
|
9462
9467
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9463
9468
|
}
|
|
9464
9469
|
|
|
9465
|
-
function _cleanUp$
|
|
9466
|
-
return cleanUpValue(searchState, context, getId$
|
|
9470
|
+
function _cleanUp$5(props, searchState, context) {
|
|
9471
|
+
return cleanUpValue(searchState, context, getId$b());
|
|
9467
9472
|
}
|
|
9468
9473
|
/**
|
|
9469
9474
|
* connectSearchBox connector provides the logic to build a widget that will
|
|
@@ -9484,7 +9489,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9484
9489
|
},
|
|
9485
9490
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
9486
9491
|
return {
|
|
9487
|
-
currentRefinement: getCurrentRefinement$
|
|
9492
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
9488
9493
|
ais: props.contextValue,
|
|
9489
9494
|
multiIndexContext: props.indexContextValue
|
|
9490
9495
|
}),
|
|
@@ -9492,26 +9497,26 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9492
9497
|
};
|
|
9493
9498
|
},
|
|
9494
9499
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9495
|
-
return _refine$
|
|
9500
|
+
return _refine$7(props, searchState, nextRefinement, {
|
|
9496
9501
|
ais: props.contextValue,
|
|
9497
9502
|
multiIndexContext: props.indexContextValue
|
|
9498
9503
|
});
|
|
9499
9504
|
},
|
|
9500
9505
|
cleanUp: function cleanUp(props, searchState) {
|
|
9501
|
-
return _cleanUp$
|
|
9506
|
+
return _cleanUp$5(props, searchState, {
|
|
9502
9507
|
ais: props.contextValue,
|
|
9503
9508
|
multiIndexContext: props.indexContextValue
|
|
9504
9509
|
});
|
|
9505
9510
|
},
|
|
9506
9511
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9507
|
-
return searchParameters.setQuery(getCurrentRefinement$
|
|
9512
|
+
return searchParameters.setQuery(getCurrentRefinement$8(props, searchState, {
|
|
9508
9513
|
ais: props.contextValue,
|
|
9509
9514
|
multiIndexContext: props.indexContextValue
|
|
9510
9515
|
}));
|
|
9511
9516
|
},
|
|
9512
9517
|
getMetadata: function getMetadata(props, searchState) {
|
|
9513
|
-
var id = getId$
|
|
9514
|
-
var currentRefinement = getCurrentRefinement$
|
|
9518
|
+
var id = getId$b();
|
|
9519
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
9515
9520
|
ais: props.contextValue,
|
|
9516
9521
|
multiIndexContext: props.indexContextValue
|
|
9517
9522
|
});
|
|
@@ -9524,7 +9529,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9524
9529
|
items: currentRefinement === null ? [] : [{
|
|
9525
9530
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9526
9531
|
value: function value(nextState) {
|
|
9527
|
-
return _refine$
|
|
9532
|
+
return _refine$7(props, nextState, '', {
|
|
9528
9533
|
ais: props.contextValue,
|
|
9529
9534
|
multiIndexContext: props.indexContextValue
|
|
9530
9535
|
});
|
|
@@ -9535,12 +9540,12 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9535
9540
|
}
|
|
9536
9541
|
});
|
|
9537
9542
|
|
|
9538
|
-
function getId$
|
|
9543
|
+
function getId$c() {
|
|
9539
9544
|
return 'relevancyStrictness';
|
|
9540
9545
|
}
|
|
9541
9546
|
|
|
9542
|
-
function getCurrentRefinement$
|
|
9543
|
-
var id = getId$
|
|
9547
|
+
function getCurrentRefinement$9(props, searchState, context) {
|
|
9548
|
+
var id = getId$c();
|
|
9544
9549
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id);
|
|
9545
9550
|
return currentRefinement;
|
|
9546
9551
|
}
|
|
@@ -9566,13 +9571,13 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9566
9571
|
};
|
|
9567
9572
|
},
|
|
9568
9573
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9569
|
-
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$
|
|
9574
|
+
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$9(props, searchState, {
|
|
9570
9575
|
ais: props.contextValue,
|
|
9571
9576
|
multiIndexContext: props.indexContextValue
|
|
9572
9577
|
}));
|
|
9573
9578
|
},
|
|
9574
9579
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9575
|
-
var nextValue = _defineProperty({}, getId$
|
|
9580
|
+
var nextValue = _defineProperty({}, getId$c(), nextRefinement);
|
|
9576
9581
|
|
|
9577
9582
|
var resetPage = true;
|
|
9578
9583
|
return refineValue(searchState, nextValue, {
|
|
@@ -9582,12 +9587,12 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9582
9587
|
}
|
|
9583
9588
|
});
|
|
9584
9589
|
|
|
9585
|
-
function getId$
|
|
9590
|
+
function getId$d() {
|
|
9586
9591
|
return 'sortBy';
|
|
9587
9592
|
}
|
|
9588
9593
|
|
|
9589
|
-
function getCurrentRefinement$
|
|
9590
|
-
var id = getId$
|
|
9594
|
+
function getCurrentRefinement$a(props, searchState, context) {
|
|
9595
|
+
var id = getId$d();
|
|
9591
9596
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
9592
9597
|
|
|
9593
9598
|
if (currentRefinement) {
|
|
@@ -9624,7 +9629,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9624
9629
|
transformItems: PropTypes.func
|
|
9625
9630
|
},
|
|
9626
9631
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
9627
|
-
var currentRefinement = getCurrentRefinement$
|
|
9632
|
+
var currentRefinement = getCurrentRefinement$a(props, searchState, {
|
|
9628
9633
|
ais: props.contextValue,
|
|
9629
9634
|
multiIndexContext: props.indexContextValue
|
|
9630
9635
|
});
|
|
@@ -9641,7 +9646,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9641
9646
|
};
|
|
9642
9647
|
},
|
|
9643
9648
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9644
|
-
var id = getId$
|
|
9649
|
+
var id = getId$d();
|
|
9645
9650
|
|
|
9646
9651
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9647
9652
|
|
|
@@ -9655,10 +9660,10 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9655
9660
|
return cleanUpValue(searchState, {
|
|
9656
9661
|
ais: props.contextValue,
|
|
9657
9662
|
multiIndexContext: props.indexContextValue
|
|
9658
|
-
}, getId$
|
|
9663
|
+
}, getId$d());
|
|
9659
9664
|
},
|
|
9660
9665
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9661
|
-
var selectedIndex = getCurrentRefinement$
|
|
9666
|
+
var selectedIndex = getCurrentRefinement$a(props, searchState, {
|
|
9662
9667
|
ais: props.contextValue,
|
|
9663
9668
|
multiIndexContext: props.indexContextValue
|
|
9664
9669
|
});
|
|
@@ -9666,7 +9671,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9666
9671
|
},
|
|
9667
9672
|
getMetadata: function getMetadata() {
|
|
9668
9673
|
return {
|
|
9669
|
-
id: getId$
|
|
9674
|
+
id: getId$d()
|
|
9670
9675
|
};
|
|
9671
9676
|
}
|
|
9672
9677
|
});
|
|
@@ -9702,15 +9707,15 @@ var connectStats = createConnectorWithContext({
|
|
|
9702
9707
|
}
|
|
9703
9708
|
});
|
|
9704
9709
|
|
|
9705
|
-
function getId$
|
|
9710
|
+
function getId$e(props) {
|
|
9706
9711
|
return props.attribute;
|
|
9707
9712
|
}
|
|
9708
9713
|
|
|
9709
|
-
var namespace = 'toggle';
|
|
9714
|
+
var namespace$6 = 'toggle';
|
|
9710
9715
|
var falsyStrings = ['0', 'false', 'null', 'undefined'];
|
|
9711
9716
|
|
|
9712
|
-
function getCurrentRefinement(props, searchState, context) {
|
|
9713
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace, ".").concat(getId$
|
|
9717
|
+
function getCurrentRefinement$b(props, searchState, context) {
|
|
9718
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$6, ".").concat(getId$e(props)), false);
|
|
9714
9719
|
|
|
9715
9720
|
if (falsyStrings.indexOf(currentRefinement) !== -1) {
|
|
9716
9721
|
return false;
|
|
@@ -9719,17 +9724,17 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
9719
9724
|
return Boolean(currentRefinement);
|
|
9720
9725
|
}
|
|
9721
9726
|
|
|
9722
|
-
function _refine$
|
|
9723
|
-
var id = getId$
|
|
9727
|
+
function _refine$8(props, searchState, nextRefinement, context) {
|
|
9728
|
+
var id = getId$e(props);
|
|
9724
9729
|
|
|
9725
9730
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : false);
|
|
9726
9731
|
|
|
9727
9732
|
var resetPage = true;
|
|
9728
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
9733
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$6);
|
|
9729
9734
|
}
|
|
9730
9735
|
|
|
9731
|
-
function _cleanUp$
|
|
9732
|
-
return cleanUpValue(searchState, context, "".concat(namespace, ".").concat(getId$
|
|
9736
|
+
function _cleanUp$6(props, searchState, context) {
|
|
9737
|
+
return cleanUpValue(searchState, context, "".concat(namespace$6, ".").concat(getId$e(props)));
|
|
9733
9738
|
}
|
|
9734
9739
|
/**
|
|
9735
9740
|
* connectToggleRefinement connector provides the logic to build a widget that will
|
|
@@ -9768,14 +9773,14 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9768
9773
|
ais: props.contextValue,
|
|
9769
9774
|
multiIndexContext: props.indexContextValue
|
|
9770
9775
|
});
|
|
9771
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
9776
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
9772
9777
|
ais: props.contextValue,
|
|
9773
9778
|
multiIndexContext: props.indexContextValue
|
|
9774
9779
|
});
|
|
9775
9780
|
var allFacetValues = results && results.getFacetByName(attribute) ? results.getFacetValues(attribute) : null;
|
|
9776
9781
|
var facetValue = // Use null to always be consistent with type of the value
|
|
9777
9782
|
// count: number | null
|
|
9778
|
-
allFacetValues && allFacetValues.length ? find
|
|
9783
|
+
allFacetValues && allFacetValues.length ? find(allFacetValues, function (item) {
|
|
9779
9784
|
return item.name === value.toString();
|
|
9780
9785
|
}) : null;
|
|
9781
9786
|
var facetValueCount = facetValue && facetValue.count;
|
|
@@ -9796,13 +9801,13 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9796
9801
|
};
|
|
9797
9802
|
},
|
|
9798
9803
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9799
|
-
return _refine$
|
|
9804
|
+
return _refine$8(props, searchState, nextRefinement, {
|
|
9800
9805
|
ais: props.contextValue,
|
|
9801
9806
|
multiIndexContext: props.indexContextValue
|
|
9802
9807
|
});
|
|
9803
9808
|
},
|
|
9804
9809
|
cleanUp: function cleanUp(props, searchState) {
|
|
9805
|
-
return _cleanUp$
|
|
9810
|
+
return _cleanUp$6(props, searchState, {
|
|
9806
9811
|
ais: props.contextValue,
|
|
9807
9812
|
multiIndexContext: props.indexContextValue
|
|
9808
9813
|
});
|
|
@@ -9811,7 +9816,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9811
9816
|
var attribute = props.attribute,
|
|
9812
9817
|
value = props.value,
|
|
9813
9818
|
filter = props.filter;
|
|
9814
|
-
var checked = getCurrentRefinement(props, searchState, {
|
|
9819
|
+
var checked = getCurrentRefinement$b(props, searchState, {
|
|
9815
9820
|
ais: props.contextValue,
|
|
9816
9821
|
multiIndexContext: props.indexContextValue
|
|
9817
9822
|
});
|
|
@@ -9828,8 +9833,8 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9828
9833
|
return nextSearchParameters;
|
|
9829
9834
|
},
|
|
9830
9835
|
getMetadata: function getMetadata(props, searchState) {
|
|
9831
|
-
var id = getId$
|
|
9832
|
-
var checked = getCurrentRefinement(props, searchState, {
|
|
9836
|
+
var id = getId$e(props);
|
|
9837
|
+
var checked = getCurrentRefinement$b(props, searchState, {
|
|
9833
9838
|
ais: props.contextValue,
|
|
9834
9839
|
multiIndexContext: props.indexContextValue
|
|
9835
9840
|
});
|
|
@@ -9845,7 +9850,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9845
9850
|
currentRefinement: checked,
|
|
9846
9851
|
attribute: props.attribute,
|
|
9847
9852
|
value: function value(nextState) {
|
|
9848
|
-
return _refine$
|
|
9853
|
+
return _refine$8(props, nextState, false, {
|
|
9849
9854
|
ais: props.contextValue,
|
|
9850
9855
|
multiIndexContext: props.indexContextValue
|
|
9851
9856
|
});
|
|
@@ -9861,7 +9866,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9861
9866
|
}
|
|
9862
9867
|
});
|
|
9863
9868
|
|
|
9864
|
-
function getId() {
|
|
9869
|
+
function getId$f() {
|
|
9865
9870
|
return 'query';
|
|
9866
9871
|
}
|
|
9867
9872
|
|
|
@@ -9870,7 +9875,7 @@ function getAdditionalId() {
|
|
|
9870
9875
|
}
|
|
9871
9876
|
|
|
9872
9877
|
function getCurrentRefinementQuery(props, searchState, context) {
|
|
9873
|
-
var id = getId();
|
|
9878
|
+
var id = getId$f();
|
|
9874
9879
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9875
9880
|
|
|
9876
9881
|
if (currentRefinement) {
|
|
@@ -9891,10 +9896,10 @@ function getCurrentRefinementAdditional(props, searchState, context) {
|
|
|
9891
9896
|
return {};
|
|
9892
9897
|
}
|
|
9893
9898
|
|
|
9894
|
-
function _refine(props, searchState, nextRefinement, context) {
|
|
9899
|
+
function _refine$9(props, searchState, nextRefinement, context) {
|
|
9895
9900
|
var _nextValue;
|
|
9896
9901
|
|
|
9897
|
-
var id = getId();
|
|
9902
|
+
var id = getId$f();
|
|
9898
9903
|
var voiceParams = getAdditionalId();
|
|
9899
9904
|
var queryLanguages = props.language ? {
|
|
9900
9905
|
queryLanguages: [props.language.split('-')[0]]
|
|
@@ -9911,8 +9916,8 @@ function _refine(props, searchState, nextRefinement, context) {
|
|
|
9911
9916
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9912
9917
|
}
|
|
9913
9918
|
|
|
9914
|
-
function _cleanUp(props, searchState, context) {
|
|
9915
|
-
var interimState = cleanUpValue(searchState, context, getId());
|
|
9919
|
+
function _cleanUp$7(props, searchState, context) {
|
|
9920
|
+
var interimState = cleanUpValue(searchState, context, getId$f());
|
|
9916
9921
|
return cleanUpValue(interimState, context, getAdditionalId());
|
|
9917
9922
|
}
|
|
9918
9923
|
|
|
@@ -9931,13 +9936,13 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9931
9936
|
};
|
|
9932
9937
|
},
|
|
9933
9938
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9934
|
-
return _refine(props, searchState, nextRefinement, {
|
|
9939
|
+
return _refine$9(props, searchState, nextRefinement, {
|
|
9935
9940
|
ais: props.contextValue,
|
|
9936
9941
|
multiIndexContext: props.indexContextValue
|
|
9937
9942
|
});
|
|
9938
9943
|
},
|
|
9939
9944
|
cleanUp: function cleanUp(props, searchState) {
|
|
9940
|
-
return _cleanUp(props, searchState, {
|
|
9945
|
+
return _cleanUp$7(props, searchState, {
|
|
9941
9946
|
ais: props.contextValue,
|
|
9942
9947
|
multiIndexContext: props.indexContextValue
|
|
9943
9948
|
});
|
|
@@ -9954,7 +9959,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9954
9959
|
return searchParameters.setQuery(query).setQueryParameters(additionalParams);
|
|
9955
9960
|
},
|
|
9956
9961
|
getMetadata: function getMetadata(props, searchState) {
|
|
9957
|
-
var id = getId();
|
|
9962
|
+
var id = getId$f();
|
|
9958
9963
|
var currentRefinement = getCurrentRefinementQuery(props, searchState, {
|
|
9959
9964
|
ais: props.contextValue,
|
|
9960
9965
|
multiIndexContext: props.indexContextValue
|
|
@@ -9968,7 +9973,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9968
9973
|
items: currentRefinement === null ? [] : [{
|
|
9969
9974
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9970
9975
|
value: function value(nextState) {
|
|
9971
|
-
return _refine(props, nextState, '', {
|
|
9976
|
+
return _refine$9(props, nextState, '', {
|
|
9972
9977
|
ais: props.contextValue,
|
|
9973
9978
|
multiIndexContext: props.indexContextValue
|
|
9974
9979
|
});
|
|
@@ -10021,7 +10026,7 @@ function range(_ref) {
|
|
|
10021
10026
|
return (start + current) * limitStep;
|
|
10022
10027
|
});
|
|
10023
10028
|
}
|
|
10024
|
-
function find(array, comparator) {
|
|
10029
|
+
function find$2(array, comparator) {
|
|
10025
10030
|
if (!Array.isArray(array)) {
|
|
10026
10031
|
return undefined;
|
|
10027
10032
|
}
|
|
@@ -10035,11 +10040,11 @@ function find(array, comparator) {
|
|
|
10035
10040
|
return undefined;
|
|
10036
10041
|
}
|
|
10037
10042
|
|
|
10038
|
-
var cx
|
|
10043
|
+
var cx = createClassNames('Panel');
|
|
10039
10044
|
|
|
10040
|
-
var _createContext = createContext(function setCanRefine() {}),
|
|
10041
|
-
PanelConsumer = _createContext.Consumer,
|
|
10042
|
-
PanelProvider = _createContext.Provider;
|
|
10045
|
+
var _createContext$1 = createContext(function setCanRefine() {}),
|
|
10046
|
+
PanelConsumer = _createContext$1.Consumer,
|
|
10047
|
+
PanelProvider = _createContext$1.Provider;
|
|
10043
10048
|
|
|
10044
10049
|
var Panel =
|
|
10045
10050
|
/*#__PURE__*/
|
|
@@ -10082,15 +10087,15 @@ function (_Component) {
|
|
|
10082
10087
|
footer = _this$props.footer;
|
|
10083
10088
|
var canRefine = this.state.canRefine;
|
|
10084
10089
|
return React__default.createElement("div", {
|
|
10085
|
-
className: classnames(cx
|
|
10090
|
+
className: classnames(cx('', !canRefine && '-noRefinement'), className)
|
|
10086
10091
|
}, header && React__default.createElement("div", {
|
|
10087
|
-
className: cx
|
|
10092
|
+
className: cx('header')
|
|
10088
10093
|
}, header), React__default.createElement("div", {
|
|
10089
|
-
className: cx
|
|
10094
|
+
className: cx('body')
|
|
10090
10095
|
}, React__default.createElement(PanelProvider, {
|
|
10091
10096
|
value: this.setCanRefine
|
|
10092
10097
|
}, children)), footer && React__default.createElement("div", {
|
|
10093
|
-
className: cx
|
|
10098
|
+
className: cx('footer')
|
|
10094
10099
|
}, footer));
|
|
10095
10100
|
}
|
|
10096
10101
|
}]);
|
|
@@ -10213,8 +10218,8 @@ _defineProperty(Link, "propTypes", {
|
|
|
10213
10218
|
onClick: PropTypes.func.isRequired
|
|
10214
10219
|
});
|
|
10215
10220
|
|
|
10216
|
-
var cx$
|
|
10217
|
-
var itemsPropType
|
|
10221
|
+
var cx$1 = createClassNames('Breadcrumb');
|
|
10222
|
+
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
10218
10223
|
label: PropTypes.string.isRequired,
|
|
10219
10224
|
value: PropTypes.string.isRequired
|
|
10220
10225
|
}));
|
|
@@ -10243,9 +10248,9 @@ function (_Component) {
|
|
|
10243
10248
|
translate = _this$props.translate,
|
|
10244
10249
|
className = _this$props.className;
|
|
10245
10250
|
var rootPath = canRefine ? React__default.createElement("li", {
|
|
10246
|
-
className: cx$
|
|
10251
|
+
className: cx$1('item')
|
|
10247
10252
|
}, React__default.createElement(Link, {
|
|
10248
|
-
className: cx$
|
|
10253
|
+
className: cx$1('link'),
|
|
10249
10254
|
onClick: function onClick() {
|
|
10250
10255
|
return !rootURL ? refine() : null;
|
|
10251
10256
|
},
|
|
@@ -10254,12 +10259,12 @@ function (_Component) {
|
|
|
10254
10259
|
var breadcrumb = items.map(function (item, idx) {
|
|
10255
10260
|
var isLast = idx === items.length - 1;
|
|
10256
10261
|
return React__default.createElement("li", {
|
|
10257
|
-
className: cx$
|
|
10262
|
+
className: cx$1('item', isLast && 'item--selected'),
|
|
10258
10263
|
key: idx
|
|
10259
10264
|
}, React__default.createElement("span", {
|
|
10260
|
-
className: cx$
|
|
10265
|
+
className: cx$1('separator')
|
|
10261
10266
|
}, separator), !isLast ? React__default.createElement(Link, {
|
|
10262
|
-
className: cx$
|
|
10267
|
+
className: cx$1('link'),
|
|
10263
10268
|
onClick: function onClick() {
|
|
10264
10269
|
return refine(item.value);
|
|
10265
10270
|
},
|
|
@@ -10267,9 +10272,9 @@ function (_Component) {
|
|
|
10267
10272
|
}, item.label) : item.label);
|
|
10268
10273
|
});
|
|
10269
10274
|
return React__default.createElement("div", {
|
|
10270
|
-
className: classnames(cx$
|
|
10275
|
+
className: classnames(cx$1('', !canRefine && '-noRefinement'), className)
|
|
10271
10276
|
}, React__default.createElement("ul", {
|
|
10272
|
-
className: cx$
|
|
10277
|
+
className: cx$1('list')
|
|
10273
10278
|
}, rootPath, breadcrumb));
|
|
10274
10279
|
}
|
|
10275
10280
|
}]);
|
|
@@ -10280,7 +10285,7 @@ function (_Component) {
|
|
|
10280
10285
|
_defineProperty(Breadcrumb, "propTypes", {
|
|
10281
10286
|
canRefine: PropTypes.bool.isRequired,
|
|
10282
10287
|
createURL: PropTypes.func.isRequired,
|
|
10283
|
-
items: itemsPropType
|
|
10288
|
+
items: itemsPropType,
|
|
10284
10289
|
refine: PropTypes.func.isRequired,
|
|
10285
10290
|
rootURL: PropTypes.string,
|
|
10286
10291
|
separator: PropTypes.node,
|
|
@@ -10392,7 +10397,7 @@ var BreadcrumbWidget = function BreadcrumbWidget(props) {
|
|
|
10392
10397
|
|
|
10393
10398
|
connectBreadcrumb(BreadcrumbWidget);
|
|
10394
10399
|
|
|
10395
|
-
var cx$
|
|
10400
|
+
var cx$2 = createClassNames('ClearRefinements');
|
|
10396
10401
|
|
|
10397
10402
|
var ClearRefinements =
|
|
10398
10403
|
/*#__PURE__*/
|
|
@@ -10415,9 +10420,9 @@ function (_Component) {
|
|
|
10415
10420
|
translate = _this$props.translate,
|
|
10416
10421
|
className = _this$props.className;
|
|
10417
10422
|
return React__default.createElement("div", {
|
|
10418
|
-
className: classnames(cx$
|
|
10423
|
+
className: classnames(cx$2(''), className)
|
|
10419
10424
|
}, React__default.createElement("button", {
|
|
10420
|
-
className: cx$
|
|
10425
|
+
className: cx$2('button', !canRefine && 'button--disabled'),
|
|
10421
10426
|
onClick: function onClick() {
|
|
10422
10427
|
return refine(items);
|
|
10423
10428
|
},
|
|
@@ -10485,7 +10490,7 @@ var ClearRefinementsWidget = function ClearRefinementsWidget(props) {
|
|
|
10485
10490
|
|
|
10486
10491
|
connectCurrentRefinements(ClearRefinementsWidget);
|
|
10487
10492
|
|
|
10488
|
-
var cx$
|
|
10493
|
+
var cx$3 = createClassNames('CurrentRefinements');
|
|
10489
10494
|
var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
10490
10495
|
var items = _ref.items,
|
|
10491
10496
|
canRefine = _ref.canRefine,
|
|
@@ -10493,31 +10498,31 @@ var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
|
10493
10498
|
translate = _ref.translate,
|
|
10494
10499
|
className = _ref.className;
|
|
10495
10500
|
return React__default.createElement("div", {
|
|
10496
|
-
className: classnames(cx$
|
|
10501
|
+
className: classnames(cx$3('', !canRefine && '-noRefinement'), className)
|
|
10497
10502
|
}, React__default.createElement("ul", {
|
|
10498
|
-
className: cx$
|
|
10503
|
+
className: cx$3('list', !canRefine && 'list--noRefinement')
|
|
10499
10504
|
}, items.map(function (item) {
|
|
10500
10505
|
return React__default.createElement("li", {
|
|
10501
10506
|
key: item.label,
|
|
10502
|
-
className: cx$
|
|
10507
|
+
className: cx$3('item')
|
|
10503
10508
|
}, React__default.createElement("span", {
|
|
10504
|
-
className: cx$
|
|
10509
|
+
className: cx$3('label')
|
|
10505
10510
|
}, item.label), item.items ? item.items.map(function (nest) {
|
|
10506
10511
|
return React__default.createElement("span", {
|
|
10507
10512
|
key: nest.label,
|
|
10508
|
-
className: cx$
|
|
10513
|
+
className: cx$3('category')
|
|
10509
10514
|
}, React__default.createElement("span", {
|
|
10510
|
-
className: cx$
|
|
10515
|
+
className: cx$3('categoryLabel')
|
|
10511
10516
|
}, nest.label), React__default.createElement("button", {
|
|
10512
|
-
className: cx$
|
|
10517
|
+
className: cx$3('delete'),
|
|
10513
10518
|
onClick: function onClick() {
|
|
10514
10519
|
return refine(nest.value);
|
|
10515
10520
|
}
|
|
10516
10521
|
}, translate('clearFilter', nest)));
|
|
10517
10522
|
}) : React__default.createElement("span", {
|
|
10518
|
-
className: cx$
|
|
10523
|
+
className: cx$3('category')
|
|
10519
10524
|
}, React__default.createElement("button", {
|
|
10520
|
-
className: cx$
|
|
10525
|
+
className: cx$3('delete'),
|
|
10521
10526
|
onClick: function onClick() {
|
|
10522
10527
|
return refine(item.value);
|
|
10523
10528
|
}
|
|
@@ -10593,14 +10598,14 @@ var CurrentRefinementsWidget = function CurrentRefinementsWidget(props) {
|
|
|
10593
10598
|
|
|
10594
10599
|
connectCurrentRefinements(CurrentRefinementsWidget);
|
|
10595
10600
|
|
|
10596
|
-
var cx$
|
|
10601
|
+
var cx$4 = createClassNames('SearchBox');
|
|
10597
10602
|
var defaultLoadingIndicator = React__default.createElement("svg", {
|
|
10598
10603
|
width: "18",
|
|
10599
10604
|
height: "18",
|
|
10600
10605
|
viewBox: "0 0 38 38",
|
|
10601
10606
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10602
10607
|
stroke: "#444",
|
|
10603
|
-
className: cx$
|
|
10608
|
+
className: cx$4('loadingIcon')
|
|
10604
10609
|
}, React__default.createElement("g", {
|
|
10605
10610
|
fill: "none",
|
|
10606
10611
|
fillRule: "evenodd"
|
|
@@ -10623,7 +10628,7 @@ var defaultLoadingIndicator = React__default.createElement("svg", {
|
|
|
10623
10628
|
repeatCount: "indefinite"
|
|
10624
10629
|
})))));
|
|
10625
10630
|
var defaultReset = React__default.createElement("svg", {
|
|
10626
|
-
className: cx$
|
|
10631
|
+
className: cx$4('resetIcon'),
|
|
10627
10632
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10628
10633
|
viewBox: "0 0 20 20",
|
|
10629
10634
|
width: "10",
|
|
@@ -10632,7 +10637,7 @@ var defaultReset = React__default.createElement("svg", {
|
|
|
10632
10637
|
d: "M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"
|
|
10633
10638
|
}));
|
|
10634
10639
|
var defaultSubmit = React__default.createElement("svg", {
|
|
10635
|
-
className: cx$
|
|
10640
|
+
className: cx$4('submitIcon'),
|
|
10636
10641
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10637
10642
|
width: "10",
|
|
10638
10643
|
height: "10",
|
|
@@ -10641,7 +10646,7 @@ var defaultSubmit = React__default.createElement("svg", {
|
|
|
10641
10646
|
d: "M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"
|
|
10642
10647
|
}));
|
|
10643
10648
|
|
|
10644
|
-
var SearchBox
|
|
10649
|
+
var SearchBox =
|
|
10645
10650
|
/*#__PURE__*/
|
|
10646
10651
|
function (_Component) {
|
|
10647
10652
|
_inherits(SearchBox, _Component);
|
|
@@ -10804,12 +10809,12 @@ function (_Component) {
|
|
|
10804
10809
|
/* eslint-disable max-len */
|
|
10805
10810
|
|
|
10806
10811
|
return React__default.createElement("div", {
|
|
10807
|
-
className: classnames(cx$
|
|
10812
|
+
className: classnames(cx$4(''), className)
|
|
10808
10813
|
}, React__default.createElement("form", {
|
|
10809
10814
|
noValidate: true,
|
|
10810
10815
|
onSubmit: this.props.onSubmit ? this.props.onSubmit : this.onSubmit,
|
|
10811
10816
|
onReset: this.onReset,
|
|
10812
|
-
className: cx$
|
|
10817
|
+
className: cx$4('form', isSearchStalled && 'form--stalledSearch'),
|
|
10813
10818
|
action: "",
|
|
10814
10819
|
role: "search"
|
|
10815
10820
|
}, React__default.createElement("input", _extends({
|
|
@@ -10826,19 +10831,19 @@ function (_Component) {
|
|
|
10826
10831
|
value: query,
|
|
10827
10832
|
onChange: this.onChange
|
|
10828
10833
|
}, searchInputEvents, {
|
|
10829
|
-
className: cx$
|
|
10834
|
+
className: cx$4('input')
|
|
10830
10835
|
})), React__default.createElement("button", {
|
|
10831
10836
|
type: "submit",
|
|
10832
10837
|
title: translate('submitTitle'),
|
|
10833
|
-
className: cx$
|
|
10838
|
+
className: cx$4('submit')
|
|
10834
10839
|
}, submit), React__default.createElement("button", {
|
|
10835
10840
|
type: "reset",
|
|
10836
10841
|
title: translate('resetTitle'),
|
|
10837
|
-
className: cx$
|
|
10842
|
+
className: cx$4('reset'),
|
|
10838
10843
|
hidden: !query || isSearchStalled
|
|
10839
10844
|
}, reset), this.props.showLoadingIndicator && React__default.createElement("span", {
|
|
10840
10845
|
hidden: !isSearchStalled,
|
|
10841
|
-
className: cx$
|
|
10846
|
+
className: cx$4('loadingIndicator')
|
|
10842
10847
|
}, loadingIndicator)));
|
|
10843
10848
|
/* eslint-enable */
|
|
10844
10849
|
}
|
|
@@ -10847,7 +10852,7 @@ function (_Component) {
|
|
|
10847
10852
|
return SearchBox;
|
|
10848
10853
|
}(Component);
|
|
10849
10854
|
|
|
10850
|
-
_defineProperty(SearchBox
|
|
10855
|
+
_defineProperty(SearchBox, "propTypes", {
|
|
10851
10856
|
currentRefinement: PropTypes.string,
|
|
10852
10857
|
className: PropTypes.string,
|
|
10853
10858
|
refine: PropTypes.func.isRequired,
|
|
@@ -10868,7 +10873,7 @@ _defineProperty(SearchBox$1, "propTypes", {
|
|
|
10868
10873
|
})])
|
|
10869
10874
|
});
|
|
10870
10875
|
|
|
10871
|
-
_defineProperty(SearchBox
|
|
10876
|
+
_defineProperty(SearchBox, "defaultProps", {
|
|
10872
10877
|
currentRefinement: '',
|
|
10873
10878
|
className: '',
|
|
10874
10879
|
focusShortcuts: ['s', '/'],
|
|
@@ -10881,11 +10886,11 @@ _defineProperty(SearchBox$1, "defaultProps", {
|
|
|
10881
10886
|
submit: defaultSubmit
|
|
10882
10887
|
});
|
|
10883
10888
|
|
|
10884
|
-
var SearchBox$
|
|
10889
|
+
var SearchBox$1 = translatable({
|
|
10885
10890
|
resetTitle: 'Clear the search query.',
|
|
10886
10891
|
submitTitle: 'Submit your search query.',
|
|
10887
10892
|
placeholder: 'Search here…'
|
|
10888
|
-
})(SearchBox
|
|
10893
|
+
})(SearchBox);
|
|
10889
10894
|
|
|
10890
10895
|
var itemsPropType$1 = PropTypes.arrayOf(PropTypes.shape({
|
|
10891
10896
|
value: PropTypes.any,
|
|
@@ -10985,7 +10990,7 @@ function (_Component) {
|
|
|
10985
10990
|
}, translate('noResults')) : null;
|
|
10986
10991
|
return React__default.createElement("div", {
|
|
10987
10992
|
className: cx('searchBox')
|
|
10988
|
-
}, React__default.createElement(SearchBox$
|
|
10993
|
+
}, React__default.createElement(SearchBox$1, {
|
|
10989
10994
|
currentRefinement: this.state.query,
|
|
10990
10995
|
refine: function refine(value) {
|
|
10991
10996
|
_this2.setState({
|
|
@@ -11065,13 +11070,13 @@ _defineProperty(List, "defaultProps", {
|
|
|
11065
11070
|
isFromSearch: false
|
|
11066
11071
|
});
|
|
11067
11072
|
|
|
11068
|
-
var cx$
|
|
11069
|
-
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
11073
|
+
var cx$5 = createClassNames('HierarchicalMenu');
|
|
11074
|
+
var itemsPropType$2 = PropTypes.arrayOf(PropTypes.shape({
|
|
11070
11075
|
label: PropTypes.string.isRequired,
|
|
11071
11076
|
value: PropTypes.string,
|
|
11072
11077
|
count: PropTypes.number.isRequired,
|
|
11073
11078
|
items: function items() {
|
|
11074
|
-
return itemsPropType.apply(void 0, arguments);
|
|
11079
|
+
return itemsPropType$2.apply(void 0, arguments);
|
|
11075
11080
|
}
|
|
11076
11081
|
}));
|
|
11077
11082
|
|
|
@@ -11098,15 +11103,15 @@ function (_Component) {
|
|
|
11098
11103
|
createURL = _this$props.createURL,
|
|
11099
11104
|
refine = _this$props.refine;
|
|
11100
11105
|
return React__default.createElement(Link, {
|
|
11101
|
-
className: cx$
|
|
11106
|
+
className: cx$5('link'),
|
|
11102
11107
|
onClick: function onClick() {
|
|
11103
11108
|
return refine(item.value);
|
|
11104
11109
|
},
|
|
11105
11110
|
href: createURL(item.value)
|
|
11106
11111
|
}, React__default.createElement("span", {
|
|
11107
|
-
className: cx$
|
|
11112
|
+
className: cx$5('label')
|
|
11108
11113
|
}, item.label), ' ', React__default.createElement("span", {
|
|
11109
|
-
className: cx$
|
|
11114
|
+
className: cx$5('count')
|
|
11110
11115
|
}, item.count));
|
|
11111
11116
|
});
|
|
11112
11117
|
|
|
@@ -11126,7 +11131,7 @@ function (_Component) {
|
|
|
11126
11131
|
className = _this$props2.className;
|
|
11127
11132
|
return React__default.createElement(List, {
|
|
11128
11133
|
renderItem: this.renderItem,
|
|
11129
|
-
cx: cx$
|
|
11134
|
+
cx: cx$5,
|
|
11130
11135
|
translate: translate,
|
|
11131
11136
|
items: items,
|
|
11132
11137
|
showMore: showMore,
|
|
@@ -11146,7 +11151,7 @@ _defineProperty(HierarchicalMenu, "propTypes", {
|
|
|
11146
11151
|
refine: PropTypes.func.isRequired,
|
|
11147
11152
|
createURL: PropTypes.func.isRequired,
|
|
11148
11153
|
canRefine: PropTypes.bool.isRequired,
|
|
11149
|
-
items: itemsPropType,
|
|
11154
|
+
items: itemsPropType$2,
|
|
11150
11155
|
showMore: PropTypes.bool,
|
|
11151
11156
|
className: PropTypes.string,
|
|
11152
11157
|
limit: PropTypes.number,
|
|
@@ -11260,7 +11265,7 @@ var HierarchicalMenuWidget = function HierarchicalMenuWidget(props) {
|
|
|
11260
11265
|
|
|
11261
11266
|
connectHierarchicalMenu(HierarchicalMenuWidget);
|
|
11262
11267
|
|
|
11263
|
-
var Highlight
|
|
11268
|
+
var Highlight = function Highlight(_ref) {
|
|
11264
11269
|
var cx = _ref.cx,
|
|
11265
11270
|
value = _ref.value,
|
|
11266
11271
|
highlightedTagName = _ref.highlightedTagName,
|
|
@@ -11272,7 +11277,7 @@ var Highlight$2 = function Highlight(_ref) {
|
|
|
11272
11277
|
className: cx(className)
|
|
11273
11278
|
}, value);
|
|
11274
11279
|
};
|
|
11275
|
-
Highlight
|
|
11280
|
+
Highlight.propTypes = {
|
|
11276
11281
|
cx: PropTypes.func.isRequired,
|
|
11277
11282
|
value: PropTypes.string.isRequired,
|
|
11278
11283
|
isHighlighted: PropTypes.bool.isRequired,
|
|
@@ -11303,7 +11308,7 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11303
11308
|
return React__default.createElement("span", {
|
|
11304
11309
|
key: i
|
|
11305
11310
|
}, item.map(function (element, index) {
|
|
11306
|
-
return React__default.createElement(Highlight
|
|
11311
|
+
return React__default.createElement(Highlight, {
|
|
11307
11312
|
cx: cx,
|
|
11308
11313
|
key: index,
|
|
11309
11314
|
value: element.value,
|
|
@@ -11316,7 +11321,7 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11316
11321
|
}, separator));
|
|
11317
11322
|
}
|
|
11318
11323
|
|
|
11319
|
-
return React__default.createElement(Highlight
|
|
11324
|
+
return React__default.createElement(Highlight, {
|
|
11320
11325
|
cx: cx,
|
|
11321
11326
|
key: i,
|
|
11322
11327
|
value: item.value,
|
|
@@ -11345,12 +11350,12 @@ Highlighter.defaultProps = {
|
|
|
11345
11350
|
separator: ', '
|
|
11346
11351
|
};
|
|
11347
11352
|
|
|
11348
|
-
var cx$
|
|
11353
|
+
var cx$6 = createClassNames('Highlight');
|
|
11349
11354
|
|
|
11350
11355
|
var Highlight$1 = function Highlight(props) {
|
|
11351
11356
|
return React__default.createElement(Highlighter, _extends({}, props, {
|
|
11352
11357
|
highlightProperty: "_highlightResult",
|
|
11353
|
-
cx: cx$
|
|
11358
|
+
cx: cx$6
|
|
11354
11359
|
}));
|
|
11355
11360
|
};
|
|
11356
11361
|
|
|
@@ -11395,9 +11400,9 @@ var Highlight$1 = function Highlight(props) {
|
|
|
11395
11400
|
* );
|
|
11396
11401
|
*/
|
|
11397
11402
|
|
|
11398
|
-
var Highlight = connectHighlight(Highlight$1);
|
|
11403
|
+
var Highlight$2 = connectHighlight(Highlight$1);
|
|
11399
11404
|
|
|
11400
|
-
var cx$
|
|
11405
|
+
var cx$7 = createClassNames('Hits');
|
|
11401
11406
|
|
|
11402
11407
|
var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
11403
11408
|
return React__default.createElement("div", {
|
|
@@ -11410,19 +11415,19 @@ var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
|
11410
11415
|
}, JSON.stringify(props).slice(0, 100), "...");
|
|
11411
11416
|
};
|
|
11412
11417
|
|
|
11413
|
-
var Hits
|
|
11418
|
+
var Hits = function Hits(_ref) {
|
|
11414
11419
|
var hits = _ref.hits,
|
|
11415
11420
|
_ref$className = _ref.className,
|
|
11416
11421
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
11417
11422
|
_ref$hitComponent = _ref.hitComponent,
|
|
11418
11423
|
HitComponent = _ref$hitComponent === void 0 ? DefaultHitComponent : _ref$hitComponent;
|
|
11419
11424
|
return React__default.createElement("div", {
|
|
11420
|
-
className: classnames(cx$
|
|
11425
|
+
className: classnames(cx$7(''), className)
|
|
11421
11426
|
}, React__default.createElement("ul", {
|
|
11422
|
-
className: cx$
|
|
11427
|
+
className: cx$7('list')
|
|
11423
11428
|
}, hits.map(function (hit) {
|
|
11424
11429
|
return React__default.createElement("li", {
|
|
11425
|
-
className: cx$
|
|
11430
|
+
className: cx$7('item'),
|
|
11426
11431
|
key: hit.objectID
|
|
11427
11432
|
}, React__default.createElement(HitComponent, {
|
|
11428
11433
|
hit: hit
|
|
@@ -11433,7 +11438,7 @@ var Hits$1 = function Hits(_ref) {
|
|
|
11433
11438
|
var HitPropTypes = PropTypes.shape({
|
|
11434
11439
|
objectID: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11435
11440
|
});
|
|
11436
|
-
Hits
|
|
11441
|
+
Hits.propTypes = {
|
|
11437
11442
|
hits: PropTypes.arrayOf(HitPropTypes.isRequired).isRequired,
|
|
11438
11443
|
className: PropTypes.string,
|
|
11439
11444
|
hitComponent: PropTypes.func
|
|
@@ -11472,7 +11477,7 @@ Hits$1.propTypes = {
|
|
|
11472
11477
|
* );
|
|
11473
11478
|
*/
|
|
11474
11479
|
|
|
11475
|
-
var Hits = connectHits(Hits
|
|
11480
|
+
var Hits$1 = connectHits(Hits);
|
|
11476
11481
|
|
|
11477
11482
|
var Select =
|
|
11478
11483
|
/*#__PURE__*/
|
|
@@ -11536,7 +11541,7 @@ _defineProperty(Select, "propTypes", {
|
|
|
11536
11541
|
selectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11537
11542
|
});
|
|
11538
11543
|
|
|
11539
|
-
var cx$
|
|
11544
|
+
var cx$8 = createClassNames('HitsPerPage');
|
|
11540
11545
|
|
|
11541
11546
|
var HitsPerPage =
|
|
11542
11547
|
/*#__PURE__*/
|
|
@@ -11558,12 +11563,12 @@ function (_Component) {
|
|
|
11558
11563
|
refine = _this$props.refine,
|
|
11559
11564
|
className = _this$props.className;
|
|
11560
11565
|
return React__default.createElement("div", {
|
|
11561
|
-
className: classnames(cx$
|
|
11566
|
+
className: classnames(cx$8(''), className)
|
|
11562
11567
|
}, React__default.createElement(Select, {
|
|
11563
11568
|
onSelect: refine,
|
|
11564
11569
|
selectedItem: currentRefinement,
|
|
11565
11570
|
items: items,
|
|
11566
|
-
cx: cx$
|
|
11571
|
+
cx: cx$8
|
|
11567
11572
|
}));
|
|
11568
11573
|
}
|
|
11569
11574
|
}]);
|
|
@@ -11629,7 +11634,7 @@ _defineProperty(HitsPerPage, "defaultProps", {
|
|
|
11629
11634
|
|
|
11630
11635
|
connectHitsPerPage(HitsPerPage);
|
|
11631
11636
|
|
|
11632
|
-
var cx$
|
|
11637
|
+
var cx$9 = createClassNames('InfiniteHits');
|
|
11633
11638
|
|
|
11634
11639
|
var InfiniteHits =
|
|
11635
11640
|
/*#__PURE__*/
|
|
@@ -11656,24 +11661,24 @@ function (_Component) {
|
|
|
11656
11661
|
translate = _this$props.translate,
|
|
11657
11662
|
className = _this$props.className;
|
|
11658
11663
|
return React__default.createElement("div", {
|
|
11659
|
-
className: classnames(cx$
|
|
11664
|
+
className: classnames(cx$9(''), className)
|
|
11660
11665
|
}, showPrevious && React__default.createElement("button", {
|
|
11661
|
-
className: cx$
|
|
11666
|
+
className: cx$9('loadPrevious', !hasPrevious && 'loadPrevious--disabled'),
|
|
11662
11667
|
onClick: function onClick() {
|
|
11663
11668
|
return refinePrevious();
|
|
11664
11669
|
},
|
|
11665
11670
|
disabled: !hasPrevious
|
|
11666
11671
|
}, translate('loadPrevious')), React__default.createElement("ul", {
|
|
11667
|
-
className: cx$
|
|
11672
|
+
className: cx$9('list')
|
|
11668
11673
|
}, hits.map(function (hit) {
|
|
11669
11674
|
return React__default.createElement("li", {
|
|
11670
11675
|
key: hit.objectID,
|
|
11671
|
-
className: cx$
|
|
11676
|
+
className: cx$9('item')
|
|
11672
11677
|
}, React__default.createElement(HitComponent, {
|
|
11673
11678
|
hit: hit
|
|
11674
11679
|
}));
|
|
11675
11680
|
})), React__default.createElement("button", {
|
|
11676
|
-
className: cx$
|
|
11681
|
+
className: cx$9('loadMore', !hasMore && 'loadMore--disabled'),
|
|
11677
11682
|
onClick: function onClick() {
|
|
11678
11683
|
return refineNext();
|
|
11679
11684
|
},
|
|
@@ -11754,7 +11759,7 @@ var InfiniteHits$1 = translatable({
|
|
|
11754
11759
|
|
|
11755
11760
|
connectInfiniteHits(InfiniteHits$1);
|
|
11756
11761
|
|
|
11757
|
-
var cx$
|
|
11762
|
+
var cx$a = createClassNames('Menu');
|
|
11758
11763
|
|
|
11759
11764
|
var Menu =
|
|
11760
11765
|
/*#__PURE__*/
|
|
@@ -11776,20 +11781,20 @@ function (_Component) {
|
|
|
11776
11781
|
|
|
11777
11782
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
11778
11783
|
var createURL = _this.props.createURL;
|
|
11779
|
-
var label = _this.props.isFromSearch ? React__default.createElement(Highlight, {
|
|
11784
|
+
var label = _this.props.isFromSearch ? React__default.createElement(Highlight$2, {
|
|
11780
11785
|
attribute: "label",
|
|
11781
11786
|
hit: item
|
|
11782
11787
|
}) : item.label;
|
|
11783
11788
|
return React__default.createElement(Link, {
|
|
11784
|
-
className: cx$
|
|
11789
|
+
className: cx$a('link'),
|
|
11785
11790
|
onClick: function onClick() {
|
|
11786
11791
|
return _this.selectItem(item, resetQuery);
|
|
11787
11792
|
},
|
|
11788
11793
|
href: createURL(item.value)
|
|
11789
11794
|
}, React__default.createElement("span", {
|
|
11790
|
-
className: cx$
|
|
11795
|
+
className: cx$a('label')
|
|
11791
11796
|
}, label), ' ', React__default.createElement("span", {
|
|
11792
|
-
className: cx$
|
|
11797
|
+
className: cx$a('count')
|
|
11793
11798
|
}, item.count));
|
|
11794
11799
|
});
|
|
11795
11800
|
|
|
@@ -11819,7 +11824,7 @@ function (_Component) {
|
|
|
11819
11824
|
return React__default.createElement(List, {
|
|
11820
11825
|
renderItem: this.renderItem,
|
|
11821
11826
|
selectItem: this.selectItem,
|
|
11822
|
-
cx: cx$
|
|
11827
|
+
cx: cx$a,
|
|
11823
11828
|
translate: translate,
|
|
11824
11829
|
items: items,
|
|
11825
11830
|
showMore: showMore,
|
|
@@ -11929,7 +11934,7 @@ var MenuWidget = function MenuWidget(props) {
|
|
|
11929
11934
|
|
|
11930
11935
|
connectMenu(MenuWidget);
|
|
11931
11936
|
|
|
11932
|
-
var cx$
|
|
11937
|
+
var cx$b = createClassNames('MenuSelect');
|
|
11933
11938
|
|
|
11934
11939
|
var MenuSelect =
|
|
11935
11940
|
/*#__PURE__*/
|
|
@@ -11967,26 +11972,26 @@ function (_Component) {
|
|
|
11967
11972
|
translate = _this$props.translate,
|
|
11968
11973
|
className = _this$props.className;
|
|
11969
11974
|
return React__default.createElement("div", {
|
|
11970
|
-
className: classnames(cx$
|
|
11975
|
+
className: classnames(cx$b('', !canRefine && '-noRefinement'), className)
|
|
11971
11976
|
}, React__default.createElement("select", {
|
|
11972
11977
|
value: this.selectedValue,
|
|
11973
11978
|
onChange: this.handleSelectChange,
|
|
11974
|
-
className: cx$
|
|
11979
|
+
className: cx$b('select')
|
|
11975
11980
|
}, React__default.createElement("option", {
|
|
11976
11981
|
value: "ais__see__all__option",
|
|
11977
|
-
className: cx$
|
|
11982
|
+
className: cx$b('option')
|
|
11978
11983
|
}, translate('seeAllOption')), items.map(function (item) {
|
|
11979
11984
|
return React__default.createElement("option", {
|
|
11980
11985
|
key: item.value,
|
|
11981
11986
|
value: item.value,
|
|
11982
|
-
className: cx$
|
|
11987
|
+
className: cx$b('option')
|
|
11983
11988
|
}, item.label, " (", item.count, ")");
|
|
11984
11989
|
})));
|
|
11985
11990
|
}
|
|
11986
11991
|
}, {
|
|
11987
11992
|
key: "selectedValue",
|
|
11988
11993
|
get: function get() {
|
|
11989
|
-
var _ref2 = find(this.props.items, function (item) {
|
|
11994
|
+
var _ref2 = find$2(this.props.items, function (item) {
|
|
11990
11995
|
return item.isRefined === true;
|
|
11991
11996
|
}) || {
|
|
11992
11997
|
value: 'ais__see__all__option'
|
|
@@ -12063,7 +12068,7 @@ var MenuSelectWidget = function MenuSelectWidget(props) {
|
|
|
12063
12068
|
|
|
12064
12069
|
connectMenu(MenuSelectWidget);
|
|
12065
12070
|
|
|
12066
|
-
var cx$
|
|
12071
|
+
var cx$c = createClassNames('NumericMenu');
|
|
12067
12072
|
|
|
12068
12073
|
var NumericMenu =
|
|
12069
12074
|
/*#__PURE__*/
|
|
@@ -12088,9 +12093,9 @@ function (_Component) {
|
|
|
12088
12093
|
refine = _this$props.refine,
|
|
12089
12094
|
translate = _this$props.translate;
|
|
12090
12095
|
return React__default.createElement("label", {
|
|
12091
|
-
className: cx$
|
|
12096
|
+
className: cx$c('label')
|
|
12092
12097
|
}, React__default.createElement("input", {
|
|
12093
|
-
className: cx$
|
|
12098
|
+
className: cx$c('radio'),
|
|
12094
12099
|
type: "radio",
|
|
12095
12100
|
checked: item.isRefined,
|
|
12096
12101
|
disabled: item.noRefinement,
|
|
@@ -12098,7 +12103,7 @@ function (_Component) {
|
|
|
12098
12103
|
return refine(item.value);
|
|
12099
12104
|
}
|
|
12100
12105
|
}), React__default.createElement("span", {
|
|
12101
|
-
className: cx$
|
|
12106
|
+
className: cx$c('labelText')
|
|
12102
12107
|
}, item.value === '' ? translate('all') : item.label));
|
|
12103
12108
|
});
|
|
12104
12109
|
|
|
@@ -12116,7 +12121,7 @@ function (_Component) {
|
|
|
12116
12121
|
renderItem: this.renderItem,
|
|
12117
12122
|
showMore: false,
|
|
12118
12123
|
canRefine: canRefine,
|
|
12119
|
-
cx: cx$
|
|
12124
|
+
cx: cx$c,
|
|
12120
12125
|
items: items.map(function (item) {
|
|
12121
12126
|
return _objectSpread({}, item, {
|
|
12122
12127
|
key: item.value
|
|
@@ -12261,7 +12266,7 @@ _defineProperty(LinkList, "propTypes", {
|
|
|
12261
12266
|
canRefine: PropTypes.bool.isRequired
|
|
12262
12267
|
});
|
|
12263
12268
|
|
|
12264
|
-
var cx$
|
|
12269
|
+
var cx$d = createClassNames('Pagination'); // Determines the size of the widget (the number of pages displayed - that the user can directly click on)
|
|
12265
12270
|
|
|
12266
12271
|
function calculateSize(padding, maxPages) {
|
|
12267
12272
|
return Math.min(2 * padding + 1, maxPages);
|
|
@@ -12297,7 +12302,7 @@ function getPages(currentPage, maxPages, padding) {
|
|
|
12297
12302
|
});
|
|
12298
12303
|
}
|
|
12299
12304
|
|
|
12300
|
-
var Pagination
|
|
12305
|
+
var Pagination =
|
|
12301
12306
|
/*#__PURE__*/
|
|
12302
12307
|
function (_Component) {
|
|
12303
12308
|
_inherits(Pagination, _Component);
|
|
@@ -12404,9 +12409,9 @@ function (_Component) {
|
|
|
12404
12409
|
}
|
|
12405
12410
|
|
|
12406
12411
|
return React__default.createElement("div", {
|
|
12407
|
-
className: classnames(cx$
|
|
12412
|
+
className: classnames(cx$d('', !canRefine && '-noRefinement'), className)
|
|
12408
12413
|
}, React__default.createElement(ListComponent, _extends({}, otherProps, {
|
|
12409
|
-
cx: cx$
|
|
12414
|
+
cx: cx$d,
|
|
12410
12415
|
items: items,
|
|
12411
12416
|
onSelect: refine,
|
|
12412
12417
|
createURL: createURL,
|
|
@@ -12418,7 +12423,7 @@ function (_Component) {
|
|
|
12418
12423
|
return Pagination;
|
|
12419
12424
|
}(Component);
|
|
12420
12425
|
|
|
12421
|
-
_defineProperty(Pagination
|
|
12426
|
+
_defineProperty(Pagination, "propTypes", {
|
|
12422
12427
|
nbPages: PropTypes.number.isRequired,
|
|
12423
12428
|
currentRefinement: PropTypes.number.isRequired,
|
|
12424
12429
|
refine: PropTypes.func.isRequired,
|
|
@@ -12435,7 +12440,7 @@ _defineProperty(Pagination$1, "propTypes", {
|
|
|
12435
12440
|
className: PropTypes.string
|
|
12436
12441
|
});
|
|
12437
12442
|
|
|
12438
|
-
_defineProperty(Pagination
|
|
12443
|
+
_defineProperty(Pagination, "defaultProps", {
|
|
12439
12444
|
listComponent: LinkList,
|
|
12440
12445
|
showFirst: true,
|
|
12441
12446
|
showPrevious: true,
|
|
@@ -12446,7 +12451,7 @@ _defineProperty(Pagination$1, "defaultProps", {
|
|
|
12446
12451
|
className: ''
|
|
12447
12452
|
});
|
|
12448
12453
|
|
|
12449
|
-
var Pagination$
|
|
12454
|
+
var Pagination$1 = translatable({
|
|
12450
12455
|
previous: '‹',
|
|
12451
12456
|
next: '›',
|
|
12452
12457
|
first: '«',
|
|
@@ -12461,7 +12466,7 @@ var Pagination$2 = translatable({
|
|
|
12461
12466
|
ariaPage: function ariaPage(currentRefinement) {
|
|
12462
12467
|
return "Page ".concat(currentRefinement.toString());
|
|
12463
12468
|
}
|
|
12464
|
-
})(Pagination
|
|
12469
|
+
})(Pagination);
|
|
12465
12470
|
|
|
12466
12471
|
/**
|
|
12467
12472
|
* The Pagination widget displays a simple pagination system allowing the user to
|
|
@@ -12518,12 +12523,12 @@ var Pagination$2 = translatable({
|
|
|
12518
12523
|
*/
|
|
12519
12524
|
|
|
12520
12525
|
var PaginationWidget = function PaginationWidget(props) {
|
|
12521
|
-
return React__default.createElement(PanelWrapper, props, React__default.createElement(Pagination$
|
|
12526
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(Pagination$1, props));
|
|
12522
12527
|
};
|
|
12523
12528
|
|
|
12524
|
-
var Pagination = connectPagination(PaginationWidget);
|
|
12529
|
+
var Pagination$2 = connectPagination(PaginationWidget);
|
|
12525
12530
|
|
|
12526
|
-
var cx$
|
|
12531
|
+
var cx$e = createClassNames('PoweredBy');
|
|
12527
12532
|
/* eslint-disable max-len */
|
|
12528
12533
|
|
|
12529
12534
|
var AlgoliaLogo = function AlgoliaLogo() {
|
|
@@ -12533,7 +12538,7 @@ var AlgoliaLogo = function AlgoliaLogo() {
|
|
|
12533
12538
|
viewBox: "0 0 1366 362",
|
|
12534
12539
|
width: "100",
|
|
12535
12540
|
height: "27",
|
|
12536
|
-
className: cx$
|
|
12541
|
+
className: cx$e('logo')
|
|
12537
12542
|
}, React__default.createElement("linearGradient", {
|
|
12538
12543
|
id: "g",
|
|
12539
12544
|
x1: "428.258",
|
|
@@ -12581,13 +12586,13 @@ function (_Component) {
|
|
|
12581
12586
|
translate = _this$props.translate,
|
|
12582
12587
|
className = _this$props.className;
|
|
12583
12588
|
return React__default.createElement("div", {
|
|
12584
|
-
className: classnames(cx$
|
|
12589
|
+
className: classnames(cx$e(''), className)
|
|
12585
12590
|
}, React__default.createElement("span", {
|
|
12586
|
-
className: cx$
|
|
12591
|
+
className: cx$e('text')
|
|
12587
12592
|
}, translate('searchBy')), ' ', React__default.createElement("a", {
|
|
12588
12593
|
href: url,
|
|
12589
12594
|
target: "_blank",
|
|
12590
|
-
className: cx$
|
|
12595
|
+
className: cx$e('link'),
|
|
12591
12596
|
"aria-label": "Algolia",
|
|
12592
12597
|
rel: "noopener noreferrer"
|
|
12593
12598
|
}, React__default.createElement(AlgoliaLogo, null)));
|
|
@@ -12640,7 +12645,7 @@ var PoweredBy$1 = translatable({
|
|
|
12640
12645
|
|
|
12641
12646
|
connectPoweredBy(PoweredBy$1);
|
|
12642
12647
|
|
|
12643
|
-
var cx$
|
|
12648
|
+
var cx$f = createClassNames('RangeInput');
|
|
12644
12649
|
var RawRangeInput =
|
|
12645
12650
|
/*#__PURE__*/
|
|
12646
12651
|
function (_Component) {
|
|
@@ -12720,12 +12725,12 @@ function (_Component) {
|
|
|
12720
12725
|
|
|
12721
12726
|
var step = 1 / Math.pow(10, precision);
|
|
12722
12727
|
return React__default.createElement("div", {
|
|
12723
|
-
className: classnames(cx$
|
|
12728
|
+
className: classnames(cx$f('', !canRefine && '-noRefinement'), className)
|
|
12724
12729
|
}, React__default.createElement("form", {
|
|
12725
|
-
className: cx$
|
|
12730
|
+
className: cx$f('form'),
|
|
12726
12731
|
onSubmit: this.onSubmit
|
|
12727
12732
|
}, React__default.createElement("input", {
|
|
12728
|
-
className: cx$
|
|
12733
|
+
className: cx$f('input', 'input--min'),
|
|
12729
12734
|
type: "number",
|
|
12730
12735
|
min: min,
|
|
12731
12736
|
max: max,
|
|
@@ -12739,9 +12744,9 @@ function (_Component) {
|
|
|
12739
12744
|
});
|
|
12740
12745
|
}
|
|
12741
12746
|
}), React__default.createElement("span", {
|
|
12742
|
-
className: cx$
|
|
12747
|
+
className: cx$f('separator')
|
|
12743
12748
|
}, translate('separator')), React__default.createElement("input", {
|
|
12744
|
-
className: cx$
|
|
12749
|
+
className: cx$f('input', 'input--max'),
|
|
12745
12750
|
type: "number",
|
|
12746
12751
|
min: min,
|
|
12747
12752
|
max: max,
|
|
@@ -12755,7 +12760,7 @@ function (_Component) {
|
|
|
12755
12760
|
});
|
|
12756
12761
|
}
|
|
12757
12762
|
}), React__default.createElement("button", {
|
|
12758
|
-
className: cx$
|
|
12763
|
+
className: cx$f('submit'),
|
|
12759
12764
|
type: "submit"
|
|
12760
12765
|
}, translate('submit'))));
|
|
12761
12766
|
}
|
|
@@ -12836,7 +12841,7 @@ var RangeInputWidget = function RangeInputWidget(props) {
|
|
|
12836
12841
|
|
|
12837
12842
|
connectRange(RangeInputWidget);
|
|
12838
12843
|
|
|
12839
|
-
var cx$
|
|
12844
|
+
var cx$g = createClassNames('RatingMenu');
|
|
12840
12845
|
|
|
12841
12846
|
var RatingMenu =
|
|
12842
12847
|
/*#__PURE__*/
|
|
@@ -12889,12 +12894,12 @@ function (_Component) {
|
|
|
12889
12894
|
|
|
12890
12895
|
icons.push([React__default.createElement("svg", {
|
|
12891
12896
|
key: icon,
|
|
12892
|
-
className: cx$
|
|
12897
|
+
className: cx$g('starIcon', icon >= lowerBound ? 'starIcon--empty' : 'starIcon--full'),
|
|
12893
12898
|
"aria-hidden": "true",
|
|
12894
12899
|
width: "24",
|
|
12895
12900
|
height: "24"
|
|
12896
12901
|
}, React__default.createElement("use", {
|
|
12897
|
-
xlinkHref: "#".concat(cx$
|
|
12902
|
+
xlinkHref: "#".concat(cx$g(icon >= lowerBound ? 'starEmptySymbol' : 'starSymbol'))
|
|
12898
12903
|
})), ' ']);
|
|
12899
12904
|
} // The last item of the list (the default item), should not
|
|
12900
12905
|
// be clickable if it is selected.
|
|
@@ -12910,15 +12915,15 @@ function (_Component) {
|
|
|
12910
12915
|
};
|
|
12911
12916
|
return React__default.createElement("li", {
|
|
12912
12917
|
key: lowerBound,
|
|
12913
|
-
className: cx$
|
|
12918
|
+
className: cx$g('item', selected && 'item--selected', disabled && 'item--disabled')
|
|
12914
12919
|
}, React__default.createElement("a", _extends({
|
|
12915
|
-
className: cx$
|
|
12920
|
+
className: cx$g('link'),
|
|
12916
12921
|
"aria-label": "".concat(rating).concat(translate('ratingLabel'))
|
|
12917
12922
|
}, onClickHandler), icons, React__default.createElement("span", {
|
|
12918
|
-
className: cx$
|
|
12923
|
+
className: cx$g('label'),
|
|
12919
12924
|
"aria-hidden": "true"
|
|
12920
12925
|
}, translate('ratingLabel')), ' ', React__default.createElement("span", {
|
|
12921
|
-
className: cx$
|
|
12926
|
+
className: cx$g('count')
|
|
12922
12927
|
}, count)));
|
|
12923
12928
|
}
|
|
12924
12929
|
}, {
|
|
@@ -12950,7 +12955,7 @@ function (_Component) {
|
|
|
12950
12955
|
start: 0,
|
|
12951
12956
|
end: Math.max(inclusiveLength, 0)
|
|
12952
12957
|
}).map(function (index) {
|
|
12953
|
-
var element = find(values, function (item) {
|
|
12958
|
+
var element = find$2(values, function (item) {
|
|
12954
12959
|
return item.value === limitMax - index;
|
|
12955
12960
|
});
|
|
12956
12961
|
var placeholder = {
|
|
@@ -12974,24 +12979,24 @@ function (_Component) {
|
|
|
12974
12979
|
});
|
|
12975
12980
|
});
|
|
12976
12981
|
return React__default.createElement("div", {
|
|
12977
|
-
className: classnames(cx$
|
|
12982
|
+
className: classnames(cx$g('', !canRefine && '-noRefinement'), className)
|
|
12978
12983
|
}, React__default.createElement("svg", {
|
|
12979
12984
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12980
12985
|
style: {
|
|
12981
12986
|
display: 'none'
|
|
12982
12987
|
}
|
|
12983
12988
|
}, React__default.createElement("symbol", {
|
|
12984
|
-
id: cx$
|
|
12989
|
+
id: cx$g('starSymbol'),
|
|
12985
12990
|
viewBox: "0 0 24 24"
|
|
12986
12991
|
}, React__default.createElement("path", {
|
|
12987
12992
|
d: "M12 .288l2.833 8.718h9.167l-7.417 5.389 2.833 8.718-7.416-5.388-7.417 5.388 2.833-8.718-7.416-5.389h9.167z"
|
|
12988
12993
|
})), React__default.createElement("symbol", {
|
|
12989
|
-
id: cx$
|
|
12994
|
+
id: cx$g('starEmptySymbol'),
|
|
12990
12995
|
viewBox: "0 0 24 24"
|
|
12991
12996
|
}, React__default.createElement("path", {
|
|
12992
12997
|
d: "M12 6.76l1.379 4.246h4.465l-3.612 2.625 1.379 4.246-3.611-2.625-3.612 2.625 1.379-4.246-3.612-2.625h4.465l1.38-4.246zm0-6.472l-2.833 8.718h-9.167l7.416 5.389-2.833 8.718 7.417-5.388 7.416 5.388-2.833-8.718 7.417-5.389h-9.167l-2.833-8.718z"
|
|
12993
12998
|
}))), React__default.createElement("ul", {
|
|
12994
|
-
className: cx$
|
|
12999
|
+
className: cx$g('list', !canRefine && 'list--noRefinement')
|
|
12995
13000
|
}, items));
|
|
12996
13001
|
}
|
|
12997
13002
|
}]);
|
|
@@ -13079,7 +13084,7 @@ var RatingMenuWidget = function RatingMenuWidget(props) {
|
|
|
13079
13084
|
|
|
13080
13085
|
connectRange(RatingMenuWidget);
|
|
13081
13086
|
|
|
13082
|
-
var cx$
|
|
13087
|
+
var cx$h = createClassNames('RefinementList');
|
|
13083
13088
|
|
|
13084
13089
|
var RefinementList$1 =
|
|
13085
13090
|
/*#__PURE__*/
|
|
@@ -13110,23 +13115,23 @@ function (_Component) {
|
|
|
13110
13115
|
});
|
|
13111
13116
|
|
|
13112
13117
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
13113
|
-
var label = _this.props.isFromSearch ? React__default.createElement(Highlight, {
|
|
13118
|
+
var label = _this.props.isFromSearch ? React__default.createElement(Highlight$2, {
|
|
13114
13119
|
attribute: "label",
|
|
13115
13120
|
hit: item
|
|
13116
13121
|
}) : item.label;
|
|
13117
13122
|
return React__default.createElement("label", {
|
|
13118
|
-
className: cx$
|
|
13123
|
+
className: cx$h('label')
|
|
13119
13124
|
}, React__default.createElement("input", {
|
|
13120
|
-
className: cx$
|
|
13125
|
+
className: cx$h('checkbox'),
|
|
13121
13126
|
type: "checkbox",
|
|
13122
13127
|
checked: item.isRefined,
|
|
13123
13128
|
onChange: function onChange() {
|
|
13124
13129
|
return _this.selectItem(item, resetQuery);
|
|
13125
13130
|
}
|
|
13126
13131
|
}), React__default.createElement("span", {
|
|
13127
|
-
className: cx$
|
|
13132
|
+
className: cx$h('labelText')
|
|
13128
13133
|
}, label), ' ', React__default.createElement("span", {
|
|
13129
|
-
className: cx$
|
|
13134
|
+
className: cx$h('count')
|
|
13130
13135
|
}, item.count.toLocaleString()));
|
|
13131
13136
|
});
|
|
13132
13137
|
|
|
@@ -13150,7 +13155,7 @@ function (_Component) {
|
|
|
13150
13155
|
return React__default.createElement(List, {
|
|
13151
13156
|
renderItem: this.renderItem,
|
|
13152
13157
|
selectItem: this.selectItem,
|
|
13153
|
-
cx: cx$
|
|
13158
|
+
cx: cx$h,
|
|
13154
13159
|
translate: translate,
|
|
13155
13160
|
items: items,
|
|
13156
13161
|
showMore: showMore,
|
|
@@ -13262,9 +13267,9 @@ var RefinementListWidget = function RefinementListWidget(props) {
|
|
|
13262
13267
|
return React__default.createElement(PanelWrapper, props, React__default.createElement(RefinementList$2, props));
|
|
13263
13268
|
};
|
|
13264
13269
|
|
|
13265
|
-
var RefinementList = connectRefinementList(RefinementListWidget);
|
|
13270
|
+
var RefinementList$3 = connectRefinementList(RefinementListWidget);
|
|
13266
13271
|
|
|
13267
|
-
var cx$
|
|
13272
|
+
var cx$i = createClassNames('ScrollTo');
|
|
13268
13273
|
|
|
13269
13274
|
var ScrollTo =
|
|
13270
13275
|
/*#__PURE__*/
|
|
@@ -13297,7 +13302,7 @@ function (_Component) {
|
|
|
13297
13302
|
ref: function ref(_ref) {
|
|
13298
13303
|
return _this.el = _ref;
|
|
13299
13304
|
},
|
|
13300
|
-
className: cx$
|
|
13305
|
+
className: cx$i('')
|
|
13301
13306
|
}, this.props.children);
|
|
13302
13307
|
}
|
|
13303
13308
|
}]);
|
|
@@ -13391,14 +13396,14 @@ connectScrollTo(ScrollTo);
|
|
|
13391
13396
|
* );
|
|
13392
13397
|
*/
|
|
13393
13398
|
|
|
13394
|
-
var SearchBox = connectSearchBox(SearchBox$
|
|
13399
|
+
var SearchBox$2 = connectSearchBox(SearchBox$1);
|
|
13395
13400
|
|
|
13396
|
-
var cx$
|
|
13401
|
+
var cx$j = createClassNames('Snippet');
|
|
13397
13402
|
|
|
13398
13403
|
var Snippet = function Snippet(props) {
|
|
13399
13404
|
return React__default.createElement(Highlighter, _extends({}, props, {
|
|
13400
13405
|
highlightProperty: "_snippetResult",
|
|
13401
|
-
cx: cx$
|
|
13406
|
+
cx: cx$j
|
|
13402
13407
|
}));
|
|
13403
13408
|
};
|
|
13404
13409
|
|
|
@@ -13448,7 +13453,7 @@ var Snippet = function Snippet(props) {
|
|
|
13448
13453
|
|
|
13449
13454
|
connectHighlight(Snippet);
|
|
13450
13455
|
|
|
13451
|
-
var cx$
|
|
13456
|
+
var cx$k = createClassNames('RelevantSort');
|
|
13452
13457
|
|
|
13453
13458
|
var DefaultButtonTextComponent = function DefaultButtonTextComponent(_ref) {
|
|
13454
13459
|
var isRelevantSorted = _ref.isRelevantSorted;
|
|
@@ -13465,13 +13470,13 @@ var RelevantSort = function RelevantSort(_ref2) {
|
|
|
13465
13470
|
TextComponent = _ref2.textComponent,
|
|
13466
13471
|
refine = _ref2.refine;
|
|
13467
13472
|
return !isVirtualReplica ? null : React__default.createElement("div", {
|
|
13468
|
-
className: classnames(cx$
|
|
13473
|
+
className: classnames(cx$k(''), className)
|
|
13469
13474
|
}, React__default.createElement("div", {
|
|
13470
|
-
className: cx$
|
|
13475
|
+
className: cx$k('text')
|
|
13471
13476
|
}, TextComponent && React__default.createElement(TextComponent, {
|
|
13472
13477
|
isRelevantSorted: isRelevantSorted
|
|
13473
13478
|
})), React__default.createElement("button", {
|
|
13474
|
-
className: cx$
|
|
13479
|
+
className: cx$k('button'),
|
|
13475
13480
|
onClick: function onClick() {
|
|
13476
13481
|
return refine(isRelevantSorted ? 0 : undefined);
|
|
13477
13482
|
}
|
|
@@ -13491,7 +13496,7 @@ RelevantSort.propTypes = {
|
|
|
13491
13496
|
|
|
13492
13497
|
connectRelevantSort(RelevantSort);
|
|
13493
13498
|
|
|
13494
|
-
var cx$
|
|
13499
|
+
var cx$l = createClassNames('SortBy');
|
|
13495
13500
|
|
|
13496
13501
|
var SortBy =
|
|
13497
13502
|
/*#__PURE__*/
|
|
@@ -13513,9 +13518,9 @@ function (_Component) {
|
|
|
13513
13518
|
refine = _this$props.refine,
|
|
13514
13519
|
className = _this$props.className;
|
|
13515
13520
|
return React__default.createElement("div", {
|
|
13516
|
-
className: classnames(cx$
|
|
13521
|
+
className: classnames(cx$l(''), className)
|
|
13517
13522
|
}, React__default.createElement(Select, {
|
|
13518
|
-
cx: cx$
|
|
13523
|
+
cx: cx$l,
|
|
13519
13524
|
items: items,
|
|
13520
13525
|
selectedItem: currentRefinement,
|
|
13521
13526
|
onSelect: refine
|
|
@@ -13581,7 +13586,7 @@ _defineProperty(SortBy, "defaultProps", {
|
|
|
13581
13586
|
|
|
13582
13587
|
connectSortBy(SortBy);
|
|
13583
13588
|
|
|
13584
|
-
var cx$
|
|
13589
|
+
var cx$m = createClassNames('Stats');
|
|
13585
13590
|
|
|
13586
13591
|
var Stats = function Stats(_ref) {
|
|
13587
13592
|
var _ref$className = _ref.className,
|
|
@@ -13592,9 +13597,9 @@ var Stats = function Stats(_ref) {
|
|
|
13592
13597
|
processingTimeMS = _ref.processingTimeMS,
|
|
13593
13598
|
translate = _ref.translate;
|
|
13594
13599
|
return React__default.createElement("div", {
|
|
13595
|
-
className: classnames(cx$
|
|
13600
|
+
className: classnames(cx$m(''), className)
|
|
13596
13601
|
}, React__default.createElement("span", {
|
|
13597
|
-
className: cx$
|
|
13602
|
+
className: cx$m('text')
|
|
13598
13603
|
}, translate('stats', nbHits, processingTimeMS, nbSortedHits, areHitsSorted)));
|
|
13599
13604
|
};
|
|
13600
13605
|
|
|
@@ -13642,7 +13647,7 @@ var Stats$1 = translatable({
|
|
|
13642
13647
|
|
|
13643
13648
|
connectStats(Stats$1);
|
|
13644
13649
|
|
|
13645
|
-
var cx$
|
|
13650
|
+
var cx$n = createClassNames('ToggleRefinement');
|
|
13646
13651
|
|
|
13647
13652
|
var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
13648
13653
|
var currentRefinement = _ref.currentRefinement,
|
|
@@ -13651,18 +13656,18 @@ var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
|
13651
13656
|
refine = _ref.refine,
|
|
13652
13657
|
className = _ref.className;
|
|
13653
13658
|
return React__default.createElement("div", {
|
|
13654
|
-
className: classnames(cx$
|
|
13659
|
+
className: classnames(cx$n('', !canRefine && '-noRefinement'), className)
|
|
13655
13660
|
}, React__default.createElement("label", {
|
|
13656
|
-
className: cx$
|
|
13661
|
+
className: cx$n('label')
|
|
13657
13662
|
}, React__default.createElement("input", {
|
|
13658
|
-
className: cx$
|
|
13663
|
+
className: cx$n('checkbox'),
|
|
13659
13664
|
type: "checkbox",
|
|
13660
13665
|
checked: currentRefinement,
|
|
13661
13666
|
onChange: function onChange(event) {
|
|
13662
13667
|
return refine(event.target.checked);
|
|
13663
13668
|
}
|
|
13664
13669
|
}), React__default.createElement("span", {
|
|
13665
|
-
className: cx$
|
|
13670
|
+
className: cx$n('labelText')
|
|
13666
13671
|
}, label)));
|
|
13667
13672
|
};
|
|
13668
13673
|
|
|
@@ -13871,7 +13876,7 @@ function createVoiceSearchHelper(_ref) {
|
|
|
13871
13876
|
};
|
|
13872
13877
|
}
|
|
13873
13878
|
|
|
13874
|
-
var cx$
|
|
13879
|
+
var cx$o = createClassNames('VoiceSearch');
|
|
13875
13880
|
|
|
13876
13881
|
var ButtonSvg = function ButtonSvg(_ref) {
|
|
13877
13882
|
var children = _ref.children;
|
|
@@ -14017,15 +14022,15 @@ function (_Component) {
|
|
|
14017
14022
|
isBrowserSupported: isBrowserSupported()
|
|
14018
14023
|
};
|
|
14019
14024
|
return React__default.createElement("div", {
|
|
14020
|
-
className: cx$
|
|
14025
|
+
className: cx$o('')
|
|
14021
14026
|
}, React__default.createElement("button", {
|
|
14022
|
-
className: cx$
|
|
14027
|
+
className: cx$o('button'),
|
|
14023
14028
|
type: "button",
|
|
14024
14029
|
title: isBrowserSupported() ? translate('buttonTitle') : translate('disabledButtonTitle'),
|
|
14025
14030
|
onClick: this.onClick,
|
|
14026
14031
|
disabled: !isBrowserSupported()
|
|
14027
14032
|
}, React__default.createElement(ButtonTextComponent, innerProps)), React__default.createElement("div", {
|
|
14028
|
-
className: cx$
|
|
14033
|
+
className: cx$o('status')
|
|
14029
14034
|
}, React__default.createElement(StatusComponent, innerProps)));
|
|
14030
14035
|
}
|
|
14031
14036
|
}, {
|
|
@@ -14053,14 +14058,14 @@ var VoiceSearch$1 = translatable({
|
|
|
14053
14058
|
|
|
14054
14059
|
connectVoiceSearch(VoiceSearch$1);
|
|
14055
14060
|
|
|
14056
|
-
var cx = createClassNames('QueryRuleCustomData');
|
|
14061
|
+
var cx$p = createClassNames('QueryRuleCustomData');
|
|
14057
14062
|
|
|
14058
14063
|
var QueryRuleCustomData = function QueryRuleCustomData(_ref) {
|
|
14059
14064
|
var items = _ref.items,
|
|
14060
14065
|
className = _ref.className,
|
|
14061
14066
|
children = _ref.children;
|
|
14062
14067
|
return React__default.createElement("div", {
|
|
14063
|
-
className: classnames(cx(''), className)
|
|
14068
|
+
className: classnames(cx$p(''), className)
|
|
14064
14069
|
}, children({
|
|
14065
14070
|
items: items
|
|
14066
14071
|
}));
|
|
@@ -14113,7 +14118,7 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14113
14118
|
LazyLoad,
|
|
14114
14119
|
null,
|
|
14115
14120
|
React__default.createElement('img', {
|
|
14116
|
-
src: hit.thumbnail && hit.thumbnail.asset ? urlFor({ client: client, source: hit.thumbnail }) : hit.thumbnail && _typeof$
|
|
14121
|
+
src: hit.thumbnail && hit.thumbnail.asset ? urlFor({ client: client, source: hit.thumbnail }) : hit.thumbnail && _typeof$1(hit.thumbnail === 'string') ? hit.thumbnail : this.props.defaultImage
|
|
14117
14122
|
})
|
|
14118
14123
|
)
|
|
14119
14124
|
)
|
|
@@ -14171,7 +14176,7 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14171
14176
|
onSearchParameters: this.props.onSearchParameters
|
|
14172
14177
|
}, this.props),
|
|
14173
14178
|
React__default.createElement(Configure, { hitsPerPage: this.props.hitsPerPage || 20 }),
|
|
14174
|
-
React__default.createElement(SearchBox, null),
|
|
14179
|
+
React__default.createElement(SearchBox$2, null),
|
|
14175
14180
|
this.props.refinementAttributes && React__default.createElement(
|
|
14176
14181
|
'div',
|
|
14177
14182
|
{ className: 'search_refinement' },
|
|
@@ -14179,18 +14184,18 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14179
14184
|
return React__default.createElement(
|
|
14180
14185
|
DropdownButton,
|
|
14181
14186
|
{ title: item.title },
|
|
14182
|
-
React__default.createElement(RefinementList, { showMore: item.showMore, limit: item.limit, showMoreLimit: item.showMoreLimit, attribute: item.attribute })
|
|
14187
|
+
React__default.createElement(RefinementList$3, { showMore: item.showMore, limit: item.limit, showMoreLimit: item.showMoreLimit, attribute: item.attribute })
|
|
14183
14188
|
);
|
|
14184
14189
|
})
|
|
14185
14190
|
),
|
|
14186
14191
|
React__default.createElement(
|
|
14187
14192
|
'div',
|
|
14188
14193
|
{ className: 'AlgoliaResults' },
|
|
14189
|
-
React__default.createElement(Hits, { hitComponent: function hitComponent(hit) {
|
|
14194
|
+
React__default.createElement(Hits$1, { hitComponent: function hitComponent(hit) {
|
|
14190
14195
|
return _this2.Deck(_extends$1({}, hit, { propsObj: propsObj }));
|
|
14191
14196
|
} })
|
|
14192
14197
|
),
|
|
14193
|
-
React__default.createElement(Pagination, null)
|
|
14198
|
+
React__default.createElement(Pagination$2, null)
|
|
14194
14199
|
),
|
|
14195
14200
|
React__default.createElement(
|
|
14196
14201
|
'style',
|