@mjhls/mjh-framework 1.0.882 → 1.0.883-mwn-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/AD.js +10 -9
- package/dist/cjs/AD300x250.js +28 -27
- package/dist/cjs/AD300x250x600.js +28 -27
- package/dist/cjs/AD728x90.js +31 -30
- package/dist/cjs/ADFloatingFooter.js +31 -30
- package/dist/cjs/ADFooter.js +13 -12
- package/dist/cjs/ADGutter.js +31 -30
- package/dist/cjs/{ADInfeed-4f661172.js → ADInfeed-bce0ba07.js} +15 -13
- package/dist/cjs/ADSkyscraper.js +31 -30
- package/dist/cjs/ADSponsoredResources.js +31 -30
- package/dist/cjs/ADWebcast.js +31 -30
- package/dist/cjs/ADWelcome.js +32 -31
- package/dist/cjs/{ADlgInfeed-6242e5b5.js → ADlgInfeed-950b414b.js} +11 -10
- package/dist/cjs/AccordionPanel.js +29 -27
- package/dist/cjs/AdSlot.js +32 -31
- package/dist/cjs/AdSlotsProvider.js +17 -15
- package/dist/cjs/AlgoliaSearch.js +1160 -1103
- package/dist/cjs/AlphabeticList.js +24 -23
- package/dist/cjs/ArticleCarousel.js +20 -19
- package/dist/cjs/ArticleProgramLandingPage.js +61 -60
- package/dist/cjs/ArticleSeriesLandingPage.js +41 -40
- package/dist/cjs/ArticleSeriesListing.js +60 -59
- package/dist/cjs/Auth.js +287 -283
- package/dist/cjs/AuthWrapper.js +59 -148
- package/dist/cjs/{AuthorComponent-421d5ec1.js → AuthorComponent-39b37d84.js} +14 -13
- package/dist/cjs/Beam.js +6 -6
- package/dist/cjs/{BlockContent-bac780ac.js → BlockContent-9ebd251f.js} +56 -55
- package/dist/cjs/Breadcrumbs.js +27 -25
- package/dist/cjs/CMEDeck.js +81 -81
- package/dist/cjs/Column1.js +14 -11
- package/dist/cjs/Column2.js +34 -31
- package/dist/cjs/Column3.js +59 -56
- package/dist/cjs/ConferenceArticleCard.js +26 -25
- package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
- package/dist/cjs/DeckContent.js +96 -92
- package/dist/cjs/DeckQueue.js +90 -86
- package/dist/cjs/{Dfp-ab12cd55.js → Dfp-9be904d5.js} +35 -34
- package/dist/cjs/EventsDeck.js +140 -133
- package/dist/cjs/ExternalResources.js +79 -78
- package/dist/cjs/Feature.js +28 -26
- package/dist/cjs/ForbesHero.js +41 -40
- package/dist/cjs/GridContent.js +236 -231
- package/dist/cjs/GridHero.js +43 -42
- package/dist/cjs/GroupDeck.js +58 -57
- package/dist/cjs/HamMagazine.js +132 -127
- package/dist/cjs/Header.js +14 -12
- package/dist/cjs/Hero.js +16 -15
- package/dist/cjs/HighlightenVideo.js +18 -17
- package/dist/cjs/HorizontalArticleListing.js +72 -71
- package/dist/cjs/HorizontalHero.js +29 -28
- package/dist/cjs/IssueContentDeck.js +76 -71
- package/dist/cjs/IssueDeck.js +75 -70
- package/dist/cjs/IssueLanding.js +65 -64
- package/dist/cjs/LeftNav.js +39 -37
- package/dist/cjs/MasterDeck.js +71 -70
- package/dist/cjs/MediaSeriesLanding.js +988 -985
- package/dist/cjs/NavDvm.js +77 -72
- package/dist/cjs/{NavFooter-76c913e3.js → NavFooter-3dcd99a8.js} +15 -14
- package/dist/cjs/NavMagazine.js +139 -134
- package/dist/cjs/NavNative.js +134 -126
- package/dist/cjs/OncliveHero.js +22 -21
- package/dist/cjs/OncliveLargeHero.js +71 -70
- package/dist/cjs/PageFilter.js +13 -12
- package/dist/cjs/PartnerDetailListing.js +272 -373
- package/dist/cjs/PdfDownload.js +10 -9
- package/dist/cjs/PopUpModal.js +19 -17
- package/dist/cjs/PubSection.js +41 -40
- package/dist/cjs/PubToc.js +14 -13
- package/dist/cjs/PublicationDeck.js +70 -65
- package/dist/cjs/PublicationLanding.js +114 -106
- package/dist/cjs/QueueDeckExpanded.js +308 -308
- package/dist/cjs/RecentNews.js +23 -22
- package/dist/cjs/RelatedContent.js +30 -29
- package/dist/cjs/RelatedTopicsDropdown.js +22 -19
- package/dist/cjs/RolesDeck.js +32 -27
- package/dist/cjs/Search.js +20 -16
- package/dist/cjs/Segment.js +4 -4
- package/dist/cjs/SeriesListingDeck.js +36 -36
- package/dist/cjs/{SeriesSlider-372e418f.js → SeriesSlider-ba0c5d1a.js} +31 -30
- package/dist/cjs/SetCookie.js +1 -1
- package/dist/cjs/SideFooter.js +35 -34
- package/dist/cjs/SocialIcons.js +10 -9
- package/dist/cjs/{SocialSearchComponent-80a2130a.js → SocialSearchComponent-4942ddfc.js} +36 -32
- package/dist/cjs/SocialShare.js +31 -29
- package/dist/cjs/TaxonomyCard.js +66 -61
- package/dist/cjs/TaxonomyDescription.js +54 -53
- package/dist/cjs/TemplateNormal.js +73 -72
- package/dist/cjs/ThumbnailCard.js +26 -24
- package/dist/cjs/Ustream.js +70 -78
- package/dist/cjs/VerticalHero.js +20 -19
- package/dist/cjs/VideoProgramLandingPage.js +78 -74
- package/dist/cjs/VideoSeriesCard.js +33 -32
- package/dist/cjs/VideoSeriesFilter.js +16 -16
- package/dist/cjs/VideoSeriesLandingPage.js +51 -50
- package/dist/cjs/VideoSeriesListing.js +77 -76
- package/dist/cjs/View.js +252 -249
- package/dist/cjs/YahooHero.js +40 -39
- package/dist/cjs/YoutubeGroup.js +59 -58
- package/dist/cjs/{_is-array-bd978497.js → _is-array-54228b29.js} +6 -6
- package/dist/cjs/{_iter-detect-ee3d4802.js → _iter-detect-b1df62f0.js} +7 -7
- package/dist/cjs/{_object-pie-68c5bcbc.js → _object-pie-083f2dd6.js} +4 -4
- package/dist/cjs/{_object-sap-fee50a62.js → _object-sap-d1978572.js} +1 -1
- package/dist/cjs/{_object-to-array-18379aba.js → _object-to-array-ce86cae7.js} +2 -2
- package/dist/cjs/{asyncToGenerator-15014394.js → asyncToGenerator-77821af0.js} +30 -30
- package/dist/cjs/{brightcove-react-player-loader.es-05029198.js → brightcove-react-player-loader.es-a195642e.js} +7 -6
- package/dist/cjs/{core.get-iterator-method-5cb3af28.js → core.get-iterator-method-5643aa10.js} +33 -33
- package/dist/cjs/{debounce-6191c8ee.js → debounce-d4a2369b.js} +2 -2
- package/dist/cjs/{define-property-530a5e9e.js → define-property-e8404b64.js} +6 -6
- package/dist/cjs/{defineProperty-5ca424cd.js → defineProperty-9673846a.js} +1 -1
- package/dist/cjs/defineProperty-e0fb52c5.js +73 -0
- package/dist/cjs/{entities-fb0c6568.js → entities-df1aed86.js} +1 -1
- package/dist/cjs/{eq-bb2843ed.js → eq-5fc26c07.js} +1 -1
- package/dist/cjs/{extends-1d905ddb.js → extends-7c86182f.js} +7 -7
- package/dist/cjs/faundadb.js +19 -19
- package/dist/cjs/{get-adbb11e3.js → get-5839e5b5.js} +21 -21
- package/dist/cjs/getRelatedArticle.js +16 -16
- package/dist/cjs/getRootDocGroup.js +6 -6
- package/dist/cjs/getSerializers.js +43 -43
- package/dist/cjs/{getTargeting-41f2f52d.js → getTargeting-9d509319.js} +3 -3
- package/dist/cjs/getTargeting.js +6 -6
- package/dist/{esm/iconBase-602d52fe.js → cjs/iconBase-be4097c0.js} +33 -8
- package/dist/cjs/{index-53e27416.js → index-50be6759.js} +1 -1
- package/dist/cjs/{index-cdd88325.js → index-af49d679.js} +590 -574
- package/dist/cjs/{index-ff69979f.js → index-d48b231c.js} +3 -3
- package/dist/cjs/{index-96b3db50.js → index-eadd5035.js} +17 -15
- package/dist/cjs/{index-79eed652.js → index-f86bb269.js} +6 -6
- package/dist/cjs/{index-98e01cb9.js → index-fc2f1ca2.js} +13 -12
- package/dist/cjs/{index.es-e9d84959.js → index.es-f3e47207.js} +8 -7
- package/dist/cjs/{index.esm-bf016399.js → index.esm-2bb721c8.js} +19 -18
- package/dist/cjs/{index.esm-05850a2f.js → index.esm-88593816.js} +4 -4
- package/dist/cjs/{index.esm-44f3e2d0.js → index.esm-c1e16606.js} +1 -1
- package/dist/cjs/{index.esm-974f47d9.js → index.esm-d81454e7.js} +1 -4
- package/dist/cjs/index.js +169 -164
- package/dist/cjs/{inherits-337c73a7.js → inherits-de66ea16.js} +22 -22
- package/dist/cjs/{isSymbol-04666465.js → isSymbol-03abbdf0.js} +15 -15
- package/dist/cjs/{keys-91f31941.js → keys-e982b3fa.js} +6 -6
- package/dist/cjs/{lodash-b5e0d5f6.js → lodash-f0783643.js} +1 -1
- package/dist/cjs/{main-bc7d4bf8.js → main-f1c77adb.js} +70 -69
- package/dist/cjs/{moment-ca3bd9fb.js → moment-aca40de1.js} +1 -1
- package/dist/cjs/{react-social-icons-f7f48f71.js → react-social-icons-af932527.js} +28 -27
- package/dist/cjs/{slicedToArray-0a78cdf3.js → slicedToArray-067dd3bc.js} +12 -12
- package/dist/cjs/{smoothscroll-5054361f.js → smoothscroll-99df7f93.js} +1 -1
- package/dist/cjs/{stringify-13405ce2.js → stringify-f7a37a8d.js} +5 -5
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-39fd0757.js → toConsumableArray-d7797c2b.js} +7 -7
- package/dist/cjs/{toNumber-f2f8744b.js → toNumber-5e1fac58.js} +1 -1
- package/dist/cjs/typeof-1358762e.js +33 -0
- package/dist/cjs/{typeof-3dd6d3df.js → typeof-567e31ff.js} +35 -35
- package/dist/cjs/urlFor.js +6 -6
- package/dist/cjs/{ustream-api-5619c1fa.js → ustream-api-3819e4aa.js} +4 -4
- package/dist/cjs/{util-f2c1b65b.js → util-93a37fd0.js} +12 -1
- package/dist/cjs/{visibility-sensor-ad5e3116.js → visibility-sensor-eb2c5b69.js} +7 -5
- package/dist/cjs/{web.dom.iterable-a9359910.js → web.dom.iterable-d98303e0.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-7db96917.js → ADInfeed-0a55cd2d.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-a3931e68.js → ADlgInfeed-013e1f4a.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 +608 -552
- 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 +28 -118
- package/dist/esm/{AuthorComponent-2277b67c.js → AuthorComponent-11adff02.js} +1 -1
- package/dist/esm/Beam.js +6 -6
- package/dist/esm/{BlockContent-ea93e8f7.js → BlockContent-1e73bd2c.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-d6a5629f.js → Dfp-102f0beb.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 +86 -188
- 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 +51 -47
- 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-88c4133d.js → SeriesSlider-45adb8dc.js} +5 -5
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +13 -13
- package/dist/esm/{SocialSearchComponent-7f3d6531.js → SocialSearchComponent-8e0fcf66.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 +62 -71
- 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 +82 -83
- package/dist/esm/YahooHero.js +13 -13
- package/dist/esm/YoutubeGroup.js +12 -12
- package/dist/esm/{_is-array-8914b83f.js → _is-array-8d21b9e3.js} +6 -6
- package/dist/esm/{_iter-detect-13e31915.js → _iter-detect-98db3b07.js} +7 -7
- package/dist/esm/{_object-pie-33c40e79.js → _object-pie-133f504a.js} +4 -4
- package/dist/esm/{_object-sap-fc9da7e8.js → _object-sap-7cee6f84.js} +1 -1
- package/dist/esm/{_object-to-array-ee8f6d98.js → _object-to-array-2300e51b.js} +2 -2
- package/dist/esm/{asyncToGenerator-40371743.js → asyncToGenerator-5ef104a7.js} +30 -30
- package/dist/esm/{core.get-iterator-method-0fb60d94.js → core.get-iterator-method-ea258bb1.js} +34 -34
- package/dist/esm/{debounce-89969f66.js → debounce-533d9748.js} +2 -2
- package/dist/esm/define-property-5f1bda73.js +18 -0
- package/dist/esm/defineProperty-23a8f8cd.js +68 -0
- package/dist/esm/{defineProperty-e66a2c7c.js → defineProperty-8c30428f.js} +1 -1
- package/dist/esm/{entities-731f3fdb.js → entities-6d9154b4.js} +1 -1
- package/dist/esm/{eq-b470f743.js → eq-bdcbf886.js} +1 -1
- package/dist/esm/{extends-9a61581c.js → extends-6d8e3924.js} +7 -7
- package/dist/esm/faundadb.js +5 -5
- package/dist/esm/{get-1e515072.js → get-3c308da4.js} +21 -21
- package/dist/esm/getRelatedArticle.js +11 -11
- package/dist/esm/getRootDocGroup.js +4 -4
- package/dist/esm/getSerializers.js +43 -43
- package/dist/esm/{getTargeting-e6820763.js → getTargeting-4061f839.js} +2 -2
- package/dist/esm/getTargeting.js +6 -6
- package/dist/{cjs/iconBase-68959171.js → esm/iconBase-ccc56b97.js} +2 -8
- package/dist/esm/{index-f7fdcc91.js → index-3f5c03b2.js} +3 -3
- package/dist/esm/{index-5f7e79e7.js → index-755f2cc2.js} +6 -6
- package/dist/esm/{index-511bdaa5.js → index-79cfd25c.js} +6 -6
- package/dist/esm/{index-637e8f49.js → index-98ca9cec.js} +1 -1
- package/dist/esm/{index-0b6db187.js → index-d7489d39.js} +140 -134
- package/dist/esm/{index-41a678ea.js → index-f0fc23eb.js} +4 -4
- package/dist/esm/{index.esm-a8ff922c.js → index.esm-28aafed6.js} +4 -4
- package/dist/esm/{index.esm-ed50151c.js → index.esm-37268dca.js} +2 -2
- package/dist/esm/{index.esm-c6715e80.js → index.esm-9b042655.js} +1 -1
- package/dist/esm/{index.esm-3fdda599.js → index.esm-eb1e8e80.js} +2 -4
- package/dist/esm/index.js +124 -122
- package/dist/esm/{inherits-eeaf6740.js → inherits-a6ba2ec4.js} +18 -18
- package/dist/esm/{isSymbol-1981418f.js → isSymbol-a7e9aafe.js} +15 -15
- package/dist/esm/{keys-a5ffafe7.js → keys-31dcdb31.js} +6 -6
- package/dist/esm/{lodash-a818d390.js → lodash-f97fd99a.js} +1 -1
- package/dist/esm/{main-ede573ee.js → main-1894c974.js} +53 -53
- package/dist/esm/{moment-b6f49411.js → moment-bc12cb97.js} +1 -1
- package/dist/esm/{react-social-icons-a7d5c5c7.js → react-social-icons-9be47857.js} +16 -16
- package/dist/esm/{slicedToArray-9c3bb613.js → slicedToArray-6ebcbfea.js} +12 -12
- package/dist/esm/{smoothscroll-0cd4c7a6.js → smoothscroll-fa4e3f8c.js} +1 -1
- package/dist/esm/stringify-2b084bee.js +15 -0
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/{toConsumableArray-e333293f.js → toConsumableArray-f7074d7c.js} +7 -7
- package/dist/esm/{toNumber-e3dcad26.js → toNumber-5aeba6e7.js} +1 -1
- package/dist/esm/typeof-2f07d0e8.js +30 -0
- package/dist/esm/{typeof-938ae770.js → typeof-e9fc0c5d.js} +35 -35
- package/dist/esm/urlFor.js +4 -4
- package/dist/esm/{ustream-api-d325d196.js → ustream-api-d3714624.js} +4 -4
- package/dist/esm/{util-7700fc59.js → util-8ed16d48.js} +12 -1
- package/dist/esm/{web.dom.iterable-6b037ff9.js → web.dom.iterable-ab4dea5c.js} +2 -2
- package/package.json +1 -1
- package/dist/cjs/ConferenceBanner-4a16fddc.js +0 -23
- package/dist/esm/define-property-73034847.js +0 -18
- package/dist/esm/stringify-ebc16384.js +0 -15
- package/dist/esm/{brightcove-react-player-loader.es-e761d404.js → brightcove-react-player-loader.es-57a70a56.js} +1 -1
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './
|
|
3
|
-
import './
|
|
4
|
-
import './_object-pie-33c40e79.js';
|
|
5
|
-
import { _ as _extends$1 } from './extends-9a61581c.js';
|
|
6
|
-
import './_object-sap-fc9da7e8.js';
|
|
7
|
-
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-eeaf6740.js';
|
|
8
|
-
import './define-property-73034847.js';
|
|
9
|
-
import './web.dom.iterable-6b037ff9.js';
|
|
10
|
-
import { _ as _typeof$2 } from './typeof-938ae770.js';
|
|
11
|
-
import './_is-array-8914b83f.js';
|
|
1
|
+
import { _ as _extends$1 } from './extends-6d8e3924.js';
|
|
2
|
+
import { _ as _typeof$2 } from './typeof-e9fc0c5d.js';
|
|
3
|
+
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-a6ba2ec4.js';
|
|
12
4
|
import React__default, { createContext, Component, Children, version as version$2 } from 'react';
|
|
13
|
-
import { E as EventEmitter } from './events-6c3a7a63.js';
|
|
14
5
|
import PropTypes from 'prop-types';
|
|
15
|
-
import {
|
|
16
|
-
import '
|
|
17
|
-
import './
|
|
18
|
-
import './index-f7fdcc91.js';
|
|
19
|
-
import urlFor from './urlFor.js';
|
|
20
|
-
import { L as LazyLoad } from './index-5f7e79e7.js';
|
|
6
|
+
import { _ as _typeof$1 } from './typeof-2f07d0e8.js';
|
|
7
|
+
import { _ as _objectWithoutPropertiesLoose$1, a as _setPrototypeOf, b as _extends, c as classnames } from './index-98ca9cec.js';
|
|
8
|
+
import { E as EventEmitter } from './events-6c3a7a63.js';
|
|
21
9
|
import { DropdownButton } from 'react-bootstrap';
|
|
22
|
-
import
|
|
10
|
+
import urlFor from './urlFor.js';
|
|
11
|
+
import { m as moment } from './moment-bc12cb97.js';
|
|
12
|
+
import { L as LazyLoad } from './index-755f2cc2.js';
|
|
13
|
+
import './_commonjsHelpers-0c4b6f40.js';
|
|
14
|
+
import './core.get-iterator-method-ea258bb1.js';
|
|
15
|
+
import './_object-pie-133f504a.js';
|
|
16
|
+
import './web.dom.iterable-ab4dea5c.js';
|
|
17
|
+
import './_is-array-8d21b9e3.js';
|
|
18
|
+
import './_library-528f1934.js';
|
|
19
|
+
import './_object-sap-7cee6f84.js';
|
|
20
|
+
import './define-property-5f1bda73.js';
|
|
21
|
+
import './slicedToArray-6ebcbfea.js';
|
|
22
|
+
import './index-3f5c03b2.js';
|
|
23
|
+
import 'react-dom';
|
|
23
24
|
|
|
24
25
|
function _objectWithoutProperties(source, excluded) {
|
|
25
26
|
if (source == null) return {};
|
|
@@ -96,33 +97,6 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
96
97
|
return Constructor;
|
|
97
98
|
}
|
|
98
99
|
|
|
99
|
-
var _typeof_1 = createCommonjsModule(function (module) {
|
|
100
|
-
function _typeof(obj) {
|
|
101
|
-
"@babel/helpers - typeof";
|
|
102
|
-
|
|
103
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
104
|
-
module.exports = _typeof = function _typeof(obj) {
|
|
105
|
-
return typeof obj;
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
109
|
-
} else {
|
|
110
|
-
module.exports = _typeof = function _typeof(obj) {
|
|
111
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
return _typeof(obj);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
module.exports = _typeof;
|
|
121
|
-
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
var _typeof = unwrapExports(_typeof_1);
|
|
125
|
-
|
|
126
100
|
function _assertThisInitialized(self) {
|
|
127
101
|
if (self === void 0) {
|
|
128
102
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -132,7 +106,7 @@ function _assertThisInitialized(self) {
|
|
|
132
106
|
}
|
|
133
107
|
|
|
134
108
|
function _possibleConstructorReturn(self, call) {
|
|
135
|
-
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
109
|
+
if (call && (_typeof$1(call) === "object" || typeof call === "function")) {
|
|
136
110
|
return call;
|
|
137
111
|
}
|
|
138
112
|
|
|
@@ -296,20 +270,20 @@ var reactFastCompare = function isEqual(a, b) {
|
|
|
296
270
|
}
|
|
297
271
|
};
|
|
298
272
|
|
|
299
|
-
function _typeof
|
|
273
|
+
function _typeof(obj) {
|
|
300
274
|
"@babel/helpers - typeof";
|
|
301
275
|
|
|
302
276
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
303
|
-
_typeof
|
|
277
|
+
_typeof = function _typeof(obj) {
|
|
304
278
|
return typeof obj;
|
|
305
279
|
};
|
|
306
280
|
} else {
|
|
307
|
-
_typeof
|
|
281
|
+
_typeof = function _typeof(obj) {
|
|
308
282
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
309
283
|
};
|
|
310
284
|
}
|
|
311
285
|
|
|
312
|
-
return _typeof
|
|
286
|
+
return _typeof(obj);
|
|
313
287
|
}
|
|
314
288
|
|
|
315
289
|
// From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
@@ -345,7 +319,7 @@ var defer = function defer(f) {
|
|
|
345
319
|
};
|
|
346
320
|
|
|
347
321
|
var isPlainObject = function isPlainObject(value) {
|
|
348
|
-
return _typeof
|
|
322
|
+
return _typeof(value) === 'object' && value !== null && !Array.isArray(value);
|
|
349
323
|
};
|
|
350
324
|
|
|
351
325
|
var removeEmptyKey = function removeEmptyKey(obj) {
|
|
@@ -356,7 +330,7 @@ var removeEmptyKey = function removeEmptyKey(obj) {
|
|
|
356
330
|
return;
|
|
357
331
|
}
|
|
358
332
|
|
|
359
|
-
if (!objectHasKeys(value)) {
|
|
333
|
+
if (!objectHasKeys$1(value)) {
|
|
360
334
|
delete obj[key];
|
|
361
335
|
} else {
|
|
362
336
|
removeEmptyKey(value);
|
|
@@ -392,7 +366,7 @@ function addQueryID(hits, queryID) {
|
|
|
392
366
|
});
|
|
393
367
|
});
|
|
394
368
|
}
|
|
395
|
-
function find(array, comparator) {
|
|
369
|
+
function find$2(array, comparator) {
|
|
396
370
|
if (!Array.isArray(array)) {
|
|
397
371
|
return undefined;
|
|
398
372
|
}
|
|
@@ -405,11 +379,11 @@ function find(array, comparator) {
|
|
|
405
379
|
|
|
406
380
|
return undefined;
|
|
407
381
|
}
|
|
408
|
-
function objectHasKeys(object) {
|
|
382
|
+
function objectHasKeys$1(object) {
|
|
409
383
|
return object && Object.keys(object).length > 0;
|
|
410
384
|
} // https://github.com/babel/babel/blob/3aaafae053fa75febb3aa45d45b6f00646e30ba4/packages/babel-helpers/src/helpers.js#L604-L620
|
|
411
385
|
|
|
412
|
-
function omit(source, excluded) {
|
|
386
|
+
function omit$1(source, excluded) {
|
|
413
387
|
if (source === null || source === undefined) {
|
|
414
388
|
return {};
|
|
415
389
|
}
|
|
@@ -480,9 +454,9 @@ var instantSearchContext = createContext({
|
|
|
480
454
|
var InstantSearchConsumer = instantSearchContext.Consumer,
|
|
481
455
|
InstantSearchProvider = instantSearchContext.Provider;
|
|
482
456
|
|
|
483
|
-
var _createContext = createContext(undefined),
|
|
484
|
-
IndexConsumer = _createContext.Consumer,
|
|
485
|
-
IndexProvider = _createContext.Provider;
|
|
457
|
+
var _createContext$1 = createContext(undefined),
|
|
458
|
+
IndexConsumer = _createContext$1.Consumer,
|
|
459
|
+
IndexProvider = _createContext$1.Provider;
|
|
486
460
|
|
|
487
461
|
/**
|
|
488
462
|
* Connectors are the HOC used to transform React components
|
|
@@ -695,9 +669,9 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
695
669
|
}, {
|
|
696
670
|
key: "render",
|
|
697
671
|
value: function render() {
|
|
698
|
-
var _this$props = this.props
|
|
699
|
-
|
|
700
|
-
props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
672
|
+
var _this$props = this.props;
|
|
673
|
+
_this$props.contextValue;
|
|
674
|
+
var props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
701
675
|
|
|
702
676
|
var providedProps = this.state.providedProps;
|
|
703
677
|
|
|
@@ -848,7 +822,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
848
822
|
});
|
|
849
823
|
}
|
|
850
824
|
|
|
851
|
-
var version = '6.
|
|
825
|
+
var version$1 = '6.11.2';
|
|
852
826
|
|
|
853
827
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
854
828
|
return function (props, propName, componentName) {
|
|
@@ -1045,7 +1019,7 @@ function hasRefinements(_ref) {
|
|
|
1045
1019
|
return Object.hasOwnProperty.call(searchState, id);
|
|
1046
1020
|
}
|
|
1047
1021
|
|
|
1048
|
-
function getRefinements(_ref2) {
|
|
1022
|
+
function getRefinements$1(_ref2) {
|
|
1049
1023
|
var multiIndex = _ref2.multiIndex,
|
|
1050
1024
|
indexId = _ref2.indexId,
|
|
1051
1025
|
namespace = _ref2.namespace,
|
|
@@ -1087,7 +1061,7 @@ function getCurrentRefinementValue(props, searchState, context, id, defaultValue
|
|
|
1087
1061
|
var hasRefinementsValue = hasRefinements(args);
|
|
1088
1062
|
|
|
1089
1063
|
if (hasRefinementsValue) {
|
|
1090
|
-
return getRefinements(args);
|
|
1064
|
+
return getRefinements$1(args);
|
|
1091
1065
|
}
|
|
1092
1066
|
|
|
1093
1067
|
if (props.defaultRefinement) {
|
|
@@ -1128,10 +1102,10 @@ function cleanUpValueWithSingleIndex(_ref3) {
|
|
|
1128
1102
|
attribute = _ref3.attribute;
|
|
1129
1103
|
|
|
1130
1104
|
if (namespace) {
|
|
1131
|
-
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit(searchState[namespace], [attribute])));
|
|
1105
|
+
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit$1(searchState[namespace], [attribute])));
|
|
1132
1106
|
}
|
|
1133
1107
|
|
|
1134
|
-
return omit(searchState, [id]);
|
|
1108
|
+
return omit$1(searchState, [id]);
|
|
1135
1109
|
}
|
|
1136
1110
|
|
|
1137
1111
|
function cleanUpValueWithMultiIndex(_ref4) {
|
|
@@ -1144,20 +1118,20 @@ function cleanUpValueWithMultiIndex(_ref4) {
|
|
|
1144
1118
|
|
|
1145
1119
|
if (namespace && indexSearchState) {
|
|
1146
1120
|
return _objectSpread({}, searchState, {
|
|
1147
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit(indexSearchState[namespace], [attribute])))))
|
|
1121
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit$1(indexSearchState[namespace], [attribute])))))
|
|
1148
1122
|
});
|
|
1149
1123
|
}
|
|
1150
1124
|
|
|
1151
1125
|
if (indexSearchState) {
|
|
1152
1126
|
return _objectSpread({}, searchState, {
|
|
1153
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit(indexSearchState, [id])))
|
|
1127
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit$1(indexSearchState, [id])))
|
|
1154
1128
|
});
|
|
1155
1129
|
}
|
|
1156
1130
|
|
|
1157
1131
|
return searchState;
|
|
1158
1132
|
}
|
|
1159
1133
|
|
|
1160
|
-
function getId() {
|
|
1134
|
+
function getId$f() {
|
|
1161
1135
|
return 'configure';
|
|
1162
1136
|
}
|
|
1163
1137
|
|
|
@@ -1167,20 +1141,20 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1167
1141
|
return {};
|
|
1168
1142
|
},
|
|
1169
1143
|
getSearchParameters: function getSearchParameters(searchParameters, props) {
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1144
|
+
props.children;
|
|
1145
|
+
props.contextValue;
|
|
1146
|
+
props.indexContextValue;
|
|
1147
|
+
var items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1174
1148
|
|
|
1175
1149
|
return searchParameters.setQueryParameters(items);
|
|
1176
1150
|
},
|
|
1177
1151
|
transitionState: function transitionState(props, prevSearchState, nextSearchState) {
|
|
1178
|
-
var id = getId();
|
|
1152
|
+
var id = getId$f();
|
|
1179
1153
|
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1154
|
+
props.children;
|
|
1155
|
+
props.contextValue;
|
|
1156
|
+
props.indexContextValue;
|
|
1157
|
+
var items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1184
1158
|
|
|
1185
1159
|
var propKeys = Object.keys(props);
|
|
1186
1160
|
var nonPresentKeys = this._props ? Object.keys(this._props).filter(function (prop) {
|
|
@@ -1188,7 +1162,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1188
1162
|
}) : [];
|
|
1189
1163
|
this._props = props;
|
|
1190
1164
|
|
|
1191
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), items));
|
|
1165
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit$1(nextSearchState[id], nonPresentKeys), items));
|
|
1192
1166
|
|
|
1193
1167
|
return refineValue(nextSearchState, nextValue, {
|
|
1194
1168
|
ais: props.contextValue,
|
|
@@ -1196,7 +1170,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1196
1170
|
});
|
|
1197
1171
|
},
|
|
1198
1172
|
cleanUp: function cleanUp(props, searchState) {
|
|
1199
|
-
var id = getId();
|
|
1173
|
+
var id = getId$f();
|
|
1200
1174
|
var indexId = getIndexId({
|
|
1201
1175
|
ais: props.contextValue,
|
|
1202
1176
|
multiIndexContext: props.indexContextValue
|
|
@@ -1277,7 +1251,7 @@ function _arrayWithoutHoles(arr) {
|
|
|
1277
1251
|
}
|
|
1278
1252
|
|
|
1279
1253
|
function _iterableToArray(iter) {
|
|
1280
|
-
if (typeof Symbol !== "undefined" && Symbol.iterator
|
|
1254
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1281
1255
|
}
|
|
1282
1256
|
|
|
1283
1257
|
function _unsupportedIterableToArray(o, minLen) {
|
|
@@ -1444,13 +1418,13 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
1444
1418
|
return target;
|
|
1445
1419
|
}
|
|
1446
1420
|
|
|
1447
|
-
var omit
|
|
1421
|
+
var omit = _objectWithoutPropertiesLoose;
|
|
1448
1422
|
|
|
1449
|
-
function objectHasKeys
|
|
1423
|
+
function objectHasKeys(obj) {
|
|
1450
1424
|
return obj && Object.keys(obj).length > 0;
|
|
1451
1425
|
}
|
|
1452
1426
|
|
|
1453
|
-
var objectHasKeys_1 = objectHasKeys
|
|
1427
|
+
var objectHasKeys_1 = objectHasKeys;
|
|
1454
1428
|
|
|
1455
1429
|
var isValidUserToken = function isValidUserToken(userToken) {
|
|
1456
1430
|
if (userToken === null) {
|
|
@@ -1558,7 +1532,7 @@ var lib = {
|
|
|
1558
1532
|
}
|
|
1559
1533
|
return {};
|
|
1560
1534
|
} else if (typeof attribute === 'string') {
|
|
1561
|
-
return omit
|
|
1535
|
+
return omit(refinementList, [attribute]);
|
|
1562
1536
|
} else if (typeof attribute === 'function') {
|
|
1563
1537
|
var hasChanged = false;
|
|
1564
1538
|
|
|
@@ -1603,7 +1577,7 @@ var lib = {
|
|
|
1603
1577
|
}
|
|
1604
1578
|
};
|
|
1605
1579
|
|
|
1606
|
-
var RefinementList = lib;
|
|
1580
|
+
var RefinementList$3 = lib;
|
|
1607
1581
|
|
|
1608
1582
|
/**
|
|
1609
1583
|
* isEqual, but only for numeric refinement values, possible values:
|
|
@@ -1972,22 +1946,22 @@ SearchParameters.prototype = {
|
|
|
1972
1946
|
clearRefinements: function clearRefinements(attribute) {
|
|
1973
1947
|
var patch = {
|
|
1974
1948
|
numericRefinements: this._clearNumericRefinements(attribute),
|
|
1975
|
-
facetsRefinements: RefinementList.clearRefinement(
|
|
1949
|
+
facetsRefinements: RefinementList$3.clearRefinement(
|
|
1976
1950
|
this.facetsRefinements,
|
|
1977
1951
|
attribute,
|
|
1978
1952
|
'conjunctiveFacet'
|
|
1979
1953
|
),
|
|
1980
|
-
facetsExcludes: RefinementList.clearRefinement(
|
|
1954
|
+
facetsExcludes: RefinementList$3.clearRefinement(
|
|
1981
1955
|
this.facetsExcludes,
|
|
1982
1956
|
attribute,
|
|
1983
1957
|
'exclude'
|
|
1984
1958
|
),
|
|
1985
|
-
disjunctiveFacetsRefinements: RefinementList.clearRefinement(
|
|
1959
|
+
disjunctiveFacetsRefinements: RefinementList$3.clearRefinement(
|
|
1986
1960
|
this.disjunctiveFacetsRefinements,
|
|
1987
1961
|
attribute,
|
|
1988
1962
|
'disjunctiveFacet'
|
|
1989
1963
|
),
|
|
1990
|
-
hierarchicalFacetsRefinements: RefinementList.clearRefinement(
|
|
1964
|
+
hierarchicalFacetsRefinements: RefinementList$3.clearRefinement(
|
|
1991
1965
|
this.hierarchicalFacetsRefinements,
|
|
1992
1966
|
attribute,
|
|
1993
1967
|
'hierarchicalFacet'
|
|
@@ -2263,7 +2237,7 @@ SearchParameters.prototype = {
|
|
|
2263
2237
|
}
|
|
2264
2238
|
return {};
|
|
2265
2239
|
} else if (typeof attribute === 'string') {
|
|
2266
|
-
return omit
|
|
2240
|
+
return omit(this.numericRefinements, [attribute]);
|
|
2267
2241
|
} else if (typeof attribute === 'function') {
|
|
2268
2242
|
var hasChanged = false;
|
|
2269
2243
|
var numericRefinements = this.numericRefinements;
|
|
@@ -2355,10 +2329,10 @@ SearchParameters.prototype = {
|
|
|
2355
2329
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2356
2330
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2357
2331
|
}
|
|
2358
|
-
if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2332
|
+
if (RefinementList$3.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2359
2333
|
|
|
2360
2334
|
return this.setQueryParameters({
|
|
2361
|
-
facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value)
|
|
2335
|
+
facetsRefinements: RefinementList$3.addRefinement(this.facetsRefinements, facet, value)
|
|
2362
2336
|
});
|
|
2363
2337
|
},
|
|
2364
2338
|
/**
|
|
@@ -2372,10 +2346,10 @@ SearchParameters.prototype = {
|
|
|
2372
2346
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2373
2347
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2374
2348
|
}
|
|
2375
|
-
if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2349
|
+
if (RefinementList$3.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2376
2350
|
|
|
2377
2351
|
return this.setQueryParameters({
|
|
2378
|
-
facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value)
|
|
2352
|
+
facetsExcludes: RefinementList$3.addRefinement(this.facetsExcludes, facet, value)
|
|
2379
2353
|
});
|
|
2380
2354
|
},
|
|
2381
2355
|
/**
|
|
@@ -2391,10 +2365,10 @@ SearchParameters.prototype = {
|
|
|
2391
2365
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2392
2366
|
}
|
|
2393
2367
|
|
|
2394
|
-
if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2368
|
+
if (RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2395
2369
|
|
|
2396
2370
|
return this.setQueryParameters({
|
|
2397
|
-
disjunctiveFacetsRefinements: RefinementList.addRefinement(
|
|
2371
|
+
disjunctiveFacetsRefinements: RefinementList$3.addRefinement(
|
|
2398
2372
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2399
2373
|
});
|
|
2400
2374
|
},
|
|
@@ -2479,10 +2453,10 @@ SearchParameters.prototype = {
|
|
|
2479
2453
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2480
2454
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2481
2455
|
}
|
|
2482
|
-
if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2456
|
+
if (!RefinementList$3.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2483
2457
|
|
|
2484
2458
|
return this.setQueryParameters({
|
|
2485
|
-
facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value)
|
|
2459
|
+
facetsRefinements: RefinementList$3.removeRefinement(this.facetsRefinements, facet, value)
|
|
2486
2460
|
});
|
|
2487
2461
|
},
|
|
2488
2462
|
/**
|
|
@@ -2496,10 +2470,10 @@ SearchParameters.prototype = {
|
|
|
2496
2470
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2497
2471
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2498
2472
|
}
|
|
2499
|
-
if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2473
|
+
if (!RefinementList$3.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2500
2474
|
|
|
2501
2475
|
return this.setQueryParameters({
|
|
2502
|
-
facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value)
|
|
2476
|
+
facetsExcludes: RefinementList$3.removeRefinement(this.facetsExcludes, facet, value)
|
|
2503
2477
|
});
|
|
2504
2478
|
},
|
|
2505
2479
|
/**
|
|
@@ -2514,10 +2488,10 @@ SearchParameters.prototype = {
|
|
|
2514
2488
|
throw new Error(
|
|
2515
2489
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2516
2490
|
}
|
|
2517
|
-
if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2491
|
+
if (!RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2518
2492
|
|
|
2519
2493
|
return this.setQueryParameters({
|
|
2520
|
-
disjunctiveFacetsRefinements: RefinementList.removeRefinement(
|
|
2494
|
+
disjunctiveFacetsRefinements: RefinementList$3.removeRefinement(
|
|
2521
2495
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2522
2496
|
});
|
|
2523
2497
|
},
|
|
@@ -2583,7 +2557,7 @@ SearchParameters.prototype = {
|
|
|
2583
2557
|
}
|
|
2584
2558
|
|
|
2585
2559
|
return this.setQueryParameters({
|
|
2586
|
-
facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2560
|
+
facetsRefinements: RefinementList$3.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2587
2561
|
});
|
|
2588
2562
|
},
|
|
2589
2563
|
/**
|
|
@@ -2599,7 +2573,7 @@ SearchParameters.prototype = {
|
|
|
2599
2573
|
}
|
|
2600
2574
|
|
|
2601
2575
|
return this.setQueryParameters({
|
|
2602
|
-
facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2576
|
+
facetsExcludes: RefinementList$3.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2603
2577
|
});
|
|
2604
2578
|
},
|
|
2605
2579
|
/**
|
|
@@ -2616,7 +2590,7 @@ SearchParameters.prototype = {
|
|
|
2616
2590
|
}
|
|
2617
2591
|
|
|
2618
2592
|
return this.setQueryParameters({
|
|
2619
|
-
disjunctiveFacetsRefinements: RefinementList.toggleRefinement(
|
|
2593
|
+
disjunctiveFacetsRefinements: RefinementList$3.toggleRefinement(
|
|
2620
2594
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2621
2595
|
});
|
|
2622
2596
|
},
|
|
@@ -2755,7 +2729,7 @@ SearchParameters.prototype = {
|
|
|
2755
2729
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2756
2730
|
return false;
|
|
2757
2731
|
}
|
|
2758
|
-
return RefinementList.isRefined(this.facetsRefinements, facet, value);
|
|
2732
|
+
return RefinementList$3.isRefined(this.facetsRefinements, facet, value);
|
|
2759
2733
|
},
|
|
2760
2734
|
/**
|
|
2761
2735
|
* Returns true if the facet contains exclusions or if a specific value is
|
|
@@ -2771,7 +2745,7 @@ SearchParameters.prototype = {
|
|
|
2771
2745
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2772
2746
|
return false;
|
|
2773
2747
|
}
|
|
2774
|
-
return RefinementList.isRefined(this.facetsExcludes, facet, value);
|
|
2748
|
+
return RefinementList$3.isRefined(this.facetsExcludes, facet, value);
|
|
2775
2749
|
},
|
|
2776
2750
|
/**
|
|
2777
2751
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2786,7 +2760,7 @@ SearchParameters.prototype = {
|
|
|
2786
2760
|
if (!this.isDisjunctiveFacet(facet)) {
|
|
2787
2761
|
return false;
|
|
2788
2762
|
}
|
|
2789
|
-
return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2763
|
+
return RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2790
2764
|
},
|
|
2791
2765
|
/**
|
|
2792
2766
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2972,7 +2946,7 @@ SearchParameters.prototype = {
|
|
|
2972
2946
|
var isNextValueDefined = nextWithNumbers[key] !== undefined;
|
|
2973
2947
|
|
|
2974
2948
|
if (isPreviousValueDefined && !isNextValueDefined) {
|
|
2975
|
-
return omit
|
|
2949
|
+
return omit(previous, [key]);
|
|
2976
2950
|
}
|
|
2977
2951
|
|
|
2978
2952
|
if (isNextValueDefined) {
|
|
@@ -4077,20 +4051,29 @@ function extractNormalizedFacetValues(results, attribute) {
|
|
|
4077
4051
|
}
|
|
4078
4052
|
|
|
4079
4053
|
/**
|
|
4080
|
-
* Sort nodes of a hierarchical facet results
|
|
4054
|
+
* Sort nodes of a hierarchical or disjunctive facet results
|
|
4081
4055
|
* @private
|
|
4082
|
-
* @param {
|
|
4056
|
+
* @param {function} sortFn
|
|
4057
|
+
* @param {HierarchicalFacet|Array} node node upon which we want to apply the sort
|
|
4058
|
+
* @param {string[]} names attribute names
|
|
4059
|
+
* @param {number} [level=0] current index in the names array
|
|
4083
4060
|
*/
|
|
4084
|
-
function recSort(sortFn, node) {
|
|
4061
|
+
function recSort(sortFn, node, names, level) {
|
|
4062
|
+
level = level || 0;
|
|
4063
|
+
|
|
4064
|
+
if (Array.isArray(node)) {
|
|
4065
|
+
return sortFn(node, names[level]);
|
|
4066
|
+
}
|
|
4067
|
+
|
|
4085
4068
|
if (!node.data || node.data.length === 0) {
|
|
4086
4069
|
return node;
|
|
4087
4070
|
}
|
|
4088
4071
|
|
|
4089
4072
|
var children = node.data.map(function(childNode) {
|
|
4090
|
-
return recSort(sortFn, childNode);
|
|
4073
|
+
return recSort(sortFn, childNode, names, level + 1);
|
|
4091
4074
|
});
|
|
4092
|
-
var sortedChildren = sortFn(children);
|
|
4093
|
-
var newNode =
|
|
4075
|
+
var sortedChildren = sortFn(children, names[level]);
|
|
4076
|
+
var newNode = defaultsPure({data: sortedChildren}, node);
|
|
4094
4077
|
return newNode;
|
|
4095
4078
|
}
|
|
4096
4079
|
|
|
@@ -4100,6 +4083,72 @@ function vanillaSortFn(order, data) {
|
|
|
4100
4083
|
return data.sort(order);
|
|
4101
4084
|
}
|
|
4102
4085
|
|
|
4086
|
+
/**
|
|
4087
|
+
* @typedef FacetOrdering
|
|
4088
|
+
* @type {Object}
|
|
4089
|
+
* @property {string[]} [order]
|
|
4090
|
+
* @property {'count' | 'alpha' | 'hidden'} [sortRemainingBy]
|
|
4091
|
+
*/
|
|
4092
|
+
|
|
4093
|
+
/**
|
|
4094
|
+
* Sorts facet arrays via their facet ordering
|
|
4095
|
+
* @param {Array} facetValues the values
|
|
4096
|
+
* @param {FacetOrdering} facetOrdering the ordering
|
|
4097
|
+
* @returns {Array}
|
|
4098
|
+
*/
|
|
4099
|
+
function sortViaFacetOrdering(facetValues, facetOrdering) {
|
|
4100
|
+
var orderedFacets = [];
|
|
4101
|
+
var remainingFacets = [];
|
|
4102
|
+
|
|
4103
|
+
var order = facetOrdering.order || [];
|
|
4104
|
+
/**
|
|
4105
|
+
* an object with the keys being the values in order, the values their index:
|
|
4106
|
+
* ['one', 'two'] -> { one: 0, two: 1 }
|
|
4107
|
+
*/
|
|
4108
|
+
var reverseOrder = order.reduce(function(acc, name, i) {
|
|
4109
|
+
acc[name] = i;
|
|
4110
|
+
return acc;
|
|
4111
|
+
}, {});
|
|
4112
|
+
|
|
4113
|
+
facetValues.forEach(function(item) {
|
|
4114
|
+
// hierarchical facets get sorted using their raw name
|
|
4115
|
+
var name = item.path || item.name;
|
|
4116
|
+
if (reverseOrder[name] !== undefined) {
|
|
4117
|
+
orderedFacets[reverseOrder[name]] = item;
|
|
4118
|
+
} else {
|
|
4119
|
+
remainingFacets.push(item);
|
|
4120
|
+
}
|
|
4121
|
+
});
|
|
4122
|
+
|
|
4123
|
+
var sortRemainingBy = facetOrdering.sortRemainingBy;
|
|
4124
|
+
var ordering;
|
|
4125
|
+
if (sortRemainingBy === 'hidden') {
|
|
4126
|
+
return orderedFacets;
|
|
4127
|
+
} else if (sortRemainingBy === 'alpha') {
|
|
4128
|
+
ordering = [['path', 'name'], ['asc', 'asc']];
|
|
4129
|
+
} else {
|
|
4130
|
+
ordering = [['count'], ['desc']];
|
|
4131
|
+
}
|
|
4132
|
+
|
|
4133
|
+
return orderedFacets.concat(
|
|
4134
|
+
orderBy_1(remainingFacets, ordering[0], ordering[1])
|
|
4135
|
+
);
|
|
4136
|
+
}
|
|
4137
|
+
|
|
4138
|
+
/**
|
|
4139
|
+
* @param {SearchResults} results the search results class
|
|
4140
|
+
* @param {string} attribute the attribute to retrieve ordering of
|
|
4141
|
+
* @returns {FacetOrdering=}
|
|
4142
|
+
*/
|
|
4143
|
+
function getFacetOrdering(results, attribute) {
|
|
4144
|
+
return (
|
|
4145
|
+
results.renderingContent &&
|
|
4146
|
+
results.renderingContent.facetOrdering &&
|
|
4147
|
+
results.renderingContent.facetOrdering.values &&
|
|
4148
|
+
results.renderingContent.facetOrdering.values[attribute]
|
|
4149
|
+
);
|
|
4150
|
+
}
|
|
4151
|
+
|
|
4103
4152
|
/**
|
|
4104
4153
|
* Get a the list of values for a given facet attribute. Those values are sorted
|
|
4105
4154
|
* refinement first, descending count (bigger value on top), and name ascending
|
|
@@ -4112,6 +4161,9 @@ function vanillaSortFn(order, data) {
|
|
|
4112
4161
|
* might not be respected if you have facet values that are already refined.
|
|
4113
4162
|
* @param {string} attribute attribute name
|
|
4114
4163
|
* @param {object} opts configuration options.
|
|
4164
|
+
* @param {boolean} [opts.facetOrdering]
|
|
4165
|
+
* Force the use of facetOrdering from the result if a sortBy is present. If
|
|
4166
|
+
* sortBy isn't present, facetOrdering will be used automatically.
|
|
4115
4167
|
* @param {Array.<string> | function} opts.sortBy
|
|
4116
4168
|
* When using strings, it consists of
|
|
4117
4169
|
* the name of the [FacetValue](#SearchResults.FacetValue) or the
|
|
@@ -4151,30 +4203,41 @@ SearchResults.prototype.getFacetValues = function(attribute, opts) {
|
|
|
4151
4203
|
return undefined;
|
|
4152
4204
|
}
|
|
4153
4205
|
|
|
4154
|
-
var options = defaultsPure({}, opts, {
|
|
4206
|
+
var options = defaultsPure({}, opts, {
|
|
4207
|
+
sortBy: SearchResults.DEFAULT_SORT,
|
|
4208
|
+
// if no sortBy is given, attempt to sort based on facetOrdering
|
|
4209
|
+
// if it is given, we still allow to sort via facet ordering first
|
|
4210
|
+
facetOrdering: !(opts && opts.sortBy)
|
|
4211
|
+
});
|
|
4155
4212
|
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
if (
|
|
4167
|
-
|
|
4213
|
+
var results = this;
|
|
4214
|
+
var attributes;
|
|
4215
|
+
if (Array.isArray(facetValues)) {
|
|
4216
|
+
attributes = [attribute];
|
|
4217
|
+
} else {
|
|
4218
|
+
var config = results._state.getHierarchicalFacetByName(facetValues.name);
|
|
4219
|
+
attributes = config.attributes;
|
|
4220
|
+
}
|
|
4221
|
+
|
|
4222
|
+
return recSort(function(data, facetName) {
|
|
4223
|
+
if (options.facetOrdering) {
|
|
4224
|
+
var facetOrdering = getFacetOrdering(results, facetName);
|
|
4225
|
+
if (Boolean(facetOrdering)) {
|
|
4226
|
+
return sortViaFacetOrdering(data, facetOrdering);
|
|
4227
|
+
}
|
|
4168
4228
|
}
|
|
4169
|
-
|
|
4170
|
-
|
|
4229
|
+
|
|
4230
|
+
if (Array.isArray(options.sortBy)) {
|
|
4231
|
+
var order = formatSort(options.sortBy, SearchResults.DEFAULT_SORT);
|
|
4232
|
+
return orderBy_1(data, order[0], order[1]);
|
|
4233
|
+
} else if (typeof options.sortBy === 'function') {
|
|
4171
4234
|
return vanillaSortFn(options.sortBy, data);
|
|
4172
|
-
}
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
);
|
|
4235
|
+
}
|
|
4236
|
+
throw new Error(
|
|
4237
|
+
'options.sortBy is optional but if defined it must be ' +
|
|
4238
|
+
'either an array of string (predicates) or a sorting function'
|
|
4239
|
+
);
|
|
4240
|
+
}, facetValues, attributes);
|
|
4178
4241
|
};
|
|
4179
4242
|
|
|
4180
4243
|
/**
|
|
@@ -4705,7 +4768,7 @@ var requestBuilder = {
|
|
|
4705
4768
|
|
|
4706
4769
|
var requestBuilder_1 = requestBuilder;
|
|
4707
4770
|
|
|
4708
|
-
var version
|
|
4771
|
+
var version = '3.5.3';
|
|
4709
4772
|
|
|
4710
4773
|
/**
|
|
4711
4774
|
* Event triggered when a parameter is set or updated
|
|
@@ -4812,7 +4875,7 @@ var version$1 = '3.4.4';
|
|
|
4812
4875
|
*/
|
|
4813
4876
|
function AlgoliaSearchHelper(client, index, options) {
|
|
4814
4877
|
if (typeof client.addAlgoliaAgent === 'function') {
|
|
4815
|
-
client.addAlgoliaAgent('JS Helper (' + version
|
|
4878
|
+
client.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
4816
4879
|
}
|
|
4817
4880
|
|
|
4818
4881
|
this.setClient(client);
|
|
@@ -4967,7 +5030,7 @@ AlgoliaSearchHelper.prototype.findAnswers = function(options) {
|
|
|
4967
5030
|
nbHits: options.nbHits
|
|
4968
5031
|
},
|
|
4969
5032
|
{
|
|
4970
|
-
params: omit
|
|
5033
|
+
params: omit(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
4971
5034
|
'attributesToSnippet',
|
|
4972
5035
|
'hitsPerPage',
|
|
4973
5036
|
'restrictSearchableAttributes',
|
|
@@ -6081,7 +6144,7 @@ AlgoliaSearchHelper.prototype.setClient = function(newClient) {
|
|
|
6081
6144
|
if (this.client === newClient) return this;
|
|
6082
6145
|
|
|
6083
6146
|
if (typeof newClient.addAlgoliaAgent === 'function') {
|
|
6084
|
-
newClient.addAlgoliaAgent('JS Helper (' + version
|
|
6147
|
+
newClient.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
6085
6148
|
}
|
|
6086
6149
|
this.client = newClient;
|
|
6087
6150
|
|
|
@@ -6200,7 +6263,7 @@ function algoliasearchHelper(client, index, opts) {
|
|
|
6200
6263
|
* @member module:algoliasearchHelper.version
|
|
6201
6264
|
* @type {number}
|
|
6202
6265
|
*/
|
|
6203
|
-
algoliasearchHelper.version = version
|
|
6266
|
+
algoliasearchHelper.version = version;
|
|
6204
6267
|
|
|
6205
6268
|
/**
|
|
6206
6269
|
* Constructor for the Helper.
|
|
@@ -6232,13 +6295,13 @@ function createOptionalFilter(_ref) {
|
|
|
6232
6295
|
return "".concat(attributeName, ":").concat(attributeValue, "<score=").concat(attributeScore || 1, ">");
|
|
6233
6296
|
}
|
|
6234
6297
|
|
|
6235
|
-
var defaultProps = {
|
|
6298
|
+
var defaultProps$1 = {
|
|
6236
6299
|
transformSearchParameters: function transformSearchParameters(x) {
|
|
6237
6300
|
return _objectSpread({}, x);
|
|
6238
6301
|
}
|
|
6239
6302
|
};
|
|
6240
6303
|
|
|
6241
|
-
function getId$
|
|
6304
|
+
function getId$e() {
|
|
6242
6305
|
// We store the search state of this widget in `configure`.
|
|
6243
6306
|
return 'configure';
|
|
6244
6307
|
}
|
|
@@ -6286,7 +6349,7 @@ function getSearchParametersFromProps(props) {
|
|
|
6286
6349
|
|
|
6287
6350
|
var connectConfigureRelatedItems = createConnectorWithContext({
|
|
6288
6351
|
displayName: 'AlgoliaConfigureRelatedItems',
|
|
6289
|
-
defaultProps: defaultProps,
|
|
6352
|
+
defaultProps: defaultProps$1,
|
|
6290
6353
|
getProvidedProps: function getProvidedProps() {
|
|
6291
6354
|
return {};
|
|
6292
6355
|
},
|
|
@@ -6294,7 +6357,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6294
6357
|
return searchParameters.setQueryParameters(getSearchParametersFromProps(props));
|
|
6295
6358
|
},
|
|
6296
6359
|
transitionState: function transitionState(props, _prevSearchState, nextSearchState) {
|
|
6297
|
-
var id = getId$
|
|
6360
|
+
var id = getId$e(); // We need to transform the exhaustive search parameters back to clean
|
|
6298
6361
|
// search parameters without the empty default keys so we don't pollute the
|
|
6299
6362
|
// `configure` search state.
|
|
6300
6363
|
|
|
@@ -6305,7 +6368,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6305
6368
|
}) : [];
|
|
6306
6369
|
this._searchParameters = searchParameters;
|
|
6307
6370
|
|
|
6308
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6371
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit$1(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6309
6372
|
|
|
6310
6373
|
return refineValue(nextSearchState, nextValue, {
|
|
6311
6374
|
ais: props.contextValue,
|
|
@@ -6315,7 +6378,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6315
6378
|
cleanUp: function cleanUp(props, searchState) {
|
|
6316
6379
|
var _this = this;
|
|
6317
6380
|
|
|
6318
|
-
var id = getId$
|
|
6381
|
+
var id = getId$e();
|
|
6319
6382
|
var indexId = getIndexId({
|
|
6320
6383
|
ais: props.contextValue,
|
|
6321
6384
|
multiIndexContext: props.indexContextValue
|
|
@@ -6388,7 +6451,7 @@ function getWidgetRefinements(attribute, widgetKey, searchState) {
|
|
|
6388
6451
|
}
|
|
6389
6452
|
}
|
|
6390
6453
|
|
|
6391
|
-
function getRefinements
|
|
6454
|
+
function getRefinements(attribute) {
|
|
6392
6455
|
var searchState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6393
6456
|
var refinements = Object.keys(searchState).filter(function (widgetKey) {
|
|
6394
6457
|
return searchState[widgetKey] !== undefined && searchState[widgetKey][attribute] !== undefined;
|
|
@@ -6405,7 +6468,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6405
6468
|
var searchState = _ref.searchState,
|
|
6406
6469
|
trackedFilters = _ref.trackedFilters;
|
|
6407
6470
|
var ruleContexts = Object.keys(trackedFilters).reduce(function (facets, facetName) {
|
|
6408
|
-
var facetRefinements = getRefinements
|
|
6471
|
+
var facetRefinements = getRefinements(facetName, searchState);
|
|
6409
6472
|
var getTrackedFacetValues = trackedFilters[facetName];
|
|
6410
6473
|
var trackedFacetValues = getTrackedFacetValues(facetRefinements);
|
|
6411
6474
|
return [].concat(_toConsumableArray(facets), _toConsumableArray(facetRefinements.filter(function (facetRefinement) {
|
|
@@ -6417,7 +6480,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6417
6480
|
return ruleContexts;
|
|
6418
6481
|
}
|
|
6419
6482
|
|
|
6420
|
-
var defaultProps
|
|
6483
|
+
var defaultProps = {
|
|
6421
6484
|
transformItems: function transformItems(items) {
|
|
6422
6485
|
return items;
|
|
6423
6486
|
},
|
|
@@ -6428,7 +6491,7 @@ var defaultProps$1 = {
|
|
|
6428
6491
|
};
|
|
6429
6492
|
var connectQueryRules = createConnectorWithContext({
|
|
6430
6493
|
displayName: 'AlgoliaQueryRules',
|
|
6431
|
-
defaultProps: defaultProps
|
|
6494
|
+
defaultProps: defaultProps,
|
|
6432
6495
|
getProvidedProps: function getProvidedProps(props, _1, searchResults) {
|
|
6433
6496
|
var results = getResults(searchResults, {
|
|
6434
6497
|
ais: props.contextValue,
|
|
@@ -6605,20 +6668,10 @@ _defineProperty(Index, "propTypes", {
|
|
|
6605
6668
|
children: PropTypes.node
|
|
6606
6669
|
});
|
|
6607
6670
|
|
|
6608
|
-
|
|
6609
|
-
var inferredIndexId = props.indexName;
|
|
6610
|
-
return React__default.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
6611
|
-
return React__default.createElement(Index, _extends({
|
|
6612
|
-
contextValue: contextValue,
|
|
6613
|
-
indexId: inferredIndexId
|
|
6614
|
-
}, props));
|
|
6615
|
-
});
|
|
6616
|
-
};
|
|
6617
|
-
|
|
6618
|
-
IndexWrapper.propTypes = {
|
|
6671
|
+
({
|
|
6619
6672
|
indexName: PropTypes.string.isRequired,
|
|
6620
6673
|
indexId: PropTypes.string
|
|
6621
|
-
};
|
|
6674
|
+
});
|
|
6622
6675
|
|
|
6623
6676
|
function createWidgetsManager(onWidgetsUpdate) {
|
|
6624
6677
|
var widgets = []; // Is an update scheduled?
|
|
@@ -6679,7 +6732,7 @@ function createStore(initialState) {
|
|
|
6679
6732
|
function addAlgoliaAgents(searchClient) {
|
|
6680
6733
|
if (typeof searchClient.addAlgoliaAgent === 'function') {
|
|
6681
6734
|
searchClient.addAlgoliaAgent("react (".concat(version$2, ")"));
|
|
6682
|
-
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version, ")"));
|
|
6735
|
+
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version$1, ")"));
|
|
6683
6736
|
}
|
|
6684
6737
|
}
|
|
6685
6738
|
|
|
@@ -6851,7 +6904,7 @@ function createInstantSearchManager(_ref) {
|
|
|
6851
6904
|
|
|
6852
6905
|
function search() {
|
|
6853
6906
|
if (!skip) {
|
|
6854
|
-
var _getSearchParameters = getSearchParameters(),
|
|
6907
|
+
var _getSearchParameters = getSearchParameters(helper.state),
|
|
6855
6908
|
mainParameters = _getSearchParameters.mainParameters,
|
|
6856
6909
|
derivedParameters = _getSearchParameters.derivedParameters; // We have to call `slice` because the method `detach` on the derived
|
|
6857
6910
|
// helpers mutates the value `derivedHelpers`. The `forEach` loop does
|
|
@@ -6917,8 +6970,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6917
6970
|
nextIsSearchStalled = false;
|
|
6918
6971
|
}
|
|
6919
6972
|
|
|
6920
|
-
|
|
6921
|
-
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6973
|
+
currentState.resultsFacetValues;
|
|
6974
|
+
var partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6922
6975
|
|
|
6923
6976
|
store.setState(_objectSpread({}, partialState, {
|
|
6924
6977
|
results: results,
|
|
@@ -6939,8 +6992,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6939
6992
|
nextIsSearchStalled = false;
|
|
6940
6993
|
}
|
|
6941
6994
|
|
|
6942
|
-
|
|
6943
|
-
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6995
|
+
currentState.resultsFacetValues;
|
|
6996
|
+
var partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6944
6997
|
|
|
6945
6998
|
store.setState(_objectSpread({}, partialState, {
|
|
6946
6999
|
isSearchStalled: nextIsSearchStalled,
|
|
@@ -6952,9 +7005,9 @@ function createInstantSearchManager(_ref) {
|
|
|
6952
7005
|
function handleNewSearch() {
|
|
6953
7006
|
if (!stalledSearchTimer) {
|
|
6954
7007
|
stalledSearchTimer = setTimeout(function () {
|
|
6955
|
-
var _store$getState = store.getState()
|
|
6956
|
-
|
|
6957
|
-
partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
7008
|
+
var _store$getState = store.getState();
|
|
7009
|
+
_store$getState.resultsFacetValues;
|
|
7010
|
+
var partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
6958
7011
|
|
|
6959
7012
|
store.setState(_objectSpread({}, partialState, {
|
|
6960
7013
|
isSearchStalled: true
|
|
@@ -7453,21 +7506,21 @@ _defineProperty(InstantSearch, "propTypes", {
|
|
|
7453
7506
|
stalledSearchDelay: PropTypes.number
|
|
7454
7507
|
});
|
|
7455
7508
|
|
|
7456
|
-
var getId$
|
|
7509
|
+
var getId$d = function getId(props) {
|
|
7457
7510
|
return props.attributes[0];
|
|
7458
7511
|
};
|
|
7459
|
-
var namespace = 'hierarchicalMenu';
|
|
7512
|
+
var namespace$6 = 'hierarchicalMenu';
|
|
7460
7513
|
|
|
7461
|
-
function _refine(props, searchState, nextRefinement, context) {
|
|
7462
|
-
var id = getId$
|
|
7514
|
+
function _refine$9(props, searchState, nextRefinement, context) {
|
|
7515
|
+
var id = getId$d(props);
|
|
7463
7516
|
|
|
7464
7517
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7465
7518
|
|
|
7466
7519
|
var resetPage = true;
|
|
7467
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
7520
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$6);
|
|
7468
7521
|
}
|
|
7469
7522
|
|
|
7470
|
-
function transformValue(values) {
|
|
7523
|
+
function transformValue$1(values) {
|
|
7471
7524
|
return values.reduce(function (acc, item) {
|
|
7472
7525
|
if (item.isRefined) {
|
|
7473
7526
|
acc.push({
|
|
@@ -7478,7 +7531,7 @@ function transformValue(values) {
|
|
|
7478
7531
|
}); // Create a variable in order to keep the same acc for the recursion, otherwise "reduce" returns a new one
|
|
7479
7532
|
|
|
7480
7533
|
if (item.data) {
|
|
7481
|
-
acc = acc.concat(transformValue(item.data));
|
|
7534
|
+
acc = acc.concat(transformValue$1(item.data));
|
|
7482
7535
|
}
|
|
7483
7536
|
}
|
|
7484
7537
|
|
|
@@ -7540,7 +7593,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7540
7593
|
transformItems: PropTypes.func
|
|
7541
7594
|
},
|
|
7542
7595
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
7543
|
-
var id = getId$
|
|
7596
|
+
var id = getId$d(props);
|
|
7544
7597
|
var results = getResults(searchResults, {
|
|
7545
7598
|
ais: props.contextValue,
|
|
7546
7599
|
multiIndexContext: props.indexContextValue
|
|
@@ -7555,7 +7608,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7555
7608
|
}
|
|
7556
7609
|
|
|
7557
7610
|
var values = results.getFacetValues(id);
|
|
7558
|
-
var items = values.data ? transformValue(values.data) : [];
|
|
7611
|
+
var items = values.data ? transformValue$1(values.data) : [];
|
|
7559
7612
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7560
7613
|
return {
|
|
7561
7614
|
canRefine: transformedItems.length > 0,
|
|
@@ -7563,7 +7616,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7563
7616
|
};
|
|
7564
7617
|
},
|
|
7565
7618
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7566
|
-
return _refine(props, searchState, nextRefinement, {
|
|
7619
|
+
return _refine$9(props, searchState, nextRefinement, {
|
|
7567
7620
|
ais: props.contextValue,
|
|
7568
7621
|
multiIndexContext: props.indexContextValue
|
|
7569
7622
|
});
|
|
@@ -7626,13 +7679,13 @@ var connectCurrentRefinements = createConnectorWithContext({
|
|
|
7626
7679
|
}
|
|
7627
7680
|
});
|
|
7628
7681
|
|
|
7629
|
-
var getId$
|
|
7682
|
+
var getId$c = function getId(props) {
|
|
7630
7683
|
return props.attributes[0];
|
|
7631
7684
|
};
|
|
7632
|
-
var namespace$
|
|
7685
|
+
var namespace$5 = 'hierarchicalMenu';
|
|
7633
7686
|
|
|
7634
|
-
function getCurrentRefinement(props, searchState, context) {
|
|
7635
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
7687
|
+
function getCurrentRefinement$b(props, searchState, context) {
|
|
7688
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$5, ".").concat(getId$c(props)), null);
|
|
7636
7689
|
|
|
7637
7690
|
if (currentRefinement === '') {
|
|
7638
7691
|
return null;
|
|
@@ -7641,13 +7694,13 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
7641
7694
|
return currentRefinement;
|
|
7642
7695
|
}
|
|
7643
7696
|
|
|
7644
|
-
function getValue(path, props, searchState, context) {
|
|
7697
|
+
function getValue$2(path, props, searchState, context) {
|
|
7645
7698
|
var id = props.id,
|
|
7646
7699
|
attributes = props.attributes,
|
|
7647
7700
|
separator = props.separator,
|
|
7648
7701
|
rootPath = props.rootPath,
|
|
7649
7702
|
showParentLevel = props.showParentLevel;
|
|
7650
|
-
var currentRefinement = getCurrentRefinement(props, searchState, context);
|
|
7703
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, context);
|
|
7651
7704
|
var nextRefinement;
|
|
7652
7705
|
|
|
7653
7706
|
if (currentRefinement === null) {
|
|
@@ -7668,14 +7721,14 @@ function getValue(path, props, searchState, context) {
|
|
|
7668
7721
|
return nextRefinement;
|
|
7669
7722
|
}
|
|
7670
7723
|
|
|
7671
|
-
function transformValue
|
|
7724
|
+
function transformValue(value, props, searchState, context) {
|
|
7672
7725
|
return value.map(function (v) {
|
|
7673
7726
|
return {
|
|
7674
7727
|
label: v.name,
|
|
7675
|
-
value: getValue(v.path, props, searchState, context),
|
|
7728
|
+
value: getValue$2(v.path, props, searchState, context),
|
|
7676
7729
|
count: v.count,
|
|
7677
7730
|
isRefined: v.isRefined,
|
|
7678
|
-
items: v.data && transformValue
|
|
7731
|
+
items: v.data && transformValue(v.data, props, searchState, context)
|
|
7679
7732
|
};
|
|
7680
7733
|
});
|
|
7681
7734
|
}
|
|
@@ -7691,20 +7744,20 @@ var truncate = function truncate() {
|
|
|
7691
7744
|
});
|
|
7692
7745
|
};
|
|
7693
7746
|
|
|
7694
|
-
function _refine$
|
|
7695
|
-
var id = getId$
|
|
7747
|
+
function _refine$8(props, searchState, nextRefinement, context) {
|
|
7748
|
+
var id = getId$c(props);
|
|
7696
7749
|
|
|
7697
7750
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7698
7751
|
|
|
7699
7752
|
var resetPage = true;
|
|
7700
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
7753
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$5);
|
|
7701
7754
|
}
|
|
7702
7755
|
|
|
7703
|
-
function _cleanUp(props, searchState, context) {
|
|
7704
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
7756
|
+
function _cleanUp$7(props, searchState, context) {
|
|
7757
|
+
return cleanUpValue(searchState, context, "".concat(namespace$5, ".").concat(getId$c(props)));
|
|
7705
7758
|
}
|
|
7706
7759
|
|
|
7707
|
-
var sortBy = ['name:asc'];
|
|
7760
|
+
var sortBy$1 = ['name:asc'];
|
|
7708
7761
|
/**
|
|
7709
7762
|
* connectHierarchicalMenu connector provides the logic to build a widget that will
|
|
7710
7763
|
* give the user the ability to explore a tree-like structure.
|
|
@@ -7786,7 +7839,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7786
7839
|
var showMore = props.showMore,
|
|
7787
7840
|
limit = props.limit,
|
|
7788
7841
|
showMoreLimit = props.showMoreLimit;
|
|
7789
|
-
var id = getId$
|
|
7842
|
+
var id = getId$c(props);
|
|
7790
7843
|
var results = getResults(searchResults, {
|
|
7791
7844
|
ais: props.contextValue,
|
|
7792
7845
|
multiIndexContext: props.indexContextValue
|
|
@@ -7796,7 +7849,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7796
7849
|
if (!isFacetPresent) {
|
|
7797
7850
|
return {
|
|
7798
7851
|
items: [],
|
|
7799
|
-
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7852
|
+
currentRefinement: getCurrentRefinement$b(props, searchState, {
|
|
7800
7853
|
ais: props.contextValue,
|
|
7801
7854
|
multiIndexContext: props.indexContextValue
|
|
7802
7855
|
}),
|
|
@@ -7806,16 +7859,16 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7806
7859
|
|
|
7807
7860
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7808
7861
|
var value = results.getFacetValues(id, {
|
|
7809
|
-
sortBy: sortBy
|
|
7862
|
+
sortBy: sortBy$1
|
|
7810
7863
|
});
|
|
7811
|
-
var items = value.data ? transformValue
|
|
7864
|
+
var items = value.data ? transformValue(value.data, props, searchState, {
|
|
7812
7865
|
ais: props.contextValue,
|
|
7813
7866
|
multiIndexContext: props.indexContextValue
|
|
7814
7867
|
}) : [];
|
|
7815
7868
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7816
7869
|
return {
|
|
7817
7870
|
items: truncate(transformedItems, itemsLimit),
|
|
7818
|
-
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7871
|
+
currentRefinement: getCurrentRefinement$b(props, searchState, {
|
|
7819
7872
|
ais: props.contextValue,
|
|
7820
7873
|
multiIndexContext: props.indexContextValue
|
|
7821
7874
|
}),
|
|
@@ -7823,13 +7876,13 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7823
7876
|
};
|
|
7824
7877
|
},
|
|
7825
7878
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7826
|
-
return _refine$
|
|
7879
|
+
return _refine$8(props, searchState, nextRefinement, {
|
|
7827
7880
|
ais: props.contextValue,
|
|
7828
7881
|
multiIndexContext: props.indexContextValue
|
|
7829
7882
|
});
|
|
7830
7883
|
},
|
|
7831
7884
|
cleanUp: function cleanUp(props, searchState) {
|
|
7832
|
-
return _cleanUp(props, searchState, {
|
|
7885
|
+
return _cleanUp$7(props, searchState, {
|
|
7833
7886
|
ais: props.contextValue,
|
|
7834
7887
|
multiIndexContext: props.indexContextValue
|
|
7835
7888
|
});
|
|
@@ -7843,7 +7896,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7843
7896
|
limit = props.limit,
|
|
7844
7897
|
showMoreLimit = props.showMoreLimit,
|
|
7845
7898
|
contextValue = props.contextValue;
|
|
7846
|
-
var id = getId$
|
|
7899
|
+
var id = getId$c(props);
|
|
7847
7900
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7848
7901
|
searchParameters = searchParameters.addHierarchicalFacet({
|
|
7849
7902
|
name: id,
|
|
@@ -7854,7 +7907,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7854
7907
|
}).setQueryParameters({
|
|
7855
7908
|
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, itemsLimit)
|
|
7856
7909
|
});
|
|
7857
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7910
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
7858
7911
|
ais: contextValue,
|
|
7859
7912
|
multiIndexContext: props.indexContextValue
|
|
7860
7913
|
});
|
|
@@ -7867,8 +7920,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7867
7920
|
},
|
|
7868
7921
|
getMetadata: function getMetadata(props, searchState) {
|
|
7869
7922
|
var rootAttribute = props.attributes[0];
|
|
7870
|
-
var id = getId$
|
|
7871
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7923
|
+
var id = getId$c(props);
|
|
7924
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
7872
7925
|
ais: props.contextValue,
|
|
7873
7926
|
multiIndexContext: props.indexContextValue
|
|
7874
7927
|
});
|
|
@@ -7876,7 +7929,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7876
7929
|
label: "".concat(rootAttribute, ": ").concat(currentRefinement),
|
|
7877
7930
|
attribute: rootAttribute,
|
|
7878
7931
|
value: function value(nextState) {
|
|
7879
|
-
return _refine$
|
|
7932
|
+
return _refine$8(props, nextState, '', {
|
|
7880
7933
|
ais: props.contextValue,
|
|
7881
7934
|
multiIndexContext: props.indexContextValue
|
|
7882
7935
|
});
|
|
@@ -8053,12 +8106,12 @@ var connectHits = createConnectorWithContext({
|
|
|
8053
8106
|
}
|
|
8054
8107
|
});
|
|
8055
8108
|
|
|
8056
|
-
function getId$
|
|
8109
|
+
function getId$b() {
|
|
8057
8110
|
return 'hitsPerPage';
|
|
8058
8111
|
}
|
|
8059
8112
|
|
|
8060
|
-
function getCurrentRefinement$
|
|
8061
|
-
var id = getId$
|
|
8113
|
+
function getCurrentRefinement$a(props, searchState, context) {
|
|
8114
|
+
var id = getId$b();
|
|
8062
8115
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
8063
8116
|
|
|
8064
8117
|
if (typeof currentRefinement === 'string') {
|
|
@@ -8093,7 +8146,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8093
8146
|
transformItems: PropTypes.func
|
|
8094
8147
|
},
|
|
8095
8148
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
8096
|
-
var currentRefinement = getCurrentRefinement$
|
|
8149
|
+
var currentRefinement = getCurrentRefinement$a(props, searchState, {
|
|
8097
8150
|
ais: props.contextValue,
|
|
8098
8151
|
multiIndexContext: props.indexContextValue
|
|
8099
8152
|
});
|
|
@@ -8110,7 +8163,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8110
8163
|
};
|
|
8111
8164
|
},
|
|
8112
8165
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8113
|
-
var id = getId$
|
|
8166
|
+
var id = getId$b();
|
|
8114
8167
|
|
|
8115
8168
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
8116
8169
|
|
|
@@ -8124,27 +8177,27 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8124
8177
|
return cleanUpValue(searchState, {
|
|
8125
8178
|
ais: props.contextValue,
|
|
8126
8179
|
multiIndexContext: props.indexContextValue
|
|
8127
|
-
}, getId$
|
|
8180
|
+
}, getId$b());
|
|
8128
8181
|
},
|
|
8129
8182
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8130
|
-
return searchParameters.setHitsPerPage(getCurrentRefinement$
|
|
8183
|
+
return searchParameters.setHitsPerPage(getCurrentRefinement$a(props, searchState, {
|
|
8131
8184
|
ais: props.contextValue,
|
|
8132
8185
|
multiIndexContext: props.indexContextValue
|
|
8133
8186
|
}));
|
|
8134
8187
|
},
|
|
8135
8188
|
getMetadata: function getMetadata() {
|
|
8136
8189
|
return {
|
|
8137
|
-
id: getId$
|
|
8190
|
+
id: getId$b()
|
|
8138
8191
|
};
|
|
8139
8192
|
}
|
|
8140
8193
|
});
|
|
8141
8194
|
|
|
8142
|
-
function getId$
|
|
8195
|
+
function getId$a() {
|
|
8143
8196
|
return 'page';
|
|
8144
8197
|
}
|
|
8145
8198
|
|
|
8146
|
-
function getCurrentRefinement$
|
|
8147
|
-
var id = getId$
|
|
8199
|
+
function getCurrentRefinement$9(props, searchState, context) {
|
|
8200
|
+
var id = getId$a();
|
|
8148
8201
|
var page = 1;
|
|
8149
8202
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8150
8203
|
|
|
@@ -8156,9 +8209,9 @@ function getCurrentRefinement$2(props, searchState, context) {
|
|
|
8156
8209
|
}
|
|
8157
8210
|
|
|
8158
8211
|
function getStateWithoutPage(state) {
|
|
8159
|
-
var _ref = state || {}
|
|
8160
|
-
|
|
8161
|
-
rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8212
|
+
var _ref = state || {};
|
|
8213
|
+
_ref.page;
|
|
8214
|
+
var rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8162
8215
|
|
|
8163
8216
|
return rest;
|
|
8164
8217
|
}
|
|
@@ -8267,14 +8320,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8267
8320
|
},
|
|
8268
8321
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8269
8322
|
return searchParameters.setQueryParameters({
|
|
8270
|
-
page: getCurrentRefinement$
|
|
8323
|
+
page: getCurrentRefinement$9(props, searchState, {
|
|
8271
8324
|
ais: props.contextValue,
|
|
8272
8325
|
multiIndexContext: props.indexContextValue
|
|
8273
8326
|
}) - 1
|
|
8274
8327
|
});
|
|
8275
8328
|
},
|
|
8276
8329
|
refine: function refine(props, searchState, event, index) {
|
|
8277
|
-
var id = getId$
|
|
8330
|
+
var id = getId$a();
|
|
8278
8331
|
|
|
8279
8332
|
var nextValue = _defineProperty({}, id, index + 1);
|
|
8280
8333
|
|
|
@@ -8286,14 +8339,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8286
8339
|
}
|
|
8287
8340
|
});
|
|
8288
8341
|
|
|
8289
|
-
var namespace$
|
|
8342
|
+
var namespace$4 = 'menu';
|
|
8290
8343
|
|
|
8291
|
-
function getId$
|
|
8344
|
+
function getId$9(props) {
|
|
8292
8345
|
return props.attribute;
|
|
8293
8346
|
}
|
|
8294
8347
|
|
|
8295
|
-
function getCurrentRefinement$
|
|
8296
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8348
|
+
function getCurrentRefinement$8(props, searchState, context) {
|
|
8349
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)), null);
|
|
8297
8350
|
|
|
8298
8351
|
if (currentRefinement === '') {
|
|
8299
8352
|
return null;
|
|
@@ -8303,28 +8356,28 @@ function getCurrentRefinement$3(props, searchState, context) {
|
|
|
8303
8356
|
}
|
|
8304
8357
|
|
|
8305
8358
|
function getValue$1(name, props, searchState, context) {
|
|
8306
|
-
var currentRefinement = getCurrentRefinement$
|
|
8359
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, context);
|
|
8307
8360
|
return name === currentRefinement ? '' : name;
|
|
8308
8361
|
}
|
|
8309
8362
|
|
|
8310
|
-
function getLimit(_ref) {
|
|
8363
|
+
function getLimit$1(_ref) {
|
|
8311
8364
|
var showMore = _ref.showMore,
|
|
8312
8365
|
limit = _ref.limit,
|
|
8313
8366
|
showMoreLimit = _ref.showMoreLimit;
|
|
8314
8367
|
return showMore ? showMoreLimit : limit;
|
|
8315
8368
|
}
|
|
8316
8369
|
|
|
8317
|
-
function _refine$
|
|
8318
|
-
var id = getId$
|
|
8370
|
+
function _refine$7(props, searchState, nextRefinement, context) {
|
|
8371
|
+
var id = getId$9(props);
|
|
8319
8372
|
|
|
8320
8373
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : '');
|
|
8321
8374
|
|
|
8322
8375
|
var resetPage = true;
|
|
8323
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
8376
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$4);
|
|
8324
8377
|
}
|
|
8325
8378
|
|
|
8326
|
-
function _cleanUp$
|
|
8327
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
8379
|
+
function _cleanUp$6(props, searchState, context) {
|
|
8380
|
+
return cleanUpValue(searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)));
|
|
8328
8381
|
}
|
|
8329
8382
|
|
|
8330
8383
|
var defaultSortBy = ['count:desc', 'name:asc'];
|
|
@@ -8383,7 +8436,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8383
8436
|
if (!canRefine) {
|
|
8384
8437
|
return {
|
|
8385
8438
|
items: [],
|
|
8386
|
-
currentRefinement: getCurrentRefinement$
|
|
8439
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
8387
8440
|
ais: props.contextValue,
|
|
8388
8441
|
multiIndexContext: props.indexContextValue
|
|
8389
8442
|
}),
|
|
@@ -8430,8 +8483,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8430
8483
|
|
|
8431
8484
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
8432
8485
|
return {
|
|
8433
|
-
items: transformedItems.slice(0, getLimit(props)),
|
|
8434
|
-
currentRefinement: getCurrentRefinement$
|
|
8486
|
+
items: transformedItems.slice(0, getLimit$1(props)),
|
|
8487
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
8435
8488
|
ais: props.contextValue,
|
|
8436
8489
|
multiIndexContext: props.indexContextValue
|
|
8437
8490
|
}),
|
|
@@ -8441,7 +8494,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8441
8494
|
};
|
|
8442
8495
|
},
|
|
8443
8496
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8444
|
-
return _refine$
|
|
8497
|
+
return _refine$7(props, searchState, nextRefinement, {
|
|
8445
8498
|
ais: props.contextValue,
|
|
8446
8499
|
multiIndexContext: props.indexContextValue
|
|
8447
8500
|
});
|
|
@@ -8450,11 +8503,11 @@ var connectMenu = createConnectorWithContext({
|
|
|
8450
8503
|
return {
|
|
8451
8504
|
facetName: props.attribute,
|
|
8452
8505
|
query: nextRefinement,
|
|
8453
|
-
maxFacetHits: getLimit(props)
|
|
8506
|
+
maxFacetHits: getLimit$1(props)
|
|
8454
8507
|
};
|
|
8455
8508
|
},
|
|
8456
8509
|
cleanUp: function cleanUp(props, searchState) {
|
|
8457
|
-
return _cleanUp$
|
|
8510
|
+
return _cleanUp$6(props, searchState, {
|
|
8458
8511
|
ais: props.contextValue,
|
|
8459
8512
|
multiIndexContext: props.indexContextValue
|
|
8460
8513
|
});
|
|
@@ -8462,10 +8515,10 @@ var connectMenu = createConnectorWithContext({
|
|
|
8462
8515
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8463
8516
|
var attribute = props.attribute;
|
|
8464
8517
|
searchParameters = searchParameters.setQueryParameters({
|
|
8465
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
8518
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit$1(props))
|
|
8466
8519
|
});
|
|
8467
8520
|
searchParameters = searchParameters.addDisjunctiveFacet(attribute);
|
|
8468
|
-
var currentRefinement = getCurrentRefinement$
|
|
8521
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
8469
8522
|
ais: props.contextValue,
|
|
8470
8523
|
multiIndexContext: props.indexContextValue
|
|
8471
8524
|
});
|
|
@@ -8477,8 +8530,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8477
8530
|
return searchParameters;
|
|
8478
8531
|
},
|
|
8479
8532
|
getMetadata: function getMetadata(props, searchState) {
|
|
8480
|
-
var id = getId$
|
|
8481
|
-
var currentRefinement = getCurrentRefinement$
|
|
8533
|
+
var id = getId$9(props);
|
|
8534
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
8482
8535
|
ais: props.contextValue,
|
|
8483
8536
|
multiIndexContext: props.indexContextValue
|
|
8484
8537
|
});
|
|
@@ -8492,7 +8545,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8492
8545
|
label: "".concat(props.attribute, ": ").concat(currentRefinement),
|
|
8493
8546
|
attribute: props.attribute,
|
|
8494
8547
|
value: function value(nextState) {
|
|
8495
|
-
return _refine$
|
|
8548
|
+
return _refine$7(props, nextState, '', {
|
|
8496
8549
|
ais: props.contextValue,
|
|
8497
8550
|
multiIndexContext: props.indexContextValue
|
|
8498
8551
|
});
|
|
@@ -8508,14 +8561,17 @@ function _arrayWithHoles(arr) {
|
|
|
8508
8561
|
}
|
|
8509
8562
|
|
|
8510
8563
|
function _iterableToArrayLimit(arr, i) {
|
|
8511
|
-
|
|
8564
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
8565
|
+
|
|
8566
|
+
if (_i == null) return;
|
|
8512
8567
|
var _arr = [];
|
|
8513
8568
|
var _n = true;
|
|
8514
8569
|
var _d = false;
|
|
8515
|
-
|
|
8570
|
+
|
|
8571
|
+
var _s, _e;
|
|
8516
8572
|
|
|
8517
8573
|
try {
|
|
8518
|
-
for (
|
|
8574
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
8519
8575
|
_arr.push(_s.value);
|
|
8520
8576
|
|
|
8521
8577
|
if (i && _arr.length === i) break;
|
|
@@ -8566,19 +8622,19 @@ function parseItem(value) {
|
|
|
8566
8622
|
endStr = _value$split2[1];
|
|
8567
8623
|
|
|
8568
8624
|
return {
|
|
8569
|
-
start: startStr.length > 0 ?
|
|
8570
|
-
end: endStr.length > 0 ?
|
|
8625
|
+
start: startStr.length > 0 ? parseFloat(startStr) : null,
|
|
8626
|
+
end: endStr.length > 0 ? parseFloat(endStr) : null
|
|
8571
8627
|
};
|
|
8572
8628
|
}
|
|
8573
8629
|
|
|
8574
8630
|
var namespace$3 = 'multiRange';
|
|
8575
8631
|
|
|
8576
|
-
function getId$
|
|
8632
|
+
function getId$8(props) {
|
|
8577
8633
|
return props.attribute;
|
|
8578
8634
|
}
|
|
8579
8635
|
|
|
8580
|
-
function getCurrentRefinement$
|
|
8581
|
-
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8636
|
+
function getCurrentRefinement$7(props, searchState, context) {
|
|
8637
|
+
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$8(props)), '');
|
|
8582
8638
|
}
|
|
8583
8639
|
|
|
8584
8640
|
function isRefinementsRangeIncludesInsideItemRange(stats, start, end) {
|
|
@@ -8597,15 +8653,15 @@ function itemHasRefinement(attribute, results, value) {
|
|
|
8597
8653
|
return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end)));
|
|
8598
8654
|
}
|
|
8599
8655
|
|
|
8600
|
-
function _refine$
|
|
8601
|
-
var nextValue = _defineProperty({}, getId$
|
|
8656
|
+
function _refine$6(props, searchState, nextRefinement, context) {
|
|
8657
|
+
var nextValue = _defineProperty({}, getId$8(props), nextRefinement);
|
|
8602
8658
|
|
|
8603
8659
|
var resetPage = true;
|
|
8604
8660
|
return refineValue(searchState, nextValue, context, resetPage, namespace$3);
|
|
8605
8661
|
}
|
|
8606
8662
|
|
|
8607
|
-
function _cleanUp$
|
|
8608
|
-
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8663
|
+
function _cleanUp$5(props, searchState, context) {
|
|
8664
|
+
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$8(props)));
|
|
8609
8665
|
}
|
|
8610
8666
|
/**
|
|
8611
8667
|
* connectNumericMenu connector provides the logic to build a widget that will
|
|
@@ -8639,7 +8695,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8639
8695
|
},
|
|
8640
8696
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
8641
8697
|
var attribute = props.attribute;
|
|
8642
|
-
var currentRefinement = getCurrentRefinement$
|
|
8698
|
+
var currentRefinement = getCurrentRefinement$7(props, searchState, {
|
|
8643
8699
|
ais: props.contextValue,
|
|
8644
8700
|
multiIndexContext: props.indexContextValue
|
|
8645
8701
|
});
|
|
@@ -8653,11 +8709,11 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8653
8709
|
label: item.label,
|
|
8654
8710
|
value: value,
|
|
8655
8711
|
isRefined: value === currentRefinement,
|
|
8656
|
-
noRefinement: results ? itemHasRefinement(getId$
|
|
8712
|
+
noRefinement: results ? itemHasRefinement(getId$8(props), results, value) : false
|
|
8657
8713
|
};
|
|
8658
8714
|
});
|
|
8659
8715
|
var stats = results && results.getFacetByName(attribute) ? results.getFacetStats(attribute) : null;
|
|
8660
|
-
var refinedItem = find(items, function (item) {
|
|
8716
|
+
var refinedItem = find$2(items, function (item) {
|
|
8661
8717
|
return item.isRefined === true;
|
|
8662
8718
|
});
|
|
8663
8719
|
|
|
@@ -8682,13 +8738,13 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8682
8738
|
};
|
|
8683
8739
|
},
|
|
8684
8740
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8685
|
-
return _refine$
|
|
8741
|
+
return _refine$6(props, searchState, nextRefinement, {
|
|
8686
8742
|
ais: props.contextValue,
|
|
8687
8743
|
multiIndexContext: props.indexContextValue
|
|
8688
8744
|
});
|
|
8689
8745
|
},
|
|
8690
8746
|
cleanUp: function cleanUp(props, searchState) {
|
|
8691
|
-
return _cleanUp$
|
|
8747
|
+
return _cleanUp$5(props, searchState, {
|
|
8692
8748
|
ais: props.contextValue,
|
|
8693
8749
|
multiIndexContext: props.indexContextValue
|
|
8694
8750
|
});
|
|
@@ -8696,7 +8752,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8696
8752
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8697
8753
|
var attribute = props.attribute;
|
|
8698
8754
|
|
|
8699
|
-
var _parseItem = parseItem(getCurrentRefinement$
|
|
8755
|
+
var _parseItem = parseItem(getCurrentRefinement$7(props, searchState, {
|
|
8700
8756
|
ais: props.contextValue,
|
|
8701
8757
|
multiIndexContext: props.indexContextValue
|
|
8702
8758
|
})),
|
|
@@ -8716,8 +8772,8 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8716
8772
|
return searchParameters;
|
|
8717
8773
|
},
|
|
8718
8774
|
getMetadata: function getMetadata(props, searchState) {
|
|
8719
|
-
var id = getId$
|
|
8720
|
-
var value = getCurrentRefinement$
|
|
8775
|
+
var id = getId$8(props);
|
|
8776
|
+
var value = getCurrentRefinement$7(props, searchState, {
|
|
8721
8777
|
ais: props.contextValue,
|
|
8722
8778
|
multiIndexContext: props.indexContextValue
|
|
8723
8779
|
});
|
|
@@ -8728,7 +8784,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8728
8784
|
});
|
|
8729
8785
|
|
|
8730
8786
|
if (value !== '') {
|
|
8731
|
-
var _find = find(props.items, function (item) {
|
|
8787
|
+
var _find = find$2(props.items, function (item) {
|
|
8732
8788
|
return stringifyItem(item) === value;
|
|
8733
8789
|
}),
|
|
8734
8790
|
label = _find.label;
|
|
@@ -8738,7 +8794,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8738
8794
|
attribute: props.attribute,
|
|
8739
8795
|
currentRefinement: label,
|
|
8740
8796
|
value: function value(nextState) {
|
|
8741
|
-
return _refine$
|
|
8797
|
+
return _refine$6(props, nextState, '', {
|
|
8742
8798
|
ais: props.contextValue,
|
|
8743
8799
|
multiIndexContext: props.indexContextValue
|
|
8744
8800
|
});
|
|
@@ -8754,12 +8810,12 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8754
8810
|
}
|
|
8755
8811
|
});
|
|
8756
8812
|
|
|
8757
|
-
function getId$
|
|
8813
|
+
function getId$7() {
|
|
8758
8814
|
return 'page';
|
|
8759
8815
|
}
|
|
8760
8816
|
|
|
8761
|
-
function getCurrentRefinement$
|
|
8762
|
-
var id = getId$
|
|
8817
|
+
function getCurrentRefinement$6(props, searchState, context) {
|
|
8818
|
+
var id = getId$7();
|
|
8763
8819
|
var page = 1;
|
|
8764
8820
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8765
8821
|
|
|
@@ -8770,8 +8826,8 @@ function getCurrentRefinement$5(props, searchState, context) {
|
|
|
8770
8826
|
return currentRefinement;
|
|
8771
8827
|
}
|
|
8772
8828
|
|
|
8773
|
-
function _refine$
|
|
8774
|
-
var id = getId$
|
|
8829
|
+
function _refine$5(props, searchState, nextPage, context) {
|
|
8830
|
+
var id = getId$7();
|
|
8775
8831
|
|
|
8776
8832
|
var nextValue = _defineProperty({}, id, nextPage);
|
|
8777
8833
|
|
|
@@ -8811,7 +8867,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8811
8867
|
var nbPages = results.nbPages;
|
|
8812
8868
|
return {
|
|
8813
8869
|
nbPages: nbPages,
|
|
8814
|
-
currentRefinement: getCurrentRefinement$
|
|
8870
|
+
currentRefinement: getCurrentRefinement$6(props, searchState, {
|
|
8815
8871
|
ais: props.contextValue,
|
|
8816
8872
|
multiIndexContext: props.indexContextValue
|
|
8817
8873
|
}),
|
|
@@ -8819,7 +8875,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8819
8875
|
};
|
|
8820
8876
|
},
|
|
8821
8877
|
refine: function refine(props, searchState, nextPage) {
|
|
8822
|
-
return _refine$
|
|
8878
|
+
return _refine$5(props, searchState, nextPage, {
|
|
8823
8879
|
ais: props.contextValue,
|
|
8824
8880
|
multiIndexContext: props.indexContextValue
|
|
8825
8881
|
});
|
|
@@ -8828,17 +8884,17 @@ var connectPagination = createConnectorWithContext({
|
|
|
8828
8884
|
return cleanUpValue(searchState, {
|
|
8829
8885
|
ais: props.contextValue,
|
|
8830
8886
|
multiIndexContext: props.indexContextValue
|
|
8831
|
-
}, getId$
|
|
8887
|
+
}, getId$7());
|
|
8832
8888
|
},
|
|
8833
8889
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8834
|
-
return searchParameters.setPage(getCurrentRefinement$
|
|
8890
|
+
return searchParameters.setPage(getCurrentRefinement$6(props, searchState, {
|
|
8835
8891
|
ais: props.contextValue,
|
|
8836
8892
|
multiIndexContext: props.indexContextValue
|
|
8837
8893
|
}) - 1);
|
|
8838
8894
|
},
|
|
8839
8895
|
getMetadata: function getMetadata() {
|
|
8840
8896
|
return {
|
|
8841
|
-
id: getId$
|
|
8897
|
+
id: getId$7()
|
|
8842
8898
|
};
|
|
8843
8899
|
}
|
|
8844
8900
|
});
|
|
@@ -8884,11 +8940,11 @@ var connectPoweredBy = createConnectorWithContext({
|
|
|
8884
8940
|
* @providedPropType {number} precision - Number of digits after decimal point to use.
|
|
8885
8941
|
*/
|
|
8886
8942
|
|
|
8887
|
-
function getId$
|
|
8943
|
+
function getId$6(props) {
|
|
8888
8944
|
return props.attribute;
|
|
8889
8945
|
}
|
|
8890
8946
|
|
|
8891
|
-
var namespace$
|
|
8947
|
+
var namespace$2 = 'range';
|
|
8892
8948
|
|
|
8893
8949
|
function getCurrentRange(boundaries, stats, precision) {
|
|
8894
8950
|
var pow = Math.pow(10, precision);
|
|
@@ -8918,8 +8974,8 @@ function getCurrentRange(boundaries, stats, precision) {
|
|
|
8918
8974
|
};
|
|
8919
8975
|
}
|
|
8920
8976
|
|
|
8921
|
-
function getCurrentRefinement$
|
|
8922
|
-
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8977
|
+
function getCurrentRefinement$5(props, searchState, currentRange, context) {
|
|
8978
|
+
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)), {}),
|
|
8923
8979
|
min = _getCurrentRefinement.min,
|
|
8924
8980
|
max = _getCurrentRefinement.max;
|
|
8925
8981
|
|
|
@@ -8985,7 +9041,7 @@ function nextValueForRefinement(hasBound, isReset, range, value) {
|
|
|
8985
9041
|
return next;
|
|
8986
9042
|
}
|
|
8987
9043
|
|
|
8988
|
-
function _refine$
|
|
9044
|
+
function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
8989
9045
|
var nextMin = nextRefinement.min,
|
|
8990
9046
|
nextMax = nextRefinement.max;
|
|
8991
9047
|
var currentMinRange = currentRange.min,
|
|
@@ -9009,7 +9065,7 @@ function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
|
9009
9065
|
throw Error("You can't provide max value greater than range.");
|
|
9010
9066
|
}
|
|
9011
9067
|
|
|
9012
|
-
var id = getId$
|
|
9068
|
+
var id = getId$6(props);
|
|
9013
9069
|
var resetPage = true;
|
|
9014
9070
|
|
|
9015
9071
|
var nextValue = _defineProperty({}, id, {
|
|
@@ -9017,11 +9073,11 @@ function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
|
9017
9073
|
max: nextValueForRefinement(props.max !== undefined, isMaxReset, currentMaxRange, nextMaxAsNumber)
|
|
9018
9074
|
});
|
|
9019
9075
|
|
|
9020
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9076
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$2);
|
|
9021
9077
|
}
|
|
9022
9078
|
|
|
9023
|
-
function _cleanUp$
|
|
9024
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9079
|
+
function _cleanUp$4(props, searchState, context) {
|
|
9080
|
+
return cleanUpValue(searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)));
|
|
9025
9081
|
}
|
|
9026
9082
|
|
|
9027
9083
|
var connectRange = createConnectorWithContext({
|
|
@@ -9076,7 +9132,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9076
9132
|
min: rangeMin,
|
|
9077
9133
|
max: rangeMax
|
|
9078
9134
|
};
|
|
9079
|
-
var currentRefinement = getCurrentRefinement$
|
|
9135
|
+
var currentRefinement = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
9080
9136
|
ais: props.contextValue,
|
|
9081
9137
|
multiIndexContext: props.indexContextValue
|
|
9082
9138
|
});
|
|
@@ -9090,13 +9146,13 @@ var connectRange = createConnectorWithContext({
|
|
|
9090
9146
|
};
|
|
9091
9147
|
},
|
|
9092
9148
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9093
|
-
return _refine$
|
|
9149
|
+
return _refine$4(props, searchState, nextRefinement, this._currentRange, {
|
|
9094
9150
|
ais: props.contextValue,
|
|
9095
9151
|
multiIndexContext: props.indexContextValue
|
|
9096
9152
|
});
|
|
9097
9153
|
},
|
|
9098
9154
|
cleanUp: function cleanUp(props, searchState) {
|
|
9099
|
-
return _cleanUp$
|
|
9155
|
+
return _cleanUp$4(props, searchState, {
|
|
9100
9156
|
ais: props.contextValue,
|
|
9101
9157
|
multiIndexContext: props.indexContextValue
|
|
9102
9158
|
});
|
|
@@ -9104,7 +9160,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9104
9160
|
getSearchParameters: function getSearchParameters(params, props, searchState) {
|
|
9105
9161
|
var attribute = props.attribute;
|
|
9106
9162
|
|
|
9107
|
-
var _getCurrentRefinement2 = getCurrentRefinement$
|
|
9163
|
+
var _getCurrentRefinement2 = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
9108
9164
|
ais: props.contextValue,
|
|
9109
9165
|
multiIndexContext: props.indexContextValue
|
|
9110
9166
|
}),
|
|
@@ -9130,7 +9186,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9130
9186
|
minRange = _this$_currentRange.min,
|
|
9131
9187
|
maxRange = _this$_currentRange.max;
|
|
9132
9188
|
|
|
9133
|
-
var _getCurrentRefinement3 = getCurrentRefinement$
|
|
9189
|
+
var _getCurrentRefinement3 = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
9134
9190
|
ais: props.contextValue,
|
|
9135
9191
|
multiIndexContext: props.indexContextValue
|
|
9136
9192
|
}),
|
|
@@ -9149,7 +9205,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9149
9205
|
label: fragments.join(''),
|
|
9150
9206
|
attribute: props.attribute,
|
|
9151
9207
|
value: function value(nextState) {
|
|
9152
|
-
return _refine$
|
|
9208
|
+
return _refine$4(props, nextState, {}, _this._currentRange, {
|
|
9153
9209
|
ais: props.contextValue,
|
|
9154
9210
|
multiIndexContext: props.indexContextValue
|
|
9155
9211
|
});
|
|
@@ -9165,7 +9221,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9165
9221
|
}
|
|
9166
9222
|
|
|
9167
9223
|
return {
|
|
9168
|
-
id: getId$
|
|
9224
|
+
id: getId$6(props),
|
|
9169
9225
|
index: getIndexId({
|
|
9170
9226
|
ais: props.contextValue,
|
|
9171
9227
|
multiIndexContext: props.indexContextValue
|
|
@@ -9175,14 +9231,14 @@ var connectRange = createConnectorWithContext({
|
|
|
9175
9231
|
}
|
|
9176
9232
|
});
|
|
9177
9233
|
|
|
9178
|
-
var namespace$
|
|
9234
|
+
var namespace$1 = 'refinementList';
|
|
9179
9235
|
|
|
9180
|
-
function getId$
|
|
9236
|
+
function getId$5(props) {
|
|
9181
9237
|
return props.attribute;
|
|
9182
9238
|
}
|
|
9183
9239
|
|
|
9184
|
-
function getCurrentRefinement$
|
|
9185
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
9240
|
+
function getCurrentRefinement$4(props, searchState, context) {
|
|
9241
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$1, ".").concat(getId$5(props)), []);
|
|
9186
9242
|
|
|
9187
9243
|
if (typeof currentRefinement !== 'string') {
|
|
9188
9244
|
return currentRefinement;
|
|
@@ -9195,8 +9251,8 @@ function getCurrentRefinement$7(props, searchState, context) {
|
|
|
9195
9251
|
return [];
|
|
9196
9252
|
}
|
|
9197
9253
|
|
|
9198
|
-
function getValue
|
|
9199
|
-
var currentRefinement = getCurrentRefinement$
|
|
9254
|
+
function getValue(name, props, searchState, context) {
|
|
9255
|
+
var currentRefinement = getCurrentRefinement$4(props, searchState, context);
|
|
9200
9256
|
var isAnewValue = currentRefinement.indexOf(name) === -1;
|
|
9201
9257
|
var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates
|
|
9202
9258
|
: currentRefinement.filter(function (selectedValue) {
|
|
@@ -9206,15 +9262,15 @@ function getValue$2(name, props, searchState, context) {
|
|
|
9206
9262
|
return nextRefinement;
|
|
9207
9263
|
}
|
|
9208
9264
|
|
|
9209
|
-
function getLimit
|
|
9265
|
+
function getLimit(_ref) {
|
|
9210
9266
|
var showMore = _ref.showMore,
|
|
9211
9267
|
limit = _ref.limit,
|
|
9212
9268
|
showMoreLimit = _ref.showMoreLimit;
|
|
9213
9269
|
return showMore ? showMoreLimit : limit;
|
|
9214
9270
|
}
|
|
9215
9271
|
|
|
9216
|
-
function _refine$
|
|
9217
|
-
var id = getId$
|
|
9272
|
+
function _refine$3(props, searchState, nextRefinement, context) {
|
|
9273
|
+
var id = getId$5(props); // Setting the value to an empty string ensures that it is persisted in
|
|
9218
9274
|
// the URL as an empty value.
|
|
9219
9275
|
// This is necessary in the case where `defaultRefinement` contains one
|
|
9220
9276
|
// item and we try to deselect it. `nextSelected` would be an empty array,
|
|
@@ -9225,11 +9281,11 @@ function _refine$6(props, searchState, nextRefinement, context) {
|
|
|
9225
9281
|
var nextValue = _defineProperty({}, id, nextRefinement.length > 0 ? nextRefinement : '');
|
|
9226
9282
|
|
|
9227
9283
|
var resetPage = true;
|
|
9228
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9284
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$1);
|
|
9229
9285
|
}
|
|
9230
9286
|
|
|
9231
|
-
function _cleanUp$
|
|
9232
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9287
|
+
function _cleanUp$3(props, searchState, context) {
|
|
9288
|
+
return cleanUpValue(searchState, context, "".concat(namespace$1, ".").concat(getId$5(props)));
|
|
9233
9289
|
}
|
|
9234
9290
|
/**
|
|
9235
9291
|
* connectRefinementList connector provides the logic to build a widget that will
|
|
@@ -9256,7 +9312,7 @@ function _cleanUp$4(props, searchState, context) {
|
|
|
9256
9312
|
*/
|
|
9257
9313
|
|
|
9258
9314
|
|
|
9259
|
-
var sortBy
|
|
9315
|
+
var sortBy = ['isRefined', 'count:desc', 'name:asc'];
|
|
9260
9316
|
var connectRefinementList = createConnectorWithContext({
|
|
9261
9317
|
displayName: 'AlgoliaRefinementList',
|
|
9262
9318
|
propTypes: {
|
|
@@ -9294,7 +9350,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9294
9350
|
if (!canRefine) {
|
|
9295
9351
|
return {
|
|
9296
9352
|
items: [],
|
|
9297
|
-
currentRefinement: getCurrentRefinement$
|
|
9353
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, {
|
|
9298
9354
|
ais: props.contextValue,
|
|
9299
9355
|
multiIndexContext: props.indexContextValue
|
|
9300
9356
|
}),
|
|
@@ -9307,7 +9363,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9307
9363
|
var items = isFromSearch ? searchForFacetValuesResults[attribute].map(function (v) {
|
|
9308
9364
|
return {
|
|
9309
9365
|
label: v.value,
|
|
9310
|
-
value: getValue
|
|
9366
|
+
value: getValue(v.value, props, searchState, {
|
|
9311
9367
|
ais: props.contextValue,
|
|
9312
9368
|
multiIndexContext: props.indexContextValue
|
|
9313
9369
|
}),
|
|
@@ -9320,11 +9376,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9320
9376
|
isRefined: v.isRefined
|
|
9321
9377
|
};
|
|
9322
9378
|
}) : results.getFacetValues(attribute, {
|
|
9323
|
-
sortBy: sortBy
|
|
9379
|
+
sortBy: sortBy
|
|
9324
9380
|
}).map(function (v) {
|
|
9325
9381
|
return {
|
|
9326
9382
|
label: v.name,
|
|
9327
|
-
value: getValue
|
|
9383
|
+
value: getValue(v.name, props, searchState, {
|
|
9328
9384
|
ais: props.contextValue,
|
|
9329
9385
|
multiIndexContext: props.indexContextValue
|
|
9330
9386
|
}),
|
|
@@ -9334,8 +9390,8 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9334
9390
|
});
|
|
9335
9391
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
9336
9392
|
return {
|
|
9337
|
-
items: transformedItems.slice(0, getLimit
|
|
9338
|
-
currentRefinement: getCurrentRefinement$
|
|
9393
|
+
items: transformedItems.slice(0, getLimit(props)),
|
|
9394
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, {
|
|
9339
9395
|
ais: props.contextValue,
|
|
9340
9396
|
multiIndexContext: props.indexContextValue
|
|
9341
9397
|
}),
|
|
@@ -9345,7 +9401,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9345
9401
|
};
|
|
9346
9402
|
},
|
|
9347
9403
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9348
|
-
return _refine$
|
|
9404
|
+
return _refine$3(props, searchState, nextRefinement, {
|
|
9349
9405
|
ais: props.contextValue,
|
|
9350
9406
|
multiIndexContext: props.indexContextValue
|
|
9351
9407
|
});
|
|
@@ -9354,11 +9410,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9354
9410
|
return {
|
|
9355
9411
|
facetName: props.attribute,
|
|
9356
9412
|
query: nextRefinement,
|
|
9357
|
-
maxFacetHits: getLimit
|
|
9413
|
+
maxFacetHits: getLimit(props)
|
|
9358
9414
|
};
|
|
9359
9415
|
},
|
|
9360
9416
|
cleanUp: function cleanUp(props, searchState) {
|
|
9361
|
-
return _cleanUp$
|
|
9417
|
+
return _cleanUp$3(props, searchState, {
|
|
9362
9418
|
ais: props.contextValue,
|
|
9363
9419
|
multiIndexContext: props.indexContextValue
|
|
9364
9420
|
});
|
|
@@ -9369,10 +9425,10 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9369
9425
|
var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet';
|
|
9370
9426
|
var addRefinementKey = "".concat(addKey, "Refinement");
|
|
9371
9427
|
searchParameters = searchParameters.setQueryParameters({
|
|
9372
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit
|
|
9428
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
9373
9429
|
});
|
|
9374
9430
|
searchParameters = searchParameters[addKey](attribute);
|
|
9375
|
-
return getCurrentRefinement$
|
|
9431
|
+
return getCurrentRefinement$4(props, searchState, {
|
|
9376
9432
|
ais: props.contextValue,
|
|
9377
9433
|
multiIndexContext: props.indexContextValue
|
|
9378
9434
|
}).reduce(function (res, val) {
|
|
@@ -9380,7 +9436,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9380
9436
|
}, searchParameters);
|
|
9381
9437
|
},
|
|
9382
9438
|
getMetadata: function getMetadata(props, searchState) {
|
|
9383
|
-
var id = getId$
|
|
9439
|
+
var id = getId$5(props);
|
|
9384
9440
|
var context = {
|
|
9385
9441
|
ais: props.contextValue,
|
|
9386
9442
|
multiIndexContext: props.indexContextValue
|
|
@@ -9388,21 +9444,21 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9388
9444
|
return {
|
|
9389
9445
|
id: id,
|
|
9390
9446
|
index: getIndexId(context),
|
|
9391
|
-
items: getCurrentRefinement$
|
|
9447
|
+
items: getCurrentRefinement$4(props, searchState, context).length > 0 ? [{
|
|
9392
9448
|
attribute: props.attribute,
|
|
9393
9449
|
label: "".concat(props.attribute, ": "),
|
|
9394
|
-
currentRefinement: getCurrentRefinement$
|
|
9450
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, context),
|
|
9395
9451
|
value: function value(nextState) {
|
|
9396
|
-
return _refine$
|
|
9452
|
+
return _refine$3(props, nextState, [], context);
|
|
9397
9453
|
},
|
|
9398
|
-
items: getCurrentRefinement$
|
|
9454
|
+
items: getCurrentRefinement$4(props, searchState, context).map(function (item) {
|
|
9399
9455
|
return {
|
|
9400
9456
|
label: "".concat(item),
|
|
9401
9457
|
value: function value(nextState) {
|
|
9402
|
-
var nextSelectedItems = getCurrentRefinement$
|
|
9458
|
+
var nextSelectedItems = getCurrentRefinement$4(props, nextState, context).filter(function (other) {
|
|
9403
9459
|
return other !== item;
|
|
9404
9460
|
});
|
|
9405
|
-
return _refine$
|
|
9461
|
+
return _refine$3(props, searchState, nextSelectedItems, context);
|
|
9406
9462
|
}
|
|
9407
9463
|
};
|
|
9408
9464
|
})
|
|
@@ -9461,7 +9517,7 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9461
9517
|
// See: https://github.com/algolia/react-instantsearch/issues/164
|
|
9462
9518
|
|
|
9463
9519
|
|
|
9464
|
-
var cleanedSearchState = omit(searchState, ['configure', id]);
|
|
9520
|
+
var cleanedSearchState = omit$1(searchState, ['configure', id]);
|
|
9465
9521
|
var hasNotChanged = shallowEqual(this._prevSearchState, cleanedSearchState);
|
|
9466
9522
|
this._prevSearchState = cleanedSearchState;
|
|
9467
9523
|
return {
|
|
@@ -9471,12 +9527,12 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9471
9527
|
}
|
|
9472
9528
|
});
|
|
9473
9529
|
|
|
9474
|
-
function getId$
|
|
9530
|
+
function getId$4() {
|
|
9475
9531
|
return 'query';
|
|
9476
9532
|
}
|
|
9477
9533
|
|
|
9478
|
-
function getCurrentRefinement$
|
|
9479
|
-
var id = getId$
|
|
9534
|
+
function getCurrentRefinement$3(props, searchState, context) {
|
|
9535
|
+
var id = getId$4();
|
|
9480
9536
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9481
9537
|
|
|
9482
9538
|
if (currentRefinement) {
|
|
@@ -9486,8 +9542,8 @@ function getCurrentRefinement$8(props, searchState, context) {
|
|
|
9486
9542
|
return '';
|
|
9487
9543
|
}
|
|
9488
9544
|
|
|
9489
|
-
function _refine$
|
|
9490
|
-
var id = getId$
|
|
9545
|
+
function _refine$2(props, searchState, nextRefinement, context) {
|
|
9546
|
+
var id = getId$4();
|
|
9491
9547
|
|
|
9492
9548
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9493
9549
|
|
|
@@ -9495,8 +9551,8 @@ function _refine$7(props, searchState, nextRefinement, context) {
|
|
|
9495
9551
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9496
9552
|
}
|
|
9497
9553
|
|
|
9498
|
-
function _cleanUp$
|
|
9499
|
-
return cleanUpValue(searchState, context, getId$
|
|
9554
|
+
function _cleanUp$2(props, searchState, context) {
|
|
9555
|
+
return cleanUpValue(searchState, context, getId$4());
|
|
9500
9556
|
}
|
|
9501
9557
|
/**
|
|
9502
9558
|
* connectSearchBox connector provides the logic to build a widget that will
|
|
@@ -9517,7 +9573,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9517
9573
|
},
|
|
9518
9574
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
9519
9575
|
return {
|
|
9520
|
-
currentRefinement: getCurrentRefinement$
|
|
9576
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
9521
9577
|
ais: props.contextValue,
|
|
9522
9578
|
multiIndexContext: props.indexContextValue
|
|
9523
9579
|
}),
|
|
@@ -9525,26 +9581,26 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9525
9581
|
};
|
|
9526
9582
|
},
|
|
9527
9583
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9528
|
-
return _refine$
|
|
9584
|
+
return _refine$2(props, searchState, nextRefinement, {
|
|
9529
9585
|
ais: props.contextValue,
|
|
9530
9586
|
multiIndexContext: props.indexContextValue
|
|
9531
9587
|
});
|
|
9532
9588
|
},
|
|
9533
9589
|
cleanUp: function cleanUp(props, searchState) {
|
|
9534
|
-
return _cleanUp$
|
|
9590
|
+
return _cleanUp$2(props, searchState, {
|
|
9535
9591
|
ais: props.contextValue,
|
|
9536
9592
|
multiIndexContext: props.indexContextValue
|
|
9537
9593
|
});
|
|
9538
9594
|
},
|
|
9539
9595
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9540
|
-
return searchParameters.setQuery(getCurrentRefinement$
|
|
9596
|
+
return searchParameters.setQuery(getCurrentRefinement$3(props, searchState, {
|
|
9541
9597
|
ais: props.contextValue,
|
|
9542
9598
|
multiIndexContext: props.indexContextValue
|
|
9543
9599
|
}));
|
|
9544
9600
|
},
|
|
9545
9601
|
getMetadata: function getMetadata(props, searchState) {
|
|
9546
|
-
var id = getId$
|
|
9547
|
-
var currentRefinement = getCurrentRefinement$
|
|
9602
|
+
var id = getId$4();
|
|
9603
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
9548
9604
|
ais: props.contextValue,
|
|
9549
9605
|
multiIndexContext: props.indexContextValue
|
|
9550
9606
|
});
|
|
@@ -9557,7 +9613,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9557
9613
|
items: currentRefinement === null ? [] : [{
|
|
9558
9614
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9559
9615
|
value: function value(nextState) {
|
|
9560
|
-
return _refine$
|
|
9616
|
+
return _refine$2(props, nextState, '', {
|
|
9561
9617
|
ais: props.contextValue,
|
|
9562
9618
|
multiIndexContext: props.indexContextValue
|
|
9563
9619
|
});
|
|
@@ -9568,12 +9624,12 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9568
9624
|
}
|
|
9569
9625
|
});
|
|
9570
9626
|
|
|
9571
|
-
function getId$
|
|
9627
|
+
function getId$3() {
|
|
9572
9628
|
return 'relevancyStrictness';
|
|
9573
9629
|
}
|
|
9574
9630
|
|
|
9575
|
-
function getCurrentRefinement$
|
|
9576
|
-
var id = getId$
|
|
9631
|
+
function getCurrentRefinement$2(props, searchState, context) {
|
|
9632
|
+
var id = getId$3();
|
|
9577
9633
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id);
|
|
9578
9634
|
return currentRefinement;
|
|
9579
9635
|
}
|
|
@@ -9599,13 +9655,13 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9599
9655
|
};
|
|
9600
9656
|
},
|
|
9601
9657
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9602
|
-
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$
|
|
9658
|
+
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$2(props, searchState, {
|
|
9603
9659
|
ais: props.contextValue,
|
|
9604
9660
|
multiIndexContext: props.indexContextValue
|
|
9605
9661
|
}));
|
|
9606
9662
|
},
|
|
9607
9663
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9608
|
-
var nextValue = _defineProperty({}, getId$
|
|
9664
|
+
var nextValue = _defineProperty({}, getId$3(), nextRefinement);
|
|
9609
9665
|
|
|
9610
9666
|
var resetPage = true;
|
|
9611
9667
|
return refineValue(searchState, nextValue, {
|
|
@@ -9615,12 +9671,12 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9615
9671
|
}
|
|
9616
9672
|
});
|
|
9617
9673
|
|
|
9618
|
-
function getId$
|
|
9674
|
+
function getId$2() {
|
|
9619
9675
|
return 'sortBy';
|
|
9620
9676
|
}
|
|
9621
9677
|
|
|
9622
|
-
function getCurrentRefinement$
|
|
9623
|
-
var id = getId$
|
|
9678
|
+
function getCurrentRefinement$1(props, searchState, context) {
|
|
9679
|
+
var id = getId$2();
|
|
9624
9680
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
9625
9681
|
|
|
9626
9682
|
if (currentRefinement) {
|
|
@@ -9657,7 +9713,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9657
9713
|
transformItems: PropTypes.func
|
|
9658
9714
|
},
|
|
9659
9715
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
9660
|
-
var currentRefinement = getCurrentRefinement$
|
|
9716
|
+
var currentRefinement = getCurrentRefinement$1(props, searchState, {
|
|
9661
9717
|
ais: props.contextValue,
|
|
9662
9718
|
multiIndexContext: props.indexContextValue
|
|
9663
9719
|
});
|
|
@@ -9674,7 +9730,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9674
9730
|
};
|
|
9675
9731
|
},
|
|
9676
9732
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9677
|
-
var id = getId$
|
|
9733
|
+
var id = getId$2();
|
|
9678
9734
|
|
|
9679
9735
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9680
9736
|
|
|
@@ -9688,10 +9744,10 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9688
9744
|
return cleanUpValue(searchState, {
|
|
9689
9745
|
ais: props.contextValue,
|
|
9690
9746
|
multiIndexContext: props.indexContextValue
|
|
9691
|
-
}, getId$
|
|
9747
|
+
}, getId$2());
|
|
9692
9748
|
},
|
|
9693
9749
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9694
|
-
var selectedIndex = getCurrentRefinement$
|
|
9750
|
+
var selectedIndex = getCurrentRefinement$1(props, searchState, {
|
|
9695
9751
|
ais: props.contextValue,
|
|
9696
9752
|
multiIndexContext: props.indexContextValue
|
|
9697
9753
|
});
|
|
@@ -9699,7 +9755,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9699
9755
|
},
|
|
9700
9756
|
getMetadata: function getMetadata() {
|
|
9701
9757
|
return {
|
|
9702
|
-
id: getId$
|
|
9758
|
+
id: getId$2()
|
|
9703
9759
|
};
|
|
9704
9760
|
}
|
|
9705
9761
|
});
|
|
@@ -9735,15 +9791,15 @@ var connectStats = createConnectorWithContext({
|
|
|
9735
9791
|
}
|
|
9736
9792
|
});
|
|
9737
9793
|
|
|
9738
|
-
function getId$
|
|
9794
|
+
function getId$1(props) {
|
|
9739
9795
|
return props.attribute;
|
|
9740
9796
|
}
|
|
9741
9797
|
|
|
9742
|
-
var namespace
|
|
9798
|
+
var namespace = 'toggle';
|
|
9743
9799
|
var falsyStrings = ['0', 'false', 'null', 'undefined'];
|
|
9744
9800
|
|
|
9745
|
-
function getCurrentRefinement
|
|
9746
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace
|
|
9801
|
+
function getCurrentRefinement(props, searchState, context) {
|
|
9802
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace, ".").concat(getId$1(props)), false);
|
|
9747
9803
|
|
|
9748
9804
|
if (falsyStrings.indexOf(currentRefinement) !== -1) {
|
|
9749
9805
|
return false;
|
|
@@ -9752,17 +9808,17 @@ function getCurrentRefinement$b(props, searchState, context) {
|
|
|
9752
9808
|
return Boolean(currentRefinement);
|
|
9753
9809
|
}
|
|
9754
9810
|
|
|
9755
|
-
function _refine$
|
|
9756
|
-
var id = getId$
|
|
9811
|
+
function _refine$1(props, searchState, nextRefinement, context) {
|
|
9812
|
+
var id = getId$1(props);
|
|
9757
9813
|
|
|
9758
9814
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : false);
|
|
9759
9815
|
|
|
9760
9816
|
var resetPage = true;
|
|
9761
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace
|
|
9817
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
9762
9818
|
}
|
|
9763
9819
|
|
|
9764
|
-
function _cleanUp$
|
|
9765
|
-
return cleanUpValue(searchState, context, "".concat(namespace
|
|
9820
|
+
function _cleanUp$1(props, searchState, context) {
|
|
9821
|
+
return cleanUpValue(searchState, context, "".concat(namespace, ".").concat(getId$1(props)));
|
|
9766
9822
|
}
|
|
9767
9823
|
/**
|
|
9768
9824
|
* connectToggleRefinement connector provides the logic to build a widget that will
|
|
@@ -9801,14 +9857,14 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9801
9857
|
ais: props.contextValue,
|
|
9802
9858
|
multiIndexContext: props.indexContextValue
|
|
9803
9859
|
});
|
|
9804
|
-
var currentRefinement = getCurrentRefinement
|
|
9860
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
9805
9861
|
ais: props.contextValue,
|
|
9806
9862
|
multiIndexContext: props.indexContextValue
|
|
9807
9863
|
});
|
|
9808
9864
|
var allFacetValues = results && results.getFacetByName(attribute) ? results.getFacetValues(attribute) : null;
|
|
9809
9865
|
var facetValue = // Use null to always be consistent with type of the value
|
|
9810
9866
|
// count: number | null
|
|
9811
|
-
allFacetValues && allFacetValues.length ? find(allFacetValues, function (item) {
|
|
9867
|
+
allFacetValues && allFacetValues.length ? find$2(allFacetValues, function (item) {
|
|
9812
9868
|
return item.name === value.toString();
|
|
9813
9869
|
}) : null;
|
|
9814
9870
|
var facetValueCount = facetValue && facetValue.count;
|
|
@@ -9829,13 +9885,13 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9829
9885
|
};
|
|
9830
9886
|
},
|
|
9831
9887
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9832
|
-
return _refine$
|
|
9888
|
+
return _refine$1(props, searchState, nextRefinement, {
|
|
9833
9889
|
ais: props.contextValue,
|
|
9834
9890
|
multiIndexContext: props.indexContextValue
|
|
9835
9891
|
});
|
|
9836
9892
|
},
|
|
9837
9893
|
cleanUp: function cleanUp(props, searchState) {
|
|
9838
|
-
return _cleanUp$
|
|
9894
|
+
return _cleanUp$1(props, searchState, {
|
|
9839
9895
|
ais: props.contextValue,
|
|
9840
9896
|
multiIndexContext: props.indexContextValue
|
|
9841
9897
|
});
|
|
@@ -9844,7 +9900,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9844
9900
|
var attribute = props.attribute,
|
|
9845
9901
|
value = props.value,
|
|
9846
9902
|
filter = props.filter;
|
|
9847
|
-
var checked = getCurrentRefinement
|
|
9903
|
+
var checked = getCurrentRefinement(props, searchState, {
|
|
9848
9904
|
ais: props.contextValue,
|
|
9849
9905
|
multiIndexContext: props.indexContextValue
|
|
9850
9906
|
});
|
|
@@ -9861,8 +9917,8 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9861
9917
|
return nextSearchParameters;
|
|
9862
9918
|
},
|
|
9863
9919
|
getMetadata: function getMetadata(props, searchState) {
|
|
9864
|
-
var id = getId$
|
|
9865
|
-
var checked = getCurrentRefinement
|
|
9920
|
+
var id = getId$1(props);
|
|
9921
|
+
var checked = getCurrentRefinement(props, searchState, {
|
|
9866
9922
|
ais: props.contextValue,
|
|
9867
9923
|
multiIndexContext: props.indexContextValue
|
|
9868
9924
|
});
|
|
@@ -9878,7 +9934,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9878
9934
|
currentRefinement: checked,
|
|
9879
9935
|
attribute: props.attribute,
|
|
9880
9936
|
value: function value(nextState) {
|
|
9881
|
-
return _refine$
|
|
9937
|
+
return _refine$1(props, nextState, false, {
|
|
9882
9938
|
ais: props.contextValue,
|
|
9883
9939
|
multiIndexContext: props.indexContextValue
|
|
9884
9940
|
});
|
|
@@ -9894,7 +9950,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9894
9950
|
}
|
|
9895
9951
|
});
|
|
9896
9952
|
|
|
9897
|
-
function getId
|
|
9953
|
+
function getId() {
|
|
9898
9954
|
return 'query';
|
|
9899
9955
|
}
|
|
9900
9956
|
|
|
@@ -9903,7 +9959,7 @@ function getAdditionalId() {
|
|
|
9903
9959
|
}
|
|
9904
9960
|
|
|
9905
9961
|
function getCurrentRefinementQuery(props, searchState, context) {
|
|
9906
|
-
var id = getId
|
|
9962
|
+
var id = getId();
|
|
9907
9963
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9908
9964
|
|
|
9909
9965
|
if (currentRefinement) {
|
|
@@ -9924,10 +9980,10 @@ function getCurrentRefinementAdditional(props, searchState, context) {
|
|
|
9924
9980
|
return {};
|
|
9925
9981
|
}
|
|
9926
9982
|
|
|
9927
|
-
function _refine
|
|
9983
|
+
function _refine(props, searchState, nextRefinement, context) {
|
|
9928
9984
|
var _nextValue;
|
|
9929
9985
|
|
|
9930
|
-
var id = getId
|
|
9986
|
+
var id = getId();
|
|
9931
9987
|
var voiceParams = getAdditionalId();
|
|
9932
9988
|
var queryLanguages = props.language ? {
|
|
9933
9989
|
queryLanguages: [props.language.split('-')[0]]
|
|
@@ -9944,8 +10000,8 @@ function _refine$9(props, searchState, nextRefinement, context) {
|
|
|
9944
10000
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9945
10001
|
}
|
|
9946
10002
|
|
|
9947
|
-
function _cleanUp
|
|
9948
|
-
var interimState = cleanUpValue(searchState, context, getId
|
|
10003
|
+
function _cleanUp(props, searchState, context) {
|
|
10004
|
+
var interimState = cleanUpValue(searchState, context, getId());
|
|
9949
10005
|
return cleanUpValue(interimState, context, getAdditionalId());
|
|
9950
10006
|
}
|
|
9951
10007
|
|
|
@@ -9964,13 +10020,13 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9964
10020
|
};
|
|
9965
10021
|
},
|
|
9966
10022
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9967
|
-
return _refine
|
|
10023
|
+
return _refine(props, searchState, nextRefinement, {
|
|
9968
10024
|
ais: props.contextValue,
|
|
9969
10025
|
multiIndexContext: props.indexContextValue
|
|
9970
10026
|
});
|
|
9971
10027
|
},
|
|
9972
10028
|
cleanUp: function cleanUp(props, searchState) {
|
|
9973
|
-
return _cleanUp
|
|
10029
|
+
return _cleanUp(props, searchState, {
|
|
9974
10030
|
ais: props.contextValue,
|
|
9975
10031
|
multiIndexContext: props.indexContextValue
|
|
9976
10032
|
});
|
|
@@ -9987,7 +10043,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9987
10043
|
return searchParameters.setQuery(query).setQueryParameters(additionalParams);
|
|
9988
10044
|
},
|
|
9989
10045
|
getMetadata: function getMetadata(props, searchState) {
|
|
9990
|
-
var id = getId
|
|
10046
|
+
var id = getId();
|
|
9991
10047
|
var currentRefinement = getCurrentRefinementQuery(props, searchState, {
|
|
9992
10048
|
ais: props.contextValue,
|
|
9993
10049
|
multiIndexContext: props.indexContextValue
|
|
@@ -10001,7 +10057,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
10001
10057
|
items: currentRefinement === null ? [] : [{
|
|
10002
10058
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
10003
10059
|
value: function value(nextState) {
|
|
10004
|
-
return _refine
|
|
10060
|
+
return _refine(props, nextState, '', {
|
|
10005
10061
|
ais: props.contextValue,
|
|
10006
10062
|
multiIndexContext: props.indexContextValue
|
|
10007
10063
|
});
|
|
@@ -10054,7 +10110,7 @@ function range(_ref) {
|
|
|
10054
10110
|
return (start + current) * limitStep;
|
|
10055
10111
|
});
|
|
10056
10112
|
}
|
|
10057
|
-
function find
|
|
10113
|
+
function find(array, comparator) {
|
|
10058
10114
|
if (!Array.isArray(array)) {
|
|
10059
10115
|
return undefined;
|
|
10060
10116
|
}
|
|
@@ -10068,11 +10124,11 @@ function find$2(array, comparator) {
|
|
|
10068
10124
|
return undefined;
|
|
10069
10125
|
}
|
|
10070
10126
|
|
|
10071
|
-
var cx = createClassNames('Panel');
|
|
10127
|
+
var cx$p = createClassNames('Panel');
|
|
10072
10128
|
|
|
10073
|
-
var _createContext
|
|
10074
|
-
PanelConsumer = _createContext
|
|
10075
|
-
PanelProvider = _createContext
|
|
10129
|
+
var _createContext = createContext(function setCanRefine() {}),
|
|
10130
|
+
PanelConsumer = _createContext.Consumer,
|
|
10131
|
+
PanelProvider = _createContext.Provider;
|
|
10076
10132
|
|
|
10077
10133
|
var Panel =
|
|
10078
10134
|
/*#__PURE__*/
|
|
@@ -10115,15 +10171,15 @@ function (_Component) {
|
|
|
10115
10171
|
footer = _this$props.footer;
|
|
10116
10172
|
var canRefine = this.state.canRefine;
|
|
10117
10173
|
return React__default.createElement("div", {
|
|
10118
|
-
className: classnames(cx('', !canRefine && '-noRefinement'), className)
|
|
10174
|
+
className: classnames(cx$p('', !canRefine && '-noRefinement'), className)
|
|
10119
10175
|
}, header && React__default.createElement("div", {
|
|
10120
|
-
className: cx('header')
|
|
10176
|
+
className: cx$p('header')
|
|
10121
10177
|
}, header), React__default.createElement("div", {
|
|
10122
|
-
className: cx('body')
|
|
10178
|
+
className: cx$p('body')
|
|
10123
10179
|
}, React__default.createElement(PanelProvider, {
|
|
10124
10180
|
value: this.setCanRefine
|
|
10125
10181
|
}, children)), footer && React__default.createElement("div", {
|
|
10126
|
-
className: cx('footer')
|
|
10182
|
+
className: cx$p('footer')
|
|
10127
10183
|
}, footer));
|
|
10128
10184
|
}
|
|
10129
10185
|
}]);
|
|
@@ -10246,8 +10302,8 @@ _defineProperty(Link, "propTypes", {
|
|
|
10246
10302
|
onClick: PropTypes.func.isRequired
|
|
10247
10303
|
});
|
|
10248
10304
|
|
|
10249
|
-
var cx$
|
|
10250
|
-
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
10305
|
+
var cx$o = createClassNames('Breadcrumb');
|
|
10306
|
+
var itemsPropType$2 = PropTypes.arrayOf(PropTypes.shape({
|
|
10251
10307
|
label: PropTypes.string.isRequired,
|
|
10252
10308
|
value: PropTypes.string.isRequired
|
|
10253
10309
|
}));
|
|
@@ -10276,9 +10332,9 @@ function (_Component) {
|
|
|
10276
10332
|
translate = _this$props.translate,
|
|
10277
10333
|
className = _this$props.className;
|
|
10278
10334
|
var rootPath = canRefine ? React__default.createElement("li", {
|
|
10279
|
-
className: cx$
|
|
10335
|
+
className: cx$o('item')
|
|
10280
10336
|
}, React__default.createElement(Link, {
|
|
10281
|
-
className: cx$
|
|
10337
|
+
className: cx$o('link'),
|
|
10282
10338
|
onClick: function onClick() {
|
|
10283
10339
|
return !rootURL ? refine() : null;
|
|
10284
10340
|
},
|
|
@@ -10287,12 +10343,12 @@ function (_Component) {
|
|
|
10287
10343
|
var breadcrumb = items.map(function (item, idx) {
|
|
10288
10344
|
var isLast = idx === items.length - 1;
|
|
10289
10345
|
return React__default.createElement("li", {
|
|
10290
|
-
className: cx$
|
|
10346
|
+
className: cx$o('item', isLast && 'item--selected'),
|
|
10291
10347
|
key: idx
|
|
10292
10348
|
}, React__default.createElement("span", {
|
|
10293
|
-
className: cx$
|
|
10349
|
+
className: cx$o('separator')
|
|
10294
10350
|
}, separator), !isLast ? React__default.createElement(Link, {
|
|
10295
|
-
className: cx$
|
|
10351
|
+
className: cx$o('link'),
|
|
10296
10352
|
onClick: function onClick() {
|
|
10297
10353
|
return refine(item.value);
|
|
10298
10354
|
},
|
|
@@ -10300,9 +10356,9 @@ function (_Component) {
|
|
|
10300
10356
|
}, item.label) : item.label);
|
|
10301
10357
|
});
|
|
10302
10358
|
return React__default.createElement("div", {
|
|
10303
|
-
className: classnames(cx$
|
|
10359
|
+
className: classnames(cx$o('', !canRefine && '-noRefinement'), className)
|
|
10304
10360
|
}, React__default.createElement("ul", {
|
|
10305
|
-
className: cx$
|
|
10361
|
+
className: cx$o('list')
|
|
10306
10362
|
}, rootPath, breadcrumb));
|
|
10307
10363
|
}
|
|
10308
10364
|
}]);
|
|
@@ -10313,7 +10369,7 @@ function (_Component) {
|
|
|
10313
10369
|
_defineProperty(Breadcrumb, "propTypes", {
|
|
10314
10370
|
canRefine: PropTypes.bool.isRequired,
|
|
10315
10371
|
createURL: PropTypes.func.isRequired,
|
|
10316
|
-
items: itemsPropType,
|
|
10372
|
+
items: itemsPropType$2,
|
|
10317
10373
|
refine: PropTypes.func.isRequired,
|
|
10318
10374
|
rootURL: PropTypes.string,
|
|
10319
10375
|
separator: PropTypes.node,
|
|
@@ -10425,7 +10481,7 @@ var BreadcrumbWidget = function BreadcrumbWidget(props) {
|
|
|
10425
10481
|
|
|
10426
10482
|
connectBreadcrumb(BreadcrumbWidget);
|
|
10427
10483
|
|
|
10428
|
-
var cx$
|
|
10484
|
+
var cx$n = createClassNames('ClearRefinements');
|
|
10429
10485
|
|
|
10430
10486
|
var ClearRefinements =
|
|
10431
10487
|
/*#__PURE__*/
|
|
@@ -10448,9 +10504,9 @@ function (_Component) {
|
|
|
10448
10504
|
translate = _this$props.translate,
|
|
10449
10505
|
className = _this$props.className;
|
|
10450
10506
|
return React__default.createElement("div", {
|
|
10451
|
-
className: classnames(cx$
|
|
10507
|
+
className: classnames(cx$n(''), className)
|
|
10452
10508
|
}, React__default.createElement("button", {
|
|
10453
|
-
className: cx$
|
|
10509
|
+
className: cx$n('button', !canRefine && 'button--disabled'),
|
|
10454
10510
|
onClick: function onClick() {
|
|
10455
10511
|
return refine(items);
|
|
10456
10512
|
},
|
|
@@ -10518,7 +10574,7 @@ var ClearRefinementsWidget = function ClearRefinementsWidget(props) {
|
|
|
10518
10574
|
|
|
10519
10575
|
connectCurrentRefinements(ClearRefinementsWidget);
|
|
10520
10576
|
|
|
10521
|
-
var cx$
|
|
10577
|
+
var cx$m = createClassNames('CurrentRefinements');
|
|
10522
10578
|
var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
10523
10579
|
var items = _ref.items,
|
|
10524
10580
|
canRefine = _ref.canRefine,
|
|
@@ -10526,31 +10582,31 @@ var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
|
10526
10582
|
translate = _ref.translate,
|
|
10527
10583
|
className = _ref.className;
|
|
10528
10584
|
return React__default.createElement("div", {
|
|
10529
|
-
className: classnames(cx$
|
|
10585
|
+
className: classnames(cx$m('', !canRefine && '-noRefinement'), className)
|
|
10530
10586
|
}, React__default.createElement("ul", {
|
|
10531
|
-
className: cx$
|
|
10587
|
+
className: cx$m('list', !canRefine && 'list--noRefinement')
|
|
10532
10588
|
}, items.map(function (item) {
|
|
10533
10589
|
return React__default.createElement("li", {
|
|
10534
10590
|
key: item.label,
|
|
10535
|
-
className: cx$
|
|
10591
|
+
className: cx$m('item')
|
|
10536
10592
|
}, React__default.createElement("span", {
|
|
10537
|
-
className: cx$
|
|
10593
|
+
className: cx$m('label')
|
|
10538
10594
|
}, item.label), item.items ? item.items.map(function (nest) {
|
|
10539
10595
|
return React__default.createElement("span", {
|
|
10540
10596
|
key: nest.label,
|
|
10541
|
-
className: cx$
|
|
10597
|
+
className: cx$m('category')
|
|
10542
10598
|
}, React__default.createElement("span", {
|
|
10543
|
-
className: cx$
|
|
10599
|
+
className: cx$m('categoryLabel')
|
|
10544
10600
|
}, nest.label), React__default.createElement("button", {
|
|
10545
|
-
className: cx$
|
|
10601
|
+
className: cx$m('delete'),
|
|
10546
10602
|
onClick: function onClick() {
|
|
10547
10603
|
return refine(nest.value);
|
|
10548
10604
|
}
|
|
10549
10605
|
}, translate('clearFilter', nest)));
|
|
10550
10606
|
}) : React__default.createElement("span", {
|
|
10551
|
-
className: cx$
|
|
10607
|
+
className: cx$m('category')
|
|
10552
10608
|
}, React__default.createElement("button", {
|
|
10553
|
-
className: cx$
|
|
10609
|
+
className: cx$m('delete'),
|
|
10554
10610
|
onClick: function onClick() {
|
|
10555
10611
|
return refine(item.value);
|
|
10556
10612
|
}
|
|
@@ -10626,14 +10682,14 @@ var CurrentRefinementsWidget = function CurrentRefinementsWidget(props) {
|
|
|
10626
10682
|
|
|
10627
10683
|
connectCurrentRefinements(CurrentRefinementsWidget);
|
|
10628
10684
|
|
|
10629
|
-
var cx$
|
|
10685
|
+
var cx$l = createClassNames('SearchBox');
|
|
10630
10686
|
var defaultLoadingIndicator = React__default.createElement("svg", {
|
|
10631
10687
|
width: "18",
|
|
10632
10688
|
height: "18",
|
|
10633
10689
|
viewBox: "0 0 38 38",
|
|
10634
10690
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10635
10691
|
stroke: "#444",
|
|
10636
|
-
className: cx$
|
|
10692
|
+
className: cx$l('loadingIcon')
|
|
10637
10693
|
}, React__default.createElement("g", {
|
|
10638
10694
|
fill: "none",
|
|
10639
10695
|
fillRule: "evenodd"
|
|
@@ -10656,7 +10712,7 @@ var defaultLoadingIndicator = React__default.createElement("svg", {
|
|
|
10656
10712
|
repeatCount: "indefinite"
|
|
10657
10713
|
})))));
|
|
10658
10714
|
var defaultReset = React__default.createElement("svg", {
|
|
10659
|
-
className: cx$
|
|
10715
|
+
className: cx$l('resetIcon'),
|
|
10660
10716
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10661
10717
|
viewBox: "0 0 20 20",
|
|
10662
10718
|
width: "10",
|
|
@@ -10665,7 +10721,7 @@ var defaultReset = React__default.createElement("svg", {
|
|
|
10665
10721
|
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"
|
|
10666
10722
|
}));
|
|
10667
10723
|
var defaultSubmit = React__default.createElement("svg", {
|
|
10668
|
-
className: cx$
|
|
10724
|
+
className: cx$l('submitIcon'),
|
|
10669
10725
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10670
10726
|
width: "10",
|
|
10671
10727
|
height: "10",
|
|
@@ -10674,7 +10730,7 @@ var defaultSubmit = React__default.createElement("svg", {
|
|
|
10674
10730
|
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"
|
|
10675
10731
|
}));
|
|
10676
10732
|
|
|
10677
|
-
var SearchBox =
|
|
10733
|
+
var SearchBox$1 =
|
|
10678
10734
|
/*#__PURE__*/
|
|
10679
10735
|
function (_Component) {
|
|
10680
10736
|
_inherits(SearchBox, _Component);
|
|
@@ -10837,12 +10893,12 @@ function (_Component) {
|
|
|
10837
10893
|
/* eslint-disable max-len */
|
|
10838
10894
|
|
|
10839
10895
|
return React__default.createElement("div", {
|
|
10840
|
-
className: classnames(cx$
|
|
10896
|
+
className: classnames(cx$l(''), className)
|
|
10841
10897
|
}, React__default.createElement("form", {
|
|
10842
10898
|
noValidate: true,
|
|
10843
10899
|
onSubmit: this.props.onSubmit ? this.props.onSubmit : this.onSubmit,
|
|
10844
10900
|
onReset: this.onReset,
|
|
10845
|
-
className: cx$
|
|
10901
|
+
className: cx$l('form', isSearchStalled && 'form--stalledSearch'),
|
|
10846
10902
|
action: "",
|
|
10847
10903
|
role: "search"
|
|
10848
10904
|
}, React__default.createElement("input", _extends({
|
|
@@ -10859,19 +10915,19 @@ function (_Component) {
|
|
|
10859
10915
|
value: query,
|
|
10860
10916
|
onChange: this.onChange
|
|
10861
10917
|
}, searchInputEvents, {
|
|
10862
|
-
className: cx$
|
|
10918
|
+
className: cx$l('input')
|
|
10863
10919
|
})), React__default.createElement("button", {
|
|
10864
10920
|
type: "submit",
|
|
10865
10921
|
title: translate('submitTitle'),
|
|
10866
|
-
className: cx$
|
|
10922
|
+
className: cx$l('submit')
|
|
10867
10923
|
}, submit), React__default.createElement("button", {
|
|
10868
10924
|
type: "reset",
|
|
10869
10925
|
title: translate('resetTitle'),
|
|
10870
|
-
className: cx$
|
|
10926
|
+
className: cx$l('reset'),
|
|
10871
10927
|
hidden: !query || isSearchStalled
|
|
10872
10928
|
}, reset), this.props.showLoadingIndicator && React__default.createElement("span", {
|
|
10873
10929
|
hidden: !isSearchStalled,
|
|
10874
|
-
className: cx$
|
|
10930
|
+
className: cx$l('loadingIndicator')
|
|
10875
10931
|
}, loadingIndicator)));
|
|
10876
10932
|
/* eslint-enable */
|
|
10877
10933
|
}
|
|
@@ -10880,7 +10936,7 @@ function (_Component) {
|
|
|
10880
10936
|
return SearchBox;
|
|
10881
10937
|
}(Component);
|
|
10882
10938
|
|
|
10883
|
-
_defineProperty(SearchBox, "propTypes", {
|
|
10939
|
+
_defineProperty(SearchBox$1, "propTypes", {
|
|
10884
10940
|
currentRefinement: PropTypes.string,
|
|
10885
10941
|
className: PropTypes.string,
|
|
10886
10942
|
refine: PropTypes.func.isRequired,
|
|
@@ -10901,7 +10957,7 @@ _defineProperty(SearchBox, "propTypes", {
|
|
|
10901
10957
|
})])
|
|
10902
10958
|
});
|
|
10903
10959
|
|
|
10904
|
-
_defineProperty(SearchBox, "defaultProps", {
|
|
10960
|
+
_defineProperty(SearchBox$1, "defaultProps", {
|
|
10905
10961
|
currentRefinement: '',
|
|
10906
10962
|
className: '',
|
|
10907
10963
|
focusShortcuts: ['s', '/'],
|
|
@@ -10914,11 +10970,11 @@ _defineProperty(SearchBox, "defaultProps", {
|
|
|
10914
10970
|
submit: defaultSubmit
|
|
10915
10971
|
});
|
|
10916
10972
|
|
|
10917
|
-
var SearchBox$
|
|
10973
|
+
var SearchBox$2 = translatable({
|
|
10918
10974
|
resetTitle: 'Clear the search query.',
|
|
10919
10975
|
submitTitle: 'Submit your search query.',
|
|
10920
10976
|
placeholder: 'Search here…'
|
|
10921
|
-
})(SearchBox);
|
|
10977
|
+
})(SearchBox$1);
|
|
10922
10978
|
|
|
10923
10979
|
var itemsPropType$1 = PropTypes.arrayOf(PropTypes.shape({
|
|
10924
10980
|
value: PropTypes.any,
|
|
@@ -11018,7 +11074,7 @@ function (_Component) {
|
|
|
11018
11074
|
}, translate('noResults')) : null;
|
|
11019
11075
|
return React__default.createElement("div", {
|
|
11020
11076
|
className: cx('searchBox')
|
|
11021
|
-
}, React__default.createElement(SearchBox$
|
|
11077
|
+
}, React__default.createElement(SearchBox$2, {
|
|
11022
11078
|
currentRefinement: this.state.query,
|
|
11023
11079
|
refine: function refine(value) {
|
|
11024
11080
|
_this2.setState({
|
|
@@ -11033,7 +11089,7 @@ function (_Component) {
|
|
|
11033
11089
|
e.preventDefault();
|
|
11034
11090
|
e.stopPropagation();
|
|
11035
11091
|
|
|
11036
|
-
if (isFromSearch) {
|
|
11092
|
+
if (isFromSearch && items.length > 0) {
|
|
11037
11093
|
selectItem(items[0], _this2.resetQuery);
|
|
11038
11094
|
}
|
|
11039
11095
|
}
|
|
@@ -11098,13 +11154,13 @@ _defineProperty(List, "defaultProps", {
|
|
|
11098
11154
|
isFromSearch: false
|
|
11099
11155
|
});
|
|
11100
11156
|
|
|
11101
|
-
var cx$
|
|
11102
|
-
var itemsPropType
|
|
11157
|
+
var cx$k = createClassNames('HierarchicalMenu');
|
|
11158
|
+
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
11103
11159
|
label: PropTypes.string.isRequired,
|
|
11104
11160
|
value: PropTypes.string,
|
|
11105
11161
|
count: PropTypes.number.isRequired,
|
|
11106
11162
|
items: function items() {
|
|
11107
|
-
return itemsPropType
|
|
11163
|
+
return itemsPropType.apply(void 0, arguments);
|
|
11108
11164
|
}
|
|
11109
11165
|
}));
|
|
11110
11166
|
|
|
@@ -11131,15 +11187,15 @@ function (_Component) {
|
|
|
11131
11187
|
createURL = _this$props.createURL,
|
|
11132
11188
|
refine = _this$props.refine;
|
|
11133
11189
|
return React__default.createElement(Link, {
|
|
11134
|
-
className: cx$
|
|
11190
|
+
className: cx$k('link'),
|
|
11135
11191
|
onClick: function onClick() {
|
|
11136
11192
|
return refine(item.value);
|
|
11137
11193
|
},
|
|
11138
11194
|
href: createURL(item.value)
|
|
11139
11195
|
}, React__default.createElement("span", {
|
|
11140
|
-
className: cx$
|
|
11196
|
+
className: cx$k('label')
|
|
11141
11197
|
}, item.label), ' ', React__default.createElement("span", {
|
|
11142
|
-
className: cx$
|
|
11198
|
+
className: cx$k('count')
|
|
11143
11199
|
}, item.count));
|
|
11144
11200
|
});
|
|
11145
11201
|
|
|
@@ -11159,7 +11215,7 @@ function (_Component) {
|
|
|
11159
11215
|
className = _this$props2.className;
|
|
11160
11216
|
return React__default.createElement(List, {
|
|
11161
11217
|
renderItem: this.renderItem,
|
|
11162
|
-
cx: cx$
|
|
11218
|
+
cx: cx$k,
|
|
11163
11219
|
translate: translate,
|
|
11164
11220
|
items: items,
|
|
11165
11221
|
showMore: showMore,
|
|
@@ -11179,7 +11235,7 @@ _defineProperty(HierarchicalMenu, "propTypes", {
|
|
|
11179
11235
|
refine: PropTypes.func.isRequired,
|
|
11180
11236
|
createURL: PropTypes.func.isRequired,
|
|
11181
11237
|
canRefine: PropTypes.bool.isRequired,
|
|
11182
|
-
items: itemsPropType
|
|
11238
|
+
items: itemsPropType,
|
|
11183
11239
|
showMore: PropTypes.bool,
|
|
11184
11240
|
className: PropTypes.string,
|
|
11185
11241
|
limit: PropTypes.number,
|
|
@@ -11293,7 +11349,7 @@ var HierarchicalMenuWidget = function HierarchicalMenuWidget(props) {
|
|
|
11293
11349
|
|
|
11294
11350
|
connectHierarchicalMenu(HierarchicalMenuWidget);
|
|
11295
11351
|
|
|
11296
|
-
var Highlight = function Highlight(_ref) {
|
|
11352
|
+
var Highlight$2 = function Highlight(_ref) {
|
|
11297
11353
|
var cx = _ref.cx,
|
|
11298
11354
|
value = _ref.value,
|
|
11299
11355
|
highlightedTagName = _ref.highlightedTagName,
|
|
@@ -11305,7 +11361,7 @@ var Highlight = function Highlight(_ref) {
|
|
|
11305
11361
|
className: cx(className)
|
|
11306
11362
|
}, value);
|
|
11307
11363
|
};
|
|
11308
|
-
Highlight.propTypes = {
|
|
11364
|
+
Highlight$2.propTypes = {
|
|
11309
11365
|
cx: PropTypes.func.isRequired,
|
|
11310
11366
|
value: PropTypes.string.isRequired,
|
|
11311
11367
|
isHighlighted: PropTypes.bool.isRequired,
|
|
@@ -11336,7 +11392,7 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11336
11392
|
return React__default.createElement("span", {
|
|
11337
11393
|
key: i
|
|
11338
11394
|
}, item.map(function (element, index) {
|
|
11339
|
-
return React__default.createElement(Highlight, {
|
|
11395
|
+
return React__default.createElement(Highlight$2, {
|
|
11340
11396
|
cx: cx,
|
|
11341
11397
|
key: index,
|
|
11342
11398
|
value: element.value,
|
|
@@ -11349,7 +11405,7 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11349
11405
|
}, separator));
|
|
11350
11406
|
}
|
|
11351
11407
|
|
|
11352
|
-
return React__default.createElement(Highlight, {
|
|
11408
|
+
return React__default.createElement(Highlight$2, {
|
|
11353
11409
|
cx: cx,
|
|
11354
11410
|
key: i,
|
|
11355
11411
|
value: item.value,
|
|
@@ -11378,12 +11434,12 @@ Highlighter.defaultProps = {
|
|
|
11378
11434
|
separator: ', '
|
|
11379
11435
|
};
|
|
11380
11436
|
|
|
11381
|
-
var cx$
|
|
11437
|
+
var cx$j = createClassNames('Highlight');
|
|
11382
11438
|
|
|
11383
11439
|
var Highlight$1 = function Highlight(props) {
|
|
11384
11440
|
return React__default.createElement(Highlighter, _extends({}, props, {
|
|
11385
11441
|
highlightProperty: "_highlightResult",
|
|
11386
|
-
cx: cx$
|
|
11442
|
+
cx: cx$j
|
|
11387
11443
|
}));
|
|
11388
11444
|
};
|
|
11389
11445
|
|
|
@@ -11428,9 +11484,9 @@ var Highlight$1 = function Highlight(props) {
|
|
|
11428
11484
|
* );
|
|
11429
11485
|
*/
|
|
11430
11486
|
|
|
11431
|
-
var Highlight
|
|
11487
|
+
var Highlight = connectHighlight(Highlight$1);
|
|
11432
11488
|
|
|
11433
|
-
var cx$
|
|
11489
|
+
var cx$i = createClassNames('Hits');
|
|
11434
11490
|
|
|
11435
11491
|
var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
11436
11492
|
return React__default.createElement("div", {
|
|
@@ -11443,19 +11499,19 @@ var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
|
11443
11499
|
}, JSON.stringify(props).slice(0, 100), "...");
|
|
11444
11500
|
};
|
|
11445
11501
|
|
|
11446
|
-
var Hits = function Hits(_ref) {
|
|
11502
|
+
var Hits$1 = function Hits(_ref) {
|
|
11447
11503
|
var hits = _ref.hits,
|
|
11448
11504
|
_ref$className = _ref.className,
|
|
11449
11505
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
11450
11506
|
_ref$hitComponent = _ref.hitComponent,
|
|
11451
11507
|
HitComponent = _ref$hitComponent === void 0 ? DefaultHitComponent : _ref$hitComponent;
|
|
11452
11508
|
return React__default.createElement("div", {
|
|
11453
|
-
className: classnames(cx$
|
|
11509
|
+
className: classnames(cx$i(''), className)
|
|
11454
11510
|
}, React__default.createElement("ul", {
|
|
11455
|
-
className: cx$
|
|
11511
|
+
className: cx$i('list')
|
|
11456
11512
|
}, hits.map(function (hit) {
|
|
11457
11513
|
return React__default.createElement("li", {
|
|
11458
|
-
className: cx$
|
|
11514
|
+
className: cx$i('item'),
|
|
11459
11515
|
key: hit.objectID
|
|
11460
11516
|
}, React__default.createElement(HitComponent, {
|
|
11461
11517
|
hit: hit
|
|
@@ -11466,7 +11522,7 @@ var Hits = function Hits(_ref) {
|
|
|
11466
11522
|
var HitPropTypes = PropTypes.shape({
|
|
11467
11523
|
objectID: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11468
11524
|
});
|
|
11469
|
-
Hits.propTypes = {
|
|
11525
|
+
Hits$1.propTypes = {
|
|
11470
11526
|
hits: PropTypes.arrayOf(HitPropTypes.isRequired).isRequired,
|
|
11471
11527
|
className: PropTypes.string,
|
|
11472
11528
|
hitComponent: PropTypes.func
|
|
@@ -11505,7 +11561,7 @@ Hits.propTypes = {
|
|
|
11505
11561
|
* );
|
|
11506
11562
|
*/
|
|
11507
11563
|
|
|
11508
|
-
var Hits
|
|
11564
|
+
var Hits = connectHits(Hits$1);
|
|
11509
11565
|
|
|
11510
11566
|
var Select =
|
|
11511
11567
|
/*#__PURE__*/
|
|
@@ -11569,7 +11625,7 @@ _defineProperty(Select, "propTypes", {
|
|
|
11569
11625
|
selectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11570
11626
|
});
|
|
11571
11627
|
|
|
11572
|
-
var cx$
|
|
11628
|
+
var cx$h = createClassNames('HitsPerPage');
|
|
11573
11629
|
|
|
11574
11630
|
var HitsPerPage =
|
|
11575
11631
|
/*#__PURE__*/
|
|
@@ -11591,12 +11647,12 @@ function (_Component) {
|
|
|
11591
11647
|
refine = _this$props.refine,
|
|
11592
11648
|
className = _this$props.className;
|
|
11593
11649
|
return React__default.createElement("div", {
|
|
11594
|
-
className: classnames(cx$
|
|
11650
|
+
className: classnames(cx$h(''), className)
|
|
11595
11651
|
}, React__default.createElement(Select, {
|
|
11596
11652
|
onSelect: refine,
|
|
11597
11653
|
selectedItem: currentRefinement,
|
|
11598
11654
|
items: items,
|
|
11599
|
-
cx: cx$
|
|
11655
|
+
cx: cx$h
|
|
11600
11656
|
}));
|
|
11601
11657
|
}
|
|
11602
11658
|
}]);
|
|
@@ -11662,7 +11718,7 @@ _defineProperty(HitsPerPage, "defaultProps", {
|
|
|
11662
11718
|
|
|
11663
11719
|
connectHitsPerPage(HitsPerPage);
|
|
11664
11720
|
|
|
11665
|
-
var cx$
|
|
11721
|
+
var cx$g = createClassNames('InfiniteHits');
|
|
11666
11722
|
|
|
11667
11723
|
var InfiniteHits =
|
|
11668
11724
|
/*#__PURE__*/
|
|
@@ -11689,24 +11745,24 @@ function (_Component) {
|
|
|
11689
11745
|
translate = _this$props.translate,
|
|
11690
11746
|
className = _this$props.className;
|
|
11691
11747
|
return React__default.createElement("div", {
|
|
11692
|
-
className: classnames(cx$
|
|
11748
|
+
className: classnames(cx$g(''), className)
|
|
11693
11749
|
}, showPrevious && React__default.createElement("button", {
|
|
11694
|
-
className: cx$
|
|
11750
|
+
className: cx$g('loadPrevious', !hasPrevious && 'loadPrevious--disabled'),
|
|
11695
11751
|
onClick: function onClick() {
|
|
11696
11752
|
return refinePrevious();
|
|
11697
11753
|
},
|
|
11698
11754
|
disabled: !hasPrevious
|
|
11699
11755
|
}, translate('loadPrevious')), React__default.createElement("ul", {
|
|
11700
|
-
className: cx$
|
|
11756
|
+
className: cx$g('list')
|
|
11701
11757
|
}, hits.map(function (hit) {
|
|
11702
11758
|
return React__default.createElement("li", {
|
|
11703
11759
|
key: hit.objectID,
|
|
11704
|
-
className: cx$
|
|
11760
|
+
className: cx$g('item')
|
|
11705
11761
|
}, React__default.createElement(HitComponent, {
|
|
11706
11762
|
hit: hit
|
|
11707
11763
|
}));
|
|
11708
11764
|
})), React__default.createElement("button", {
|
|
11709
|
-
className: cx$
|
|
11765
|
+
className: cx$g('loadMore', !hasMore && 'loadMore--disabled'),
|
|
11710
11766
|
onClick: function onClick() {
|
|
11711
11767
|
return refineNext();
|
|
11712
11768
|
},
|
|
@@ -11787,7 +11843,7 @@ var InfiniteHits$1 = translatable({
|
|
|
11787
11843
|
|
|
11788
11844
|
connectInfiniteHits(InfiniteHits$1);
|
|
11789
11845
|
|
|
11790
|
-
var cx$
|
|
11846
|
+
var cx$f = createClassNames('Menu');
|
|
11791
11847
|
|
|
11792
11848
|
var Menu =
|
|
11793
11849
|
/*#__PURE__*/
|
|
@@ -11809,20 +11865,20 @@ function (_Component) {
|
|
|
11809
11865
|
|
|
11810
11866
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
11811
11867
|
var createURL = _this.props.createURL;
|
|
11812
|
-
var label = _this.props.isFromSearch ? React__default.createElement(Highlight
|
|
11868
|
+
var label = _this.props.isFromSearch ? React__default.createElement(Highlight, {
|
|
11813
11869
|
attribute: "label",
|
|
11814
11870
|
hit: item
|
|
11815
11871
|
}) : item.label;
|
|
11816
11872
|
return React__default.createElement(Link, {
|
|
11817
|
-
className: cx$
|
|
11873
|
+
className: cx$f('link'),
|
|
11818
11874
|
onClick: function onClick() {
|
|
11819
11875
|
return _this.selectItem(item, resetQuery);
|
|
11820
11876
|
},
|
|
11821
11877
|
href: createURL(item.value)
|
|
11822
11878
|
}, React__default.createElement("span", {
|
|
11823
|
-
className: cx$
|
|
11879
|
+
className: cx$f('label')
|
|
11824
11880
|
}, label), ' ', React__default.createElement("span", {
|
|
11825
|
-
className: cx$
|
|
11881
|
+
className: cx$f('count')
|
|
11826
11882
|
}, item.count));
|
|
11827
11883
|
});
|
|
11828
11884
|
|
|
@@ -11852,7 +11908,7 @@ function (_Component) {
|
|
|
11852
11908
|
return React__default.createElement(List, {
|
|
11853
11909
|
renderItem: this.renderItem,
|
|
11854
11910
|
selectItem: this.selectItem,
|
|
11855
|
-
cx: cx$
|
|
11911
|
+
cx: cx$f,
|
|
11856
11912
|
translate: translate,
|
|
11857
11913
|
items: items,
|
|
11858
11914
|
showMore: showMore,
|
|
@@ -11962,7 +12018,7 @@ var MenuWidget = function MenuWidget(props) {
|
|
|
11962
12018
|
|
|
11963
12019
|
connectMenu(MenuWidget);
|
|
11964
12020
|
|
|
11965
|
-
var cx$
|
|
12021
|
+
var cx$e = createClassNames('MenuSelect');
|
|
11966
12022
|
|
|
11967
12023
|
var MenuSelect =
|
|
11968
12024
|
/*#__PURE__*/
|
|
@@ -12000,26 +12056,26 @@ function (_Component) {
|
|
|
12000
12056
|
translate = _this$props.translate,
|
|
12001
12057
|
className = _this$props.className;
|
|
12002
12058
|
return React__default.createElement("div", {
|
|
12003
|
-
className: classnames(cx$
|
|
12059
|
+
className: classnames(cx$e('', !canRefine && '-noRefinement'), className)
|
|
12004
12060
|
}, React__default.createElement("select", {
|
|
12005
12061
|
value: this.selectedValue,
|
|
12006
12062
|
onChange: this.handleSelectChange,
|
|
12007
|
-
className: cx$
|
|
12063
|
+
className: cx$e('select')
|
|
12008
12064
|
}, React__default.createElement("option", {
|
|
12009
12065
|
value: "ais__see__all__option",
|
|
12010
|
-
className: cx$
|
|
12066
|
+
className: cx$e('option')
|
|
12011
12067
|
}, translate('seeAllOption')), items.map(function (item) {
|
|
12012
12068
|
return React__default.createElement("option", {
|
|
12013
12069
|
key: item.value,
|
|
12014
12070
|
value: item.value,
|
|
12015
|
-
className: cx$
|
|
12071
|
+
className: cx$e('option')
|
|
12016
12072
|
}, item.label, " (", item.count, ")");
|
|
12017
12073
|
})));
|
|
12018
12074
|
}
|
|
12019
12075
|
}, {
|
|
12020
12076
|
key: "selectedValue",
|
|
12021
12077
|
get: function get() {
|
|
12022
|
-
var _ref2 = find
|
|
12078
|
+
var _ref2 = find(this.props.items, function (item) {
|
|
12023
12079
|
return item.isRefined === true;
|
|
12024
12080
|
}) || {
|
|
12025
12081
|
value: 'ais__see__all__option'
|
|
@@ -12096,7 +12152,7 @@ var MenuSelectWidget = function MenuSelectWidget(props) {
|
|
|
12096
12152
|
|
|
12097
12153
|
connectMenu(MenuSelectWidget);
|
|
12098
12154
|
|
|
12099
|
-
var cx$
|
|
12155
|
+
var cx$d = createClassNames('NumericMenu');
|
|
12100
12156
|
|
|
12101
12157
|
var NumericMenu =
|
|
12102
12158
|
/*#__PURE__*/
|
|
@@ -12121,9 +12177,9 @@ function (_Component) {
|
|
|
12121
12177
|
refine = _this$props.refine,
|
|
12122
12178
|
translate = _this$props.translate;
|
|
12123
12179
|
return React__default.createElement("label", {
|
|
12124
|
-
className: cx$
|
|
12180
|
+
className: cx$d('label')
|
|
12125
12181
|
}, React__default.createElement("input", {
|
|
12126
|
-
className: cx$
|
|
12182
|
+
className: cx$d('radio'),
|
|
12127
12183
|
type: "radio",
|
|
12128
12184
|
checked: item.isRefined,
|
|
12129
12185
|
disabled: item.noRefinement,
|
|
@@ -12131,7 +12187,7 @@ function (_Component) {
|
|
|
12131
12187
|
return refine(item.value);
|
|
12132
12188
|
}
|
|
12133
12189
|
}), React__default.createElement("span", {
|
|
12134
|
-
className: cx$
|
|
12190
|
+
className: cx$d('labelText')
|
|
12135
12191
|
}, item.value === '' ? translate('all') : item.label));
|
|
12136
12192
|
});
|
|
12137
12193
|
|
|
@@ -12149,7 +12205,7 @@ function (_Component) {
|
|
|
12149
12205
|
renderItem: this.renderItem,
|
|
12150
12206
|
showMore: false,
|
|
12151
12207
|
canRefine: canRefine,
|
|
12152
|
-
cx: cx$
|
|
12208
|
+
cx: cx$d,
|
|
12153
12209
|
items: items.map(function (item) {
|
|
12154
12210
|
return _objectSpread({}, item, {
|
|
12155
12211
|
key: item.value
|
|
@@ -12294,7 +12350,7 @@ _defineProperty(LinkList, "propTypes", {
|
|
|
12294
12350
|
canRefine: PropTypes.bool.isRequired
|
|
12295
12351
|
});
|
|
12296
12352
|
|
|
12297
|
-
var cx$
|
|
12353
|
+
var cx$c = createClassNames('Pagination'); // Determines the size of the widget (the number of pages displayed - that the user can directly click on)
|
|
12298
12354
|
|
|
12299
12355
|
function calculateSize(padding, maxPages) {
|
|
12300
12356
|
return Math.min(2 * padding + 1, maxPages);
|
|
@@ -12330,7 +12386,7 @@ function getPages(currentPage, maxPages, padding) {
|
|
|
12330
12386
|
});
|
|
12331
12387
|
}
|
|
12332
12388
|
|
|
12333
|
-
var Pagination =
|
|
12389
|
+
var Pagination$1 =
|
|
12334
12390
|
/*#__PURE__*/
|
|
12335
12391
|
function (_Component) {
|
|
12336
12392
|
_inherits(Pagination, _Component);
|
|
@@ -12437,9 +12493,9 @@ function (_Component) {
|
|
|
12437
12493
|
}
|
|
12438
12494
|
|
|
12439
12495
|
return React__default.createElement("div", {
|
|
12440
|
-
className: classnames(cx$
|
|
12496
|
+
className: classnames(cx$c('', !canRefine && '-noRefinement'), className)
|
|
12441
12497
|
}, React__default.createElement(ListComponent, _extends({}, otherProps, {
|
|
12442
|
-
cx: cx$
|
|
12498
|
+
cx: cx$c,
|
|
12443
12499
|
items: items,
|
|
12444
12500
|
onSelect: refine,
|
|
12445
12501
|
createURL: createURL,
|
|
@@ -12451,7 +12507,7 @@ function (_Component) {
|
|
|
12451
12507
|
return Pagination;
|
|
12452
12508
|
}(Component);
|
|
12453
12509
|
|
|
12454
|
-
_defineProperty(Pagination, "propTypes", {
|
|
12510
|
+
_defineProperty(Pagination$1, "propTypes", {
|
|
12455
12511
|
nbPages: PropTypes.number.isRequired,
|
|
12456
12512
|
currentRefinement: PropTypes.number.isRequired,
|
|
12457
12513
|
refine: PropTypes.func.isRequired,
|
|
@@ -12468,7 +12524,7 @@ _defineProperty(Pagination, "propTypes", {
|
|
|
12468
12524
|
className: PropTypes.string
|
|
12469
12525
|
});
|
|
12470
12526
|
|
|
12471
|
-
_defineProperty(Pagination, "defaultProps", {
|
|
12527
|
+
_defineProperty(Pagination$1, "defaultProps", {
|
|
12472
12528
|
listComponent: LinkList,
|
|
12473
12529
|
showFirst: true,
|
|
12474
12530
|
showPrevious: true,
|
|
@@ -12479,7 +12535,7 @@ _defineProperty(Pagination, "defaultProps", {
|
|
|
12479
12535
|
className: ''
|
|
12480
12536
|
});
|
|
12481
12537
|
|
|
12482
|
-
var Pagination$
|
|
12538
|
+
var Pagination$2 = translatable({
|
|
12483
12539
|
previous: '‹',
|
|
12484
12540
|
next: '›',
|
|
12485
12541
|
first: '«',
|
|
@@ -12494,7 +12550,7 @@ var Pagination$1 = translatable({
|
|
|
12494
12550
|
ariaPage: function ariaPage(currentRefinement) {
|
|
12495
12551
|
return "Page ".concat(currentRefinement.toString());
|
|
12496
12552
|
}
|
|
12497
|
-
})(Pagination);
|
|
12553
|
+
})(Pagination$1);
|
|
12498
12554
|
|
|
12499
12555
|
/**
|
|
12500
12556
|
* The Pagination widget displays a simple pagination system allowing the user to
|
|
@@ -12551,12 +12607,12 @@ var Pagination$1 = translatable({
|
|
|
12551
12607
|
*/
|
|
12552
12608
|
|
|
12553
12609
|
var PaginationWidget = function PaginationWidget(props) {
|
|
12554
|
-
return React__default.createElement(PanelWrapper, props, React__default.createElement(Pagination$
|
|
12610
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(Pagination$2, props));
|
|
12555
12611
|
};
|
|
12556
12612
|
|
|
12557
|
-
var Pagination
|
|
12613
|
+
var Pagination = connectPagination(PaginationWidget);
|
|
12558
12614
|
|
|
12559
|
-
var cx$
|
|
12615
|
+
var cx$b = createClassNames('PoweredBy');
|
|
12560
12616
|
/* eslint-disable max-len */
|
|
12561
12617
|
|
|
12562
12618
|
var AlgoliaLogo = function AlgoliaLogo() {
|
|
@@ -12566,7 +12622,7 @@ var AlgoliaLogo = function AlgoliaLogo() {
|
|
|
12566
12622
|
viewBox: "0 0 1366 362",
|
|
12567
12623
|
width: "100",
|
|
12568
12624
|
height: "27",
|
|
12569
|
-
className: cx$
|
|
12625
|
+
className: cx$b('logo')
|
|
12570
12626
|
}, React__default.createElement("linearGradient", {
|
|
12571
12627
|
id: "g",
|
|
12572
12628
|
x1: "428.258",
|
|
@@ -12614,13 +12670,13 @@ function (_Component) {
|
|
|
12614
12670
|
translate = _this$props.translate,
|
|
12615
12671
|
className = _this$props.className;
|
|
12616
12672
|
return React__default.createElement("div", {
|
|
12617
|
-
className: classnames(cx$
|
|
12673
|
+
className: classnames(cx$b(''), className)
|
|
12618
12674
|
}, React__default.createElement("span", {
|
|
12619
|
-
className: cx$
|
|
12675
|
+
className: cx$b('text')
|
|
12620
12676
|
}, translate('searchBy')), ' ', React__default.createElement("a", {
|
|
12621
12677
|
href: url,
|
|
12622
12678
|
target: "_blank",
|
|
12623
|
-
className: cx$
|
|
12679
|
+
className: cx$b('link'),
|
|
12624
12680
|
"aria-label": "Algolia",
|
|
12625
12681
|
rel: "noopener noreferrer"
|
|
12626
12682
|
}, React__default.createElement(AlgoliaLogo, null)));
|
|
@@ -12673,7 +12729,7 @@ var PoweredBy$1 = translatable({
|
|
|
12673
12729
|
|
|
12674
12730
|
connectPoweredBy(PoweredBy$1);
|
|
12675
12731
|
|
|
12676
|
-
var cx$
|
|
12732
|
+
var cx$a = createClassNames('RangeInput');
|
|
12677
12733
|
var RawRangeInput =
|
|
12678
12734
|
/*#__PURE__*/
|
|
12679
12735
|
function (_Component) {
|
|
@@ -12753,12 +12809,12 @@ function (_Component) {
|
|
|
12753
12809
|
|
|
12754
12810
|
var step = 1 / Math.pow(10, precision);
|
|
12755
12811
|
return React__default.createElement("div", {
|
|
12756
|
-
className: classnames(cx$
|
|
12812
|
+
className: classnames(cx$a('', !canRefine && '-noRefinement'), className)
|
|
12757
12813
|
}, React__default.createElement("form", {
|
|
12758
|
-
className: cx$
|
|
12814
|
+
className: cx$a('form'),
|
|
12759
12815
|
onSubmit: this.onSubmit
|
|
12760
12816
|
}, React__default.createElement("input", {
|
|
12761
|
-
className: cx$
|
|
12817
|
+
className: cx$a('input', 'input--min'),
|
|
12762
12818
|
type: "number",
|
|
12763
12819
|
min: min,
|
|
12764
12820
|
max: max,
|
|
@@ -12772,9 +12828,9 @@ function (_Component) {
|
|
|
12772
12828
|
});
|
|
12773
12829
|
}
|
|
12774
12830
|
}), React__default.createElement("span", {
|
|
12775
|
-
className: cx$
|
|
12831
|
+
className: cx$a('separator')
|
|
12776
12832
|
}, translate('separator')), React__default.createElement("input", {
|
|
12777
|
-
className: cx$
|
|
12833
|
+
className: cx$a('input', 'input--max'),
|
|
12778
12834
|
type: "number",
|
|
12779
12835
|
min: min,
|
|
12780
12836
|
max: max,
|
|
@@ -12788,7 +12844,7 @@ function (_Component) {
|
|
|
12788
12844
|
});
|
|
12789
12845
|
}
|
|
12790
12846
|
}), React__default.createElement("button", {
|
|
12791
|
-
className: cx$
|
|
12847
|
+
className: cx$a('submit'),
|
|
12792
12848
|
type: "submit"
|
|
12793
12849
|
}, translate('submit'))));
|
|
12794
12850
|
}
|
|
@@ -12869,7 +12925,7 @@ var RangeInputWidget = function RangeInputWidget(props) {
|
|
|
12869
12925
|
|
|
12870
12926
|
connectRange(RangeInputWidget);
|
|
12871
12927
|
|
|
12872
|
-
var cx$
|
|
12928
|
+
var cx$9 = createClassNames('RatingMenu');
|
|
12873
12929
|
|
|
12874
12930
|
var RatingMenu =
|
|
12875
12931
|
/*#__PURE__*/
|
|
@@ -12922,12 +12978,12 @@ function (_Component) {
|
|
|
12922
12978
|
|
|
12923
12979
|
icons.push([React__default.createElement("svg", {
|
|
12924
12980
|
key: icon,
|
|
12925
|
-
className: cx$
|
|
12981
|
+
className: cx$9('starIcon', icon >= lowerBound ? 'starIcon--empty' : 'starIcon--full'),
|
|
12926
12982
|
"aria-hidden": "true",
|
|
12927
12983
|
width: "24",
|
|
12928
12984
|
height: "24"
|
|
12929
12985
|
}, React__default.createElement("use", {
|
|
12930
|
-
xlinkHref: "#".concat(cx$
|
|
12986
|
+
xlinkHref: "#".concat(cx$9(icon >= lowerBound ? 'starEmptySymbol' : 'starSymbol'))
|
|
12931
12987
|
})), ' ']);
|
|
12932
12988
|
} // The last item of the list (the default item), should not
|
|
12933
12989
|
// be clickable if it is selected.
|
|
@@ -12943,15 +12999,15 @@ function (_Component) {
|
|
|
12943
12999
|
};
|
|
12944
13000
|
return React__default.createElement("li", {
|
|
12945
13001
|
key: lowerBound,
|
|
12946
|
-
className: cx$
|
|
13002
|
+
className: cx$9('item', selected && 'item--selected', disabled && 'item--disabled')
|
|
12947
13003
|
}, React__default.createElement("a", _extends({
|
|
12948
|
-
className: cx$
|
|
13004
|
+
className: cx$9('link'),
|
|
12949
13005
|
"aria-label": "".concat(rating).concat(translate('ratingLabel'))
|
|
12950
13006
|
}, onClickHandler), icons, React__default.createElement("span", {
|
|
12951
|
-
className: cx$
|
|
13007
|
+
className: cx$9('label'),
|
|
12952
13008
|
"aria-hidden": "true"
|
|
12953
13009
|
}, translate('ratingLabel')), ' ', React__default.createElement("span", {
|
|
12954
|
-
className: cx$
|
|
13010
|
+
className: cx$9('count')
|
|
12955
13011
|
}, count)));
|
|
12956
13012
|
}
|
|
12957
13013
|
}, {
|
|
@@ -12983,7 +13039,7 @@ function (_Component) {
|
|
|
12983
13039
|
start: 0,
|
|
12984
13040
|
end: Math.max(inclusiveLength, 0)
|
|
12985
13041
|
}).map(function (index) {
|
|
12986
|
-
var element = find
|
|
13042
|
+
var element = find(values, function (item) {
|
|
12987
13043
|
return item.value === limitMax - index;
|
|
12988
13044
|
});
|
|
12989
13045
|
var placeholder = {
|
|
@@ -13007,24 +13063,24 @@ function (_Component) {
|
|
|
13007
13063
|
});
|
|
13008
13064
|
});
|
|
13009
13065
|
return React__default.createElement("div", {
|
|
13010
|
-
className: classnames(cx$
|
|
13066
|
+
className: classnames(cx$9('', !canRefine && '-noRefinement'), className)
|
|
13011
13067
|
}, React__default.createElement("svg", {
|
|
13012
13068
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13013
13069
|
style: {
|
|
13014
13070
|
display: 'none'
|
|
13015
13071
|
}
|
|
13016
13072
|
}, React__default.createElement("symbol", {
|
|
13017
|
-
id: cx$
|
|
13073
|
+
id: cx$9('starSymbol'),
|
|
13018
13074
|
viewBox: "0 0 24 24"
|
|
13019
13075
|
}, React__default.createElement("path", {
|
|
13020
13076
|
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"
|
|
13021
13077
|
})), React__default.createElement("symbol", {
|
|
13022
|
-
id: cx$
|
|
13078
|
+
id: cx$9('starEmptySymbol'),
|
|
13023
13079
|
viewBox: "0 0 24 24"
|
|
13024
13080
|
}, React__default.createElement("path", {
|
|
13025
13081
|
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"
|
|
13026
13082
|
}))), React__default.createElement("ul", {
|
|
13027
|
-
className: cx$
|
|
13083
|
+
className: cx$9('list', !canRefine && 'list--noRefinement')
|
|
13028
13084
|
}, items));
|
|
13029
13085
|
}
|
|
13030
13086
|
}]);
|
|
@@ -13112,7 +13168,7 @@ var RatingMenuWidget = function RatingMenuWidget(props) {
|
|
|
13112
13168
|
|
|
13113
13169
|
connectRange(RatingMenuWidget);
|
|
13114
13170
|
|
|
13115
|
-
var cx$
|
|
13171
|
+
var cx$8 = createClassNames('RefinementList');
|
|
13116
13172
|
|
|
13117
13173
|
var RefinementList$1 =
|
|
13118
13174
|
/*#__PURE__*/
|
|
@@ -13143,23 +13199,23 @@ function (_Component) {
|
|
|
13143
13199
|
});
|
|
13144
13200
|
|
|
13145
13201
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
13146
|
-
var label = _this.props.isFromSearch ? React__default.createElement(Highlight
|
|
13202
|
+
var label = _this.props.isFromSearch ? React__default.createElement(Highlight, {
|
|
13147
13203
|
attribute: "label",
|
|
13148
13204
|
hit: item
|
|
13149
13205
|
}) : item.label;
|
|
13150
13206
|
return React__default.createElement("label", {
|
|
13151
|
-
className: cx$
|
|
13207
|
+
className: cx$8('label')
|
|
13152
13208
|
}, React__default.createElement("input", {
|
|
13153
|
-
className: cx$
|
|
13209
|
+
className: cx$8('checkbox'),
|
|
13154
13210
|
type: "checkbox",
|
|
13155
13211
|
checked: item.isRefined,
|
|
13156
13212
|
onChange: function onChange() {
|
|
13157
13213
|
return _this.selectItem(item, resetQuery);
|
|
13158
13214
|
}
|
|
13159
13215
|
}), React__default.createElement("span", {
|
|
13160
|
-
className: cx$
|
|
13216
|
+
className: cx$8('labelText')
|
|
13161
13217
|
}, label), ' ', React__default.createElement("span", {
|
|
13162
|
-
className: cx$
|
|
13218
|
+
className: cx$8('count')
|
|
13163
13219
|
}, item.count.toLocaleString()));
|
|
13164
13220
|
});
|
|
13165
13221
|
|
|
@@ -13183,7 +13239,7 @@ function (_Component) {
|
|
|
13183
13239
|
return React__default.createElement(List, {
|
|
13184
13240
|
renderItem: this.renderItem,
|
|
13185
13241
|
selectItem: this.selectItem,
|
|
13186
|
-
cx: cx$
|
|
13242
|
+
cx: cx$8,
|
|
13187
13243
|
translate: translate,
|
|
13188
13244
|
items: items,
|
|
13189
13245
|
showMore: showMore,
|
|
@@ -13295,9 +13351,9 @@ var RefinementListWidget = function RefinementListWidget(props) {
|
|
|
13295
13351
|
return React__default.createElement(PanelWrapper, props, React__default.createElement(RefinementList$2, props));
|
|
13296
13352
|
};
|
|
13297
13353
|
|
|
13298
|
-
var RefinementList
|
|
13354
|
+
var RefinementList = connectRefinementList(RefinementListWidget);
|
|
13299
13355
|
|
|
13300
|
-
var cx$
|
|
13356
|
+
var cx$7 = createClassNames('ScrollTo');
|
|
13301
13357
|
|
|
13302
13358
|
var ScrollTo =
|
|
13303
13359
|
/*#__PURE__*/
|
|
@@ -13330,7 +13386,7 @@ function (_Component) {
|
|
|
13330
13386
|
ref: function ref(_ref) {
|
|
13331
13387
|
return _this.el = _ref;
|
|
13332
13388
|
},
|
|
13333
|
-
className: cx$
|
|
13389
|
+
className: cx$7('')
|
|
13334
13390
|
}, this.props.children);
|
|
13335
13391
|
}
|
|
13336
13392
|
}]);
|
|
@@ -13424,14 +13480,14 @@ connectScrollTo(ScrollTo);
|
|
|
13424
13480
|
* );
|
|
13425
13481
|
*/
|
|
13426
13482
|
|
|
13427
|
-
var SearchBox
|
|
13483
|
+
var SearchBox = connectSearchBox(SearchBox$2);
|
|
13428
13484
|
|
|
13429
|
-
var cx$
|
|
13485
|
+
var cx$6 = createClassNames('Snippet');
|
|
13430
13486
|
|
|
13431
13487
|
var Snippet = function Snippet(props) {
|
|
13432
13488
|
return React__default.createElement(Highlighter, _extends({}, props, {
|
|
13433
13489
|
highlightProperty: "_snippetResult",
|
|
13434
|
-
cx: cx$
|
|
13490
|
+
cx: cx$6
|
|
13435
13491
|
}));
|
|
13436
13492
|
};
|
|
13437
13493
|
|
|
@@ -13481,7 +13537,7 @@ var Snippet = function Snippet(props) {
|
|
|
13481
13537
|
|
|
13482
13538
|
connectHighlight(Snippet);
|
|
13483
13539
|
|
|
13484
|
-
var cx$
|
|
13540
|
+
var cx$5 = createClassNames('RelevantSort');
|
|
13485
13541
|
|
|
13486
13542
|
var DefaultButtonTextComponent = function DefaultButtonTextComponent(_ref) {
|
|
13487
13543
|
var isRelevantSorted = _ref.isRelevantSorted;
|
|
@@ -13498,13 +13554,13 @@ var RelevantSort = function RelevantSort(_ref2) {
|
|
|
13498
13554
|
TextComponent = _ref2.textComponent,
|
|
13499
13555
|
refine = _ref2.refine;
|
|
13500
13556
|
return !isVirtualReplica ? null : React__default.createElement("div", {
|
|
13501
|
-
className: classnames(cx$
|
|
13557
|
+
className: classnames(cx$5(''), className)
|
|
13502
13558
|
}, React__default.createElement("div", {
|
|
13503
|
-
className: cx$
|
|
13559
|
+
className: cx$5('text')
|
|
13504
13560
|
}, TextComponent && React__default.createElement(TextComponent, {
|
|
13505
13561
|
isRelevantSorted: isRelevantSorted
|
|
13506
13562
|
})), React__default.createElement("button", {
|
|
13507
|
-
className: cx$
|
|
13563
|
+
className: cx$5('button'),
|
|
13508
13564
|
onClick: function onClick() {
|
|
13509
13565
|
return refine(isRelevantSorted ? 0 : undefined);
|
|
13510
13566
|
}
|
|
@@ -13524,7 +13580,7 @@ RelevantSort.propTypes = {
|
|
|
13524
13580
|
|
|
13525
13581
|
connectRelevantSort(RelevantSort);
|
|
13526
13582
|
|
|
13527
|
-
var cx$
|
|
13583
|
+
var cx$4 = createClassNames('SortBy');
|
|
13528
13584
|
|
|
13529
13585
|
var SortBy =
|
|
13530
13586
|
/*#__PURE__*/
|
|
@@ -13546,9 +13602,9 @@ function (_Component) {
|
|
|
13546
13602
|
refine = _this$props.refine,
|
|
13547
13603
|
className = _this$props.className;
|
|
13548
13604
|
return React__default.createElement("div", {
|
|
13549
|
-
className: classnames(cx$
|
|
13605
|
+
className: classnames(cx$4(''), className)
|
|
13550
13606
|
}, React__default.createElement(Select, {
|
|
13551
|
-
cx: cx$
|
|
13607
|
+
cx: cx$4,
|
|
13552
13608
|
items: items,
|
|
13553
13609
|
selectedItem: currentRefinement,
|
|
13554
13610
|
onSelect: refine
|
|
@@ -13614,7 +13670,7 @@ _defineProperty(SortBy, "defaultProps", {
|
|
|
13614
13670
|
|
|
13615
13671
|
connectSortBy(SortBy);
|
|
13616
13672
|
|
|
13617
|
-
var cx$
|
|
13673
|
+
var cx$3 = createClassNames('Stats');
|
|
13618
13674
|
|
|
13619
13675
|
var Stats = function Stats(_ref) {
|
|
13620
13676
|
var _ref$className = _ref.className,
|
|
@@ -13625,9 +13681,9 @@ var Stats = function Stats(_ref) {
|
|
|
13625
13681
|
processingTimeMS = _ref.processingTimeMS,
|
|
13626
13682
|
translate = _ref.translate;
|
|
13627
13683
|
return React__default.createElement("div", {
|
|
13628
|
-
className: classnames(cx$
|
|
13684
|
+
className: classnames(cx$3(''), className)
|
|
13629
13685
|
}, React__default.createElement("span", {
|
|
13630
|
-
className: cx$
|
|
13686
|
+
className: cx$3('text')
|
|
13631
13687
|
}, translate('stats', nbHits, processingTimeMS, nbSortedHits, areHitsSorted)));
|
|
13632
13688
|
};
|
|
13633
13689
|
|
|
@@ -13675,7 +13731,7 @@ var Stats$1 = translatable({
|
|
|
13675
13731
|
|
|
13676
13732
|
connectStats(Stats$1);
|
|
13677
13733
|
|
|
13678
|
-
var cx$
|
|
13734
|
+
var cx$2 = createClassNames('ToggleRefinement');
|
|
13679
13735
|
|
|
13680
13736
|
var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
13681
13737
|
var currentRefinement = _ref.currentRefinement,
|
|
@@ -13684,18 +13740,18 @@ var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
|
13684
13740
|
refine = _ref.refine,
|
|
13685
13741
|
className = _ref.className;
|
|
13686
13742
|
return React__default.createElement("div", {
|
|
13687
|
-
className: classnames(cx$
|
|
13743
|
+
className: classnames(cx$2('', !canRefine && '-noRefinement'), className)
|
|
13688
13744
|
}, React__default.createElement("label", {
|
|
13689
|
-
className: cx$
|
|
13745
|
+
className: cx$2('label')
|
|
13690
13746
|
}, React__default.createElement("input", {
|
|
13691
|
-
className: cx$
|
|
13747
|
+
className: cx$2('checkbox'),
|
|
13692
13748
|
type: "checkbox",
|
|
13693
13749
|
checked: currentRefinement,
|
|
13694
13750
|
onChange: function onChange(event) {
|
|
13695
13751
|
return refine(event.target.checked);
|
|
13696
13752
|
}
|
|
13697
13753
|
}), React__default.createElement("span", {
|
|
13698
|
-
className: cx$
|
|
13754
|
+
className: cx$2('labelText')
|
|
13699
13755
|
}, label)));
|
|
13700
13756
|
};
|
|
13701
13757
|
|
|
@@ -13904,7 +13960,7 @@ function createVoiceSearchHelper(_ref) {
|
|
|
13904
13960
|
};
|
|
13905
13961
|
}
|
|
13906
13962
|
|
|
13907
|
-
var cx$
|
|
13963
|
+
var cx$1 = createClassNames('VoiceSearch');
|
|
13908
13964
|
|
|
13909
13965
|
var ButtonSvg = function ButtonSvg(_ref) {
|
|
13910
13966
|
var children = _ref.children;
|
|
@@ -14050,15 +14106,15 @@ function (_Component) {
|
|
|
14050
14106
|
isBrowserSupported: isBrowserSupported()
|
|
14051
14107
|
};
|
|
14052
14108
|
return React__default.createElement("div", {
|
|
14053
|
-
className: cx$
|
|
14109
|
+
className: cx$1('')
|
|
14054
14110
|
}, React__default.createElement("button", {
|
|
14055
|
-
className: cx$
|
|
14111
|
+
className: cx$1('button'),
|
|
14056
14112
|
type: "button",
|
|
14057
14113
|
title: isBrowserSupported() ? translate('buttonTitle') : translate('disabledButtonTitle'),
|
|
14058
14114
|
onClick: this.onClick,
|
|
14059
14115
|
disabled: !isBrowserSupported()
|
|
14060
14116
|
}, React__default.createElement(ButtonTextComponent, innerProps)), React__default.createElement("div", {
|
|
14061
|
-
className: cx$
|
|
14117
|
+
className: cx$1('status')
|
|
14062
14118
|
}, React__default.createElement(StatusComponent, innerProps)));
|
|
14063
14119
|
}
|
|
14064
14120
|
}, {
|
|
@@ -14086,14 +14142,14 @@ var VoiceSearch$1 = translatable({
|
|
|
14086
14142
|
|
|
14087
14143
|
connectVoiceSearch(VoiceSearch$1);
|
|
14088
14144
|
|
|
14089
|
-
var cx
|
|
14145
|
+
var cx = createClassNames('QueryRuleCustomData');
|
|
14090
14146
|
|
|
14091
14147
|
var QueryRuleCustomData = function QueryRuleCustomData(_ref) {
|
|
14092
14148
|
var items = _ref.items,
|
|
14093
14149
|
className = _ref.className,
|
|
14094
14150
|
children = _ref.children;
|
|
14095
14151
|
return React__default.createElement("div", {
|
|
14096
|
-
className: classnames(cx
|
|
14152
|
+
className: classnames(cx(''), className)
|
|
14097
14153
|
}, children({
|
|
14098
14154
|
items: items
|
|
14099
14155
|
}));
|
|
@@ -14208,7 +14264,7 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14208
14264
|
onSearchParameters: this.props.onSearchParameters
|
|
14209
14265
|
}, this.props),
|
|
14210
14266
|
React__default.createElement(Configure, { hitsPerPage: this.props.hitsPerPage || 20 }),
|
|
14211
|
-
React__default.createElement(SearchBox
|
|
14267
|
+
React__default.createElement(SearchBox, null),
|
|
14212
14268
|
this.props.refinementAttributes && React__default.createElement(
|
|
14213
14269
|
'div',
|
|
14214
14270
|
{ className: 'search_refinement' },
|
|
@@ -14216,18 +14272,18 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14216
14272
|
return React__default.createElement(
|
|
14217
14273
|
DropdownButton,
|
|
14218
14274
|
{ title: item.title },
|
|
14219
|
-
React__default.createElement(RefinementList
|
|
14275
|
+
React__default.createElement(RefinementList, { showMore: item.showMore, limit: item.limit, showMoreLimit: item.showMoreLimit, attribute: item.attribute })
|
|
14220
14276
|
);
|
|
14221
14277
|
})
|
|
14222
14278
|
),
|
|
14223
14279
|
React__default.createElement(
|
|
14224
14280
|
'div',
|
|
14225
14281
|
{ className: 'AlgoliaResults' },
|
|
14226
|
-
React__default.createElement(Hits
|
|
14282
|
+
React__default.createElement(Hits, { hitComponent: function hitComponent(hit) {
|
|
14227
14283
|
return _this2.Deck(_extends$1({}, hit, { propsObj: propsObj }));
|
|
14228
14284
|
} })
|
|
14229
14285
|
),
|
|
14230
|
-
React__default.createElement(Pagination
|
|
14286
|
+
React__default.createElement(Pagination, null)
|
|
14231
14287
|
),
|
|
14232
14288
|
React__default.createElement(
|
|
14233
14289
|
'style',
|