@mjhls/mjh-framework 1.0.883-mwn-test-v3 → 1.0.883
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/dist/cjs/AD.js +9 -10
- package/dist/cjs/AD300x250.js +27 -28
- package/dist/cjs/AD300x250x600.js +27 -28
- package/dist/cjs/AD728x90.js +30 -31
- package/dist/cjs/ADFloatingFooter.js +30 -31
- package/dist/cjs/ADFooter.js +12 -13
- package/dist/cjs/ADGutter.js +30 -31
- package/dist/cjs/{ADInfeed-bce0ba07.js → ADInfeed-4f661172.js} +13 -15
- package/dist/cjs/ADSkyscraper.js +30 -31
- package/dist/cjs/ADSponsoredResources.js +30 -31
- package/dist/cjs/ADWebcast.js +30 -31
- package/dist/cjs/ADWelcome.js +31 -32
- package/dist/cjs/{ADlgInfeed-950b414b.js → ADlgInfeed-6242e5b5.js} +10 -11
- package/dist/cjs/AccordionPanel.js +27 -29
- package/dist/cjs/AdSlot.js +31 -32
- package/dist/cjs/AdSlotsProvider.js +15 -17
- package/dist/cjs/AlgoliaSearch.js +1103 -1160
- package/dist/cjs/AlphabeticList.js +23 -24
- package/dist/cjs/ArticleCarousel.js +19 -20
- package/dist/cjs/ArticleProgramLandingPage.js +60 -61
- package/dist/cjs/ArticleSeriesLandingPage.js +40 -41
- package/dist/cjs/ArticleSeriesListing.js +59 -60
- package/dist/cjs/Auth.js +283 -287
- package/dist/cjs/AuthWrapper.js +148 -59
- package/dist/cjs/{AuthorComponent-39b37d84.js → AuthorComponent-421d5ec1.js} +13 -14
- package/dist/cjs/Beam.js +6 -6
- package/dist/cjs/{BlockContent-9ebd251f.js → BlockContent-bac780ac.js} +55 -56
- package/dist/cjs/Breadcrumbs.js +25 -27
- package/dist/cjs/CMEDeck.js +81 -81
- package/dist/cjs/Column1.js +11 -14
- package/dist/cjs/Column2.js +31 -34
- package/dist/cjs/Column3.js +56 -59
- package/dist/cjs/ConferenceArticleCard.js +25 -26
- package/dist/cjs/ConferenceBanner-4a16fddc.js +23 -0
- package/dist/cjs/DeckContent.js +92 -96
- package/dist/cjs/DeckQueue.js +86 -90
- package/dist/cjs/{Dfp-9be904d5.js → Dfp-ab12cd55.js} +34 -35
- package/dist/cjs/EventsDeck.js +133 -140
- package/dist/cjs/ExternalResources.js +78 -79
- package/dist/cjs/Feature.js +26 -28
- package/dist/cjs/ForbesHero.js +40 -41
- package/dist/cjs/GridContent.js +231 -236
- package/dist/cjs/GridHero.js +42 -43
- package/dist/cjs/GroupDeck.js +57 -58
- package/dist/cjs/HamMagazine.js +127 -132
- package/dist/cjs/Header.js +12 -14
- package/dist/cjs/Hero.js +15 -16
- package/dist/cjs/HighlightenVideo.js +17 -18
- package/dist/cjs/HorizontalArticleListing.js +71 -72
- package/dist/cjs/HorizontalHero.js +28 -29
- package/dist/cjs/IssueContentDeck.js +71 -76
- package/dist/cjs/IssueDeck.js +70 -75
- package/dist/cjs/IssueLanding.js +64 -65
- package/dist/cjs/LeftNav.js +37 -39
- package/dist/cjs/MasterDeck.js +70 -71
- package/dist/cjs/MediaSeriesLanding.js +985 -988
- package/dist/cjs/NavDvm.js +72 -77
- package/dist/cjs/{NavFooter-3dcd99a8.js → NavFooter-76c913e3.js} +14 -15
- package/dist/cjs/NavMagazine.js +134 -139
- package/dist/cjs/NavNative.js +126 -134
- package/dist/cjs/OncliveHero.js +21 -22
- package/dist/cjs/OncliveLargeHero.js +70 -71
- package/dist/cjs/PageFilter.js +12 -13
- package/dist/cjs/PartnerDetailListing.js +373 -272
- package/dist/cjs/PdfDownload.js +9 -10
- package/dist/cjs/PopUpModal.js +17 -19
- package/dist/cjs/PubSection.js +40 -41
- package/dist/cjs/PubToc.js +13 -14
- package/dist/cjs/PublicationDeck.js +65 -70
- package/dist/cjs/PublicationLanding.js +106 -114
- package/dist/cjs/QueueDeckExpanded.js +308 -308
- package/dist/cjs/RecentNews.js +22 -23
- package/dist/cjs/RelatedContent.js +29 -30
- package/dist/cjs/RelatedTopicsDropdown.js +19 -22
- package/dist/cjs/RolesDeck.js +27 -32
- package/dist/cjs/Search.js +16 -20
- package/dist/cjs/Segment.js +4 -4
- package/dist/cjs/SeriesListingDeck.js +36 -36
- package/dist/cjs/{SeriesSlider-ba0c5d1a.js → SeriesSlider-372e418f.js} +30 -31
- package/dist/cjs/SetCookie.js +1 -1
- package/dist/cjs/SideFooter.js +34 -35
- package/dist/cjs/SocialIcons.js +9 -10
- package/dist/cjs/{SocialSearchComponent-4942ddfc.js → SocialSearchComponent-80a2130a.js} +32 -36
- package/dist/cjs/SocialShare.js +29 -31
- package/dist/cjs/TaxonomyCard.js +61 -66
- package/dist/cjs/TaxonomyDescription.js +53 -54
- package/dist/cjs/TemplateNormal.js +72 -73
- package/dist/cjs/ThumbnailCard.js +24 -26
- package/dist/cjs/Ustream.js +78 -70
- package/dist/cjs/VerticalHero.js +19 -20
- package/dist/cjs/VideoProgramLandingPage.js +74 -78
- package/dist/cjs/VideoSeriesCard.js +32 -33
- package/dist/cjs/VideoSeriesFilter.js +16 -16
- package/dist/cjs/VideoSeriesLandingPage.js +50 -51
- package/dist/cjs/VideoSeriesListing.js +76 -77
- package/dist/cjs/View.js +249 -252
- package/dist/cjs/YahooHero.js +39 -40
- package/dist/cjs/YoutubeGroup.js +58 -59
- package/dist/cjs/{_is-array-54228b29.js → _is-array-bd978497.js} +6 -6
- package/dist/cjs/{_iter-detect-b1df62f0.js → _iter-detect-ee3d4802.js} +7 -7
- package/dist/cjs/{_object-pie-083f2dd6.js → _object-pie-68c5bcbc.js} +4 -4
- package/dist/cjs/{_object-sap-d1978572.js → _object-sap-fee50a62.js} +1 -1
- package/dist/cjs/{_object-to-array-ce86cae7.js → _object-to-array-18379aba.js} +2 -2
- package/dist/cjs/{asyncToGenerator-77821af0.js → asyncToGenerator-15014394.js} +30 -30
- package/dist/cjs/{brightcove-react-player-loader.es-a195642e.js → brightcove-react-player-loader.es-05029198.js} +6 -7
- package/dist/cjs/{core.get-iterator-method-5643aa10.js → core.get-iterator-method-5cb3af28.js} +33 -33
- package/dist/cjs/{debounce-d4a2369b.js → debounce-6191c8ee.js} +2 -2
- package/dist/cjs/{define-property-e8404b64.js → define-property-530a5e9e.js} +6 -6
- package/dist/cjs/{defineProperty-9673846a.js → defineProperty-5ca424cd.js} +1 -1
- package/dist/cjs/{entities-df1aed86.js → entities-fb0c6568.js} +1 -1
- package/dist/cjs/{eq-5fc26c07.js → eq-bb2843ed.js} +1 -1
- package/dist/cjs/{extends-7c86182f.js → extends-1d905ddb.js} +7 -7
- package/dist/cjs/faundadb.js +19 -19
- package/dist/cjs/{get-5839e5b5.js → get-adbb11e3.js} +21 -21
- package/dist/cjs/getRelatedArticle.js +16 -16
- package/dist/cjs/getRootDocGroup.js +6 -6
- package/dist/cjs/getSerializers.js +43 -43
- package/dist/cjs/{getTargeting-9d509319.js → getTargeting-41f2f52d.js} +3 -3
- package/dist/cjs/getTargeting.js +6 -6
- package/dist/{esm/iconBase-ccc56b97.js → cjs/iconBase-68959171.js} +8 -2
- package/dist/cjs/{index-af49d679.js → index-27377172.js} +574 -584
- package/dist/cjs/{index-50be6759.js → index-53e27416.js} +1 -1
- package/dist/cjs/{index-f86bb269.js → index-79eed652.js} +6 -6
- package/dist/cjs/{index-eadd5035.js → index-96b3db50.js} +15 -17
- package/dist/cjs/{index-fc2f1ca2.js → index-98e01cb9.js} +12 -13
- package/dist/cjs/{index-d48b231c.js → index-ff69979f.js} +3 -3
- package/dist/cjs/{index.es-f3e47207.js → index.es-e9d84959.js} +7 -8
- package/dist/cjs/{index.esm-88593816.js → index.esm-05850a2f.js} +4 -4
- package/dist/cjs/{index.esm-c1e16606.js → index.esm-44f3e2d0.js} +1 -1
- package/dist/cjs/{index.esm-d81454e7.js → index.esm-974f47d9.js} +4 -1
- package/dist/cjs/{index.esm-2bb721c8.js → index.esm-bf016399.js} +18 -19
- package/dist/cjs/index.js +164 -169
- package/dist/cjs/{inherits-de66ea16.js → inherits-337c73a7.js} +22 -22
- package/dist/cjs/{isSymbol-03abbdf0.js → isSymbol-04666465.js} +15 -15
- package/dist/cjs/{keys-e982b3fa.js → keys-91f31941.js} +6 -6
- package/dist/cjs/{lodash-f0783643.js → lodash-b5e0d5f6.js} +1 -1
- package/dist/cjs/{main-f1c77adb.js → main-bc7d4bf8.js} +69 -70
- package/dist/cjs/{moment-aca40de1.js → moment-ca3bd9fb.js} +1 -1
- package/dist/cjs/{react-social-icons-af932527.js → react-social-icons-f7f48f71.js} +27 -28
- package/dist/cjs/{slicedToArray-067dd3bc.js → slicedToArray-0a78cdf3.js} +12 -12
- package/dist/cjs/{smoothscroll-99df7f93.js → smoothscroll-5054361f.js} +1 -1
- package/dist/cjs/{stringify-f7a37a8d.js → stringify-13405ce2.js} +5 -5
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-d7797c2b.js → toConsumableArray-39fd0757.js} +7 -7
- package/dist/cjs/{toNumber-5e1fac58.js → toNumber-f2f8744b.js} +1 -1
- package/dist/cjs/{typeof-567e31ff.js → typeof-3dd6d3df.js} +35 -35
- package/dist/cjs/urlFor.js +6 -6
- package/dist/cjs/{ustream-api-3819e4aa.js → ustream-api-5619c1fa.js} +4 -4
- package/dist/cjs/{util-93a37fd0.js → util-f2c1b65b.js} +1 -12
- package/dist/cjs/{visibility-sensor-eb2c5b69.js → visibility-sensor-ad5e3116.js} +5 -7
- package/dist/cjs/{web.dom.iterable-d98303e0.js → web.dom.iterable-a9359910.js} +2 -2
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +21 -21
- package/dist/esm/AD300x250x600.js +21 -21
- package/dist/esm/AD728x90.js +23 -23
- package/dist/esm/ADFloatingFooter.js +21 -21
- package/dist/esm/ADFooter.js +4 -4
- package/dist/esm/ADGutter.js +21 -21
- package/dist/esm/{ADInfeed-0a55cd2d.js → ADInfeed-7db96917.js} +6 -6
- package/dist/esm/ADSkyscraper.js +21 -21
- package/dist/esm/ADSponsoredResources.js +21 -21
- package/dist/esm/ADWebcast.js +21 -21
- package/dist/esm/ADWelcome.js +18 -18
- package/dist/esm/{ADlgInfeed-013e1f4a.js → ADlgInfeed-a3931e68.js} +4 -4
- package/dist/esm/AccordionPanel.js +6 -6
- package/dist/esm/AdSlot.js +20 -20
- package/dist/esm/AdSlotsProvider.js +9 -9
- package/dist/esm/AlgoliaSearch.js +552 -608
- package/dist/esm/AlphabeticList.js +8 -8
- package/dist/esm/ArticleCarousel.js +13 -13
- package/dist/esm/ArticleProgramLandingPage.js +48 -48
- package/dist/esm/ArticleSeriesLandingPage.js +29 -29
- package/dist/esm/ArticleSeriesListing.js +32 -32
- package/dist/esm/Auth.js +199 -199
- package/dist/esm/AuthWrapper.js +118 -28
- package/dist/esm/{AuthorComponent-11adff02.js → AuthorComponent-2277b67c.js} +1 -1
- package/dist/esm/Beam.js +6 -6
- package/dist/esm/{BlockContent-1e73bd2c.js → BlockContent-ea93e8f7.js} +34 -34
- package/dist/esm/Breadcrumbs.js +5 -5
- package/dist/esm/CMEDeck.js +21 -21
- package/dist/esm/Column1.js +4 -4
- package/dist/esm/Column2.js +19 -19
- package/dist/esm/Column3.js +35 -35
- package/dist/esm/ConferenceArticleCard.js +10 -10
- package/dist/esm/DeckContent.js +46 -46
- package/dist/esm/DeckQueue.js +46 -46
- package/dist/esm/{Dfp-102f0beb.js → Dfp-d6a5629f.js} +13 -13
- package/dist/esm/EventsDeck.js +47 -47
- package/dist/esm/ExternalResources.js +46 -46
- package/dist/esm/Feature.js +6 -6
- package/dist/esm/ForbesHero.js +10 -10
- package/dist/esm/GridContent.js +85 -85
- package/dist/esm/GridHero.js +11 -11
- package/dist/esm/GroupDeck.js +12 -12
- package/dist/esm/HamMagazine.js +24 -24
- package/dist/esm/Hero.js +7 -7
- package/dist/esm/HighlightenVideo.js +2 -2
- package/dist/esm/HorizontalArticleListing.js +46 -46
- package/dist/esm/HorizontalHero.js +8 -8
- package/dist/esm/IssueContentDeck.js +25 -25
- package/dist/esm/IssueDeck.js +34 -34
- package/dist/esm/IssueLanding.js +53 -53
- package/dist/esm/LeftNav.js +20 -20
- package/dist/esm/MasterDeck.js +34 -34
- package/dist/esm/MediaSeriesLanding.js +325 -325
- package/dist/esm/NavDvm.js +14 -14
- package/dist/esm/NavMagazine.js +30 -30
- package/dist/esm/NavNative.js +30 -30
- package/dist/esm/OncliveHero.js +7 -7
- package/dist/esm/OncliveLargeHero.js +11 -11
- package/dist/esm/PageFilter.js +4 -4
- package/dist/esm/PartnerDetailListing.js +188 -86
- package/dist/esm/PdfDownload.js +2 -2
- package/dist/esm/PopUpModal.js +4 -4
- package/dist/esm/PubSection.js +32 -32
- package/dist/esm/PubToc.js +6 -6
- package/dist/esm/PublicationDeck.js +27 -27
- package/dist/esm/PublicationLanding.js +47 -51
- package/dist/esm/QueueDeckExpanded.js +34 -34
- package/dist/esm/RecentNews.js +4 -4
- package/dist/esm/RelatedContent.js +10 -10
- package/dist/esm/RolesDeck.js +12 -12
- package/dist/esm/Search.js +6 -6
- package/dist/esm/Segment.js +4 -4
- package/dist/esm/SeriesListingDeck.js +18 -18
- package/dist/esm/{SeriesSlider-45adb8dc.js → SeriesSlider-88c4133d.js} +5 -5
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +13 -13
- package/dist/esm/{SocialSearchComponent-8e0fcf66.js → SocialSearchComponent-7f3d6531.js} +8 -8
- package/dist/esm/TaxonomyCard.js +27 -27
- package/dist/esm/TaxonomyDescription.js +44 -44
- package/dist/esm/TemplateNormal.js +48 -48
- package/dist/esm/ThumbnailCard.js +10 -10
- package/dist/esm/Ustream.js +71 -62
- package/dist/esm/VerticalHero.js +6 -6
- package/dist/esm/VideoProgramLandingPage.js +52 -52
- package/dist/esm/VideoSeriesCard.js +13 -13
- package/dist/esm/VideoSeriesFilter.js +7 -7
- package/dist/esm/VideoSeriesLandingPage.js +35 -35
- package/dist/esm/VideoSeriesListing.js +33 -33
- package/dist/esm/View.js +83 -82
- package/dist/esm/YahooHero.js +13 -13
- package/dist/esm/YoutubeGroup.js +12 -12
- package/dist/esm/{_is-array-8d21b9e3.js → _is-array-8914b83f.js} +6 -6
- package/dist/esm/{_iter-detect-98db3b07.js → _iter-detect-13e31915.js} +7 -7
- package/dist/esm/{_object-pie-133f504a.js → _object-pie-33c40e79.js} +4 -4
- package/dist/esm/{_object-sap-7cee6f84.js → _object-sap-fc9da7e8.js} +1 -1
- package/dist/esm/{_object-to-array-2300e51b.js → _object-to-array-ee8f6d98.js} +2 -2
- package/dist/esm/{asyncToGenerator-5ef104a7.js → asyncToGenerator-40371743.js} +30 -30
- package/dist/esm/{core.get-iterator-method-ea258bb1.js → core.get-iterator-method-0fb60d94.js} +34 -34
- package/dist/esm/{debounce-533d9748.js → debounce-89969f66.js} +2 -2
- package/dist/esm/define-property-73034847.js +18 -0
- package/dist/esm/{defineProperty-8c30428f.js → defineProperty-e66a2c7c.js} +1 -1
- package/dist/esm/{entities-6d9154b4.js → entities-731f3fdb.js} +1 -1
- package/dist/esm/{eq-bdcbf886.js → eq-b470f743.js} +1 -1
- package/dist/esm/{extends-6d8e3924.js → extends-9a61581c.js} +7 -7
- package/dist/esm/faundadb.js +5 -5
- package/dist/esm/{get-3c308da4.js → get-1e515072.js} +21 -21
- package/dist/esm/getRelatedArticle.js +11 -11
- package/dist/esm/getRootDocGroup.js +4 -4
- package/dist/esm/getSerializers.js +43 -43
- package/dist/esm/{getTargeting-4061f839.js → getTargeting-e6820763.js} +2 -2
- package/dist/esm/getTargeting.js +6 -6
- package/dist/{cjs/iconBase-be4097c0.js → esm/iconBase-602d52fe.js} +8 -33
- package/dist/esm/{index-f0fc23eb.js → index-41a678ea.js} +4 -4
- package/dist/esm/{index-79cfd25c.js → index-511bdaa5.js} +6 -6
- package/dist/esm/{index-755f2cc2.js → index-5f7e79e7.js} +6 -6
- package/dist/esm/{index-98ca9cec.js → index-637e8f49.js} +1 -1
- package/dist/esm/{index-d7489d39.js → index-afb3bbc2.js} +134 -134
- package/dist/esm/{index-3f5c03b2.js → index-f7fdcc91.js} +3 -3
- package/dist/esm/{index.esm-eb1e8e80.js → index.esm-3fdda599.js} +4 -2
- package/dist/esm/{index.esm-28aafed6.js → index.esm-a8ff922c.js} +4 -4
- package/dist/esm/{index.esm-9b042655.js → index.esm-c6715e80.js} +1 -1
- package/dist/esm/{index.esm-37268dca.js → index.esm-ed50151c.js} +2 -2
- package/dist/esm/index.js +122 -124
- package/dist/esm/{inherits-a6ba2ec4.js → inherits-eeaf6740.js} +18 -18
- package/dist/esm/{isSymbol-a7e9aafe.js → isSymbol-1981418f.js} +15 -15
- package/dist/esm/{keys-31dcdb31.js → keys-a5ffafe7.js} +6 -6
- package/dist/esm/{lodash-f97fd99a.js → lodash-a818d390.js} +1 -1
- package/dist/esm/{main-1894c974.js → main-ede573ee.js} +53 -53
- package/dist/esm/{moment-bc12cb97.js → moment-b6f49411.js} +1 -1
- package/dist/esm/{react-social-icons-9be47857.js → react-social-icons-a7d5c5c7.js} +16 -16
- package/dist/esm/{slicedToArray-6ebcbfea.js → slicedToArray-9c3bb613.js} +12 -12
- package/dist/esm/{smoothscroll-fa4e3f8c.js → smoothscroll-0cd4c7a6.js} +1 -1
- package/dist/esm/stringify-ebc16384.js +15 -0
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/{toConsumableArray-f7074d7c.js → toConsumableArray-e333293f.js} +7 -7
- package/dist/esm/{toNumber-5aeba6e7.js → toNumber-e3dcad26.js} +1 -1
- package/dist/esm/{typeof-e9fc0c5d.js → typeof-938ae770.js} +35 -35
- package/dist/esm/urlFor.js +4 -4
- package/dist/esm/{ustream-api-d3714624.js → ustream-api-d325d196.js} +4 -4
- package/dist/esm/{util-8ed16d48.js → util-7700fc59.js} +1 -12
- package/dist/esm/{web.dom.iterable-ab4dea5c.js → web.dom.iterable-6b037ff9.js} +2 -2
- package/package.json +1 -1
- package/dist/cjs/ConferenceBanner-6c9e718a.js +0 -24
- package/dist/cjs/defineProperty-e0fb52c5.js +0 -73
- package/dist/cjs/typeof-1358762e.js +0 -33
- package/dist/esm/define-property-5f1bda73.js +0 -18
- package/dist/esm/defineProperty-23a8f8cd.js +0 -68
- package/dist/esm/stringify-2b084bee.js +0 -15
- package/dist/esm/typeof-2f07d0e8.js +0 -30
- package/dist/esm/{brightcove-react-player-loader.es-57a70a56.js → brightcove-react-player-loader.es-e761d404.js} +1 -1
|
@@ -1,37 +1,35 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
3
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
+
|
|
5
|
+
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
6
|
+
require('./core.get-iterator-method-5cb3af28.js');
|
|
7
|
+
require('./_library-dd23b178.js');
|
|
8
|
+
require('./_object-pie-68c5bcbc.js');
|
|
9
|
+
var _extends = require('./extends-1d905ddb.js');
|
|
10
|
+
require('./_object-sap-fee50a62.js');
|
|
11
|
+
var inherits$1 = require('./inherits-337c73a7.js');
|
|
12
|
+
require('./define-property-530a5e9e.js');
|
|
13
|
+
require('./web.dom.iterable-a9359910.js');
|
|
14
|
+
var _typeof$2 = require('./typeof-3dd6d3df.js');
|
|
15
|
+
require('./_is-array-bd978497.js');
|
|
6
16
|
var React = require('react');
|
|
7
|
-
var
|
|
8
|
-
var _typeof$1 = require('./typeof-1358762e.js');
|
|
9
|
-
var index = require('./index-50be6759.js');
|
|
17
|
+
var React__default = _interopDefault(React);
|
|
10
18
|
var events = require('./events-1b438fe7.js');
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var moment = require('./moment-
|
|
14
|
-
var index$1 = require('./index-eadd5035.js');
|
|
15
|
-
require('./_commonjsHelpers-06173234.js');
|
|
16
|
-
require('./core.get-iterator-method-5643aa10.js');
|
|
17
|
-
require('./_object-pie-083f2dd6.js');
|
|
18
|
-
require('./web.dom.iterable-d98303e0.js');
|
|
19
|
-
require('./_is-array-54228b29.js');
|
|
20
|
-
require('./_library-dd23b178.js');
|
|
21
|
-
require('./_object-sap-d1978572.js');
|
|
22
|
-
require('./define-property-e8404b64.js');
|
|
23
|
-
require('./slicedToArray-067dd3bc.js');
|
|
24
|
-
require('./index-d48b231c.js');
|
|
19
|
+
var PropTypes = require('prop-types');
|
|
20
|
+
var PropTypes__default = _interopDefault(PropTypes);
|
|
21
|
+
var moment = require('./moment-ca3bd9fb.js');
|
|
25
22
|
require('react-dom');
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var
|
|
30
|
-
var
|
|
23
|
+
require('./slicedToArray-0a78cdf3.js');
|
|
24
|
+
require('./index-ff69979f.js');
|
|
25
|
+
var urlFor = require('./urlFor.js');
|
|
26
|
+
var index$2 = require('./index-96b3db50.js');
|
|
27
|
+
var reactBootstrap = require('react-bootstrap');
|
|
28
|
+
var index$5 = require('./index-53e27416.js');
|
|
31
29
|
|
|
32
30
|
function _objectWithoutProperties(source, excluded) {
|
|
33
31
|
if (source == null) return {};
|
|
34
|
-
var target = index._objectWithoutPropertiesLoose(source, excluded);
|
|
32
|
+
var target = index$5._objectWithoutPropertiesLoose(source, excluded);
|
|
35
33
|
var key, i;
|
|
36
34
|
|
|
37
35
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -104,6 +102,33 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
104
102
|
return Constructor;
|
|
105
103
|
}
|
|
106
104
|
|
|
105
|
+
var _typeof_1 = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
106
|
+
function _typeof(obj) {
|
|
107
|
+
"@babel/helpers - typeof";
|
|
108
|
+
|
|
109
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
110
|
+
module.exports = _typeof = function _typeof(obj) {
|
|
111
|
+
return typeof obj;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
115
|
+
} else {
|
|
116
|
+
module.exports = _typeof = function _typeof(obj) {
|
|
117
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return _typeof(obj);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
module.exports = _typeof;
|
|
127
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
var _typeof = _commonjsHelpers.unwrapExports(_typeof_1);
|
|
131
|
+
|
|
107
132
|
function _assertThisInitialized(self) {
|
|
108
133
|
if (self === void 0) {
|
|
109
134
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -113,7 +138,7 @@ function _assertThisInitialized(self) {
|
|
|
113
138
|
}
|
|
114
139
|
|
|
115
140
|
function _possibleConstructorReturn(self, call) {
|
|
116
|
-
if (call && (_typeof
|
|
141
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
117
142
|
return call;
|
|
118
143
|
}
|
|
119
144
|
|
|
@@ -139,7 +164,7 @@ function _inherits(subClass, superClass) {
|
|
|
139
164
|
configurable: true
|
|
140
165
|
}
|
|
141
166
|
});
|
|
142
|
-
if (superClass) index._setPrototypeOf(subClass, superClass);
|
|
167
|
+
if (superClass) index$5._setPrototypeOf(subClass, superClass);
|
|
143
168
|
}
|
|
144
169
|
|
|
145
170
|
/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */
|
|
@@ -277,20 +302,20 @@ var reactFastCompare = function isEqual(a, b) {
|
|
|
277
302
|
}
|
|
278
303
|
};
|
|
279
304
|
|
|
280
|
-
function _typeof(obj) {
|
|
305
|
+
function _typeof$1(obj) {
|
|
281
306
|
"@babel/helpers - typeof";
|
|
282
307
|
|
|
283
308
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
284
|
-
_typeof = function _typeof(obj) {
|
|
309
|
+
_typeof$1 = function _typeof(obj) {
|
|
285
310
|
return typeof obj;
|
|
286
311
|
};
|
|
287
312
|
} else {
|
|
288
|
-
_typeof = function _typeof(obj) {
|
|
313
|
+
_typeof$1 = function _typeof(obj) {
|
|
289
314
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
290
315
|
};
|
|
291
316
|
}
|
|
292
317
|
|
|
293
|
-
return _typeof(obj);
|
|
318
|
+
return _typeof$1(obj);
|
|
294
319
|
}
|
|
295
320
|
|
|
296
321
|
// From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
@@ -326,7 +351,7 @@ var defer = function defer(f) {
|
|
|
326
351
|
};
|
|
327
352
|
|
|
328
353
|
var isPlainObject = function isPlainObject(value) {
|
|
329
|
-
return _typeof(value) === 'object' && value !== null && !Array.isArray(value);
|
|
354
|
+
return _typeof$1(value) === 'object' && value !== null && !Array.isArray(value);
|
|
330
355
|
};
|
|
331
356
|
|
|
332
357
|
var removeEmptyKey = function removeEmptyKey(obj) {
|
|
@@ -337,7 +362,7 @@ var removeEmptyKey = function removeEmptyKey(obj) {
|
|
|
337
362
|
return;
|
|
338
363
|
}
|
|
339
364
|
|
|
340
|
-
if (!objectHasKeys
|
|
365
|
+
if (!objectHasKeys(value)) {
|
|
341
366
|
delete obj[key];
|
|
342
367
|
} else {
|
|
343
368
|
removeEmptyKey(value);
|
|
@@ -373,7 +398,7 @@ function addQueryID(hits, queryID) {
|
|
|
373
398
|
});
|
|
374
399
|
});
|
|
375
400
|
}
|
|
376
|
-
function find
|
|
401
|
+
function find(array, comparator) {
|
|
377
402
|
if (!Array.isArray(array)) {
|
|
378
403
|
return undefined;
|
|
379
404
|
}
|
|
@@ -386,11 +411,11 @@ function find$2(array, comparator) {
|
|
|
386
411
|
|
|
387
412
|
return undefined;
|
|
388
413
|
}
|
|
389
|
-
function objectHasKeys
|
|
414
|
+
function objectHasKeys(object) {
|
|
390
415
|
return object && Object.keys(object).length > 0;
|
|
391
416
|
} // https://github.com/babel/babel/blob/3aaafae053fa75febb3aa45d45b6f00646e30ba4/packages/babel-helpers/src/helpers.js#L604-L620
|
|
392
417
|
|
|
393
|
-
function omit
|
|
418
|
+
function omit(source, excluded) {
|
|
394
419
|
if (source === null || source === undefined) {
|
|
395
420
|
return {};
|
|
396
421
|
}
|
|
@@ -461,9 +486,9 @@ var instantSearchContext = React.createContext({
|
|
|
461
486
|
var InstantSearchConsumer = instantSearchContext.Consumer,
|
|
462
487
|
InstantSearchProvider = instantSearchContext.Provider;
|
|
463
488
|
|
|
464
|
-
var _createContext
|
|
465
|
-
IndexConsumer = _createContext
|
|
466
|
-
IndexProvider = _createContext
|
|
489
|
+
var _createContext = React.createContext(undefined),
|
|
490
|
+
IndexConsumer = _createContext.Consumer,
|
|
491
|
+
IndexProvider = _createContext.Provider;
|
|
467
492
|
|
|
468
493
|
/**
|
|
469
494
|
* Connectors are the HOC used to transform React components
|
|
@@ -676,9 +701,9 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
676
701
|
}, {
|
|
677
702
|
key: "render",
|
|
678
703
|
value: function render() {
|
|
679
|
-
var _this$props = this.props
|
|
680
|
-
_this$props.contextValue
|
|
681
|
-
|
|
704
|
+
var _this$props = this.props,
|
|
705
|
+
contextValue = _this$props.contextValue,
|
|
706
|
+
props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
682
707
|
|
|
683
708
|
var providedProps = this.state.providedProps;
|
|
684
709
|
|
|
@@ -693,7 +718,7 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
693
718
|
var searchForFacetValuesProps = typeof connectorDesc.searchForFacetValues === 'function' ? {
|
|
694
719
|
searchForItems: this.searchForFacetValues
|
|
695
720
|
} : {};
|
|
696
|
-
return React__default
|
|
721
|
+
return React__default.createElement(Composed, index$5._extends({}, props, providedProps, refineProps, searchForFacetValuesProps));
|
|
697
722
|
}
|
|
698
723
|
}]);
|
|
699
724
|
|
|
@@ -715,9 +740,9 @@ var createConnectorWithContext = function createConnectorWithContext(connectorDe
|
|
|
715
740
|
var Connector = createConnectorWithoutContext(connectorDesc)(Composed);
|
|
716
741
|
|
|
717
742
|
var ConnectorWrapper = function ConnectorWrapper(props) {
|
|
718
|
-
return React__default
|
|
719
|
-
return React__default
|
|
720
|
-
return React__default
|
|
743
|
+
return React__default.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
744
|
+
return React__default.createElement(IndexConsumer, null, function (indexContextValue) {
|
|
745
|
+
return React__default.createElement(Connector, index$5._extends({
|
|
721
746
|
contextValue: contextValue,
|
|
722
747
|
indexContextValue: indexContextValue
|
|
723
748
|
}, props));
|
|
@@ -829,7 +854,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
829
854
|
});
|
|
830
855
|
}
|
|
831
856
|
|
|
832
|
-
var version
|
|
857
|
+
var version = '6.10.3';
|
|
833
858
|
|
|
834
859
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
835
860
|
return function (props, propName, componentName) {
|
|
@@ -890,7 +915,7 @@ function translatable(defaultTranslations) {
|
|
|
890
915
|
_createClass(Translatable, [{
|
|
891
916
|
key: "render",
|
|
892
917
|
value: function render() {
|
|
893
|
-
return React__default
|
|
918
|
+
return React__default.createElement(Composed, index$5._extends({
|
|
894
919
|
translate: this.translate
|
|
895
920
|
}, this.props));
|
|
896
921
|
}
|
|
@@ -1026,7 +1051,7 @@ function hasRefinements(_ref) {
|
|
|
1026
1051
|
return Object.hasOwnProperty.call(searchState, id);
|
|
1027
1052
|
}
|
|
1028
1053
|
|
|
1029
|
-
function getRefinements
|
|
1054
|
+
function getRefinements(_ref2) {
|
|
1030
1055
|
var multiIndex = _ref2.multiIndex,
|
|
1031
1056
|
indexId = _ref2.indexId,
|
|
1032
1057
|
namespace = _ref2.namespace,
|
|
@@ -1068,7 +1093,7 @@ function getCurrentRefinementValue(props, searchState, context, id, defaultValue
|
|
|
1068
1093
|
var hasRefinementsValue = hasRefinements(args);
|
|
1069
1094
|
|
|
1070
1095
|
if (hasRefinementsValue) {
|
|
1071
|
-
return getRefinements
|
|
1096
|
+
return getRefinements(args);
|
|
1072
1097
|
}
|
|
1073
1098
|
|
|
1074
1099
|
if (props.defaultRefinement) {
|
|
@@ -1109,10 +1134,10 @@ function cleanUpValueWithSingleIndex(_ref3) {
|
|
|
1109
1134
|
attribute = _ref3.attribute;
|
|
1110
1135
|
|
|
1111
1136
|
if (namespace) {
|
|
1112
|
-
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit
|
|
1137
|
+
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit(searchState[namespace], [attribute])));
|
|
1113
1138
|
}
|
|
1114
1139
|
|
|
1115
|
-
return omit
|
|
1140
|
+
return omit(searchState, [id]);
|
|
1116
1141
|
}
|
|
1117
1142
|
|
|
1118
1143
|
function cleanUpValueWithMultiIndex(_ref4) {
|
|
@@ -1125,20 +1150,20 @@ function cleanUpValueWithMultiIndex(_ref4) {
|
|
|
1125
1150
|
|
|
1126
1151
|
if (namespace && indexSearchState) {
|
|
1127
1152
|
return _objectSpread({}, searchState, {
|
|
1128
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit
|
|
1153
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit(indexSearchState[namespace], [attribute])))))
|
|
1129
1154
|
});
|
|
1130
1155
|
}
|
|
1131
1156
|
|
|
1132
1157
|
if (indexSearchState) {
|
|
1133
1158
|
return _objectSpread({}, searchState, {
|
|
1134
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit
|
|
1159
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit(indexSearchState, [id])))
|
|
1135
1160
|
});
|
|
1136
1161
|
}
|
|
1137
1162
|
|
|
1138
1163
|
return searchState;
|
|
1139
1164
|
}
|
|
1140
1165
|
|
|
1141
|
-
function getId
|
|
1166
|
+
function getId() {
|
|
1142
1167
|
return 'configure';
|
|
1143
1168
|
}
|
|
1144
1169
|
|
|
@@ -1148,20 +1173,20 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1148
1173
|
return {};
|
|
1149
1174
|
},
|
|
1150
1175
|
getSearchParameters: function getSearchParameters(searchParameters, props) {
|
|
1151
|
-
props.children
|
|
1152
|
-
props.contextValue
|
|
1153
|
-
props.indexContextValue
|
|
1154
|
-
|
|
1176
|
+
var children = props.children,
|
|
1177
|
+
contextValue = props.contextValue,
|
|
1178
|
+
indexContextValue = props.indexContextValue,
|
|
1179
|
+
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1155
1180
|
|
|
1156
1181
|
return searchParameters.setQueryParameters(items);
|
|
1157
1182
|
},
|
|
1158
1183
|
transitionState: function transitionState(props, prevSearchState, nextSearchState) {
|
|
1159
|
-
var id = getId
|
|
1184
|
+
var id = getId();
|
|
1160
1185
|
|
|
1161
|
-
props.children
|
|
1162
|
-
props.contextValue
|
|
1163
|
-
props.indexContextValue
|
|
1164
|
-
|
|
1186
|
+
var children = props.children,
|
|
1187
|
+
contextValue = props.contextValue,
|
|
1188
|
+
indexContextValue = props.indexContextValue,
|
|
1189
|
+
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1165
1190
|
|
|
1166
1191
|
var propKeys = Object.keys(props);
|
|
1167
1192
|
var nonPresentKeys = this._props ? Object.keys(this._props).filter(function (prop) {
|
|
@@ -1169,7 +1194,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1169
1194
|
}) : [];
|
|
1170
1195
|
this._props = props;
|
|
1171
1196
|
|
|
1172
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit
|
|
1197
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), items));
|
|
1173
1198
|
|
|
1174
1199
|
return refineValue(nextSearchState, nextValue, {
|
|
1175
1200
|
ais: props.contextValue,
|
|
@@ -1177,7 +1202,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1177
1202
|
});
|
|
1178
1203
|
},
|
|
1179
1204
|
cleanUp: function cleanUp(props, searchState) {
|
|
1180
|
-
var id = getId
|
|
1205
|
+
var id = getId();
|
|
1181
1206
|
var indexId = getIndexId({
|
|
1182
1207
|
ais: props.contextValue,
|
|
1183
1208
|
multiIndexContext: props.indexContextValue
|
|
@@ -1258,7 +1283,7 @@ function _arrayWithoutHoles(arr) {
|
|
|
1258
1283
|
}
|
|
1259
1284
|
|
|
1260
1285
|
function _iterableToArray(iter) {
|
|
1261
|
-
if (typeof Symbol !== "undefined" &&
|
|
1286
|
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
|
1262
1287
|
}
|
|
1263
1288
|
|
|
1264
1289
|
function _unsupportedIterableToArray(o, minLen) {
|
|
@@ -1425,13 +1450,13 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
1425
1450
|
return target;
|
|
1426
1451
|
}
|
|
1427
1452
|
|
|
1428
|
-
var omit = _objectWithoutPropertiesLoose;
|
|
1453
|
+
var omit$1 = _objectWithoutPropertiesLoose;
|
|
1429
1454
|
|
|
1430
|
-
function objectHasKeys(obj) {
|
|
1455
|
+
function objectHasKeys$1(obj) {
|
|
1431
1456
|
return obj && Object.keys(obj).length > 0;
|
|
1432
1457
|
}
|
|
1433
1458
|
|
|
1434
|
-
var objectHasKeys_1 = objectHasKeys;
|
|
1459
|
+
var objectHasKeys_1 = objectHasKeys$1;
|
|
1435
1460
|
|
|
1436
1461
|
var isValidUserToken = function isValidUserToken(userToken) {
|
|
1437
1462
|
if (userToken === null) {
|
|
@@ -1539,7 +1564,7 @@ var lib = {
|
|
|
1539
1564
|
}
|
|
1540
1565
|
return {};
|
|
1541
1566
|
} else if (typeof attribute === 'string') {
|
|
1542
|
-
return omit(refinementList, [attribute]);
|
|
1567
|
+
return omit$1(refinementList, [attribute]);
|
|
1543
1568
|
} else if (typeof attribute === 'function') {
|
|
1544
1569
|
var hasChanged = false;
|
|
1545
1570
|
|
|
@@ -1584,7 +1609,7 @@ var lib = {
|
|
|
1584
1609
|
}
|
|
1585
1610
|
};
|
|
1586
1611
|
|
|
1587
|
-
var RefinementList
|
|
1612
|
+
var RefinementList = lib;
|
|
1588
1613
|
|
|
1589
1614
|
/**
|
|
1590
1615
|
* isEqual, but only for numeric refinement values, possible values:
|
|
@@ -1953,22 +1978,22 @@ SearchParameters.prototype = {
|
|
|
1953
1978
|
clearRefinements: function clearRefinements(attribute) {
|
|
1954
1979
|
var patch = {
|
|
1955
1980
|
numericRefinements: this._clearNumericRefinements(attribute),
|
|
1956
|
-
facetsRefinements: RefinementList
|
|
1981
|
+
facetsRefinements: RefinementList.clearRefinement(
|
|
1957
1982
|
this.facetsRefinements,
|
|
1958
1983
|
attribute,
|
|
1959
1984
|
'conjunctiveFacet'
|
|
1960
1985
|
),
|
|
1961
|
-
facetsExcludes: RefinementList
|
|
1986
|
+
facetsExcludes: RefinementList.clearRefinement(
|
|
1962
1987
|
this.facetsExcludes,
|
|
1963
1988
|
attribute,
|
|
1964
1989
|
'exclude'
|
|
1965
1990
|
),
|
|
1966
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
1991
|
+
disjunctiveFacetsRefinements: RefinementList.clearRefinement(
|
|
1967
1992
|
this.disjunctiveFacetsRefinements,
|
|
1968
1993
|
attribute,
|
|
1969
1994
|
'disjunctiveFacet'
|
|
1970
1995
|
),
|
|
1971
|
-
hierarchicalFacetsRefinements: RefinementList
|
|
1996
|
+
hierarchicalFacetsRefinements: RefinementList.clearRefinement(
|
|
1972
1997
|
this.hierarchicalFacetsRefinements,
|
|
1973
1998
|
attribute,
|
|
1974
1999
|
'hierarchicalFacet'
|
|
@@ -2244,7 +2269,7 @@ SearchParameters.prototype = {
|
|
|
2244
2269
|
}
|
|
2245
2270
|
return {};
|
|
2246
2271
|
} else if (typeof attribute === 'string') {
|
|
2247
|
-
return omit(this.numericRefinements, [attribute]);
|
|
2272
|
+
return omit$1(this.numericRefinements, [attribute]);
|
|
2248
2273
|
} else if (typeof attribute === 'function') {
|
|
2249
2274
|
var hasChanged = false;
|
|
2250
2275
|
var numericRefinements = this.numericRefinements;
|
|
@@ -2336,10 +2361,10 @@ SearchParameters.prototype = {
|
|
|
2336
2361
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2337
2362
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2338
2363
|
}
|
|
2339
|
-
if (RefinementList
|
|
2364
|
+
if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2340
2365
|
|
|
2341
2366
|
return this.setQueryParameters({
|
|
2342
|
-
facetsRefinements: RefinementList
|
|
2367
|
+
facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value)
|
|
2343
2368
|
});
|
|
2344
2369
|
},
|
|
2345
2370
|
/**
|
|
@@ -2353,10 +2378,10 @@ SearchParameters.prototype = {
|
|
|
2353
2378
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2354
2379
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2355
2380
|
}
|
|
2356
|
-
if (RefinementList
|
|
2381
|
+
if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2357
2382
|
|
|
2358
2383
|
return this.setQueryParameters({
|
|
2359
|
-
facetsExcludes: RefinementList
|
|
2384
|
+
facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value)
|
|
2360
2385
|
});
|
|
2361
2386
|
},
|
|
2362
2387
|
/**
|
|
@@ -2372,10 +2397,10 @@ SearchParameters.prototype = {
|
|
|
2372
2397
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2373
2398
|
}
|
|
2374
2399
|
|
|
2375
|
-
if (RefinementList
|
|
2400
|
+
if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2376
2401
|
|
|
2377
2402
|
return this.setQueryParameters({
|
|
2378
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2403
|
+
disjunctiveFacetsRefinements: RefinementList.addRefinement(
|
|
2379
2404
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2380
2405
|
});
|
|
2381
2406
|
},
|
|
@@ -2460,10 +2485,10 @@ SearchParameters.prototype = {
|
|
|
2460
2485
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2461
2486
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2462
2487
|
}
|
|
2463
|
-
if (!RefinementList
|
|
2488
|
+
if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2464
2489
|
|
|
2465
2490
|
return this.setQueryParameters({
|
|
2466
|
-
facetsRefinements: RefinementList
|
|
2491
|
+
facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value)
|
|
2467
2492
|
});
|
|
2468
2493
|
},
|
|
2469
2494
|
/**
|
|
@@ -2477,10 +2502,10 @@ SearchParameters.prototype = {
|
|
|
2477
2502
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2478
2503
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2479
2504
|
}
|
|
2480
|
-
if (!RefinementList
|
|
2505
|
+
if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2481
2506
|
|
|
2482
2507
|
return this.setQueryParameters({
|
|
2483
|
-
facetsExcludes: RefinementList
|
|
2508
|
+
facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value)
|
|
2484
2509
|
});
|
|
2485
2510
|
},
|
|
2486
2511
|
/**
|
|
@@ -2495,10 +2520,10 @@ SearchParameters.prototype = {
|
|
|
2495
2520
|
throw new Error(
|
|
2496
2521
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2497
2522
|
}
|
|
2498
|
-
if (!RefinementList
|
|
2523
|
+
if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2499
2524
|
|
|
2500
2525
|
return this.setQueryParameters({
|
|
2501
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2526
|
+
disjunctiveFacetsRefinements: RefinementList.removeRefinement(
|
|
2502
2527
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2503
2528
|
});
|
|
2504
2529
|
},
|
|
@@ -2564,7 +2589,7 @@ SearchParameters.prototype = {
|
|
|
2564
2589
|
}
|
|
2565
2590
|
|
|
2566
2591
|
return this.setQueryParameters({
|
|
2567
|
-
facetsRefinements: RefinementList
|
|
2592
|
+
facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2568
2593
|
});
|
|
2569
2594
|
},
|
|
2570
2595
|
/**
|
|
@@ -2580,7 +2605,7 @@ SearchParameters.prototype = {
|
|
|
2580
2605
|
}
|
|
2581
2606
|
|
|
2582
2607
|
return this.setQueryParameters({
|
|
2583
|
-
facetsExcludes: RefinementList
|
|
2608
|
+
facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2584
2609
|
});
|
|
2585
2610
|
},
|
|
2586
2611
|
/**
|
|
@@ -2597,7 +2622,7 @@ SearchParameters.prototype = {
|
|
|
2597
2622
|
}
|
|
2598
2623
|
|
|
2599
2624
|
return this.setQueryParameters({
|
|
2600
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2625
|
+
disjunctiveFacetsRefinements: RefinementList.toggleRefinement(
|
|
2601
2626
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2602
2627
|
});
|
|
2603
2628
|
},
|
|
@@ -2736,7 +2761,7 @@ SearchParameters.prototype = {
|
|
|
2736
2761
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2737
2762
|
return false;
|
|
2738
2763
|
}
|
|
2739
|
-
return RefinementList
|
|
2764
|
+
return RefinementList.isRefined(this.facetsRefinements, facet, value);
|
|
2740
2765
|
},
|
|
2741
2766
|
/**
|
|
2742
2767
|
* Returns true if the facet contains exclusions or if a specific value is
|
|
@@ -2752,7 +2777,7 @@ SearchParameters.prototype = {
|
|
|
2752
2777
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2753
2778
|
return false;
|
|
2754
2779
|
}
|
|
2755
|
-
return RefinementList
|
|
2780
|
+
return RefinementList.isRefined(this.facetsExcludes, facet, value);
|
|
2756
2781
|
},
|
|
2757
2782
|
/**
|
|
2758
2783
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2767,7 +2792,7 @@ SearchParameters.prototype = {
|
|
|
2767
2792
|
if (!this.isDisjunctiveFacet(facet)) {
|
|
2768
2793
|
return false;
|
|
2769
2794
|
}
|
|
2770
|
-
return RefinementList
|
|
2795
|
+
return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2771
2796
|
},
|
|
2772
2797
|
/**
|
|
2773
2798
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2953,7 +2978,7 @@ SearchParameters.prototype = {
|
|
|
2953
2978
|
var isNextValueDefined = nextWithNumbers[key] !== undefined;
|
|
2954
2979
|
|
|
2955
2980
|
if (isPreviousValueDefined && !isNextValueDefined) {
|
|
2956
|
-
return omit(previous, [key]);
|
|
2981
|
+
return omit$1(previous, [key]);
|
|
2957
2982
|
}
|
|
2958
2983
|
|
|
2959
2984
|
if (isNextValueDefined) {
|
|
@@ -4058,29 +4083,20 @@ function extractNormalizedFacetValues(results, attribute) {
|
|
|
4058
4083
|
}
|
|
4059
4084
|
|
|
4060
4085
|
/**
|
|
4061
|
-
* Sort nodes of a hierarchical
|
|
4086
|
+
* Sort nodes of a hierarchical facet results
|
|
4062
4087
|
* @private
|
|
4063
|
-
* @param {
|
|
4064
|
-
* @param {HierarchicalFacet|Array} node node upon which we want to apply the sort
|
|
4065
|
-
* @param {string[]} names attribute names
|
|
4066
|
-
* @param {number} [level=0] current index in the names array
|
|
4088
|
+
* @param {HierarchicalFacet} node node to upon which we want to apply the sort
|
|
4067
4089
|
*/
|
|
4068
|
-
function recSort(sortFn, node
|
|
4069
|
-
level = level || 0;
|
|
4070
|
-
|
|
4071
|
-
if (Array.isArray(node)) {
|
|
4072
|
-
return sortFn(node, names[level]);
|
|
4073
|
-
}
|
|
4074
|
-
|
|
4090
|
+
function recSort(sortFn, node) {
|
|
4075
4091
|
if (!node.data || node.data.length === 0) {
|
|
4076
4092
|
return node;
|
|
4077
4093
|
}
|
|
4078
4094
|
|
|
4079
4095
|
var children = node.data.map(function(childNode) {
|
|
4080
|
-
return recSort(sortFn, childNode
|
|
4096
|
+
return recSort(sortFn, childNode);
|
|
4081
4097
|
});
|
|
4082
|
-
var sortedChildren = sortFn(children
|
|
4083
|
-
var newNode =
|
|
4098
|
+
var sortedChildren = sortFn(children);
|
|
4099
|
+
var newNode = merge_1({}, node, {data: sortedChildren});
|
|
4084
4100
|
return newNode;
|
|
4085
4101
|
}
|
|
4086
4102
|
|
|
@@ -4090,72 +4106,6 @@ function vanillaSortFn(order, data) {
|
|
|
4090
4106
|
return data.sort(order);
|
|
4091
4107
|
}
|
|
4092
4108
|
|
|
4093
|
-
/**
|
|
4094
|
-
* @typedef FacetOrdering
|
|
4095
|
-
* @type {Object}
|
|
4096
|
-
* @property {string[]} [order]
|
|
4097
|
-
* @property {'count' | 'alpha' | 'hidden'} [sortRemainingBy]
|
|
4098
|
-
*/
|
|
4099
|
-
|
|
4100
|
-
/**
|
|
4101
|
-
* Sorts facet arrays via their facet ordering
|
|
4102
|
-
* @param {Array} facetValues the values
|
|
4103
|
-
* @param {FacetOrdering} facetOrdering the ordering
|
|
4104
|
-
* @returns {Array}
|
|
4105
|
-
*/
|
|
4106
|
-
function sortViaFacetOrdering(facetValues, facetOrdering) {
|
|
4107
|
-
var orderedFacets = [];
|
|
4108
|
-
var remainingFacets = [];
|
|
4109
|
-
|
|
4110
|
-
var order = facetOrdering.order || [];
|
|
4111
|
-
/**
|
|
4112
|
-
* an object with the keys being the values in order, the values their index:
|
|
4113
|
-
* ['one', 'two'] -> { one: 0, two: 1 }
|
|
4114
|
-
*/
|
|
4115
|
-
var reverseOrder = order.reduce(function(acc, name, i) {
|
|
4116
|
-
acc[name] = i;
|
|
4117
|
-
return acc;
|
|
4118
|
-
}, {});
|
|
4119
|
-
|
|
4120
|
-
facetValues.forEach(function(item) {
|
|
4121
|
-
// hierarchical facets get sorted using their raw name
|
|
4122
|
-
var name = item.path || item.name;
|
|
4123
|
-
if (reverseOrder[name] !== undefined) {
|
|
4124
|
-
orderedFacets[reverseOrder[name]] = item;
|
|
4125
|
-
} else {
|
|
4126
|
-
remainingFacets.push(item);
|
|
4127
|
-
}
|
|
4128
|
-
});
|
|
4129
|
-
|
|
4130
|
-
var sortRemainingBy = facetOrdering.sortRemainingBy;
|
|
4131
|
-
var ordering;
|
|
4132
|
-
if (sortRemainingBy === 'hidden') {
|
|
4133
|
-
return orderedFacets;
|
|
4134
|
-
} else if (sortRemainingBy === 'alpha') {
|
|
4135
|
-
ordering = [['path', 'name'], ['asc', 'asc']];
|
|
4136
|
-
} else {
|
|
4137
|
-
ordering = [['count'], ['desc']];
|
|
4138
|
-
}
|
|
4139
|
-
|
|
4140
|
-
return orderedFacets.concat(
|
|
4141
|
-
orderBy_1(remainingFacets, ordering[0], ordering[1])
|
|
4142
|
-
);
|
|
4143
|
-
}
|
|
4144
|
-
|
|
4145
|
-
/**
|
|
4146
|
-
* @param {SearchResults} results the search results class
|
|
4147
|
-
* @param {string} attribute the attribute to retrieve ordering of
|
|
4148
|
-
* @returns {FacetOrdering=}
|
|
4149
|
-
*/
|
|
4150
|
-
function getFacetOrdering(results, attribute) {
|
|
4151
|
-
return (
|
|
4152
|
-
results.renderingContent &&
|
|
4153
|
-
results.renderingContent.facetOrdering &&
|
|
4154
|
-
results.renderingContent.facetOrdering.values &&
|
|
4155
|
-
results.renderingContent.facetOrdering.values[attribute]
|
|
4156
|
-
);
|
|
4157
|
-
}
|
|
4158
|
-
|
|
4159
4109
|
/**
|
|
4160
4110
|
* Get a the list of values for a given facet attribute. Those values are sorted
|
|
4161
4111
|
* refinement first, descending count (bigger value on top), and name ascending
|
|
@@ -4168,9 +4118,6 @@ function getFacetOrdering(results, attribute) {
|
|
|
4168
4118
|
* might not be respected if you have facet values that are already refined.
|
|
4169
4119
|
* @param {string} attribute attribute name
|
|
4170
4120
|
* @param {object} opts configuration options.
|
|
4171
|
-
* @param {boolean} [opts.facetOrdering]
|
|
4172
|
-
* Force the use of facetOrdering from the result if a sortBy is present. If
|
|
4173
|
-
* sortBy isn't present, facetOrdering will be used automatically.
|
|
4174
4121
|
* @param {Array.<string> | function} opts.sortBy
|
|
4175
4122
|
* When using strings, it consists of
|
|
4176
4123
|
* the name of the [FacetValue](#SearchResults.FacetValue) or the
|
|
@@ -4210,41 +4157,30 @@ SearchResults.prototype.getFacetValues = function(attribute, opts) {
|
|
|
4210
4157
|
return undefined;
|
|
4211
4158
|
}
|
|
4212
4159
|
|
|
4213
|
-
var options = defaultsPure({}, opts, {
|
|
4214
|
-
sortBy: SearchResults.DEFAULT_SORT,
|
|
4215
|
-
// if no sortBy is given, attempt to sort based on facetOrdering
|
|
4216
|
-
// if it is given, we still allow to sort via facet ordering first
|
|
4217
|
-
facetOrdering: !(opts && opts.sortBy)
|
|
4218
|
-
});
|
|
4160
|
+
var options = defaultsPure({}, opts, {sortBy: SearchResults.DEFAULT_SORT});
|
|
4219
4161
|
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
} else {
|
|
4225
|
-
var config = results._state.getHierarchicalFacetByName(facetValues.name);
|
|
4226
|
-
attributes = config.attributes;
|
|
4227
|
-
}
|
|
4228
|
-
|
|
4229
|
-
return recSort(function(data, facetName) {
|
|
4230
|
-
if (options.facetOrdering) {
|
|
4231
|
-
var facetOrdering = getFacetOrdering(results, facetName);
|
|
4232
|
-
if (Boolean(facetOrdering)) {
|
|
4233
|
-
return sortViaFacetOrdering(data, facetOrdering);
|
|
4234
|
-
}
|
|
4162
|
+
if (Array.isArray(options.sortBy)) {
|
|
4163
|
+
var order = formatSort(options.sortBy, SearchResults.DEFAULT_SORT);
|
|
4164
|
+
if (Array.isArray(facetValues)) {
|
|
4165
|
+
return orderBy_1(facetValues, order[0], order[1]);
|
|
4235
4166
|
}
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4167
|
+
// If facetValues is not an array, it's an object thus a hierarchical facet object
|
|
4168
|
+
return recSort(function(hierarchicalFacetValues) {
|
|
4169
|
+
return orderBy_1(hierarchicalFacetValues, order[0], order[1]);
|
|
4170
|
+
}, facetValues);
|
|
4171
|
+
} else if (typeof options.sortBy === 'function') {
|
|
4172
|
+
if (Array.isArray(facetValues)) {
|
|
4173
|
+
return facetValues.sort(options.sortBy);
|
|
4242
4174
|
}
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
);
|
|
4247
|
-
}
|
|
4175
|
+
// If facetValues is not an array, it's an object thus a hierarchical facet object
|
|
4176
|
+
return recSort(function(data) {
|
|
4177
|
+
return vanillaSortFn(options.sortBy, data);
|
|
4178
|
+
}, facetValues);
|
|
4179
|
+
}
|
|
4180
|
+
throw new Error(
|
|
4181
|
+
'options.sortBy is optional but if defined it must be ' +
|
|
4182
|
+
'either an array of string (predicates) or a sorting function'
|
|
4183
|
+
);
|
|
4248
4184
|
};
|
|
4249
4185
|
|
|
4250
4186
|
/**
|
|
@@ -4775,7 +4711,7 @@ var requestBuilder = {
|
|
|
4775
4711
|
|
|
4776
4712
|
var requestBuilder_1 = requestBuilder;
|
|
4777
4713
|
|
|
4778
|
-
var version = '3.
|
|
4714
|
+
var version$1 = '3.4.4';
|
|
4779
4715
|
|
|
4780
4716
|
/**
|
|
4781
4717
|
* Event triggered when a parameter is set or updated
|
|
@@ -4882,7 +4818,7 @@ var version = '3.5.3';
|
|
|
4882
4818
|
*/
|
|
4883
4819
|
function AlgoliaSearchHelper(client, index, options) {
|
|
4884
4820
|
if (typeof client.addAlgoliaAgent === 'function') {
|
|
4885
|
-
client.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
4821
|
+
client.addAlgoliaAgent('JS Helper (' + version$1 + ')');
|
|
4886
4822
|
}
|
|
4887
4823
|
|
|
4888
4824
|
this.setClient(client);
|
|
@@ -5037,7 +4973,7 @@ AlgoliaSearchHelper.prototype.findAnswers = function(options) {
|
|
|
5037
4973
|
nbHits: options.nbHits
|
|
5038
4974
|
},
|
|
5039
4975
|
{
|
|
5040
|
-
params: omit(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
4976
|
+
params: omit$1(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
5041
4977
|
'attributesToSnippet',
|
|
5042
4978
|
'hitsPerPage',
|
|
5043
4979
|
'restrictSearchableAttributes',
|
|
@@ -6151,7 +6087,7 @@ AlgoliaSearchHelper.prototype.setClient = function(newClient) {
|
|
|
6151
6087
|
if (this.client === newClient) return this;
|
|
6152
6088
|
|
|
6153
6089
|
if (typeof newClient.addAlgoliaAgent === 'function') {
|
|
6154
|
-
newClient.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
6090
|
+
newClient.addAlgoliaAgent('JS Helper (' + version$1 + ')');
|
|
6155
6091
|
}
|
|
6156
6092
|
this.client = newClient;
|
|
6157
6093
|
|
|
@@ -6270,7 +6206,7 @@ function algoliasearchHelper(client, index, opts) {
|
|
|
6270
6206
|
* @member module:algoliasearchHelper.version
|
|
6271
6207
|
* @type {number}
|
|
6272
6208
|
*/
|
|
6273
|
-
algoliasearchHelper.version = version;
|
|
6209
|
+
algoliasearchHelper.version = version$1;
|
|
6274
6210
|
|
|
6275
6211
|
/**
|
|
6276
6212
|
* Constructor for the Helper.
|
|
@@ -6302,13 +6238,13 @@ function createOptionalFilter(_ref) {
|
|
|
6302
6238
|
return "".concat(attributeName, ":").concat(attributeValue, "<score=").concat(attributeScore || 1, ">");
|
|
6303
6239
|
}
|
|
6304
6240
|
|
|
6305
|
-
var defaultProps
|
|
6241
|
+
var defaultProps = {
|
|
6306
6242
|
transformSearchParameters: function transformSearchParameters(x) {
|
|
6307
6243
|
return _objectSpread({}, x);
|
|
6308
6244
|
}
|
|
6309
6245
|
};
|
|
6310
6246
|
|
|
6311
|
-
function getId$
|
|
6247
|
+
function getId$1() {
|
|
6312
6248
|
// We store the search state of this widget in `configure`.
|
|
6313
6249
|
return 'configure';
|
|
6314
6250
|
}
|
|
@@ -6356,7 +6292,7 @@ function getSearchParametersFromProps(props) {
|
|
|
6356
6292
|
|
|
6357
6293
|
var connectConfigureRelatedItems = createConnectorWithContext({
|
|
6358
6294
|
displayName: 'AlgoliaConfigureRelatedItems',
|
|
6359
|
-
defaultProps: defaultProps
|
|
6295
|
+
defaultProps: defaultProps,
|
|
6360
6296
|
getProvidedProps: function getProvidedProps() {
|
|
6361
6297
|
return {};
|
|
6362
6298
|
},
|
|
@@ -6364,7 +6300,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6364
6300
|
return searchParameters.setQueryParameters(getSearchParametersFromProps(props));
|
|
6365
6301
|
},
|
|
6366
6302
|
transitionState: function transitionState(props, _prevSearchState, nextSearchState) {
|
|
6367
|
-
var id = getId$
|
|
6303
|
+
var id = getId$1(); // We need to transform the exhaustive search parameters back to clean
|
|
6368
6304
|
// search parameters without the empty default keys so we don't pollute the
|
|
6369
6305
|
// `configure` search state.
|
|
6370
6306
|
|
|
@@ -6375,7 +6311,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6375
6311
|
}) : [];
|
|
6376
6312
|
this._searchParameters = searchParameters;
|
|
6377
6313
|
|
|
6378
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit
|
|
6314
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6379
6315
|
|
|
6380
6316
|
return refineValue(nextSearchState, nextValue, {
|
|
6381
6317
|
ais: props.contextValue,
|
|
@@ -6385,7 +6321,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6385
6321
|
cleanUp: function cleanUp(props, searchState) {
|
|
6386
6322
|
var _this = this;
|
|
6387
6323
|
|
|
6388
|
-
var id = getId$
|
|
6324
|
+
var id = getId$1();
|
|
6389
6325
|
var indexId = getIndexId({
|
|
6390
6326
|
ais: props.contextValue,
|
|
6391
6327
|
multiIndexContext: props.indexContextValue
|
|
@@ -6417,9 +6353,9 @@ function ConfigureRelatedItems() {
|
|
|
6417
6353
|
}
|
|
6418
6354
|
|
|
6419
6355
|
ConfigureRelatedItems.propTypes = {
|
|
6420
|
-
hit: PropTypes__default
|
|
6421
|
-
matchingPatterns: PropTypes__default
|
|
6422
|
-
transformSearchParameters: PropTypes__default
|
|
6356
|
+
hit: PropTypes__default.object.isRequired,
|
|
6357
|
+
matchingPatterns: PropTypes__default.object.isRequired,
|
|
6358
|
+
transformSearchParameters: PropTypes__default.func
|
|
6423
6359
|
};
|
|
6424
6360
|
connectConfigureRelatedItems(ConfigureRelatedItems);
|
|
6425
6361
|
|
|
@@ -6458,7 +6394,7 @@ function getWidgetRefinements(attribute, widgetKey, searchState) {
|
|
|
6458
6394
|
}
|
|
6459
6395
|
}
|
|
6460
6396
|
|
|
6461
|
-
function getRefinements(attribute) {
|
|
6397
|
+
function getRefinements$1(attribute) {
|
|
6462
6398
|
var searchState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6463
6399
|
var refinements = Object.keys(searchState).filter(function (widgetKey) {
|
|
6464
6400
|
return searchState[widgetKey] !== undefined && searchState[widgetKey][attribute] !== undefined;
|
|
@@ -6475,7 +6411,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6475
6411
|
var searchState = _ref.searchState,
|
|
6476
6412
|
trackedFilters = _ref.trackedFilters;
|
|
6477
6413
|
var ruleContexts = Object.keys(trackedFilters).reduce(function (facets, facetName) {
|
|
6478
|
-
var facetRefinements = getRefinements(facetName, searchState);
|
|
6414
|
+
var facetRefinements = getRefinements$1(facetName, searchState);
|
|
6479
6415
|
var getTrackedFacetValues = trackedFilters[facetName];
|
|
6480
6416
|
var trackedFacetValues = getTrackedFacetValues(facetRefinements);
|
|
6481
6417
|
return [].concat(_toConsumableArray(facets), _toConsumableArray(facetRefinements.filter(function (facetRefinement) {
|
|
@@ -6487,7 +6423,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6487
6423
|
return ruleContexts;
|
|
6488
6424
|
}
|
|
6489
6425
|
|
|
6490
|
-
var defaultProps = {
|
|
6426
|
+
var defaultProps$1 = {
|
|
6491
6427
|
transformItems: function transformItems(items) {
|
|
6492
6428
|
return items;
|
|
6493
6429
|
},
|
|
@@ -6498,7 +6434,7 @@ var defaultProps = {
|
|
|
6498
6434
|
};
|
|
6499
6435
|
var connectQueryRules = createConnectorWithContext({
|
|
6500
6436
|
displayName: 'AlgoliaQueryRules',
|
|
6501
|
-
defaultProps: defaultProps,
|
|
6437
|
+
defaultProps: defaultProps$1,
|
|
6502
6438
|
getProvidedProps: function getProvidedProps(props, _1, searchResults) {
|
|
6503
6439
|
var results = getResults(searchResults, {
|
|
6504
6440
|
ais: props.contextValue,
|
|
@@ -6660,7 +6596,7 @@ function (_Component) {
|
|
|
6660
6596
|
return null;
|
|
6661
6597
|
}
|
|
6662
6598
|
|
|
6663
|
-
return React__default
|
|
6599
|
+
return React__default.createElement(IndexProvider, {
|
|
6664
6600
|
value: this.state.indexContext
|
|
6665
6601
|
}, this.props.children);
|
|
6666
6602
|
}
|
|
@@ -6670,15 +6606,25 @@ function (_Component) {
|
|
|
6670
6606
|
}(React.Component);
|
|
6671
6607
|
|
|
6672
6608
|
_defineProperty(Index, "propTypes", {
|
|
6673
|
-
indexName: PropTypes__default
|
|
6674
|
-
indexId: PropTypes__default
|
|
6675
|
-
children: PropTypes__default
|
|
6609
|
+
indexName: PropTypes__default.string.isRequired,
|
|
6610
|
+
indexId: PropTypes__default.string.isRequired,
|
|
6611
|
+
children: PropTypes__default.node
|
|
6676
6612
|
});
|
|
6677
6613
|
|
|
6678
|
-
({
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6614
|
+
var IndexWrapper = function IndexWrapper(props) {
|
|
6615
|
+
var inferredIndexId = props.indexName;
|
|
6616
|
+
return React__default.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
6617
|
+
return React__default.createElement(Index, index$5._extends({
|
|
6618
|
+
contextValue: contextValue,
|
|
6619
|
+
indexId: inferredIndexId
|
|
6620
|
+
}, props));
|
|
6621
|
+
});
|
|
6622
|
+
};
|
|
6623
|
+
|
|
6624
|
+
IndexWrapper.propTypes = {
|
|
6625
|
+
indexName: PropTypes__default.string.isRequired,
|
|
6626
|
+
indexId: PropTypes__default.string
|
|
6627
|
+
};
|
|
6682
6628
|
|
|
6683
6629
|
function createWidgetsManager(onWidgetsUpdate) {
|
|
6684
6630
|
var widgets = []; // Is an update scheduled?
|
|
@@ -6739,7 +6685,7 @@ function createStore(initialState) {
|
|
|
6739
6685
|
function addAlgoliaAgents(searchClient) {
|
|
6740
6686
|
if (typeof searchClient.addAlgoliaAgent === 'function') {
|
|
6741
6687
|
searchClient.addAlgoliaAgent("react (".concat(React.version, ")"));
|
|
6742
|
-
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version
|
|
6688
|
+
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version, ")"));
|
|
6743
6689
|
}
|
|
6744
6690
|
}
|
|
6745
6691
|
|
|
@@ -6911,7 +6857,7 @@ function createInstantSearchManager(_ref) {
|
|
|
6911
6857
|
|
|
6912
6858
|
function search() {
|
|
6913
6859
|
if (!skip) {
|
|
6914
|
-
var _getSearchParameters = getSearchParameters(
|
|
6860
|
+
var _getSearchParameters = getSearchParameters(),
|
|
6915
6861
|
mainParameters = _getSearchParameters.mainParameters,
|
|
6916
6862
|
derivedParameters = _getSearchParameters.derivedParameters; // We have to call `slice` because the method `detach` on the derived
|
|
6917
6863
|
// helpers mutates the value `derivedHelpers`. The `forEach` loop does
|
|
@@ -6977,8 +6923,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6977
6923
|
nextIsSearchStalled = false;
|
|
6978
6924
|
}
|
|
6979
6925
|
|
|
6980
|
-
currentState.resultsFacetValues
|
|
6981
|
-
|
|
6926
|
+
var resultsFacetValues = currentState.resultsFacetValues,
|
|
6927
|
+
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6982
6928
|
|
|
6983
6929
|
store.setState(_objectSpread({}, partialState, {
|
|
6984
6930
|
results: results,
|
|
@@ -6999,8 +6945,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6999
6945
|
nextIsSearchStalled = false;
|
|
7000
6946
|
}
|
|
7001
6947
|
|
|
7002
|
-
currentState.resultsFacetValues
|
|
7003
|
-
|
|
6948
|
+
var resultsFacetValues = currentState.resultsFacetValues,
|
|
6949
|
+
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
7004
6950
|
|
|
7005
6951
|
store.setState(_objectSpread({}, partialState, {
|
|
7006
6952
|
isSearchStalled: nextIsSearchStalled,
|
|
@@ -7012,9 +6958,9 @@ function createInstantSearchManager(_ref) {
|
|
|
7012
6958
|
function handleNewSearch() {
|
|
7013
6959
|
if (!stalledSearchTimer) {
|
|
7014
6960
|
stalledSearchTimer = setTimeout(function () {
|
|
7015
|
-
var _store$getState = store.getState()
|
|
7016
|
-
_store$getState.resultsFacetValues
|
|
7017
|
-
|
|
6961
|
+
var _store$getState = store.getState(),
|
|
6962
|
+
resultsFacetValues = _store$getState.resultsFacetValues,
|
|
6963
|
+
partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
7018
6964
|
|
|
7019
6965
|
store.setState(_objectSpread({}, partialState, {
|
|
7020
6966
|
isSearchStalled: true
|
|
@@ -7479,7 +7425,7 @@ function (_Component) {
|
|
|
7479
7425
|
return null;
|
|
7480
7426
|
}
|
|
7481
7427
|
|
|
7482
|
-
return React__default
|
|
7428
|
+
return React__default.createElement(InstantSearchProvider, {
|
|
7483
7429
|
value: this.state.contextValue
|
|
7484
7430
|
}, this.props.children);
|
|
7485
7431
|
}
|
|
@@ -7495,39 +7441,39 @@ _defineProperty(InstantSearch, "defaultProps", {
|
|
|
7495
7441
|
|
|
7496
7442
|
_defineProperty(InstantSearch, "propTypes", {
|
|
7497
7443
|
// @TODO: These props are currently constant.
|
|
7498
|
-
indexName: PropTypes__default
|
|
7499
|
-
searchClient: PropTypes__default
|
|
7500
|
-
search: PropTypes__default
|
|
7501
|
-
searchForFacetValues: PropTypes__default
|
|
7502
|
-
addAlgoliaAgent: PropTypes__default
|
|
7503
|
-
clearCache: PropTypes__default
|
|
7444
|
+
indexName: PropTypes__default.string.isRequired,
|
|
7445
|
+
searchClient: PropTypes__default.shape({
|
|
7446
|
+
search: PropTypes__default.func.isRequired,
|
|
7447
|
+
searchForFacetValues: PropTypes__default.func,
|
|
7448
|
+
addAlgoliaAgent: PropTypes__default.func,
|
|
7449
|
+
clearCache: PropTypes__default.func
|
|
7504
7450
|
}).isRequired,
|
|
7505
|
-
createURL: PropTypes__default
|
|
7506
|
-
refresh: PropTypes__default
|
|
7507
|
-
searchState: PropTypes__default
|
|
7508
|
-
onSearchStateChange: PropTypes__default
|
|
7509
|
-
onSearchParameters: PropTypes__default
|
|
7510
|
-
widgetsCollector: PropTypes__default
|
|
7511
|
-
resultsState: PropTypes__default
|
|
7512
|
-
children: PropTypes__default
|
|
7513
|
-
stalledSearchDelay: PropTypes__default
|
|
7451
|
+
createURL: PropTypes__default.func,
|
|
7452
|
+
refresh: PropTypes__default.bool,
|
|
7453
|
+
searchState: PropTypes__default.object,
|
|
7454
|
+
onSearchStateChange: PropTypes__default.func,
|
|
7455
|
+
onSearchParameters: PropTypes__default.func,
|
|
7456
|
+
widgetsCollector: PropTypes__default.func,
|
|
7457
|
+
resultsState: PropTypes__default.oneOfType([PropTypes__default.object, PropTypes__default.array]),
|
|
7458
|
+
children: PropTypes__default.node,
|
|
7459
|
+
stalledSearchDelay: PropTypes__default.number
|
|
7514
7460
|
});
|
|
7515
7461
|
|
|
7516
|
-
var getId$
|
|
7462
|
+
var getId$2 = function getId(props) {
|
|
7517
7463
|
return props.attributes[0];
|
|
7518
7464
|
};
|
|
7519
|
-
var namespace
|
|
7465
|
+
var namespace = 'hierarchicalMenu';
|
|
7520
7466
|
|
|
7521
|
-
function _refine
|
|
7522
|
-
var id = getId$
|
|
7467
|
+
function _refine(props, searchState, nextRefinement, context) {
|
|
7468
|
+
var id = getId$2(props);
|
|
7523
7469
|
|
|
7524
7470
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7525
7471
|
|
|
7526
7472
|
var resetPage = true;
|
|
7527
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace
|
|
7473
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
7528
7474
|
}
|
|
7529
7475
|
|
|
7530
|
-
function transformValue
|
|
7476
|
+
function transformValue(values) {
|
|
7531
7477
|
return values.reduce(function (acc, item) {
|
|
7532
7478
|
if (item.isRefined) {
|
|
7533
7479
|
acc.push({
|
|
@@ -7538,7 +7484,7 @@ function transformValue$1(values) {
|
|
|
7538
7484
|
}); // Create a variable in order to keep the same acc for the recursion, otherwise "reduce" returns a new one
|
|
7539
7485
|
|
|
7540
7486
|
if (item.data) {
|
|
7541
|
-
acc = acc.concat(transformValue
|
|
7487
|
+
acc = acc.concat(transformValue(item.data));
|
|
7542
7488
|
}
|
|
7543
7489
|
}
|
|
7544
7490
|
|
|
@@ -7597,10 +7543,10 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7597
7543
|
|
|
7598
7544
|
return undefined;
|
|
7599
7545
|
},
|
|
7600
|
-
transformItems: PropTypes__default
|
|
7546
|
+
transformItems: PropTypes__default.func
|
|
7601
7547
|
},
|
|
7602
7548
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
7603
|
-
var id = getId$
|
|
7549
|
+
var id = getId$2(props);
|
|
7604
7550
|
var results = getResults(searchResults, {
|
|
7605
7551
|
ais: props.contextValue,
|
|
7606
7552
|
multiIndexContext: props.indexContextValue
|
|
@@ -7615,7 +7561,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7615
7561
|
}
|
|
7616
7562
|
|
|
7617
7563
|
var values = results.getFacetValues(id);
|
|
7618
|
-
var items = values.data ? transformValue
|
|
7564
|
+
var items = values.data ? transformValue(values.data) : [];
|
|
7619
7565
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7620
7566
|
return {
|
|
7621
7567
|
canRefine: transformedItems.length > 0,
|
|
@@ -7623,7 +7569,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7623
7569
|
};
|
|
7624
7570
|
},
|
|
7625
7571
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7626
|
-
return _refine
|
|
7572
|
+
return _refine(props, searchState, nextRefinement, {
|
|
7627
7573
|
ais: props.contextValue,
|
|
7628
7574
|
multiIndexContext: props.indexContextValue
|
|
7629
7575
|
});
|
|
@@ -7646,7 +7592,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7646
7592
|
var connectCurrentRefinements = createConnectorWithContext({
|
|
7647
7593
|
displayName: 'AlgoliaCurrentRefinements',
|
|
7648
7594
|
propTypes: {
|
|
7649
|
-
transformItems: PropTypes__default
|
|
7595
|
+
transformItems: PropTypes__default.func
|
|
7650
7596
|
},
|
|
7651
7597
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults, metadata) {
|
|
7652
7598
|
var items = metadata.reduce(function (res, meta) {
|
|
@@ -7686,13 +7632,13 @@ var connectCurrentRefinements = createConnectorWithContext({
|
|
|
7686
7632
|
}
|
|
7687
7633
|
});
|
|
7688
7634
|
|
|
7689
|
-
var getId$
|
|
7635
|
+
var getId$3 = function getId(props) {
|
|
7690
7636
|
return props.attributes[0];
|
|
7691
7637
|
};
|
|
7692
|
-
var namespace$
|
|
7638
|
+
var namespace$1 = 'hierarchicalMenu';
|
|
7693
7639
|
|
|
7694
|
-
function getCurrentRefinement
|
|
7695
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
7640
|
+
function getCurrentRefinement(props, searchState, context) {
|
|
7641
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$1, ".").concat(getId$3(props)), null);
|
|
7696
7642
|
|
|
7697
7643
|
if (currentRefinement === '') {
|
|
7698
7644
|
return null;
|
|
@@ -7701,13 +7647,13 @@ function getCurrentRefinement$b(props, searchState, context) {
|
|
|
7701
7647
|
return currentRefinement;
|
|
7702
7648
|
}
|
|
7703
7649
|
|
|
7704
|
-
function getValue
|
|
7650
|
+
function getValue(path, props, searchState, context) {
|
|
7705
7651
|
var id = props.id,
|
|
7706
7652
|
attributes = props.attributes,
|
|
7707
7653
|
separator = props.separator,
|
|
7708
7654
|
rootPath = props.rootPath,
|
|
7709
7655
|
showParentLevel = props.showParentLevel;
|
|
7710
|
-
var currentRefinement = getCurrentRefinement
|
|
7656
|
+
var currentRefinement = getCurrentRefinement(props, searchState, context);
|
|
7711
7657
|
var nextRefinement;
|
|
7712
7658
|
|
|
7713
7659
|
if (currentRefinement === null) {
|
|
@@ -7728,14 +7674,14 @@ function getValue$2(path, props, searchState, context) {
|
|
|
7728
7674
|
return nextRefinement;
|
|
7729
7675
|
}
|
|
7730
7676
|
|
|
7731
|
-
function transformValue(value, props, searchState, context) {
|
|
7677
|
+
function transformValue$1(value, props, searchState, context) {
|
|
7732
7678
|
return value.map(function (v) {
|
|
7733
7679
|
return {
|
|
7734
7680
|
label: v.name,
|
|
7735
|
-
value: getValue
|
|
7681
|
+
value: getValue(v.path, props, searchState, context),
|
|
7736
7682
|
count: v.count,
|
|
7737
7683
|
isRefined: v.isRefined,
|
|
7738
|
-
items: v.data && transformValue(v.data, props, searchState, context)
|
|
7684
|
+
items: v.data && transformValue$1(v.data, props, searchState, context)
|
|
7739
7685
|
};
|
|
7740
7686
|
});
|
|
7741
7687
|
}
|
|
@@ -7751,20 +7697,20 @@ var truncate = function truncate() {
|
|
|
7751
7697
|
});
|
|
7752
7698
|
};
|
|
7753
7699
|
|
|
7754
|
-
function _refine$
|
|
7755
|
-
var id = getId$
|
|
7700
|
+
function _refine$1(props, searchState, nextRefinement, context) {
|
|
7701
|
+
var id = getId$3(props);
|
|
7756
7702
|
|
|
7757
7703
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7758
7704
|
|
|
7759
7705
|
var resetPage = true;
|
|
7760
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
7706
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$1);
|
|
7761
7707
|
}
|
|
7762
7708
|
|
|
7763
|
-
function _cleanUp
|
|
7764
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
7709
|
+
function _cleanUp(props, searchState, context) {
|
|
7710
|
+
return cleanUpValue(searchState, context, "".concat(namespace$1, ".").concat(getId$3(props)));
|
|
7765
7711
|
}
|
|
7766
7712
|
|
|
7767
|
-
var sortBy
|
|
7713
|
+
var sortBy = ['name:asc'];
|
|
7768
7714
|
/**
|
|
7769
7715
|
* connectHierarchicalMenu connector provides the logic to build a widget that will
|
|
7770
7716
|
* give the user the ability to explore a tree-like structure.
|
|
@@ -7825,14 +7771,14 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7825
7771
|
|
|
7826
7772
|
return undefined;
|
|
7827
7773
|
},
|
|
7828
|
-
separator: PropTypes__default
|
|
7829
|
-
rootPath: PropTypes__default
|
|
7830
|
-
showParentLevel: PropTypes__default
|
|
7831
|
-
defaultRefinement: PropTypes__default
|
|
7832
|
-
showMore: PropTypes__default
|
|
7833
|
-
limit: PropTypes__default
|
|
7834
|
-
showMoreLimit: PropTypes__default
|
|
7835
|
-
transformItems: PropTypes__default
|
|
7774
|
+
separator: PropTypes__default.string,
|
|
7775
|
+
rootPath: PropTypes__default.string,
|
|
7776
|
+
showParentLevel: PropTypes__default.bool,
|
|
7777
|
+
defaultRefinement: PropTypes__default.string,
|
|
7778
|
+
showMore: PropTypes__default.bool,
|
|
7779
|
+
limit: PropTypes__default.number,
|
|
7780
|
+
showMoreLimit: PropTypes__default.number,
|
|
7781
|
+
transformItems: PropTypes__default.func
|
|
7836
7782
|
},
|
|
7837
7783
|
defaultProps: {
|
|
7838
7784
|
showMore: false,
|
|
@@ -7846,7 +7792,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7846
7792
|
var showMore = props.showMore,
|
|
7847
7793
|
limit = props.limit,
|
|
7848
7794
|
showMoreLimit = props.showMoreLimit;
|
|
7849
|
-
var id = getId$
|
|
7795
|
+
var id = getId$3(props);
|
|
7850
7796
|
var results = getResults(searchResults, {
|
|
7851
7797
|
ais: props.contextValue,
|
|
7852
7798
|
multiIndexContext: props.indexContextValue
|
|
@@ -7856,7 +7802,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7856
7802
|
if (!isFacetPresent) {
|
|
7857
7803
|
return {
|
|
7858
7804
|
items: [],
|
|
7859
|
-
currentRefinement: getCurrentRefinement
|
|
7805
|
+
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7860
7806
|
ais: props.contextValue,
|
|
7861
7807
|
multiIndexContext: props.indexContextValue
|
|
7862
7808
|
}),
|
|
@@ -7866,16 +7812,16 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7866
7812
|
|
|
7867
7813
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7868
7814
|
var value = results.getFacetValues(id, {
|
|
7869
|
-
sortBy: sortBy
|
|
7815
|
+
sortBy: sortBy
|
|
7870
7816
|
});
|
|
7871
|
-
var items = value.data ? transformValue(value.data, props, searchState, {
|
|
7817
|
+
var items = value.data ? transformValue$1(value.data, props, searchState, {
|
|
7872
7818
|
ais: props.contextValue,
|
|
7873
7819
|
multiIndexContext: props.indexContextValue
|
|
7874
7820
|
}) : [];
|
|
7875
7821
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7876
7822
|
return {
|
|
7877
7823
|
items: truncate(transformedItems, itemsLimit),
|
|
7878
|
-
currentRefinement: getCurrentRefinement
|
|
7824
|
+
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7879
7825
|
ais: props.contextValue,
|
|
7880
7826
|
multiIndexContext: props.indexContextValue
|
|
7881
7827
|
}),
|
|
@@ -7883,13 +7829,13 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7883
7829
|
};
|
|
7884
7830
|
},
|
|
7885
7831
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7886
|
-
return _refine$
|
|
7832
|
+
return _refine$1(props, searchState, nextRefinement, {
|
|
7887
7833
|
ais: props.contextValue,
|
|
7888
7834
|
multiIndexContext: props.indexContextValue
|
|
7889
7835
|
});
|
|
7890
7836
|
},
|
|
7891
7837
|
cleanUp: function cleanUp(props, searchState) {
|
|
7892
|
-
return _cleanUp
|
|
7838
|
+
return _cleanUp(props, searchState, {
|
|
7893
7839
|
ais: props.contextValue,
|
|
7894
7840
|
multiIndexContext: props.indexContextValue
|
|
7895
7841
|
});
|
|
@@ -7903,7 +7849,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7903
7849
|
limit = props.limit,
|
|
7904
7850
|
showMoreLimit = props.showMoreLimit,
|
|
7905
7851
|
contextValue = props.contextValue;
|
|
7906
|
-
var id = getId$
|
|
7852
|
+
var id = getId$3(props);
|
|
7907
7853
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7908
7854
|
searchParameters = searchParameters.addHierarchicalFacet({
|
|
7909
7855
|
name: id,
|
|
@@ -7914,7 +7860,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7914
7860
|
}).setQueryParameters({
|
|
7915
7861
|
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, itemsLimit)
|
|
7916
7862
|
});
|
|
7917
|
-
var currentRefinement = getCurrentRefinement
|
|
7863
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7918
7864
|
ais: contextValue,
|
|
7919
7865
|
multiIndexContext: props.indexContextValue
|
|
7920
7866
|
});
|
|
@@ -7927,8 +7873,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7927
7873
|
},
|
|
7928
7874
|
getMetadata: function getMetadata(props, searchState) {
|
|
7929
7875
|
var rootAttribute = props.attributes[0];
|
|
7930
|
-
var id = getId$
|
|
7931
|
-
var currentRefinement = getCurrentRefinement
|
|
7876
|
+
var id = getId$3(props);
|
|
7877
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7932
7878
|
ais: props.contextValue,
|
|
7933
7879
|
multiIndexContext: props.indexContextValue
|
|
7934
7880
|
});
|
|
@@ -7936,7 +7882,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7936
7882
|
label: "".concat(rootAttribute, ": ").concat(currentRefinement),
|
|
7937
7883
|
attribute: rootAttribute,
|
|
7938
7884
|
value: function value(nextState) {
|
|
7939
|
-
return _refine$
|
|
7885
|
+
return _refine$1(props, nextState, '', {
|
|
7940
7886
|
ais: props.contextValue,
|
|
7941
7887
|
multiIndexContext: props.indexContextValue
|
|
7942
7888
|
});
|
|
@@ -8113,12 +8059,12 @@ var connectHits = createConnectorWithContext({
|
|
|
8113
8059
|
}
|
|
8114
8060
|
});
|
|
8115
8061
|
|
|
8116
|
-
function getId$
|
|
8062
|
+
function getId$4() {
|
|
8117
8063
|
return 'hitsPerPage';
|
|
8118
8064
|
}
|
|
8119
8065
|
|
|
8120
|
-
function getCurrentRefinement$
|
|
8121
|
-
var id = getId$
|
|
8066
|
+
function getCurrentRefinement$1(props, searchState, context) {
|
|
8067
|
+
var id = getId$4();
|
|
8122
8068
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
8123
8069
|
|
|
8124
8070
|
if (typeof currentRefinement === 'string') {
|
|
@@ -8145,15 +8091,15 @@ function getCurrentRefinement$a(props, searchState, context) {
|
|
|
8145
8091
|
var connectHitsPerPage = createConnectorWithContext({
|
|
8146
8092
|
displayName: 'AlgoliaHitsPerPage',
|
|
8147
8093
|
propTypes: {
|
|
8148
|
-
defaultRefinement: PropTypes__default
|
|
8149
|
-
items: PropTypes__default
|
|
8150
|
-
label: PropTypes__default
|
|
8151
|
-
value: PropTypes__default
|
|
8094
|
+
defaultRefinement: PropTypes__default.number.isRequired,
|
|
8095
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
8096
|
+
label: PropTypes__default.string,
|
|
8097
|
+
value: PropTypes__default.number.isRequired
|
|
8152
8098
|
})).isRequired,
|
|
8153
|
-
transformItems: PropTypes__default
|
|
8099
|
+
transformItems: PropTypes__default.func
|
|
8154
8100
|
},
|
|
8155
8101
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
8156
|
-
var currentRefinement = getCurrentRefinement$
|
|
8102
|
+
var currentRefinement = getCurrentRefinement$1(props, searchState, {
|
|
8157
8103
|
ais: props.contextValue,
|
|
8158
8104
|
multiIndexContext: props.indexContextValue
|
|
8159
8105
|
});
|
|
@@ -8170,7 +8116,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8170
8116
|
};
|
|
8171
8117
|
},
|
|
8172
8118
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8173
|
-
var id = getId$
|
|
8119
|
+
var id = getId$4();
|
|
8174
8120
|
|
|
8175
8121
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
8176
8122
|
|
|
@@ -8184,27 +8130,27 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8184
8130
|
return cleanUpValue(searchState, {
|
|
8185
8131
|
ais: props.contextValue,
|
|
8186
8132
|
multiIndexContext: props.indexContextValue
|
|
8187
|
-
}, getId$
|
|
8133
|
+
}, getId$4());
|
|
8188
8134
|
},
|
|
8189
8135
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8190
|
-
return searchParameters.setHitsPerPage(getCurrentRefinement$
|
|
8136
|
+
return searchParameters.setHitsPerPage(getCurrentRefinement$1(props, searchState, {
|
|
8191
8137
|
ais: props.contextValue,
|
|
8192
8138
|
multiIndexContext: props.indexContextValue
|
|
8193
8139
|
}));
|
|
8194
8140
|
},
|
|
8195
8141
|
getMetadata: function getMetadata() {
|
|
8196
8142
|
return {
|
|
8197
|
-
id: getId$
|
|
8143
|
+
id: getId$4()
|
|
8198
8144
|
};
|
|
8199
8145
|
}
|
|
8200
8146
|
});
|
|
8201
8147
|
|
|
8202
|
-
function getId$
|
|
8148
|
+
function getId$5() {
|
|
8203
8149
|
return 'page';
|
|
8204
8150
|
}
|
|
8205
8151
|
|
|
8206
|
-
function getCurrentRefinement$
|
|
8207
|
-
var id = getId$
|
|
8152
|
+
function getCurrentRefinement$2(props, searchState, context) {
|
|
8153
|
+
var id = getId$5();
|
|
8208
8154
|
var page = 1;
|
|
8209
8155
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8210
8156
|
|
|
@@ -8216,9 +8162,9 @@ function getCurrentRefinement$9(props, searchState, context) {
|
|
|
8216
8162
|
}
|
|
8217
8163
|
|
|
8218
8164
|
function getStateWithoutPage(state) {
|
|
8219
|
-
var _ref = state || {}
|
|
8220
|
-
_ref.page
|
|
8221
|
-
|
|
8165
|
+
var _ref = state || {},
|
|
8166
|
+
page = _ref.page,
|
|
8167
|
+
rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8222
8168
|
|
|
8223
8169
|
return rest;
|
|
8224
8170
|
}
|
|
@@ -8327,14 +8273,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8327
8273
|
},
|
|
8328
8274
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8329
8275
|
return searchParameters.setQueryParameters({
|
|
8330
|
-
page: getCurrentRefinement$
|
|
8276
|
+
page: getCurrentRefinement$2(props, searchState, {
|
|
8331
8277
|
ais: props.contextValue,
|
|
8332
8278
|
multiIndexContext: props.indexContextValue
|
|
8333
8279
|
}) - 1
|
|
8334
8280
|
});
|
|
8335
8281
|
},
|
|
8336
8282
|
refine: function refine(props, searchState, event, index) {
|
|
8337
|
-
var id = getId$
|
|
8283
|
+
var id = getId$5();
|
|
8338
8284
|
|
|
8339
8285
|
var nextValue = _defineProperty({}, id, index + 1);
|
|
8340
8286
|
|
|
@@ -8346,14 +8292,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8346
8292
|
}
|
|
8347
8293
|
});
|
|
8348
8294
|
|
|
8349
|
-
var namespace$
|
|
8295
|
+
var namespace$2 = 'menu';
|
|
8350
8296
|
|
|
8351
|
-
function getId$
|
|
8297
|
+
function getId$6(props) {
|
|
8352
8298
|
return props.attribute;
|
|
8353
8299
|
}
|
|
8354
8300
|
|
|
8355
|
-
function getCurrentRefinement$
|
|
8356
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8301
|
+
function getCurrentRefinement$3(props, searchState, context) {
|
|
8302
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)), null);
|
|
8357
8303
|
|
|
8358
8304
|
if (currentRefinement === '') {
|
|
8359
8305
|
return null;
|
|
@@ -8363,28 +8309,28 @@ function getCurrentRefinement$8(props, searchState, context) {
|
|
|
8363
8309
|
}
|
|
8364
8310
|
|
|
8365
8311
|
function getValue$1(name, props, searchState, context) {
|
|
8366
|
-
var currentRefinement = getCurrentRefinement$
|
|
8312
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, context);
|
|
8367
8313
|
return name === currentRefinement ? '' : name;
|
|
8368
8314
|
}
|
|
8369
8315
|
|
|
8370
|
-
function getLimit
|
|
8316
|
+
function getLimit(_ref) {
|
|
8371
8317
|
var showMore = _ref.showMore,
|
|
8372
8318
|
limit = _ref.limit,
|
|
8373
8319
|
showMoreLimit = _ref.showMoreLimit;
|
|
8374
8320
|
return showMore ? showMoreLimit : limit;
|
|
8375
8321
|
}
|
|
8376
8322
|
|
|
8377
|
-
function _refine$
|
|
8378
|
-
var id = getId$
|
|
8323
|
+
function _refine$2(props, searchState, nextRefinement, context) {
|
|
8324
|
+
var id = getId$6(props);
|
|
8379
8325
|
|
|
8380
8326
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : '');
|
|
8381
8327
|
|
|
8382
8328
|
var resetPage = true;
|
|
8383
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
8329
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$2);
|
|
8384
8330
|
}
|
|
8385
8331
|
|
|
8386
|
-
function _cleanUp$
|
|
8387
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
8332
|
+
function _cleanUp$1(props, searchState, context) {
|
|
8333
|
+
return cleanUpValue(searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)));
|
|
8388
8334
|
}
|
|
8389
8335
|
|
|
8390
8336
|
var defaultSortBy = ['count:desc', 'name:asc'];
|
|
@@ -8412,13 +8358,13 @@ var defaultSortBy = ['count:desc', 'name:asc'];
|
|
|
8412
8358
|
var connectMenu = createConnectorWithContext({
|
|
8413
8359
|
displayName: 'AlgoliaMenu',
|
|
8414
8360
|
propTypes: {
|
|
8415
|
-
attribute: PropTypes__default
|
|
8416
|
-
showMore: PropTypes__default
|
|
8417
|
-
limit: PropTypes__default
|
|
8418
|
-
showMoreLimit: PropTypes__default
|
|
8419
|
-
defaultRefinement: PropTypes__default
|
|
8420
|
-
transformItems: PropTypes__default
|
|
8421
|
-
searchable: PropTypes__default
|
|
8361
|
+
attribute: PropTypes__default.string.isRequired,
|
|
8362
|
+
showMore: PropTypes__default.bool,
|
|
8363
|
+
limit: PropTypes__default.number,
|
|
8364
|
+
showMoreLimit: PropTypes__default.number,
|
|
8365
|
+
defaultRefinement: PropTypes__default.string,
|
|
8366
|
+
transformItems: PropTypes__default.func,
|
|
8367
|
+
searchable: PropTypes__default.bool
|
|
8422
8368
|
},
|
|
8423
8369
|
defaultProps: {
|
|
8424
8370
|
showMore: false,
|
|
@@ -8443,7 +8389,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8443
8389
|
if (!canRefine) {
|
|
8444
8390
|
return {
|
|
8445
8391
|
items: [],
|
|
8446
|
-
currentRefinement: getCurrentRefinement$
|
|
8392
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
8447
8393
|
ais: props.contextValue,
|
|
8448
8394
|
multiIndexContext: props.indexContextValue
|
|
8449
8395
|
}),
|
|
@@ -8490,8 +8436,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8490
8436
|
|
|
8491
8437
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
8492
8438
|
return {
|
|
8493
|
-
items: transformedItems.slice(0, getLimit
|
|
8494
|
-
currentRefinement: getCurrentRefinement$
|
|
8439
|
+
items: transformedItems.slice(0, getLimit(props)),
|
|
8440
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
8495
8441
|
ais: props.contextValue,
|
|
8496
8442
|
multiIndexContext: props.indexContextValue
|
|
8497
8443
|
}),
|
|
@@ -8501,7 +8447,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8501
8447
|
};
|
|
8502
8448
|
},
|
|
8503
8449
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8504
|
-
return _refine$
|
|
8450
|
+
return _refine$2(props, searchState, nextRefinement, {
|
|
8505
8451
|
ais: props.contextValue,
|
|
8506
8452
|
multiIndexContext: props.indexContextValue
|
|
8507
8453
|
});
|
|
@@ -8510,11 +8456,11 @@ var connectMenu = createConnectorWithContext({
|
|
|
8510
8456
|
return {
|
|
8511
8457
|
facetName: props.attribute,
|
|
8512
8458
|
query: nextRefinement,
|
|
8513
|
-
maxFacetHits: getLimit
|
|
8459
|
+
maxFacetHits: getLimit(props)
|
|
8514
8460
|
};
|
|
8515
8461
|
},
|
|
8516
8462
|
cleanUp: function cleanUp(props, searchState) {
|
|
8517
|
-
return _cleanUp$
|
|
8463
|
+
return _cleanUp$1(props, searchState, {
|
|
8518
8464
|
ais: props.contextValue,
|
|
8519
8465
|
multiIndexContext: props.indexContextValue
|
|
8520
8466
|
});
|
|
@@ -8522,10 +8468,10 @@ var connectMenu = createConnectorWithContext({
|
|
|
8522
8468
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8523
8469
|
var attribute = props.attribute;
|
|
8524
8470
|
searchParameters = searchParameters.setQueryParameters({
|
|
8525
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit
|
|
8471
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
8526
8472
|
});
|
|
8527
8473
|
searchParameters = searchParameters.addDisjunctiveFacet(attribute);
|
|
8528
|
-
var currentRefinement = getCurrentRefinement$
|
|
8474
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
8529
8475
|
ais: props.contextValue,
|
|
8530
8476
|
multiIndexContext: props.indexContextValue
|
|
8531
8477
|
});
|
|
@@ -8537,8 +8483,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8537
8483
|
return searchParameters;
|
|
8538
8484
|
},
|
|
8539
8485
|
getMetadata: function getMetadata(props, searchState) {
|
|
8540
|
-
var id = getId$
|
|
8541
|
-
var currentRefinement = getCurrentRefinement$
|
|
8486
|
+
var id = getId$6(props);
|
|
8487
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
8542
8488
|
ais: props.contextValue,
|
|
8543
8489
|
multiIndexContext: props.indexContextValue
|
|
8544
8490
|
});
|
|
@@ -8552,7 +8498,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8552
8498
|
label: "".concat(props.attribute, ": ").concat(currentRefinement),
|
|
8553
8499
|
attribute: props.attribute,
|
|
8554
8500
|
value: function value(nextState) {
|
|
8555
|
-
return _refine$
|
|
8501
|
+
return _refine$2(props, nextState, '', {
|
|
8556
8502
|
ais: props.contextValue,
|
|
8557
8503
|
multiIndexContext: props.indexContextValue
|
|
8558
8504
|
});
|
|
@@ -8568,17 +8514,14 @@ function _arrayWithHoles(arr) {
|
|
|
8568
8514
|
}
|
|
8569
8515
|
|
|
8570
8516
|
function _iterableToArrayLimit(arr, i) {
|
|
8571
|
-
|
|
8572
|
-
|
|
8573
|
-
if (_i == null) return;
|
|
8517
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
|
8574
8518
|
var _arr = [];
|
|
8575
8519
|
var _n = true;
|
|
8576
8520
|
var _d = false;
|
|
8577
|
-
|
|
8578
|
-
var _s, _e;
|
|
8521
|
+
var _e = undefined;
|
|
8579
8522
|
|
|
8580
8523
|
try {
|
|
8581
|
-
for (_i =
|
|
8524
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
8582
8525
|
_arr.push(_s.value);
|
|
8583
8526
|
|
|
8584
8527
|
if (i && _arr.length === i) break;
|
|
@@ -8629,19 +8572,19 @@ function parseItem(value) {
|
|
|
8629
8572
|
endStr = _value$split2[1];
|
|
8630
8573
|
|
|
8631
8574
|
return {
|
|
8632
|
-
start: startStr.length > 0 ?
|
|
8633
|
-
end: endStr.length > 0 ?
|
|
8575
|
+
start: startStr.length > 0 ? parseInt(startStr, 10) : null,
|
|
8576
|
+
end: endStr.length > 0 ? parseInt(endStr, 10) : null
|
|
8634
8577
|
};
|
|
8635
8578
|
}
|
|
8636
8579
|
|
|
8637
8580
|
var namespace$3 = 'multiRange';
|
|
8638
8581
|
|
|
8639
|
-
function getId$
|
|
8582
|
+
function getId$7(props) {
|
|
8640
8583
|
return props.attribute;
|
|
8641
8584
|
}
|
|
8642
8585
|
|
|
8643
|
-
function getCurrentRefinement$
|
|
8644
|
-
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8586
|
+
function getCurrentRefinement$4(props, searchState, context) {
|
|
8587
|
+
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$7(props)), '');
|
|
8645
8588
|
}
|
|
8646
8589
|
|
|
8647
8590
|
function isRefinementsRangeIncludesInsideItemRange(stats, start, end) {
|
|
@@ -8660,15 +8603,15 @@ function itemHasRefinement(attribute, results, value) {
|
|
|
8660
8603
|
return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end)));
|
|
8661
8604
|
}
|
|
8662
8605
|
|
|
8663
|
-
function _refine$
|
|
8664
|
-
var nextValue = _defineProperty({}, getId$
|
|
8606
|
+
function _refine$3(props, searchState, nextRefinement, context) {
|
|
8607
|
+
var nextValue = _defineProperty({}, getId$7(props), nextRefinement);
|
|
8665
8608
|
|
|
8666
8609
|
var resetPage = true;
|
|
8667
8610
|
return refineValue(searchState, nextValue, context, resetPage, namespace$3);
|
|
8668
8611
|
}
|
|
8669
8612
|
|
|
8670
|
-
function _cleanUp$
|
|
8671
|
-
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8613
|
+
function _cleanUp$2(props, searchState, context) {
|
|
8614
|
+
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$7(props)));
|
|
8672
8615
|
}
|
|
8673
8616
|
/**
|
|
8674
8617
|
* connectNumericMenu connector provides the logic to build a widget that will
|
|
@@ -8691,18 +8634,18 @@ function _cleanUp$5(props, searchState, context) {
|
|
|
8691
8634
|
var connectNumericMenu = createConnectorWithContext({
|
|
8692
8635
|
displayName: 'AlgoliaNumericMenu',
|
|
8693
8636
|
propTypes: {
|
|
8694
|
-
id: PropTypes__default
|
|
8695
|
-
attribute: PropTypes__default
|
|
8696
|
-
items: PropTypes__default
|
|
8697
|
-
label: PropTypes__default
|
|
8698
|
-
start: PropTypes__default
|
|
8699
|
-
end: PropTypes__default
|
|
8637
|
+
id: PropTypes__default.string,
|
|
8638
|
+
attribute: PropTypes__default.string.isRequired,
|
|
8639
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
8640
|
+
label: PropTypes__default.node,
|
|
8641
|
+
start: PropTypes__default.number,
|
|
8642
|
+
end: PropTypes__default.number
|
|
8700
8643
|
})).isRequired,
|
|
8701
|
-
transformItems: PropTypes__default
|
|
8644
|
+
transformItems: PropTypes__default.func
|
|
8702
8645
|
},
|
|
8703
8646
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
8704
8647
|
var attribute = props.attribute;
|
|
8705
|
-
var currentRefinement = getCurrentRefinement$
|
|
8648
|
+
var currentRefinement = getCurrentRefinement$4(props, searchState, {
|
|
8706
8649
|
ais: props.contextValue,
|
|
8707
8650
|
multiIndexContext: props.indexContextValue
|
|
8708
8651
|
});
|
|
@@ -8716,11 +8659,11 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8716
8659
|
label: item.label,
|
|
8717
8660
|
value: value,
|
|
8718
8661
|
isRefined: value === currentRefinement,
|
|
8719
|
-
noRefinement: results ? itemHasRefinement(getId$
|
|
8662
|
+
noRefinement: results ? itemHasRefinement(getId$7(props), results, value) : false
|
|
8720
8663
|
};
|
|
8721
8664
|
});
|
|
8722
8665
|
var stats = results && results.getFacetByName(attribute) ? results.getFacetStats(attribute) : null;
|
|
8723
|
-
var refinedItem = find
|
|
8666
|
+
var refinedItem = find(items, function (item) {
|
|
8724
8667
|
return item.isRefined === true;
|
|
8725
8668
|
});
|
|
8726
8669
|
|
|
@@ -8745,13 +8688,13 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8745
8688
|
};
|
|
8746
8689
|
},
|
|
8747
8690
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8748
|
-
return _refine$
|
|
8691
|
+
return _refine$3(props, searchState, nextRefinement, {
|
|
8749
8692
|
ais: props.contextValue,
|
|
8750
8693
|
multiIndexContext: props.indexContextValue
|
|
8751
8694
|
});
|
|
8752
8695
|
},
|
|
8753
8696
|
cleanUp: function cleanUp(props, searchState) {
|
|
8754
|
-
return _cleanUp$
|
|
8697
|
+
return _cleanUp$2(props, searchState, {
|
|
8755
8698
|
ais: props.contextValue,
|
|
8756
8699
|
multiIndexContext: props.indexContextValue
|
|
8757
8700
|
});
|
|
@@ -8759,7 +8702,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8759
8702
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8760
8703
|
var attribute = props.attribute;
|
|
8761
8704
|
|
|
8762
|
-
var _parseItem = parseItem(getCurrentRefinement$
|
|
8705
|
+
var _parseItem = parseItem(getCurrentRefinement$4(props, searchState, {
|
|
8763
8706
|
ais: props.contextValue,
|
|
8764
8707
|
multiIndexContext: props.indexContextValue
|
|
8765
8708
|
})),
|
|
@@ -8779,8 +8722,8 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8779
8722
|
return searchParameters;
|
|
8780
8723
|
},
|
|
8781
8724
|
getMetadata: function getMetadata(props, searchState) {
|
|
8782
|
-
var id = getId$
|
|
8783
|
-
var value = getCurrentRefinement$
|
|
8725
|
+
var id = getId$7(props);
|
|
8726
|
+
var value = getCurrentRefinement$4(props, searchState, {
|
|
8784
8727
|
ais: props.contextValue,
|
|
8785
8728
|
multiIndexContext: props.indexContextValue
|
|
8786
8729
|
});
|
|
@@ -8791,7 +8734,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8791
8734
|
});
|
|
8792
8735
|
|
|
8793
8736
|
if (value !== '') {
|
|
8794
|
-
var _find = find
|
|
8737
|
+
var _find = find(props.items, function (item) {
|
|
8795
8738
|
return stringifyItem(item) === value;
|
|
8796
8739
|
}),
|
|
8797
8740
|
label = _find.label;
|
|
@@ -8801,7 +8744,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8801
8744
|
attribute: props.attribute,
|
|
8802
8745
|
currentRefinement: label,
|
|
8803
8746
|
value: function value(nextState) {
|
|
8804
|
-
return _refine$
|
|
8747
|
+
return _refine$3(props, nextState, '', {
|
|
8805
8748
|
ais: props.contextValue,
|
|
8806
8749
|
multiIndexContext: props.indexContextValue
|
|
8807
8750
|
});
|
|
@@ -8817,12 +8760,12 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8817
8760
|
}
|
|
8818
8761
|
});
|
|
8819
8762
|
|
|
8820
|
-
function getId$
|
|
8763
|
+
function getId$8() {
|
|
8821
8764
|
return 'page';
|
|
8822
8765
|
}
|
|
8823
8766
|
|
|
8824
|
-
function getCurrentRefinement$
|
|
8825
|
-
var id = getId$
|
|
8767
|
+
function getCurrentRefinement$5(props, searchState, context) {
|
|
8768
|
+
var id = getId$8();
|
|
8826
8769
|
var page = 1;
|
|
8827
8770
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8828
8771
|
|
|
@@ -8833,8 +8776,8 @@ function getCurrentRefinement$6(props, searchState, context) {
|
|
|
8833
8776
|
return currentRefinement;
|
|
8834
8777
|
}
|
|
8835
8778
|
|
|
8836
|
-
function _refine$
|
|
8837
|
-
var id = getId$
|
|
8779
|
+
function _refine$4(props, searchState, nextPage, context) {
|
|
8780
|
+
var id = getId$8();
|
|
8838
8781
|
|
|
8839
8782
|
var nextValue = _defineProperty({}, id, nextPage);
|
|
8840
8783
|
|
|
@@ -8874,7 +8817,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8874
8817
|
var nbPages = results.nbPages;
|
|
8875
8818
|
return {
|
|
8876
8819
|
nbPages: nbPages,
|
|
8877
|
-
currentRefinement: getCurrentRefinement$
|
|
8820
|
+
currentRefinement: getCurrentRefinement$5(props, searchState, {
|
|
8878
8821
|
ais: props.contextValue,
|
|
8879
8822
|
multiIndexContext: props.indexContextValue
|
|
8880
8823
|
}),
|
|
@@ -8882,7 +8825,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8882
8825
|
};
|
|
8883
8826
|
},
|
|
8884
8827
|
refine: function refine(props, searchState, nextPage) {
|
|
8885
|
-
return _refine$
|
|
8828
|
+
return _refine$4(props, searchState, nextPage, {
|
|
8886
8829
|
ais: props.contextValue,
|
|
8887
8830
|
multiIndexContext: props.indexContextValue
|
|
8888
8831
|
});
|
|
@@ -8891,17 +8834,17 @@ var connectPagination = createConnectorWithContext({
|
|
|
8891
8834
|
return cleanUpValue(searchState, {
|
|
8892
8835
|
ais: props.contextValue,
|
|
8893
8836
|
multiIndexContext: props.indexContextValue
|
|
8894
|
-
}, getId$
|
|
8837
|
+
}, getId$8());
|
|
8895
8838
|
},
|
|
8896
8839
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8897
|
-
return searchParameters.setPage(getCurrentRefinement$
|
|
8840
|
+
return searchParameters.setPage(getCurrentRefinement$5(props, searchState, {
|
|
8898
8841
|
ais: props.contextValue,
|
|
8899
8842
|
multiIndexContext: props.indexContextValue
|
|
8900
8843
|
}) - 1);
|
|
8901
8844
|
},
|
|
8902
8845
|
getMetadata: function getMetadata() {
|
|
8903
8846
|
return {
|
|
8904
|
-
id: getId$
|
|
8847
|
+
id: getId$8()
|
|
8905
8848
|
};
|
|
8906
8849
|
}
|
|
8907
8850
|
});
|
|
@@ -8947,11 +8890,11 @@ var connectPoweredBy = createConnectorWithContext({
|
|
|
8947
8890
|
* @providedPropType {number} precision - Number of digits after decimal point to use.
|
|
8948
8891
|
*/
|
|
8949
8892
|
|
|
8950
|
-
function getId$
|
|
8893
|
+
function getId$9(props) {
|
|
8951
8894
|
return props.attribute;
|
|
8952
8895
|
}
|
|
8953
8896
|
|
|
8954
|
-
var namespace$
|
|
8897
|
+
var namespace$4 = 'range';
|
|
8955
8898
|
|
|
8956
8899
|
function getCurrentRange(boundaries, stats, precision) {
|
|
8957
8900
|
var pow = Math.pow(10, precision);
|
|
@@ -8981,8 +8924,8 @@ function getCurrentRange(boundaries, stats, precision) {
|
|
|
8981
8924
|
};
|
|
8982
8925
|
}
|
|
8983
8926
|
|
|
8984
|
-
function getCurrentRefinement$
|
|
8985
|
-
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8927
|
+
function getCurrentRefinement$6(props, searchState, currentRange, context) {
|
|
8928
|
+
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)), {}),
|
|
8986
8929
|
min = _getCurrentRefinement.min,
|
|
8987
8930
|
max = _getCurrentRefinement.max;
|
|
8988
8931
|
|
|
@@ -9048,7 +8991,7 @@ function nextValueForRefinement(hasBound, isReset, range, value) {
|
|
|
9048
8991
|
return next;
|
|
9049
8992
|
}
|
|
9050
8993
|
|
|
9051
|
-
function _refine$
|
|
8994
|
+
function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
9052
8995
|
var nextMin = nextRefinement.min,
|
|
9053
8996
|
nextMax = nextRefinement.max;
|
|
9054
8997
|
var currentMinRange = currentRange.min,
|
|
@@ -9072,7 +9015,7 @@ function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
|
9072
9015
|
throw Error("You can't provide max value greater than range.");
|
|
9073
9016
|
}
|
|
9074
9017
|
|
|
9075
|
-
var id = getId$
|
|
9018
|
+
var id = getId$9(props);
|
|
9076
9019
|
var resetPage = true;
|
|
9077
9020
|
|
|
9078
9021
|
var nextValue = _defineProperty({}, id, {
|
|
@@ -9080,27 +9023,27 @@ function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
|
9080
9023
|
max: nextValueForRefinement(props.max !== undefined, isMaxReset, currentMaxRange, nextMaxAsNumber)
|
|
9081
9024
|
});
|
|
9082
9025
|
|
|
9083
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9026
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$4);
|
|
9084
9027
|
}
|
|
9085
9028
|
|
|
9086
|
-
function _cleanUp$
|
|
9087
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9029
|
+
function _cleanUp$3(props, searchState, context) {
|
|
9030
|
+
return cleanUpValue(searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)));
|
|
9088
9031
|
}
|
|
9089
9032
|
|
|
9090
9033
|
var connectRange = createConnectorWithContext({
|
|
9091
9034
|
displayName: 'AlgoliaRange',
|
|
9092
9035
|
propTypes: {
|
|
9093
|
-
id: PropTypes__default
|
|
9094
|
-
attribute: PropTypes__default
|
|
9095
|
-
defaultRefinement: PropTypes__default
|
|
9096
|
-
min: PropTypes__default
|
|
9097
|
-
max: PropTypes__default
|
|
9036
|
+
id: PropTypes__default.string,
|
|
9037
|
+
attribute: PropTypes__default.string.isRequired,
|
|
9038
|
+
defaultRefinement: PropTypes__default.shape({
|
|
9039
|
+
min: PropTypes__default.number,
|
|
9040
|
+
max: PropTypes__default.number
|
|
9098
9041
|
}),
|
|
9099
|
-
min: PropTypes__default
|
|
9100
|
-
max: PropTypes__default
|
|
9101
|
-
precision: PropTypes__default
|
|
9102
|
-
header: PropTypes__default
|
|
9103
|
-
footer: PropTypes__default
|
|
9042
|
+
min: PropTypes__default.number,
|
|
9043
|
+
max: PropTypes__default.number,
|
|
9044
|
+
precision: PropTypes__default.number,
|
|
9045
|
+
header: PropTypes__default.node,
|
|
9046
|
+
footer: PropTypes__default.node
|
|
9104
9047
|
},
|
|
9105
9048
|
defaultProps: {
|
|
9106
9049
|
precision: 0
|
|
@@ -9139,7 +9082,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9139
9082
|
min: rangeMin,
|
|
9140
9083
|
max: rangeMax
|
|
9141
9084
|
};
|
|
9142
|
-
var currentRefinement = getCurrentRefinement$
|
|
9085
|
+
var currentRefinement = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9143
9086
|
ais: props.contextValue,
|
|
9144
9087
|
multiIndexContext: props.indexContextValue
|
|
9145
9088
|
});
|
|
@@ -9153,13 +9096,13 @@ var connectRange = createConnectorWithContext({
|
|
|
9153
9096
|
};
|
|
9154
9097
|
},
|
|
9155
9098
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9156
|
-
return _refine$
|
|
9099
|
+
return _refine$5(props, searchState, nextRefinement, this._currentRange, {
|
|
9157
9100
|
ais: props.contextValue,
|
|
9158
9101
|
multiIndexContext: props.indexContextValue
|
|
9159
9102
|
});
|
|
9160
9103
|
},
|
|
9161
9104
|
cleanUp: function cleanUp(props, searchState) {
|
|
9162
|
-
return _cleanUp$
|
|
9105
|
+
return _cleanUp$3(props, searchState, {
|
|
9163
9106
|
ais: props.contextValue,
|
|
9164
9107
|
multiIndexContext: props.indexContextValue
|
|
9165
9108
|
});
|
|
@@ -9167,7 +9110,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9167
9110
|
getSearchParameters: function getSearchParameters(params, props, searchState) {
|
|
9168
9111
|
var attribute = props.attribute;
|
|
9169
9112
|
|
|
9170
|
-
var _getCurrentRefinement2 = getCurrentRefinement$
|
|
9113
|
+
var _getCurrentRefinement2 = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9171
9114
|
ais: props.contextValue,
|
|
9172
9115
|
multiIndexContext: props.indexContextValue
|
|
9173
9116
|
}),
|
|
@@ -9193,7 +9136,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9193
9136
|
minRange = _this$_currentRange.min,
|
|
9194
9137
|
maxRange = _this$_currentRange.max;
|
|
9195
9138
|
|
|
9196
|
-
var _getCurrentRefinement3 = getCurrentRefinement$
|
|
9139
|
+
var _getCurrentRefinement3 = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9197
9140
|
ais: props.contextValue,
|
|
9198
9141
|
multiIndexContext: props.indexContextValue
|
|
9199
9142
|
}),
|
|
@@ -9212,7 +9155,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9212
9155
|
label: fragments.join(''),
|
|
9213
9156
|
attribute: props.attribute,
|
|
9214
9157
|
value: function value(nextState) {
|
|
9215
|
-
return _refine$
|
|
9158
|
+
return _refine$5(props, nextState, {}, _this._currentRange, {
|
|
9216
9159
|
ais: props.contextValue,
|
|
9217
9160
|
multiIndexContext: props.indexContextValue
|
|
9218
9161
|
});
|
|
@@ -9228,7 +9171,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9228
9171
|
}
|
|
9229
9172
|
|
|
9230
9173
|
return {
|
|
9231
|
-
id: getId$
|
|
9174
|
+
id: getId$9(props),
|
|
9232
9175
|
index: getIndexId({
|
|
9233
9176
|
ais: props.contextValue,
|
|
9234
9177
|
multiIndexContext: props.indexContextValue
|
|
@@ -9238,14 +9181,14 @@ var connectRange = createConnectorWithContext({
|
|
|
9238
9181
|
}
|
|
9239
9182
|
});
|
|
9240
9183
|
|
|
9241
|
-
var namespace$
|
|
9184
|
+
var namespace$5 = 'refinementList';
|
|
9242
9185
|
|
|
9243
|
-
function getId$
|
|
9186
|
+
function getId$a(props) {
|
|
9244
9187
|
return props.attribute;
|
|
9245
9188
|
}
|
|
9246
9189
|
|
|
9247
|
-
function getCurrentRefinement$
|
|
9248
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
9190
|
+
function getCurrentRefinement$7(props, searchState, context) {
|
|
9191
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$5, ".").concat(getId$a(props)), []);
|
|
9249
9192
|
|
|
9250
9193
|
if (typeof currentRefinement !== 'string') {
|
|
9251
9194
|
return currentRefinement;
|
|
@@ -9258,8 +9201,8 @@ function getCurrentRefinement$4(props, searchState, context) {
|
|
|
9258
9201
|
return [];
|
|
9259
9202
|
}
|
|
9260
9203
|
|
|
9261
|
-
function getValue(name, props, searchState, context) {
|
|
9262
|
-
var currentRefinement = getCurrentRefinement$
|
|
9204
|
+
function getValue$2(name, props, searchState, context) {
|
|
9205
|
+
var currentRefinement = getCurrentRefinement$7(props, searchState, context);
|
|
9263
9206
|
var isAnewValue = currentRefinement.indexOf(name) === -1;
|
|
9264
9207
|
var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates
|
|
9265
9208
|
: currentRefinement.filter(function (selectedValue) {
|
|
@@ -9269,15 +9212,15 @@ function getValue(name, props, searchState, context) {
|
|
|
9269
9212
|
return nextRefinement;
|
|
9270
9213
|
}
|
|
9271
9214
|
|
|
9272
|
-
function getLimit(_ref) {
|
|
9215
|
+
function getLimit$1(_ref) {
|
|
9273
9216
|
var showMore = _ref.showMore,
|
|
9274
9217
|
limit = _ref.limit,
|
|
9275
9218
|
showMoreLimit = _ref.showMoreLimit;
|
|
9276
9219
|
return showMore ? showMoreLimit : limit;
|
|
9277
9220
|
}
|
|
9278
9221
|
|
|
9279
|
-
function _refine$
|
|
9280
|
-
var id = getId$
|
|
9222
|
+
function _refine$6(props, searchState, nextRefinement, context) {
|
|
9223
|
+
var id = getId$a(props); // Setting the value to an empty string ensures that it is persisted in
|
|
9281
9224
|
// the URL as an empty value.
|
|
9282
9225
|
// This is necessary in the case where `defaultRefinement` contains one
|
|
9283
9226
|
// item and we try to deselect it. `nextSelected` would be an empty array,
|
|
@@ -9288,11 +9231,11 @@ function _refine$3(props, searchState, nextRefinement, context) {
|
|
|
9288
9231
|
var nextValue = _defineProperty({}, id, nextRefinement.length > 0 ? nextRefinement : '');
|
|
9289
9232
|
|
|
9290
9233
|
var resetPage = true;
|
|
9291
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9234
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$5);
|
|
9292
9235
|
}
|
|
9293
9236
|
|
|
9294
|
-
function _cleanUp$
|
|
9295
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9237
|
+
function _cleanUp$4(props, searchState, context) {
|
|
9238
|
+
return cleanUpValue(searchState, context, "".concat(namespace$5, ".").concat(getId$a(props)));
|
|
9296
9239
|
}
|
|
9297
9240
|
/**
|
|
9298
9241
|
* connectRefinementList connector provides the logic to build a widget that will
|
|
@@ -9319,19 +9262,19 @@ function _cleanUp$3(props, searchState, context) {
|
|
|
9319
9262
|
*/
|
|
9320
9263
|
|
|
9321
9264
|
|
|
9322
|
-
var sortBy = ['isRefined', 'count:desc', 'name:asc'];
|
|
9265
|
+
var sortBy$1 = ['isRefined', 'count:desc', 'name:asc'];
|
|
9323
9266
|
var connectRefinementList = createConnectorWithContext({
|
|
9324
9267
|
displayName: 'AlgoliaRefinementList',
|
|
9325
9268
|
propTypes: {
|
|
9326
|
-
id: PropTypes__default
|
|
9327
|
-
attribute: PropTypes__default
|
|
9328
|
-
operator: PropTypes__default
|
|
9329
|
-
showMore: PropTypes__default
|
|
9330
|
-
limit: PropTypes__default
|
|
9331
|
-
showMoreLimit: PropTypes__default
|
|
9332
|
-
defaultRefinement: PropTypes__default
|
|
9333
|
-
searchable: PropTypes__default
|
|
9334
|
-
transformItems: PropTypes__default
|
|
9269
|
+
id: PropTypes__default.string,
|
|
9270
|
+
attribute: PropTypes__default.string.isRequired,
|
|
9271
|
+
operator: PropTypes__default.oneOf(['and', 'or']),
|
|
9272
|
+
showMore: PropTypes__default.bool,
|
|
9273
|
+
limit: PropTypes__default.number,
|
|
9274
|
+
showMoreLimit: PropTypes__default.number,
|
|
9275
|
+
defaultRefinement: PropTypes__default.arrayOf(PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number])),
|
|
9276
|
+
searchable: PropTypes__default.bool,
|
|
9277
|
+
transformItems: PropTypes__default.func
|
|
9335
9278
|
},
|
|
9336
9279
|
defaultProps: {
|
|
9337
9280
|
operator: 'or',
|
|
@@ -9357,7 +9300,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9357
9300
|
if (!canRefine) {
|
|
9358
9301
|
return {
|
|
9359
9302
|
items: [],
|
|
9360
|
-
currentRefinement: getCurrentRefinement$
|
|
9303
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, {
|
|
9361
9304
|
ais: props.contextValue,
|
|
9362
9305
|
multiIndexContext: props.indexContextValue
|
|
9363
9306
|
}),
|
|
@@ -9370,7 +9313,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9370
9313
|
var items = isFromSearch ? searchForFacetValuesResults[attribute].map(function (v) {
|
|
9371
9314
|
return {
|
|
9372
9315
|
label: v.value,
|
|
9373
|
-
value: getValue(v.value, props, searchState, {
|
|
9316
|
+
value: getValue$2(v.value, props, searchState, {
|
|
9374
9317
|
ais: props.contextValue,
|
|
9375
9318
|
multiIndexContext: props.indexContextValue
|
|
9376
9319
|
}),
|
|
@@ -9383,11 +9326,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9383
9326
|
isRefined: v.isRefined
|
|
9384
9327
|
};
|
|
9385
9328
|
}) : results.getFacetValues(attribute, {
|
|
9386
|
-
sortBy: sortBy
|
|
9329
|
+
sortBy: sortBy$1
|
|
9387
9330
|
}).map(function (v) {
|
|
9388
9331
|
return {
|
|
9389
9332
|
label: v.name,
|
|
9390
|
-
value: getValue(v.name, props, searchState, {
|
|
9333
|
+
value: getValue$2(v.name, props, searchState, {
|
|
9391
9334
|
ais: props.contextValue,
|
|
9392
9335
|
multiIndexContext: props.indexContextValue
|
|
9393
9336
|
}),
|
|
@@ -9397,8 +9340,8 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9397
9340
|
});
|
|
9398
9341
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
9399
9342
|
return {
|
|
9400
|
-
items: transformedItems.slice(0, getLimit(props)),
|
|
9401
|
-
currentRefinement: getCurrentRefinement$
|
|
9343
|
+
items: transformedItems.slice(0, getLimit$1(props)),
|
|
9344
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, {
|
|
9402
9345
|
ais: props.contextValue,
|
|
9403
9346
|
multiIndexContext: props.indexContextValue
|
|
9404
9347
|
}),
|
|
@@ -9408,7 +9351,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9408
9351
|
};
|
|
9409
9352
|
},
|
|
9410
9353
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9411
|
-
return _refine$
|
|
9354
|
+
return _refine$6(props, searchState, nextRefinement, {
|
|
9412
9355
|
ais: props.contextValue,
|
|
9413
9356
|
multiIndexContext: props.indexContextValue
|
|
9414
9357
|
});
|
|
@@ -9417,11 +9360,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9417
9360
|
return {
|
|
9418
9361
|
facetName: props.attribute,
|
|
9419
9362
|
query: nextRefinement,
|
|
9420
|
-
maxFacetHits: getLimit(props)
|
|
9363
|
+
maxFacetHits: getLimit$1(props)
|
|
9421
9364
|
};
|
|
9422
9365
|
},
|
|
9423
9366
|
cleanUp: function cleanUp(props, searchState) {
|
|
9424
|
-
return _cleanUp$
|
|
9367
|
+
return _cleanUp$4(props, searchState, {
|
|
9425
9368
|
ais: props.contextValue,
|
|
9426
9369
|
multiIndexContext: props.indexContextValue
|
|
9427
9370
|
});
|
|
@@ -9432,10 +9375,10 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9432
9375
|
var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet';
|
|
9433
9376
|
var addRefinementKey = "".concat(addKey, "Refinement");
|
|
9434
9377
|
searchParameters = searchParameters.setQueryParameters({
|
|
9435
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
9378
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit$1(props))
|
|
9436
9379
|
});
|
|
9437
9380
|
searchParameters = searchParameters[addKey](attribute);
|
|
9438
|
-
return getCurrentRefinement$
|
|
9381
|
+
return getCurrentRefinement$7(props, searchState, {
|
|
9439
9382
|
ais: props.contextValue,
|
|
9440
9383
|
multiIndexContext: props.indexContextValue
|
|
9441
9384
|
}).reduce(function (res, val) {
|
|
@@ -9443,7 +9386,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9443
9386
|
}, searchParameters);
|
|
9444
9387
|
},
|
|
9445
9388
|
getMetadata: function getMetadata(props, searchState) {
|
|
9446
|
-
var id = getId$
|
|
9389
|
+
var id = getId$a(props);
|
|
9447
9390
|
var context = {
|
|
9448
9391
|
ais: props.contextValue,
|
|
9449
9392
|
multiIndexContext: props.indexContextValue
|
|
@@ -9451,21 +9394,21 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9451
9394
|
return {
|
|
9452
9395
|
id: id,
|
|
9453
9396
|
index: getIndexId(context),
|
|
9454
|
-
items: getCurrentRefinement$
|
|
9397
|
+
items: getCurrentRefinement$7(props, searchState, context).length > 0 ? [{
|
|
9455
9398
|
attribute: props.attribute,
|
|
9456
9399
|
label: "".concat(props.attribute, ": "),
|
|
9457
|
-
currentRefinement: getCurrentRefinement$
|
|
9400
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, context),
|
|
9458
9401
|
value: function value(nextState) {
|
|
9459
|
-
return _refine$
|
|
9402
|
+
return _refine$6(props, nextState, [], context);
|
|
9460
9403
|
},
|
|
9461
|
-
items: getCurrentRefinement$
|
|
9404
|
+
items: getCurrentRefinement$7(props, searchState, context).map(function (item) {
|
|
9462
9405
|
return {
|
|
9463
9406
|
label: "".concat(item),
|
|
9464
9407
|
value: function value(nextState) {
|
|
9465
|
-
var nextSelectedItems = getCurrentRefinement$
|
|
9408
|
+
var nextSelectedItems = getCurrentRefinement$7(props, nextState, context).filter(function (other) {
|
|
9466
9409
|
return other !== item;
|
|
9467
9410
|
});
|
|
9468
|
-
return _refine$
|
|
9411
|
+
return _refine$6(props, searchState, nextSelectedItems, context);
|
|
9469
9412
|
}
|
|
9470
9413
|
};
|
|
9471
9414
|
})
|
|
@@ -9487,7 +9430,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9487
9430
|
var connectScrollTo = createConnectorWithContext({
|
|
9488
9431
|
displayName: 'AlgoliaScrollTo',
|
|
9489
9432
|
propTypes: {
|
|
9490
|
-
scrollOn: PropTypes__default
|
|
9433
|
+
scrollOn: PropTypes__default.string
|
|
9491
9434
|
},
|
|
9492
9435
|
defaultProps: {
|
|
9493
9436
|
scrollOn: 'page'
|
|
@@ -9524,7 +9467,7 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9524
9467
|
// See: https://github.com/algolia/react-instantsearch/issues/164
|
|
9525
9468
|
|
|
9526
9469
|
|
|
9527
|
-
var cleanedSearchState = omit
|
|
9470
|
+
var cleanedSearchState = omit(searchState, ['configure', id]);
|
|
9528
9471
|
var hasNotChanged = shallowEqual(this._prevSearchState, cleanedSearchState);
|
|
9529
9472
|
this._prevSearchState = cleanedSearchState;
|
|
9530
9473
|
return {
|
|
@@ -9534,12 +9477,12 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9534
9477
|
}
|
|
9535
9478
|
});
|
|
9536
9479
|
|
|
9537
|
-
function getId$
|
|
9480
|
+
function getId$b() {
|
|
9538
9481
|
return 'query';
|
|
9539
9482
|
}
|
|
9540
9483
|
|
|
9541
|
-
function getCurrentRefinement$
|
|
9542
|
-
var id = getId$
|
|
9484
|
+
function getCurrentRefinement$8(props, searchState, context) {
|
|
9485
|
+
var id = getId$b();
|
|
9543
9486
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9544
9487
|
|
|
9545
9488
|
if (currentRefinement) {
|
|
@@ -9549,8 +9492,8 @@ function getCurrentRefinement$3(props, searchState, context) {
|
|
|
9549
9492
|
return '';
|
|
9550
9493
|
}
|
|
9551
9494
|
|
|
9552
|
-
function _refine$
|
|
9553
|
-
var id = getId$
|
|
9495
|
+
function _refine$7(props, searchState, nextRefinement, context) {
|
|
9496
|
+
var id = getId$b();
|
|
9554
9497
|
|
|
9555
9498
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9556
9499
|
|
|
@@ -9558,8 +9501,8 @@ function _refine$2(props, searchState, nextRefinement, context) {
|
|
|
9558
9501
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9559
9502
|
}
|
|
9560
9503
|
|
|
9561
|
-
function _cleanUp$
|
|
9562
|
-
return cleanUpValue(searchState, context, getId$
|
|
9504
|
+
function _cleanUp$5(props, searchState, context) {
|
|
9505
|
+
return cleanUpValue(searchState, context, getId$b());
|
|
9563
9506
|
}
|
|
9564
9507
|
/**
|
|
9565
9508
|
* connectSearchBox connector provides the logic to build a widget that will
|
|
@@ -9576,11 +9519,11 @@ function _cleanUp$2(props, searchState, context) {
|
|
|
9576
9519
|
var connectSearchBox = createConnectorWithContext({
|
|
9577
9520
|
displayName: 'AlgoliaSearchBox',
|
|
9578
9521
|
propTypes: {
|
|
9579
|
-
defaultRefinement: PropTypes__default
|
|
9522
|
+
defaultRefinement: PropTypes__default.string
|
|
9580
9523
|
},
|
|
9581
9524
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
9582
9525
|
return {
|
|
9583
|
-
currentRefinement: getCurrentRefinement$
|
|
9526
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
9584
9527
|
ais: props.contextValue,
|
|
9585
9528
|
multiIndexContext: props.indexContextValue
|
|
9586
9529
|
}),
|
|
@@ -9588,26 +9531,26 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9588
9531
|
};
|
|
9589
9532
|
},
|
|
9590
9533
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9591
|
-
return _refine$
|
|
9534
|
+
return _refine$7(props, searchState, nextRefinement, {
|
|
9592
9535
|
ais: props.contextValue,
|
|
9593
9536
|
multiIndexContext: props.indexContextValue
|
|
9594
9537
|
});
|
|
9595
9538
|
},
|
|
9596
9539
|
cleanUp: function cleanUp(props, searchState) {
|
|
9597
|
-
return _cleanUp$
|
|
9540
|
+
return _cleanUp$5(props, searchState, {
|
|
9598
9541
|
ais: props.contextValue,
|
|
9599
9542
|
multiIndexContext: props.indexContextValue
|
|
9600
9543
|
});
|
|
9601
9544
|
},
|
|
9602
9545
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9603
|
-
return searchParameters.setQuery(getCurrentRefinement$
|
|
9546
|
+
return searchParameters.setQuery(getCurrentRefinement$8(props, searchState, {
|
|
9604
9547
|
ais: props.contextValue,
|
|
9605
9548
|
multiIndexContext: props.indexContextValue
|
|
9606
9549
|
}));
|
|
9607
9550
|
},
|
|
9608
9551
|
getMetadata: function getMetadata(props, searchState) {
|
|
9609
|
-
var id = getId$
|
|
9610
|
-
var currentRefinement = getCurrentRefinement$
|
|
9552
|
+
var id = getId$b();
|
|
9553
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
9611
9554
|
ais: props.contextValue,
|
|
9612
9555
|
multiIndexContext: props.indexContextValue
|
|
9613
9556
|
});
|
|
@@ -9620,7 +9563,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9620
9563
|
items: currentRefinement === null ? [] : [{
|
|
9621
9564
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9622
9565
|
value: function value(nextState) {
|
|
9623
|
-
return _refine$
|
|
9566
|
+
return _refine$7(props, nextState, '', {
|
|
9624
9567
|
ais: props.contextValue,
|
|
9625
9568
|
multiIndexContext: props.indexContextValue
|
|
9626
9569
|
});
|
|
@@ -9631,12 +9574,12 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9631
9574
|
}
|
|
9632
9575
|
});
|
|
9633
9576
|
|
|
9634
|
-
function getId$
|
|
9577
|
+
function getId$c() {
|
|
9635
9578
|
return 'relevancyStrictness';
|
|
9636
9579
|
}
|
|
9637
9580
|
|
|
9638
|
-
function getCurrentRefinement$
|
|
9639
|
-
var id = getId$
|
|
9581
|
+
function getCurrentRefinement$9(props, searchState, context) {
|
|
9582
|
+
var id = getId$c();
|
|
9640
9583
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id);
|
|
9641
9584
|
return currentRefinement;
|
|
9642
9585
|
}
|
|
@@ -9662,13 +9605,13 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9662
9605
|
};
|
|
9663
9606
|
},
|
|
9664
9607
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9665
|
-
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$
|
|
9608
|
+
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$9(props, searchState, {
|
|
9666
9609
|
ais: props.contextValue,
|
|
9667
9610
|
multiIndexContext: props.indexContextValue
|
|
9668
9611
|
}));
|
|
9669
9612
|
},
|
|
9670
9613
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9671
|
-
var nextValue = _defineProperty({}, getId$
|
|
9614
|
+
var nextValue = _defineProperty({}, getId$c(), nextRefinement);
|
|
9672
9615
|
|
|
9673
9616
|
var resetPage = true;
|
|
9674
9617
|
return refineValue(searchState, nextValue, {
|
|
@@ -9678,12 +9621,12 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9678
9621
|
}
|
|
9679
9622
|
});
|
|
9680
9623
|
|
|
9681
|
-
function getId$
|
|
9624
|
+
function getId$d() {
|
|
9682
9625
|
return 'sortBy';
|
|
9683
9626
|
}
|
|
9684
9627
|
|
|
9685
|
-
function getCurrentRefinement$
|
|
9686
|
-
var id = getId$
|
|
9628
|
+
function getCurrentRefinement$a(props, searchState, context) {
|
|
9629
|
+
var id = getId$d();
|
|
9687
9630
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
9688
9631
|
|
|
9689
9632
|
if (currentRefinement) {
|
|
@@ -9712,15 +9655,15 @@ function getCurrentRefinement$1(props, searchState, context) {
|
|
|
9712
9655
|
var connectSortBy = createConnectorWithContext({
|
|
9713
9656
|
displayName: 'AlgoliaSortBy',
|
|
9714
9657
|
propTypes: {
|
|
9715
|
-
defaultRefinement: PropTypes__default
|
|
9716
|
-
items: PropTypes__default
|
|
9717
|
-
label: PropTypes__default
|
|
9718
|
-
value: PropTypes__default
|
|
9658
|
+
defaultRefinement: PropTypes__default.string,
|
|
9659
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
9660
|
+
label: PropTypes__default.string,
|
|
9661
|
+
value: PropTypes__default.string.isRequired
|
|
9719
9662
|
})).isRequired,
|
|
9720
|
-
transformItems: PropTypes__default
|
|
9663
|
+
transformItems: PropTypes__default.func
|
|
9721
9664
|
},
|
|
9722
9665
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
9723
|
-
var currentRefinement = getCurrentRefinement$
|
|
9666
|
+
var currentRefinement = getCurrentRefinement$a(props, searchState, {
|
|
9724
9667
|
ais: props.contextValue,
|
|
9725
9668
|
multiIndexContext: props.indexContextValue
|
|
9726
9669
|
});
|
|
@@ -9737,7 +9680,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9737
9680
|
};
|
|
9738
9681
|
},
|
|
9739
9682
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9740
|
-
var id = getId$
|
|
9683
|
+
var id = getId$d();
|
|
9741
9684
|
|
|
9742
9685
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9743
9686
|
|
|
@@ -9751,10 +9694,10 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9751
9694
|
return cleanUpValue(searchState, {
|
|
9752
9695
|
ais: props.contextValue,
|
|
9753
9696
|
multiIndexContext: props.indexContextValue
|
|
9754
|
-
}, getId$
|
|
9697
|
+
}, getId$d());
|
|
9755
9698
|
},
|
|
9756
9699
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9757
|
-
var selectedIndex = getCurrentRefinement$
|
|
9700
|
+
var selectedIndex = getCurrentRefinement$a(props, searchState, {
|
|
9758
9701
|
ais: props.contextValue,
|
|
9759
9702
|
multiIndexContext: props.indexContextValue
|
|
9760
9703
|
});
|
|
@@ -9762,7 +9705,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9762
9705
|
},
|
|
9763
9706
|
getMetadata: function getMetadata() {
|
|
9764
9707
|
return {
|
|
9765
|
-
id: getId$
|
|
9708
|
+
id: getId$d()
|
|
9766
9709
|
};
|
|
9767
9710
|
}
|
|
9768
9711
|
});
|
|
@@ -9798,15 +9741,15 @@ var connectStats = createConnectorWithContext({
|
|
|
9798
9741
|
}
|
|
9799
9742
|
});
|
|
9800
9743
|
|
|
9801
|
-
function getId$
|
|
9744
|
+
function getId$e(props) {
|
|
9802
9745
|
return props.attribute;
|
|
9803
9746
|
}
|
|
9804
9747
|
|
|
9805
|
-
var namespace = 'toggle';
|
|
9748
|
+
var namespace$6 = 'toggle';
|
|
9806
9749
|
var falsyStrings = ['0', 'false', 'null', 'undefined'];
|
|
9807
9750
|
|
|
9808
|
-
function getCurrentRefinement(props, searchState, context) {
|
|
9809
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace, ".").concat(getId$
|
|
9751
|
+
function getCurrentRefinement$b(props, searchState, context) {
|
|
9752
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$6, ".").concat(getId$e(props)), false);
|
|
9810
9753
|
|
|
9811
9754
|
if (falsyStrings.indexOf(currentRefinement) !== -1) {
|
|
9812
9755
|
return false;
|
|
@@ -9815,17 +9758,17 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
9815
9758
|
return Boolean(currentRefinement);
|
|
9816
9759
|
}
|
|
9817
9760
|
|
|
9818
|
-
function _refine$
|
|
9819
|
-
var id = getId$
|
|
9761
|
+
function _refine$8(props, searchState, nextRefinement, context) {
|
|
9762
|
+
var id = getId$e(props);
|
|
9820
9763
|
|
|
9821
9764
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : false);
|
|
9822
9765
|
|
|
9823
9766
|
var resetPage = true;
|
|
9824
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
9767
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$6);
|
|
9825
9768
|
}
|
|
9826
9769
|
|
|
9827
|
-
function _cleanUp$
|
|
9828
|
-
return cleanUpValue(searchState, context, "".concat(namespace, ".").concat(getId$
|
|
9770
|
+
function _cleanUp$6(props, searchState, context) {
|
|
9771
|
+
return cleanUpValue(searchState, context, "".concat(namespace$6, ".").concat(getId$e(props)));
|
|
9829
9772
|
}
|
|
9830
9773
|
/**
|
|
9831
9774
|
* connectToggleRefinement connector provides the logic to build a widget that will
|
|
@@ -9851,11 +9794,11 @@ function _cleanUp$1(props, searchState, context) {
|
|
|
9851
9794
|
var connectToggleRefinement = createConnectorWithContext({
|
|
9852
9795
|
displayName: 'AlgoliaToggle',
|
|
9853
9796
|
propTypes: {
|
|
9854
|
-
label: PropTypes__default
|
|
9855
|
-
attribute: PropTypes__default
|
|
9856
|
-
value: PropTypes__default
|
|
9857
|
-
filter: PropTypes__default
|
|
9858
|
-
defaultRefinement: PropTypes__default
|
|
9797
|
+
label: PropTypes__default.string.isRequired,
|
|
9798
|
+
attribute: PropTypes__default.string.isRequired,
|
|
9799
|
+
value: PropTypes__default.any.isRequired,
|
|
9800
|
+
filter: PropTypes__default.func,
|
|
9801
|
+
defaultRefinement: PropTypes__default.bool
|
|
9859
9802
|
},
|
|
9860
9803
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
9861
9804
|
var attribute = props.attribute,
|
|
@@ -9864,14 +9807,14 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9864
9807
|
ais: props.contextValue,
|
|
9865
9808
|
multiIndexContext: props.indexContextValue
|
|
9866
9809
|
});
|
|
9867
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
9810
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
9868
9811
|
ais: props.contextValue,
|
|
9869
9812
|
multiIndexContext: props.indexContextValue
|
|
9870
9813
|
});
|
|
9871
9814
|
var allFacetValues = results && results.getFacetByName(attribute) ? results.getFacetValues(attribute) : null;
|
|
9872
9815
|
var facetValue = // Use null to always be consistent with type of the value
|
|
9873
9816
|
// count: number | null
|
|
9874
|
-
allFacetValues && allFacetValues.length ? find
|
|
9817
|
+
allFacetValues && allFacetValues.length ? find(allFacetValues, function (item) {
|
|
9875
9818
|
return item.name === value.toString();
|
|
9876
9819
|
}) : null;
|
|
9877
9820
|
var facetValueCount = facetValue && facetValue.count;
|
|
@@ -9892,13 +9835,13 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9892
9835
|
};
|
|
9893
9836
|
},
|
|
9894
9837
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9895
|
-
return _refine$
|
|
9838
|
+
return _refine$8(props, searchState, nextRefinement, {
|
|
9896
9839
|
ais: props.contextValue,
|
|
9897
9840
|
multiIndexContext: props.indexContextValue
|
|
9898
9841
|
});
|
|
9899
9842
|
},
|
|
9900
9843
|
cleanUp: function cleanUp(props, searchState) {
|
|
9901
|
-
return _cleanUp$
|
|
9844
|
+
return _cleanUp$6(props, searchState, {
|
|
9902
9845
|
ais: props.contextValue,
|
|
9903
9846
|
multiIndexContext: props.indexContextValue
|
|
9904
9847
|
});
|
|
@@ -9907,7 +9850,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9907
9850
|
var attribute = props.attribute,
|
|
9908
9851
|
value = props.value,
|
|
9909
9852
|
filter = props.filter;
|
|
9910
|
-
var checked = getCurrentRefinement(props, searchState, {
|
|
9853
|
+
var checked = getCurrentRefinement$b(props, searchState, {
|
|
9911
9854
|
ais: props.contextValue,
|
|
9912
9855
|
multiIndexContext: props.indexContextValue
|
|
9913
9856
|
});
|
|
@@ -9924,8 +9867,8 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9924
9867
|
return nextSearchParameters;
|
|
9925
9868
|
},
|
|
9926
9869
|
getMetadata: function getMetadata(props, searchState) {
|
|
9927
|
-
var id = getId$
|
|
9928
|
-
var checked = getCurrentRefinement(props, searchState, {
|
|
9870
|
+
var id = getId$e(props);
|
|
9871
|
+
var checked = getCurrentRefinement$b(props, searchState, {
|
|
9929
9872
|
ais: props.contextValue,
|
|
9930
9873
|
multiIndexContext: props.indexContextValue
|
|
9931
9874
|
});
|
|
@@ -9941,7 +9884,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9941
9884
|
currentRefinement: checked,
|
|
9942
9885
|
attribute: props.attribute,
|
|
9943
9886
|
value: function value(nextState) {
|
|
9944
|
-
return _refine$
|
|
9887
|
+
return _refine$8(props, nextState, false, {
|
|
9945
9888
|
ais: props.contextValue,
|
|
9946
9889
|
multiIndexContext: props.indexContextValue
|
|
9947
9890
|
});
|
|
@@ -9957,7 +9900,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9957
9900
|
}
|
|
9958
9901
|
});
|
|
9959
9902
|
|
|
9960
|
-
function getId() {
|
|
9903
|
+
function getId$f() {
|
|
9961
9904
|
return 'query';
|
|
9962
9905
|
}
|
|
9963
9906
|
|
|
@@ -9966,7 +9909,7 @@ function getAdditionalId() {
|
|
|
9966
9909
|
}
|
|
9967
9910
|
|
|
9968
9911
|
function getCurrentRefinementQuery(props, searchState, context) {
|
|
9969
|
-
var id = getId();
|
|
9912
|
+
var id = getId$f();
|
|
9970
9913
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9971
9914
|
|
|
9972
9915
|
if (currentRefinement) {
|
|
@@ -9987,10 +9930,10 @@ function getCurrentRefinementAdditional(props, searchState, context) {
|
|
|
9987
9930
|
return {};
|
|
9988
9931
|
}
|
|
9989
9932
|
|
|
9990
|
-
function _refine(props, searchState, nextRefinement, context) {
|
|
9933
|
+
function _refine$9(props, searchState, nextRefinement, context) {
|
|
9991
9934
|
var _nextValue;
|
|
9992
9935
|
|
|
9993
|
-
var id = getId();
|
|
9936
|
+
var id = getId$f();
|
|
9994
9937
|
var voiceParams = getAdditionalId();
|
|
9995
9938
|
var queryLanguages = props.language ? {
|
|
9996
9939
|
queryLanguages: [props.language.split('-')[0]]
|
|
@@ -10007,15 +9950,15 @@ function _refine(props, searchState, nextRefinement, context) {
|
|
|
10007
9950
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
10008
9951
|
}
|
|
10009
9952
|
|
|
10010
|
-
function _cleanUp(props, searchState, context) {
|
|
10011
|
-
var interimState = cleanUpValue(searchState, context, getId());
|
|
9953
|
+
function _cleanUp$7(props, searchState, context) {
|
|
9954
|
+
var interimState = cleanUpValue(searchState, context, getId$f());
|
|
10012
9955
|
return cleanUpValue(interimState, context, getAdditionalId());
|
|
10013
9956
|
}
|
|
10014
9957
|
|
|
10015
9958
|
var connectVoiceSearch = createConnectorWithContext({
|
|
10016
9959
|
displayName: 'AlgoliaVoiceSearch',
|
|
10017
9960
|
propTypes: {
|
|
10018
|
-
defaultRefinement: PropTypes__default
|
|
9961
|
+
defaultRefinement: PropTypes__default.string
|
|
10019
9962
|
},
|
|
10020
9963
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
10021
9964
|
return {
|
|
@@ -10027,13 +9970,13 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
10027
9970
|
};
|
|
10028
9971
|
},
|
|
10029
9972
|
refine: function refine(props, searchState, nextRefinement) {
|
|
10030
|
-
return _refine(props, searchState, nextRefinement, {
|
|
9973
|
+
return _refine$9(props, searchState, nextRefinement, {
|
|
10031
9974
|
ais: props.contextValue,
|
|
10032
9975
|
multiIndexContext: props.indexContextValue
|
|
10033
9976
|
});
|
|
10034
9977
|
},
|
|
10035
9978
|
cleanUp: function cleanUp(props, searchState) {
|
|
10036
|
-
return _cleanUp(props, searchState, {
|
|
9979
|
+
return _cleanUp$7(props, searchState, {
|
|
10037
9980
|
ais: props.contextValue,
|
|
10038
9981
|
multiIndexContext: props.indexContextValue
|
|
10039
9982
|
});
|
|
@@ -10050,7 +9993,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
10050
9993
|
return searchParameters.setQuery(query).setQueryParameters(additionalParams);
|
|
10051
9994
|
},
|
|
10052
9995
|
getMetadata: function getMetadata(props, searchState) {
|
|
10053
|
-
var id = getId();
|
|
9996
|
+
var id = getId$f();
|
|
10054
9997
|
var currentRefinement = getCurrentRefinementQuery(props, searchState, {
|
|
10055
9998
|
ais: props.contextValue,
|
|
10056
9999
|
multiIndexContext: props.indexContextValue
|
|
@@ -10064,7 +10007,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
10064
10007
|
items: currentRefinement === null ? [] : [{
|
|
10065
10008
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
10066
10009
|
value: function value(nextState) {
|
|
10067
|
-
return _refine(props, nextState, '', {
|
|
10010
|
+
return _refine$9(props, nextState, '', {
|
|
10068
10011
|
ais: props.contextValue,
|
|
10069
10012
|
multiIndexContext: props.indexContextValue
|
|
10070
10013
|
});
|
|
@@ -10088,7 +10031,7 @@ var createClassNames = function createClassNames(block) {
|
|
|
10088
10031
|
var baseClassName = "".concat(prefix, "-").concat(block);
|
|
10089
10032
|
return element ? "".concat(baseClassName, "-").concat(element) : baseClassName;
|
|
10090
10033
|
});
|
|
10091
|
-
return index.classnames(suitElements);
|
|
10034
|
+
return index$5.classnames(suitElements);
|
|
10092
10035
|
};
|
|
10093
10036
|
};
|
|
10094
10037
|
var isSpecialClick = function isSpecialClick(event) {
|
|
@@ -10117,7 +10060,7 @@ function range(_ref) {
|
|
|
10117
10060
|
return (start + current) * limitStep;
|
|
10118
10061
|
});
|
|
10119
10062
|
}
|
|
10120
|
-
function find(array, comparator) {
|
|
10063
|
+
function find$2(array, comparator) {
|
|
10121
10064
|
if (!Array.isArray(array)) {
|
|
10122
10065
|
return undefined;
|
|
10123
10066
|
}
|
|
@@ -10131,11 +10074,11 @@ function find(array, comparator) {
|
|
|
10131
10074
|
return undefined;
|
|
10132
10075
|
}
|
|
10133
10076
|
|
|
10134
|
-
var cx
|
|
10077
|
+
var cx = createClassNames('Panel');
|
|
10135
10078
|
|
|
10136
|
-
var _createContext = React.createContext(function setCanRefine() {}),
|
|
10137
|
-
PanelConsumer = _createContext.Consumer,
|
|
10138
|
-
PanelProvider = _createContext.Provider;
|
|
10079
|
+
var _createContext$1 = React.createContext(function setCanRefine() {}),
|
|
10080
|
+
PanelConsumer = _createContext$1.Consumer,
|
|
10081
|
+
PanelProvider = _createContext$1.Provider;
|
|
10139
10082
|
|
|
10140
10083
|
var Panel =
|
|
10141
10084
|
/*#__PURE__*/
|
|
@@ -10177,16 +10120,16 @@ function (_Component) {
|
|
|
10177
10120
|
header = _this$props.header,
|
|
10178
10121
|
footer = _this$props.footer;
|
|
10179
10122
|
var canRefine = this.state.canRefine;
|
|
10180
|
-
return React__default
|
|
10181
|
-
className: index.classnames(cx
|
|
10182
|
-
}, header && React__default
|
|
10183
|
-
className: cx
|
|
10184
|
-
}, header), React__default
|
|
10185
|
-
className: cx
|
|
10186
|
-
}, React__default
|
|
10123
|
+
return React__default.createElement("div", {
|
|
10124
|
+
className: index$5.classnames(cx('', !canRefine && '-noRefinement'), className)
|
|
10125
|
+
}, header && React__default.createElement("div", {
|
|
10126
|
+
className: cx('header')
|
|
10127
|
+
}, header), React__default.createElement("div", {
|
|
10128
|
+
className: cx('body')
|
|
10129
|
+
}, React__default.createElement(PanelProvider, {
|
|
10187
10130
|
value: this.setCanRefine
|
|
10188
|
-
}, children)), footer && React__default
|
|
10189
|
-
className: cx
|
|
10131
|
+
}, children)), footer && React__default.createElement("div", {
|
|
10132
|
+
className: cx('footer')
|
|
10190
10133
|
}, footer));
|
|
10191
10134
|
}
|
|
10192
10135
|
}]);
|
|
@@ -10195,10 +10138,10 @@ function (_Component) {
|
|
|
10195
10138
|
}(React.Component);
|
|
10196
10139
|
|
|
10197
10140
|
_defineProperty(Panel, "propTypes", {
|
|
10198
|
-
children: PropTypes__default
|
|
10199
|
-
className: PropTypes__default
|
|
10200
|
-
header: PropTypes__default
|
|
10201
|
-
footer: PropTypes__default
|
|
10141
|
+
children: PropTypes__default.node.isRequired,
|
|
10142
|
+
className: PropTypes__default.string,
|
|
10143
|
+
header: PropTypes__default.node,
|
|
10144
|
+
footer: PropTypes__default.node
|
|
10202
10145
|
});
|
|
10203
10146
|
|
|
10204
10147
|
_defineProperty(Panel, "defaultProps", {
|
|
@@ -10241,16 +10184,16 @@ function (_Component) {
|
|
|
10241
10184
|
}(React.Component);
|
|
10242
10185
|
|
|
10243
10186
|
_defineProperty(PanelCallbackHandler, "propTypes", {
|
|
10244
|
-
children: PropTypes__default
|
|
10245
|
-
canRefine: PropTypes__default
|
|
10246
|
-
setCanRefine: PropTypes__default
|
|
10187
|
+
children: PropTypes__default.node.isRequired,
|
|
10188
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
10189
|
+
setCanRefine: PropTypes__default.func.isRequired
|
|
10247
10190
|
});
|
|
10248
10191
|
|
|
10249
10192
|
var PanelWrapper = function PanelWrapper(_ref) {
|
|
10250
10193
|
var canRefine = _ref.canRefine,
|
|
10251
10194
|
children = _ref.children;
|
|
10252
|
-
return React__default
|
|
10253
|
-
return React__default
|
|
10195
|
+
return React__default.createElement(PanelConsumer, null, function (setCanRefine) {
|
|
10196
|
+
return React__default.createElement(PanelCallbackHandler, {
|
|
10254
10197
|
setCanRefine: setCanRefine,
|
|
10255
10198
|
canRefine: canRefine
|
|
10256
10199
|
}, children);
|
|
@@ -10258,8 +10201,8 @@ var PanelWrapper = function PanelWrapper(_ref) {
|
|
|
10258
10201
|
};
|
|
10259
10202
|
|
|
10260
10203
|
PanelWrapper.propTypes = {
|
|
10261
|
-
canRefine: PropTypes__default
|
|
10262
|
-
children: PropTypes__default
|
|
10204
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
10205
|
+
children: PropTypes__default.node.isRequired
|
|
10263
10206
|
};
|
|
10264
10207
|
|
|
10265
10208
|
var Link =
|
|
@@ -10296,7 +10239,7 @@ function (_Component) {
|
|
|
10296
10239
|
_createClass(Link, [{
|
|
10297
10240
|
key: "render",
|
|
10298
10241
|
value: function render() {
|
|
10299
|
-
return React__default
|
|
10242
|
+
return React__default.createElement("a", index$5._extends({}, this.props, {
|
|
10300
10243
|
onClick: this.onClick
|
|
10301
10244
|
}));
|
|
10302
10245
|
}
|
|
@@ -10306,13 +10249,13 @@ function (_Component) {
|
|
|
10306
10249
|
}(React.Component);
|
|
10307
10250
|
|
|
10308
10251
|
_defineProperty(Link, "propTypes", {
|
|
10309
|
-
onClick: PropTypes__default
|
|
10252
|
+
onClick: PropTypes__default.func.isRequired
|
|
10310
10253
|
});
|
|
10311
10254
|
|
|
10312
|
-
var cx$
|
|
10313
|
-
var itemsPropType
|
|
10314
|
-
label: PropTypes__default
|
|
10315
|
-
value: PropTypes__default
|
|
10255
|
+
var cx$1 = createClassNames('Breadcrumb');
|
|
10256
|
+
var itemsPropType = PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
10257
|
+
label: PropTypes__default.string.isRequired,
|
|
10258
|
+
value: PropTypes__default.string.isRequired
|
|
10316
10259
|
}));
|
|
10317
10260
|
|
|
10318
10261
|
var Breadcrumb =
|
|
@@ -10338,10 +10281,10 @@ function (_Component) {
|
|
|
10338
10281
|
separator = _this$props.separator,
|
|
10339
10282
|
translate = _this$props.translate,
|
|
10340
10283
|
className = _this$props.className;
|
|
10341
|
-
var rootPath = canRefine ? React__default
|
|
10342
|
-
className: cx$
|
|
10343
|
-
}, React__default
|
|
10344
|
-
className: cx$
|
|
10284
|
+
var rootPath = canRefine ? React__default.createElement("li", {
|
|
10285
|
+
className: cx$1('item')
|
|
10286
|
+
}, React__default.createElement(Link, {
|
|
10287
|
+
className: cx$1('link'),
|
|
10345
10288
|
onClick: function onClick() {
|
|
10346
10289
|
return !rootURL ? refine() : null;
|
|
10347
10290
|
},
|
|
@@ -10349,23 +10292,23 @@ function (_Component) {
|
|
|
10349
10292
|
}, translate('rootLabel'))) : null;
|
|
10350
10293
|
var breadcrumb = items.map(function (item, idx) {
|
|
10351
10294
|
var isLast = idx === items.length - 1;
|
|
10352
|
-
return React__default
|
|
10353
|
-
className: cx$
|
|
10295
|
+
return React__default.createElement("li", {
|
|
10296
|
+
className: cx$1('item', isLast && 'item--selected'),
|
|
10354
10297
|
key: idx
|
|
10355
|
-
}, React__default
|
|
10356
|
-
className: cx$
|
|
10357
|
-
}, separator), !isLast ? React__default
|
|
10358
|
-
className: cx$
|
|
10298
|
+
}, React__default.createElement("span", {
|
|
10299
|
+
className: cx$1('separator')
|
|
10300
|
+
}, separator), !isLast ? React__default.createElement(Link, {
|
|
10301
|
+
className: cx$1('link'),
|
|
10359
10302
|
onClick: function onClick() {
|
|
10360
10303
|
return refine(item.value);
|
|
10361
10304
|
},
|
|
10362
10305
|
href: createURL(item.value)
|
|
10363
10306
|
}, item.label) : item.label);
|
|
10364
10307
|
});
|
|
10365
|
-
return React__default
|
|
10366
|
-
className: index.classnames(cx$
|
|
10367
|
-
}, React__default
|
|
10368
|
-
className: cx$
|
|
10308
|
+
return React__default.createElement("div", {
|
|
10309
|
+
className: index$5.classnames(cx$1('', !canRefine && '-noRefinement'), className)
|
|
10310
|
+
}, React__default.createElement("ul", {
|
|
10311
|
+
className: cx$1('list')
|
|
10369
10312
|
}, rootPath, breadcrumb));
|
|
10370
10313
|
}
|
|
10371
10314
|
}]);
|
|
@@ -10374,14 +10317,14 @@ function (_Component) {
|
|
|
10374
10317
|
}(React.Component);
|
|
10375
10318
|
|
|
10376
10319
|
_defineProperty(Breadcrumb, "propTypes", {
|
|
10377
|
-
canRefine: PropTypes__default
|
|
10378
|
-
createURL: PropTypes__default
|
|
10379
|
-
items: itemsPropType
|
|
10380
|
-
refine: PropTypes__default
|
|
10381
|
-
rootURL: PropTypes__default
|
|
10382
|
-
separator: PropTypes__default
|
|
10383
|
-
translate: PropTypes__default
|
|
10384
|
-
className: PropTypes__default
|
|
10320
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
10321
|
+
createURL: PropTypes__default.func.isRequired,
|
|
10322
|
+
items: itemsPropType,
|
|
10323
|
+
refine: PropTypes__default.func.isRequired,
|
|
10324
|
+
rootURL: PropTypes__default.string,
|
|
10325
|
+
separator: PropTypes__default.node,
|
|
10326
|
+
translate: PropTypes__default.func.isRequired,
|
|
10327
|
+
className: PropTypes__default.string
|
|
10385
10328
|
});
|
|
10386
10329
|
|
|
10387
10330
|
_defineProperty(Breadcrumb, "defaultProps", {
|
|
@@ -10483,12 +10426,12 @@ var Breadcrumb$1 = translatable({
|
|
|
10483
10426
|
*/
|
|
10484
10427
|
|
|
10485
10428
|
var BreadcrumbWidget = function BreadcrumbWidget(props) {
|
|
10486
|
-
return React__default
|
|
10429
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(Breadcrumb$1, props));
|
|
10487
10430
|
};
|
|
10488
10431
|
|
|
10489
10432
|
connectBreadcrumb(BreadcrumbWidget);
|
|
10490
10433
|
|
|
10491
|
-
var cx$
|
|
10434
|
+
var cx$2 = createClassNames('ClearRefinements');
|
|
10492
10435
|
|
|
10493
10436
|
var ClearRefinements =
|
|
10494
10437
|
/*#__PURE__*/
|
|
@@ -10510,10 +10453,10 @@ function (_Component) {
|
|
|
10510
10453
|
refine = _this$props.refine,
|
|
10511
10454
|
translate = _this$props.translate,
|
|
10512
10455
|
className = _this$props.className;
|
|
10513
|
-
return React__default
|
|
10514
|
-
className: index.classnames(cx$
|
|
10515
|
-
}, React__default
|
|
10516
|
-
className: cx$
|
|
10456
|
+
return React__default.createElement("div", {
|
|
10457
|
+
className: index$5.classnames(cx$2(''), className)
|
|
10458
|
+
}, React__default.createElement("button", {
|
|
10459
|
+
className: cx$2('button', !canRefine && 'button--disabled'),
|
|
10517
10460
|
onClick: function onClick() {
|
|
10518
10461
|
return refine(items);
|
|
10519
10462
|
},
|
|
@@ -10526,11 +10469,11 @@ function (_Component) {
|
|
|
10526
10469
|
}(React.Component);
|
|
10527
10470
|
|
|
10528
10471
|
_defineProperty(ClearRefinements, "propTypes", {
|
|
10529
|
-
items: PropTypes__default
|
|
10530
|
-
canRefine: PropTypes__default
|
|
10531
|
-
refine: PropTypes__default
|
|
10532
|
-
translate: PropTypes__default
|
|
10533
|
-
className: PropTypes__default
|
|
10472
|
+
items: PropTypes__default.arrayOf(PropTypes__default.object).isRequired,
|
|
10473
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
10474
|
+
refine: PropTypes__default.func.isRequired,
|
|
10475
|
+
translate: PropTypes__default.func.isRequired,
|
|
10476
|
+
className: PropTypes__default.string
|
|
10534
10477
|
});
|
|
10535
10478
|
|
|
10536
10479
|
_defineProperty(ClearRefinements, "defaultProps", {
|
|
@@ -10576,63 +10519,63 @@ var ClearRefinements$1 = translatable({
|
|
|
10576
10519
|
*/
|
|
10577
10520
|
|
|
10578
10521
|
var ClearRefinementsWidget = function ClearRefinementsWidget(props) {
|
|
10579
|
-
return React__default
|
|
10522
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(ClearRefinements$1, props));
|
|
10580
10523
|
};
|
|
10581
10524
|
|
|
10582
10525
|
connectCurrentRefinements(ClearRefinementsWidget);
|
|
10583
10526
|
|
|
10584
|
-
var cx$
|
|
10527
|
+
var cx$3 = createClassNames('CurrentRefinements');
|
|
10585
10528
|
var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
10586
10529
|
var items = _ref.items,
|
|
10587
10530
|
canRefine = _ref.canRefine,
|
|
10588
10531
|
refine = _ref.refine,
|
|
10589
10532
|
translate = _ref.translate,
|
|
10590
10533
|
className = _ref.className;
|
|
10591
|
-
return React__default
|
|
10592
|
-
className: index.classnames(cx$
|
|
10593
|
-
}, React__default
|
|
10594
|
-
className: cx$
|
|
10534
|
+
return React__default.createElement("div", {
|
|
10535
|
+
className: index$5.classnames(cx$3('', !canRefine && '-noRefinement'), className)
|
|
10536
|
+
}, React__default.createElement("ul", {
|
|
10537
|
+
className: cx$3('list', !canRefine && 'list--noRefinement')
|
|
10595
10538
|
}, items.map(function (item) {
|
|
10596
|
-
return React__default
|
|
10539
|
+
return React__default.createElement("li", {
|
|
10597
10540
|
key: item.label,
|
|
10598
|
-
className: cx$
|
|
10599
|
-
}, React__default
|
|
10600
|
-
className: cx$
|
|
10541
|
+
className: cx$3('item')
|
|
10542
|
+
}, React__default.createElement("span", {
|
|
10543
|
+
className: cx$3('label')
|
|
10601
10544
|
}, item.label), item.items ? item.items.map(function (nest) {
|
|
10602
|
-
return React__default
|
|
10545
|
+
return React__default.createElement("span", {
|
|
10603
10546
|
key: nest.label,
|
|
10604
|
-
className: cx$
|
|
10605
|
-
}, React__default
|
|
10606
|
-
className: cx$
|
|
10607
|
-
}, nest.label), React__default
|
|
10608
|
-
className: cx$
|
|
10547
|
+
className: cx$3('category')
|
|
10548
|
+
}, React__default.createElement("span", {
|
|
10549
|
+
className: cx$3('categoryLabel')
|
|
10550
|
+
}, nest.label), React__default.createElement("button", {
|
|
10551
|
+
className: cx$3('delete'),
|
|
10609
10552
|
onClick: function onClick() {
|
|
10610
10553
|
return refine(nest.value);
|
|
10611
10554
|
}
|
|
10612
10555
|
}, translate('clearFilter', nest)));
|
|
10613
|
-
}) : React__default
|
|
10614
|
-
className: cx$
|
|
10615
|
-
}, React__default
|
|
10616
|
-
className: cx$
|
|
10556
|
+
}) : React__default.createElement("span", {
|
|
10557
|
+
className: cx$3('category')
|
|
10558
|
+
}, React__default.createElement("button", {
|
|
10559
|
+
className: cx$3('delete'),
|
|
10617
10560
|
onClick: function onClick() {
|
|
10618
10561
|
return refine(item.value);
|
|
10619
10562
|
}
|
|
10620
10563
|
}, translate('clearFilter', item))));
|
|
10621
10564
|
})));
|
|
10622
10565
|
};
|
|
10623
|
-
var itemPropTypes = PropTypes__default
|
|
10624
|
-
label: PropTypes__default
|
|
10625
|
-
value: PropTypes__default
|
|
10566
|
+
var itemPropTypes = PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
10567
|
+
label: PropTypes__default.string.isRequired,
|
|
10568
|
+
value: PropTypes__default.func.isRequired,
|
|
10626
10569
|
items: function items() {
|
|
10627
10570
|
return itemPropTypes.apply(void 0, arguments);
|
|
10628
10571
|
}
|
|
10629
10572
|
}));
|
|
10630
10573
|
CurrentRefinements.propTypes = {
|
|
10631
10574
|
items: itemPropTypes.isRequired,
|
|
10632
|
-
canRefine: PropTypes__default
|
|
10633
|
-
refine: PropTypes__default
|
|
10634
|
-
translate: PropTypes__default
|
|
10635
|
-
className: PropTypes__default
|
|
10575
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
10576
|
+
refine: PropTypes__default.func.isRequired,
|
|
10577
|
+
translate: PropTypes__default.func.isRequired,
|
|
10578
|
+
className: PropTypes__default.string
|
|
10636
10579
|
};
|
|
10637
10580
|
CurrentRefinements.defaultProps = {
|
|
10638
10581
|
className: ''
|
|
@@ -10684,33 +10627,33 @@ var CurrentRefinements$1 = translatable({
|
|
|
10684
10627
|
*/
|
|
10685
10628
|
|
|
10686
10629
|
var CurrentRefinementsWidget = function CurrentRefinementsWidget(props) {
|
|
10687
|
-
return React__default
|
|
10630
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(CurrentRefinements$1, props));
|
|
10688
10631
|
};
|
|
10689
10632
|
|
|
10690
10633
|
connectCurrentRefinements(CurrentRefinementsWidget);
|
|
10691
10634
|
|
|
10692
|
-
var cx$
|
|
10693
|
-
var defaultLoadingIndicator = React__default
|
|
10635
|
+
var cx$4 = createClassNames('SearchBox');
|
|
10636
|
+
var defaultLoadingIndicator = React__default.createElement("svg", {
|
|
10694
10637
|
width: "18",
|
|
10695
10638
|
height: "18",
|
|
10696
10639
|
viewBox: "0 0 38 38",
|
|
10697
10640
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10698
10641
|
stroke: "#444",
|
|
10699
|
-
className: cx$
|
|
10700
|
-
}, React__default
|
|
10642
|
+
className: cx$4('loadingIcon')
|
|
10643
|
+
}, React__default.createElement("g", {
|
|
10701
10644
|
fill: "none",
|
|
10702
10645
|
fillRule: "evenodd"
|
|
10703
|
-
}, React__default
|
|
10646
|
+
}, React__default.createElement("g", {
|
|
10704
10647
|
transform: "translate(1 1)",
|
|
10705
10648
|
strokeWidth: "2"
|
|
10706
|
-
}, React__default
|
|
10649
|
+
}, React__default.createElement("circle", {
|
|
10707
10650
|
strokeOpacity: ".5",
|
|
10708
10651
|
cx: "18",
|
|
10709
10652
|
cy: "18",
|
|
10710
10653
|
r: "18"
|
|
10711
|
-
}), React__default
|
|
10654
|
+
}), React__default.createElement("path", {
|
|
10712
10655
|
d: "M36 18c0-9.94-8.06-18-18-18"
|
|
10713
|
-
}, React__default
|
|
10656
|
+
}, React__default.createElement("animateTransform", {
|
|
10714
10657
|
attributeName: "transform",
|
|
10715
10658
|
type: "rotate",
|
|
10716
10659
|
from: "0 18 18",
|
|
@@ -10718,26 +10661,26 @@ var defaultLoadingIndicator = React__default['default'].createElement("svg", {
|
|
|
10718
10661
|
dur: "1s",
|
|
10719
10662
|
repeatCount: "indefinite"
|
|
10720
10663
|
})))));
|
|
10721
|
-
var defaultReset = React__default
|
|
10722
|
-
className: cx$
|
|
10664
|
+
var defaultReset = React__default.createElement("svg", {
|
|
10665
|
+
className: cx$4('resetIcon'),
|
|
10723
10666
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10724
10667
|
viewBox: "0 0 20 20",
|
|
10725
10668
|
width: "10",
|
|
10726
10669
|
height: "10"
|
|
10727
|
-
}, React__default
|
|
10670
|
+
}, React__default.createElement("path", {
|
|
10728
10671
|
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"
|
|
10729
10672
|
}));
|
|
10730
|
-
var defaultSubmit = React__default
|
|
10731
|
-
className: cx$
|
|
10673
|
+
var defaultSubmit = React__default.createElement("svg", {
|
|
10674
|
+
className: cx$4('submitIcon'),
|
|
10732
10675
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10733
10676
|
width: "10",
|
|
10734
10677
|
height: "10",
|
|
10735
10678
|
viewBox: "0 0 40 40"
|
|
10736
|
-
}, React__default
|
|
10679
|
+
}, React__default.createElement("path", {
|
|
10737
10680
|
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"
|
|
10738
10681
|
}));
|
|
10739
10682
|
|
|
10740
|
-
var SearchBox
|
|
10683
|
+
var SearchBox =
|
|
10741
10684
|
/*#__PURE__*/
|
|
10742
10685
|
function (_Component) {
|
|
10743
10686
|
_inherits(SearchBox, _Component);
|
|
@@ -10899,16 +10842,16 @@ function (_Component) {
|
|
|
10899
10842
|
var isSearchStalled = this.props.showLoadingIndicator && this.props.isSearchStalled;
|
|
10900
10843
|
/* eslint-disable max-len */
|
|
10901
10844
|
|
|
10902
|
-
return React__default
|
|
10903
|
-
className: index.classnames(cx$
|
|
10904
|
-
}, React__default
|
|
10845
|
+
return React__default.createElement("div", {
|
|
10846
|
+
className: index$5.classnames(cx$4(''), className)
|
|
10847
|
+
}, React__default.createElement("form", {
|
|
10905
10848
|
noValidate: true,
|
|
10906
10849
|
onSubmit: this.props.onSubmit ? this.props.onSubmit : this.onSubmit,
|
|
10907
10850
|
onReset: this.onReset,
|
|
10908
|
-
className: cx$
|
|
10851
|
+
className: cx$4('form', isSearchStalled && 'form--stalledSearch'),
|
|
10909
10852
|
action: "",
|
|
10910
10853
|
role: "search"
|
|
10911
|
-
}, React__default
|
|
10854
|
+
}, React__default.createElement("input", index$5._extends({
|
|
10912
10855
|
ref: this.onInputMount,
|
|
10913
10856
|
type: "search",
|
|
10914
10857
|
placeholder: translate('placeholder'),
|
|
@@ -10922,19 +10865,19 @@ function (_Component) {
|
|
|
10922
10865
|
value: query,
|
|
10923
10866
|
onChange: this.onChange
|
|
10924
10867
|
}, searchInputEvents, {
|
|
10925
|
-
className: cx$
|
|
10926
|
-
})), React__default
|
|
10868
|
+
className: cx$4('input')
|
|
10869
|
+
})), React__default.createElement("button", {
|
|
10927
10870
|
type: "submit",
|
|
10928
10871
|
title: translate('submitTitle'),
|
|
10929
|
-
className: cx$
|
|
10930
|
-
}, submit), React__default
|
|
10872
|
+
className: cx$4('submit')
|
|
10873
|
+
}, submit), React__default.createElement("button", {
|
|
10931
10874
|
type: "reset",
|
|
10932
10875
|
title: translate('resetTitle'),
|
|
10933
|
-
className: cx$
|
|
10876
|
+
className: cx$4('reset'),
|
|
10934
10877
|
hidden: !query || isSearchStalled
|
|
10935
|
-
}, reset), this.props.showLoadingIndicator && React__default
|
|
10878
|
+
}, reset), this.props.showLoadingIndicator && React__default.createElement("span", {
|
|
10936
10879
|
hidden: !isSearchStalled,
|
|
10937
|
-
className: cx$
|
|
10880
|
+
className: cx$4('loadingIndicator')
|
|
10938
10881
|
}, loadingIndicator)));
|
|
10939
10882
|
/* eslint-enable */
|
|
10940
10883
|
}
|
|
@@ -10943,28 +10886,28 @@ function (_Component) {
|
|
|
10943
10886
|
return SearchBox;
|
|
10944
10887
|
}(React.Component);
|
|
10945
10888
|
|
|
10946
|
-
_defineProperty(SearchBox
|
|
10947
|
-
currentRefinement: PropTypes__default
|
|
10948
|
-
className: PropTypes__default
|
|
10949
|
-
refine: PropTypes__default
|
|
10950
|
-
translate: PropTypes__default
|
|
10951
|
-
loadingIndicator: PropTypes__default
|
|
10952
|
-
reset: PropTypes__default
|
|
10953
|
-
submit: PropTypes__default
|
|
10954
|
-
focusShortcuts: PropTypes__default
|
|
10955
|
-
autoFocus: PropTypes__default
|
|
10956
|
-
searchAsYouType: PropTypes__default
|
|
10957
|
-
onSubmit: PropTypes__default
|
|
10958
|
-
onReset: PropTypes__default
|
|
10959
|
-
onChange: PropTypes__default
|
|
10960
|
-
isSearchStalled: PropTypes__default
|
|
10961
|
-
showLoadingIndicator: PropTypes__default
|
|
10962
|
-
inputRef: PropTypes__default
|
|
10963
|
-
current: PropTypes__default
|
|
10889
|
+
_defineProperty(SearchBox, "propTypes", {
|
|
10890
|
+
currentRefinement: PropTypes__default.string,
|
|
10891
|
+
className: PropTypes__default.string,
|
|
10892
|
+
refine: PropTypes__default.func.isRequired,
|
|
10893
|
+
translate: PropTypes__default.func.isRequired,
|
|
10894
|
+
loadingIndicator: PropTypes__default.node,
|
|
10895
|
+
reset: PropTypes__default.node,
|
|
10896
|
+
submit: PropTypes__default.node,
|
|
10897
|
+
focusShortcuts: PropTypes__default.arrayOf(PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number])),
|
|
10898
|
+
autoFocus: PropTypes__default.bool,
|
|
10899
|
+
searchAsYouType: PropTypes__default.bool,
|
|
10900
|
+
onSubmit: PropTypes__default.func,
|
|
10901
|
+
onReset: PropTypes__default.func,
|
|
10902
|
+
onChange: PropTypes__default.func,
|
|
10903
|
+
isSearchStalled: PropTypes__default.bool,
|
|
10904
|
+
showLoadingIndicator: PropTypes__default.bool,
|
|
10905
|
+
inputRef: PropTypes__default.oneOfType([PropTypes__default.func, PropTypes__default.exact({
|
|
10906
|
+
current: PropTypes__default.object
|
|
10964
10907
|
})])
|
|
10965
10908
|
});
|
|
10966
10909
|
|
|
10967
|
-
_defineProperty(SearchBox
|
|
10910
|
+
_defineProperty(SearchBox, "defaultProps", {
|
|
10968
10911
|
currentRefinement: '',
|
|
10969
10912
|
className: '',
|
|
10970
10913
|
focusShortcuts: ['s', '/'],
|
|
@@ -10977,15 +10920,15 @@ _defineProperty(SearchBox$1, "defaultProps", {
|
|
|
10977
10920
|
submit: defaultSubmit
|
|
10978
10921
|
});
|
|
10979
10922
|
|
|
10980
|
-
var SearchBox$
|
|
10923
|
+
var SearchBox$1 = translatable({
|
|
10981
10924
|
resetTitle: 'Clear the search query.',
|
|
10982
10925
|
submitTitle: 'Submit your search query.',
|
|
10983
10926
|
placeholder: 'Search here…'
|
|
10984
|
-
})(SearchBox
|
|
10927
|
+
})(SearchBox);
|
|
10985
10928
|
|
|
10986
|
-
var itemsPropType$1 = PropTypes__default
|
|
10987
|
-
value: PropTypes__default
|
|
10988
|
-
label: PropTypes__default
|
|
10929
|
+
var itemsPropType$1 = PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
10930
|
+
value: PropTypes__default.any,
|
|
10931
|
+
label: PropTypes__default.node.isRequired,
|
|
10989
10932
|
items: function items() {
|
|
10990
10933
|
return itemsPropType$1.apply(void 0, arguments);
|
|
10991
10934
|
}
|
|
@@ -11027,10 +10970,10 @@ function (_Component) {
|
|
|
11027
10970
|
|
|
11028
10971
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
11029
10972
|
var itemHasChildren = item.items && Boolean(item.items.length);
|
|
11030
|
-
return React__default
|
|
10973
|
+
return React__default.createElement("li", {
|
|
11031
10974
|
key: item.key || item.label,
|
|
11032
10975
|
className: _this.props.cx('item', item.isRefined && 'item--selected', item.noRefinement && 'item--noRefinement', itemHasChildren && 'item--parent')
|
|
11033
|
-
}, _this.props.renderItem(item, resetQuery), itemHasChildren && React__default
|
|
10976
|
+
}, _this.props.renderItem(item, resetQuery), itemHasChildren && React__default.createElement("ul", {
|
|
11034
10977
|
className: _this.props.cx('list', 'list--child')
|
|
11035
10978
|
}, item.items.slice(0, _this.getLimit()).map(function (child) {
|
|
11036
10979
|
return _this.renderItem(child, item);
|
|
@@ -11058,7 +11001,7 @@ function (_Component) {
|
|
|
11058
11001
|
return null;
|
|
11059
11002
|
}
|
|
11060
11003
|
|
|
11061
|
-
return React__default
|
|
11004
|
+
return React__default.createElement("button", {
|
|
11062
11005
|
disabled: disabled,
|
|
11063
11006
|
className: cx('showMore', disabled && 'showMore--disabled'),
|
|
11064
11007
|
onClick: this.onShowMoreClick
|
|
@@ -11076,12 +11019,12 @@ function (_Component) {
|
|
|
11076
11019
|
translate = _this$props3.translate,
|
|
11077
11020
|
items = _this$props3.items,
|
|
11078
11021
|
selectItem = _this$props3.selectItem;
|
|
11079
|
-
var noResults = items.length === 0 && this.state.query !== '' ? React__default
|
|
11022
|
+
var noResults = items.length === 0 && this.state.query !== '' ? React__default.createElement("div", {
|
|
11080
11023
|
className: cx('noResults')
|
|
11081
11024
|
}, translate('noResults')) : null;
|
|
11082
|
-
return React__default
|
|
11025
|
+
return React__default.createElement("div", {
|
|
11083
11026
|
className: cx('searchBox')
|
|
11084
|
-
}, React__default
|
|
11027
|
+
}, React__default.createElement(SearchBox$1, {
|
|
11085
11028
|
currentRefinement: this.state.query,
|
|
11086
11029
|
refine: function refine(value) {
|
|
11087
11030
|
_this2.setState({
|
|
@@ -11096,7 +11039,7 @@ function (_Component) {
|
|
|
11096
11039
|
e.preventDefault();
|
|
11097
11040
|
e.stopPropagation();
|
|
11098
11041
|
|
|
11099
|
-
if (isFromSearch
|
|
11042
|
+
if (isFromSearch) {
|
|
11100
11043
|
selectItem(items[0], _this2.resetQuery);
|
|
11101
11044
|
}
|
|
11102
11045
|
}
|
|
@@ -11114,10 +11057,10 @@ function (_Component) {
|
|
|
11114
11057
|
searchable = _this$props4.searchable,
|
|
11115
11058
|
canRefine = _this$props4.canRefine;
|
|
11116
11059
|
var searchBox = searchable ? this.renderSearchBox() : null;
|
|
11117
|
-
var rootClassName = index.classnames(cx('', !canRefine && '-noRefinement'), className);
|
|
11060
|
+
var rootClassName = index$5.classnames(cx('', !canRefine && '-noRefinement'), className);
|
|
11118
11061
|
|
|
11119
11062
|
if (items.length === 0) {
|
|
11120
|
-
return React__default
|
|
11063
|
+
return React__default.createElement("div", {
|
|
11121
11064
|
className: rootClassName
|
|
11122
11065
|
}, searchBox);
|
|
11123
11066
|
} // Always limit the number of items we show on screen, since the actual
|
|
@@ -11125,9 +11068,9 @@ function (_Component) {
|
|
|
11125
11068
|
// option.
|
|
11126
11069
|
|
|
11127
11070
|
|
|
11128
|
-
return React__default
|
|
11071
|
+
return React__default.createElement("div", {
|
|
11129
11072
|
className: rootClassName
|
|
11130
|
-
}, searchBox, React__default
|
|
11073
|
+
}, searchBox, React__default.createElement("ul", {
|
|
11131
11074
|
className: cx('list', !canRefine && 'list--noRefinement')
|
|
11132
11075
|
}, items.slice(0, this.getLimit()).map(function (item) {
|
|
11133
11076
|
return _this3.renderItem(item, _this3.resetQuery);
|
|
@@ -11139,21 +11082,21 @@ function (_Component) {
|
|
|
11139
11082
|
}(React.Component);
|
|
11140
11083
|
|
|
11141
11084
|
_defineProperty(List, "propTypes", {
|
|
11142
|
-
cx: PropTypes__default
|
|
11085
|
+
cx: PropTypes__default.func.isRequired,
|
|
11143
11086
|
// Only required with showMore.
|
|
11144
|
-
translate: PropTypes__default
|
|
11087
|
+
translate: PropTypes__default.func,
|
|
11145
11088
|
items: itemsPropType$1,
|
|
11146
|
-
renderItem: PropTypes__default
|
|
11147
|
-
selectItem: PropTypes__default
|
|
11148
|
-
className: PropTypes__default
|
|
11149
|
-
showMore: PropTypes__default
|
|
11150
|
-
limit: PropTypes__default
|
|
11151
|
-
showMoreLimit: PropTypes__default
|
|
11152
|
-
show: PropTypes__default
|
|
11153
|
-
searchForItems: PropTypes__default
|
|
11154
|
-
searchable: PropTypes__default
|
|
11155
|
-
isFromSearch: PropTypes__default
|
|
11156
|
-
canRefine: PropTypes__default
|
|
11089
|
+
renderItem: PropTypes__default.func.isRequired,
|
|
11090
|
+
selectItem: PropTypes__default.func,
|
|
11091
|
+
className: PropTypes__default.string,
|
|
11092
|
+
showMore: PropTypes__default.bool,
|
|
11093
|
+
limit: PropTypes__default.number,
|
|
11094
|
+
showMoreLimit: PropTypes__default.number,
|
|
11095
|
+
show: PropTypes__default.func,
|
|
11096
|
+
searchForItems: PropTypes__default.func,
|
|
11097
|
+
searchable: PropTypes__default.bool,
|
|
11098
|
+
isFromSearch: PropTypes__default.bool,
|
|
11099
|
+
canRefine: PropTypes__default.bool
|
|
11157
11100
|
});
|
|
11158
11101
|
|
|
11159
11102
|
_defineProperty(List, "defaultProps", {
|
|
@@ -11161,13 +11104,13 @@ _defineProperty(List, "defaultProps", {
|
|
|
11161
11104
|
isFromSearch: false
|
|
11162
11105
|
});
|
|
11163
11106
|
|
|
11164
|
-
var cx$
|
|
11165
|
-
var itemsPropType = PropTypes__default
|
|
11166
|
-
label: PropTypes__default
|
|
11167
|
-
value: PropTypes__default
|
|
11168
|
-
count: PropTypes__default
|
|
11107
|
+
var cx$5 = createClassNames('HierarchicalMenu');
|
|
11108
|
+
var itemsPropType$2 = PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
11109
|
+
label: PropTypes__default.string.isRequired,
|
|
11110
|
+
value: PropTypes__default.string,
|
|
11111
|
+
count: PropTypes__default.number.isRequired,
|
|
11169
11112
|
items: function items() {
|
|
11170
|
-
return itemsPropType.apply(void 0, arguments);
|
|
11113
|
+
return itemsPropType$2.apply(void 0, arguments);
|
|
11171
11114
|
}
|
|
11172
11115
|
}));
|
|
11173
11116
|
|
|
@@ -11193,16 +11136,16 @@ function (_Component) {
|
|
|
11193
11136
|
var _this$props = _this.props,
|
|
11194
11137
|
createURL = _this$props.createURL,
|
|
11195
11138
|
refine = _this$props.refine;
|
|
11196
|
-
return React__default
|
|
11197
|
-
className: cx$
|
|
11139
|
+
return React__default.createElement(Link, {
|
|
11140
|
+
className: cx$5('link'),
|
|
11198
11141
|
onClick: function onClick() {
|
|
11199
11142
|
return refine(item.value);
|
|
11200
11143
|
},
|
|
11201
11144
|
href: createURL(item.value)
|
|
11202
|
-
}, React__default
|
|
11203
|
-
className: cx$
|
|
11204
|
-
}, item.label), ' ', React__default
|
|
11205
|
-
className: cx$
|
|
11145
|
+
}, React__default.createElement("span", {
|
|
11146
|
+
className: cx$5('label')
|
|
11147
|
+
}, item.label), ' ', React__default.createElement("span", {
|
|
11148
|
+
className: cx$5('count')
|
|
11206
11149
|
}, item.count));
|
|
11207
11150
|
});
|
|
11208
11151
|
|
|
@@ -11220,9 +11163,9 @@ function (_Component) {
|
|
|
11220
11163
|
showMoreLimit = _this$props2.showMoreLimit,
|
|
11221
11164
|
canRefine = _this$props2.canRefine,
|
|
11222
11165
|
className = _this$props2.className;
|
|
11223
|
-
return React__default
|
|
11166
|
+
return React__default.createElement(List, {
|
|
11224
11167
|
renderItem: this.renderItem,
|
|
11225
|
-
cx: cx$
|
|
11168
|
+
cx: cx$5,
|
|
11226
11169
|
translate: translate,
|
|
11227
11170
|
items: items,
|
|
11228
11171
|
showMore: showMore,
|
|
@@ -11238,16 +11181,16 @@ function (_Component) {
|
|
|
11238
11181
|
}(React.Component);
|
|
11239
11182
|
|
|
11240
11183
|
_defineProperty(HierarchicalMenu, "propTypes", {
|
|
11241
|
-
translate: PropTypes__default
|
|
11242
|
-
refine: PropTypes__default
|
|
11243
|
-
createURL: PropTypes__default
|
|
11244
|
-
canRefine: PropTypes__default
|
|
11245
|
-
items: itemsPropType,
|
|
11246
|
-
showMore: PropTypes__default
|
|
11247
|
-
className: PropTypes__default
|
|
11248
|
-
limit: PropTypes__default
|
|
11249
|
-
showMoreLimit: PropTypes__default
|
|
11250
|
-
transformItems: PropTypes__default
|
|
11184
|
+
translate: PropTypes__default.func.isRequired,
|
|
11185
|
+
refine: PropTypes__default.func.isRequired,
|
|
11186
|
+
createURL: PropTypes__default.func.isRequired,
|
|
11187
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
11188
|
+
items: itemsPropType$2,
|
|
11189
|
+
showMore: PropTypes__default.bool,
|
|
11190
|
+
className: PropTypes__default.string,
|
|
11191
|
+
limit: PropTypes__default.number,
|
|
11192
|
+
showMoreLimit: PropTypes__default.number,
|
|
11193
|
+
transformItems: PropTypes__default.func
|
|
11251
11194
|
});
|
|
11252
11195
|
|
|
11253
11196
|
_defineProperty(HierarchicalMenu, "defaultProps", {
|
|
@@ -11351,12 +11294,12 @@ var HierarchicalMenu$1 = translatable({
|
|
|
11351
11294
|
*/
|
|
11352
11295
|
|
|
11353
11296
|
var HierarchicalMenuWidget = function HierarchicalMenuWidget(props) {
|
|
11354
|
-
return React__default
|
|
11297
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(HierarchicalMenu$1, props));
|
|
11355
11298
|
};
|
|
11356
11299
|
|
|
11357
11300
|
connectHierarchicalMenu(HierarchicalMenuWidget);
|
|
11358
11301
|
|
|
11359
|
-
var Highlight
|
|
11302
|
+
var Highlight = function Highlight(_ref) {
|
|
11360
11303
|
var cx = _ref.cx,
|
|
11361
11304
|
value = _ref.value,
|
|
11362
11305
|
highlightedTagName = _ref.highlightedTagName,
|
|
@@ -11364,16 +11307,16 @@ var Highlight$2 = function Highlight(_ref) {
|
|
|
11364
11307
|
nonHighlightedTagName = _ref.nonHighlightedTagName;
|
|
11365
11308
|
var TagName = isHighlighted ? highlightedTagName : nonHighlightedTagName;
|
|
11366
11309
|
var className = isHighlighted ? 'highlighted' : 'nonHighlighted';
|
|
11367
|
-
return React__default
|
|
11310
|
+
return React__default.createElement(TagName, {
|
|
11368
11311
|
className: cx(className)
|
|
11369
11312
|
}, value);
|
|
11370
11313
|
};
|
|
11371
|
-
Highlight
|
|
11372
|
-
cx: PropTypes__default
|
|
11373
|
-
value: PropTypes__default
|
|
11374
|
-
isHighlighted: PropTypes__default
|
|
11375
|
-
highlightedTagName: PropTypes__default
|
|
11376
|
-
nonHighlightedTagName: PropTypes__default
|
|
11314
|
+
Highlight.propTypes = {
|
|
11315
|
+
cx: PropTypes__default.func.isRequired,
|
|
11316
|
+
value: PropTypes__default.string.isRequired,
|
|
11317
|
+
isHighlighted: PropTypes__default.bool.isRequired,
|
|
11318
|
+
highlightedTagName: PropTypes__default.string.isRequired,
|
|
11319
|
+
nonHighlightedTagName: PropTypes__default.string.isRequired
|
|
11377
11320
|
};
|
|
11378
11321
|
|
|
11379
11322
|
var Highlighter = function Highlighter(_ref2) {
|
|
@@ -11391,15 +11334,15 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11391
11334
|
attribute: attribute,
|
|
11392
11335
|
highlightProperty: highlightProperty
|
|
11393
11336
|
});
|
|
11394
|
-
return React__default
|
|
11395
|
-
className: index.classnames(cx(''), className)
|
|
11337
|
+
return React__default.createElement("span", {
|
|
11338
|
+
className: index$5.classnames(cx(''), className)
|
|
11396
11339
|
}, parsedHighlightedValue.map(function (item, i) {
|
|
11397
11340
|
if (Array.isArray(item)) {
|
|
11398
11341
|
var isLast = i === parsedHighlightedValue.length - 1;
|
|
11399
|
-
return React__default
|
|
11342
|
+
return React__default.createElement("span", {
|
|
11400
11343
|
key: i
|
|
11401
11344
|
}, item.map(function (element, index) {
|
|
11402
|
-
return React__default
|
|
11345
|
+
return React__default.createElement(Highlight, {
|
|
11403
11346
|
cx: cx,
|
|
11404
11347
|
key: index,
|
|
11405
11348
|
value: element.value,
|
|
@@ -11407,12 +11350,12 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11407
11350
|
nonHighlightedTagName: nonHighlightedTagName,
|
|
11408
11351
|
isHighlighted: element.isHighlighted
|
|
11409
11352
|
});
|
|
11410
|
-
}), !isLast && React__default
|
|
11353
|
+
}), !isLast && React__default.createElement("span", {
|
|
11411
11354
|
className: cx('separator')
|
|
11412
11355
|
}, separator));
|
|
11413
11356
|
}
|
|
11414
11357
|
|
|
11415
|
-
return React__default
|
|
11358
|
+
return React__default.createElement(Highlight, {
|
|
11416
11359
|
cx: cx,
|
|
11417
11360
|
key: i,
|
|
11418
11361
|
value: item.value,
|
|
@@ -11424,15 +11367,15 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11424
11367
|
};
|
|
11425
11368
|
|
|
11426
11369
|
Highlighter.propTypes = {
|
|
11427
|
-
cx: PropTypes__default
|
|
11428
|
-
hit: PropTypes__default
|
|
11429
|
-
attribute: PropTypes__default
|
|
11430
|
-
highlight: PropTypes__default
|
|
11431
|
-
highlightProperty: PropTypes__default
|
|
11432
|
-
tagName: PropTypes__default
|
|
11433
|
-
nonHighlightedTagName: PropTypes__default
|
|
11434
|
-
className: PropTypes__default
|
|
11435
|
-
separator: PropTypes__default
|
|
11370
|
+
cx: PropTypes__default.func.isRequired,
|
|
11371
|
+
hit: PropTypes__default.object.isRequired,
|
|
11372
|
+
attribute: PropTypes__default.oneOfType([PropTypes__default.arrayOf(PropTypes__default.string), PropTypes__default.string]).isRequired,
|
|
11373
|
+
highlight: PropTypes__default.func.isRequired,
|
|
11374
|
+
highlightProperty: PropTypes__default.string.isRequired,
|
|
11375
|
+
tagName: PropTypes__default.string,
|
|
11376
|
+
nonHighlightedTagName: PropTypes__default.string,
|
|
11377
|
+
className: PropTypes__default.string,
|
|
11378
|
+
separator: PropTypes__default.node
|
|
11436
11379
|
};
|
|
11437
11380
|
Highlighter.defaultProps = {
|
|
11438
11381
|
tagName: 'em',
|
|
@@ -11441,12 +11384,12 @@ Highlighter.defaultProps = {
|
|
|
11441
11384
|
separator: ', '
|
|
11442
11385
|
};
|
|
11443
11386
|
|
|
11444
|
-
var cx$
|
|
11387
|
+
var cx$6 = createClassNames('Highlight');
|
|
11445
11388
|
|
|
11446
11389
|
var Highlight$1 = function Highlight(props) {
|
|
11447
|
-
return React__default
|
|
11390
|
+
return React__default.createElement(Highlighter, index$5._extends({}, props, {
|
|
11448
11391
|
highlightProperty: "_highlightResult",
|
|
11449
|
-
cx: cx$
|
|
11392
|
+
cx: cx$6
|
|
11450
11393
|
}));
|
|
11451
11394
|
};
|
|
11452
11395
|
|
|
@@ -11491,12 +11434,12 @@ var Highlight$1 = function Highlight(props) {
|
|
|
11491
11434
|
* );
|
|
11492
11435
|
*/
|
|
11493
11436
|
|
|
11494
|
-
var Highlight = connectHighlight(Highlight$1);
|
|
11437
|
+
var Highlight$2 = connectHighlight(Highlight$1);
|
|
11495
11438
|
|
|
11496
|
-
var cx$
|
|
11439
|
+
var cx$7 = createClassNames('Hits');
|
|
11497
11440
|
|
|
11498
11441
|
var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
11499
|
-
return React__default
|
|
11442
|
+
return React__default.createElement("div", {
|
|
11500
11443
|
style: {
|
|
11501
11444
|
borderBottom: '1px solid #bbb',
|
|
11502
11445
|
paddingBottom: '5px',
|
|
@@ -11506,33 +11449,33 @@ var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
|
11506
11449
|
}, JSON.stringify(props).slice(0, 100), "...");
|
|
11507
11450
|
};
|
|
11508
11451
|
|
|
11509
|
-
var Hits
|
|
11452
|
+
var Hits = function Hits(_ref) {
|
|
11510
11453
|
var hits = _ref.hits,
|
|
11511
11454
|
_ref$className = _ref.className,
|
|
11512
11455
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
11513
11456
|
_ref$hitComponent = _ref.hitComponent,
|
|
11514
11457
|
HitComponent = _ref$hitComponent === void 0 ? DefaultHitComponent : _ref$hitComponent;
|
|
11515
|
-
return React__default
|
|
11516
|
-
className: index.classnames(cx$
|
|
11517
|
-
}, React__default
|
|
11518
|
-
className: cx$
|
|
11458
|
+
return React__default.createElement("div", {
|
|
11459
|
+
className: index$5.classnames(cx$7(''), className)
|
|
11460
|
+
}, React__default.createElement("ul", {
|
|
11461
|
+
className: cx$7('list')
|
|
11519
11462
|
}, hits.map(function (hit) {
|
|
11520
|
-
return React__default
|
|
11521
|
-
className: cx$
|
|
11463
|
+
return React__default.createElement("li", {
|
|
11464
|
+
className: cx$7('item'),
|
|
11522
11465
|
key: hit.objectID
|
|
11523
|
-
}, React__default
|
|
11466
|
+
}, React__default.createElement(HitComponent, {
|
|
11524
11467
|
hit: hit
|
|
11525
11468
|
}));
|
|
11526
11469
|
})));
|
|
11527
11470
|
};
|
|
11528
11471
|
|
|
11529
|
-
var HitPropTypes = PropTypes__default
|
|
11530
|
-
objectID: PropTypes__default
|
|
11472
|
+
var HitPropTypes = PropTypes__default.shape({
|
|
11473
|
+
objectID: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number]).isRequired
|
|
11531
11474
|
});
|
|
11532
|
-
Hits
|
|
11533
|
-
hits: PropTypes__default
|
|
11534
|
-
className: PropTypes__default
|
|
11535
|
-
hitComponent: PropTypes__default
|
|
11475
|
+
Hits.propTypes = {
|
|
11476
|
+
hits: PropTypes__default.arrayOf(HitPropTypes.isRequired).isRequired,
|
|
11477
|
+
className: PropTypes__default.string,
|
|
11478
|
+
hitComponent: PropTypes__default.func
|
|
11536
11479
|
};
|
|
11537
11480
|
|
|
11538
11481
|
/**
|
|
@@ -11568,7 +11511,7 @@ Hits$1.propTypes = {
|
|
|
11568
11511
|
* );
|
|
11569
11512
|
*/
|
|
11570
11513
|
|
|
11571
|
-
var Hits = connectHits(Hits
|
|
11514
|
+
var Hits$1 = connectHits(Hits);
|
|
11572
11515
|
|
|
11573
11516
|
var Select =
|
|
11574
11517
|
/*#__PURE__*/
|
|
@@ -11602,12 +11545,12 @@ function (_Component) {
|
|
|
11602
11545
|
cx = _this$props.cx,
|
|
11603
11546
|
items = _this$props.items,
|
|
11604
11547
|
selectedItem = _this$props.selectedItem;
|
|
11605
|
-
return React__default
|
|
11548
|
+
return React__default.createElement("select", {
|
|
11606
11549
|
className: cx('select'),
|
|
11607
11550
|
value: selectedItem,
|
|
11608
11551
|
onChange: this.onChange
|
|
11609
11552
|
}, items.map(function (item) {
|
|
11610
|
-
return React__default
|
|
11553
|
+
return React__default.createElement("option", {
|
|
11611
11554
|
className: cx('option'),
|
|
11612
11555
|
key: item.key === undefined ? item.value : item.key,
|
|
11613
11556
|
disabled: item.disabled,
|
|
@@ -11621,18 +11564,18 @@ function (_Component) {
|
|
|
11621
11564
|
}(React.Component);
|
|
11622
11565
|
|
|
11623
11566
|
_defineProperty(Select, "propTypes", {
|
|
11624
|
-
cx: PropTypes__default
|
|
11625
|
-
onSelect: PropTypes__default
|
|
11626
|
-
items: PropTypes__default
|
|
11627
|
-
value: PropTypes__default
|
|
11628
|
-
key: PropTypes__default
|
|
11629
|
-
label: PropTypes__default
|
|
11630
|
-
disabled: PropTypes__default
|
|
11567
|
+
cx: PropTypes__default.func.isRequired,
|
|
11568
|
+
onSelect: PropTypes__default.func.isRequired,
|
|
11569
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
11570
|
+
value: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number]).isRequired,
|
|
11571
|
+
key: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number]),
|
|
11572
|
+
label: PropTypes__default.string,
|
|
11573
|
+
disabled: PropTypes__default.bool
|
|
11631
11574
|
})).isRequired,
|
|
11632
|
-
selectedItem: PropTypes__default
|
|
11575
|
+
selectedItem: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number]).isRequired
|
|
11633
11576
|
});
|
|
11634
11577
|
|
|
11635
|
-
var cx$
|
|
11578
|
+
var cx$8 = createClassNames('HitsPerPage');
|
|
11636
11579
|
|
|
11637
11580
|
var HitsPerPage =
|
|
11638
11581
|
/*#__PURE__*/
|
|
@@ -11653,13 +11596,13 @@ function (_Component) {
|
|
|
11653
11596
|
currentRefinement = _this$props.currentRefinement,
|
|
11654
11597
|
refine = _this$props.refine,
|
|
11655
11598
|
className = _this$props.className;
|
|
11656
|
-
return React__default
|
|
11657
|
-
className: index.classnames(cx$
|
|
11658
|
-
}, React__default
|
|
11599
|
+
return React__default.createElement("div", {
|
|
11600
|
+
className: index$5.classnames(cx$8(''), className)
|
|
11601
|
+
}, React__default.createElement(Select, {
|
|
11659
11602
|
onSelect: refine,
|
|
11660
11603
|
selectedItem: currentRefinement,
|
|
11661
11604
|
items: items,
|
|
11662
|
-
cx: cx$
|
|
11605
|
+
cx: cx$8
|
|
11663
11606
|
}));
|
|
11664
11607
|
}
|
|
11665
11608
|
}]);
|
|
@@ -11668,13 +11611,13 @@ function (_Component) {
|
|
|
11668
11611
|
}(React.Component);
|
|
11669
11612
|
|
|
11670
11613
|
_defineProperty(HitsPerPage, "propTypes", {
|
|
11671
|
-
items: PropTypes__default
|
|
11672
|
-
value: PropTypes__default
|
|
11673
|
-
label: PropTypes__default
|
|
11614
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
11615
|
+
value: PropTypes__default.number.isRequired,
|
|
11616
|
+
label: PropTypes__default.string
|
|
11674
11617
|
})).isRequired,
|
|
11675
|
-
currentRefinement: PropTypes__default
|
|
11676
|
-
refine: PropTypes__default
|
|
11677
|
-
className: PropTypes__default
|
|
11618
|
+
currentRefinement: PropTypes__default.number.isRequired,
|
|
11619
|
+
refine: PropTypes__default.func.isRequired,
|
|
11620
|
+
className: PropTypes__default.string
|
|
11678
11621
|
});
|
|
11679
11622
|
|
|
11680
11623
|
_defineProperty(HitsPerPage, "defaultProps", {
|
|
@@ -11725,7 +11668,7 @@ _defineProperty(HitsPerPage, "defaultProps", {
|
|
|
11725
11668
|
|
|
11726
11669
|
connectHitsPerPage(HitsPerPage);
|
|
11727
11670
|
|
|
11728
|
-
var cx$
|
|
11671
|
+
var cx$9 = createClassNames('InfiniteHits');
|
|
11729
11672
|
|
|
11730
11673
|
var InfiniteHits =
|
|
11731
11674
|
/*#__PURE__*/
|
|
@@ -11751,25 +11694,25 @@ function (_Component) {
|
|
|
11751
11694
|
refineNext = _this$props.refineNext,
|
|
11752
11695
|
translate = _this$props.translate,
|
|
11753
11696
|
className = _this$props.className;
|
|
11754
|
-
return React__default
|
|
11755
|
-
className: index.classnames(cx$
|
|
11756
|
-
}, showPrevious && React__default
|
|
11757
|
-
className: cx$
|
|
11697
|
+
return React__default.createElement("div", {
|
|
11698
|
+
className: index$5.classnames(cx$9(''), className)
|
|
11699
|
+
}, showPrevious && React__default.createElement("button", {
|
|
11700
|
+
className: cx$9('loadPrevious', !hasPrevious && 'loadPrevious--disabled'),
|
|
11758
11701
|
onClick: function onClick() {
|
|
11759
11702
|
return refinePrevious();
|
|
11760
11703
|
},
|
|
11761
11704
|
disabled: !hasPrevious
|
|
11762
|
-
}, translate('loadPrevious')), React__default
|
|
11763
|
-
className: cx$
|
|
11705
|
+
}, translate('loadPrevious')), React__default.createElement("ul", {
|
|
11706
|
+
className: cx$9('list')
|
|
11764
11707
|
}, hits.map(function (hit) {
|
|
11765
|
-
return React__default
|
|
11708
|
+
return React__default.createElement("li", {
|
|
11766
11709
|
key: hit.objectID,
|
|
11767
|
-
className: cx$
|
|
11768
|
-
}, React__default
|
|
11710
|
+
className: cx$9('item')
|
|
11711
|
+
}, React__default.createElement(HitComponent, {
|
|
11769
11712
|
hit: hit
|
|
11770
11713
|
}));
|
|
11771
|
-
})), React__default
|
|
11772
|
-
className: cx$
|
|
11714
|
+
})), React__default.createElement("button", {
|
|
11715
|
+
className: cx$9('loadMore', !hasMore && 'loadMore--disabled'),
|
|
11773
11716
|
onClick: function onClick() {
|
|
11774
11717
|
return refineNext();
|
|
11775
11718
|
},
|
|
@@ -11782,21 +11725,21 @@ function (_Component) {
|
|
|
11782
11725
|
}(React.Component);
|
|
11783
11726
|
|
|
11784
11727
|
InfiniteHits.propTypes = {
|
|
11785
|
-
hits: PropTypes__default
|
|
11786
|
-
showPrevious: PropTypes__default
|
|
11787
|
-
hasPrevious: PropTypes__default
|
|
11788
|
-
hasMore: PropTypes__default
|
|
11789
|
-
refinePrevious: PropTypes__default
|
|
11790
|
-
refineNext: PropTypes__default
|
|
11791
|
-
translate: PropTypes__default
|
|
11792
|
-
className: PropTypes__default
|
|
11793
|
-
hitComponent: PropTypes__default
|
|
11728
|
+
hits: PropTypes__default.arrayOf(PropTypes__default.object).isRequired,
|
|
11729
|
+
showPrevious: PropTypes__default.bool.isRequired,
|
|
11730
|
+
hasPrevious: PropTypes__default.bool.isRequired,
|
|
11731
|
+
hasMore: PropTypes__default.bool.isRequired,
|
|
11732
|
+
refinePrevious: PropTypes__default.func.isRequired,
|
|
11733
|
+
refineNext: PropTypes__default.func.isRequired,
|
|
11734
|
+
translate: PropTypes__default.func.isRequired,
|
|
11735
|
+
className: PropTypes__default.string,
|
|
11736
|
+
hitComponent: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.func])
|
|
11794
11737
|
};
|
|
11795
11738
|
InfiniteHits.defaultProps = {
|
|
11796
11739
|
className: '',
|
|
11797
11740
|
showPrevious: false,
|
|
11798
11741
|
hitComponent: function hitComponent(hit) {
|
|
11799
|
-
return React__default
|
|
11742
|
+
return React__default.createElement("div", {
|
|
11800
11743
|
style: {
|
|
11801
11744
|
borderBottom: '1px solid #bbb',
|
|
11802
11745
|
paddingBottom: '5px',
|
|
@@ -11850,7 +11793,7 @@ var InfiniteHits$1 = translatable({
|
|
|
11850
11793
|
|
|
11851
11794
|
connectInfiniteHits(InfiniteHits$1);
|
|
11852
11795
|
|
|
11853
|
-
var cx$
|
|
11796
|
+
var cx$a = createClassNames('Menu');
|
|
11854
11797
|
|
|
11855
11798
|
var Menu =
|
|
11856
11799
|
/*#__PURE__*/
|
|
@@ -11872,20 +11815,20 @@ function (_Component) {
|
|
|
11872
11815
|
|
|
11873
11816
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
11874
11817
|
var createURL = _this.props.createURL;
|
|
11875
|
-
var label = _this.props.isFromSearch ? React__default
|
|
11818
|
+
var label = _this.props.isFromSearch ? React__default.createElement(Highlight$2, {
|
|
11876
11819
|
attribute: "label",
|
|
11877
11820
|
hit: item
|
|
11878
11821
|
}) : item.label;
|
|
11879
|
-
return React__default
|
|
11880
|
-
className: cx$
|
|
11822
|
+
return React__default.createElement(Link, {
|
|
11823
|
+
className: cx$a('link'),
|
|
11881
11824
|
onClick: function onClick() {
|
|
11882
11825
|
return _this.selectItem(item, resetQuery);
|
|
11883
11826
|
},
|
|
11884
11827
|
href: createURL(item.value)
|
|
11885
|
-
}, React__default
|
|
11886
|
-
className: cx$
|
|
11887
|
-
}, label), ' ', React__default
|
|
11888
|
-
className: cx$
|
|
11828
|
+
}, React__default.createElement("span", {
|
|
11829
|
+
className: cx$a('label')
|
|
11830
|
+
}, label), ' ', React__default.createElement("span", {
|
|
11831
|
+
className: cx$a('count')
|
|
11889
11832
|
}, item.count));
|
|
11890
11833
|
});
|
|
11891
11834
|
|
|
@@ -11912,10 +11855,10 @@ function (_Component) {
|
|
|
11912
11855
|
searchable = _this$props.searchable,
|
|
11913
11856
|
canRefine = _this$props.canRefine,
|
|
11914
11857
|
className = _this$props.className;
|
|
11915
|
-
return React__default
|
|
11858
|
+
return React__default.createElement(List, {
|
|
11916
11859
|
renderItem: this.renderItem,
|
|
11917
11860
|
selectItem: this.selectItem,
|
|
11918
|
-
cx: cx$
|
|
11861
|
+
cx: cx$a,
|
|
11919
11862
|
translate: translate,
|
|
11920
11863
|
items: items,
|
|
11921
11864
|
showMore: showMore,
|
|
@@ -11934,24 +11877,24 @@ function (_Component) {
|
|
|
11934
11877
|
}(React.Component);
|
|
11935
11878
|
|
|
11936
11879
|
_defineProperty(Menu, "propTypes", {
|
|
11937
|
-
translate: PropTypes__default
|
|
11938
|
-
refine: PropTypes__default
|
|
11939
|
-
searchForItems: PropTypes__default
|
|
11940
|
-
searchable: PropTypes__default
|
|
11941
|
-
createURL: PropTypes__default
|
|
11942
|
-
items: PropTypes__default
|
|
11943
|
-
label: PropTypes__default
|
|
11944
|
-
value: PropTypes__default
|
|
11945
|
-
count: PropTypes__default
|
|
11946
|
-
isRefined: PropTypes__default
|
|
11880
|
+
translate: PropTypes__default.func.isRequired,
|
|
11881
|
+
refine: PropTypes__default.func.isRequired,
|
|
11882
|
+
searchForItems: PropTypes__default.func.isRequired,
|
|
11883
|
+
searchable: PropTypes__default.bool,
|
|
11884
|
+
createURL: PropTypes__default.func.isRequired,
|
|
11885
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
11886
|
+
label: PropTypes__default.string.isRequired,
|
|
11887
|
+
value: PropTypes__default.string.isRequired,
|
|
11888
|
+
count: PropTypes__default.number.isRequired,
|
|
11889
|
+
isRefined: PropTypes__default.bool.isRequired
|
|
11947
11890
|
})),
|
|
11948
|
-
isFromSearch: PropTypes__default
|
|
11949
|
-
canRefine: PropTypes__default
|
|
11950
|
-
showMore: PropTypes__default
|
|
11951
|
-
limit: PropTypes__default
|
|
11952
|
-
showMoreLimit: PropTypes__default
|
|
11953
|
-
transformItems: PropTypes__default
|
|
11954
|
-
className: PropTypes__default
|
|
11891
|
+
isFromSearch: PropTypes__default.bool.isRequired,
|
|
11892
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
11893
|
+
showMore: PropTypes__default.bool,
|
|
11894
|
+
limit: PropTypes__default.number,
|
|
11895
|
+
showMoreLimit: PropTypes__default.number,
|
|
11896
|
+
transformItems: PropTypes__default.func,
|
|
11897
|
+
className: PropTypes__default.string
|
|
11955
11898
|
});
|
|
11956
11899
|
|
|
11957
11900
|
_defineProperty(Menu, "defaultProps", {
|
|
@@ -12020,12 +11963,12 @@ var Menu$1 = translatable({
|
|
|
12020
11963
|
*/
|
|
12021
11964
|
|
|
12022
11965
|
var MenuWidget = function MenuWidget(props) {
|
|
12023
|
-
return React__default
|
|
11966
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(Menu$1, props));
|
|
12024
11967
|
};
|
|
12025
11968
|
|
|
12026
11969
|
connectMenu(MenuWidget);
|
|
12027
11970
|
|
|
12028
|
-
var cx$
|
|
11971
|
+
var cx$b = createClassNames('MenuSelect');
|
|
12029
11972
|
|
|
12030
11973
|
var MenuSelect =
|
|
12031
11974
|
/*#__PURE__*/
|
|
@@ -12062,27 +12005,27 @@ function (_Component) {
|
|
|
12062
12005
|
canRefine = _this$props.canRefine,
|
|
12063
12006
|
translate = _this$props.translate,
|
|
12064
12007
|
className = _this$props.className;
|
|
12065
|
-
return React__default
|
|
12066
|
-
className: index.classnames(cx$
|
|
12067
|
-
}, React__default
|
|
12008
|
+
return React__default.createElement("div", {
|
|
12009
|
+
className: index$5.classnames(cx$b('', !canRefine && '-noRefinement'), className)
|
|
12010
|
+
}, React__default.createElement("select", {
|
|
12068
12011
|
value: this.selectedValue,
|
|
12069
12012
|
onChange: this.handleSelectChange,
|
|
12070
|
-
className: cx$
|
|
12071
|
-
}, React__default
|
|
12013
|
+
className: cx$b('select')
|
|
12014
|
+
}, React__default.createElement("option", {
|
|
12072
12015
|
value: "ais__see__all__option",
|
|
12073
|
-
className: cx$
|
|
12016
|
+
className: cx$b('option')
|
|
12074
12017
|
}, translate('seeAllOption')), items.map(function (item) {
|
|
12075
|
-
return React__default
|
|
12018
|
+
return React__default.createElement("option", {
|
|
12076
12019
|
key: item.value,
|
|
12077
12020
|
value: item.value,
|
|
12078
|
-
className: cx$
|
|
12021
|
+
className: cx$b('option')
|
|
12079
12022
|
}, item.label, " (", item.count, ")");
|
|
12080
12023
|
})));
|
|
12081
12024
|
}
|
|
12082
12025
|
}, {
|
|
12083
12026
|
key: "selectedValue",
|
|
12084
12027
|
get: function get() {
|
|
12085
|
-
var _ref2 = find(this.props.items, function (item) {
|
|
12028
|
+
var _ref2 = find$2(this.props.items, function (item) {
|
|
12086
12029
|
return item.isRefined === true;
|
|
12087
12030
|
}) || {
|
|
12088
12031
|
value: 'ais__see__all__option'
|
|
@@ -12097,16 +12040,16 @@ function (_Component) {
|
|
|
12097
12040
|
}(React.Component);
|
|
12098
12041
|
|
|
12099
12042
|
_defineProperty(MenuSelect, "propTypes", {
|
|
12100
|
-
items: PropTypes__default
|
|
12101
|
-
label: PropTypes__default
|
|
12102
|
-
value: PropTypes__default
|
|
12103
|
-
count: PropTypes__default
|
|
12104
|
-
isRefined: PropTypes__default
|
|
12043
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
12044
|
+
label: PropTypes__default.string.isRequired,
|
|
12045
|
+
value: PropTypes__default.string.isRequired,
|
|
12046
|
+
count: PropTypes__default.oneOfType([PropTypes__default.number.isRequired, PropTypes__default.string.isRequired]),
|
|
12047
|
+
isRefined: PropTypes__default.bool.isRequired
|
|
12105
12048
|
})).isRequired,
|
|
12106
|
-
canRefine: PropTypes__default
|
|
12107
|
-
refine: PropTypes__default
|
|
12108
|
-
translate: PropTypes__default
|
|
12109
|
-
className: PropTypes__default
|
|
12049
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
12050
|
+
refine: PropTypes__default.func.isRequired,
|
|
12051
|
+
translate: PropTypes__default.func.isRequired,
|
|
12052
|
+
className: PropTypes__default.string
|
|
12110
12053
|
});
|
|
12111
12054
|
|
|
12112
12055
|
_defineProperty(MenuSelect, "defaultProps", {
|
|
@@ -12154,12 +12097,12 @@ var MenuSelect$1 = translatable({
|
|
|
12154
12097
|
*/
|
|
12155
12098
|
|
|
12156
12099
|
var MenuSelectWidget = function MenuSelectWidget(props) {
|
|
12157
|
-
return React__default
|
|
12100
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(MenuSelect$1, props));
|
|
12158
12101
|
};
|
|
12159
12102
|
|
|
12160
12103
|
connectMenu(MenuSelectWidget);
|
|
12161
12104
|
|
|
12162
|
-
var cx$
|
|
12105
|
+
var cx$c = createClassNames('NumericMenu');
|
|
12163
12106
|
|
|
12164
12107
|
var NumericMenu =
|
|
12165
12108
|
/*#__PURE__*/
|
|
@@ -12183,18 +12126,18 @@ function (_Component) {
|
|
|
12183
12126
|
var _this$props = _this.props,
|
|
12184
12127
|
refine = _this$props.refine,
|
|
12185
12128
|
translate = _this$props.translate;
|
|
12186
|
-
return React__default
|
|
12187
|
-
className: cx$
|
|
12188
|
-
}, React__default
|
|
12189
|
-
className: cx$
|
|
12129
|
+
return React__default.createElement("label", {
|
|
12130
|
+
className: cx$c('label')
|
|
12131
|
+
}, React__default.createElement("input", {
|
|
12132
|
+
className: cx$c('radio'),
|
|
12190
12133
|
type: "radio",
|
|
12191
12134
|
checked: item.isRefined,
|
|
12192
12135
|
disabled: item.noRefinement,
|
|
12193
12136
|
onChange: function onChange() {
|
|
12194
12137
|
return refine(item.value);
|
|
12195
12138
|
}
|
|
12196
|
-
}), React__default
|
|
12197
|
-
className: cx$
|
|
12139
|
+
}), React__default.createElement("span", {
|
|
12140
|
+
className: cx$c('labelText')
|
|
12198
12141
|
}, item.value === '' ? translate('all') : item.label));
|
|
12199
12142
|
});
|
|
12200
12143
|
|
|
@@ -12208,11 +12151,11 @@ function (_Component) {
|
|
|
12208
12151
|
items = _this$props2.items,
|
|
12209
12152
|
canRefine = _this$props2.canRefine,
|
|
12210
12153
|
className = _this$props2.className;
|
|
12211
|
-
return React__default
|
|
12154
|
+
return React__default.createElement(List, {
|
|
12212
12155
|
renderItem: this.renderItem,
|
|
12213
12156
|
showMore: false,
|
|
12214
12157
|
canRefine: canRefine,
|
|
12215
|
-
cx: cx$
|
|
12158
|
+
cx: cx$c,
|
|
12216
12159
|
items: items.map(function (item) {
|
|
12217
12160
|
return _objectSpread({}, item, {
|
|
12218
12161
|
key: item.value
|
|
@@ -12227,16 +12170,16 @@ function (_Component) {
|
|
|
12227
12170
|
}(React.Component);
|
|
12228
12171
|
|
|
12229
12172
|
_defineProperty(NumericMenu, "propTypes", {
|
|
12230
|
-
items: PropTypes__default
|
|
12231
|
-
label: PropTypes__default
|
|
12232
|
-
value: PropTypes__default
|
|
12233
|
-
isRefined: PropTypes__default
|
|
12234
|
-
noRefinement: PropTypes__default
|
|
12173
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
12174
|
+
label: PropTypes__default.node.isRequired,
|
|
12175
|
+
value: PropTypes__default.string.isRequired,
|
|
12176
|
+
isRefined: PropTypes__default.bool.isRequired,
|
|
12177
|
+
noRefinement: PropTypes__default.bool.isRequired
|
|
12235
12178
|
})).isRequired,
|
|
12236
|
-
canRefine: PropTypes__default
|
|
12237
|
-
refine: PropTypes__default
|
|
12238
|
-
translate: PropTypes__default
|
|
12239
|
-
className: PropTypes__default
|
|
12179
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
12180
|
+
refine: PropTypes__default.func.isRequired,
|
|
12181
|
+
translate: PropTypes__default.func.isRequired,
|
|
12182
|
+
className: PropTypes__default.string
|
|
12240
12183
|
});
|
|
12241
12184
|
|
|
12242
12185
|
_defineProperty(NumericMenu, "defaultProps", {
|
|
@@ -12294,7 +12237,7 @@ var NumericMenu$1 = translatable({
|
|
|
12294
12237
|
*/
|
|
12295
12238
|
|
|
12296
12239
|
var NumericMenuWidget = function NumericMenuWidget(props) {
|
|
12297
|
-
return React__default
|
|
12240
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(NumericMenu$1, props));
|
|
12298
12241
|
};
|
|
12299
12242
|
|
|
12300
12243
|
connectNumericMenu(NumericMenuWidget);
|
|
@@ -12319,15 +12262,15 @@ function (_Component) {
|
|
|
12319
12262
|
items = _this$props.items,
|
|
12320
12263
|
onSelect = _this$props.onSelect,
|
|
12321
12264
|
canRefine = _this$props.canRefine;
|
|
12322
|
-
return React__default
|
|
12265
|
+
return React__default.createElement("ul", {
|
|
12323
12266
|
className: cx('list', !canRefine && 'list--noRefinement')
|
|
12324
12267
|
}, items.map(function (item) {
|
|
12325
|
-
return React__default
|
|
12268
|
+
return React__default.createElement("li", {
|
|
12326
12269
|
key: item.key === undefined ? item.value : item.key,
|
|
12327
12270
|
className: cx('item', item.selected && !item.disabled && 'item--selected', item.disabled && 'item--disabled', item.modifier)
|
|
12328
|
-
}, item.disabled ? React__default
|
|
12271
|
+
}, item.disabled ? React__default.createElement("span", {
|
|
12329
12272
|
className: cx('link')
|
|
12330
|
-
}, item.label === undefined ? item.value : item.label) : React__default
|
|
12273
|
+
}, item.label === undefined ? item.value : item.label) : React__default.createElement(Link, {
|
|
12331
12274
|
className: cx('link', item.selected && 'link--selected'),
|
|
12332
12275
|
"aria-label": item.ariaLabel,
|
|
12333
12276
|
href: createURL(item.value),
|
|
@@ -12343,21 +12286,21 @@ function (_Component) {
|
|
|
12343
12286
|
}(React.Component);
|
|
12344
12287
|
|
|
12345
12288
|
_defineProperty(LinkList, "propTypes", {
|
|
12346
|
-
cx: PropTypes__default
|
|
12347
|
-
createURL: PropTypes__default
|
|
12348
|
-
items: PropTypes__default
|
|
12349
|
-
value: PropTypes__default
|
|
12350
|
-
key: PropTypes__default
|
|
12351
|
-
label: PropTypes__default
|
|
12352
|
-
modifier: PropTypes__default
|
|
12353
|
-
ariaLabel: PropTypes__default
|
|
12354
|
-
disabled: PropTypes__default
|
|
12289
|
+
cx: PropTypes__default.func.isRequired,
|
|
12290
|
+
createURL: PropTypes__default.func.isRequired,
|
|
12291
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
12292
|
+
value: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number, PropTypes__default.object]).isRequired,
|
|
12293
|
+
key: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number]),
|
|
12294
|
+
label: PropTypes__default.node,
|
|
12295
|
+
modifier: PropTypes__default.string,
|
|
12296
|
+
ariaLabel: PropTypes__default.string,
|
|
12297
|
+
disabled: PropTypes__default.bool
|
|
12355
12298
|
})),
|
|
12356
|
-
onSelect: PropTypes__default
|
|
12357
|
-
canRefine: PropTypes__default
|
|
12299
|
+
onSelect: PropTypes__default.func.isRequired,
|
|
12300
|
+
canRefine: PropTypes__default.bool.isRequired
|
|
12358
12301
|
});
|
|
12359
12302
|
|
|
12360
|
-
var cx$
|
|
12303
|
+
var cx$d = createClassNames('Pagination'); // Determines the size of the widget (the number of pages displayed - that the user can directly click on)
|
|
12361
12304
|
|
|
12362
12305
|
function calculateSize(padding, maxPages) {
|
|
12363
12306
|
return Math.min(2 * padding + 1, maxPages);
|
|
@@ -12393,7 +12336,7 @@ function getPages(currentPage, maxPages, padding) {
|
|
|
12393
12336
|
});
|
|
12394
12337
|
}
|
|
12395
12338
|
|
|
12396
|
-
var Pagination
|
|
12339
|
+
var Pagination =
|
|
12397
12340
|
/*#__PURE__*/
|
|
12398
12341
|
function (_Component) {
|
|
12399
12342
|
_inherits(Pagination, _Component);
|
|
@@ -12499,10 +12442,10 @@ function (_Component) {
|
|
|
12499
12442
|
});
|
|
12500
12443
|
}
|
|
12501
12444
|
|
|
12502
|
-
return React__default
|
|
12503
|
-
className: index.classnames(cx$
|
|
12504
|
-
}, React__default
|
|
12505
|
-
cx: cx$
|
|
12445
|
+
return React__default.createElement("div", {
|
|
12446
|
+
className: index$5.classnames(cx$d('', !canRefine && '-noRefinement'), className)
|
|
12447
|
+
}, React__default.createElement(ListComponent, index$5._extends({}, otherProps, {
|
|
12448
|
+
cx: cx$d,
|
|
12506
12449
|
items: items,
|
|
12507
12450
|
onSelect: refine,
|
|
12508
12451
|
createURL: createURL,
|
|
@@ -12514,24 +12457,24 @@ function (_Component) {
|
|
|
12514
12457
|
return Pagination;
|
|
12515
12458
|
}(React.Component);
|
|
12516
12459
|
|
|
12517
|
-
_defineProperty(Pagination
|
|
12518
|
-
nbPages: PropTypes__default
|
|
12519
|
-
currentRefinement: PropTypes__default
|
|
12520
|
-
refine: PropTypes__default
|
|
12521
|
-
createURL: PropTypes__default
|
|
12522
|
-
canRefine: PropTypes__default
|
|
12523
|
-
translate: PropTypes__default
|
|
12524
|
-
listComponent: PropTypes__default
|
|
12525
|
-
showFirst: PropTypes__default
|
|
12526
|
-
showPrevious: PropTypes__default
|
|
12527
|
-
showNext: PropTypes__default
|
|
12528
|
-
showLast: PropTypes__default
|
|
12529
|
-
padding: PropTypes__default
|
|
12530
|
-
totalPages: PropTypes__default
|
|
12531
|
-
className: PropTypes__default
|
|
12460
|
+
_defineProperty(Pagination, "propTypes", {
|
|
12461
|
+
nbPages: PropTypes__default.number.isRequired,
|
|
12462
|
+
currentRefinement: PropTypes__default.number.isRequired,
|
|
12463
|
+
refine: PropTypes__default.func.isRequired,
|
|
12464
|
+
createURL: PropTypes__default.func.isRequired,
|
|
12465
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
12466
|
+
translate: PropTypes__default.func.isRequired,
|
|
12467
|
+
listComponent: PropTypes__default.func,
|
|
12468
|
+
showFirst: PropTypes__default.bool,
|
|
12469
|
+
showPrevious: PropTypes__default.bool,
|
|
12470
|
+
showNext: PropTypes__default.bool,
|
|
12471
|
+
showLast: PropTypes__default.bool,
|
|
12472
|
+
padding: PropTypes__default.number,
|
|
12473
|
+
totalPages: PropTypes__default.number,
|
|
12474
|
+
className: PropTypes__default.string
|
|
12532
12475
|
});
|
|
12533
12476
|
|
|
12534
|
-
_defineProperty(Pagination
|
|
12477
|
+
_defineProperty(Pagination, "defaultProps", {
|
|
12535
12478
|
listComponent: LinkList,
|
|
12536
12479
|
showFirst: true,
|
|
12537
12480
|
showPrevious: true,
|
|
@@ -12542,7 +12485,7 @@ _defineProperty(Pagination$1, "defaultProps", {
|
|
|
12542
12485
|
className: ''
|
|
12543
12486
|
});
|
|
12544
12487
|
|
|
12545
|
-
var Pagination$
|
|
12488
|
+
var Pagination$1 = translatable({
|
|
12546
12489
|
previous: '‹',
|
|
12547
12490
|
next: '›',
|
|
12548
12491
|
first: '«',
|
|
@@ -12557,7 +12500,7 @@ var Pagination$2 = translatable({
|
|
|
12557
12500
|
ariaPage: function ariaPage(currentRefinement) {
|
|
12558
12501
|
return "Page ".concat(currentRefinement.toString());
|
|
12559
12502
|
}
|
|
12560
|
-
})(Pagination
|
|
12503
|
+
})(Pagination);
|
|
12561
12504
|
|
|
12562
12505
|
/**
|
|
12563
12506
|
* The Pagination widget displays a simple pagination system allowing the user to
|
|
@@ -12614,23 +12557,23 @@ var Pagination$2 = translatable({
|
|
|
12614
12557
|
*/
|
|
12615
12558
|
|
|
12616
12559
|
var PaginationWidget = function PaginationWidget(props) {
|
|
12617
|
-
return React__default
|
|
12560
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(Pagination$1, props));
|
|
12618
12561
|
};
|
|
12619
12562
|
|
|
12620
|
-
var Pagination = connectPagination(PaginationWidget);
|
|
12563
|
+
var Pagination$2 = connectPagination(PaginationWidget);
|
|
12621
12564
|
|
|
12622
|
-
var cx$
|
|
12565
|
+
var cx$e = createClassNames('PoweredBy');
|
|
12623
12566
|
/* eslint-disable max-len */
|
|
12624
12567
|
|
|
12625
12568
|
var AlgoliaLogo = function AlgoliaLogo() {
|
|
12626
|
-
return React__default
|
|
12569
|
+
return React__default.createElement("svg", {
|
|
12627
12570
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12628
12571
|
baseProfile: "basic",
|
|
12629
12572
|
viewBox: "0 0 1366 362",
|
|
12630
12573
|
width: "100",
|
|
12631
12574
|
height: "27",
|
|
12632
|
-
className: cx$
|
|
12633
|
-
}, React__default
|
|
12575
|
+
className: cx$e('logo')
|
|
12576
|
+
}, React__default.createElement("linearGradient", {
|
|
12634
12577
|
id: "g",
|
|
12635
12578
|
x1: "428.258",
|
|
12636
12579
|
x2: "434.145",
|
|
@@ -12638,19 +12581,19 @@ var AlgoliaLogo = function AlgoliaLogo() {
|
|
|
12638
12581
|
y2: "409.85",
|
|
12639
12582
|
gradientUnits: "userSpaceOnUse",
|
|
12640
12583
|
gradientTransform: "matrix(94.045 0 0 -94.072 -40381.527 38479.52)"
|
|
12641
|
-
}, React__default
|
|
12584
|
+
}, React__default.createElement("stop", {
|
|
12642
12585
|
offset: "0",
|
|
12643
12586
|
stopColor: "#00AEFF"
|
|
12644
|
-
}), React__default
|
|
12587
|
+
}), React__default.createElement("stop", {
|
|
12645
12588
|
offset: "1",
|
|
12646
12589
|
stopColor: "#3369E7"
|
|
12647
|
-
})), React__default
|
|
12590
|
+
})), React__default.createElement("path", {
|
|
12648
12591
|
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",
|
|
12649
12592
|
fill: "url(#g)"
|
|
12650
|
-
}), React__default
|
|
12593
|
+
}), React__default.createElement("path", {
|
|
12651
12594
|
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",
|
|
12652
12595
|
fill: "#FFFFFF"
|
|
12653
|
-
}), React__default
|
|
12596
|
+
}), React__default.createElement("path", {
|
|
12654
12597
|
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",
|
|
12655
12598
|
fill: "#182359"
|
|
12656
12599
|
}));
|
|
@@ -12676,17 +12619,17 @@ function (_Component) {
|
|
|
12676
12619
|
url = _this$props.url,
|
|
12677
12620
|
translate = _this$props.translate,
|
|
12678
12621
|
className = _this$props.className;
|
|
12679
|
-
return React__default
|
|
12680
|
-
className: index.classnames(cx$
|
|
12681
|
-
}, React__default
|
|
12682
|
-
className: cx$
|
|
12683
|
-
}, translate('searchBy')), ' ', React__default
|
|
12622
|
+
return React__default.createElement("div", {
|
|
12623
|
+
className: index$5.classnames(cx$e(''), className)
|
|
12624
|
+
}, React__default.createElement("span", {
|
|
12625
|
+
className: cx$e('text')
|
|
12626
|
+
}, translate('searchBy')), ' ', React__default.createElement("a", {
|
|
12684
12627
|
href: url,
|
|
12685
12628
|
target: "_blank",
|
|
12686
|
-
className: cx$
|
|
12629
|
+
className: cx$e('link'),
|
|
12687
12630
|
"aria-label": "Algolia",
|
|
12688
12631
|
rel: "noopener noreferrer"
|
|
12689
|
-
}, React__default
|
|
12632
|
+
}, React__default.createElement(AlgoliaLogo, null)));
|
|
12690
12633
|
}
|
|
12691
12634
|
}]);
|
|
12692
12635
|
|
|
@@ -12694,9 +12637,9 @@ function (_Component) {
|
|
|
12694
12637
|
}(React.Component);
|
|
12695
12638
|
|
|
12696
12639
|
_defineProperty(PoweredBy, "propTypes", {
|
|
12697
|
-
url: PropTypes__default
|
|
12698
|
-
translate: PropTypes__default
|
|
12699
|
-
className: PropTypes__default
|
|
12640
|
+
url: PropTypes__default.string.isRequired,
|
|
12641
|
+
translate: PropTypes__default.func.isRequired,
|
|
12642
|
+
className: PropTypes__default.string
|
|
12700
12643
|
});
|
|
12701
12644
|
|
|
12702
12645
|
var PoweredBy$1 = translatable({
|
|
@@ -12736,7 +12679,7 @@ var PoweredBy$1 = translatable({
|
|
|
12736
12679
|
|
|
12737
12680
|
connectPoweredBy(PoweredBy$1);
|
|
12738
12681
|
|
|
12739
|
-
var cx$
|
|
12682
|
+
var cx$f = createClassNames('RangeInput');
|
|
12740
12683
|
var RawRangeInput =
|
|
12741
12684
|
/*#__PURE__*/
|
|
12742
12685
|
function (_Component) {
|
|
@@ -12815,13 +12758,13 @@ function (_Component) {
|
|
|
12815
12758
|
max = _this$normalizeRangeF.max;
|
|
12816
12759
|
|
|
12817
12760
|
var step = 1 / Math.pow(10, precision);
|
|
12818
|
-
return React__default
|
|
12819
|
-
className: index.classnames(cx$
|
|
12820
|
-
}, React__default
|
|
12821
|
-
className: cx$
|
|
12761
|
+
return React__default.createElement("div", {
|
|
12762
|
+
className: index$5.classnames(cx$f('', !canRefine && '-noRefinement'), className)
|
|
12763
|
+
}, React__default.createElement("form", {
|
|
12764
|
+
className: cx$f('form'),
|
|
12822
12765
|
onSubmit: this.onSubmit
|
|
12823
|
-
}, React__default
|
|
12824
|
-
className: cx$
|
|
12766
|
+
}, React__default.createElement("input", {
|
|
12767
|
+
className: cx$f('input', 'input--min'),
|
|
12825
12768
|
type: "number",
|
|
12826
12769
|
min: min,
|
|
12827
12770
|
max: max,
|
|
@@ -12834,10 +12777,10 @@ function (_Component) {
|
|
|
12834
12777
|
from: e.currentTarget.value
|
|
12835
12778
|
});
|
|
12836
12779
|
}
|
|
12837
|
-
}), React__default
|
|
12838
|
-
className: cx$
|
|
12839
|
-
}, translate('separator')), React__default
|
|
12840
|
-
className: cx$
|
|
12780
|
+
}), React__default.createElement("span", {
|
|
12781
|
+
className: cx$f('separator')
|
|
12782
|
+
}, translate('separator')), React__default.createElement("input", {
|
|
12783
|
+
className: cx$f('input', 'input--max'),
|
|
12841
12784
|
type: "number",
|
|
12842
12785
|
min: min,
|
|
12843
12786
|
max: max,
|
|
@@ -12850,8 +12793,8 @@ function (_Component) {
|
|
|
12850
12793
|
to: e.currentTarget.value
|
|
12851
12794
|
});
|
|
12852
12795
|
}
|
|
12853
|
-
}), React__default
|
|
12854
|
-
className: cx$
|
|
12796
|
+
}), React__default.createElement("button", {
|
|
12797
|
+
className: cx$f('submit'),
|
|
12855
12798
|
type: "submit"
|
|
12856
12799
|
}, translate('submit'))));
|
|
12857
12800
|
}
|
|
@@ -12861,17 +12804,17 @@ function (_Component) {
|
|
|
12861
12804
|
}(React.Component);
|
|
12862
12805
|
|
|
12863
12806
|
_defineProperty(RawRangeInput, "propTypes", {
|
|
12864
|
-
canRefine: PropTypes__default
|
|
12865
|
-
precision: PropTypes__default
|
|
12866
|
-
translate: PropTypes__default
|
|
12867
|
-
refine: PropTypes__default
|
|
12868
|
-
min: PropTypes__default
|
|
12869
|
-
max: PropTypes__default
|
|
12870
|
-
currentRefinement: PropTypes__default
|
|
12871
|
-
min: PropTypes__default
|
|
12872
|
-
max: PropTypes__default
|
|
12807
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
12808
|
+
precision: PropTypes__default.number.isRequired,
|
|
12809
|
+
translate: PropTypes__default.func.isRequired,
|
|
12810
|
+
refine: PropTypes__default.func.isRequired,
|
|
12811
|
+
min: PropTypes__default.number,
|
|
12812
|
+
max: PropTypes__default.number,
|
|
12813
|
+
currentRefinement: PropTypes__default.shape({
|
|
12814
|
+
min: PropTypes__default.number,
|
|
12815
|
+
max: PropTypes__default.number
|
|
12873
12816
|
}),
|
|
12874
|
-
className: PropTypes__default
|
|
12817
|
+
className: PropTypes__default.string
|
|
12875
12818
|
});
|
|
12876
12819
|
|
|
12877
12820
|
_defineProperty(RawRangeInput, "defaultProps", {
|
|
@@ -12927,12 +12870,12 @@ var RangeInput = translatable({
|
|
|
12927
12870
|
*/
|
|
12928
12871
|
|
|
12929
12872
|
var RangeInputWidget = function RangeInputWidget(props) {
|
|
12930
|
-
return React__default
|
|
12873
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(RangeInput, props));
|
|
12931
12874
|
};
|
|
12932
12875
|
|
|
12933
12876
|
connectRange(RangeInputWidget);
|
|
12934
12877
|
|
|
12935
|
-
var cx$
|
|
12878
|
+
var cx$g = createClassNames('RatingMenu');
|
|
12936
12879
|
|
|
12937
12880
|
var RatingMenu =
|
|
12938
12881
|
/*#__PURE__*/
|
|
@@ -12983,14 +12926,14 @@ function (_Component) {
|
|
|
12983
12926
|
rating++;
|
|
12984
12927
|
}
|
|
12985
12928
|
|
|
12986
|
-
icons.push([React__default
|
|
12929
|
+
icons.push([React__default.createElement("svg", {
|
|
12987
12930
|
key: icon,
|
|
12988
|
-
className: cx$
|
|
12931
|
+
className: cx$g('starIcon', icon >= lowerBound ? 'starIcon--empty' : 'starIcon--full'),
|
|
12989
12932
|
"aria-hidden": "true",
|
|
12990
12933
|
width: "24",
|
|
12991
12934
|
height: "24"
|
|
12992
|
-
}, React__default
|
|
12993
|
-
xlinkHref: "#".concat(cx$
|
|
12935
|
+
}, React__default.createElement("use", {
|
|
12936
|
+
xlinkHref: "#".concat(cx$g(icon >= lowerBound ? 'starEmptySymbol' : 'starSymbol'))
|
|
12994
12937
|
})), ' ']);
|
|
12995
12938
|
} // The last item of the list (the default item), should not
|
|
12996
12939
|
// be clickable if it is selected.
|
|
@@ -13004,17 +12947,17 @@ function (_Component) {
|
|
|
13004
12947
|
}),
|
|
13005
12948
|
onClick: this.onClick.bind(this, lowerBound, max)
|
|
13006
12949
|
};
|
|
13007
|
-
return React__default
|
|
12950
|
+
return React__default.createElement("li", {
|
|
13008
12951
|
key: lowerBound,
|
|
13009
|
-
className: cx$
|
|
13010
|
-
}, React__default
|
|
13011
|
-
className: cx$
|
|
12952
|
+
className: cx$g('item', selected && 'item--selected', disabled && 'item--disabled')
|
|
12953
|
+
}, React__default.createElement("a", index$5._extends({
|
|
12954
|
+
className: cx$g('link'),
|
|
13012
12955
|
"aria-label": "".concat(rating).concat(translate('ratingLabel'))
|
|
13013
|
-
}, onClickHandler), icons, React__default
|
|
13014
|
-
className: cx$
|
|
12956
|
+
}, onClickHandler), icons, React__default.createElement("span", {
|
|
12957
|
+
className: cx$g('label'),
|
|
13015
12958
|
"aria-hidden": "true"
|
|
13016
|
-
}, translate('ratingLabel')), ' ', React__default
|
|
13017
|
-
className: cx$
|
|
12959
|
+
}, translate('ratingLabel')), ' ', React__default.createElement("span", {
|
|
12960
|
+
className: cx$g('count')
|
|
13018
12961
|
}, count)));
|
|
13019
12962
|
}
|
|
13020
12963
|
}, {
|
|
@@ -13046,7 +12989,7 @@ function (_Component) {
|
|
|
13046
12989
|
start: 0,
|
|
13047
12990
|
end: Math.max(inclusiveLength, 0)
|
|
13048
12991
|
}).map(function (index) {
|
|
13049
|
-
var element = find(values, function (item) {
|
|
12992
|
+
var element = find$2(values, function (item) {
|
|
13050
12993
|
return item.value === limitMax - index;
|
|
13051
12994
|
});
|
|
13052
12995
|
var placeholder = {
|
|
@@ -13069,25 +13012,25 @@ function (_Component) {
|
|
|
13069
13012
|
createURL: createURL
|
|
13070
13013
|
});
|
|
13071
13014
|
});
|
|
13072
|
-
return React__default
|
|
13073
|
-
className: index.classnames(cx$
|
|
13074
|
-
}, React__default
|
|
13015
|
+
return React__default.createElement("div", {
|
|
13016
|
+
className: index$5.classnames(cx$g('', !canRefine && '-noRefinement'), className)
|
|
13017
|
+
}, React__default.createElement("svg", {
|
|
13075
13018
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13076
13019
|
style: {
|
|
13077
13020
|
display: 'none'
|
|
13078
13021
|
}
|
|
13079
|
-
}, React__default
|
|
13080
|
-
id: cx$
|
|
13022
|
+
}, React__default.createElement("symbol", {
|
|
13023
|
+
id: cx$g('starSymbol'),
|
|
13081
13024
|
viewBox: "0 0 24 24"
|
|
13082
|
-
}, React__default
|
|
13025
|
+
}, React__default.createElement("path", {
|
|
13083
13026
|
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"
|
|
13084
|
-
})), React__default
|
|
13085
|
-
id: cx$
|
|
13027
|
+
})), React__default.createElement("symbol", {
|
|
13028
|
+
id: cx$g('starEmptySymbol'),
|
|
13086
13029
|
viewBox: "0 0 24 24"
|
|
13087
|
-
}, React__default
|
|
13030
|
+
}, React__default.createElement("path", {
|
|
13088
13031
|
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"
|
|
13089
|
-
}))), React__default
|
|
13090
|
-
className: cx$
|
|
13032
|
+
}))), React__default.createElement("ul", {
|
|
13033
|
+
className: cx$g('list', !canRefine && 'list--noRefinement')
|
|
13091
13034
|
}, items));
|
|
13092
13035
|
}
|
|
13093
13036
|
}]);
|
|
@@ -13096,21 +13039,21 @@ function (_Component) {
|
|
|
13096
13039
|
}(React.Component);
|
|
13097
13040
|
|
|
13098
13041
|
_defineProperty(RatingMenu, "propTypes", {
|
|
13099
|
-
translate: PropTypes__default
|
|
13100
|
-
refine: PropTypes__default
|
|
13101
|
-
createURL: PropTypes__default
|
|
13102
|
-
min: PropTypes__default
|
|
13103
|
-
max: PropTypes__default
|
|
13104
|
-
currentRefinement: PropTypes__default
|
|
13105
|
-
min: PropTypes__default
|
|
13106
|
-
max: PropTypes__default
|
|
13042
|
+
translate: PropTypes__default.func.isRequired,
|
|
13043
|
+
refine: PropTypes__default.func.isRequired,
|
|
13044
|
+
createURL: PropTypes__default.func.isRequired,
|
|
13045
|
+
min: PropTypes__default.number,
|
|
13046
|
+
max: PropTypes__default.number,
|
|
13047
|
+
currentRefinement: PropTypes__default.shape({
|
|
13048
|
+
min: PropTypes__default.number,
|
|
13049
|
+
max: PropTypes__default.number
|
|
13107
13050
|
}),
|
|
13108
|
-
count: PropTypes__default
|
|
13109
|
-
value: PropTypes__default
|
|
13110
|
-
count: PropTypes__default
|
|
13051
|
+
count: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
13052
|
+
value: PropTypes__default.string,
|
|
13053
|
+
count: PropTypes__default.number
|
|
13111
13054
|
})),
|
|
13112
|
-
canRefine: PropTypes__default
|
|
13113
|
-
className: PropTypes__default
|
|
13055
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
13056
|
+
className: PropTypes__default.string
|
|
13114
13057
|
});
|
|
13115
13058
|
|
|
13116
13059
|
_defineProperty(RatingMenu, "defaultProps", {
|
|
@@ -13170,12 +13113,12 @@ var RatingMenu$1 = translatable({
|
|
|
13170
13113
|
*/
|
|
13171
13114
|
|
|
13172
13115
|
var RatingMenuWidget = function RatingMenuWidget(props) {
|
|
13173
|
-
return React__default
|
|
13116
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(RatingMenu$1, props));
|
|
13174
13117
|
};
|
|
13175
13118
|
|
|
13176
13119
|
connectRange(RatingMenuWidget);
|
|
13177
13120
|
|
|
13178
|
-
var cx$
|
|
13121
|
+
var cx$h = createClassNames('RefinementList');
|
|
13179
13122
|
|
|
13180
13123
|
var RefinementList$1 =
|
|
13181
13124
|
/*#__PURE__*/
|
|
@@ -13206,23 +13149,23 @@ function (_Component) {
|
|
|
13206
13149
|
});
|
|
13207
13150
|
|
|
13208
13151
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
13209
|
-
var label = _this.props.isFromSearch ? React__default
|
|
13152
|
+
var label = _this.props.isFromSearch ? React__default.createElement(Highlight$2, {
|
|
13210
13153
|
attribute: "label",
|
|
13211
13154
|
hit: item
|
|
13212
13155
|
}) : item.label;
|
|
13213
|
-
return React__default
|
|
13214
|
-
className: cx$
|
|
13215
|
-
}, React__default
|
|
13216
|
-
className: cx$
|
|
13156
|
+
return React__default.createElement("label", {
|
|
13157
|
+
className: cx$h('label')
|
|
13158
|
+
}, React__default.createElement("input", {
|
|
13159
|
+
className: cx$h('checkbox'),
|
|
13217
13160
|
type: "checkbox",
|
|
13218
13161
|
checked: item.isRefined,
|
|
13219
13162
|
onChange: function onChange() {
|
|
13220
13163
|
return _this.selectItem(item, resetQuery);
|
|
13221
13164
|
}
|
|
13222
|
-
}), React__default
|
|
13223
|
-
className: cx$
|
|
13224
|
-
}, label), ' ', React__default
|
|
13225
|
-
className: cx$
|
|
13165
|
+
}), React__default.createElement("span", {
|
|
13166
|
+
className: cx$h('labelText')
|
|
13167
|
+
}, label), ' ', React__default.createElement("span", {
|
|
13168
|
+
className: cx$h('count')
|
|
13226
13169
|
}, item.count.toLocaleString()));
|
|
13227
13170
|
});
|
|
13228
13171
|
|
|
@@ -13243,10 +13186,10 @@ function (_Component) {
|
|
|
13243
13186
|
searchable = _this$props.searchable,
|
|
13244
13187
|
canRefine = _this$props.canRefine,
|
|
13245
13188
|
className = _this$props.className;
|
|
13246
|
-
return React__default
|
|
13189
|
+
return React__default.createElement(List, {
|
|
13247
13190
|
renderItem: this.renderItem,
|
|
13248
13191
|
selectItem: this.selectItem,
|
|
13249
|
-
cx: cx$
|
|
13192
|
+
cx: cx$h,
|
|
13250
13193
|
translate: translate,
|
|
13251
13194
|
items: items,
|
|
13252
13195
|
showMore: showMore,
|
|
@@ -13266,24 +13209,24 @@ function (_Component) {
|
|
|
13266
13209
|
}(React.Component);
|
|
13267
13210
|
|
|
13268
13211
|
_defineProperty(RefinementList$1, "propTypes", {
|
|
13269
|
-
translate: PropTypes__default
|
|
13270
|
-
refine: PropTypes__default
|
|
13271
|
-
searchForItems: PropTypes__default
|
|
13272
|
-
searchable: PropTypes__default
|
|
13273
|
-
createURL: PropTypes__default
|
|
13274
|
-
items: PropTypes__default
|
|
13275
|
-
label: PropTypes__default
|
|
13276
|
-
value: PropTypes__default
|
|
13277
|
-
count: PropTypes__default
|
|
13278
|
-
isRefined: PropTypes__default
|
|
13212
|
+
translate: PropTypes__default.func.isRequired,
|
|
13213
|
+
refine: PropTypes__default.func.isRequired,
|
|
13214
|
+
searchForItems: PropTypes__default.func.isRequired,
|
|
13215
|
+
searchable: PropTypes__default.bool,
|
|
13216
|
+
createURL: PropTypes__default.func.isRequired,
|
|
13217
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
13218
|
+
label: PropTypes__default.string.isRequired,
|
|
13219
|
+
value: PropTypes__default.arrayOf(PropTypes__default.string).isRequired,
|
|
13220
|
+
count: PropTypes__default.number.isRequired,
|
|
13221
|
+
isRefined: PropTypes__default.bool.isRequired
|
|
13279
13222
|
})),
|
|
13280
|
-
isFromSearch: PropTypes__default
|
|
13281
|
-
canRefine: PropTypes__default
|
|
13282
|
-
showMore: PropTypes__default
|
|
13283
|
-
limit: PropTypes__default
|
|
13284
|
-
showMoreLimit: PropTypes__default
|
|
13285
|
-
transformItems: PropTypes__default
|
|
13286
|
-
className: PropTypes__default
|
|
13223
|
+
isFromSearch: PropTypes__default.bool.isRequired,
|
|
13224
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
13225
|
+
showMore: PropTypes__default.bool,
|
|
13226
|
+
limit: PropTypes__default.number,
|
|
13227
|
+
showMoreLimit: PropTypes__default.number,
|
|
13228
|
+
transformItems: PropTypes__default.func,
|
|
13229
|
+
className: PropTypes__default.string
|
|
13287
13230
|
});
|
|
13288
13231
|
|
|
13289
13232
|
_defineProperty(RefinementList$1, "defaultProps", {
|
|
@@ -13355,12 +13298,12 @@ var RefinementList$2 = translatable({
|
|
|
13355
13298
|
*/
|
|
13356
13299
|
|
|
13357
13300
|
var RefinementListWidget = function RefinementListWidget(props) {
|
|
13358
|
-
return React__default
|
|
13301
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(RefinementList$2, props));
|
|
13359
13302
|
};
|
|
13360
13303
|
|
|
13361
|
-
var RefinementList = connectRefinementList(RefinementListWidget);
|
|
13304
|
+
var RefinementList$3 = connectRefinementList(RefinementListWidget);
|
|
13362
13305
|
|
|
13363
|
-
var cx$
|
|
13306
|
+
var cx$i = createClassNames('ScrollTo');
|
|
13364
13307
|
|
|
13365
13308
|
var ScrollTo =
|
|
13366
13309
|
/*#__PURE__*/
|
|
@@ -13389,11 +13332,11 @@ function (_Component) {
|
|
|
13389
13332
|
value: function render() {
|
|
13390
13333
|
var _this = this;
|
|
13391
13334
|
|
|
13392
|
-
return React__default
|
|
13335
|
+
return React__default.createElement("div", {
|
|
13393
13336
|
ref: function ref(_ref) {
|
|
13394
13337
|
return _this.el = _ref;
|
|
13395
13338
|
},
|
|
13396
|
-
className: cx$
|
|
13339
|
+
className: cx$i('')
|
|
13397
13340
|
}, this.props.children);
|
|
13398
13341
|
}
|
|
13399
13342
|
}]);
|
|
@@ -13402,9 +13345,9 @@ function (_Component) {
|
|
|
13402
13345
|
}(React.Component);
|
|
13403
13346
|
|
|
13404
13347
|
_defineProperty(ScrollTo, "propTypes", {
|
|
13405
|
-
value: PropTypes__default
|
|
13406
|
-
children: PropTypes__default
|
|
13407
|
-
hasNotChanged: PropTypes__default
|
|
13348
|
+
value: PropTypes__default.any,
|
|
13349
|
+
children: PropTypes__default.node,
|
|
13350
|
+
hasNotChanged: PropTypes__default.bool
|
|
13408
13351
|
});
|
|
13409
13352
|
|
|
13410
13353
|
/**
|
|
@@ -13487,14 +13430,14 @@ connectScrollTo(ScrollTo);
|
|
|
13487
13430
|
* );
|
|
13488
13431
|
*/
|
|
13489
13432
|
|
|
13490
|
-
var SearchBox = connectSearchBox(SearchBox$
|
|
13433
|
+
var SearchBox$2 = connectSearchBox(SearchBox$1);
|
|
13491
13434
|
|
|
13492
|
-
var cx$
|
|
13435
|
+
var cx$j = createClassNames('Snippet');
|
|
13493
13436
|
|
|
13494
13437
|
var Snippet = function Snippet(props) {
|
|
13495
|
-
return React__default
|
|
13438
|
+
return React__default.createElement(Highlighter, index$5._extends({}, props, {
|
|
13496
13439
|
highlightProperty: "_snippetResult",
|
|
13497
|
-
cx: cx$
|
|
13440
|
+
cx: cx$j
|
|
13498
13441
|
}));
|
|
13499
13442
|
};
|
|
13500
13443
|
|
|
@@ -13544,11 +13487,11 @@ var Snippet = function Snippet(props) {
|
|
|
13544
13487
|
|
|
13545
13488
|
connectHighlight(Snippet);
|
|
13546
13489
|
|
|
13547
|
-
var cx$
|
|
13490
|
+
var cx$k = createClassNames('RelevantSort');
|
|
13548
13491
|
|
|
13549
13492
|
var DefaultButtonTextComponent = function DefaultButtonTextComponent(_ref) {
|
|
13550
13493
|
var isRelevantSorted = _ref.isRelevantSorted;
|
|
13551
|
-
return React__default
|
|
13494
|
+
return React__default.createElement("span", null, isRelevantSorted ? 'See all results' : 'See relevant results');
|
|
13552
13495
|
};
|
|
13553
13496
|
|
|
13554
13497
|
var RelevantSort = function RelevantSort(_ref2) {
|
|
@@ -13560,34 +13503,34 @@ var RelevantSort = function RelevantSort(_ref2) {
|
|
|
13560
13503
|
ButtonTextComponent = _ref2$buttonTextCompo === void 0 ? DefaultButtonTextComponent : _ref2$buttonTextCompo,
|
|
13561
13504
|
TextComponent = _ref2.textComponent,
|
|
13562
13505
|
refine = _ref2.refine;
|
|
13563
|
-
return !isVirtualReplica ? null : React__default
|
|
13564
|
-
className: index.classnames(cx$
|
|
13565
|
-
}, React__default
|
|
13566
|
-
className: cx$
|
|
13567
|
-
}, TextComponent && React__default
|
|
13506
|
+
return !isVirtualReplica ? null : React__default.createElement("div", {
|
|
13507
|
+
className: index$5.classnames(cx$k(''), className)
|
|
13508
|
+
}, React__default.createElement("div", {
|
|
13509
|
+
className: cx$k('text')
|
|
13510
|
+
}, TextComponent && React__default.createElement(TextComponent, {
|
|
13568
13511
|
isRelevantSorted: isRelevantSorted
|
|
13569
|
-
})), React__default
|
|
13570
|
-
className: cx$
|
|
13512
|
+
})), React__default.createElement("button", {
|
|
13513
|
+
className: cx$k('button'),
|
|
13571
13514
|
onClick: function onClick() {
|
|
13572
13515
|
return refine(isRelevantSorted ? 0 : undefined);
|
|
13573
13516
|
}
|
|
13574
|
-
}, React__default
|
|
13517
|
+
}, React__default.createElement(ButtonTextComponent, {
|
|
13575
13518
|
isRelevantSorted: isRelevantSorted
|
|
13576
13519
|
})));
|
|
13577
13520
|
};
|
|
13578
13521
|
|
|
13579
13522
|
RelevantSort.propTypes = {
|
|
13580
|
-
buttonTextComponent: PropTypes__default
|
|
13581
|
-
className: PropTypes__default
|
|
13582
|
-
isVirtualReplica: PropTypes__default
|
|
13583
|
-
isRelevantSorted: PropTypes__default
|
|
13584
|
-
refine: PropTypes__default
|
|
13585
|
-
textComponent: PropTypes__default
|
|
13523
|
+
buttonTextComponent: PropTypes__default.func,
|
|
13524
|
+
className: PropTypes__default.string,
|
|
13525
|
+
isVirtualReplica: PropTypes__default.bool.isRequired,
|
|
13526
|
+
isRelevantSorted: PropTypes__default.bool.isRequired,
|
|
13527
|
+
refine: PropTypes__default.func.isRequired,
|
|
13528
|
+
textComponent: PropTypes__default.func
|
|
13586
13529
|
};
|
|
13587
13530
|
|
|
13588
13531
|
connectRelevantSort(RelevantSort);
|
|
13589
13532
|
|
|
13590
|
-
var cx$
|
|
13533
|
+
var cx$l = createClassNames('SortBy');
|
|
13591
13534
|
|
|
13592
13535
|
var SortBy =
|
|
13593
13536
|
/*#__PURE__*/
|
|
@@ -13608,10 +13551,10 @@ function (_Component) {
|
|
|
13608
13551
|
currentRefinement = _this$props.currentRefinement,
|
|
13609
13552
|
refine = _this$props.refine,
|
|
13610
13553
|
className = _this$props.className;
|
|
13611
|
-
return React__default
|
|
13612
|
-
className: index.classnames(cx$
|
|
13613
|
-
}, React__default
|
|
13614
|
-
cx: cx$
|
|
13554
|
+
return React__default.createElement("div", {
|
|
13555
|
+
className: index$5.classnames(cx$l(''), className)
|
|
13556
|
+
}, React__default.createElement(Select, {
|
|
13557
|
+
cx: cx$l,
|
|
13615
13558
|
items: items,
|
|
13616
13559
|
selectedItem: currentRefinement,
|
|
13617
13560
|
onSelect: refine
|
|
@@ -13623,13 +13566,13 @@ function (_Component) {
|
|
|
13623
13566
|
}(React.Component);
|
|
13624
13567
|
|
|
13625
13568
|
_defineProperty(SortBy, "propTypes", {
|
|
13626
|
-
items: PropTypes__default
|
|
13627
|
-
label: PropTypes__default
|
|
13628
|
-
value: PropTypes__default
|
|
13569
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
13570
|
+
label: PropTypes__default.string,
|
|
13571
|
+
value: PropTypes__default.string.isRequired
|
|
13629
13572
|
})).isRequired,
|
|
13630
|
-
currentRefinement: PropTypes__default
|
|
13631
|
-
refine: PropTypes__default
|
|
13632
|
-
className: PropTypes__default
|
|
13573
|
+
currentRefinement: PropTypes__default.string.isRequired,
|
|
13574
|
+
refine: PropTypes__default.func.isRequired,
|
|
13575
|
+
className: PropTypes__default.string
|
|
13633
13576
|
});
|
|
13634
13577
|
|
|
13635
13578
|
_defineProperty(SortBy, "defaultProps", {
|
|
@@ -13677,7 +13620,7 @@ _defineProperty(SortBy, "defaultProps", {
|
|
|
13677
13620
|
|
|
13678
13621
|
connectSortBy(SortBy);
|
|
13679
13622
|
|
|
13680
|
-
var cx$
|
|
13623
|
+
var cx$m = createClassNames('Stats');
|
|
13681
13624
|
|
|
13682
13625
|
var Stats = function Stats(_ref) {
|
|
13683
13626
|
var _ref$className = _ref.className,
|
|
@@ -13687,20 +13630,20 @@ var Stats = function Stats(_ref) {
|
|
|
13687
13630
|
nbSortedHits = _ref.nbSortedHits,
|
|
13688
13631
|
processingTimeMS = _ref.processingTimeMS,
|
|
13689
13632
|
translate = _ref.translate;
|
|
13690
|
-
return React__default
|
|
13691
|
-
className: index.classnames(cx$
|
|
13692
|
-
}, React__default
|
|
13693
|
-
className: cx$
|
|
13633
|
+
return React__default.createElement("div", {
|
|
13634
|
+
className: index$5.classnames(cx$m(''), className)
|
|
13635
|
+
}, React__default.createElement("span", {
|
|
13636
|
+
className: cx$m('text')
|
|
13694
13637
|
}, translate('stats', nbHits, processingTimeMS, nbSortedHits, areHitsSorted)));
|
|
13695
13638
|
};
|
|
13696
13639
|
|
|
13697
13640
|
Stats.propTypes = {
|
|
13698
|
-
className: PropTypes__default
|
|
13699
|
-
areHitsSorted: PropTypes__default
|
|
13700
|
-
nbHits: PropTypes__default
|
|
13701
|
-
nbSortedHits: PropTypes__default
|
|
13702
|
-
processingTimeMS: PropTypes__default
|
|
13703
|
-
translate: PropTypes__default
|
|
13641
|
+
className: PropTypes__default.string,
|
|
13642
|
+
areHitsSorted: PropTypes__default.bool.isRequired,
|
|
13643
|
+
nbHits: PropTypes__default.number.isRequired,
|
|
13644
|
+
nbSortedHits: PropTypes__default.number,
|
|
13645
|
+
processingTimeMS: PropTypes__default.number.isRequired,
|
|
13646
|
+
translate: PropTypes__default.func.isRequired
|
|
13704
13647
|
};
|
|
13705
13648
|
var Stats$1 = translatable({
|
|
13706
13649
|
stats: function stats(n, ms, nSorted, areHitsSorted) {
|
|
@@ -13738,7 +13681,7 @@ var Stats$1 = translatable({
|
|
|
13738
13681
|
|
|
13739
13682
|
connectStats(Stats$1);
|
|
13740
13683
|
|
|
13741
|
-
var cx$
|
|
13684
|
+
var cx$n = createClassNames('ToggleRefinement');
|
|
13742
13685
|
|
|
13743
13686
|
var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
13744
13687
|
var currentRefinement = _ref.currentRefinement,
|
|
@@ -13746,28 +13689,28 @@ var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
|
13746
13689
|
canRefine = _ref.canRefine,
|
|
13747
13690
|
refine = _ref.refine,
|
|
13748
13691
|
className = _ref.className;
|
|
13749
|
-
return React__default
|
|
13750
|
-
className: index.classnames(cx$
|
|
13751
|
-
}, React__default
|
|
13752
|
-
className: cx$
|
|
13753
|
-
}, React__default
|
|
13754
|
-
className: cx$
|
|
13692
|
+
return React__default.createElement("div", {
|
|
13693
|
+
className: index$5.classnames(cx$n('', !canRefine && '-noRefinement'), className)
|
|
13694
|
+
}, React__default.createElement("label", {
|
|
13695
|
+
className: cx$n('label')
|
|
13696
|
+
}, React__default.createElement("input", {
|
|
13697
|
+
className: cx$n('checkbox'),
|
|
13755
13698
|
type: "checkbox",
|
|
13756
13699
|
checked: currentRefinement,
|
|
13757
13700
|
onChange: function onChange(event) {
|
|
13758
13701
|
return refine(event.target.checked);
|
|
13759
13702
|
}
|
|
13760
|
-
}), React__default
|
|
13761
|
-
className: cx$
|
|
13703
|
+
}), React__default.createElement("span", {
|
|
13704
|
+
className: cx$n('labelText')
|
|
13762
13705
|
}, label)));
|
|
13763
13706
|
};
|
|
13764
13707
|
|
|
13765
13708
|
ToggleRefinement.propTypes = {
|
|
13766
|
-
currentRefinement: PropTypes__default
|
|
13767
|
-
label: PropTypes__default
|
|
13768
|
-
canRefine: PropTypes__default
|
|
13769
|
-
refine: PropTypes__default
|
|
13770
|
-
className: PropTypes__default
|
|
13709
|
+
currentRefinement: PropTypes__default.bool.isRequired,
|
|
13710
|
+
label: PropTypes__default.string.isRequired,
|
|
13711
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
13712
|
+
refine: PropTypes__default.func.isRequired,
|
|
13713
|
+
className: PropTypes__default.string
|
|
13771
13714
|
};
|
|
13772
13715
|
ToggleRefinement.defaultProps = {
|
|
13773
13716
|
className: ''
|
|
@@ -13967,11 +13910,11 @@ function createVoiceSearchHelper(_ref) {
|
|
|
13967
13910
|
};
|
|
13968
13911
|
}
|
|
13969
13912
|
|
|
13970
|
-
var cx$
|
|
13913
|
+
var cx$o = createClassNames('VoiceSearch');
|
|
13971
13914
|
|
|
13972
13915
|
var ButtonSvg = function ButtonSvg(_ref) {
|
|
13973
13916
|
var children = _ref.children;
|
|
13974
|
-
return React__default
|
|
13917
|
+
return React__default.createElement("svg", {
|
|
13975
13918
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13976
13919
|
width: "16",
|
|
13977
13920
|
height: "16",
|
|
@@ -13988,36 +13931,36 @@ var DefaultButtonText = function DefaultButtonText(_ref2) {
|
|
|
13988
13931
|
var status = _ref2.status,
|
|
13989
13932
|
errorCode = _ref2.errorCode,
|
|
13990
13933
|
isListening = _ref2.isListening;
|
|
13991
|
-
return status === 'error' && errorCode === 'not-allowed' ? React__default
|
|
13934
|
+
return status === 'error' && errorCode === 'not-allowed' ? React__default.createElement(ButtonSvg, null, React__default.createElement("line", {
|
|
13992
13935
|
x1: "1",
|
|
13993
13936
|
y1: "1",
|
|
13994
13937
|
x2: "23",
|
|
13995
13938
|
y2: "23"
|
|
13996
|
-
}), React__default
|
|
13939
|
+
}), React__default.createElement("path", {
|
|
13997
13940
|
d: "M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"
|
|
13998
|
-
}), React__default
|
|
13941
|
+
}), React__default.createElement("path", {
|
|
13999
13942
|
d: "M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"
|
|
14000
|
-
}), React__default
|
|
13943
|
+
}), React__default.createElement("line", {
|
|
14001
13944
|
x1: "12",
|
|
14002
13945
|
y1: "19",
|
|
14003
13946
|
x2: "12",
|
|
14004
13947
|
y2: "23"
|
|
14005
|
-
}), React__default
|
|
13948
|
+
}), React__default.createElement("line", {
|
|
14006
13949
|
x1: "8",
|
|
14007
13950
|
y1: "23",
|
|
14008
13951
|
x2: "16",
|
|
14009
13952
|
y2: "23"
|
|
14010
|
-
})) : React__default
|
|
13953
|
+
})) : React__default.createElement(ButtonSvg, null, React__default.createElement("path", {
|
|
14011
13954
|
d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z",
|
|
14012
13955
|
fill: isListening ? 'currentColor' : ''
|
|
14013
|
-
}), React__default
|
|
13956
|
+
}), React__default.createElement("path", {
|
|
14014
13957
|
d: "M19 10v2a7 7 0 0 1-14 0v-2"
|
|
14015
|
-
}), React__default
|
|
13958
|
+
}), React__default.createElement("line", {
|
|
14016
13959
|
x1: "12",
|
|
14017
13960
|
y1: "19",
|
|
14018
13961
|
x2: "12",
|
|
14019
13962
|
y2: "23"
|
|
14020
|
-
}), React__default
|
|
13963
|
+
}), React__default.createElement("line", {
|
|
14021
13964
|
x1: "8",
|
|
14022
13965
|
y1: "23",
|
|
14023
13966
|
x2: "16",
|
|
@@ -14027,7 +13970,7 @@ var DefaultButtonText = function DefaultButtonText(_ref2) {
|
|
|
14027
13970
|
|
|
14028
13971
|
var DefaultStatus = function DefaultStatus(_ref3) {
|
|
14029
13972
|
var transcript = _ref3.transcript;
|
|
14030
|
-
return React__default
|
|
13973
|
+
return React__default.createElement("p", null, transcript);
|
|
14031
13974
|
};
|
|
14032
13975
|
|
|
14033
13976
|
var VoiceSearch =
|
|
@@ -14112,17 +14055,17 @@ function (_Component) {
|
|
|
14112
14055
|
isSpeechFinal: isSpeechFinal,
|
|
14113
14056
|
isBrowserSupported: isBrowserSupported()
|
|
14114
14057
|
};
|
|
14115
|
-
return React__default
|
|
14116
|
-
className: cx$
|
|
14117
|
-
}, React__default
|
|
14118
|
-
className: cx$
|
|
14058
|
+
return React__default.createElement("div", {
|
|
14059
|
+
className: cx$o('')
|
|
14060
|
+
}, React__default.createElement("button", {
|
|
14061
|
+
className: cx$o('button'),
|
|
14119
14062
|
type: "button",
|
|
14120
14063
|
title: isBrowserSupported() ? translate('buttonTitle') : translate('disabledButtonTitle'),
|
|
14121
14064
|
onClick: this.onClick,
|
|
14122
14065
|
disabled: !isBrowserSupported()
|
|
14123
|
-
}, React__default
|
|
14124
|
-
className: cx$
|
|
14125
|
-
}, React__default
|
|
14066
|
+
}, React__default.createElement(ButtonTextComponent, innerProps)), React__default.createElement("div", {
|
|
14067
|
+
className: cx$o('status')
|
|
14068
|
+
}, React__default.createElement(StatusComponent, innerProps)));
|
|
14126
14069
|
}
|
|
14127
14070
|
}, {
|
|
14128
14071
|
key: "componentWillUnmount",
|
|
@@ -14149,27 +14092,27 @@ var VoiceSearch$1 = translatable({
|
|
|
14149
14092
|
|
|
14150
14093
|
connectVoiceSearch(VoiceSearch$1);
|
|
14151
14094
|
|
|
14152
|
-
var cx = createClassNames('QueryRuleCustomData');
|
|
14095
|
+
var cx$p = createClassNames('QueryRuleCustomData');
|
|
14153
14096
|
|
|
14154
14097
|
var QueryRuleCustomData = function QueryRuleCustomData(_ref) {
|
|
14155
14098
|
var items = _ref.items,
|
|
14156
14099
|
className = _ref.className,
|
|
14157
14100
|
children = _ref.children;
|
|
14158
|
-
return React__default
|
|
14159
|
-
className: index.classnames(cx(''), className)
|
|
14101
|
+
return React__default.createElement("div", {
|
|
14102
|
+
className: index$5.classnames(cx$p(''), className)
|
|
14160
14103
|
}, children({
|
|
14161
14104
|
items: items
|
|
14162
14105
|
}));
|
|
14163
14106
|
};
|
|
14164
14107
|
|
|
14165
14108
|
QueryRuleCustomData.propTypes = {
|
|
14166
|
-
items: PropTypes__default
|
|
14167
|
-
className: PropTypes__default
|
|
14168
|
-
children: PropTypes__default
|
|
14109
|
+
items: PropTypes__default.arrayOf(PropTypes__default.object).isRequired,
|
|
14110
|
+
className: PropTypes__default.string,
|
|
14111
|
+
children: PropTypes__default.func.isRequired
|
|
14169
14112
|
};
|
|
14170
14113
|
|
|
14171
14114
|
var QueryRuleCustomDataWidget = function QueryRuleCustomDataWidget(props) {
|
|
14172
|
-
return React__default
|
|
14115
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(QueryRuleCustomData, props));
|
|
14173
14116
|
};
|
|
14174
14117
|
|
|
14175
14118
|
connectQueryRules(QueryRuleCustomDataWidget);
|
|
@@ -14193,57 +14136,57 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14193
14136
|
|
|
14194
14137
|
var hit = props.hit;
|
|
14195
14138
|
if (moment.moment().isSameOrBefore(props.hit.pubDateSort)) return null;
|
|
14196
|
-
return React__default
|
|
14139
|
+
return React__default.createElement(
|
|
14197
14140
|
'div',
|
|
14198
14141
|
{ key: hit.url, className: 'hitResult ' + styles.article },
|
|
14199
|
-
React__default
|
|
14142
|
+
React__default.createElement(
|
|
14200
14143
|
'a',
|
|
14201
14144
|
{ href: '/view/' + hit.url, style: this.props.variant === 'right' ? { flexDirection: 'row-reverse' } : {} },
|
|
14202
|
-
React__default
|
|
14145
|
+
React__default.createElement(
|
|
14203
14146
|
'div',
|
|
14204
14147
|
{ className: styles.thumb },
|
|
14205
|
-
React__default
|
|
14148
|
+
React__default.createElement(
|
|
14206
14149
|
'figure',
|
|
14207
14150
|
null,
|
|
14208
|
-
React__default
|
|
14209
|
-
index$
|
|
14151
|
+
React__default.createElement(
|
|
14152
|
+
index$2.LazyLoad,
|
|
14210
14153
|
{ once: true },
|
|
14211
|
-
React__default
|
|
14154
|
+
React__default.createElement('img', {
|
|
14212
14155
|
src: hit.thumbnail && hit.thumbnail.asset ? urlFor({ client: client, source: hit.thumbnail }) : hit.thumbnail && _typeof$2._typeof(hit.thumbnail === 'string') ? hit.thumbnail : this.props.defaultImage
|
|
14213
14156
|
})
|
|
14214
14157
|
)
|
|
14215
14158
|
)
|
|
14216
14159
|
)
|
|
14217
14160
|
),
|
|
14218
|
-
React__default
|
|
14161
|
+
React__default.createElement(
|
|
14219
14162
|
'div',
|
|
14220
14163
|
{ className: styles.info, style: this.props.variant === 'right' ? { padding: '0 1rem 0 0' } : { padding: ' 0 0 0 1rem' } },
|
|
14221
|
-
React__default
|
|
14164
|
+
React__default.createElement(
|
|
14222
14165
|
'a',
|
|
14223
14166
|
{ href: '/view/' + hit.url },
|
|
14224
|
-
React__default
|
|
14167
|
+
React__default.createElement(
|
|
14225
14168
|
'h2',
|
|
14226
14169
|
null,
|
|
14227
14170
|
hit.title
|
|
14228
14171
|
)
|
|
14229
14172
|
),
|
|
14230
|
-
hit.pubDateSort && React__default
|
|
14173
|
+
hit.pubDateSort && React__default.createElement(
|
|
14231
14174
|
'p',
|
|
14232
14175
|
{ className: styles.published },
|
|
14233
14176
|
moment.moment(hit.pubDateSort).format('MMMM Do YYYY')
|
|
14234
14177
|
),
|
|
14235
|
-
hit.authorMapping && hit.authorMapping.length > 0 && React__default
|
|
14178
|
+
hit.authorMapping && hit.authorMapping.length > 0 && React__default.createElement(
|
|
14236
14179
|
'p',
|
|
14237
14180
|
{ className: styles.author },
|
|
14238
14181
|
hit.authorMapping.map(function (author) {
|
|
14239
|
-
return React__default
|
|
14182
|
+
return React__default.createElement(
|
|
14240
14183
|
'span',
|
|
14241
14184
|
null,
|
|
14242
14185
|
author.displayName
|
|
14243
14186
|
);
|
|
14244
14187
|
})
|
|
14245
14188
|
),
|
|
14246
|
-
hit.summary && React__default
|
|
14189
|
+
hit.summary && React__default.createElement('p', { dangerouslySetInnerHTML: { __html: hit.summary }, className: styles.summary })
|
|
14247
14190
|
)
|
|
14248
14191
|
);
|
|
14249
14192
|
}
|
|
@@ -14256,10 +14199,10 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14256
14199
|
styles: this.props.deckStyles,
|
|
14257
14200
|
client: this.props.sanityClient
|
|
14258
14201
|
};
|
|
14259
|
-
return React__default
|
|
14260
|
-
React__default
|
|
14202
|
+
return React__default.createElement(
|
|
14203
|
+
React__default.Fragment,
|
|
14261
14204
|
null,
|
|
14262
|
-
React__default
|
|
14205
|
+
React__default.createElement(
|
|
14263
14206
|
InstantSearch,
|
|
14264
14207
|
_extends._extends({
|
|
14265
14208
|
searchClient: this.props.searchClient,
|
|
@@ -14270,29 +14213,29 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14270
14213
|
indexName: this.props.indexName,
|
|
14271
14214
|
onSearchParameters: this.props.onSearchParameters
|
|
14272
14215
|
}, this.props),
|
|
14273
|
-
React__default
|
|
14274
|
-
React__default
|
|
14275
|
-
this.props.refinementAttributes && React__default
|
|
14216
|
+
React__default.createElement(Configure, { hitsPerPage: this.props.hitsPerPage || 20 }),
|
|
14217
|
+
React__default.createElement(SearchBox$2, null),
|
|
14218
|
+
this.props.refinementAttributes && React__default.createElement(
|
|
14276
14219
|
'div',
|
|
14277
14220
|
{ className: 'search_refinement' },
|
|
14278
14221
|
this.props.refinementAttributes.map(function (item, index) {
|
|
14279
|
-
return React__default
|
|
14222
|
+
return React__default.createElement(
|
|
14280
14223
|
reactBootstrap.DropdownButton,
|
|
14281
14224
|
{ title: item.title },
|
|
14282
|
-
React__default
|
|
14225
|
+
React__default.createElement(RefinementList$3, { showMore: item.showMore, limit: item.limit, showMoreLimit: item.showMoreLimit, attribute: item.attribute })
|
|
14283
14226
|
);
|
|
14284
14227
|
})
|
|
14285
14228
|
),
|
|
14286
|
-
React__default
|
|
14229
|
+
React__default.createElement(
|
|
14287
14230
|
'div',
|
|
14288
14231
|
{ className: 'AlgoliaResults' },
|
|
14289
|
-
React__default
|
|
14232
|
+
React__default.createElement(Hits$1, { hitComponent: function hitComponent(hit) {
|
|
14290
14233
|
return _this2.Deck(_extends._extends({}, hit, { propsObj: propsObj }));
|
|
14291
14234
|
} })
|
|
14292
14235
|
),
|
|
14293
|
-
React__default
|
|
14236
|
+
React__default.createElement(Pagination$2, null)
|
|
14294
14237
|
),
|
|
14295
|
-
React__default
|
|
14238
|
+
React__default.createElement(
|
|
14296
14239
|
'style',
|
|
14297
14240
|
{ jsx: 'true' },
|
|
14298
14241
|
'\n .hitResult {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-bottom: 1rem;\n border-bottom: 1px solid #00000024;\n padding: 1rem 0;\n }\n .hitResult > a:first-child {\n width: 30%;\n }\n .hitResult > a:first-child > div{\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n .hitResult > div:last-child > a {\n margin-bottom: .5rem;\n width: 100%;\n }\n @media only screen and (max-width: 568px) {\n .hitResult {\n flex-direction: column;\n align-items: center;\n border: none;\n padding: 0;\n }\n .hitResult > a:first-child {\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n }\n .AlgoliaResults {\n padding-left: 15px;\n margin-top: 3rem;\n }\n\n .search_refinement {\n display: flex;\n margin: 2rem 0;\n }\n\n .search_refinement > div {\n padding-right: 1rem;\n max-height: 500px;\n }\n\n .ais-Hits-list {\n margin: 0;\n list-style: none;\n padding-inline-start: 0;\n }\n .ais-Pagination-list {\n list-style: none;\n }\n .ais-Pagination-list {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n .ais-Pagination-item + .ais-Pagination-item {\n margin-left: 0.3rem;\n }\n .ais-Pagination-link {\n padding: 0.3rem 0.6rem;\n display: block;\n border: 1px solid var(--search-primary);\n border-radius: 5px;\n transition: background-color 0.2s ease-out;\n }\n .ais-Pagination-link:focus,\n .ais-Pagination-link:hover {\n background-color: var(--search-secondary);\n color: #fff;\n }\n .ais-Pagination-item--disabled .ais-Pagination-link {\n opacity: 0.6;\n cursor: not-allowed;\n color: var(--search-secondary);\n }\n .ais-Pagination-item--disabled .ais-Pagination-link:focus,\n .ais-Pagination-item--disabled .ais-Pagination-link:hover {\n color: #fff;\n background-color: var(--search-secondary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link {\n color: #fff;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link:focus,\n .ais-Pagination-item--selected .ais-Pagination-link:hover {\n color: #fff;\n }\n .ais-Pagination-list,\n .ais-Results-list {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .ais-Pagination-list,\n .ais-PoweredBy,\n .ais-RangeInput-form,\n .ais-RatingMenu-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .ais-RefinementList-item {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .ais-RefinementList-list {\n margin: 0;\n padding: 0 1rem;\n width: max-content;\n }\n .ais-SearchBox-form {\n width: 100%;\n border-radius: 5px;\n height: 48px;\n }\n .ais-SearchBox-input {\n padding: 0.5rem;\n border-radius: 5px;\n width: calc(100% - 150px);\n height: 48px;\n border: 0;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit {\n width: 78px;\n border-radius: 5px;\n padding: 7px;\n margin-left: 5px;\n height: 48px;\n background-color: var(--search-primary);\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit > svg {\n fill: #fff;\n }\n .search_refinement > .dropdown > button {\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n\n .ais-SearchBox-reset {\n height: 48px;\n width: 48px;\n color: #fff;\n background-color: var(--search-primary);\n border: 0;\n margin-left: 5px;\n border-radius: 5px;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-reset > svg {\n fill: #fff;\n }\n .ais-RefinementList-checkbox {\n margin-right: 5px;\n }\n\n .ais-RefinementList-showMore {\n padding: 0.5rem;\n border: 0;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n color: #fff;\n border: 1px solid;\n border-radius: 5px;\n margin-left: 1rem;\n }\n '
|
|
@@ -14302,16 +14245,16 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14302
14245
|
}]);
|
|
14303
14246
|
|
|
14304
14247
|
return AlgoliaSearch;
|
|
14305
|
-
}(React__default
|
|
14248
|
+
}(React__default.Component);
|
|
14306
14249
|
|
|
14307
14250
|
AlgoliaSearch.propTypes = {
|
|
14308
|
-
searchState: PropTypes__default
|
|
14309
|
-
resultsState: PropTypes__default
|
|
14310
|
-
onSearchStateChange: PropTypes__default
|
|
14311
|
-
createURL: PropTypes__default
|
|
14312
|
-
indexName: PropTypes__default
|
|
14313
|
-
searchClient: PropTypes__default
|
|
14314
|
-
refinementAttributes: PropTypes__default
|
|
14251
|
+
searchState: PropTypes__default.object,
|
|
14252
|
+
resultsState: PropTypes__default.oneOfType([PropTypes__default.object, PropTypes__default.array]),
|
|
14253
|
+
onSearchStateChange: PropTypes__default.func,
|
|
14254
|
+
createURL: PropTypes__default.func,
|
|
14255
|
+
indexName: PropTypes__default.string,
|
|
14256
|
+
searchClient: PropTypes__default.object,
|
|
14257
|
+
refinementAttributes: PropTypes__default.array
|
|
14315
14258
|
};
|
|
14316
14259
|
|
|
14317
14260
|
module.exports = AlgoliaSearch;
|