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