@mjhls/mjh-framework 1.0.886-beta.0 → 1.0.886
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +168 -168
- package/dist/cjs/AD.js +10 -9
- package/dist/cjs/AD300x250.js +29 -28
- package/dist/cjs/AD300x250x600.js +29 -28
- package/dist/cjs/AD728x90.js +32 -31
- 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-2e48af77.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-c39c7131.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 +18 -909
- package/dist/cjs/AlgoliaSearch.js +1490 -1306
- package/dist/cjs/AlphabeticList.js +24 -23
- package/dist/cjs/ArticleCarousel.js +20 -19
- package/dist/cjs/ArticleProgramLandingPage.js +58 -57
- package/dist/cjs/ArticleSeriesLandingPage.js +39 -38
- package/dist/cjs/ArticleSeriesListing.js +60 -59
- package/dist/cjs/Auth.js +680 -1504
- package/dist/cjs/AuthWrapper.js +1637 -419
- package/dist/cjs/{AuthorComponent-02e827ae.js → AuthorComponent-39b37d84.js} +14 -13
- package/dist/cjs/Beam.js +6 -6
- package/dist/cjs/{BlockContent-091a991f.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 +60 -57
- package/dist/cjs/ConferenceArticleCard.js +41 -40
- package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
- package/dist/cjs/ContentCardPaginated.js +98 -92
- package/dist/cjs/DeckContent.js +105 -101
- package/dist/cjs/DeckQueue.js +91 -87
- package/dist/cjs/DeckQueuePaginated.js +92 -86
- package/dist/cjs/{Dfp-f492f985.js → Dfp-9be904d5.js} +32 -31
- package/dist/cjs/EventsDeck.js +157 -150
- package/dist/cjs/ExternalResources.js +79 -78
- package/dist/cjs/Feature.js +29 -27
- package/dist/cjs/ForbesHero.js +41 -40
- package/dist/cjs/GridContent.js +189 -185
- package/dist/cjs/GridContentPaginated.js +190 -184
- package/dist/cjs/GridHero.js +43 -42
- package/dist/cjs/GroupDeck.js +58 -57
- package/dist/cjs/HamMagazine.js +144 -139
- 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/{ImageSlider-38f25e66.js → ImageSlider-b96720eb.js} +202 -1378
- package/dist/cjs/IssueContentDeck.js +76 -71
- package/dist/cjs/IssueDeck.js +75 -70
- package/dist/cjs/IssueLanding.js +94 -93
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/LeftNav.js +39 -37
- package/dist/cjs/MasterDeck.js +79 -78
- package/dist/cjs/MasterDeckPaginated.js +76 -73
- package/dist/cjs/{MediaSeriesCard-8d27612b.js → MediaSeriesCard-8b4efd28.js} +1145 -1051
- package/dist/cjs/MediaSeriesLanding.js +93 -91
- package/dist/cjs/MediaSeriesLandingPaginated.js +95 -92
- package/dist/cjs/NavDvm.js +77 -72
- package/dist/cjs/{NavFooter-76c913e3.js → NavFooter-3dcd99a8.js} +15 -14
- package/dist/cjs/NavMagazine.js +151 -146
- package/dist/cjs/NavNative.js +145 -137
- package/dist/cjs/OncliveHero.js +22 -22
- package/dist/cjs/OncliveLargeHero.js +71 -70
- package/dist/cjs/PageFilter.js +13 -12
- package/dist/cjs/Pagination-8f2038bf.js +53 -0
- package/dist/cjs/PartnerDetailListing.js +100 -98
- package/dist/cjs/PartnerDetailListingPaginated.js +99 -96
- 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/{PublicationFeature-28c549f2.js → PublicationFeature-5ccf9b13.js} +40 -36
- package/dist/cjs/PublicationLanding.js +141 -133
- package/dist/cjs/QueueDeckExpanded.js +308 -308
- package/dist/cjs/QueueDeckExpandedPaginated.js +268 -267
- package/dist/cjs/RecentNews.js +23 -22
- package/dist/cjs/RelatedContent.js +58 -57
- package/dist/cjs/RelatedTopicsDropdown.js +32 -29
- package/dist/cjs/RolesDeck.js +32 -27
- package/dist/cjs/Schema.js +16 -15
- 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-49b81b0b.js → SeriesSlider-ba0c5d1a.js} +40 -39
- package/dist/cjs/SetCookie.js +1 -1
- package/dist/cjs/SideFooter.js +37 -36
- package/dist/cjs/SocialIcons.js +10 -9
- package/dist/cjs/{SocialSearchComponent-e8477ca3.js → SocialSearchComponent-4942ddfc.js} +40 -36
- 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 +29 -28
- package/dist/cjs/VerticalHero.js +20 -19
- package/dist/cjs/VideoProgramLandingPage.js +76 -72
- package/dist/cjs/VideoSeriesCard.js +33 -32
- package/dist/cjs/VideoSeriesFilter.js +16 -16
- package/dist/cjs/VideoSeriesLandingPage.js +48 -47
- package/dist/cjs/VideoSeriesListing.js +77 -76
- package/dist/cjs/View.js +267 -264
- package/dist/cjs/YahooHero.js +40 -39
- package/dist/cjs/YoutubeGroup.js +68 -67
- package/dist/cjs/{_is-array-aa52fa1e.js → _is-array-54228b29.js} +6 -6
- package/dist/cjs/{_iter-detect-05795553.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-171b9ea5.js → _object-sap-d1978572.js} +1 -1
- package/dist/cjs/{_object-to-array-9bac8737.js → _object-to-array-ce86cae7.js} +2 -2
- package/dist/cjs/{asyncToGenerator-df19209d.js → asyncToGenerator-77821af0.js} +30 -30
- package/dist/cjs/{brightcove-react-player-loader.es-156bd4d6.js → brightcove-react-player-loader.es-a195642e.js} +11 -9
- package/dist/cjs/{core.get-iterator-method-f3c44602.js → core.get-iterator-method-5643aa10.js} +35 -35
- package/dist/cjs/{debounce-529c8d06.js → debounce-d4a2369b.js} +2 -2
- package/dist/cjs/{define-property-21887c62.js → define-property-e8404b64.js} +6 -6
- package/dist/cjs/{defineProperty-77a37684.js → defineProperty-9673846a.js} +1 -1
- package/dist/cjs/defineProperty-e0fb52c5.js +73 -0
- package/dist/cjs/{entities-310b46ee.js → entities-df1aed86.js} +5 -1
- package/dist/cjs/{eq-bb2843ed.js → eq-5fc26c07.js} +1 -1
- package/dist/cjs/{extends-eed4f016.js → extends-7c86182f.js} +7 -7
- package/dist/cjs/faundadb.js +5 -5
- package/dist/cjs/{get-adbb11e3.js → get-5839e5b5.js} +21 -21
- package/dist/cjs/getQuery.js +1 -1
- package/dist/cjs/getRelatedArticle.js +16 -16
- package/dist/cjs/getRootDocGroup.js +4 -4
- package/dist/cjs/getSerializers.js +43 -43
- package/dist/cjs/{getTargeting-8874437b.js → getTargeting-9d509319.js} +12 -12
- package/dist/cjs/getTargeting.js +6 -6
- package/dist/{esm/iconBase-602d52fe.js → cjs/iconBase-be4097c0.js} +33 -8
- package/dist/cjs/{index-e2e62963.js → index-50be6759.js} +26 -10
- package/dist/cjs/{index-54adcbc3.js → index-6f89aea7.js} +1070 -1044
- package/dist/cjs/{index-be0c82be.js → index-d48b231c.js} +31 -25
- package/dist/cjs/{index-96b3db50.js → index-eadd5035.js} +17 -15
- package/dist/cjs/{index-3294d3bc.js → index-f86bb269.js} +44 -45
- package/dist/cjs/{index-98e01cb9.js → index-fc2f1ca2.js} +13 -12
- package/dist/cjs/{index.es-9110add6.js → index.es-f3e47207.js} +31 -12
- package/dist/cjs/{index.esm-90433435.js → index.esm-00a6aade.js} +7 -16
- package/dist/cjs/{index.esm-4d410430.js → index.esm-2bb721c8.js} +21 -21
- package/dist/cjs/{index.esm-e32d3e8e.js → index.esm-c1e16606.js} +4 -7
- package/dist/cjs/{index.esm-ff47db6f.js → index.esm-f27f80d9.js} +6 -13
- package/dist/cjs/index.js +175 -168
- package/dist/cjs/{inherits-12d44cca.js → inherits-de66ea16.js} +18 -18
- package/dist/cjs/{isSymbol-04666465.js → isSymbol-03abbdf0.js} +15 -15
- package/dist/cjs/{keys-d207942e.js → keys-e982b3fa.js} +6 -6
- package/dist/cjs/{lodash-fc2922d0.js → lodash-f0783643.js} +128 -31
- package/dist/cjs/main-f1c77adb.js +973 -0
- package/dist/cjs/{md5-5039b1a6.js → md5-e1ca5797.js} +1 -1
- package/dist/cjs/{moment-575fe24c.js → moment-aca40de1.js} +11 -9
- package/dist/cjs/{react-social-icons-f7f48f71.js → react-social-icons-af932527.js} +28 -27
- package/dist/cjs/{slicedToArray-f6d4eaa8.js → slicedToArray-067dd3bc.js} +12 -12
- package/dist/cjs/{smoothscroll-5054361f.js → smoothscroll-99df7f93.js} +1 -1
- package/dist/cjs/{stringify-bbc68047.js → stringify-f7a37a8d.js} +5 -5
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-c9b8a0d0.js → toConsumableArray-d7797c2b.js} +7 -7
- package/dist/cjs/{toNumber-36d1e7e5.js → toNumber-5e1fac58.js} +40 -5
- package/dist/cjs/typeof-1358762e.js +33 -0
- package/dist/cjs/{typeof-5f52cf64.js → typeof-567e31ff.js} +35 -35
- package/dist/cjs/urlFor.js +6 -6
- package/dist/cjs/{ustream-api-9ebe112f.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-e34bf324.js → web.dom.iterable-d98303e0.js} +2 -2
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +22 -22
- package/dist/esm/AD300x250x600.js +22 -22
- package/dist/esm/AD728x90.js +25 -25
- 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-d767ebe2.js → ADInfeed-0a55cd2d.js} +4 -4
- 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-cee95aa2.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 +14 -906
- package/dist/esm/AlgoliaSearch.js +717 -534
- 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 +30 -30
- package/dist/esm/ArticleSeriesListing.js +31 -31
- package/dist/esm/Auth.js +591 -1419
- package/dist/esm/AuthWrapper.js +1609 -392
- package/dist/esm/{AuthorComponent-e6f95c2f.js → AuthorComponent-11adff02.js} +1 -1
- package/dist/esm/Beam.js +6 -6
- package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-1e73bd2c.js} +34 -34
- package/dist/esm/Breadcrumbs.js +5 -5
- package/dist/esm/CMEDeck.js +22 -22
- package/dist/esm/Column2.js +14 -14
- package/dist/esm/Column3.js +31 -31
- package/dist/esm/ConferenceArticleCard.js +25 -25
- package/dist/esm/ContentCardPaginated.js +36 -35
- package/dist/esm/DeckContent.js +41 -41
- package/dist/esm/DeckQueue.js +31 -31
- package/dist/esm/DeckQueuePaginated.js +32 -31
- package/dist/esm/{Dfp-f867d061.js → Dfp-102f0beb.js} +13 -13
- package/dist/esm/EventsDeck.js +41 -41
- package/dist/esm/ExternalResources.js +45 -45
- package/dist/esm/Feature.js +7 -7
- package/dist/esm/ForbesHero.js +10 -10
- package/dist/esm/GridContent.js +47 -47
- package/dist/esm/GridContentPaginated.js +46 -45
- package/dist/esm/GridHero.js +11 -11
- package/dist/esm/GroupDeck.js +12 -12
- package/dist/esm/HamMagazine.js +35 -35
- 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/{ImageSlider-a3154b97.js → ImageSlider-de7846ea.js} +141 -1317
- package/dist/esm/IssueContentDeck.js +11 -11
- package/dist/esm/IssueDeck.js +14 -14
- package/dist/esm/IssueLanding.js +82 -82
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/LeftNav.js +20 -20
- package/dist/esm/MasterDeck.js +40 -40
- package/dist/esm/MasterDeckPaginated.js +39 -38
- package/dist/esm/{MediaSeriesCard-1dd7eae8.js → MediaSeriesCard-51ebf1c0.js} +694 -602
- package/dist/esm/MediaSeriesLanding.js +58 -58
- package/dist/esm/MediaSeriesLandingPaginated.js +62 -61
- package/dist/esm/NavDvm.js +11 -11
- package/dist/esm/NavMagazine.js +39 -39
- package/dist/esm/NavNative.js +37 -37
- package/dist/esm/OncliveHero.js +7 -8
- package/dist/esm/OncliveLargeHero.js +11 -11
- package/dist/esm/PageFilter.js +4 -4
- package/dist/esm/Pagination-c0db7ca1.js +46 -0
- package/dist/esm/PartnerDetailListing.js +63 -62
- package/dist/esm/PartnerDetailListingPaginated.js +62 -60
- 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 +10 -10
- package/dist/esm/{PublicationFeature-fa24dedb.js → PublicationFeature-d88e76b9.js} +2 -2
- package/dist/esm/PublicationLanding.js +56 -52
- package/dist/esm/QueueDeckExpanded.js +36 -36
- package/dist/esm/QueueDeckExpandedPaginated.js +36 -35
- package/dist/esm/RecentNews.js +4 -4
- package/dist/esm/RelatedContent.js +38 -38
- package/dist/esm/RelatedTopicsDropdown.js +10 -10
- package/dist/esm/Schema.js +10 -10
- package/dist/esm/Search.js +5 -5
- package/dist/esm/Segment.js +4 -4
- package/dist/esm/SeriesListingDeck.js +18 -18
- package/dist/esm/{SeriesSlider-ce19fa25.js → SeriesSlider-45adb8dc.js} +14 -14
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +15 -15
- package/dist/esm/{SocialSearchComponent-dca69151.js → SocialSearchComponent-8e0fcf66.js} +10 -10
- package/dist/esm/TaxonomyCard.js +12 -12
- package/dist/esm/TaxonomyDescription.js +44 -44
- package/dist/esm/TemplateNormal.js +46 -46
- package/dist/esm/ThumbnailCard.js +10 -10
- package/dist/esm/Ustream.js +12 -12
- package/dist/esm/VerticalHero.js +6 -6
- package/dist/esm/VideoProgramLandingPage.js +49 -49
- package/dist/esm/VideoSeriesCard.js +14 -14
- package/dist/esm/VideoSeriesFilter.js +7 -7
- package/dist/esm/VideoSeriesLandingPage.js +36 -36
- package/dist/esm/VideoSeriesListing.js +31 -31
- package/dist/esm/View.js +89 -90
- package/dist/esm/YahooHero.js +13 -13
- package/dist/esm/YoutubeGroup.js +21 -21
- package/dist/esm/{_is-array-4df618a6.js → _is-array-8d21b9e3.js} +6 -6
- package/dist/esm/{_iter-detect-130ee549.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-8b8ea5a9.js → _object-sap-7cee6f84.js} +1 -1
- package/dist/esm/{_object-to-array-c54dd835.js → _object-to-array-2300e51b.js} +2 -2
- package/dist/esm/{asyncToGenerator-7bf8bc4d.js → asyncToGenerator-5ef104a7.js} +30 -30
- package/dist/esm/{brightcove-react-player-loader.es-83f53e4e.js → brightcove-react-player-loader.es-57a70a56.js} +5 -4
- package/dist/esm/{core.get-iterator-method-86d4db69.js → core.get-iterator-method-ea258bb1.js} +36 -36
- package/dist/esm/{debounce-9207d8ee.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-d7d9b577.js → defineProperty-8c30428f.js} +1 -1
- package/dist/esm/{entities-7cc3bf45.js → entities-6d9154b4.js} +5 -1
- package/dist/esm/{eq-b470f743.js → eq-bdcbf886.js} +1 -1
- package/dist/esm/{extends-5b1796d4.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/getQuery.js +1 -1
- 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-277c801e.js → getTargeting-4061f839.js} +11 -11
- package/dist/esm/getTargeting.js +6 -6
- package/dist/{cjs/iconBase-68959171.js → esm/iconBase-ccc56b97.js} +2 -8
- package/dist/esm/{index-73819142.js → index-3f5c03b2.js} +31 -25
- package/dist/esm/{index-5f7e79e7.js → index-755f2cc2.js} +6 -6
- package/dist/esm/{index-ef6d5dcf.js → index-79cfd25c.js} +44 -45
- package/dist/esm/{index-aaa2dae0.js → index-98ca9cec.js} +26 -11
- package/dist/esm/{index-d1476645.js → index-ca0c9ff5.js} +615 -599
- package/dist/esm/{index-41a678ea.js → index-f0fc23eb.js} +4 -4
- package/dist/esm/{index.es-29c1cef5.js → index.es-a6137319.js} +23 -5
- package/dist/esm/{index.esm-fd746768.js → index.esm-37268dca.js} +4 -5
- package/dist/esm/{index.esm-f8aaeeeb.js → index.esm-9b042655.js} +4 -7
- package/dist/esm/{index.esm-cf08bf18.js → index.esm-d4932dea.js} +6 -13
- package/dist/esm/{index.esm-29e48d38.js → index.esm-f6156a57.js} +7 -16
- package/dist/esm/index.js +126 -122
- package/dist/esm/{inherits-2409637d.js → inherits-a6ba2ec4.js} +18 -18
- package/dist/esm/{isSymbol-1981418f.js → isSymbol-a7e9aafe.js} +15 -15
- package/dist/esm/{keys-69989821.js → keys-31dcdb31.js} +6 -6
- package/dist/esm/{lodash-17fdfebb.js → lodash-f97fd99a.js} +128 -31
- package/dist/esm/main-1894c974.js +961 -0
- package/dist/esm/{md5-9be0e905.js → md5-4e42248e.js} +1 -1
- package/dist/esm/{moment-e2f9b20c.js → moment-bc12cb97.js} +11 -9
- package/dist/esm/{react-social-icons-a7d5c5c7.js → react-social-icons-9be47857.js} +16 -16
- package/dist/esm/{slicedToArray-67a08c9c.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-32282905.js → toConsumableArray-f7074d7c.js} +7 -7
- package/dist/esm/{toNumber-2f7a84cd.js → toNumber-5aeba6e7.js} +40 -5
- package/dist/esm/typeof-2f07d0e8.js +30 -0
- package/dist/esm/{typeof-c05a82ba.js → typeof-e9fc0c5d.js} +35 -35
- package/dist/esm/urlFor.js +4 -4
- package/dist/esm/{ustream-api-4c4fe0ba.js → ustream-api-d3714624.js} +4 -4
- package/dist/esm/{util-7700fc59.js → util-8ed16d48.js} +12 -1
- package/dist/esm/{web.dom.iterable-f8f967cd.js → web.dom.iterable-ab4dea5c.js} +2 -2
- package/package.json +112 -112
- package/dist/cjs/ConferenceBanner-4a16fddc.js +0 -23
- package/dist/cjs/Pagination-90473595.js +0 -59
- package/dist/cjs/inherits-8d29278d.js +0 -110
- package/dist/cjs/main-02daeefe.js +0 -862
- package/dist/esm/Pagination-683fa8ef.js +0 -54
- package/dist/esm/define-property-6d26cb48.js +0 -18
- package/dist/esm/inherits-77d5e4fc.js +0 -101
- package/dist/esm/main-c0612122.js +0 -851
- package/dist/esm/stringify-70b72959.js +0 -15
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import './
|
|
2
|
-
import './
|
|
3
|
-
import './
|
|
4
|
-
import './_object-pie-33c40e79.js';
|
|
5
|
-
import { _ as _extends$1 } from './extends-5b1796d4.js';
|
|
6
|
-
import './_object-sap-8b8ea5a9.js';
|
|
7
|
-
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-2409637d.js';
|
|
8
|
-
import './define-property-6d26cb48.js';
|
|
9
|
-
import './web.dom.iterable-f8f967cd.js';
|
|
10
|
-
import { _ as _typeof$1 } from './typeof-c05a82ba.js';
|
|
11
|
-
import './_is-array-4df618a6.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-73819142.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
|
|
23
|
-
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';
|
|
24
24
|
|
|
25
25
|
function _objectWithoutProperties(source, excluded) {
|
|
26
26
|
if (source == null) return {};
|
|
@@ -41,9 +41,24 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
41
41
|
return target;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
function _defineProperty(obj, key, value) {
|
|
45
|
+
if (key in obj) {
|
|
46
|
+
Object.defineProperty(obj, key, {
|
|
47
|
+
value: value,
|
|
48
|
+
enumerable: true,
|
|
49
|
+
configurable: true,
|
|
50
|
+
writable: true
|
|
51
|
+
});
|
|
52
|
+
} else {
|
|
53
|
+
obj[key] = value;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return obj;
|
|
57
|
+
}
|
|
58
|
+
|
|
44
59
|
function _objectSpread(target) {
|
|
45
60
|
for (var i = 1; i < arguments.length; i++) {
|
|
46
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
61
|
+
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
47
62
|
var ownKeys = Object.keys(source);
|
|
48
63
|
|
|
49
64
|
if (typeof Object.getOwnPropertySymbols === 'function') {
|
|
@@ -60,6 +75,66 @@ function _objectSpread(target) {
|
|
|
60
75
|
return target;
|
|
61
76
|
}
|
|
62
77
|
|
|
78
|
+
function _classCallCheck(instance, Constructor) {
|
|
79
|
+
if (!(instance instanceof Constructor)) {
|
|
80
|
+
throw new TypeError("Cannot call a class as a function");
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function _defineProperties(target, props) {
|
|
85
|
+
for (var i = 0; i < props.length; i++) {
|
|
86
|
+
var descriptor = props[i];
|
|
87
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
88
|
+
descriptor.configurable = true;
|
|
89
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
90
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
95
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
96
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
97
|
+
return Constructor;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function _assertThisInitialized(self) {
|
|
101
|
+
if (self === void 0) {
|
|
102
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return self;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function _possibleConstructorReturn(self, call) {
|
|
109
|
+
if (call && (_typeof$1(call) === "object" || typeof call === "function")) {
|
|
110
|
+
return call;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return _assertThisInitialized(self);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function _getPrototypeOf(o) {
|
|
117
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
118
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
119
|
+
};
|
|
120
|
+
return _getPrototypeOf(o);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function _inherits(subClass, superClass) {
|
|
124
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
125
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
129
|
+
constructor: {
|
|
130
|
+
value: subClass,
|
|
131
|
+
writable: true,
|
|
132
|
+
configurable: true
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
136
|
+
}
|
|
137
|
+
|
|
63
138
|
/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */
|
|
64
139
|
|
|
65
140
|
var hasElementType = typeof Element !== 'undefined';
|
|
@@ -195,6 +270,22 @@ var reactFastCompare = function isEqual(a, b) {
|
|
|
195
270
|
}
|
|
196
271
|
};
|
|
197
272
|
|
|
273
|
+
function _typeof(obj) {
|
|
274
|
+
"@babel/helpers - typeof";
|
|
275
|
+
|
|
276
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
277
|
+
_typeof = function _typeof(obj) {
|
|
278
|
+
return typeof obj;
|
|
279
|
+
};
|
|
280
|
+
} else {
|
|
281
|
+
_typeof = function _typeof(obj) {
|
|
282
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
return _typeof(obj);
|
|
287
|
+
}
|
|
288
|
+
|
|
198
289
|
// From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
199
290
|
var shallowEqual = function shallowEqual(objA, objB) {
|
|
200
291
|
if (objA === objB) {
|
|
@@ -239,7 +330,7 @@ var removeEmptyKey = function removeEmptyKey(obj) {
|
|
|
239
330
|
return;
|
|
240
331
|
}
|
|
241
332
|
|
|
242
|
-
if (!objectHasKeys(value)) {
|
|
333
|
+
if (!objectHasKeys$1(value)) {
|
|
243
334
|
delete obj[key];
|
|
244
335
|
} else {
|
|
245
336
|
removeEmptyKey(value);
|
|
@@ -275,7 +366,7 @@ function addQueryID(hits, queryID) {
|
|
|
275
366
|
});
|
|
276
367
|
});
|
|
277
368
|
}
|
|
278
|
-
function find(array, comparator) {
|
|
369
|
+
function find$2(array, comparator) {
|
|
279
370
|
if (!Array.isArray(array)) {
|
|
280
371
|
return undefined;
|
|
281
372
|
}
|
|
@@ -288,11 +379,11 @@ function find(array, comparator) {
|
|
|
288
379
|
|
|
289
380
|
return undefined;
|
|
290
381
|
}
|
|
291
|
-
function objectHasKeys(object) {
|
|
382
|
+
function objectHasKeys$1(object) {
|
|
292
383
|
return object && Object.keys(object).length > 0;
|
|
293
384
|
} // https://github.com/babel/babel/blob/3aaafae053fa75febb3aa45d45b6f00646e30ba4/packages/babel-helpers/src/helpers.js#L604-L620
|
|
294
385
|
|
|
295
|
-
function omit(source, excluded) {
|
|
386
|
+
function omit$1(source, excluded) {
|
|
296
387
|
if (source === null || source === undefined) {
|
|
297
388
|
return {};
|
|
298
389
|
}
|
|
@@ -363,9 +454,9 @@ var instantSearchContext = createContext({
|
|
|
363
454
|
var InstantSearchConsumer = instantSearchContext.Consumer,
|
|
364
455
|
InstantSearchProvider = instantSearchContext.Provider;
|
|
365
456
|
|
|
366
|
-
var _createContext = createContext(undefined),
|
|
367
|
-
IndexConsumer = _createContext.Consumer,
|
|
368
|
-
IndexProvider = _createContext.Provider;
|
|
457
|
+
var _createContext$1 = createContext(undefined),
|
|
458
|
+
IndexConsumer = _createContext$1.Consumer,
|
|
459
|
+
IndexProvider = _createContext$1.Provider;
|
|
369
460
|
|
|
370
461
|
/**
|
|
371
462
|
* Connectors are the HOC used to transform React components
|
|
@@ -578,9 +669,9 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
578
669
|
}, {
|
|
579
670
|
key: "render",
|
|
580
671
|
value: function render() {
|
|
581
|
-
var _this$props = this.props
|
|
582
|
-
|
|
583
|
-
props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
672
|
+
var _this$props = this.props;
|
|
673
|
+
_this$props.contextValue;
|
|
674
|
+
var props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
584
675
|
|
|
585
676
|
var providedProps = this.state.providedProps;
|
|
586
677
|
|
|
@@ -731,7 +822,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
731
822
|
});
|
|
732
823
|
}
|
|
733
824
|
|
|
734
|
-
var version = '6.
|
|
825
|
+
var version$1 = '6.11.2';
|
|
735
826
|
|
|
736
827
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
737
828
|
return function (props, propName, componentName) {
|
|
@@ -928,7 +1019,7 @@ function hasRefinements(_ref) {
|
|
|
928
1019
|
return Object.hasOwnProperty.call(searchState, id);
|
|
929
1020
|
}
|
|
930
1021
|
|
|
931
|
-
function getRefinements(_ref2) {
|
|
1022
|
+
function getRefinements$1(_ref2) {
|
|
932
1023
|
var multiIndex = _ref2.multiIndex,
|
|
933
1024
|
indexId = _ref2.indexId,
|
|
934
1025
|
namespace = _ref2.namespace,
|
|
@@ -970,7 +1061,7 @@ function getCurrentRefinementValue(props, searchState, context, id, defaultValue
|
|
|
970
1061
|
var hasRefinementsValue = hasRefinements(args);
|
|
971
1062
|
|
|
972
1063
|
if (hasRefinementsValue) {
|
|
973
|
-
return getRefinements(args);
|
|
1064
|
+
return getRefinements$1(args);
|
|
974
1065
|
}
|
|
975
1066
|
|
|
976
1067
|
if (props.defaultRefinement) {
|
|
@@ -1011,10 +1102,10 @@ function cleanUpValueWithSingleIndex(_ref3) {
|
|
|
1011
1102
|
attribute = _ref3.attribute;
|
|
1012
1103
|
|
|
1013
1104
|
if (namespace) {
|
|
1014
|
-
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit(searchState[namespace], [attribute])));
|
|
1105
|
+
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit$1(searchState[namespace], [attribute])));
|
|
1015
1106
|
}
|
|
1016
1107
|
|
|
1017
|
-
return omit(searchState, [id]);
|
|
1108
|
+
return omit$1(searchState, [id]);
|
|
1018
1109
|
}
|
|
1019
1110
|
|
|
1020
1111
|
function cleanUpValueWithMultiIndex(_ref4) {
|
|
@@ -1027,20 +1118,20 @@ function cleanUpValueWithMultiIndex(_ref4) {
|
|
|
1027
1118
|
|
|
1028
1119
|
if (namespace && indexSearchState) {
|
|
1029
1120
|
return _objectSpread({}, searchState, {
|
|
1030
|
-
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])))))
|
|
1031
1122
|
});
|
|
1032
1123
|
}
|
|
1033
1124
|
|
|
1034
1125
|
if (indexSearchState) {
|
|
1035
1126
|
return _objectSpread({}, searchState, {
|
|
1036
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit(indexSearchState, [id])))
|
|
1127
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit$1(indexSearchState, [id])))
|
|
1037
1128
|
});
|
|
1038
1129
|
}
|
|
1039
1130
|
|
|
1040
1131
|
return searchState;
|
|
1041
1132
|
}
|
|
1042
1133
|
|
|
1043
|
-
function getId() {
|
|
1134
|
+
function getId$f() {
|
|
1044
1135
|
return 'configure';
|
|
1045
1136
|
}
|
|
1046
1137
|
|
|
@@ -1050,20 +1141,20 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1050
1141
|
return {};
|
|
1051
1142
|
},
|
|
1052
1143
|
getSearchParameters: function getSearchParameters(searchParameters, props) {
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1144
|
+
props.children;
|
|
1145
|
+
props.contextValue;
|
|
1146
|
+
props.indexContextValue;
|
|
1147
|
+
var items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1057
1148
|
|
|
1058
1149
|
return searchParameters.setQueryParameters(items);
|
|
1059
1150
|
},
|
|
1060
1151
|
transitionState: function transitionState(props, prevSearchState, nextSearchState) {
|
|
1061
|
-
var id = getId();
|
|
1152
|
+
var id = getId$f();
|
|
1062
1153
|
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1154
|
+
props.children;
|
|
1155
|
+
props.contextValue;
|
|
1156
|
+
props.indexContextValue;
|
|
1157
|
+
var items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1067
1158
|
|
|
1068
1159
|
var propKeys = Object.keys(props);
|
|
1069
1160
|
var nonPresentKeys = this._props ? Object.keys(this._props).filter(function (prop) {
|
|
@@ -1071,7 +1162,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1071
1162
|
}) : [];
|
|
1072
1163
|
this._props = props;
|
|
1073
1164
|
|
|
1074
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), items));
|
|
1165
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit$1(nextSearchState[id], nonPresentKeys), items));
|
|
1075
1166
|
|
|
1076
1167
|
return refineValue(nextSearchState, nextValue, {
|
|
1077
1168
|
ais: props.contextValue,
|
|
@@ -1079,7 +1170,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1079
1170
|
});
|
|
1080
1171
|
},
|
|
1081
1172
|
cleanUp: function cleanUp(props, searchState) {
|
|
1082
|
-
var id = getId();
|
|
1173
|
+
var id = getId$f();
|
|
1083
1174
|
var indexId = getIndexId({
|
|
1084
1175
|
ais: props.contextValue,
|
|
1085
1176
|
multiIndexContext: props.indexContextValue
|
|
@@ -1145,26 +1236,39 @@ var Configure = connectConfigure(function Configure() {
|
|
|
1145
1236
|
return null;
|
|
1146
1237
|
});
|
|
1147
1238
|
|
|
1148
|
-
function
|
|
1149
|
-
if (
|
|
1150
|
-
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
|
|
1151
|
-
arr2[i] = arr[i];
|
|
1152
|
-
}
|
|
1239
|
+
function _arrayLikeToArray(arr, len) {
|
|
1240
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
1153
1241
|
|
|
1154
|
-
|
|
1242
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
1243
|
+
arr2[i] = arr[i];
|
|
1155
1244
|
}
|
|
1245
|
+
|
|
1246
|
+
return arr2;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
function _arrayWithoutHoles(arr) {
|
|
1250
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
1156
1251
|
}
|
|
1157
1252
|
|
|
1158
1253
|
function _iterableToArray(iter) {
|
|
1159
|
-
if (Symbol.iterator
|
|
1254
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
1258
|
+
if (!o) return;
|
|
1259
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1260
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1261
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1262
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1263
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1160
1264
|
}
|
|
1161
1265
|
|
|
1162
1266
|
function _nonIterableSpread() {
|
|
1163
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
|
1267
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1164
1268
|
}
|
|
1165
1269
|
|
|
1166
1270
|
function _toConsumableArray(arr) {
|
|
1167
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
|
1271
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
1168
1272
|
}
|
|
1169
1273
|
|
|
1170
1274
|
function clone(value) {
|
|
@@ -1314,13 +1418,13 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
1314
1418
|
return target;
|
|
1315
1419
|
}
|
|
1316
1420
|
|
|
1317
|
-
var omit
|
|
1421
|
+
var omit = _objectWithoutPropertiesLoose;
|
|
1318
1422
|
|
|
1319
|
-
function objectHasKeys
|
|
1423
|
+
function objectHasKeys(obj) {
|
|
1320
1424
|
return obj && Object.keys(obj).length > 0;
|
|
1321
1425
|
}
|
|
1322
1426
|
|
|
1323
|
-
var objectHasKeys_1 = objectHasKeys
|
|
1427
|
+
var objectHasKeys_1 = objectHasKeys;
|
|
1324
1428
|
|
|
1325
1429
|
var isValidUserToken = function isValidUserToken(userToken) {
|
|
1326
1430
|
if (userToken === null) {
|
|
@@ -1428,7 +1532,7 @@ var lib = {
|
|
|
1428
1532
|
}
|
|
1429
1533
|
return {};
|
|
1430
1534
|
} else if (typeof attribute === 'string') {
|
|
1431
|
-
return omit
|
|
1535
|
+
return omit(refinementList, [attribute]);
|
|
1432
1536
|
} else if (typeof attribute === 'function') {
|
|
1433
1537
|
var hasChanged = false;
|
|
1434
1538
|
|
|
@@ -1473,7 +1577,7 @@ var lib = {
|
|
|
1473
1577
|
}
|
|
1474
1578
|
};
|
|
1475
1579
|
|
|
1476
|
-
var RefinementList = lib;
|
|
1580
|
+
var RefinementList$3 = lib;
|
|
1477
1581
|
|
|
1478
1582
|
/**
|
|
1479
1583
|
* isEqual, but only for numeric refinement values, possible values:
|
|
@@ -1842,22 +1946,22 @@ SearchParameters.prototype = {
|
|
|
1842
1946
|
clearRefinements: function clearRefinements(attribute) {
|
|
1843
1947
|
var patch = {
|
|
1844
1948
|
numericRefinements: this._clearNumericRefinements(attribute),
|
|
1845
|
-
facetsRefinements: RefinementList.clearRefinement(
|
|
1949
|
+
facetsRefinements: RefinementList$3.clearRefinement(
|
|
1846
1950
|
this.facetsRefinements,
|
|
1847
1951
|
attribute,
|
|
1848
1952
|
'conjunctiveFacet'
|
|
1849
1953
|
),
|
|
1850
|
-
facetsExcludes: RefinementList.clearRefinement(
|
|
1954
|
+
facetsExcludes: RefinementList$3.clearRefinement(
|
|
1851
1955
|
this.facetsExcludes,
|
|
1852
1956
|
attribute,
|
|
1853
1957
|
'exclude'
|
|
1854
1958
|
),
|
|
1855
|
-
disjunctiveFacetsRefinements: RefinementList.clearRefinement(
|
|
1959
|
+
disjunctiveFacetsRefinements: RefinementList$3.clearRefinement(
|
|
1856
1960
|
this.disjunctiveFacetsRefinements,
|
|
1857
1961
|
attribute,
|
|
1858
1962
|
'disjunctiveFacet'
|
|
1859
1963
|
),
|
|
1860
|
-
hierarchicalFacetsRefinements: RefinementList.clearRefinement(
|
|
1964
|
+
hierarchicalFacetsRefinements: RefinementList$3.clearRefinement(
|
|
1861
1965
|
this.hierarchicalFacetsRefinements,
|
|
1862
1966
|
attribute,
|
|
1863
1967
|
'hierarchicalFacet'
|
|
@@ -2133,7 +2237,7 @@ SearchParameters.prototype = {
|
|
|
2133
2237
|
}
|
|
2134
2238
|
return {};
|
|
2135
2239
|
} else if (typeof attribute === 'string') {
|
|
2136
|
-
return omit
|
|
2240
|
+
return omit(this.numericRefinements, [attribute]);
|
|
2137
2241
|
} else if (typeof attribute === 'function') {
|
|
2138
2242
|
var hasChanged = false;
|
|
2139
2243
|
var numericRefinements = this.numericRefinements;
|
|
@@ -2225,10 +2329,10 @@ SearchParameters.prototype = {
|
|
|
2225
2329
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2226
2330
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2227
2331
|
}
|
|
2228
|
-
if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2332
|
+
if (RefinementList$3.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2229
2333
|
|
|
2230
2334
|
return this.setQueryParameters({
|
|
2231
|
-
facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value)
|
|
2335
|
+
facetsRefinements: RefinementList$3.addRefinement(this.facetsRefinements, facet, value)
|
|
2232
2336
|
});
|
|
2233
2337
|
},
|
|
2234
2338
|
/**
|
|
@@ -2242,10 +2346,10 @@ SearchParameters.prototype = {
|
|
|
2242
2346
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2243
2347
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2244
2348
|
}
|
|
2245
|
-
if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2349
|
+
if (RefinementList$3.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2246
2350
|
|
|
2247
2351
|
return this.setQueryParameters({
|
|
2248
|
-
facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value)
|
|
2352
|
+
facetsExcludes: RefinementList$3.addRefinement(this.facetsExcludes, facet, value)
|
|
2249
2353
|
});
|
|
2250
2354
|
},
|
|
2251
2355
|
/**
|
|
@@ -2261,10 +2365,10 @@ SearchParameters.prototype = {
|
|
|
2261
2365
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2262
2366
|
}
|
|
2263
2367
|
|
|
2264
|
-
if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2368
|
+
if (RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2265
2369
|
|
|
2266
2370
|
return this.setQueryParameters({
|
|
2267
|
-
disjunctiveFacetsRefinements: RefinementList.addRefinement(
|
|
2371
|
+
disjunctiveFacetsRefinements: RefinementList$3.addRefinement(
|
|
2268
2372
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2269
2373
|
});
|
|
2270
2374
|
},
|
|
@@ -2349,10 +2453,10 @@ SearchParameters.prototype = {
|
|
|
2349
2453
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2350
2454
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2351
2455
|
}
|
|
2352
|
-
if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2456
|
+
if (!RefinementList$3.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2353
2457
|
|
|
2354
2458
|
return this.setQueryParameters({
|
|
2355
|
-
facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value)
|
|
2459
|
+
facetsRefinements: RefinementList$3.removeRefinement(this.facetsRefinements, facet, value)
|
|
2356
2460
|
});
|
|
2357
2461
|
},
|
|
2358
2462
|
/**
|
|
@@ -2366,10 +2470,10 @@ SearchParameters.prototype = {
|
|
|
2366
2470
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2367
2471
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2368
2472
|
}
|
|
2369
|
-
if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2473
|
+
if (!RefinementList$3.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2370
2474
|
|
|
2371
2475
|
return this.setQueryParameters({
|
|
2372
|
-
facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value)
|
|
2476
|
+
facetsExcludes: RefinementList$3.removeRefinement(this.facetsExcludes, facet, value)
|
|
2373
2477
|
});
|
|
2374
2478
|
},
|
|
2375
2479
|
/**
|
|
@@ -2384,10 +2488,10 @@ SearchParameters.prototype = {
|
|
|
2384
2488
|
throw new Error(
|
|
2385
2489
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2386
2490
|
}
|
|
2387
|
-
if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2491
|
+
if (!RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2388
2492
|
|
|
2389
2493
|
return this.setQueryParameters({
|
|
2390
|
-
disjunctiveFacetsRefinements: RefinementList.removeRefinement(
|
|
2494
|
+
disjunctiveFacetsRefinements: RefinementList$3.removeRefinement(
|
|
2391
2495
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2392
2496
|
});
|
|
2393
2497
|
},
|
|
@@ -2453,7 +2557,7 @@ SearchParameters.prototype = {
|
|
|
2453
2557
|
}
|
|
2454
2558
|
|
|
2455
2559
|
return this.setQueryParameters({
|
|
2456
|
-
facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2560
|
+
facetsRefinements: RefinementList$3.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2457
2561
|
});
|
|
2458
2562
|
},
|
|
2459
2563
|
/**
|
|
@@ -2469,7 +2573,7 @@ SearchParameters.prototype = {
|
|
|
2469
2573
|
}
|
|
2470
2574
|
|
|
2471
2575
|
return this.setQueryParameters({
|
|
2472
|
-
facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2576
|
+
facetsExcludes: RefinementList$3.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2473
2577
|
});
|
|
2474
2578
|
},
|
|
2475
2579
|
/**
|
|
@@ -2486,7 +2590,7 @@ SearchParameters.prototype = {
|
|
|
2486
2590
|
}
|
|
2487
2591
|
|
|
2488
2592
|
return this.setQueryParameters({
|
|
2489
|
-
disjunctiveFacetsRefinements: RefinementList.toggleRefinement(
|
|
2593
|
+
disjunctiveFacetsRefinements: RefinementList$3.toggleRefinement(
|
|
2490
2594
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2491
2595
|
});
|
|
2492
2596
|
},
|
|
@@ -2625,7 +2729,7 @@ SearchParameters.prototype = {
|
|
|
2625
2729
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2626
2730
|
return false;
|
|
2627
2731
|
}
|
|
2628
|
-
return RefinementList.isRefined(this.facetsRefinements, facet, value);
|
|
2732
|
+
return RefinementList$3.isRefined(this.facetsRefinements, facet, value);
|
|
2629
2733
|
},
|
|
2630
2734
|
/**
|
|
2631
2735
|
* Returns true if the facet contains exclusions or if a specific value is
|
|
@@ -2641,7 +2745,7 @@ SearchParameters.prototype = {
|
|
|
2641
2745
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2642
2746
|
return false;
|
|
2643
2747
|
}
|
|
2644
|
-
return RefinementList.isRefined(this.facetsExcludes, facet, value);
|
|
2748
|
+
return RefinementList$3.isRefined(this.facetsExcludes, facet, value);
|
|
2645
2749
|
},
|
|
2646
2750
|
/**
|
|
2647
2751
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2656,7 +2760,7 @@ SearchParameters.prototype = {
|
|
|
2656
2760
|
if (!this.isDisjunctiveFacet(facet)) {
|
|
2657
2761
|
return false;
|
|
2658
2762
|
}
|
|
2659
|
-
return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2763
|
+
return RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2660
2764
|
},
|
|
2661
2765
|
/**
|
|
2662
2766
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2842,7 +2946,7 @@ SearchParameters.prototype = {
|
|
|
2842
2946
|
var isNextValueDefined = nextWithNumbers[key] !== undefined;
|
|
2843
2947
|
|
|
2844
2948
|
if (isPreviousValueDefined && !isNextValueDefined) {
|
|
2845
|
-
return omit
|
|
2949
|
+
return omit(previous, [key]);
|
|
2846
2950
|
}
|
|
2847
2951
|
|
|
2848
2952
|
if (isNextValueDefined) {
|
|
@@ -3947,20 +4051,29 @@ function extractNormalizedFacetValues(results, attribute) {
|
|
|
3947
4051
|
}
|
|
3948
4052
|
|
|
3949
4053
|
/**
|
|
3950
|
-
* Sort nodes of a hierarchical facet results
|
|
4054
|
+
* Sort nodes of a hierarchical or disjunctive facet results
|
|
3951
4055
|
* @private
|
|
3952
|
-
* @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
|
|
3953
4060
|
*/
|
|
3954
|
-
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
|
+
|
|
3955
4068
|
if (!node.data || node.data.length === 0) {
|
|
3956
4069
|
return node;
|
|
3957
4070
|
}
|
|
3958
4071
|
|
|
3959
4072
|
var children = node.data.map(function(childNode) {
|
|
3960
|
-
return recSort(sortFn, childNode);
|
|
4073
|
+
return recSort(sortFn, childNode, names, level + 1);
|
|
3961
4074
|
});
|
|
3962
|
-
var sortedChildren = sortFn(children);
|
|
3963
|
-
var newNode =
|
|
4075
|
+
var sortedChildren = sortFn(children, names[level]);
|
|
4076
|
+
var newNode = defaultsPure({data: sortedChildren}, node);
|
|
3964
4077
|
return newNode;
|
|
3965
4078
|
}
|
|
3966
4079
|
|
|
@@ -3970,6 +4083,72 @@ function vanillaSortFn(order, data) {
|
|
|
3970
4083
|
return data.sort(order);
|
|
3971
4084
|
}
|
|
3972
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
|
+
|
|
3973
4152
|
/**
|
|
3974
4153
|
* Get a the list of values for a given facet attribute. Those values are sorted
|
|
3975
4154
|
* refinement first, descending count (bigger value on top), and name ascending
|
|
@@ -3982,6 +4161,9 @@ function vanillaSortFn(order, data) {
|
|
|
3982
4161
|
* might not be respected if you have facet values that are already refined.
|
|
3983
4162
|
* @param {string} attribute attribute name
|
|
3984
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.
|
|
3985
4167
|
* @param {Array.<string> | function} opts.sortBy
|
|
3986
4168
|
* When using strings, it consists of
|
|
3987
4169
|
* the name of the [FacetValue](#SearchResults.FacetValue) or the
|
|
@@ -4021,30 +4203,41 @@ SearchResults.prototype.getFacetValues = function(attribute, opts) {
|
|
|
4021
4203
|
return undefined;
|
|
4022
4204
|
}
|
|
4023
4205
|
|
|
4024
|
-
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
|
+
});
|
|
4212
|
+
|
|
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
|
+
}
|
|
4025
4221
|
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
return recSort(function(hierarchicalFacetValues) {
|
|
4033
|
-
return orderBy_1(hierarchicalFacetValues, order[0], order[1]);
|
|
4034
|
-
}, facetValues);
|
|
4035
|
-
} else if (typeof options.sortBy === 'function') {
|
|
4036
|
-
if (Array.isArray(facetValues)) {
|
|
4037
|
-
return facetValues.sort(options.sortBy);
|
|
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
|
+
}
|
|
4038
4228
|
}
|
|
4039
|
-
|
|
4040
|
-
|
|
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') {
|
|
4041
4234
|
return vanillaSortFn(options.sortBy, data);
|
|
4042
|
-
}
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
);
|
|
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);
|
|
4048
4241
|
};
|
|
4049
4242
|
|
|
4050
4243
|
/**
|
|
@@ -4575,7 +4768,7 @@ var requestBuilder = {
|
|
|
4575
4768
|
|
|
4576
4769
|
var requestBuilder_1 = requestBuilder;
|
|
4577
4770
|
|
|
4578
|
-
var version
|
|
4771
|
+
var version = '3.5.3';
|
|
4579
4772
|
|
|
4580
4773
|
/**
|
|
4581
4774
|
* Event triggered when a parameter is set or updated
|
|
@@ -4682,7 +4875,7 @@ var version$1 = '3.4.4';
|
|
|
4682
4875
|
*/
|
|
4683
4876
|
function AlgoliaSearchHelper(client, index, options) {
|
|
4684
4877
|
if (typeof client.addAlgoliaAgent === 'function') {
|
|
4685
|
-
client.addAlgoliaAgent('JS Helper (' + version
|
|
4878
|
+
client.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
4686
4879
|
}
|
|
4687
4880
|
|
|
4688
4881
|
this.setClient(client);
|
|
@@ -4837,7 +5030,7 @@ AlgoliaSearchHelper.prototype.findAnswers = function(options) {
|
|
|
4837
5030
|
nbHits: options.nbHits
|
|
4838
5031
|
},
|
|
4839
5032
|
{
|
|
4840
|
-
params: omit
|
|
5033
|
+
params: omit(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
4841
5034
|
'attributesToSnippet',
|
|
4842
5035
|
'hitsPerPage',
|
|
4843
5036
|
'restrictSearchableAttributes',
|
|
@@ -5951,7 +6144,7 @@ AlgoliaSearchHelper.prototype.setClient = function(newClient) {
|
|
|
5951
6144
|
if (this.client === newClient) return this;
|
|
5952
6145
|
|
|
5953
6146
|
if (typeof newClient.addAlgoliaAgent === 'function') {
|
|
5954
|
-
newClient.addAlgoliaAgent('JS Helper (' + version
|
|
6147
|
+
newClient.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
5955
6148
|
}
|
|
5956
6149
|
this.client = newClient;
|
|
5957
6150
|
|
|
@@ -6070,7 +6263,7 @@ function algoliasearchHelper(client, index, opts) {
|
|
|
6070
6263
|
* @member module:algoliasearchHelper.version
|
|
6071
6264
|
* @type {number}
|
|
6072
6265
|
*/
|
|
6073
|
-
algoliasearchHelper.version = version
|
|
6266
|
+
algoliasearchHelper.version = version;
|
|
6074
6267
|
|
|
6075
6268
|
/**
|
|
6076
6269
|
* Constructor for the Helper.
|
|
@@ -6102,13 +6295,13 @@ function createOptionalFilter(_ref) {
|
|
|
6102
6295
|
return "".concat(attributeName, ":").concat(attributeValue, "<score=").concat(attributeScore || 1, ">");
|
|
6103
6296
|
}
|
|
6104
6297
|
|
|
6105
|
-
var defaultProps = {
|
|
6298
|
+
var defaultProps$1 = {
|
|
6106
6299
|
transformSearchParameters: function transformSearchParameters(x) {
|
|
6107
6300
|
return _objectSpread({}, x);
|
|
6108
6301
|
}
|
|
6109
6302
|
};
|
|
6110
6303
|
|
|
6111
|
-
function getId$
|
|
6304
|
+
function getId$e() {
|
|
6112
6305
|
// We store the search state of this widget in `configure`.
|
|
6113
6306
|
return 'configure';
|
|
6114
6307
|
}
|
|
@@ -6156,7 +6349,7 @@ function getSearchParametersFromProps(props) {
|
|
|
6156
6349
|
|
|
6157
6350
|
var connectConfigureRelatedItems = createConnectorWithContext({
|
|
6158
6351
|
displayName: 'AlgoliaConfigureRelatedItems',
|
|
6159
|
-
defaultProps: defaultProps,
|
|
6352
|
+
defaultProps: defaultProps$1,
|
|
6160
6353
|
getProvidedProps: function getProvidedProps() {
|
|
6161
6354
|
return {};
|
|
6162
6355
|
},
|
|
@@ -6164,7 +6357,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6164
6357
|
return searchParameters.setQueryParameters(getSearchParametersFromProps(props));
|
|
6165
6358
|
},
|
|
6166
6359
|
transitionState: function transitionState(props, _prevSearchState, nextSearchState) {
|
|
6167
|
-
var id = getId$
|
|
6360
|
+
var id = getId$e(); // We need to transform the exhaustive search parameters back to clean
|
|
6168
6361
|
// search parameters without the empty default keys so we don't pollute the
|
|
6169
6362
|
// `configure` search state.
|
|
6170
6363
|
|
|
@@ -6175,7 +6368,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6175
6368
|
}) : [];
|
|
6176
6369
|
this._searchParameters = searchParameters;
|
|
6177
6370
|
|
|
6178
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6371
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit$1(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6179
6372
|
|
|
6180
6373
|
return refineValue(nextSearchState, nextValue, {
|
|
6181
6374
|
ais: props.contextValue,
|
|
@@ -6185,7 +6378,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6185
6378
|
cleanUp: function cleanUp(props, searchState) {
|
|
6186
6379
|
var _this = this;
|
|
6187
6380
|
|
|
6188
|
-
var id = getId$
|
|
6381
|
+
var id = getId$e();
|
|
6189
6382
|
var indexId = getIndexId({
|
|
6190
6383
|
ais: props.contextValue,
|
|
6191
6384
|
multiIndexContext: props.indexContextValue
|
|
@@ -6258,7 +6451,7 @@ function getWidgetRefinements(attribute, widgetKey, searchState) {
|
|
|
6258
6451
|
}
|
|
6259
6452
|
}
|
|
6260
6453
|
|
|
6261
|
-
function getRefinements
|
|
6454
|
+
function getRefinements(attribute) {
|
|
6262
6455
|
var searchState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6263
6456
|
var refinements = Object.keys(searchState).filter(function (widgetKey) {
|
|
6264
6457
|
return searchState[widgetKey] !== undefined && searchState[widgetKey][attribute] !== undefined;
|
|
@@ -6275,7 +6468,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6275
6468
|
var searchState = _ref.searchState,
|
|
6276
6469
|
trackedFilters = _ref.trackedFilters;
|
|
6277
6470
|
var ruleContexts = Object.keys(trackedFilters).reduce(function (facets, facetName) {
|
|
6278
|
-
var facetRefinements = getRefinements
|
|
6471
|
+
var facetRefinements = getRefinements(facetName, searchState);
|
|
6279
6472
|
var getTrackedFacetValues = trackedFilters[facetName];
|
|
6280
6473
|
var trackedFacetValues = getTrackedFacetValues(facetRefinements);
|
|
6281
6474
|
return [].concat(_toConsumableArray(facets), _toConsumableArray(facetRefinements.filter(function (facetRefinement) {
|
|
@@ -6287,7 +6480,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6287
6480
|
return ruleContexts;
|
|
6288
6481
|
}
|
|
6289
6482
|
|
|
6290
|
-
var defaultProps
|
|
6483
|
+
var defaultProps = {
|
|
6291
6484
|
transformItems: function transformItems(items) {
|
|
6292
6485
|
return items;
|
|
6293
6486
|
},
|
|
@@ -6298,7 +6491,7 @@ var defaultProps$1 = {
|
|
|
6298
6491
|
};
|
|
6299
6492
|
var connectQueryRules = createConnectorWithContext({
|
|
6300
6493
|
displayName: 'AlgoliaQueryRules',
|
|
6301
|
-
defaultProps: defaultProps
|
|
6494
|
+
defaultProps: defaultProps,
|
|
6302
6495
|
getProvidedProps: function getProvidedProps(props, _1, searchResults) {
|
|
6303
6496
|
var results = getResults(searchResults, {
|
|
6304
6497
|
ais: props.contextValue,
|
|
@@ -6475,20 +6668,10 @@ _defineProperty(Index, "propTypes", {
|
|
|
6475
6668
|
children: PropTypes.node
|
|
6476
6669
|
});
|
|
6477
6670
|
|
|
6478
|
-
|
|
6479
|
-
var inferredIndexId = props.indexName;
|
|
6480
|
-
return React__default.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
6481
|
-
return React__default.createElement(Index, _extends({
|
|
6482
|
-
contextValue: contextValue,
|
|
6483
|
-
indexId: inferredIndexId
|
|
6484
|
-
}, props));
|
|
6485
|
-
});
|
|
6486
|
-
};
|
|
6487
|
-
|
|
6488
|
-
IndexWrapper.propTypes = {
|
|
6671
|
+
({
|
|
6489
6672
|
indexName: PropTypes.string.isRequired,
|
|
6490
6673
|
indexId: PropTypes.string
|
|
6491
|
-
};
|
|
6674
|
+
});
|
|
6492
6675
|
|
|
6493
6676
|
function createWidgetsManager(onWidgetsUpdate) {
|
|
6494
6677
|
var widgets = []; // Is an update scheduled?
|
|
@@ -6549,7 +6732,7 @@ function createStore(initialState) {
|
|
|
6549
6732
|
function addAlgoliaAgents(searchClient) {
|
|
6550
6733
|
if (typeof searchClient.addAlgoliaAgent === 'function') {
|
|
6551
6734
|
searchClient.addAlgoliaAgent("react (".concat(version$2, ")"));
|
|
6552
|
-
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version, ")"));
|
|
6735
|
+
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version$1, ")"));
|
|
6553
6736
|
}
|
|
6554
6737
|
}
|
|
6555
6738
|
|
|
@@ -6721,7 +6904,7 @@ function createInstantSearchManager(_ref) {
|
|
|
6721
6904
|
|
|
6722
6905
|
function search() {
|
|
6723
6906
|
if (!skip) {
|
|
6724
|
-
var _getSearchParameters = getSearchParameters(),
|
|
6907
|
+
var _getSearchParameters = getSearchParameters(helper.state),
|
|
6725
6908
|
mainParameters = _getSearchParameters.mainParameters,
|
|
6726
6909
|
derivedParameters = _getSearchParameters.derivedParameters; // We have to call `slice` because the method `detach` on the derived
|
|
6727
6910
|
// helpers mutates the value `derivedHelpers`. The `forEach` loop does
|
|
@@ -6787,8 +6970,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6787
6970
|
nextIsSearchStalled = false;
|
|
6788
6971
|
}
|
|
6789
6972
|
|
|
6790
|
-
|
|
6791
|
-
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6973
|
+
currentState.resultsFacetValues;
|
|
6974
|
+
var partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6792
6975
|
|
|
6793
6976
|
store.setState(_objectSpread({}, partialState, {
|
|
6794
6977
|
results: results,
|
|
@@ -6809,8 +6992,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6809
6992
|
nextIsSearchStalled = false;
|
|
6810
6993
|
}
|
|
6811
6994
|
|
|
6812
|
-
|
|
6813
|
-
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6995
|
+
currentState.resultsFacetValues;
|
|
6996
|
+
var partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6814
6997
|
|
|
6815
6998
|
store.setState(_objectSpread({}, partialState, {
|
|
6816
6999
|
isSearchStalled: nextIsSearchStalled,
|
|
@@ -6822,9 +7005,9 @@ function createInstantSearchManager(_ref) {
|
|
|
6822
7005
|
function handleNewSearch() {
|
|
6823
7006
|
if (!stalledSearchTimer) {
|
|
6824
7007
|
stalledSearchTimer = setTimeout(function () {
|
|
6825
|
-
var _store$getState = store.getState()
|
|
6826
|
-
|
|
6827
|
-
partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
7008
|
+
var _store$getState = store.getState();
|
|
7009
|
+
_store$getState.resultsFacetValues;
|
|
7010
|
+
var partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
6828
7011
|
|
|
6829
7012
|
store.setState(_objectSpread({}, partialState, {
|
|
6830
7013
|
isSearchStalled: true
|
|
@@ -7323,21 +7506,21 @@ _defineProperty(InstantSearch, "propTypes", {
|
|
|
7323
7506
|
stalledSearchDelay: PropTypes.number
|
|
7324
7507
|
});
|
|
7325
7508
|
|
|
7326
|
-
var getId$
|
|
7509
|
+
var getId$d = function getId(props) {
|
|
7327
7510
|
return props.attributes[0];
|
|
7328
7511
|
};
|
|
7329
|
-
var namespace = 'hierarchicalMenu';
|
|
7512
|
+
var namespace$6 = 'hierarchicalMenu';
|
|
7330
7513
|
|
|
7331
|
-
function _refine(props, searchState, nextRefinement, context) {
|
|
7332
|
-
var id = getId$
|
|
7514
|
+
function _refine$9(props, searchState, nextRefinement, context) {
|
|
7515
|
+
var id = getId$d(props);
|
|
7333
7516
|
|
|
7334
7517
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7335
7518
|
|
|
7336
7519
|
var resetPage = true;
|
|
7337
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
7520
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$6);
|
|
7338
7521
|
}
|
|
7339
7522
|
|
|
7340
|
-
function transformValue(values) {
|
|
7523
|
+
function transformValue$1(values) {
|
|
7341
7524
|
return values.reduce(function (acc, item) {
|
|
7342
7525
|
if (item.isRefined) {
|
|
7343
7526
|
acc.push({
|
|
@@ -7348,7 +7531,7 @@ function transformValue(values) {
|
|
|
7348
7531
|
}); // Create a variable in order to keep the same acc for the recursion, otherwise "reduce" returns a new one
|
|
7349
7532
|
|
|
7350
7533
|
if (item.data) {
|
|
7351
|
-
acc = acc.concat(transformValue(item.data));
|
|
7534
|
+
acc = acc.concat(transformValue$1(item.data));
|
|
7352
7535
|
}
|
|
7353
7536
|
}
|
|
7354
7537
|
|
|
@@ -7410,7 +7593,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7410
7593
|
transformItems: PropTypes.func
|
|
7411
7594
|
},
|
|
7412
7595
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
7413
|
-
var id = getId$
|
|
7596
|
+
var id = getId$d(props);
|
|
7414
7597
|
var results = getResults(searchResults, {
|
|
7415
7598
|
ais: props.contextValue,
|
|
7416
7599
|
multiIndexContext: props.indexContextValue
|
|
@@ -7425,7 +7608,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7425
7608
|
}
|
|
7426
7609
|
|
|
7427
7610
|
var values = results.getFacetValues(id);
|
|
7428
|
-
var items = values.data ? transformValue(values.data) : [];
|
|
7611
|
+
var items = values.data ? transformValue$1(values.data) : [];
|
|
7429
7612
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7430
7613
|
return {
|
|
7431
7614
|
canRefine: transformedItems.length > 0,
|
|
@@ -7433,7 +7616,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7433
7616
|
};
|
|
7434
7617
|
},
|
|
7435
7618
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7436
|
-
return _refine(props, searchState, nextRefinement, {
|
|
7619
|
+
return _refine$9(props, searchState, nextRefinement, {
|
|
7437
7620
|
ais: props.contextValue,
|
|
7438
7621
|
multiIndexContext: props.indexContextValue
|
|
7439
7622
|
});
|
|
@@ -7496,13 +7679,13 @@ var connectCurrentRefinements = createConnectorWithContext({
|
|
|
7496
7679
|
}
|
|
7497
7680
|
});
|
|
7498
7681
|
|
|
7499
|
-
var getId$
|
|
7682
|
+
var getId$c = function getId(props) {
|
|
7500
7683
|
return props.attributes[0];
|
|
7501
7684
|
};
|
|
7502
|
-
var namespace$
|
|
7685
|
+
var namespace$5 = 'hierarchicalMenu';
|
|
7503
7686
|
|
|
7504
|
-
function getCurrentRefinement(props, searchState, context) {
|
|
7505
|
-
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);
|
|
7506
7689
|
|
|
7507
7690
|
if (currentRefinement === '') {
|
|
7508
7691
|
return null;
|
|
@@ -7511,13 +7694,13 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
7511
7694
|
return currentRefinement;
|
|
7512
7695
|
}
|
|
7513
7696
|
|
|
7514
|
-
function getValue(path, props, searchState, context) {
|
|
7697
|
+
function getValue$2(path, props, searchState, context) {
|
|
7515
7698
|
var id = props.id,
|
|
7516
7699
|
attributes = props.attributes,
|
|
7517
7700
|
separator = props.separator,
|
|
7518
7701
|
rootPath = props.rootPath,
|
|
7519
7702
|
showParentLevel = props.showParentLevel;
|
|
7520
|
-
var currentRefinement = getCurrentRefinement(props, searchState, context);
|
|
7703
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, context);
|
|
7521
7704
|
var nextRefinement;
|
|
7522
7705
|
|
|
7523
7706
|
if (currentRefinement === null) {
|
|
@@ -7538,14 +7721,14 @@ function getValue(path, props, searchState, context) {
|
|
|
7538
7721
|
return nextRefinement;
|
|
7539
7722
|
}
|
|
7540
7723
|
|
|
7541
|
-
function transformValue
|
|
7724
|
+
function transformValue(value, props, searchState, context) {
|
|
7542
7725
|
return value.map(function (v) {
|
|
7543
7726
|
return {
|
|
7544
7727
|
label: v.name,
|
|
7545
|
-
value: getValue(v.path, props, searchState, context),
|
|
7728
|
+
value: getValue$2(v.path, props, searchState, context),
|
|
7546
7729
|
count: v.count,
|
|
7547
7730
|
isRefined: v.isRefined,
|
|
7548
|
-
items: v.data && transformValue
|
|
7731
|
+
items: v.data && transformValue(v.data, props, searchState, context)
|
|
7549
7732
|
};
|
|
7550
7733
|
});
|
|
7551
7734
|
}
|
|
@@ -7561,20 +7744,20 @@ var truncate = function truncate() {
|
|
|
7561
7744
|
});
|
|
7562
7745
|
};
|
|
7563
7746
|
|
|
7564
|
-
function _refine$
|
|
7565
|
-
var id = getId$
|
|
7747
|
+
function _refine$8(props, searchState, nextRefinement, context) {
|
|
7748
|
+
var id = getId$c(props);
|
|
7566
7749
|
|
|
7567
7750
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7568
7751
|
|
|
7569
7752
|
var resetPage = true;
|
|
7570
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
7753
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$5);
|
|
7571
7754
|
}
|
|
7572
7755
|
|
|
7573
|
-
function _cleanUp(props, searchState, context) {
|
|
7574
|
-
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)));
|
|
7575
7758
|
}
|
|
7576
7759
|
|
|
7577
|
-
var sortBy = ['name:asc'];
|
|
7760
|
+
var sortBy$1 = ['name:asc'];
|
|
7578
7761
|
/**
|
|
7579
7762
|
* connectHierarchicalMenu connector provides the logic to build a widget that will
|
|
7580
7763
|
* give the user the ability to explore a tree-like structure.
|
|
@@ -7656,7 +7839,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7656
7839
|
var showMore = props.showMore,
|
|
7657
7840
|
limit = props.limit,
|
|
7658
7841
|
showMoreLimit = props.showMoreLimit;
|
|
7659
|
-
var id = getId$
|
|
7842
|
+
var id = getId$c(props);
|
|
7660
7843
|
var results = getResults(searchResults, {
|
|
7661
7844
|
ais: props.contextValue,
|
|
7662
7845
|
multiIndexContext: props.indexContextValue
|
|
@@ -7666,7 +7849,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7666
7849
|
if (!isFacetPresent) {
|
|
7667
7850
|
return {
|
|
7668
7851
|
items: [],
|
|
7669
|
-
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7852
|
+
currentRefinement: getCurrentRefinement$b(props, searchState, {
|
|
7670
7853
|
ais: props.contextValue,
|
|
7671
7854
|
multiIndexContext: props.indexContextValue
|
|
7672
7855
|
}),
|
|
@@ -7676,16 +7859,16 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7676
7859
|
|
|
7677
7860
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7678
7861
|
var value = results.getFacetValues(id, {
|
|
7679
|
-
sortBy: sortBy
|
|
7862
|
+
sortBy: sortBy$1
|
|
7680
7863
|
});
|
|
7681
|
-
var items = value.data ? transformValue
|
|
7864
|
+
var items = value.data ? transformValue(value.data, props, searchState, {
|
|
7682
7865
|
ais: props.contextValue,
|
|
7683
7866
|
multiIndexContext: props.indexContextValue
|
|
7684
7867
|
}) : [];
|
|
7685
7868
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7686
7869
|
return {
|
|
7687
7870
|
items: truncate(transformedItems, itemsLimit),
|
|
7688
|
-
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7871
|
+
currentRefinement: getCurrentRefinement$b(props, searchState, {
|
|
7689
7872
|
ais: props.contextValue,
|
|
7690
7873
|
multiIndexContext: props.indexContextValue
|
|
7691
7874
|
}),
|
|
@@ -7693,13 +7876,13 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7693
7876
|
};
|
|
7694
7877
|
},
|
|
7695
7878
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7696
|
-
return _refine$
|
|
7879
|
+
return _refine$8(props, searchState, nextRefinement, {
|
|
7697
7880
|
ais: props.contextValue,
|
|
7698
7881
|
multiIndexContext: props.indexContextValue
|
|
7699
7882
|
});
|
|
7700
7883
|
},
|
|
7701
7884
|
cleanUp: function cleanUp(props, searchState) {
|
|
7702
|
-
return _cleanUp(props, searchState, {
|
|
7885
|
+
return _cleanUp$7(props, searchState, {
|
|
7703
7886
|
ais: props.contextValue,
|
|
7704
7887
|
multiIndexContext: props.indexContextValue
|
|
7705
7888
|
});
|
|
@@ -7713,7 +7896,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7713
7896
|
limit = props.limit,
|
|
7714
7897
|
showMoreLimit = props.showMoreLimit,
|
|
7715
7898
|
contextValue = props.contextValue;
|
|
7716
|
-
var id = getId$
|
|
7899
|
+
var id = getId$c(props);
|
|
7717
7900
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7718
7901
|
searchParameters = searchParameters.addHierarchicalFacet({
|
|
7719
7902
|
name: id,
|
|
@@ -7724,7 +7907,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7724
7907
|
}).setQueryParameters({
|
|
7725
7908
|
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, itemsLimit)
|
|
7726
7909
|
});
|
|
7727
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7910
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
7728
7911
|
ais: contextValue,
|
|
7729
7912
|
multiIndexContext: props.indexContextValue
|
|
7730
7913
|
});
|
|
@@ -7737,8 +7920,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7737
7920
|
},
|
|
7738
7921
|
getMetadata: function getMetadata(props, searchState) {
|
|
7739
7922
|
var rootAttribute = props.attributes[0];
|
|
7740
|
-
var id = getId$
|
|
7741
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7923
|
+
var id = getId$c(props);
|
|
7924
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
7742
7925
|
ais: props.contextValue,
|
|
7743
7926
|
multiIndexContext: props.indexContextValue
|
|
7744
7927
|
});
|
|
@@ -7746,7 +7929,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7746
7929
|
label: "".concat(rootAttribute, ": ").concat(currentRefinement),
|
|
7747
7930
|
attribute: rootAttribute,
|
|
7748
7931
|
value: function value(nextState) {
|
|
7749
|
-
return _refine$
|
|
7932
|
+
return _refine$8(props, nextState, '', {
|
|
7750
7933
|
ais: props.contextValue,
|
|
7751
7934
|
multiIndexContext: props.indexContextValue
|
|
7752
7935
|
});
|
|
@@ -7923,12 +8106,12 @@ var connectHits = createConnectorWithContext({
|
|
|
7923
8106
|
}
|
|
7924
8107
|
});
|
|
7925
8108
|
|
|
7926
|
-
function getId$
|
|
8109
|
+
function getId$b() {
|
|
7927
8110
|
return 'hitsPerPage';
|
|
7928
8111
|
}
|
|
7929
8112
|
|
|
7930
|
-
function getCurrentRefinement$
|
|
7931
|
-
var id = getId$
|
|
8113
|
+
function getCurrentRefinement$a(props, searchState, context) {
|
|
8114
|
+
var id = getId$b();
|
|
7932
8115
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
7933
8116
|
|
|
7934
8117
|
if (typeof currentRefinement === 'string') {
|
|
@@ -7963,7 +8146,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
7963
8146
|
transformItems: PropTypes.func
|
|
7964
8147
|
},
|
|
7965
8148
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
7966
|
-
var currentRefinement = getCurrentRefinement$
|
|
8149
|
+
var currentRefinement = getCurrentRefinement$a(props, searchState, {
|
|
7967
8150
|
ais: props.contextValue,
|
|
7968
8151
|
multiIndexContext: props.indexContextValue
|
|
7969
8152
|
});
|
|
@@ -7980,7 +8163,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
7980
8163
|
};
|
|
7981
8164
|
},
|
|
7982
8165
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7983
|
-
var id = getId$
|
|
8166
|
+
var id = getId$b();
|
|
7984
8167
|
|
|
7985
8168
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
7986
8169
|
|
|
@@ -7994,27 +8177,27 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
7994
8177
|
return cleanUpValue(searchState, {
|
|
7995
8178
|
ais: props.contextValue,
|
|
7996
8179
|
multiIndexContext: props.indexContextValue
|
|
7997
|
-
}, getId$
|
|
8180
|
+
}, getId$b());
|
|
7998
8181
|
},
|
|
7999
8182
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8000
|
-
return searchParameters.setHitsPerPage(getCurrentRefinement$
|
|
8183
|
+
return searchParameters.setHitsPerPage(getCurrentRefinement$a(props, searchState, {
|
|
8001
8184
|
ais: props.contextValue,
|
|
8002
8185
|
multiIndexContext: props.indexContextValue
|
|
8003
8186
|
}));
|
|
8004
8187
|
},
|
|
8005
8188
|
getMetadata: function getMetadata() {
|
|
8006
8189
|
return {
|
|
8007
|
-
id: getId$
|
|
8190
|
+
id: getId$b()
|
|
8008
8191
|
};
|
|
8009
8192
|
}
|
|
8010
8193
|
});
|
|
8011
8194
|
|
|
8012
|
-
function getId$
|
|
8195
|
+
function getId$a() {
|
|
8013
8196
|
return 'page';
|
|
8014
8197
|
}
|
|
8015
8198
|
|
|
8016
|
-
function getCurrentRefinement$
|
|
8017
|
-
var id = getId$
|
|
8199
|
+
function getCurrentRefinement$9(props, searchState, context) {
|
|
8200
|
+
var id = getId$a();
|
|
8018
8201
|
var page = 1;
|
|
8019
8202
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8020
8203
|
|
|
@@ -8026,9 +8209,9 @@ function getCurrentRefinement$2(props, searchState, context) {
|
|
|
8026
8209
|
}
|
|
8027
8210
|
|
|
8028
8211
|
function getStateWithoutPage(state) {
|
|
8029
|
-
var _ref = state || {}
|
|
8030
|
-
|
|
8031
|
-
rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8212
|
+
var _ref = state || {};
|
|
8213
|
+
_ref.page;
|
|
8214
|
+
var rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8032
8215
|
|
|
8033
8216
|
return rest;
|
|
8034
8217
|
}
|
|
@@ -8137,14 +8320,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8137
8320
|
},
|
|
8138
8321
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8139
8322
|
return searchParameters.setQueryParameters({
|
|
8140
|
-
page: getCurrentRefinement$
|
|
8323
|
+
page: getCurrentRefinement$9(props, searchState, {
|
|
8141
8324
|
ais: props.contextValue,
|
|
8142
8325
|
multiIndexContext: props.indexContextValue
|
|
8143
8326
|
}) - 1
|
|
8144
8327
|
});
|
|
8145
8328
|
},
|
|
8146
8329
|
refine: function refine(props, searchState, event, index) {
|
|
8147
|
-
var id = getId$
|
|
8330
|
+
var id = getId$a();
|
|
8148
8331
|
|
|
8149
8332
|
var nextValue = _defineProperty({}, id, index + 1);
|
|
8150
8333
|
|
|
@@ -8156,14 +8339,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8156
8339
|
}
|
|
8157
8340
|
});
|
|
8158
8341
|
|
|
8159
|
-
var namespace$
|
|
8342
|
+
var namespace$4 = 'menu';
|
|
8160
8343
|
|
|
8161
|
-
function getId$
|
|
8344
|
+
function getId$9(props) {
|
|
8162
8345
|
return props.attribute;
|
|
8163
8346
|
}
|
|
8164
8347
|
|
|
8165
|
-
function getCurrentRefinement$
|
|
8166
|
-
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);
|
|
8167
8350
|
|
|
8168
8351
|
if (currentRefinement === '') {
|
|
8169
8352
|
return null;
|
|
@@ -8173,28 +8356,28 @@ function getCurrentRefinement$3(props, searchState, context) {
|
|
|
8173
8356
|
}
|
|
8174
8357
|
|
|
8175
8358
|
function getValue$1(name, props, searchState, context) {
|
|
8176
|
-
var currentRefinement = getCurrentRefinement$
|
|
8359
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, context);
|
|
8177
8360
|
return name === currentRefinement ? '' : name;
|
|
8178
8361
|
}
|
|
8179
8362
|
|
|
8180
|
-
function getLimit(_ref) {
|
|
8363
|
+
function getLimit$1(_ref) {
|
|
8181
8364
|
var showMore = _ref.showMore,
|
|
8182
8365
|
limit = _ref.limit,
|
|
8183
8366
|
showMoreLimit = _ref.showMoreLimit;
|
|
8184
8367
|
return showMore ? showMoreLimit : limit;
|
|
8185
8368
|
}
|
|
8186
8369
|
|
|
8187
|
-
function _refine$
|
|
8188
|
-
var id = getId$
|
|
8370
|
+
function _refine$7(props, searchState, nextRefinement, context) {
|
|
8371
|
+
var id = getId$9(props);
|
|
8189
8372
|
|
|
8190
8373
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : '');
|
|
8191
8374
|
|
|
8192
8375
|
var resetPage = true;
|
|
8193
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
8376
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$4);
|
|
8194
8377
|
}
|
|
8195
8378
|
|
|
8196
|
-
function _cleanUp$
|
|
8197
|
-
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)));
|
|
8198
8381
|
}
|
|
8199
8382
|
|
|
8200
8383
|
var defaultSortBy = ['count:desc', 'name:asc'];
|
|
@@ -8253,7 +8436,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8253
8436
|
if (!canRefine) {
|
|
8254
8437
|
return {
|
|
8255
8438
|
items: [],
|
|
8256
|
-
currentRefinement: getCurrentRefinement$
|
|
8439
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
8257
8440
|
ais: props.contextValue,
|
|
8258
8441
|
multiIndexContext: props.indexContextValue
|
|
8259
8442
|
}),
|
|
@@ -8300,8 +8483,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8300
8483
|
|
|
8301
8484
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
8302
8485
|
return {
|
|
8303
|
-
items: transformedItems.slice(0, getLimit(props)),
|
|
8304
|
-
currentRefinement: getCurrentRefinement$
|
|
8486
|
+
items: transformedItems.slice(0, getLimit$1(props)),
|
|
8487
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
8305
8488
|
ais: props.contextValue,
|
|
8306
8489
|
multiIndexContext: props.indexContextValue
|
|
8307
8490
|
}),
|
|
@@ -8311,7 +8494,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8311
8494
|
};
|
|
8312
8495
|
},
|
|
8313
8496
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8314
|
-
return _refine$
|
|
8497
|
+
return _refine$7(props, searchState, nextRefinement, {
|
|
8315
8498
|
ais: props.contextValue,
|
|
8316
8499
|
multiIndexContext: props.indexContextValue
|
|
8317
8500
|
});
|
|
@@ -8320,11 +8503,11 @@ var connectMenu = createConnectorWithContext({
|
|
|
8320
8503
|
return {
|
|
8321
8504
|
facetName: props.attribute,
|
|
8322
8505
|
query: nextRefinement,
|
|
8323
|
-
maxFacetHits: getLimit(props)
|
|
8506
|
+
maxFacetHits: getLimit$1(props)
|
|
8324
8507
|
};
|
|
8325
8508
|
},
|
|
8326
8509
|
cleanUp: function cleanUp(props, searchState) {
|
|
8327
|
-
return _cleanUp$
|
|
8510
|
+
return _cleanUp$6(props, searchState, {
|
|
8328
8511
|
ais: props.contextValue,
|
|
8329
8512
|
multiIndexContext: props.indexContextValue
|
|
8330
8513
|
});
|
|
@@ -8332,10 +8515,10 @@ var connectMenu = createConnectorWithContext({
|
|
|
8332
8515
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8333
8516
|
var attribute = props.attribute;
|
|
8334
8517
|
searchParameters = searchParameters.setQueryParameters({
|
|
8335
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
8518
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit$1(props))
|
|
8336
8519
|
});
|
|
8337
8520
|
searchParameters = searchParameters.addDisjunctiveFacet(attribute);
|
|
8338
|
-
var currentRefinement = getCurrentRefinement$
|
|
8521
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
8339
8522
|
ais: props.contextValue,
|
|
8340
8523
|
multiIndexContext: props.indexContextValue
|
|
8341
8524
|
});
|
|
@@ -8347,8 +8530,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8347
8530
|
return searchParameters;
|
|
8348
8531
|
},
|
|
8349
8532
|
getMetadata: function getMetadata(props, searchState) {
|
|
8350
|
-
var id = getId$
|
|
8351
|
-
var currentRefinement = getCurrentRefinement$
|
|
8533
|
+
var id = getId$9(props);
|
|
8534
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
8352
8535
|
ais: props.contextValue,
|
|
8353
8536
|
multiIndexContext: props.indexContextValue
|
|
8354
8537
|
});
|
|
@@ -8362,7 +8545,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8362
8545
|
label: "".concat(props.attribute, ": ").concat(currentRefinement),
|
|
8363
8546
|
attribute: props.attribute,
|
|
8364
8547
|
value: function value(nextState) {
|
|
8365
|
-
return _refine$
|
|
8548
|
+
return _refine$7(props, nextState, '', {
|
|
8366
8549
|
ais: props.contextValue,
|
|
8367
8550
|
multiIndexContext: props.indexContextValue
|
|
8368
8551
|
});
|
|
@@ -8378,17 +8561,17 @@ function _arrayWithHoles(arr) {
|
|
|
8378
8561
|
}
|
|
8379
8562
|
|
|
8380
8563
|
function _iterableToArrayLimit(arr, i) {
|
|
8381
|
-
|
|
8382
|
-
return;
|
|
8383
|
-
}
|
|
8564
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
8384
8565
|
|
|
8566
|
+
if (_i == null) return;
|
|
8385
8567
|
var _arr = [];
|
|
8386
8568
|
var _n = true;
|
|
8387
8569
|
var _d = false;
|
|
8388
|
-
|
|
8570
|
+
|
|
8571
|
+
var _s, _e;
|
|
8389
8572
|
|
|
8390
8573
|
try {
|
|
8391
|
-
for (
|
|
8574
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
8392
8575
|
_arr.push(_s.value);
|
|
8393
8576
|
|
|
8394
8577
|
if (i && _arr.length === i) break;
|
|
@@ -8408,11 +8591,11 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
8408
8591
|
}
|
|
8409
8592
|
|
|
8410
8593
|
function _nonIterableRest() {
|
|
8411
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
8594
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8412
8595
|
}
|
|
8413
8596
|
|
|
8414
8597
|
function _slicedToArray(arr, i) {
|
|
8415
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
|
8598
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
8416
8599
|
}
|
|
8417
8600
|
|
|
8418
8601
|
function stringifyItem(item) {
|
|
@@ -8439,19 +8622,19 @@ function parseItem(value) {
|
|
|
8439
8622
|
endStr = _value$split2[1];
|
|
8440
8623
|
|
|
8441
8624
|
return {
|
|
8442
|
-
start: startStr.length > 0 ?
|
|
8443
|
-
end: endStr.length > 0 ?
|
|
8625
|
+
start: startStr.length > 0 ? parseFloat(startStr) : null,
|
|
8626
|
+
end: endStr.length > 0 ? parseFloat(endStr) : null
|
|
8444
8627
|
};
|
|
8445
8628
|
}
|
|
8446
8629
|
|
|
8447
8630
|
var namespace$3 = 'multiRange';
|
|
8448
8631
|
|
|
8449
|
-
function getId$
|
|
8632
|
+
function getId$8(props) {
|
|
8450
8633
|
return props.attribute;
|
|
8451
8634
|
}
|
|
8452
8635
|
|
|
8453
|
-
function getCurrentRefinement$
|
|
8454
|
-
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)), '');
|
|
8455
8638
|
}
|
|
8456
8639
|
|
|
8457
8640
|
function isRefinementsRangeIncludesInsideItemRange(stats, start, end) {
|
|
@@ -8470,15 +8653,15 @@ function itemHasRefinement(attribute, results, value) {
|
|
|
8470
8653
|
return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end)));
|
|
8471
8654
|
}
|
|
8472
8655
|
|
|
8473
|
-
function _refine$
|
|
8474
|
-
var nextValue = _defineProperty({}, getId$
|
|
8656
|
+
function _refine$6(props, searchState, nextRefinement, context) {
|
|
8657
|
+
var nextValue = _defineProperty({}, getId$8(props), nextRefinement);
|
|
8475
8658
|
|
|
8476
8659
|
var resetPage = true;
|
|
8477
8660
|
return refineValue(searchState, nextValue, context, resetPage, namespace$3);
|
|
8478
8661
|
}
|
|
8479
8662
|
|
|
8480
|
-
function _cleanUp$
|
|
8481
|
-
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)));
|
|
8482
8665
|
}
|
|
8483
8666
|
/**
|
|
8484
8667
|
* connectNumericMenu connector provides the logic to build a widget that will
|
|
@@ -8512,7 +8695,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8512
8695
|
},
|
|
8513
8696
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
8514
8697
|
var attribute = props.attribute;
|
|
8515
|
-
var currentRefinement = getCurrentRefinement$
|
|
8698
|
+
var currentRefinement = getCurrentRefinement$7(props, searchState, {
|
|
8516
8699
|
ais: props.contextValue,
|
|
8517
8700
|
multiIndexContext: props.indexContextValue
|
|
8518
8701
|
});
|
|
@@ -8526,11 +8709,11 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8526
8709
|
label: item.label,
|
|
8527
8710
|
value: value,
|
|
8528
8711
|
isRefined: value === currentRefinement,
|
|
8529
|
-
noRefinement: results ? itemHasRefinement(getId$
|
|
8712
|
+
noRefinement: results ? itemHasRefinement(getId$8(props), results, value) : false
|
|
8530
8713
|
};
|
|
8531
8714
|
});
|
|
8532
8715
|
var stats = results && results.getFacetByName(attribute) ? results.getFacetStats(attribute) : null;
|
|
8533
|
-
var refinedItem = find(items, function (item) {
|
|
8716
|
+
var refinedItem = find$2(items, function (item) {
|
|
8534
8717
|
return item.isRefined === true;
|
|
8535
8718
|
});
|
|
8536
8719
|
|
|
@@ -8555,13 +8738,13 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8555
8738
|
};
|
|
8556
8739
|
},
|
|
8557
8740
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8558
|
-
return _refine$
|
|
8741
|
+
return _refine$6(props, searchState, nextRefinement, {
|
|
8559
8742
|
ais: props.contextValue,
|
|
8560
8743
|
multiIndexContext: props.indexContextValue
|
|
8561
8744
|
});
|
|
8562
8745
|
},
|
|
8563
8746
|
cleanUp: function cleanUp(props, searchState) {
|
|
8564
|
-
return _cleanUp$
|
|
8747
|
+
return _cleanUp$5(props, searchState, {
|
|
8565
8748
|
ais: props.contextValue,
|
|
8566
8749
|
multiIndexContext: props.indexContextValue
|
|
8567
8750
|
});
|
|
@@ -8569,7 +8752,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8569
8752
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8570
8753
|
var attribute = props.attribute;
|
|
8571
8754
|
|
|
8572
|
-
var _parseItem = parseItem(getCurrentRefinement$
|
|
8755
|
+
var _parseItem = parseItem(getCurrentRefinement$7(props, searchState, {
|
|
8573
8756
|
ais: props.contextValue,
|
|
8574
8757
|
multiIndexContext: props.indexContextValue
|
|
8575
8758
|
})),
|
|
@@ -8589,8 +8772,8 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8589
8772
|
return searchParameters;
|
|
8590
8773
|
},
|
|
8591
8774
|
getMetadata: function getMetadata(props, searchState) {
|
|
8592
|
-
var id = getId$
|
|
8593
|
-
var value = getCurrentRefinement$
|
|
8775
|
+
var id = getId$8(props);
|
|
8776
|
+
var value = getCurrentRefinement$7(props, searchState, {
|
|
8594
8777
|
ais: props.contextValue,
|
|
8595
8778
|
multiIndexContext: props.indexContextValue
|
|
8596
8779
|
});
|
|
@@ -8601,7 +8784,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8601
8784
|
});
|
|
8602
8785
|
|
|
8603
8786
|
if (value !== '') {
|
|
8604
|
-
var _find = find(props.items, function (item) {
|
|
8787
|
+
var _find = find$2(props.items, function (item) {
|
|
8605
8788
|
return stringifyItem(item) === value;
|
|
8606
8789
|
}),
|
|
8607
8790
|
label = _find.label;
|
|
@@ -8611,7 +8794,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8611
8794
|
attribute: props.attribute,
|
|
8612
8795
|
currentRefinement: label,
|
|
8613
8796
|
value: function value(nextState) {
|
|
8614
|
-
return _refine$
|
|
8797
|
+
return _refine$6(props, nextState, '', {
|
|
8615
8798
|
ais: props.contextValue,
|
|
8616
8799
|
multiIndexContext: props.indexContextValue
|
|
8617
8800
|
});
|
|
@@ -8627,12 +8810,12 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8627
8810
|
}
|
|
8628
8811
|
});
|
|
8629
8812
|
|
|
8630
|
-
function getId$
|
|
8813
|
+
function getId$7() {
|
|
8631
8814
|
return 'page';
|
|
8632
8815
|
}
|
|
8633
8816
|
|
|
8634
|
-
function getCurrentRefinement$
|
|
8635
|
-
var id = getId$
|
|
8817
|
+
function getCurrentRefinement$6(props, searchState, context) {
|
|
8818
|
+
var id = getId$7();
|
|
8636
8819
|
var page = 1;
|
|
8637
8820
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8638
8821
|
|
|
@@ -8643,8 +8826,8 @@ function getCurrentRefinement$5(props, searchState, context) {
|
|
|
8643
8826
|
return currentRefinement;
|
|
8644
8827
|
}
|
|
8645
8828
|
|
|
8646
|
-
function _refine$
|
|
8647
|
-
var id = getId$
|
|
8829
|
+
function _refine$5(props, searchState, nextPage, context) {
|
|
8830
|
+
var id = getId$7();
|
|
8648
8831
|
|
|
8649
8832
|
var nextValue = _defineProperty({}, id, nextPage);
|
|
8650
8833
|
|
|
@@ -8684,7 +8867,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8684
8867
|
var nbPages = results.nbPages;
|
|
8685
8868
|
return {
|
|
8686
8869
|
nbPages: nbPages,
|
|
8687
|
-
currentRefinement: getCurrentRefinement$
|
|
8870
|
+
currentRefinement: getCurrentRefinement$6(props, searchState, {
|
|
8688
8871
|
ais: props.contextValue,
|
|
8689
8872
|
multiIndexContext: props.indexContextValue
|
|
8690
8873
|
}),
|
|
@@ -8692,7 +8875,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8692
8875
|
};
|
|
8693
8876
|
},
|
|
8694
8877
|
refine: function refine(props, searchState, nextPage) {
|
|
8695
|
-
return _refine$
|
|
8878
|
+
return _refine$5(props, searchState, nextPage, {
|
|
8696
8879
|
ais: props.contextValue,
|
|
8697
8880
|
multiIndexContext: props.indexContextValue
|
|
8698
8881
|
});
|
|
@@ -8701,17 +8884,17 @@ var connectPagination = createConnectorWithContext({
|
|
|
8701
8884
|
return cleanUpValue(searchState, {
|
|
8702
8885
|
ais: props.contextValue,
|
|
8703
8886
|
multiIndexContext: props.indexContextValue
|
|
8704
|
-
}, getId$
|
|
8887
|
+
}, getId$7());
|
|
8705
8888
|
},
|
|
8706
8889
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8707
|
-
return searchParameters.setPage(getCurrentRefinement$
|
|
8890
|
+
return searchParameters.setPage(getCurrentRefinement$6(props, searchState, {
|
|
8708
8891
|
ais: props.contextValue,
|
|
8709
8892
|
multiIndexContext: props.indexContextValue
|
|
8710
8893
|
}) - 1);
|
|
8711
8894
|
},
|
|
8712
8895
|
getMetadata: function getMetadata() {
|
|
8713
8896
|
return {
|
|
8714
|
-
id: getId$
|
|
8897
|
+
id: getId$7()
|
|
8715
8898
|
};
|
|
8716
8899
|
}
|
|
8717
8900
|
});
|
|
@@ -8757,11 +8940,11 @@ var connectPoweredBy = createConnectorWithContext({
|
|
|
8757
8940
|
* @providedPropType {number} precision - Number of digits after decimal point to use.
|
|
8758
8941
|
*/
|
|
8759
8942
|
|
|
8760
|
-
function getId$
|
|
8943
|
+
function getId$6(props) {
|
|
8761
8944
|
return props.attribute;
|
|
8762
8945
|
}
|
|
8763
8946
|
|
|
8764
|
-
var namespace$
|
|
8947
|
+
var namespace$2 = 'range';
|
|
8765
8948
|
|
|
8766
8949
|
function getCurrentRange(boundaries, stats, precision) {
|
|
8767
8950
|
var pow = Math.pow(10, precision);
|
|
@@ -8791,8 +8974,8 @@ function getCurrentRange(boundaries, stats, precision) {
|
|
|
8791
8974
|
};
|
|
8792
8975
|
}
|
|
8793
8976
|
|
|
8794
|
-
function getCurrentRefinement$
|
|
8795
|
-
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)), {}),
|
|
8796
8979
|
min = _getCurrentRefinement.min,
|
|
8797
8980
|
max = _getCurrentRefinement.max;
|
|
8798
8981
|
|
|
@@ -8858,7 +9041,7 @@ function nextValueForRefinement(hasBound, isReset, range, value) {
|
|
|
8858
9041
|
return next;
|
|
8859
9042
|
}
|
|
8860
9043
|
|
|
8861
|
-
function _refine$
|
|
9044
|
+
function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
8862
9045
|
var nextMin = nextRefinement.min,
|
|
8863
9046
|
nextMax = nextRefinement.max;
|
|
8864
9047
|
var currentMinRange = currentRange.min,
|
|
@@ -8882,7 +9065,7 @@ function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
|
8882
9065
|
throw Error("You can't provide max value greater than range.");
|
|
8883
9066
|
}
|
|
8884
9067
|
|
|
8885
|
-
var id = getId$
|
|
9068
|
+
var id = getId$6(props);
|
|
8886
9069
|
var resetPage = true;
|
|
8887
9070
|
|
|
8888
9071
|
var nextValue = _defineProperty({}, id, {
|
|
@@ -8890,11 +9073,11 @@ function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
|
8890
9073
|
max: nextValueForRefinement(props.max !== undefined, isMaxReset, currentMaxRange, nextMaxAsNumber)
|
|
8891
9074
|
});
|
|
8892
9075
|
|
|
8893
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9076
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$2);
|
|
8894
9077
|
}
|
|
8895
9078
|
|
|
8896
|
-
function _cleanUp$
|
|
8897
|
-
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)));
|
|
8898
9081
|
}
|
|
8899
9082
|
|
|
8900
9083
|
var connectRange = createConnectorWithContext({
|
|
@@ -8949,7 +9132,7 @@ var connectRange = createConnectorWithContext({
|
|
|
8949
9132
|
min: rangeMin,
|
|
8950
9133
|
max: rangeMax
|
|
8951
9134
|
};
|
|
8952
|
-
var currentRefinement = getCurrentRefinement$
|
|
9135
|
+
var currentRefinement = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
8953
9136
|
ais: props.contextValue,
|
|
8954
9137
|
multiIndexContext: props.indexContextValue
|
|
8955
9138
|
});
|
|
@@ -8963,13 +9146,13 @@ var connectRange = createConnectorWithContext({
|
|
|
8963
9146
|
};
|
|
8964
9147
|
},
|
|
8965
9148
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8966
|
-
return _refine$
|
|
9149
|
+
return _refine$4(props, searchState, nextRefinement, this._currentRange, {
|
|
8967
9150
|
ais: props.contextValue,
|
|
8968
9151
|
multiIndexContext: props.indexContextValue
|
|
8969
9152
|
});
|
|
8970
9153
|
},
|
|
8971
9154
|
cleanUp: function cleanUp(props, searchState) {
|
|
8972
|
-
return _cleanUp$
|
|
9155
|
+
return _cleanUp$4(props, searchState, {
|
|
8973
9156
|
ais: props.contextValue,
|
|
8974
9157
|
multiIndexContext: props.indexContextValue
|
|
8975
9158
|
});
|
|
@@ -8977,7 +9160,7 @@ var connectRange = createConnectorWithContext({
|
|
|
8977
9160
|
getSearchParameters: function getSearchParameters(params, props, searchState) {
|
|
8978
9161
|
var attribute = props.attribute;
|
|
8979
9162
|
|
|
8980
|
-
var _getCurrentRefinement2 = getCurrentRefinement$
|
|
9163
|
+
var _getCurrentRefinement2 = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
8981
9164
|
ais: props.contextValue,
|
|
8982
9165
|
multiIndexContext: props.indexContextValue
|
|
8983
9166
|
}),
|
|
@@ -9003,7 +9186,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9003
9186
|
minRange = _this$_currentRange.min,
|
|
9004
9187
|
maxRange = _this$_currentRange.max;
|
|
9005
9188
|
|
|
9006
|
-
var _getCurrentRefinement3 = getCurrentRefinement$
|
|
9189
|
+
var _getCurrentRefinement3 = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
9007
9190
|
ais: props.contextValue,
|
|
9008
9191
|
multiIndexContext: props.indexContextValue
|
|
9009
9192
|
}),
|
|
@@ -9022,7 +9205,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9022
9205
|
label: fragments.join(''),
|
|
9023
9206
|
attribute: props.attribute,
|
|
9024
9207
|
value: function value(nextState) {
|
|
9025
|
-
return _refine$
|
|
9208
|
+
return _refine$4(props, nextState, {}, _this._currentRange, {
|
|
9026
9209
|
ais: props.contextValue,
|
|
9027
9210
|
multiIndexContext: props.indexContextValue
|
|
9028
9211
|
});
|
|
@@ -9038,7 +9221,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9038
9221
|
}
|
|
9039
9222
|
|
|
9040
9223
|
return {
|
|
9041
|
-
id: getId$
|
|
9224
|
+
id: getId$6(props),
|
|
9042
9225
|
index: getIndexId({
|
|
9043
9226
|
ais: props.contextValue,
|
|
9044
9227
|
multiIndexContext: props.indexContextValue
|
|
@@ -9048,14 +9231,14 @@ var connectRange = createConnectorWithContext({
|
|
|
9048
9231
|
}
|
|
9049
9232
|
});
|
|
9050
9233
|
|
|
9051
|
-
var namespace$
|
|
9234
|
+
var namespace$1 = 'refinementList';
|
|
9052
9235
|
|
|
9053
|
-
function getId$
|
|
9236
|
+
function getId$5(props) {
|
|
9054
9237
|
return props.attribute;
|
|
9055
9238
|
}
|
|
9056
9239
|
|
|
9057
|
-
function getCurrentRefinement$
|
|
9058
|
-
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)), []);
|
|
9059
9242
|
|
|
9060
9243
|
if (typeof currentRefinement !== 'string') {
|
|
9061
9244
|
return currentRefinement;
|
|
@@ -9068,8 +9251,8 @@ function getCurrentRefinement$7(props, searchState, context) {
|
|
|
9068
9251
|
return [];
|
|
9069
9252
|
}
|
|
9070
9253
|
|
|
9071
|
-
function getValue
|
|
9072
|
-
var currentRefinement = getCurrentRefinement$
|
|
9254
|
+
function getValue(name, props, searchState, context) {
|
|
9255
|
+
var currentRefinement = getCurrentRefinement$4(props, searchState, context);
|
|
9073
9256
|
var isAnewValue = currentRefinement.indexOf(name) === -1;
|
|
9074
9257
|
var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates
|
|
9075
9258
|
: currentRefinement.filter(function (selectedValue) {
|
|
@@ -9079,15 +9262,15 @@ function getValue$2(name, props, searchState, context) {
|
|
|
9079
9262
|
return nextRefinement;
|
|
9080
9263
|
}
|
|
9081
9264
|
|
|
9082
|
-
function getLimit
|
|
9265
|
+
function getLimit(_ref) {
|
|
9083
9266
|
var showMore = _ref.showMore,
|
|
9084
9267
|
limit = _ref.limit,
|
|
9085
9268
|
showMoreLimit = _ref.showMoreLimit;
|
|
9086
9269
|
return showMore ? showMoreLimit : limit;
|
|
9087
9270
|
}
|
|
9088
9271
|
|
|
9089
|
-
function _refine$
|
|
9090
|
-
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
|
|
9091
9274
|
// the URL as an empty value.
|
|
9092
9275
|
// This is necessary in the case where `defaultRefinement` contains one
|
|
9093
9276
|
// item and we try to deselect it. `nextSelected` would be an empty array,
|
|
@@ -9098,11 +9281,11 @@ function _refine$6(props, searchState, nextRefinement, context) {
|
|
|
9098
9281
|
var nextValue = _defineProperty({}, id, nextRefinement.length > 0 ? nextRefinement : '');
|
|
9099
9282
|
|
|
9100
9283
|
var resetPage = true;
|
|
9101
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9284
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$1);
|
|
9102
9285
|
}
|
|
9103
9286
|
|
|
9104
|
-
function _cleanUp$
|
|
9105
|
-
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)));
|
|
9106
9289
|
}
|
|
9107
9290
|
/**
|
|
9108
9291
|
* connectRefinementList connector provides the logic to build a widget that will
|
|
@@ -9129,7 +9312,7 @@ function _cleanUp$4(props, searchState, context) {
|
|
|
9129
9312
|
*/
|
|
9130
9313
|
|
|
9131
9314
|
|
|
9132
|
-
var sortBy
|
|
9315
|
+
var sortBy = ['isRefined', 'count:desc', 'name:asc'];
|
|
9133
9316
|
var connectRefinementList = createConnectorWithContext({
|
|
9134
9317
|
displayName: 'AlgoliaRefinementList',
|
|
9135
9318
|
propTypes: {
|
|
@@ -9167,7 +9350,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9167
9350
|
if (!canRefine) {
|
|
9168
9351
|
return {
|
|
9169
9352
|
items: [],
|
|
9170
|
-
currentRefinement: getCurrentRefinement$
|
|
9353
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, {
|
|
9171
9354
|
ais: props.contextValue,
|
|
9172
9355
|
multiIndexContext: props.indexContextValue
|
|
9173
9356
|
}),
|
|
@@ -9180,7 +9363,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9180
9363
|
var items = isFromSearch ? searchForFacetValuesResults[attribute].map(function (v) {
|
|
9181
9364
|
return {
|
|
9182
9365
|
label: v.value,
|
|
9183
|
-
value: getValue
|
|
9366
|
+
value: getValue(v.value, props, searchState, {
|
|
9184
9367
|
ais: props.contextValue,
|
|
9185
9368
|
multiIndexContext: props.indexContextValue
|
|
9186
9369
|
}),
|
|
@@ -9193,11 +9376,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9193
9376
|
isRefined: v.isRefined
|
|
9194
9377
|
};
|
|
9195
9378
|
}) : results.getFacetValues(attribute, {
|
|
9196
|
-
sortBy: sortBy
|
|
9379
|
+
sortBy: sortBy
|
|
9197
9380
|
}).map(function (v) {
|
|
9198
9381
|
return {
|
|
9199
9382
|
label: v.name,
|
|
9200
|
-
value: getValue
|
|
9383
|
+
value: getValue(v.name, props, searchState, {
|
|
9201
9384
|
ais: props.contextValue,
|
|
9202
9385
|
multiIndexContext: props.indexContextValue
|
|
9203
9386
|
}),
|
|
@@ -9207,8 +9390,8 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9207
9390
|
});
|
|
9208
9391
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
9209
9392
|
return {
|
|
9210
|
-
items: transformedItems.slice(0, getLimit
|
|
9211
|
-
currentRefinement: getCurrentRefinement$
|
|
9393
|
+
items: transformedItems.slice(0, getLimit(props)),
|
|
9394
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, {
|
|
9212
9395
|
ais: props.contextValue,
|
|
9213
9396
|
multiIndexContext: props.indexContextValue
|
|
9214
9397
|
}),
|
|
@@ -9218,7 +9401,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9218
9401
|
};
|
|
9219
9402
|
},
|
|
9220
9403
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9221
|
-
return _refine$
|
|
9404
|
+
return _refine$3(props, searchState, nextRefinement, {
|
|
9222
9405
|
ais: props.contextValue,
|
|
9223
9406
|
multiIndexContext: props.indexContextValue
|
|
9224
9407
|
});
|
|
@@ -9227,11 +9410,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9227
9410
|
return {
|
|
9228
9411
|
facetName: props.attribute,
|
|
9229
9412
|
query: nextRefinement,
|
|
9230
|
-
maxFacetHits: getLimit
|
|
9413
|
+
maxFacetHits: getLimit(props)
|
|
9231
9414
|
};
|
|
9232
9415
|
},
|
|
9233
9416
|
cleanUp: function cleanUp(props, searchState) {
|
|
9234
|
-
return _cleanUp$
|
|
9417
|
+
return _cleanUp$3(props, searchState, {
|
|
9235
9418
|
ais: props.contextValue,
|
|
9236
9419
|
multiIndexContext: props.indexContextValue
|
|
9237
9420
|
});
|
|
@@ -9242,10 +9425,10 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9242
9425
|
var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet';
|
|
9243
9426
|
var addRefinementKey = "".concat(addKey, "Refinement");
|
|
9244
9427
|
searchParameters = searchParameters.setQueryParameters({
|
|
9245
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit
|
|
9428
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
9246
9429
|
});
|
|
9247
9430
|
searchParameters = searchParameters[addKey](attribute);
|
|
9248
|
-
return getCurrentRefinement$
|
|
9431
|
+
return getCurrentRefinement$4(props, searchState, {
|
|
9249
9432
|
ais: props.contextValue,
|
|
9250
9433
|
multiIndexContext: props.indexContextValue
|
|
9251
9434
|
}).reduce(function (res, val) {
|
|
@@ -9253,7 +9436,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9253
9436
|
}, searchParameters);
|
|
9254
9437
|
},
|
|
9255
9438
|
getMetadata: function getMetadata(props, searchState) {
|
|
9256
|
-
var id = getId$
|
|
9439
|
+
var id = getId$5(props);
|
|
9257
9440
|
var context = {
|
|
9258
9441
|
ais: props.contextValue,
|
|
9259
9442
|
multiIndexContext: props.indexContextValue
|
|
@@ -9261,21 +9444,21 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9261
9444
|
return {
|
|
9262
9445
|
id: id,
|
|
9263
9446
|
index: getIndexId(context),
|
|
9264
|
-
items: getCurrentRefinement$
|
|
9447
|
+
items: getCurrentRefinement$4(props, searchState, context).length > 0 ? [{
|
|
9265
9448
|
attribute: props.attribute,
|
|
9266
9449
|
label: "".concat(props.attribute, ": "),
|
|
9267
|
-
currentRefinement: getCurrentRefinement$
|
|
9450
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, context),
|
|
9268
9451
|
value: function value(nextState) {
|
|
9269
|
-
return _refine$
|
|
9452
|
+
return _refine$3(props, nextState, [], context);
|
|
9270
9453
|
},
|
|
9271
|
-
items: getCurrentRefinement$
|
|
9454
|
+
items: getCurrentRefinement$4(props, searchState, context).map(function (item) {
|
|
9272
9455
|
return {
|
|
9273
9456
|
label: "".concat(item),
|
|
9274
9457
|
value: function value(nextState) {
|
|
9275
|
-
var nextSelectedItems = getCurrentRefinement$
|
|
9458
|
+
var nextSelectedItems = getCurrentRefinement$4(props, nextState, context).filter(function (other) {
|
|
9276
9459
|
return other !== item;
|
|
9277
9460
|
});
|
|
9278
|
-
return _refine$
|
|
9461
|
+
return _refine$3(props, searchState, nextSelectedItems, context);
|
|
9279
9462
|
}
|
|
9280
9463
|
};
|
|
9281
9464
|
})
|
|
@@ -9334,7 +9517,7 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9334
9517
|
// See: https://github.com/algolia/react-instantsearch/issues/164
|
|
9335
9518
|
|
|
9336
9519
|
|
|
9337
|
-
var cleanedSearchState = omit(searchState, ['configure', id]);
|
|
9520
|
+
var cleanedSearchState = omit$1(searchState, ['configure', id]);
|
|
9338
9521
|
var hasNotChanged = shallowEqual(this._prevSearchState, cleanedSearchState);
|
|
9339
9522
|
this._prevSearchState = cleanedSearchState;
|
|
9340
9523
|
return {
|
|
@@ -9344,12 +9527,12 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9344
9527
|
}
|
|
9345
9528
|
});
|
|
9346
9529
|
|
|
9347
|
-
function getId$
|
|
9530
|
+
function getId$4() {
|
|
9348
9531
|
return 'query';
|
|
9349
9532
|
}
|
|
9350
9533
|
|
|
9351
|
-
function getCurrentRefinement$
|
|
9352
|
-
var id = getId$
|
|
9534
|
+
function getCurrentRefinement$3(props, searchState, context) {
|
|
9535
|
+
var id = getId$4();
|
|
9353
9536
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9354
9537
|
|
|
9355
9538
|
if (currentRefinement) {
|
|
@@ -9359,8 +9542,8 @@ function getCurrentRefinement$8(props, searchState, context) {
|
|
|
9359
9542
|
return '';
|
|
9360
9543
|
}
|
|
9361
9544
|
|
|
9362
|
-
function _refine$
|
|
9363
|
-
var id = getId$
|
|
9545
|
+
function _refine$2(props, searchState, nextRefinement, context) {
|
|
9546
|
+
var id = getId$4();
|
|
9364
9547
|
|
|
9365
9548
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9366
9549
|
|
|
@@ -9368,8 +9551,8 @@ function _refine$7(props, searchState, nextRefinement, context) {
|
|
|
9368
9551
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9369
9552
|
}
|
|
9370
9553
|
|
|
9371
|
-
function _cleanUp$
|
|
9372
|
-
return cleanUpValue(searchState, context, getId$
|
|
9554
|
+
function _cleanUp$2(props, searchState, context) {
|
|
9555
|
+
return cleanUpValue(searchState, context, getId$4());
|
|
9373
9556
|
}
|
|
9374
9557
|
/**
|
|
9375
9558
|
* connectSearchBox connector provides the logic to build a widget that will
|
|
@@ -9390,7 +9573,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9390
9573
|
},
|
|
9391
9574
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
9392
9575
|
return {
|
|
9393
|
-
currentRefinement: getCurrentRefinement$
|
|
9576
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
9394
9577
|
ais: props.contextValue,
|
|
9395
9578
|
multiIndexContext: props.indexContextValue
|
|
9396
9579
|
}),
|
|
@@ -9398,26 +9581,26 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9398
9581
|
};
|
|
9399
9582
|
},
|
|
9400
9583
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9401
|
-
return _refine$
|
|
9584
|
+
return _refine$2(props, searchState, nextRefinement, {
|
|
9402
9585
|
ais: props.contextValue,
|
|
9403
9586
|
multiIndexContext: props.indexContextValue
|
|
9404
9587
|
});
|
|
9405
9588
|
},
|
|
9406
9589
|
cleanUp: function cleanUp(props, searchState) {
|
|
9407
|
-
return _cleanUp$
|
|
9590
|
+
return _cleanUp$2(props, searchState, {
|
|
9408
9591
|
ais: props.contextValue,
|
|
9409
9592
|
multiIndexContext: props.indexContextValue
|
|
9410
9593
|
});
|
|
9411
9594
|
},
|
|
9412
9595
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9413
|
-
return searchParameters.setQuery(getCurrentRefinement$
|
|
9596
|
+
return searchParameters.setQuery(getCurrentRefinement$3(props, searchState, {
|
|
9414
9597
|
ais: props.contextValue,
|
|
9415
9598
|
multiIndexContext: props.indexContextValue
|
|
9416
9599
|
}));
|
|
9417
9600
|
},
|
|
9418
9601
|
getMetadata: function getMetadata(props, searchState) {
|
|
9419
|
-
var id = getId$
|
|
9420
|
-
var currentRefinement = getCurrentRefinement$
|
|
9602
|
+
var id = getId$4();
|
|
9603
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
9421
9604
|
ais: props.contextValue,
|
|
9422
9605
|
multiIndexContext: props.indexContextValue
|
|
9423
9606
|
});
|
|
@@ -9430,7 +9613,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9430
9613
|
items: currentRefinement === null ? [] : [{
|
|
9431
9614
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9432
9615
|
value: function value(nextState) {
|
|
9433
|
-
return _refine$
|
|
9616
|
+
return _refine$2(props, nextState, '', {
|
|
9434
9617
|
ais: props.contextValue,
|
|
9435
9618
|
multiIndexContext: props.indexContextValue
|
|
9436
9619
|
});
|
|
@@ -9441,12 +9624,12 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9441
9624
|
}
|
|
9442
9625
|
});
|
|
9443
9626
|
|
|
9444
|
-
function getId$
|
|
9627
|
+
function getId$3() {
|
|
9445
9628
|
return 'relevancyStrictness';
|
|
9446
9629
|
}
|
|
9447
9630
|
|
|
9448
|
-
function getCurrentRefinement$
|
|
9449
|
-
var id = getId$
|
|
9631
|
+
function getCurrentRefinement$2(props, searchState, context) {
|
|
9632
|
+
var id = getId$3();
|
|
9450
9633
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id);
|
|
9451
9634
|
return currentRefinement;
|
|
9452
9635
|
}
|
|
@@ -9472,13 +9655,13 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9472
9655
|
};
|
|
9473
9656
|
},
|
|
9474
9657
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9475
|
-
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$
|
|
9658
|
+
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$2(props, searchState, {
|
|
9476
9659
|
ais: props.contextValue,
|
|
9477
9660
|
multiIndexContext: props.indexContextValue
|
|
9478
9661
|
}));
|
|
9479
9662
|
},
|
|
9480
9663
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9481
|
-
var nextValue = _defineProperty({}, getId$
|
|
9664
|
+
var nextValue = _defineProperty({}, getId$3(), nextRefinement);
|
|
9482
9665
|
|
|
9483
9666
|
var resetPage = true;
|
|
9484
9667
|
return refineValue(searchState, nextValue, {
|
|
@@ -9488,12 +9671,12 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9488
9671
|
}
|
|
9489
9672
|
});
|
|
9490
9673
|
|
|
9491
|
-
function getId$
|
|
9674
|
+
function getId$2() {
|
|
9492
9675
|
return 'sortBy';
|
|
9493
9676
|
}
|
|
9494
9677
|
|
|
9495
|
-
function getCurrentRefinement$
|
|
9496
|
-
var id = getId$
|
|
9678
|
+
function getCurrentRefinement$1(props, searchState, context) {
|
|
9679
|
+
var id = getId$2();
|
|
9497
9680
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
9498
9681
|
|
|
9499
9682
|
if (currentRefinement) {
|
|
@@ -9530,7 +9713,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9530
9713
|
transformItems: PropTypes.func
|
|
9531
9714
|
},
|
|
9532
9715
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
9533
|
-
var currentRefinement = getCurrentRefinement$
|
|
9716
|
+
var currentRefinement = getCurrentRefinement$1(props, searchState, {
|
|
9534
9717
|
ais: props.contextValue,
|
|
9535
9718
|
multiIndexContext: props.indexContextValue
|
|
9536
9719
|
});
|
|
@@ -9547,7 +9730,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9547
9730
|
};
|
|
9548
9731
|
},
|
|
9549
9732
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9550
|
-
var id = getId$
|
|
9733
|
+
var id = getId$2();
|
|
9551
9734
|
|
|
9552
9735
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9553
9736
|
|
|
@@ -9561,10 +9744,10 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9561
9744
|
return cleanUpValue(searchState, {
|
|
9562
9745
|
ais: props.contextValue,
|
|
9563
9746
|
multiIndexContext: props.indexContextValue
|
|
9564
|
-
}, getId$
|
|
9747
|
+
}, getId$2());
|
|
9565
9748
|
},
|
|
9566
9749
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9567
|
-
var selectedIndex = getCurrentRefinement$
|
|
9750
|
+
var selectedIndex = getCurrentRefinement$1(props, searchState, {
|
|
9568
9751
|
ais: props.contextValue,
|
|
9569
9752
|
multiIndexContext: props.indexContextValue
|
|
9570
9753
|
});
|
|
@@ -9572,7 +9755,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9572
9755
|
},
|
|
9573
9756
|
getMetadata: function getMetadata() {
|
|
9574
9757
|
return {
|
|
9575
|
-
id: getId$
|
|
9758
|
+
id: getId$2()
|
|
9576
9759
|
};
|
|
9577
9760
|
}
|
|
9578
9761
|
});
|
|
@@ -9608,15 +9791,15 @@ var connectStats = createConnectorWithContext({
|
|
|
9608
9791
|
}
|
|
9609
9792
|
});
|
|
9610
9793
|
|
|
9611
|
-
function getId$
|
|
9794
|
+
function getId$1(props) {
|
|
9612
9795
|
return props.attribute;
|
|
9613
9796
|
}
|
|
9614
9797
|
|
|
9615
|
-
var namespace
|
|
9798
|
+
var namespace = 'toggle';
|
|
9616
9799
|
var falsyStrings = ['0', 'false', 'null', 'undefined'];
|
|
9617
9800
|
|
|
9618
|
-
function getCurrentRefinement
|
|
9619
|
-
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);
|
|
9620
9803
|
|
|
9621
9804
|
if (falsyStrings.indexOf(currentRefinement) !== -1) {
|
|
9622
9805
|
return false;
|
|
@@ -9625,17 +9808,17 @@ function getCurrentRefinement$b(props, searchState, context) {
|
|
|
9625
9808
|
return Boolean(currentRefinement);
|
|
9626
9809
|
}
|
|
9627
9810
|
|
|
9628
|
-
function _refine$
|
|
9629
|
-
var id = getId$
|
|
9811
|
+
function _refine$1(props, searchState, nextRefinement, context) {
|
|
9812
|
+
var id = getId$1(props);
|
|
9630
9813
|
|
|
9631
9814
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : false);
|
|
9632
9815
|
|
|
9633
9816
|
var resetPage = true;
|
|
9634
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace
|
|
9817
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
9635
9818
|
}
|
|
9636
9819
|
|
|
9637
|
-
function _cleanUp$
|
|
9638
|
-
return cleanUpValue(searchState, context, "".concat(namespace
|
|
9820
|
+
function _cleanUp$1(props, searchState, context) {
|
|
9821
|
+
return cleanUpValue(searchState, context, "".concat(namespace, ".").concat(getId$1(props)));
|
|
9639
9822
|
}
|
|
9640
9823
|
/**
|
|
9641
9824
|
* connectToggleRefinement connector provides the logic to build a widget that will
|
|
@@ -9674,14 +9857,14 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9674
9857
|
ais: props.contextValue,
|
|
9675
9858
|
multiIndexContext: props.indexContextValue
|
|
9676
9859
|
});
|
|
9677
|
-
var currentRefinement = getCurrentRefinement
|
|
9860
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
9678
9861
|
ais: props.contextValue,
|
|
9679
9862
|
multiIndexContext: props.indexContextValue
|
|
9680
9863
|
});
|
|
9681
9864
|
var allFacetValues = results && results.getFacetByName(attribute) ? results.getFacetValues(attribute) : null;
|
|
9682
9865
|
var facetValue = // Use null to always be consistent with type of the value
|
|
9683
9866
|
// count: number | null
|
|
9684
|
-
allFacetValues && allFacetValues.length ? find(allFacetValues, function (item) {
|
|
9867
|
+
allFacetValues && allFacetValues.length ? find$2(allFacetValues, function (item) {
|
|
9685
9868
|
return item.name === value.toString();
|
|
9686
9869
|
}) : null;
|
|
9687
9870
|
var facetValueCount = facetValue && facetValue.count;
|
|
@@ -9702,13 +9885,13 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9702
9885
|
};
|
|
9703
9886
|
},
|
|
9704
9887
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9705
|
-
return _refine$
|
|
9888
|
+
return _refine$1(props, searchState, nextRefinement, {
|
|
9706
9889
|
ais: props.contextValue,
|
|
9707
9890
|
multiIndexContext: props.indexContextValue
|
|
9708
9891
|
});
|
|
9709
9892
|
},
|
|
9710
9893
|
cleanUp: function cleanUp(props, searchState) {
|
|
9711
|
-
return _cleanUp$
|
|
9894
|
+
return _cleanUp$1(props, searchState, {
|
|
9712
9895
|
ais: props.contextValue,
|
|
9713
9896
|
multiIndexContext: props.indexContextValue
|
|
9714
9897
|
});
|
|
@@ -9717,7 +9900,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9717
9900
|
var attribute = props.attribute,
|
|
9718
9901
|
value = props.value,
|
|
9719
9902
|
filter = props.filter;
|
|
9720
|
-
var checked = getCurrentRefinement
|
|
9903
|
+
var checked = getCurrentRefinement(props, searchState, {
|
|
9721
9904
|
ais: props.contextValue,
|
|
9722
9905
|
multiIndexContext: props.indexContextValue
|
|
9723
9906
|
});
|
|
@@ -9734,8 +9917,8 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9734
9917
|
return nextSearchParameters;
|
|
9735
9918
|
},
|
|
9736
9919
|
getMetadata: function getMetadata(props, searchState) {
|
|
9737
|
-
var id = getId$
|
|
9738
|
-
var checked = getCurrentRefinement
|
|
9920
|
+
var id = getId$1(props);
|
|
9921
|
+
var checked = getCurrentRefinement(props, searchState, {
|
|
9739
9922
|
ais: props.contextValue,
|
|
9740
9923
|
multiIndexContext: props.indexContextValue
|
|
9741
9924
|
});
|
|
@@ -9751,7 +9934,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9751
9934
|
currentRefinement: checked,
|
|
9752
9935
|
attribute: props.attribute,
|
|
9753
9936
|
value: function value(nextState) {
|
|
9754
|
-
return _refine$
|
|
9937
|
+
return _refine$1(props, nextState, false, {
|
|
9755
9938
|
ais: props.contextValue,
|
|
9756
9939
|
multiIndexContext: props.indexContextValue
|
|
9757
9940
|
});
|
|
@@ -9767,7 +9950,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9767
9950
|
}
|
|
9768
9951
|
});
|
|
9769
9952
|
|
|
9770
|
-
function getId
|
|
9953
|
+
function getId() {
|
|
9771
9954
|
return 'query';
|
|
9772
9955
|
}
|
|
9773
9956
|
|
|
@@ -9776,7 +9959,7 @@ function getAdditionalId() {
|
|
|
9776
9959
|
}
|
|
9777
9960
|
|
|
9778
9961
|
function getCurrentRefinementQuery(props, searchState, context) {
|
|
9779
|
-
var id = getId
|
|
9962
|
+
var id = getId();
|
|
9780
9963
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9781
9964
|
|
|
9782
9965
|
if (currentRefinement) {
|
|
@@ -9797,10 +9980,10 @@ function getCurrentRefinementAdditional(props, searchState, context) {
|
|
|
9797
9980
|
return {};
|
|
9798
9981
|
}
|
|
9799
9982
|
|
|
9800
|
-
function _refine
|
|
9983
|
+
function _refine(props, searchState, nextRefinement, context) {
|
|
9801
9984
|
var _nextValue;
|
|
9802
9985
|
|
|
9803
|
-
var id = getId
|
|
9986
|
+
var id = getId();
|
|
9804
9987
|
var voiceParams = getAdditionalId();
|
|
9805
9988
|
var queryLanguages = props.language ? {
|
|
9806
9989
|
queryLanguages: [props.language.split('-')[0]]
|
|
@@ -9817,8 +10000,8 @@ function _refine$9(props, searchState, nextRefinement, context) {
|
|
|
9817
10000
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9818
10001
|
}
|
|
9819
10002
|
|
|
9820
|
-
function _cleanUp
|
|
9821
|
-
var interimState = cleanUpValue(searchState, context, getId
|
|
10003
|
+
function _cleanUp(props, searchState, context) {
|
|
10004
|
+
var interimState = cleanUpValue(searchState, context, getId());
|
|
9822
10005
|
return cleanUpValue(interimState, context, getAdditionalId());
|
|
9823
10006
|
}
|
|
9824
10007
|
|
|
@@ -9837,13 +10020,13 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9837
10020
|
};
|
|
9838
10021
|
},
|
|
9839
10022
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9840
|
-
return _refine
|
|
10023
|
+
return _refine(props, searchState, nextRefinement, {
|
|
9841
10024
|
ais: props.contextValue,
|
|
9842
10025
|
multiIndexContext: props.indexContextValue
|
|
9843
10026
|
});
|
|
9844
10027
|
},
|
|
9845
10028
|
cleanUp: function cleanUp(props, searchState) {
|
|
9846
|
-
return _cleanUp
|
|
10029
|
+
return _cleanUp(props, searchState, {
|
|
9847
10030
|
ais: props.contextValue,
|
|
9848
10031
|
multiIndexContext: props.indexContextValue
|
|
9849
10032
|
});
|
|
@@ -9860,7 +10043,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9860
10043
|
return searchParameters.setQuery(query).setQueryParameters(additionalParams);
|
|
9861
10044
|
},
|
|
9862
10045
|
getMetadata: function getMetadata(props, searchState) {
|
|
9863
|
-
var id = getId
|
|
10046
|
+
var id = getId();
|
|
9864
10047
|
var currentRefinement = getCurrentRefinementQuery(props, searchState, {
|
|
9865
10048
|
ais: props.contextValue,
|
|
9866
10049
|
multiIndexContext: props.indexContextValue
|
|
@@ -9874,7 +10057,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9874
10057
|
items: currentRefinement === null ? [] : [{
|
|
9875
10058
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9876
10059
|
value: function value(nextState) {
|
|
9877
|
-
return _refine
|
|
10060
|
+
return _refine(props, nextState, '', {
|
|
9878
10061
|
ais: props.contextValue,
|
|
9879
10062
|
multiIndexContext: props.indexContextValue
|
|
9880
10063
|
});
|
|
@@ -9927,7 +10110,7 @@ function range(_ref) {
|
|
|
9927
10110
|
return (start + current) * limitStep;
|
|
9928
10111
|
});
|
|
9929
10112
|
}
|
|
9930
|
-
function find
|
|
10113
|
+
function find(array, comparator) {
|
|
9931
10114
|
if (!Array.isArray(array)) {
|
|
9932
10115
|
return undefined;
|
|
9933
10116
|
}
|
|
@@ -9941,11 +10124,11 @@ function find$2(array, comparator) {
|
|
|
9941
10124
|
return undefined;
|
|
9942
10125
|
}
|
|
9943
10126
|
|
|
9944
|
-
var cx = createClassNames('Panel');
|
|
10127
|
+
var cx$p = createClassNames('Panel');
|
|
9945
10128
|
|
|
9946
|
-
var _createContext
|
|
9947
|
-
PanelConsumer = _createContext
|
|
9948
|
-
PanelProvider = _createContext
|
|
10129
|
+
var _createContext = createContext(function setCanRefine() {}),
|
|
10130
|
+
PanelConsumer = _createContext.Consumer,
|
|
10131
|
+
PanelProvider = _createContext.Provider;
|
|
9949
10132
|
|
|
9950
10133
|
var Panel =
|
|
9951
10134
|
/*#__PURE__*/
|
|
@@ -9988,15 +10171,15 @@ function (_Component) {
|
|
|
9988
10171
|
footer = _this$props.footer;
|
|
9989
10172
|
var canRefine = this.state.canRefine;
|
|
9990
10173
|
return React__default.createElement("div", {
|
|
9991
|
-
className: classnames(cx('', !canRefine && '-noRefinement'), className)
|
|
10174
|
+
className: classnames(cx$p('', !canRefine && '-noRefinement'), className)
|
|
9992
10175
|
}, header && React__default.createElement("div", {
|
|
9993
|
-
className: cx('header')
|
|
10176
|
+
className: cx$p('header')
|
|
9994
10177
|
}, header), React__default.createElement("div", {
|
|
9995
|
-
className: cx('body')
|
|
10178
|
+
className: cx$p('body')
|
|
9996
10179
|
}, React__default.createElement(PanelProvider, {
|
|
9997
10180
|
value: this.setCanRefine
|
|
9998
10181
|
}, children)), footer && React__default.createElement("div", {
|
|
9999
|
-
className: cx('footer')
|
|
10182
|
+
className: cx$p('footer')
|
|
10000
10183
|
}, footer));
|
|
10001
10184
|
}
|
|
10002
10185
|
}]);
|
|
@@ -10119,8 +10302,8 @@ _defineProperty(Link, "propTypes", {
|
|
|
10119
10302
|
onClick: PropTypes.func.isRequired
|
|
10120
10303
|
});
|
|
10121
10304
|
|
|
10122
|
-
var cx$
|
|
10123
|
-
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
10305
|
+
var cx$o = createClassNames('Breadcrumb');
|
|
10306
|
+
var itemsPropType$2 = PropTypes.arrayOf(PropTypes.shape({
|
|
10124
10307
|
label: PropTypes.string.isRequired,
|
|
10125
10308
|
value: PropTypes.string.isRequired
|
|
10126
10309
|
}));
|
|
@@ -10149,9 +10332,9 @@ function (_Component) {
|
|
|
10149
10332
|
translate = _this$props.translate,
|
|
10150
10333
|
className = _this$props.className;
|
|
10151
10334
|
var rootPath = canRefine ? React__default.createElement("li", {
|
|
10152
|
-
className: cx$
|
|
10335
|
+
className: cx$o('item')
|
|
10153
10336
|
}, React__default.createElement(Link, {
|
|
10154
|
-
className: cx$
|
|
10337
|
+
className: cx$o('link'),
|
|
10155
10338
|
onClick: function onClick() {
|
|
10156
10339
|
return !rootURL ? refine() : null;
|
|
10157
10340
|
},
|
|
@@ -10160,12 +10343,12 @@ function (_Component) {
|
|
|
10160
10343
|
var breadcrumb = items.map(function (item, idx) {
|
|
10161
10344
|
var isLast = idx === items.length - 1;
|
|
10162
10345
|
return React__default.createElement("li", {
|
|
10163
|
-
className: cx$
|
|
10346
|
+
className: cx$o('item', isLast && 'item--selected'),
|
|
10164
10347
|
key: idx
|
|
10165
10348
|
}, React__default.createElement("span", {
|
|
10166
|
-
className: cx$
|
|
10349
|
+
className: cx$o('separator')
|
|
10167
10350
|
}, separator), !isLast ? React__default.createElement(Link, {
|
|
10168
|
-
className: cx$
|
|
10351
|
+
className: cx$o('link'),
|
|
10169
10352
|
onClick: function onClick() {
|
|
10170
10353
|
return refine(item.value);
|
|
10171
10354
|
},
|
|
@@ -10173,9 +10356,9 @@ function (_Component) {
|
|
|
10173
10356
|
}, item.label) : item.label);
|
|
10174
10357
|
});
|
|
10175
10358
|
return React__default.createElement("div", {
|
|
10176
|
-
className: classnames(cx$
|
|
10359
|
+
className: classnames(cx$o('', !canRefine && '-noRefinement'), className)
|
|
10177
10360
|
}, React__default.createElement("ul", {
|
|
10178
|
-
className: cx$
|
|
10361
|
+
className: cx$o('list')
|
|
10179
10362
|
}, rootPath, breadcrumb));
|
|
10180
10363
|
}
|
|
10181
10364
|
}]);
|
|
@@ -10186,7 +10369,7 @@ function (_Component) {
|
|
|
10186
10369
|
_defineProperty(Breadcrumb, "propTypes", {
|
|
10187
10370
|
canRefine: PropTypes.bool.isRequired,
|
|
10188
10371
|
createURL: PropTypes.func.isRequired,
|
|
10189
|
-
items: itemsPropType,
|
|
10372
|
+
items: itemsPropType$2,
|
|
10190
10373
|
refine: PropTypes.func.isRequired,
|
|
10191
10374
|
rootURL: PropTypes.string,
|
|
10192
10375
|
separator: PropTypes.node,
|
|
@@ -10298,7 +10481,7 @@ var BreadcrumbWidget = function BreadcrumbWidget(props) {
|
|
|
10298
10481
|
|
|
10299
10482
|
connectBreadcrumb(BreadcrumbWidget);
|
|
10300
10483
|
|
|
10301
|
-
var cx$
|
|
10484
|
+
var cx$n = createClassNames('ClearRefinements');
|
|
10302
10485
|
|
|
10303
10486
|
var ClearRefinements =
|
|
10304
10487
|
/*#__PURE__*/
|
|
@@ -10321,9 +10504,9 @@ function (_Component) {
|
|
|
10321
10504
|
translate = _this$props.translate,
|
|
10322
10505
|
className = _this$props.className;
|
|
10323
10506
|
return React__default.createElement("div", {
|
|
10324
|
-
className: classnames(cx$
|
|
10507
|
+
className: classnames(cx$n(''), className)
|
|
10325
10508
|
}, React__default.createElement("button", {
|
|
10326
|
-
className: cx$
|
|
10509
|
+
className: cx$n('button', !canRefine && 'button--disabled'),
|
|
10327
10510
|
onClick: function onClick() {
|
|
10328
10511
|
return refine(items);
|
|
10329
10512
|
},
|
|
@@ -10391,7 +10574,7 @@ var ClearRefinementsWidget = function ClearRefinementsWidget(props) {
|
|
|
10391
10574
|
|
|
10392
10575
|
connectCurrentRefinements(ClearRefinementsWidget);
|
|
10393
10576
|
|
|
10394
|
-
var cx$
|
|
10577
|
+
var cx$m = createClassNames('CurrentRefinements');
|
|
10395
10578
|
var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
10396
10579
|
var items = _ref.items,
|
|
10397
10580
|
canRefine = _ref.canRefine,
|
|
@@ -10399,31 +10582,31 @@ var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
|
10399
10582
|
translate = _ref.translate,
|
|
10400
10583
|
className = _ref.className;
|
|
10401
10584
|
return React__default.createElement("div", {
|
|
10402
|
-
className: classnames(cx$
|
|
10585
|
+
className: classnames(cx$m('', !canRefine && '-noRefinement'), className)
|
|
10403
10586
|
}, React__default.createElement("ul", {
|
|
10404
|
-
className: cx$
|
|
10587
|
+
className: cx$m('list', !canRefine && 'list--noRefinement')
|
|
10405
10588
|
}, items.map(function (item) {
|
|
10406
10589
|
return React__default.createElement("li", {
|
|
10407
10590
|
key: item.label,
|
|
10408
|
-
className: cx$
|
|
10591
|
+
className: cx$m('item')
|
|
10409
10592
|
}, React__default.createElement("span", {
|
|
10410
|
-
className: cx$
|
|
10593
|
+
className: cx$m('label')
|
|
10411
10594
|
}, item.label), item.items ? item.items.map(function (nest) {
|
|
10412
10595
|
return React__default.createElement("span", {
|
|
10413
10596
|
key: nest.label,
|
|
10414
|
-
className: cx$
|
|
10597
|
+
className: cx$m('category')
|
|
10415
10598
|
}, React__default.createElement("span", {
|
|
10416
|
-
className: cx$
|
|
10599
|
+
className: cx$m('categoryLabel')
|
|
10417
10600
|
}, nest.label), React__default.createElement("button", {
|
|
10418
|
-
className: cx$
|
|
10601
|
+
className: cx$m('delete'),
|
|
10419
10602
|
onClick: function onClick() {
|
|
10420
10603
|
return refine(nest.value);
|
|
10421
10604
|
}
|
|
10422
10605
|
}, translate('clearFilter', nest)));
|
|
10423
10606
|
}) : React__default.createElement("span", {
|
|
10424
|
-
className: cx$
|
|
10607
|
+
className: cx$m('category')
|
|
10425
10608
|
}, React__default.createElement("button", {
|
|
10426
|
-
className: cx$
|
|
10609
|
+
className: cx$m('delete'),
|
|
10427
10610
|
onClick: function onClick() {
|
|
10428
10611
|
return refine(item.value);
|
|
10429
10612
|
}
|
|
@@ -10499,14 +10682,14 @@ var CurrentRefinementsWidget = function CurrentRefinementsWidget(props) {
|
|
|
10499
10682
|
|
|
10500
10683
|
connectCurrentRefinements(CurrentRefinementsWidget);
|
|
10501
10684
|
|
|
10502
|
-
var cx$
|
|
10685
|
+
var cx$l = createClassNames('SearchBox');
|
|
10503
10686
|
var defaultLoadingIndicator = React__default.createElement("svg", {
|
|
10504
10687
|
width: "18",
|
|
10505
10688
|
height: "18",
|
|
10506
10689
|
viewBox: "0 0 38 38",
|
|
10507
10690
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10508
10691
|
stroke: "#444",
|
|
10509
|
-
className: cx$
|
|
10692
|
+
className: cx$l('loadingIcon')
|
|
10510
10693
|
}, React__default.createElement("g", {
|
|
10511
10694
|
fill: "none",
|
|
10512
10695
|
fillRule: "evenodd"
|
|
@@ -10529,7 +10712,7 @@ var defaultLoadingIndicator = React__default.createElement("svg", {
|
|
|
10529
10712
|
repeatCount: "indefinite"
|
|
10530
10713
|
})))));
|
|
10531
10714
|
var defaultReset = React__default.createElement("svg", {
|
|
10532
|
-
className: cx$
|
|
10715
|
+
className: cx$l('resetIcon'),
|
|
10533
10716
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10534
10717
|
viewBox: "0 0 20 20",
|
|
10535
10718
|
width: "10",
|
|
@@ -10538,7 +10721,7 @@ var defaultReset = React__default.createElement("svg", {
|
|
|
10538
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"
|
|
10539
10722
|
}));
|
|
10540
10723
|
var defaultSubmit = React__default.createElement("svg", {
|
|
10541
|
-
className: cx$
|
|
10724
|
+
className: cx$l('submitIcon'),
|
|
10542
10725
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10543
10726
|
width: "10",
|
|
10544
10727
|
height: "10",
|
|
@@ -10547,7 +10730,7 @@ var defaultSubmit = React__default.createElement("svg", {
|
|
|
10547
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"
|
|
10548
10731
|
}));
|
|
10549
10732
|
|
|
10550
|
-
var SearchBox =
|
|
10733
|
+
var SearchBox$1 =
|
|
10551
10734
|
/*#__PURE__*/
|
|
10552
10735
|
function (_Component) {
|
|
10553
10736
|
_inherits(SearchBox, _Component);
|
|
@@ -10710,12 +10893,12 @@ function (_Component) {
|
|
|
10710
10893
|
/* eslint-disable max-len */
|
|
10711
10894
|
|
|
10712
10895
|
return React__default.createElement("div", {
|
|
10713
|
-
className: classnames(cx$
|
|
10896
|
+
className: classnames(cx$l(''), className)
|
|
10714
10897
|
}, React__default.createElement("form", {
|
|
10715
10898
|
noValidate: true,
|
|
10716
10899
|
onSubmit: this.props.onSubmit ? this.props.onSubmit : this.onSubmit,
|
|
10717
10900
|
onReset: this.onReset,
|
|
10718
|
-
className: cx$
|
|
10901
|
+
className: cx$l('form', isSearchStalled && 'form--stalledSearch'),
|
|
10719
10902
|
action: "",
|
|
10720
10903
|
role: "search"
|
|
10721
10904
|
}, React__default.createElement("input", _extends({
|
|
@@ -10732,19 +10915,19 @@ function (_Component) {
|
|
|
10732
10915
|
value: query,
|
|
10733
10916
|
onChange: this.onChange
|
|
10734
10917
|
}, searchInputEvents, {
|
|
10735
|
-
className: cx$
|
|
10918
|
+
className: cx$l('input')
|
|
10736
10919
|
})), React__default.createElement("button", {
|
|
10737
10920
|
type: "submit",
|
|
10738
10921
|
title: translate('submitTitle'),
|
|
10739
|
-
className: cx$
|
|
10922
|
+
className: cx$l('submit')
|
|
10740
10923
|
}, submit), React__default.createElement("button", {
|
|
10741
10924
|
type: "reset",
|
|
10742
10925
|
title: translate('resetTitle'),
|
|
10743
|
-
className: cx$
|
|
10926
|
+
className: cx$l('reset'),
|
|
10744
10927
|
hidden: !query || isSearchStalled
|
|
10745
10928
|
}, reset), this.props.showLoadingIndicator && React__default.createElement("span", {
|
|
10746
10929
|
hidden: !isSearchStalled,
|
|
10747
|
-
className: cx$
|
|
10930
|
+
className: cx$l('loadingIndicator')
|
|
10748
10931
|
}, loadingIndicator)));
|
|
10749
10932
|
/* eslint-enable */
|
|
10750
10933
|
}
|
|
@@ -10753,7 +10936,7 @@ function (_Component) {
|
|
|
10753
10936
|
return SearchBox;
|
|
10754
10937
|
}(Component);
|
|
10755
10938
|
|
|
10756
|
-
_defineProperty(SearchBox, "propTypes", {
|
|
10939
|
+
_defineProperty(SearchBox$1, "propTypes", {
|
|
10757
10940
|
currentRefinement: PropTypes.string,
|
|
10758
10941
|
className: PropTypes.string,
|
|
10759
10942
|
refine: PropTypes.func.isRequired,
|
|
@@ -10774,7 +10957,7 @@ _defineProperty(SearchBox, "propTypes", {
|
|
|
10774
10957
|
})])
|
|
10775
10958
|
});
|
|
10776
10959
|
|
|
10777
|
-
_defineProperty(SearchBox, "defaultProps", {
|
|
10960
|
+
_defineProperty(SearchBox$1, "defaultProps", {
|
|
10778
10961
|
currentRefinement: '',
|
|
10779
10962
|
className: '',
|
|
10780
10963
|
focusShortcuts: ['s', '/'],
|
|
@@ -10787,11 +10970,11 @@ _defineProperty(SearchBox, "defaultProps", {
|
|
|
10787
10970
|
submit: defaultSubmit
|
|
10788
10971
|
});
|
|
10789
10972
|
|
|
10790
|
-
var SearchBox$
|
|
10973
|
+
var SearchBox$2 = translatable({
|
|
10791
10974
|
resetTitle: 'Clear the search query.',
|
|
10792
10975
|
submitTitle: 'Submit your search query.',
|
|
10793
10976
|
placeholder: 'Search here…'
|
|
10794
|
-
})(SearchBox);
|
|
10977
|
+
})(SearchBox$1);
|
|
10795
10978
|
|
|
10796
10979
|
var itemsPropType$1 = PropTypes.arrayOf(PropTypes.shape({
|
|
10797
10980
|
value: PropTypes.any,
|
|
@@ -10891,7 +11074,7 @@ function (_Component) {
|
|
|
10891
11074
|
}, translate('noResults')) : null;
|
|
10892
11075
|
return React__default.createElement("div", {
|
|
10893
11076
|
className: cx('searchBox')
|
|
10894
|
-
}, React__default.createElement(SearchBox$
|
|
11077
|
+
}, React__default.createElement(SearchBox$2, {
|
|
10895
11078
|
currentRefinement: this.state.query,
|
|
10896
11079
|
refine: function refine(value) {
|
|
10897
11080
|
_this2.setState({
|
|
@@ -10906,7 +11089,7 @@ function (_Component) {
|
|
|
10906
11089
|
e.preventDefault();
|
|
10907
11090
|
e.stopPropagation();
|
|
10908
11091
|
|
|
10909
|
-
if (isFromSearch) {
|
|
11092
|
+
if (isFromSearch && items.length > 0) {
|
|
10910
11093
|
selectItem(items[0], _this2.resetQuery);
|
|
10911
11094
|
}
|
|
10912
11095
|
}
|
|
@@ -10971,13 +11154,13 @@ _defineProperty(List, "defaultProps", {
|
|
|
10971
11154
|
isFromSearch: false
|
|
10972
11155
|
});
|
|
10973
11156
|
|
|
10974
|
-
var cx$
|
|
10975
|
-
var itemsPropType
|
|
11157
|
+
var cx$k = createClassNames('HierarchicalMenu');
|
|
11158
|
+
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
10976
11159
|
label: PropTypes.string.isRequired,
|
|
10977
11160
|
value: PropTypes.string,
|
|
10978
11161
|
count: PropTypes.number.isRequired,
|
|
10979
11162
|
items: function items() {
|
|
10980
|
-
return itemsPropType
|
|
11163
|
+
return itemsPropType.apply(void 0, arguments);
|
|
10981
11164
|
}
|
|
10982
11165
|
}));
|
|
10983
11166
|
|
|
@@ -11004,15 +11187,15 @@ function (_Component) {
|
|
|
11004
11187
|
createURL = _this$props.createURL,
|
|
11005
11188
|
refine = _this$props.refine;
|
|
11006
11189
|
return React__default.createElement(Link, {
|
|
11007
|
-
className: cx$
|
|
11190
|
+
className: cx$k('link'),
|
|
11008
11191
|
onClick: function onClick() {
|
|
11009
11192
|
return refine(item.value);
|
|
11010
11193
|
},
|
|
11011
11194
|
href: createURL(item.value)
|
|
11012
11195
|
}, React__default.createElement("span", {
|
|
11013
|
-
className: cx$
|
|
11196
|
+
className: cx$k('label')
|
|
11014
11197
|
}, item.label), ' ', React__default.createElement("span", {
|
|
11015
|
-
className: cx$
|
|
11198
|
+
className: cx$k('count')
|
|
11016
11199
|
}, item.count));
|
|
11017
11200
|
});
|
|
11018
11201
|
|
|
@@ -11032,7 +11215,7 @@ function (_Component) {
|
|
|
11032
11215
|
className = _this$props2.className;
|
|
11033
11216
|
return React__default.createElement(List, {
|
|
11034
11217
|
renderItem: this.renderItem,
|
|
11035
|
-
cx: cx$
|
|
11218
|
+
cx: cx$k,
|
|
11036
11219
|
translate: translate,
|
|
11037
11220
|
items: items,
|
|
11038
11221
|
showMore: showMore,
|
|
@@ -11052,7 +11235,7 @@ _defineProperty(HierarchicalMenu, "propTypes", {
|
|
|
11052
11235
|
refine: PropTypes.func.isRequired,
|
|
11053
11236
|
createURL: PropTypes.func.isRequired,
|
|
11054
11237
|
canRefine: PropTypes.bool.isRequired,
|
|
11055
|
-
items: itemsPropType
|
|
11238
|
+
items: itemsPropType,
|
|
11056
11239
|
showMore: PropTypes.bool,
|
|
11057
11240
|
className: PropTypes.string,
|
|
11058
11241
|
limit: PropTypes.number,
|
|
@@ -11166,7 +11349,7 @@ var HierarchicalMenuWidget = function HierarchicalMenuWidget(props) {
|
|
|
11166
11349
|
|
|
11167
11350
|
connectHierarchicalMenu(HierarchicalMenuWidget);
|
|
11168
11351
|
|
|
11169
|
-
var Highlight = function Highlight(_ref) {
|
|
11352
|
+
var Highlight$2 = function Highlight(_ref) {
|
|
11170
11353
|
var cx = _ref.cx,
|
|
11171
11354
|
value = _ref.value,
|
|
11172
11355
|
highlightedTagName = _ref.highlightedTagName,
|
|
@@ -11178,7 +11361,7 @@ var Highlight = function Highlight(_ref) {
|
|
|
11178
11361
|
className: cx(className)
|
|
11179
11362
|
}, value);
|
|
11180
11363
|
};
|
|
11181
|
-
Highlight.propTypes = {
|
|
11364
|
+
Highlight$2.propTypes = {
|
|
11182
11365
|
cx: PropTypes.func.isRequired,
|
|
11183
11366
|
value: PropTypes.string.isRequired,
|
|
11184
11367
|
isHighlighted: PropTypes.bool.isRequired,
|
|
@@ -11209,7 +11392,7 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11209
11392
|
return React__default.createElement("span", {
|
|
11210
11393
|
key: i
|
|
11211
11394
|
}, item.map(function (element, index) {
|
|
11212
|
-
return React__default.createElement(Highlight, {
|
|
11395
|
+
return React__default.createElement(Highlight$2, {
|
|
11213
11396
|
cx: cx,
|
|
11214
11397
|
key: index,
|
|
11215
11398
|
value: element.value,
|
|
@@ -11222,7 +11405,7 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11222
11405
|
}, separator));
|
|
11223
11406
|
}
|
|
11224
11407
|
|
|
11225
|
-
return React__default.createElement(Highlight, {
|
|
11408
|
+
return React__default.createElement(Highlight$2, {
|
|
11226
11409
|
cx: cx,
|
|
11227
11410
|
key: i,
|
|
11228
11411
|
value: item.value,
|
|
@@ -11251,12 +11434,12 @@ Highlighter.defaultProps = {
|
|
|
11251
11434
|
separator: ', '
|
|
11252
11435
|
};
|
|
11253
11436
|
|
|
11254
|
-
var cx$
|
|
11437
|
+
var cx$j = createClassNames('Highlight');
|
|
11255
11438
|
|
|
11256
11439
|
var Highlight$1 = function Highlight(props) {
|
|
11257
11440
|
return React__default.createElement(Highlighter, _extends({}, props, {
|
|
11258
11441
|
highlightProperty: "_highlightResult",
|
|
11259
|
-
cx: cx$
|
|
11442
|
+
cx: cx$j
|
|
11260
11443
|
}));
|
|
11261
11444
|
};
|
|
11262
11445
|
|
|
@@ -11301,9 +11484,9 @@ var Highlight$1 = function Highlight(props) {
|
|
|
11301
11484
|
* );
|
|
11302
11485
|
*/
|
|
11303
11486
|
|
|
11304
|
-
var Highlight
|
|
11487
|
+
var Highlight = connectHighlight(Highlight$1);
|
|
11305
11488
|
|
|
11306
|
-
var cx$
|
|
11489
|
+
var cx$i = createClassNames('Hits');
|
|
11307
11490
|
|
|
11308
11491
|
var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
11309
11492
|
return React__default.createElement("div", {
|
|
@@ -11316,19 +11499,19 @@ var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
|
11316
11499
|
}, JSON.stringify(props).slice(0, 100), "...");
|
|
11317
11500
|
};
|
|
11318
11501
|
|
|
11319
|
-
var Hits = function Hits(_ref) {
|
|
11502
|
+
var Hits$1 = function Hits(_ref) {
|
|
11320
11503
|
var hits = _ref.hits,
|
|
11321
11504
|
_ref$className = _ref.className,
|
|
11322
11505
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
11323
11506
|
_ref$hitComponent = _ref.hitComponent,
|
|
11324
11507
|
HitComponent = _ref$hitComponent === void 0 ? DefaultHitComponent : _ref$hitComponent;
|
|
11325
11508
|
return React__default.createElement("div", {
|
|
11326
|
-
className: classnames(cx$
|
|
11509
|
+
className: classnames(cx$i(''), className)
|
|
11327
11510
|
}, React__default.createElement("ul", {
|
|
11328
|
-
className: cx$
|
|
11511
|
+
className: cx$i('list')
|
|
11329
11512
|
}, hits.map(function (hit) {
|
|
11330
11513
|
return React__default.createElement("li", {
|
|
11331
|
-
className: cx$
|
|
11514
|
+
className: cx$i('item'),
|
|
11332
11515
|
key: hit.objectID
|
|
11333
11516
|
}, React__default.createElement(HitComponent, {
|
|
11334
11517
|
hit: hit
|
|
@@ -11339,7 +11522,7 @@ var Hits = function Hits(_ref) {
|
|
|
11339
11522
|
var HitPropTypes = PropTypes.shape({
|
|
11340
11523
|
objectID: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11341
11524
|
});
|
|
11342
|
-
Hits.propTypes = {
|
|
11525
|
+
Hits$1.propTypes = {
|
|
11343
11526
|
hits: PropTypes.arrayOf(HitPropTypes.isRequired).isRequired,
|
|
11344
11527
|
className: PropTypes.string,
|
|
11345
11528
|
hitComponent: PropTypes.func
|
|
@@ -11378,7 +11561,7 @@ Hits.propTypes = {
|
|
|
11378
11561
|
* );
|
|
11379
11562
|
*/
|
|
11380
11563
|
|
|
11381
|
-
var Hits
|
|
11564
|
+
var Hits = connectHits(Hits$1);
|
|
11382
11565
|
|
|
11383
11566
|
var Select =
|
|
11384
11567
|
/*#__PURE__*/
|
|
@@ -11442,7 +11625,7 @@ _defineProperty(Select, "propTypes", {
|
|
|
11442
11625
|
selectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11443
11626
|
});
|
|
11444
11627
|
|
|
11445
|
-
var cx$
|
|
11628
|
+
var cx$h = createClassNames('HitsPerPage');
|
|
11446
11629
|
|
|
11447
11630
|
var HitsPerPage =
|
|
11448
11631
|
/*#__PURE__*/
|
|
@@ -11464,12 +11647,12 @@ function (_Component) {
|
|
|
11464
11647
|
refine = _this$props.refine,
|
|
11465
11648
|
className = _this$props.className;
|
|
11466
11649
|
return React__default.createElement("div", {
|
|
11467
|
-
className: classnames(cx$
|
|
11650
|
+
className: classnames(cx$h(''), className)
|
|
11468
11651
|
}, React__default.createElement(Select, {
|
|
11469
11652
|
onSelect: refine,
|
|
11470
11653
|
selectedItem: currentRefinement,
|
|
11471
11654
|
items: items,
|
|
11472
|
-
cx: cx$
|
|
11655
|
+
cx: cx$h
|
|
11473
11656
|
}));
|
|
11474
11657
|
}
|
|
11475
11658
|
}]);
|
|
@@ -11535,7 +11718,7 @@ _defineProperty(HitsPerPage, "defaultProps", {
|
|
|
11535
11718
|
|
|
11536
11719
|
connectHitsPerPage(HitsPerPage);
|
|
11537
11720
|
|
|
11538
|
-
var cx$
|
|
11721
|
+
var cx$g = createClassNames('InfiniteHits');
|
|
11539
11722
|
|
|
11540
11723
|
var InfiniteHits =
|
|
11541
11724
|
/*#__PURE__*/
|
|
@@ -11562,24 +11745,24 @@ function (_Component) {
|
|
|
11562
11745
|
translate = _this$props.translate,
|
|
11563
11746
|
className = _this$props.className;
|
|
11564
11747
|
return React__default.createElement("div", {
|
|
11565
|
-
className: classnames(cx$
|
|
11748
|
+
className: classnames(cx$g(''), className)
|
|
11566
11749
|
}, showPrevious && React__default.createElement("button", {
|
|
11567
|
-
className: cx$
|
|
11750
|
+
className: cx$g('loadPrevious', !hasPrevious && 'loadPrevious--disabled'),
|
|
11568
11751
|
onClick: function onClick() {
|
|
11569
11752
|
return refinePrevious();
|
|
11570
11753
|
},
|
|
11571
11754
|
disabled: !hasPrevious
|
|
11572
11755
|
}, translate('loadPrevious')), React__default.createElement("ul", {
|
|
11573
|
-
className: cx$
|
|
11756
|
+
className: cx$g('list')
|
|
11574
11757
|
}, hits.map(function (hit) {
|
|
11575
11758
|
return React__default.createElement("li", {
|
|
11576
11759
|
key: hit.objectID,
|
|
11577
|
-
className: cx$
|
|
11760
|
+
className: cx$g('item')
|
|
11578
11761
|
}, React__default.createElement(HitComponent, {
|
|
11579
11762
|
hit: hit
|
|
11580
11763
|
}));
|
|
11581
11764
|
})), React__default.createElement("button", {
|
|
11582
|
-
className: cx$
|
|
11765
|
+
className: cx$g('loadMore', !hasMore && 'loadMore--disabled'),
|
|
11583
11766
|
onClick: function onClick() {
|
|
11584
11767
|
return refineNext();
|
|
11585
11768
|
},
|
|
@@ -11660,7 +11843,7 @@ var InfiniteHits$1 = translatable({
|
|
|
11660
11843
|
|
|
11661
11844
|
connectInfiniteHits(InfiniteHits$1);
|
|
11662
11845
|
|
|
11663
|
-
var cx$
|
|
11846
|
+
var cx$f = createClassNames('Menu');
|
|
11664
11847
|
|
|
11665
11848
|
var Menu =
|
|
11666
11849
|
/*#__PURE__*/
|
|
@@ -11682,20 +11865,20 @@ function (_Component) {
|
|
|
11682
11865
|
|
|
11683
11866
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
11684
11867
|
var createURL = _this.props.createURL;
|
|
11685
|
-
var label = _this.props.isFromSearch ? React__default.createElement(Highlight
|
|
11868
|
+
var label = _this.props.isFromSearch ? React__default.createElement(Highlight, {
|
|
11686
11869
|
attribute: "label",
|
|
11687
11870
|
hit: item
|
|
11688
11871
|
}) : item.label;
|
|
11689
11872
|
return React__default.createElement(Link, {
|
|
11690
|
-
className: cx$
|
|
11873
|
+
className: cx$f('link'),
|
|
11691
11874
|
onClick: function onClick() {
|
|
11692
11875
|
return _this.selectItem(item, resetQuery);
|
|
11693
11876
|
},
|
|
11694
11877
|
href: createURL(item.value)
|
|
11695
11878
|
}, React__default.createElement("span", {
|
|
11696
|
-
className: cx$
|
|
11879
|
+
className: cx$f('label')
|
|
11697
11880
|
}, label), ' ', React__default.createElement("span", {
|
|
11698
|
-
className: cx$
|
|
11881
|
+
className: cx$f('count')
|
|
11699
11882
|
}, item.count));
|
|
11700
11883
|
});
|
|
11701
11884
|
|
|
@@ -11725,7 +11908,7 @@ function (_Component) {
|
|
|
11725
11908
|
return React__default.createElement(List, {
|
|
11726
11909
|
renderItem: this.renderItem,
|
|
11727
11910
|
selectItem: this.selectItem,
|
|
11728
|
-
cx: cx$
|
|
11911
|
+
cx: cx$f,
|
|
11729
11912
|
translate: translate,
|
|
11730
11913
|
items: items,
|
|
11731
11914
|
showMore: showMore,
|
|
@@ -11835,7 +12018,7 @@ var MenuWidget = function MenuWidget(props) {
|
|
|
11835
12018
|
|
|
11836
12019
|
connectMenu(MenuWidget);
|
|
11837
12020
|
|
|
11838
|
-
var cx$
|
|
12021
|
+
var cx$e = createClassNames('MenuSelect');
|
|
11839
12022
|
|
|
11840
12023
|
var MenuSelect =
|
|
11841
12024
|
/*#__PURE__*/
|
|
@@ -11873,26 +12056,26 @@ function (_Component) {
|
|
|
11873
12056
|
translate = _this$props.translate,
|
|
11874
12057
|
className = _this$props.className;
|
|
11875
12058
|
return React__default.createElement("div", {
|
|
11876
|
-
className: classnames(cx$
|
|
12059
|
+
className: classnames(cx$e('', !canRefine && '-noRefinement'), className)
|
|
11877
12060
|
}, React__default.createElement("select", {
|
|
11878
12061
|
value: this.selectedValue,
|
|
11879
12062
|
onChange: this.handleSelectChange,
|
|
11880
|
-
className: cx$
|
|
12063
|
+
className: cx$e('select')
|
|
11881
12064
|
}, React__default.createElement("option", {
|
|
11882
12065
|
value: "ais__see__all__option",
|
|
11883
|
-
className: cx$
|
|
12066
|
+
className: cx$e('option')
|
|
11884
12067
|
}, translate('seeAllOption')), items.map(function (item) {
|
|
11885
12068
|
return React__default.createElement("option", {
|
|
11886
12069
|
key: item.value,
|
|
11887
12070
|
value: item.value,
|
|
11888
|
-
className: cx$
|
|
12071
|
+
className: cx$e('option')
|
|
11889
12072
|
}, item.label, " (", item.count, ")");
|
|
11890
12073
|
})));
|
|
11891
12074
|
}
|
|
11892
12075
|
}, {
|
|
11893
12076
|
key: "selectedValue",
|
|
11894
12077
|
get: function get() {
|
|
11895
|
-
var _ref2 = find
|
|
12078
|
+
var _ref2 = find(this.props.items, function (item) {
|
|
11896
12079
|
return item.isRefined === true;
|
|
11897
12080
|
}) || {
|
|
11898
12081
|
value: 'ais__see__all__option'
|
|
@@ -11969,7 +12152,7 @@ var MenuSelectWidget = function MenuSelectWidget(props) {
|
|
|
11969
12152
|
|
|
11970
12153
|
connectMenu(MenuSelectWidget);
|
|
11971
12154
|
|
|
11972
|
-
var cx$
|
|
12155
|
+
var cx$d = createClassNames('NumericMenu');
|
|
11973
12156
|
|
|
11974
12157
|
var NumericMenu =
|
|
11975
12158
|
/*#__PURE__*/
|
|
@@ -11994,9 +12177,9 @@ function (_Component) {
|
|
|
11994
12177
|
refine = _this$props.refine,
|
|
11995
12178
|
translate = _this$props.translate;
|
|
11996
12179
|
return React__default.createElement("label", {
|
|
11997
|
-
className: cx$
|
|
12180
|
+
className: cx$d('label')
|
|
11998
12181
|
}, React__default.createElement("input", {
|
|
11999
|
-
className: cx$
|
|
12182
|
+
className: cx$d('radio'),
|
|
12000
12183
|
type: "radio",
|
|
12001
12184
|
checked: item.isRefined,
|
|
12002
12185
|
disabled: item.noRefinement,
|
|
@@ -12004,7 +12187,7 @@ function (_Component) {
|
|
|
12004
12187
|
return refine(item.value);
|
|
12005
12188
|
}
|
|
12006
12189
|
}), React__default.createElement("span", {
|
|
12007
|
-
className: cx$
|
|
12190
|
+
className: cx$d('labelText')
|
|
12008
12191
|
}, item.value === '' ? translate('all') : item.label));
|
|
12009
12192
|
});
|
|
12010
12193
|
|
|
@@ -12022,7 +12205,7 @@ function (_Component) {
|
|
|
12022
12205
|
renderItem: this.renderItem,
|
|
12023
12206
|
showMore: false,
|
|
12024
12207
|
canRefine: canRefine,
|
|
12025
|
-
cx: cx$
|
|
12208
|
+
cx: cx$d,
|
|
12026
12209
|
items: items.map(function (item) {
|
|
12027
12210
|
return _objectSpread({}, item, {
|
|
12028
12211
|
key: item.value
|
|
@@ -12167,7 +12350,7 @@ _defineProperty(LinkList, "propTypes", {
|
|
|
12167
12350
|
canRefine: PropTypes.bool.isRequired
|
|
12168
12351
|
});
|
|
12169
12352
|
|
|
12170
|
-
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)
|
|
12171
12354
|
|
|
12172
12355
|
function calculateSize(padding, maxPages) {
|
|
12173
12356
|
return Math.min(2 * padding + 1, maxPages);
|
|
@@ -12203,7 +12386,7 @@ function getPages(currentPage, maxPages, padding) {
|
|
|
12203
12386
|
});
|
|
12204
12387
|
}
|
|
12205
12388
|
|
|
12206
|
-
var Pagination =
|
|
12389
|
+
var Pagination$1 =
|
|
12207
12390
|
/*#__PURE__*/
|
|
12208
12391
|
function (_Component) {
|
|
12209
12392
|
_inherits(Pagination, _Component);
|
|
@@ -12310,9 +12493,9 @@ function (_Component) {
|
|
|
12310
12493
|
}
|
|
12311
12494
|
|
|
12312
12495
|
return React__default.createElement("div", {
|
|
12313
|
-
className: classnames(cx$
|
|
12496
|
+
className: classnames(cx$c('', !canRefine && '-noRefinement'), className)
|
|
12314
12497
|
}, React__default.createElement(ListComponent, _extends({}, otherProps, {
|
|
12315
|
-
cx: cx$
|
|
12498
|
+
cx: cx$c,
|
|
12316
12499
|
items: items,
|
|
12317
12500
|
onSelect: refine,
|
|
12318
12501
|
createURL: createURL,
|
|
@@ -12324,7 +12507,7 @@ function (_Component) {
|
|
|
12324
12507
|
return Pagination;
|
|
12325
12508
|
}(Component);
|
|
12326
12509
|
|
|
12327
|
-
_defineProperty(Pagination, "propTypes", {
|
|
12510
|
+
_defineProperty(Pagination$1, "propTypes", {
|
|
12328
12511
|
nbPages: PropTypes.number.isRequired,
|
|
12329
12512
|
currentRefinement: PropTypes.number.isRequired,
|
|
12330
12513
|
refine: PropTypes.func.isRequired,
|
|
@@ -12341,7 +12524,7 @@ _defineProperty(Pagination, "propTypes", {
|
|
|
12341
12524
|
className: PropTypes.string
|
|
12342
12525
|
});
|
|
12343
12526
|
|
|
12344
|
-
_defineProperty(Pagination, "defaultProps", {
|
|
12527
|
+
_defineProperty(Pagination$1, "defaultProps", {
|
|
12345
12528
|
listComponent: LinkList,
|
|
12346
12529
|
showFirst: true,
|
|
12347
12530
|
showPrevious: true,
|
|
@@ -12352,7 +12535,7 @@ _defineProperty(Pagination, "defaultProps", {
|
|
|
12352
12535
|
className: ''
|
|
12353
12536
|
});
|
|
12354
12537
|
|
|
12355
|
-
var Pagination$
|
|
12538
|
+
var Pagination$2 = translatable({
|
|
12356
12539
|
previous: '‹',
|
|
12357
12540
|
next: '›',
|
|
12358
12541
|
first: '«',
|
|
@@ -12367,7 +12550,7 @@ var Pagination$1 = translatable({
|
|
|
12367
12550
|
ariaPage: function ariaPage(currentRefinement) {
|
|
12368
12551
|
return "Page ".concat(currentRefinement.toString());
|
|
12369
12552
|
}
|
|
12370
|
-
})(Pagination);
|
|
12553
|
+
})(Pagination$1);
|
|
12371
12554
|
|
|
12372
12555
|
/**
|
|
12373
12556
|
* The Pagination widget displays a simple pagination system allowing the user to
|
|
@@ -12424,12 +12607,12 @@ var Pagination$1 = translatable({
|
|
|
12424
12607
|
*/
|
|
12425
12608
|
|
|
12426
12609
|
var PaginationWidget = function PaginationWidget(props) {
|
|
12427
|
-
return React__default.createElement(PanelWrapper, props, React__default.createElement(Pagination$
|
|
12610
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(Pagination$2, props));
|
|
12428
12611
|
};
|
|
12429
12612
|
|
|
12430
|
-
var Pagination
|
|
12613
|
+
var Pagination = connectPagination(PaginationWidget);
|
|
12431
12614
|
|
|
12432
|
-
var cx$
|
|
12615
|
+
var cx$b = createClassNames('PoweredBy');
|
|
12433
12616
|
/* eslint-disable max-len */
|
|
12434
12617
|
|
|
12435
12618
|
var AlgoliaLogo = function AlgoliaLogo() {
|
|
@@ -12439,7 +12622,7 @@ var AlgoliaLogo = function AlgoliaLogo() {
|
|
|
12439
12622
|
viewBox: "0 0 1366 362",
|
|
12440
12623
|
width: "100",
|
|
12441
12624
|
height: "27",
|
|
12442
|
-
className: cx$
|
|
12625
|
+
className: cx$b('logo')
|
|
12443
12626
|
}, React__default.createElement("linearGradient", {
|
|
12444
12627
|
id: "g",
|
|
12445
12628
|
x1: "428.258",
|
|
@@ -12487,13 +12670,13 @@ function (_Component) {
|
|
|
12487
12670
|
translate = _this$props.translate,
|
|
12488
12671
|
className = _this$props.className;
|
|
12489
12672
|
return React__default.createElement("div", {
|
|
12490
|
-
className: classnames(cx$
|
|
12673
|
+
className: classnames(cx$b(''), className)
|
|
12491
12674
|
}, React__default.createElement("span", {
|
|
12492
|
-
className: cx$
|
|
12675
|
+
className: cx$b('text')
|
|
12493
12676
|
}, translate('searchBy')), ' ', React__default.createElement("a", {
|
|
12494
12677
|
href: url,
|
|
12495
12678
|
target: "_blank",
|
|
12496
|
-
className: cx$
|
|
12679
|
+
className: cx$b('link'),
|
|
12497
12680
|
"aria-label": "Algolia",
|
|
12498
12681
|
rel: "noopener noreferrer"
|
|
12499
12682
|
}, React__default.createElement(AlgoliaLogo, null)));
|
|
@@ -12546,7 +12729,7 @@ var PoweredBy$1 = translatable({
|
|
|
12546
12729
|
|
|
12547
12730
|
connectPoweredBy(PoweredBy$1);
|
|
12548
12731
|
|
|
12549
|
-
var cx$
|
|
12732
|
+
var cx$a = createClassNames('RangeInput');
|
|
12550
12733
|
var RawRangeInput =
|
|
12551
12734
|
/*#__PURE__*/
|
|
12552
12735
|
function (_Component) {
|
|
@@ -12626,12 +12809,12 @@ function (_Component) {
|
|
|
12626
12809
|
|
|
12627
12810
|
var step = 1 / Math.pow(10, precision);
|
|
12628
12811
|
return React__default.createElement("div", {
|
|
12629
|
-
className: classnames(cx$
|
|
12812
|
+
className: classnames(cx$a('', !canRefine && '-noRefinement'), className)
|
|
12630
12813
|
}, React__default.createElement("form", {
|
|
12631
|
-
className: cx$
|
|
12814
|
+
className: cx$a('form'),
|
|
12632
12815
|
onSubmit: this.onSubmit
|
|
12633
12816
|
}, React__default.createElement("input", {
|
|
12634
|
-
className: cx$
|
|
12817
|
+
className: cx$a('input', 'input--min'),
|
|
12635
12818
|
type: "number",
|
|
12636
12819
|
min: min,
|
|
12637
12820
|
max: max,
|
|
@@ -12645,9 +12828,9 @@ function (_Component) {
|
|
|
12645
12828
|
});
|
|
12646
12829
|
}
|
|
12647
12830
|
}), React__default.createElement("span", {
|
|
12648
|
-
className: cx$
|
|
12831
|
+
className: cx$a('separator')
|
|
12649
12832
|
}, translate('separator')), React__default.createElement("input", {
|
|
12650
|
-
className: cx$
|
|
12833
|
+
className: cx$a('input', 'input--max'),
|
|
12651
12834
|
type: "number",
|
|
12652
12835
|
min: min,
|
|
12653
12836
|
max: max,
|
|
@@ -12661,7 +12844,7 @@ function (_Component) {
|
|
|
12661
12844
|
});
|
|
12662
12845
|
}
|
|
12663
12846
|
}), React__default.createElement("button", {
|
|
12664
|
-
className: cx$
|
|
12847
|
+
className: cx$a('submit'),
|
|
12665
12848
|
type: "submit"
|
|
12666
12849
|
}, translate('submit'))));
|
|
12667
12850
|
}
|
|
@@ -12742,7 +12925,7 @@ var RangeInputWidget = function RangeInputWidget(props) {
|
|
|
12742
12925
|
|
|
12743
12926
|
connectRange(RangeInputWidget);
|
|
12744
12927
|
|
|
12745
|
-
var cx$
|
|
12928
|
+
var cx$9 = createClassNames('RatingMenu');
|
|
12746
12929
|
|
|
12747
12930
|
var RatingMenu =
|
|
12748
12931
|
/*#__PURE__*/
|
|
@@ -12795,12 +12978,12 @@ function (_Component) {
|
|
|
12795
12978
|
|
|
12796
12979
|
icons.push([React__default.createElement("svg", {
|
|
12797
12980
|
key: icon,
|
|
12798
|
-
className: cx$
|
|
12981
|
+
className: cx$9('starIcon', icon >= lowerBound ? 'starIcon--empty' : 'starIcon--full'),
|
|
12799
12982
|
"aria-hidden": "true",
|
|
12800
12983
|
width: "24",
|
|
12801
12984
|
height: "24"
|
|
12802
12985
|
}, React__default.createElement("use", {
|
|
12803
|
-
xlinkHref: "#".concat(cx$
|
|
12986
|
+
xlinkHref: "#".concat(cx$9(icon >= lowerBound ? 'starEmptySymbol' : 'starSymbol'))
|
|
12804
12987
|
})), ' ']);
|
|
12805
12988
|
} // The last item of the list (the default item), should not
|
|
12806
12989
|
// be clickable if it is selected.
|
|
@@ -12816,15 +12999,15 @@ function (_Component) {
|
|
|
12816
12999
|
};
|
|
12817
13000
|
return React__default.createElement("li", {
|
|
12818
13001
|
key: lowerBound,
|
|
12819
|
-
className: cx$
|
|
13002
|
+
className: cx$9('item', selected && 'item--selected', disabled && 'item--disabled')
|
|
12820
13003
|
}, React__default.createElement("a", _extends({
|
|
12821
|
-
className: cx$
|
|
13004
|
+
className: cx$9('link'),
|
|
12822
13005
|
"aria-label": "".concat(rating).concat(translate('ratingLabel'))
|
|
12823
13006
|
}, onClickHandler), icons, React__default.createElement("span", {
|
|
12824
|
-
className: cx$
|
|
13007
|
+
className: cx$9('label'),
|
|
12825
13008
|
"aria-hidden": "true"
|
|
12826
13009
|
}, translate('ratingLabel')), ' ', React__default.createElement("span", {
|
|
12827
|
-
className: cx$
|
|
13010
|
+
className: cx$9('count')
|
|
12828
13011
|
}, count)));
|
|
12829
13012
|
}
|
|
12830
13013
|
}, {
|
|
@@ -12856,7 +13039,7 @@ function (_Component) {
|
|
|
12856
13039
|
start: 0,
|
|
12857
13040
|
end: Math.max(inclusiveLength, 0)
|
|
12858
13041
|
}).map(function (index) {
|
|
12859
|
-
var element = find
|
|
13042
|
+
var element = find(values, function (item) {
|
|
12860
13043
|
return item.value === limitMax - index;
|
|
12861
13044
|
});
|
|
12862
13045
|
var placeholder = {
|
|
@@ -12880,24 +13063,24 @@ function (_Component) {
|
|
|
12880
13063
|
});
|
|
12881
13064
|
});
|
|
12882
13065
|
return React__default.createElement("div", {
|
|
12883
|
-
className: classnames(cx$
|
|
13066
|
+
className: classnames(cx$9('', !canRefine && '-noRefinement'), className)
|
|
12884
13067
|
}, React__default.createElement("svg", {
|
|
12885
13068
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12886
13069
|
style: {
|
|
12887
13070
|
display: 'none'
|
|
12888
13071
|
}
|
|
12889
13072
|
}, React__default.createElement("symbol", {
|
|
12890
|
-
id: cx$
|
|
13073
|
+
id: cx$9('starSymbol'),
|
|
12891
13074
|
viewBox: "0 0 24 24"
|
|
12892
13075
|
}, React__default.createElement("path", {
|
|
12893
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"
|
|
12894
13077
|
})), React__default.createElement("symbol", {
|
|
12895
|
-
id: cx$
|
|
13078
|
+
id: cx$9('starEmptySymbol'),
|
|
12896
13079
|
viewBox: "0 0 24 24"
|
|
12897
13080
|
}, React__default.createElement("path", {
|
|
12898
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"
|
|
12899
13082
|
}))), React__default.createElement("ul", {
|
|
12900
|
-
className: cx$
|
|
13083
|
+
className: cx$9('list', !canRefine && 'list--noRefinement')
|
|
12901
13084
|
}, items));
|
|
12902
13085
|
}
|
|
12903
13086
|
}]);
|
|
@@ -12985,7 +13168,7 @@ var RatingMenuWidget = function RatingMenuWidget(props) {
|
|
|
12985
13168
|
|
|
12986
13169
|
connectRange(RatingMenuWidget);
|
|
12987
13170
|
|
|
12988
|
-
var cx$
|
|
13171
|
+
var cx$8 = createClassNames('RefinementList');
|
|
12989
13172
|
|
|
12990
13173
|
var RefinementList$1 =
|
|
12991
13174
|
/*#__PURE__*/
|
|
@@ -13016,23 +13199,23 @@ function (_Component) {
|
|
|
13016
13199
|
});
|
|
13017
13200
|
|
|
13018
13201
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
13019
|
-
var label = _this.props.isFromSearch ? React__default.createElement(Highlight
|
|
13202
|
+
var label = _this.props.isFromSearch ? React__default.createElement(Highlight, {
|
|
13020
13203
|
attribute: "label",
|
|
13021
13204
|
hit: item
|
|
13022
13205
|
}) : item.label;
|
|
13023
13206
|
return React__default.createElement("label", {
|
|
13024
|
-
className: cx$
|
|
13207
|
+
className: cx$8('label')
|
|
13025
13208
|
}, React__default.createElement("input", {
|
|
13026
|
-
className: cx$
|
|
13209
|
+
className: cx$8('checkbox'),
|
|
13027
13210
|
type: "checkbox",
|
|
13028
13211
|
checked: item.isRefined,
|
|
13029
13212
|
onChange: function onChange() {
|
|
13030
13213
|
return _this.selectItem(item, resetQuery);
|
|
13031
13214
|
}
|
|
13032
13215
|
}), React__default.createElement("span", {
|
|
13033
|
-
className: cx$
|
|
13216
|
+
className: cx$8('labelText')
|
|
13034
13217
|
}, label), ' ', React__default.createElement("span", {
|
|
13035
|
-
className: cx$
|
|
13218
|
+
className: cx$8('count')
|
|
13036
13219
|
}, item.count.toLocaleString()));
|
|
13037
13220
|
});
|
|
13038
13221
|
|
|
@@ -13056,7 +13239,7 @@ function (_Component) {
|
|
|
13056
13239
|
return React__default.createElement(List, {
|
|
13057
13240
|
renderItem: this.renderItem,
|
|
13058
13241
|
selectItem: this.selectItem,
|
|
13059
|
-
cx: cx$
|
|
13242
|
+
cx: cx$8,
|
|
13060
13243
|
translate: translate,
|
|
13061
13244
|
items: items,
|
|
13062
13245
|
showMore: showMore,
|
|
@@ -13168,9 +13351,9 @@ var RefinementListWidget = function RefinementListWidget(props) {
|
|
|
13168
13351
|
return React__default.createElement(PanelWrapper, props, React__default.createElement(RefinementList$2, props));
|
|
13169
13352
|
};
|
|
13170
13353
|
|
|
13171
|
-
var RefinementList
|
|
13354
|
+
var RefinementList = connectRefinementList(RefinementListWidget);
|
|
13172
13355
|
|
|
13173
|
-
var cx$
|
|
13356
|
+
var cx$7 = createClassNames('ScrollTo');
|
|
13174
13357
|
|
|
13175
13358
|
var ScrollTo =
|
|
13176
13359
|
/*#__PURE__*/
|
|
@@ -13203,7 +13386,7 @@ function (_Component) {
|
|
|
13203
13386
|
ref: function ref(_ref) {
|
|
13204
13387
|
return _this.el = _ref;
|
|
13205
13388
|
},
|
|
13206
|
-
className: cx$
|
|
13389
|
+
className: cx$7('')
|
|
13207
13390
|
}, this.props.children);
|
|
13208
13391
|
}
|
|
13209
13392
|
}]);
|
|
@@ -13297,14 +13480,14 @@ connectScrollTo(ScrollTo);
|
|
|
13297
13480
|
* );
|
|
13298
13481
|
*/
|
|
13299
13482
|
|
|
13300
|
-
var SearchBox
|
|
13483
|
+
var SearchBox = connectSearchBox(SearchBox$2);
|
|
13301
13484
|
|
|
13302
|
-
var cx$
|
|
13485
|
+
var cx$6 = createClassNames('Snippet');
|
|
13303
13486
|
|
|
13304
13487
|
var Snippet = function Snippet(props) {
|
|
13305
13488
|
return React__default.createElement(Highlighter, _extends({}, props, {
|
|
13306
13489
|
highlightProperty: "_snippetResult",
|
|
13307
|
-
cx: cx$
|
|
13490
|
+
cx: cx$6
|
|
13308
13491
|
}));
|
|
13309
13492
|
};
|
|
13310
13493
|
|
|
@@ -13354,7 +13537,7 @@ var Snippet = function Snippet(props) {
|
|
|
13354
13537
|
|
|
13355
13538
|
connectHighlight(Snippet);
|
|
13356
13539
|
|
|
13357
|
-
var cx$
|
|
13540
|
+
var cx$5 = createClassNames('RelevantSort');
|
|
13358
13541
|
|
|
13359
13542
|
var DefaultButtonTextComponent = function DefaultButtonTextComponent(_ref) {
|
|
13360
13543
|
var isRelevantSorted = _ref.isRelevantSorted;
|
|
@@ -13371,13 +13554,13 @@ var RelevantSort = function RelevantSort(_ref2) {
|
|
|
13371
13554
|
TextComponent = _ref2.textComponent,
|
|
13372
13555
|
refine = _ref2.refine;
|
|
13373
13556
|
return !isVirtualReplica ? null : React__default.createElement("div", {
|
|
13374
|
-
className: classnames(cx$
|
|
13557
|
+
className: classnames(cx$5(''), className)
|
|
13375
13558
|
}, React__default.createElement("div", {
|
|
13376
|
-
className: cx$
|
|
13559
|
+
className: cx$5('text')
|
|
13377
13560
|
}, TextComponent && React__default.createElement(TextComponent, {
|
|
13378
13561
|
isRelevantSorted: isRelevantSorted
|
|
13379
13562
|
})), React__default.createElement("button", {
|
|
13380
|
-
className: cx$
|
|
13563
|
+
className: cx$5('button'),
|
|
13381
13564
|
onClick: function onClick() {
|
|
13382
13565
|
return refine(isRelevantSorted ? 0 : undefined);
|
|
13383
13566
|
}
|
|
@@ -13397,7 +13580,7 @@ RelevantSort.propTypes = {
|
|
|
13397
13580
|
|
|
13398
13581
|
connectRelevantSort(RelevantSort);
|
|
13399
13582
|
|
|
13400
|
-
var cx$
|
|
13583
|
+
var cx$4 = createClassNames('SortBy');
|
|
13401
13584
|
|
|
13402
13585
|
var SortBy =
|
|
13403
13586
|
/*#__PURE__*/
|
|
@@ -13419,9 +13602,9 @@ function (_Component) {
|
|
|
13419
13602
|
refine = _this$props.refine,
|
|
13420
13603
|
className = _this$props.className;
|
|
13421
13604
|
return React__default.createElement("div", {
|
|
13422
|
-
className: classnames(cx$
|
|
13605
|
+
className: classnames(cx$4(''), className)
|
|
13423
13606
|
}, React__default.createElement(Select, {
|
|
13424
|
-
cx: cx$
|
|
13607
|
+
cx: cx$4,
|
|
13425
13608
|
items: items,
|
|
13426
13609
|
selectedItem: currentRefinement,
|
|
13427
13610
|
onSelect: refine
|
|
@@ -13487,7 +13670,7 @@ _defineProperty(SortBy, "defaultProps", {
|
|
|
13487
13670
|
|
|
13488
13671
|
connectSortBy(SortBy);
|
|
13489
13672
|
|
|
13490
|
-
var cx$
|
|
13673
|
+
var cx$3 = createClassNames('Stats');
|
|
13491
13674
|
|
|
13492
13675
|
var Stats = function Stats(_ref) {
|
|
13493
13676
|
var _ref$className = _ref.className,
|
|
@@ -13498,9 +13681,9 @@ var Stats = function Stats(_ref) {
|
|
|
13498
13681
|
processingTimeMS = _ref.processingTimeMS,
|
|
13499
13682
|
translate = _ref.translate;
|
|
13500
13683
|
return React__default.createElement("div", {
|
|
13501
|
-
className: classnames(cx$
|
|
13684
|
+
className: classnames(cx$3(''), className)
|
|
13502
13685
|
}, React__default.createElement("span", {
|
|
13503
|
-
className: cx$
|
|
13686
|
+
className: cx$3('text')
|
|
13504
13687
|
}, translate('stats', nbHits, processingTimeMS, nbSortedHits, areHitsSorted)));
|
|
13505
13688
|
};
|
|
13506
13689
|
|
|
@@ -13548,7 +13731,7 @@ var Stats$1 = translatable({
|
|
|
13548
13731
|
|
|
13549
13732
|
connectStats(Stats$1);
|
|
13550
13733
|
|
|
13551
|
-
var cx$
|
|
13734
|
+
var cx$2 = createClassNames('ToggleRefinement');
|
|
13552
13735
|
|
|
13553
13736
|
var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
13554
13737
|
var currentRefinement = _ref.currentRefinement,
|
|
@@ -13557,18 +13740,18 @@ var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
|
13557
13740
|
refine = _ref.refine,
|
|
13558
13741
|
className = _ref.className;
|
|
13559
13742
|
return React__default.createElement("div", {
|
|
13560
|
-
className: classnames(cx$
|
|
13743
|
+
className: classnames(cx$2('', !canRefine && '-noRefinement'), className)
|
|
13561
13744
|
}, React__default.createElement("label", {
|
|
13562
|
-
className: cx$
|
|
13745
|
+
className: cx$2('label')
|
|
13563
13746
|
}, React__default.createElement("input", {
|
|
13564
|
-
className: cx$
|
|
13747
|
+
className: cx$2('checkbox'),
|
|
13565
13748
|
type: "checkbox",
|
|
13566
13749
|
checked: currentRefinement,
|
|
13567
13750
|
onChange: function onChange(event) {
|
|
13568
13751
|
return refine(event.target.checked);
|
|
13569
13752
|
}
|
|
13570
13753
|
}), React__default.createElement("span", {
|
|
13571
|
-
className: cx$
|
|
13754
|
+
className: cx$2('labelText')
|
|
13572
13755
|
}, label)));
|
|
13573
13756
|
};
|
|
13574
13757
|
|
|
@@ -13777,7 +13960,7 @@ function createVoiceSearchHelper(_ref) {
|
|
|
13777
13960
|
};
|
|
13778
13961
|
}
|
|
13779
13962
|
|
|
13780
|
-
var cx$
|
|
13963
|
+
var cx$1 = createClassNames('VoiceSearch');
|
|
13781
13964
|
|
|
13782
13965
|
var ButtonSvg = function ButtonSvg(_ref) {
|
|
13783
13966
|
var children = _ref.children;
|
|
@@ -13923,15 +14106,15 @@ function (_Component) {
|
|
|
13923
14106
|
isBrowserSupported: isBrowserSupported()
|
|
13924
14107
|
};
|
|
13925
14108
|
return React__default.createElement("div", {
|
|
13926
|
-
className: cx$
|
|
14109
|
+
className: cx$1('')
|
|
13927
14110
|
}, React__default.createElement("button", {
|
|
13928
|
-
className: cx$
|
|
14111
|
+
className: cx$1('button'),
|
|
13929
14112
|
type: "button",
|
|
13930
14113
|
title: isBrowserSupported() ? translate('buttonTitle') : translate('disabledButtonTitle'),
|
|
13931
14114
|
onClick: this.onClick,
|
|
13932
14115
|
disabled: !isBrowserSupported()
|
|
13933
14116
|
}, React__default.createElement(ButtonTextComponent, innerProps)), React__default.createElement("div", {
|
|
13934
|
-
className: cx$
|
|
14117
|
+
className: cx$1('status')
|
|
13935
14118
|
}, React__default.createElement(StatusComponent, innerProps)));
|
|
13936
14119
|
}
|
|
13937
14120
|
}, {
|
|
@@ -13959,14 +14142,14 @@ var VoiceSearch$1 = translatable({
|
|
|
13959
14142
|
|
|
13960
14143
|
connectVoiceSearch(VoiceSearch$1);
|
|
13961
14144
|
|
|
13962
|
-
var cx
|
|
14145
|
+
var cx = createClassNames('QueryRuleCustomData');
|
|
13963
14146
|
|
|
13964
14147
|
var QueryRuleCustomData = function QueryRuleCustomData(_ref) {
|
|
13965
14148
|
var items = _ref.items,
|
|
13966
14149
|
className = _ref.className,
|
|
13967
14150
|
children = _ref.children;
|
|
13968
14151
|
return React__default.createElement("div", {
|
|
13969
|
-
className: classnames(cx
|
|
14152
|
+
className: classnames(cx(''), className)
|
|
13970
14153
|
}, children({
|
|
13971
14154
|
items: items
|
|
13972
14155
|
}));
|
|
@@ -14019,7 +14202,7 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14019
14202
|
LazyLoad,
|
|
14020
14203
|
{ once: true },
|
|
14021
14204
|
React__default.createElement('img', {
|
|
14022
|
-
src: hit.thumbnail && hit.thumbnail.asset ? urlFor({ client: client, source: hit.thumbnail }) : hit.thumbnail && _typeof$
|
|
14205
|
+
src: hit.thumbnail && hit.thumbnail.asset ? urlFor({ client: client, source: hit.thumbnail }) : hit.thumbnail && _typeof$2(hit.thumbnail === 'string') ? hit.thumbnail : this.props.defaultImage
|
|
14023
14206
|
})
|
|
14024
14207
|
)
|
|
14025
14208
|
)
|
|
@@ -14081,7 +14264,7 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14081
14264
|
onSearchParameters: this.props.onSearchParameters
|
|
14082
14265
|
}, this.props),
|
|
14083
14266
|
React__default.createElement(Configure, { hitsPerPage: this.props.hitsPerPage || 20 }),
|
|
14084
|
-
React__default.createElement(SearchBox
|
|
14267
|
+
React__default.createElement(SearchBox, null),
|
|
14085
14268
|
this.props.refinementAttributes && React__default.createElement(
|
|
14086
14269
|
'div',
|
|
14087
14270
|
{ className: 'search_refinement' },
|
|
@@ -14089,18 +14272,18 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14089
14272
|
return React__default.createElement(
|
|
14090
14273
|
DropdownButton,
|
|
14091
14274
|
{ title: item.title },
|
|
14092
|
-
React__default.createElement(RefinementList
|
|
14275
|
+
React__default.createElement(RefinementList, { showMore: item.showMore, limit: item.limit, showMoreLimit: item.showMoreLimit, attribute: item.attribute })
|
|
14093
14276
|
);
|
|
14094
14277
|
})
|
|
14095
14278
|
),
|
|
14096
14279
|
React__default.createElement(
|
|
14097
14280
|
'div',
|
|
14098
14281
|
{ className: 'AlgoliaResults' },
|
|
14099
|
-
React__default.createElement(Hits
|
|
14282
|
+
React__default.createElement(Hits, { hitComponent: function hitComponent(hit) {
|
|
14100
14283
|
return _this2.Deck(_extends$1({}, hit, { propsObj: propsObj }));
|
|
14101
14284
|
} })
|
|
14102
14285
|
),
|
|
14103
|
-
React__default.createElement(Pagination
|
|
14286
|
+
React__default.createElement(Pagination, null)
|
|
14104
14287
|
),
|
|
14105
14288
|
React__default.createElement(
|
|
14106
14289
|
'style',
|