@mjhls/mjh-framework 1.0.869 → 1.0.871
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/AD.js +9 -10
- package/dist/cjs/AD300x250.js +27 -28
- package/dist/cjs/AD300x250x600.js +27 -28
- package/dist/cjs/AD728x90.js +30 -31
- package/dist/cjs/ADFloatingFooter.js +30 -31
- package/dist/cjs/ADFooter.js +12 -13
- package/dist/cjs/ADGutter.js +30 -31
- package/dist/cjs/{ADInfeed-b9e5ff3f.js → ADInfeed-326c6278.js} +13 -15
- package/dist/cjs/ADSkyscraper.js +30 -31
- package/dist/cjs/ADSponsoredResources.js +30 -31
- package/dist/cjs/ADWebcast.js +30 -31
- package/dist/cjs/ADWelcome.js +31 -32
- package/dist/cjs/{ADlgInfeed-3cdefebd.js → ADlgInfeed-a14f79ce.js} +10 -11
- package/dist/cjs/AccordionPanel.js +27 -29
- package/dist/cjs/AdSlot.js +31 -32
- package/dist/cjs/AdSlotsProvider.js +15 -17
- package/dist/cjs/AlgoliaSearch.js +1042 -1033
- package/dist/cjs/AlphabeticList.js +23 -24
- package/dist/cjs/ArticleCarousel.js +19 -20
- package/dist/cjs/ArticleProgramLandingPage.js +57 -58
- package/dist/cjs/ArticleSeriesLandingPage.js +38 -39
- package/dist/cjs/ArticleSeriesListing.js +59 -60
- package/dist/cjs/Auth.js +283 -287
- package/dist/cjs/AuthWrapper.js +44 -45
- package/dist/cjs/{AuthorComponent-39b37d84.js → AuthorComponent-421d5ec1.js} +13 -14
- package/dist/cjs/Beam.js +6 -6
- package/dist/cjs/{BlockContent-36e54d77.js → BlockContent-bac780ac.js} +55 -56
- package/dist/cjs/Breadcrumbs.js +25 -27
- package/dist/cjs/CMEDeck.js +81 -81
- package/dist/cjs/Column1.js +11 -14
- package/dist/cjs/Column2.js +31 -34
- package/dist/cjs/Column3.js +56 -59
- package/dist/cjs/ConferenceArticleCard.js +25 -26
- package/dist/cjs/ConferenceBanner-4a16fddc.js +23 -0
- package/dist/cjs/DeckContent.js +92 -96
- package/dist/cjs/DeckQueue.js +86 -90
- package/dist/cjs/{Dfp-9be904d5.js → Dfp-57cecb43.js} +32 -33
- package/dist/cjs/EventsDeck.js +133 -140
- package/dist/cjs/ExternalResources.js +78 -79
- package/dist/cjs/Feature.js +26 -28
- package/dist/cjs/ForbesHero.js +40 -41
- package/dist/cjs/GridContent.js +231 -236
- package/dist/cjs/GridHero.js +42 -43
- package/dist/cjs/GroupDeck.js +57 -58
- package/dist/cjs/HamMagazine.js +126 -131
- package/dist/cjs/Header.js +12 -14
- package/dist/cjs/Hero.js +15 -16
- package/dist/cjs/HighlightenVideo.js +17 -18
- package/dist/cjs/HorizontalArticleListing.js +71 -72
- package/dist/cjs/HorizontalHero.js +27 -28
- package/dist/cjs/IssueContentDeck.js +71 -76
- package/dist/cjs/IssueDeck.js +70 -75
- package/dist/cjs/IssueLanding.js +64 -65
- package/dist/cjs/LeftNav.js +37 -39
- package/dist/cjs/MasterDeck.js +70 -71
- package/dist/cjs/MediaSeriesLanding.js +986 -978
- package/dist/cjs/NavDvm.js +72 -77
- package/dist/cjs/{NavFooter-3dcd99a8.js → NavFooter-76c913e3.js} +14 -15
- package/dist/cjs/NavMagazine.js +133 -138
- package/dist/cjs/NavNative.js +126 -134
- package/dist/cjs/OncliveHero.js +21 -22
- package/dist/cjs/OncliveLargeHero.js +70 -71
- package/dist/cjs/PageFilter.js +12 -13
- package/dist/cjs/PartnerDetailListing.js +112 -113
- package/dist/cjs/PdfDownload.js +8 -9
- package/dist/cjs/PopUpModal.js +17 -19
- package/dist/cjs/PubSection.js +40 -41
- package/dist/cjs/PubToc.js +13 -14
- package/dist/cjs/PublicationDeck.js +65 -70
- package/dist/cjs/PublicationLanding.js +106 -110
- package/dist/cjs/QueueDeckExpanded.js +310 -310
- package/dist/cjs/RecentNews.js +21 -22
- package/dist/cjs/RelatedContent.js +29 -30
- package/dist/cjs/RelatedTopicsDropdown.js +19 -22
- package/dist/cjs/RolesDeck.js +27 -32
- package/dist/cjs/Search.js +16 -20
- package/dist/cjs/Segment.js +4 -4
- package/dist/cjs/SeriesListingDeck.js +34 -34
- package/dist/cjs/{SeriesSlider-ce3261cb.js → SeriesSlider-372e418f.js} +30 -31
- package/dist/cjs/SetCookie.js +1 -1
- package/dist/cjs/SideFooter.js +34 -35
- package/dist/cjs/SocialIcons.js +9 -10
- package/dist/cjs/{SocialSearchComponent-a4ae7b88.js → SocialSearchComponent-8ac52b2d.js} +32 -36
- package/dist/cjs/SocialShare.js +29 -31
- package/dist/cjs/TaxonomyCard.js +61 -66
- package/dist/cjs/TaxonomyDescription.js +53 -54
- package/dist/cjs/TemplateNormal.js +71 -72
- package/dist/cjs/ThumbnailCard.js +24 -26
- package/dist/cjs/Ustream.js +26 -27
- package/dist/cjs/VerticalHero.js +19 -20
- package/dist/cjs/VideoProgramLandingPage.js +72 -76
- package/dist/cjs/VideoSeriesCard.js +32 -33
- package/dist/cjs/VideoSeriesFilter.js +16 -16
- package/dist/cjs/VideoSeriesLandingPage.js +48 -49
- package/dist/cjs/VideoSeriesListing.js +76 -77
- package/dist/cjs/View.js +249 -252
- package/dist/cjs/YahooHero.js +39 -40
- package/dist/cjs/YoutubeGroup.js +74 -56
- package/dist/cjs/{_is-array-54228b29.js → _is-array-bd978497.js} +6 -6
- package/dist/cjs/{_iter-detect-b1df62f0.js → _iter-detect-ee3d4802.js} +7 -7
- package/dist/cjs/{_object-pie-083f2dd6.js → _object-pie-68c5bcbc.js} +4 -4
- package/dist/cjs/{_object-sap-d1978572.js → _object-sap-fee50a62.js} +1 -1
- package/dist/cjs/{_object-to-array-ce86cae7.js → _object-to-array-18379aba.js} +2 -2
- package/dist/cjs/{asyncToGenerator-77821af0.js → asyncToGenerator-15014394.js} +30 -30
- package/dist/cjs/{brightcove-react-player-loader.es-a195642e.js → brightcove-react-player-loader.es-05029198.js} +6 -7
- package/dist/cjs/{core.get-iterator-method-5643aa10.js → core.get-iterator-method-5cb3af28.js} +33 -33
- package/dist/cjs/{debounce-d4a2369b.js → debounce-6191c8ee.js} +2 -2
- package/dist/cjs/{define-property-e8404b64.js → define-property-530a5e9e.js} +6 -6
- package/dist/cjs/{defineProperty-9673846a.js → defineProperty-5ca424cd.js} +1 -1
- package/dist/cjs/{entities-3f9d0f2f.js → entities-310b46ee.js} +1 -1
- package/dist/cjs/{eq-5fc26c07.js → eq-bb2843ed.js} +1 -1
- package/dist/cjs/{extends-7c86182f.js → extends-1d905ddb.js} +7 -7
- package/dist/cjs/faundadb.js +5 -5
- package/dist/cjs/{get-5839e5b5.js → get-adbb11e3.js} +21 -21
- package/dist/cjs/getRelatedArticle.js +18 -18
- package/dist/cjs/getRootDocGroup.js +4 -4
- package/dist/cjs/getSerializers.js +43 -43
- package/dist/cjs/{getTargeting-9d509319.js → getTargeting-9d63325d.js} +2 -2
- package/dist/cjs/getTargeting.js +6 -6
- package/dist/cjs/iconBase-68959171.js +3 -0
- package/dist/cjs/{index-8041a4eb.js → index-53e27416.js} +16 -10
- package/dist/cjs/{index-f86bb269.js → index-79eed652.js} +6 -6
- package/dist/cjs/{index-eadd5035.js → index-96b3db50.js} +15 -17
- package/dist/cjs/{index-fc2f1ca2.js → index-98e01cb9.js} +12 -13
- package/dist/cjs/{index-a13a767d.js → index-bbf836af.js} +571 -581
- package/dist/cjs/{index-efca863c.js → index-ff69979f.js} +8 -8
- package/dist/cjs/{index.es-f3e47207.js → index.es-e9d84959.js} +7 -8
- package/dist/cjs/{index.esm-8123cf40.js → index.esm-bf016399.js} +17 -18
- package/dist/cjs/index.js +164 -167
- package/dist/cjs/{inherits-de66ea16.js → inherits-1dcf1280.js} +21 -21
- package/dist/cjs/{isSymbol-03abbdf0.js → isSymbol-04666465.js} +15 -15
- package/dist/cjs/{keys-e982b3fa.js → keys-91f31941.js} +6 -6
- package/dist/cjs/{lodash-f0783643.js → lodash-b5e0d5f6.js} +1 -1
- package/dist/cjs/{main-025fdc78.js → main-bc7d4bf8.js} +72 -73
- package/dist/cjs/{moment-aca40de1.js → moment-ca3bd9fb.js} +1 -1
- package/dist/cjs/{react-social-icons-af932527.js → react-social-icons-f7f48f71.js} +27 -28
- package/dist/cjs/{slicedToArray-067dd3bc.js → slicedToArray-0a78cdf3.js} +12 -12
- package/dist/cjs/{smoothscroll-99df7f93.js → smoothscroll-5054361f.js} +1 -1
- package/dist/cjs/{stringify-f7a37a8d.js → stringify-13405ce2.js} +5 -5
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-d7797c2b.js → toConsumableArray-39fd0757.js} +7 -7
- package/dist/cjs/{toNumber-5e1fac58.js → toNumber-f2f8744b.js} +1 -1
- package/dist/cjs/{typeof-567e31ff.js → typeof-3dd6d3df.js} +35 -35
- package/dist/cjs/urlFor.js +6 -6
- package/dist/cjs/{ustream-api-3819e4aa.js → ustream-api-5619c1fa.js} +4 -4
- package/dist/cjs/{util-6f784d85.js → util-f2c1b65b.js} +1 -1
- package/dist/cjs/{visibility-sensor-eb2c5b69.js → visibility-sensor-ad5e3116.js} +5 -7
- package/dist/cjs/{web.dom.iterable-d98303e0.js → web.dom.iterable-a9359910.js} +2 -2
- package/dist/esm/AD.js +7 -7
- package/dist/esm/AD300x250.js +24 -24
- package/dist/esm/AD300x250x600.js +24 -24
- package/dist/esm/AD728x90.js +27 -27
- package/dist/esm/ADFloatingFooter.js +27 -27
- package/dist/esm/ADFooter.js +9 -9
- package/dist/esm/ADGutter.js +27 -27
- package/dist/esm/{ADInfeed-6c6093ae.js → ADInfeed-dbdb0513.js} +11 -11
- package/dist/esm/ADSkyscraper.js +27 -27
- package/dist/esm/ADSponsoredResources.js +27 -27
- package/dist/esm/ADWebcast.js +27 -27
- package/dist/esm/ADWelcome.js +28 -28
- package/dist/esm/{ADlgInfeed-5d7386e8.js → ADlgInfeed-f1c2c5cd.js} +8 -8
- package/dist/esm/AccordionPanel.js +22 -22
- package/dist/esm/AdSlot.js +23 -23
- package/dist/esm/AdSlotsProvider.js +10 -10
- package/dist/esm/AlgoliaSearch.js +691 -681
- package/dist/esm/AlphabeticList.js +20 -20
- package/dist/esm/ArticleCarousel.js +16 -16
- package/dist/esm/ArticleProgramLandingPage.js +54 -54
- package/dist/esm/ArticleSeriesLandingPage.js +35 -35
- package/dist/esm/ArticleSeriesListing.js +55 -55
- package/dist/esm/Auth.js +268 -268
- package/dist/esm/AuthWrapper.js +42 -42
- package/dist/esm/{AuthorComponent-46a745ba.js → AuthorComponent-2277b67c.js} +11 -11
- package/dist/esm/Beam.js +6 -6
- package/dist/esm/{BlockContent-52cf21c5.js → BlockContent-ea93e8f7.js} +35 -35
- package/dist/esm/Breadcrumbs.js +15 -15
- package/dist/esm/CMEDeck.js +77 -77
- package/dist/esm/Column1.js +9 -9
- package/dist/esm/Column2.js +28 -28
- package/dist/esm/Column3.js +53 -53
- package/dist/esm/ConferenceArticleCard.js +23 -23
- package/dist/esm/{ConferenceBanner-9162d0ca.js → ConferenceBanner-8792ebd2.js} +4 -4
- package/dist/esm/DeckContent.js +87 -87
- package/dist/esm/DeckQueue.js +81 -81
- package/dist/esm/{Dfp-4ca12f2e.js → Dfp-d6a5629f.js} +20 -20
- package/dist/esm/EventsDeck.js +110 -110
- package/dist/esm/ExternalResources.js +72 -72
- package/dist/esm/Feature.js +20 -20
- package/dist/esm/ForbesHero.js +33 -33
- package/dist/esm/GridContent.js +196 -196
- package/dist/esm/GridHero.js +35 -35
- package/dist/esm/GroupDeck.js +45 -45
- package/dist/esm/HamMagazine.js +101 -101
- package/dist/esm/Header.js +8 -8
- package/dist/esm/Hero.js +13 -13
- package/dist/esm/HighlightenVideo.js +14 -14
- package/dist/esm/HorizontalArticleListing.js +68 -68
- package/dist/esm/HorizontalHero.js +25 -25
- package/dist/esm/IssueContentDeck.js +59 -59
- package/dist/esm/IssueDeck.js +63 -63
- package/dist/esm/IssueLanding.js +61 -61
- package/dist/esm/LeftNav.js +33 -33
- package/dist/esm/MasterDeck.js +67 -67
- package/dist/esm/MediaSeriesLanding.js +627 -616
- package/dist/esm/NavDvm.js +57 -57
- package/dist/esm/{NavFooter-c29526b7.js → NavFooter-e27bd93b.js} +12 -12
- package/dist/esm/NavMagazine.js +111 -111
- package/dist/esm/NavNative.js +103 -103
- package/dist/esm/OncliveHero.js +19 -19
- package/dist/esm/OncliveLargeHero.js +58 -58
- package/dist/esm/PageFilter.js +10 -10
- package/dist/esm/PartnerDetailListing.js +109 -109
- package/dist/esm/PdfDownload.js +6 -6
- package/dist/esm/PopUpModal.js +12 -12
- package/dist/esm/PubSection.js +37 -37
- package/dist/esm/PubToc.js +10 -10
- package/dist/esm/PublicationDeck.js +56 -56
- package/dist/esm/PublicationLanding.js +93 -93
- package/dist/esm/QueueDeckExpanded.js +273 -273
- package/dist/esm/RecentNews.js +19 -19
- package/dist/esm/RelatedContent.js +23 -23
- package/dist/esm/RelatedTopicsDropdown.js +11 -11
- package/dist/esm/RolesDeck.js +25 -25
- package/dist/esm/Search.js +11 -11
- package/dist/esm/Segment.js +4 -4
- package/dist/esm/SeriesListingDeck.js +30 -30
- package/dist/esm/{SeriesSlider-485f514e.js → SeriesSlider-ae692d40.js} +22 -22
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +30 -30
- package/dist/esm/SocialIcons.js +7 -7
- package/dist/esm/{SocialSearchComponent-41b6b480.js → SocialSearchComponent-8725e61b.js} +26 -26
- package/dist/esm/SocialShare.js +25 -25
- package/dist/esm/TaxonomyCard.js +56 -56
- package/dist/esm/TaxonomyDescription.js +48 -48
- package/dist/esm/TemplateNormal.js +67 -67
- package/dist/esm/ThumbnailCard.js +17 -17
- package/dist/esm/Ustream.js +23 -23
- package/dist/esm/VerticalHero.js +17 -17
- package/dist/esm/VideoProgramLandingPage.js +65 -65
- package/dist/esm/VideoSeriesCard.js +25 -25
- package/dist/esm/VideoSeriesFilter.js +13 -13
- package/dist/esm/VideoSeriesLandingPage.js +40 -40
- package/dist/esm/VideoSeriesListing.js +72 -72
- package/dist/esm/View.js +241 -240
- package/dist/esm/YahooHero.js +33 -33
- package/dist/esm/YoutubeGroup.js +59 -40
- package/dist/esm/{_is-array-893ab020.js → _is-array-8914b83f.js} +6 -6
- package/dist/esm/{_iter-detect-f089461c.js → _iter-detect-13e31915.js} +7 -7
- package/dist/esm/{_object-pie-133f504a.js → _object-pie-33c40e79.js} +4 -4
- package/dist/esm/{_object-sap-169d6272.js → _object-sap-fc9da7e8.js} +1 -1
- package/dist/esm/{_object-to-array-50a6b9a3.js → _object-to-array-ee8f6d98.js} +2 -2
- package/dist/esm/{asyncToGenerator-b4dfe691.js → asyncToGenerator-40371743.js} +30 -30
- package/dist/esm/{brightcove-react-player-loader.es-b43c695a.js → brightcove-react-player-loader.es-e761d404.js} +3 -3
- package/dist/esm/{core.get-iterator-method-e903ff31.js → core.get-iterator-method-0fb60d94.js} +34 -34
- package/dist/esm/{debounce-533d9748.js → debounce-89969f66.js} +2 -2
- package/dist/esm/{define-property-99e66838.js → define-property-73034847.js} +6 -6
- package/dist/esm/{defineProperty-8fa0bc8d.js → defineProperty-e66a2c7c.js} +1 -1
- package/dist/esm/{entities-932b50cf.js → entities-7cc3bf45.js} +1 -1
- package/dist/esm/{eq-bdcbf886.js → eq-b470f743.js} +1 -1
- package/dist/esm/{extends-dc6a71fd.js → extends-9a61581c.js} +7 -7
- package/dist/esm/faundadb.js +5 -5
- package/dist/esm/{get-3c308da4.js → get-1e515072.js} +21 -21
- package/dist/esm/getRelatedArticle.js +12 -12
- package/dist/esm/getRootDocGroup.js +4 -4
- package/dist/esm/getSerializers.js +43 -43
- package/dist/esm/{getTargeting-ff2c9409.js → getTargeting-e6820763.js} +2 -2
- package/dist/esm/getTargeting.js +6 -6
- package/dist/esm/{index-2446af28.js → index-41a678ea.js} +6 -6
- package/dist/esm/{index-79cfd25c.js → index-511bdaa5.js} +6 -6
- package/dist/esm/{index-35bdcc81.js → index-5f7e79e7.js} +10 -10
- package/dist/esm/{index-67e1773f.js → index-637e8f49.js} +16 -10
- package/dist/esm/{index-bd9ce1da.js → index-bac4334f.js} +528 -528
- package/dist/esm/{index-0dbff1d1.js → index-f7fdcc91.js} +8 -8
- package/dist/esm/{index.es-c6222053.js → index.es-a6137319.js} +5 -5
- package/dist/esm/{index.esm-8016b507.js → index.esm-ed50151c.js} +15 -15
- package/dist/esm/index.js +137 -137
- package/dist/esm/{inherits-8a801a18.js → inherits-eeaf6740.js} +18 -18
- package/dist/esm/{isSymbol-a7e9aafe.js → isSymbol-1981418f.js} +15 -15
- package/dist/esm/{keys-425c8ab0.js → keys-a5ffafe7.js} +6 -6
- package/dist/esm/{lodash-f97fd99a.js → lodash-a818d390.js} +1 -1
- package/dist/esm/{main-b5c5aac1.js → main-ae902629.js} +72 -72
- package/dist/esm/{moment-bc12cb97.js → moment-b6f49411.js} +1 -1
- package/dist/esm/{react-social-icons-91f9716f.js → react-social-icons-a7d5c5c7.js} +20 -20
- package/dist/esm/{slicedToArray-ca2c8b8d.js → slicedToArray-9c3bb613.js} +12 -12
- package/dist/esm/{smoothscroll-fa4e3f8c.js → smoothscroll-0cd4c7a6.js} +1 -1
- package/dist/esm/stringify-ebc16384.js +15 -0
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/{toConsumableArray-7b1c0e23.js → toConsumableArray-e333293f.js} +7 -7
- package/dist/esm/{toNumber-5aeba6e7.js → toNumber-e3dcad26.js} +1 -1
- package/dist/esm/{typeof-83d9eb10.js → typeof-938ae770.js} +35 -35
- package/dist/esm/urlFor.js +4 -4
- package/dist/esm/{ustream-api-41166338.js → ustream-api-d325d196.js} +4 -4
- package/dist/esm/{util-3ab476bf.js → util-7700fc59.js} +1 -1
- package/dist/esm/{visibility-sensor-f40c2564.js → visibility-sensor-72fd8f8b.js} +2 -2
- package/dist/esm/{web.dom.iterable-fdf034f5.js → web.dom.iterable-6b037ff9.js} +2 -2
- package/package.json +1 -1
- package/dist/cjs/ConferenceBanner-6c9e718a.js +0 -24
- package/dist/esm/stringify-c21932b3.js +0 -15
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { _ as _extends$1 } from './extends-dc6a71fd.js';
|
|
2
|
-
import { _ as _typeof$2 } from './typeof-83d9eb10.js';
|
|
3
|
-
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-8a801a18.js';
|
|
4
|
-
import React, { createContext, Component, Children, version as version$2 } from 'react';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
1
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
7
|
-
import
|
|
8
|
-
import { E as EventEmitter } from './events-6c3a7a63.js';
|
|
9
|
-
import { DropdownButton } from 'react-bootstrap';
|
|
10
|
-
import urlFor from './urlFor.js';
|
|
11
|
-
import { m as moment } from './moment-bc12cb97.js';
|
|
12
|
-
import { L as LazyLoad } from './index-35bdcc81.js';
|
|
13
|
-
import './core.get-iterator-method-e903ff31.js';
|
|
14
|
-
import './_object-pie-133f504a.js';
|
|
15
|
-
import './web.dom.iterable-fdf034f5.js';
|
|
16
|
-
import './_is-array-893ab020.js';
|
|
2
|
+
import './core.get-iterator-method-0fb60d94.js';
|
|
17
3
|
import './_library-528f1934.js';
|
|
18
|
-
import './_object-
|
|
19
|
-
import './
|
|
20
|
-
import './
|
|
21
|
-
import './
|
|
4
|
+
import './_object-pie-33c40e79.js';
|
|
5
|
+
import { _ as _extends$1 } from './extends-9a61581c.js';
|
|
6
|
+
import './_object-sap-fc9da7e8.js';
|
|
7
|
+
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-eeaf6740.js';
|
|
8
|
+
import './define-property-73034847.js';
|
|
9
|
+
import './web.dom.iterable-6b037ff9.js';
|
|
10
|
+
import { _ as _typeof$2 } from './typeof-938ae770.js';
|
|
11
|
+
import './_is-array-8914b83f.js';
|
|
12
|
+
import React__default, { createContext, Component, Children, version as version$2 } from 'react';
|
|
13
|
+
import { E as EventEmitter } from './events-6c3a7a63.js';
|
|
14
|
+
import PropTypes from 'prop-types';
|
|
15
|
+
import { m as moment } from './moment-b6f49411.js';
|
|
22
16
|
import 'react-dom';
|
|
17
|
+
import './slicedToArray-9c3bb613.js';
|
|
18
|
+
import './index-f7fdcc91.js';
|
|
19
|
+
import urlFor from './urlFor.js';
|
|
20
|
+
import { L as LazyLoad } from './index-5f7e79e7.js';
|
|
21
|
+
import { DropdownButton } from 'react-bootstrap';
|
|
22
|
+
import { _ as _objectWithoutPropertiesLoose$1, a as _setPrototypeOf, b as _extends, c as classnames } from './index-637e8f49.js';
|
|
23
23
|
|
|
24
24
|
function _objectWithoutProperties(source, excluded) {
|
|
25
25
|
if (source == null) return {};
|
|
@@ -121,7 +121,7 @@ module.exports = _typeof;
|
|
|
121
121
|
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
122
122
|
});
|
|
123
123
|
|
|
124
|
-
var _typeof
|
|
124
|
+
var _typeof = unwrapExports(_typeof_1);
|
|
125
125
|
|
|
126
126
|
function _assertThisInitialized(self) {
|
|
127
127
|
if (self === void 0) {
|
|
@@ -132,7 +132,7 @@ function _assertThisInitialized(self) {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
function _possibleConstructorReturn(self, call) {
|
|
135
|
-
if (call && (_typeof
|
|
135
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
136
136
|
return call;
|
|
137
137
|
}
|
|
138
138
|
|
|
@@ -296,20 +296,20 @@ var reactFastCompare = function isEqual(a, b) {
|
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
298
|
|
|
299
|
-
function _typeof(obj) {
|
|
299
|
+
function _typeof$1(obj) {
|
|
300
300
|
"@babel/helpers - typeof";
|
|
301
301
|
|
|
302
302
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
303
|
-
_typeof = function _typeof(obj) {
|
|
303
|
+
_typeof$1 = function _typeof(obj) {
|
|
304
304
|
return typeof obj;
|
|
305
305
|
};
|
|
306
306
|
} else {
|
|
307
|
-
_typeof = function _typeof(obj) {
|
|
307
|
+
_typeof$1 = function _typeof(obj) {
|
|
308
308
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
return _typeof(obj);
|
|
312
|
+
return _typeof$1(obj);
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
// From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
@@ -345,7 +345,7 @@ var defer = function defer(f) {
|
|
|
345
345
|
};
|
|
346
346
|
|
|
347
347
|
var isPlainObject = function isPlainObject(value) {
|
|
348
|
-
return _typeof(value) === 'object' && value !== null && !Array.isArray(value);
|
|
348
|
+
return _typeof$1(value) === 'object' && value !== null && !Array.isArray(value);
|
|
349
349
|
};
|
|
350
350
|
|
|
351
351
|
var removeEmptyKey = function removeEmptyKey(obj) {
|
|
@@ -356,7 +356,7 @@ var removeEmptyKey = function removeEmptyKey(obj) {
|
|
|
356
356
|
return;
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
if (!objectHasKeys
|
|
359
|
+
if (!objectHasKeys(value)) {
|
|
360
360
|
delete obj[key];
|
|
361
361
|
} else {
|
|
362
362
|
removeEmptyKey(value);
|
|
@@ -392,7 +392,7 @@ function addQueryID(hits, queryID) {
|
|
|
392
392
|
});
|
|
393
393
|
});
|
|
394
394
|
}
|
|
395
|
-
function find
|
|
395
|
+
function find(array, comparator) {
|
|
396
396
|
if (!Array.isArray(array)) {
|
|
397
397
|
return undefined;
|
|
398
398
|
}
|
|
@@ -405,11 +405,11 @@ function find$2(array, comparator) {
|
|
|
405
405
|
|
|
406
406
|
return undefined;
|
|
407
407
|
}
|
|
408
|
-
function objectHasKeys
|
|
408
|
+
function objectHasKeys(object) {
|
|
409
409
|
return object && Object.keys(object).length > 0;
|
|
410
410
|
} // https://github.com/babel/babel/blob/3aaafae053fa75febb3aa45d45b6f00646e30ba4/packages/babel-helpers/src/helpers.js#L604-L620
|
|
411
411
|
|
|
412
|
-
function omit
|
|
412
|
+
function omit(source, excluded) {
|
|
413
413
|
if (source === null || source === undefined) {
|
|
414
414
|
return {};
|
|
415
415
|
}
|
|
@@ -480,9 +480,9 @@ var instantSearchContext = createContext({
|
|
|
480
480
|
var InstantSearchConsumer = instantSearchContext.Consumer,
|
|
481
481
|
InstantSearchProvider = instantSearchContext.Provider;
|
|
482
482
|
|
|
483
|
-
var _createContext
|
|
484
|
-
IndexConsumer = _createContext
|
|
485
|
-
IndexProvider = _createContext
|
|
483
|
+
var _createContext = createContext(undefined),
|
|
484
|
+
IndexConsumer = _createContext.Consumer,
|
|
485
|
+
IndexProvider = _createContext.Provider;
|
|
486
486
|
|
|
487
487
|
/**
|
|
488
488
|
* Connectors are the HOC used to transform React components
|
|
@@ -695,9 +695,9 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
695
695
|
}, {
|
|
696
696
|
key: "render",
|
|
697
697
|
value: function render() {
|
|
698
|
-
var _this$props = this.props
|
|
699
|
-
_this$props.contextValue
|
|
700
|
-
|
|
698
|
+
var _this$props = this.props,
|
|
699
|
+
contextValue = _this$props.contextValue,
|
|
700
|
+
props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
701
701
|
|
|
702
702
|
var providedProps = this.state.providedProps;
|
|
703
703
|
|
|
@@ -712,7 +712,7 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
712
712
|
var searchForFacetValuesProps = typeof connectorDesc.searchForFacetValues === 'function' ? {
|
|
713
713
|
searchForItems: this.searchForFacetValues
|
|
714
714
|
} : {};
|
|
715
|
-
return
|
|
715
|
+
return React__default.createElement(Composed, _extends({}, props, providedProps, refineProps, searchForFacetValuesProps));
|
|
716
716
|
}
|
|
717
717
|
}]);
|
|
718
718
|
|
|
@@ -734,9 +734,9 @@ var createConnectorWithContext = function createConnectorWithContext(connectorDe
|
|
|
734
734
|
var Connector = createConnectorWithoutContext(connectorDesc)(Composed);
|
|
735
735
|
|
|
736
736
|
var ConnectorWrapper = function ConnectorWrapper(props) {
|
|
737
|
-
return
|
|
738
|
-
return
|
|
739
|
-
return
|
|
737
|
+
return React__default.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
738
|
+
return React__default.createElement(IndexConsumer, null, function (indexContextValue) {
|
|
739
|
+
return React__default.createElement(Connector, _extends({
|
|
740
740
|
contextValue: contextValue,
|
|
741
741
|
indexContextValue: indexContextValue
|
|
742
742
|
}, props));
|
|
@@ -848,7 +848,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
848
848
|
});
|
|
849
849
|
}
|
|
850
850
|
|
|
851
|
-
var version
|
|
851
|
+
var version = '6.10.3';
|
|
852
852
|
|
|
853
853
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
854
854
|
return function (props, propName, componentName) {
|
|
@@ -909,7 +909,7 @@ function translatable(defaultTranslations) {
|
|
|
909
909
|
_createClass(Translatable, [{
|
|
910
910
|
key: "render",
|
|
911
911
|
value: function render() {
|
|
912
|
-
return
|
|
912
|
+
return React__default.createElement(Composed, _extends({
|
|
913
913
|
translate: this.translate
|
|
914
914
|
}, this.props));
|
|
915
915
|
}
|
|
@@ -1045,7 +1045,7 @@ function hasRefinements(_ref) {
|
|
|
1045
1045
|
return Object.hasOwnProperty.call(searchState, id);
|
|
1046
1046
|
}
|
|
1047
1047
|
|
|
1048
|
-
function getRefinements
|
|
1048
|
+
function getRefinements(_ref2) {
|
|
1049
1049
|
var multiIndex = _ref2.multiIndex,
|
|
1050
1050
|
indexId = _ref2.indexId,
|
|
1051
1051
|
namespace = _ref2.namespace,
|
|
@@ -1087,7 +1087,7 @@ function getCurrentRefinementValue(props, searchState, context, id, defaultValue
|
|
|
1087
1087
|
var hasRefinementsValue = hasRefinements(args);
|
|
1088
1088
|
|
|
1089
1089
|
if (hasRefinementsValue) {
|
|
1090
|
-
return getRefinements
|
|
1090
|
+
return getRefinements(args);
|
|
1091
1091
|
}
|
|
1092
1092
|
|
|
1093
1093
|
if (props.defaultRefinement) {
|
|
@@ -1128,10 +1128,10 @@ function cleanUpValueWithSingleIndex(_ref3) {
|
|
|
1128
1128
|
attribute = _ref3.attribute;
|
|
1129
1129
|
|
|
1130
1130
|
if (namespace) {
|
|
1131
|
-
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit
|
|
1131
|
+
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit(searchState[namespace], [attribute])));
|
|
1132
1132
|
}
|
|
1133
1133
|
|
|
1134
|
-
return omit
|
|
1134
|
+
return omit(searchState, [id]);
|
|
1135
1135
|
}
|
|
1136
1136
|
|
|
1137
1137
|
function cleanUpValueWithMultiIndex(_ref4) {
|
|
@@ -1144,20 +1144,20 @@ function cleanUpValueWithMultiIndex(_ref4) {
|
|
|
1144
1144
|
|
|
1145
1145
|
if (namespace && indexSearchState) {
|
|
1146
1146
|
return _objectSpread({}, searchState, {
|
|
1147
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit
|
|
1147
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit(indexSearchState[namespace], [attribute])))))
|
|
1148
1148
|
});
|
|
1149
1149
|
}
|
|
1150
1150
|
|
|
1151
1151
|
if (indexSearchState) {
|
|
1152
1152
|
return _objectSpread({}, searchState, {
|
|
1153
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit
|
|
1153
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit(indexSearchState, [id])))
|
|
1154
1154
|
});
|
|
1155
1155
|
}
|
|
1156
1156
|
|
|
1157
1157
|
return searchState;
|
|
1158
1158
|
}
|
|
1159
1159
|
|
|
1160
|
-
function getId
|
|
1160
|
+
function getId() {
|
|
1161
1161
|
return 'configure';
|
|
1162
1162
|
}
|
|
1163
1163
|
|
|
@@ -1167,20 +1167,20 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1167
1167
|
return {};
|
|
1168
1168
|
},
|
|
1169
1169
|
getSearchParameters: function getSearchParameters(searchParameters, props) {
|
|
1170
|
-
props.children
|
|
1171
|
-
props.contextValue
|
|
1172
|
-
props.indexContextValue
|
|
1173
|
-
|
|
1170
|
+
var children = props.children,
|
|
1171
|
+
contextValue = props.contextValue,
|
|
1172
|
+
indexContextValue = props.indexContextValue,
|
|
1173
|
+
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1174
1174
|
|
|
1175
1175
|
return searchParameters.setQueryParameters(items);
|
|
1176
1176
|
},
|
|
1177
1177
|
transitionState: function transitionState(props, prevSearchState, nextSearchState) {
|
|
1178
|
-
var id = getId
|
|
1178
|
+
var id = getId();
|
|
1179
1179
|
|
|
1180
|
-
props.children
|
|
1181
|
-
props.contextValue
|
|
1182
|
-
props.indexContextValue
|
|
1183
|
-
|
|
1180
|
+
var children = props.children,
|
|
1181
|
+
contextValue = props.contextValue,
|
|
1182
|
+
indexContextValue = props.indexContextValue,
|
|
1183
|
+
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1184
1184
|
|
|
1185
1185
|
var propKeys = Object.keys(props);
|
|
1186
1186
|
var nonPresentKeys = this._props ? Object.keys(this._props).filter(function (prop) {
|
|
@@ -1188,7 +1188,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1188
1188
|
}) : [];
|
|
1189
1189
|
this._props = props;
|
|
1190
1190
|
|
|
1191
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit
|
|
1191
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), items));
|
|
1192
1192
|
|
|
1193
1193
|
return refineValue(nextSearchState, nextValue, {
|
|
1194
1194
|
ais: props.contextValue,
|
|
@@ -1196,7 +1196,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1196
1196
|
});
|
|
1197
1197
|
},
|
|
1198
1198
|
cleanUp: function cleanUp(props, searchState) {
|
|
1199
|
-
var id = getId
|
|
1199
|
+
var id = getId();
|
|
1200
1200
|
var indexId = getIndexId({
|
|
1201
1201
|
ais: props.contextValue,
|
|
1202
1202
|
multiIndexContext: props.indexContextValue
|
|
@@ -1444,13 +1444,13 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
1444
1444
|
return target;
|
|
1445
1445
|
}
|
|
1446
1446
|
|
|
1447
|
-
var omit = _objectWithoutPropertiesLoose;
|
|
1447
|
+
var omit$1 = _objectWithoutPropertiesLoose;
|
|
1448
1448
|
|
|
1449
|
-
function objectHasKeys(obj) {
|
|
1449
|
+
function objectHasKeys$1(obj) {
|
|
1450
1450
|
return obj && Object.keys(obj).length > 0;
|
|
1451
1451
|
}
|
|
1452
1452
|
|
|
1453
|
-
var objectHasKeys_1 = objectHasKeys;
|
|
1453
|
+
var objectHasKeys_1 = objectHasKeys$1;
|
|
1454
1454
|
|
|
1455
1455
|
var isValidUserToken = function isValidUserToken(userToken) {
|
|
1456
1456
|
if (userToken === null) {
|
|
@@ -1558,7 +1558,7 @@ var lib = {
|
|
|
1558
1558
|
}
|
|
1559
1559
|
return {};
|
|
1560
1560
|
} else if (typeof attribute === 'string') {
|
|
1561
|
-
return omit(refinementList, [attribute]);
|
|
1561
|
+
return omit$1(refinementList, [attribute]);
|
|
1562
1562
|
} else if (typeof attribute === 'function') {
|
|
1563
1563
|
var hasChanged = false;
|
|
1564
1564
|
|
|
@@ -1603,7 +1603,7 @@ var lib = {
|
|
|
1603
1603
|
}
|
|
1604
1604
|
};
|
|
1605
1605
|
|
|
1606
|
-
var RefinementList
|
|
1606
|
+
var RefinementList = lib;
|
|
1607
1607
|
|
|
1608
1608
|
/**
|
|
1609
1609
|
* isEqual, but only for numeric refinement values, possible values:
|
|
@@ -1972,22 +1972,22 @@ SearchParameters.prototype = {
|
|
|
1972
1972
|
clearRefinements: function clearRefinements(attribute) {
|
|
1973
1973
|
var patch = {
|
|
1974
1974
|
numericRefinements: this._clearNumericRefinements(attribute),
|
|
1975
|
-
facetsRefinements: RefinementList
|
|
1975
|
+
facetsRefinements: RefinementList.clearRefinement(
|
|
1976
1976
|
this.facetsRefinements,
|
|
1977
1977
|
attribute,
|
|
1978
1978
|
'conjunctiveFacet'
|
|
1979
1979
|
),
|
|
1980
|
-
facetsExcludes: RefinementList
|
|
1980
|
+
facetsExcludes: RefinementList.clearRefinement(
|
|
1981
1981
|
this.facetsExcludes,
|
|
1982
1982
|
attribute,
|
|
1983
1983
|
'exclude'
|
|
1984
1984
|
),
|
|
1985
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
1985
|
+
disjunctiveFacetsRefinements: RefinementList.clearRefinement(
|
|
1986
1986
|
this.disjunctiveFacetsRefinements,
|
|
1987
1987
|
attribute,
|
|
1988
1988
|
'disjunctiveFacet'
|
|
1989
1989
|
),
|
|
1990
|
-
hierarchicalFacetsRefinements: RefinementList
|
|
1990
|
+
hierarchicalFacetsRefinements: RefinementList.clearRefinement(
|
|
1991
1991
|
this.hierarchicalFacetsRefinements,
|
|
1992
1992
|
attribute,
|
|
1993
1993
|
'hierarchicalFacet'
|
|
@@ -2263,7 +2263,7 @@ SearchParameters.prototype = {
|
|
|
2263
2263
|
}
|
|
2264
2264
|
return {};
|
|
2265
2265
|
} else if (typeof attribute === 'string') {
|
|
2266
|
-
return omit(this.numericRefinements, [attribute]);
|
|
2266
|
+
return omit$1(this.numericRefinements, [attribute]);
|
|
2267
2267
|
} else if (typeof attribute === 'function') {
|
|
2268
2268
|
var hasChanged = false;
|
|
2269
2269
|
var numericRefinements = this.numericRefinements;
|
|
@@ -2355,10 +2355,10 @@ SearchParameters.prototype = {
|
|
|
2355
2355
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2356
2356
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2357
2357
|
}
|
|
2358
|
-
if (RefinementList
|
|
2358
|
+
if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2359
2359
|
|
|
2360
2360
|
return this.setQueryParameters({
|
|
2361
|
-
facetsRefinements: RefinementList
|
|
2361
|
+
facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value)
|
|
2362
2362
|
});
|
|
2363
2363
|
},
|
|
2364
2364
|
/**
|
|
@@ -2372,10 +2372,10 @@ SearchParameters.prototype = {
|
|
|
2372
2372
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2373
2373
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2374
2374
|
}
|
|
2375
|
-
if (RefinementList
|
|
2375
|
+
if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2376
2376
|
|
|
2377
2377
|
return this.setQueryParameters({
|
|
2378
|
-
facetsExcludes: RefinementList
|
|
2378
|
+
facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value)
|
|
2379
2379
|
});
|
|
2380
2380
|
},
|
|
2381
2381
|
/**
|
|
@@ -2391,10 +2391,10 @@ SearchParameters.prototype = {
|
|
|
2391
2391
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2392
2392
|
}
|
|
2393
2393
|
|
|
2394
|
-
if (RefinementList
|
|
2394
|
+
if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2395
2395
|
|
|
2396
2396
|
return this.setQueryParameters({
|
|
2397
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2397
|
+
disjunctiveFacetsRefinements: RefinementList.addRefinement(
|
|
2398
2398
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2399
2399
|
});
|
|
2400
2400
|
},
|
|
@@ -2479,10 +2479,10 @@ SearchParameters.prototype = {
|
|
|
2479
2479
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2480
2480
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2481
2481
|
}
|
|
2482
|
-
if (!RefinementList
|
|
2482
|
+
if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2483
2483
|
|
|
2484
2484
|
return this.setQueryParameters({
|
|
2485
|
-
facetsRefinements: RefinementList
|
|
2485
|
+
facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value)
|
|
2486
2486
|
});
|
|
2487
2487
|
},
|
|
2488
2488
|
/**
|
|
@@ -2496,10 +2496,10 @@ SearchParameters.prototype = {
|
|
|
2496
2496
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2497
2497
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2498
2498
|
}
|
|
2499
|
-
if (!RefinementList
|
|
2499
|
+
if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2500
2500
|
|
|
2501
2501
|
return this.setQueryParameters({
|
|
2502
|
-
facetsExcludes: RefinementList
|
|
2502
|
+
facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value)
|
|
2503
2503
|
});
|
|
2504
2504
|
},
|
|
2505
2505
|
/**
|
|
@@ -2514,10 +2514,10 @@ SearchParameters.prototype = {
|
|
|
2514
2514
|
throw new Error(
|
|
2515
2515
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2516
2516
|
}
|
|
2517
|
-
if (!RefinementList
|
|
2517
|
+
if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2518
2518
|
|
|
2519
2519
|
return this.setQueryParameters({
|
|
2520
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2520
|
+
disjunctiveFacetsRefinements: RefinementList.removeRefinement(
|
|
2521
2521
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2522
2522
|
});
|
|
2523
2523
|
},
|
|
@@ -2583,7 +2583,7 @@ SearchParameters.prototype = {
|
|
|
2583
2583
|
}
|
|
2584
2584
|
|
|
2585
2585
|
return this.setQueryParameters({
|
|
2586
|
-
facetsRefinements: RefinementList
|
|
2586
|
+
facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2587
2587
|
});
|
|
2588
2588
|
},
|
|
2589
2589
|
/**
|
|
@@ -2599,7 +2599,7 @@ SearchParameters.prototype = {
|
|
|
2599
2599
|
}
|
|
2600
2600
|
|
|
2601
2601
|
return this.setQueryParameters({
|
|
2602
|
-
facetsExcludes: RefinementList
|
|
2602
|
+
facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2603
2603
|
});
|
|
2604
2604
|
},
|
|
2605
2605
|
/**
|
|
@@ -2616,7 +2616,7 @@ SearchParameters.prototype = {
|
|
|
2616
2616
|
}
|
|
2617
2617
|
|
|
2618
2618
|
return this.setQueryParameters({
|
|
2619
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2619
|
+
disjunctiveFacetsRefinements: RefinementList.toggleRefinement(
|
|
2620
2620
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2621
2621
|
});
|
|
2622
2622
|
},
|
|
@@ -2755,7 +2755,7 @@ SearchParameters.prototype = {
|
|
|
2755
2755
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2756
2756
|
return false;
|
|
2757
2757
|
}
|
|
2758
|
-
return RefinementList
|
|
2758
|
+
return RefinementList.isRefined(this.facetsRefinements, facet, value);
|
|
2759
2759
|
},
|
|
2760
2760
|
/**
|
|
2761
2761
|
* Returns true if the facet contains exclusions or if a specific value is
|
|
@@ -2771,7 +2771,7 @@ SearchParameters.prototype = {
|
|
|
2771
2771
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2772
2772
|
return false;
|
|
2773
2773
|
}
|
|
2774
|
-
return RefinementList
|
|
2774
|
+
return RefinementList.isRefined(this.facetsExcludes, facet, value);
|
|
2775
2775
|
},
|
|
2776
2776
|
/**
|
|
2777
2777
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2786,7 +2786,7 @@ SearchParameters.prototype = {
|
|
|
2786
2786
|
if (!this.isDisjunctiveFacet(facet)) {
|
|
2787
2787
|
return false;
|
|
2788
2788
|
}
|
|
2789
|
-
return RefinementList
|
|
2789
|
+
return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2790
2790
|
},
|
|
2791
2791
|
/**
|
|
2792
2792
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2972,7 +2972,7 @@ SearchParameters.prototype = {
|
|
|
2972
2972
|
var isNextValueDefined = nextWithNumbers[key] !== undefined;
|
|
2973
2973
|
|
|
2974
2974
|
if (isPreviousValueDefined && !isNextValueDefined) {
|
|
2975
|
-
return omit(previous, [key]);
|
|
2975
|
+
return omit$1(previous, [key]);
|
|
2976
2976
|
}
|
|
2977
2977
|
|
|
2978
2978
|
if (isNextValueDefined) {
|
|
@@ -4705,7 +4705,7 @@ var requestBuilder = {
|
|
|
4705
4705
|
|
|
4706
4706
|
var requestBuilder_1 = requestBuilder;
|
|
4707
4707
|
|
|
4708
|
-
var version = '3.4.4';
|
|
4708
|
+
var version$1 = '3.4.4';
|
|
4709
4709
|
|
|
4710
4710
|
/**
|
|
4711
4711
|
* Event triggered when a parameter is set or updated
|
|
@@ -4812,7 +4812,7 @@ var version = '3.4.4';
|
|
|
4812
4812
|
*/
|
|
4813
4813
|
function AlgoliaSearchHelper(client, index, options) {
|
|
4814
4814
|
if (typeof client.addAlgoliaAgent === 'function') {
|
|
4815
|
-
client.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
4815
|
+
client.addAlgoliaAgent('JS Helper (' + version$1 + ')');
|
|
4816
4816
|
}
|
|
4817
4817
|
|
|
4818
4818
|
this.setClient(client);
|
|
@@ -4967,7 +4967,7 @@ AlgoliaSearchHelper.prototype.findAnswers = function(options) {
|
|
|
4967
4967
|
nbHits: options.nbHits
|
|
4968
4968
|
},
|
|
4969
4969
|
{
|
|
4970
|
-
params: omit(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
4970
|
+
params: omit$1(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
4971
4971
|
'attributesToSnippet',
|
|
4972
4972
|
'hitsPerPage',
|
|
4973
4973
|
'restrictSearchableAttributes',
|
|
@@ -6081,7 +6081,7 @@ AlgoliaSearchHelper.prototype.setClient = function(newClient) {
|
|
|
6081
6081
|
if (this.client === newClient) return this;
|
|
6082
6082
|
|
|
6083
6083
|
if (typeof newClient.addAlgoliaAgent === 'function') {
|
|
6084
|
-
newClient.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
6084
|
+
newClient.addAlgoliaAgent('JS Helper (' + version$1 + ')');
|
|
6085
6085
|
}
|
|
6086
6086
|
this.client = newClient;
|
|
6087
6087
|
|
|
@@ -6200,7 +6200,7 @@ function algoliasearchHelper(client, index, opts) {
|
|
|
6200
6200
|
* @member module:algoliasearchHelper.version
|
|
6201
6201
|
* @type {number}
|
|
6202
6202
|
*/
|
|
6203
|
-
algoliasearchHelper.version = version;
|
|
6203
|
+
algoliasearchHelper.version = version$1;
|
|
6204
6204
|
|
|
6205
6205
|
/**
|
|
6206
6206
|
* Constructor for the Helper.
|
|
@@ -6232,13 +6232,13 @@ function createOptionalFilter(_ref) {
|
|
|
6232
6232
|
return "".concat(attributeName, ":").concat(attributeValue, "<score=").concat(attributeScore || 1, ">");
|
|
6233
6233
|
}
|
|
6234
6234
|
|
|
6235
|
-
var defaultProps
|
|
6235
|
+
var defaultProps = {
|
|
6236
6236
|
transformSearchParameters: function transformSearchParameters(x) {
|
|
6237
6237
|
return _objectSpread({}, x);
|
|
6238
6238
|
}
|
|
6239
6239
|
};
|
|
6240
6240
|
|
|
6241
|
-
function getId$
|
|
6241
|
+
function getId$1() {
|
|
6242
6242
|
// We store the search state of this widget in `configure`.
|
|
6243
6243
|
return 'configure';
|
|
6244
6244
|
}
|
|
@@ -6286,7 +6286,7 @@ function getSearchParametersFromProps(props) {
|
|
|
6286
6286
|
|
|
6287
6287
|
var connectConfigureRelatedItems = createConnectorWithContext({
|
|
6288
6288
|
displayName: 'AlgoliaConfigureRelatedItems',
|
|
6289
|
-
defaultProps: defaultProps
|
|
6289
|
+
defaultProps: defaultProps,
|
|
6290
6290
|
getProvidedProps: function getProvidedProps() {
|
|
6291
6291
|
return {};
|
|
6292
6292
|
},
|
|
@@ -6294,7 +6294,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6294
6294
|
return searchParameters.setQueryParameters(getSearchParametersFromProps(props));
|
|
6295
6295
|
},
|
|
6296
6296
|
transitionState: function transitionState(props, _prevSearchState, nextSearchState) {
|
|
6297
|
-
var id = getId$
|
|
6297
|
+
var id = getId$1(); // We need to transform the exhaustive search parameters back to clean
|
|
6298
6298
|
// search parameters without the empty default keys so we don't pollute the
|
|
6299
6299
|
// `configure` search state.
|
|
6300
6300
|
|
|
@@ -6305,7 +6305,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6305
6305
|
}) : [];
|
|
6306
6306
|
this._searchParameters = searchParameters;
|
|
6307
6307
|
|
|
6308
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit
|
|
6308
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6309
6309
|
|
|
6310
6310
|
return refineValue(nextSearchState, nextValue, {
|
|
6311
6311
|
ais: props.contextValue,
|
|
@@ -6315,7 +6315,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6315
6315
|
cleanUp: function cleanUp(props, searchState) {
|
|
6316
6316
|
var _this = this;
|
|
6317
6317
|
|
|
6318
|
-
var id = getId$
|
|
6318
|
+
var id = getId$1();
|
|
6319
6319
|
var indexId = getIndexId({
|
|
6320
6320
|
ais: props.contextValue,
|
|
6321
6321
|
multiIndexContext: props.indexContextValue
|
|
@@ -6388,7 +6388,7 @@ function getWidgetRefinements(attribute, widgetKey, searchState) {
|
|
|
6388
6388
|
}
|
|
6389
6389
|
}
|
|
6390
6390
|
|
|
6391
|
-
function getRefinements(attribute) {
|
|
6391
|
+
function getRefinements$1(attribute) {
|
|
6392
6392
|
var searchState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6393
6393
|
var refinements = Object.keys(searchState).filter(function (widgetKey) {
|
|
6394
6394
|
return searchState[widgetKey] !== undefined && searchState[widgetKey][attribute] !== undefined;
|
|
@@ -6405,7 +6405,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6405
6405
|
var searchState = _ref.searchState,
|
|
6406
6406
|
trackedFilters = _ref.trackedFilters;
|
|
6407
6407
|
var ruleContexts = Object.keys(trackedFilters).reduce(function (facets, facetName) {
|
|
6408
|
-
var facetRefinements = getRefinements(facetName, searchState);
|
|
6408
|
+
var facetRefinements = getRefinements$1(facetName, searchState);
|
|
6409
6409
|
var getTrackedFacetValues = trackedFilters[facetName];
|
|
6410
6410
|
var trackedFacetValues = getTrackedFacetValues(facetRefinements);
|
|
6411
6411
|
return [].concat(_toConsumableArray(facets), _toConsumableArray(facetRefinements.filter(function (facetRefinement) {
|
|
@@ -6417,7 +6417,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6417
6417
|
return ruleContexts;
|
|
6418
6418
|
}
|
|
6419
6419
|
|
|
6420
|
-
var defaultProps = {
|
|
6420
|
+
var defaultProps$1 = {
|
|
6421
6421
|
transformItems: function transformItems(items) {
|
|
6422
6422
|
return items;
|
|
6423
6423
|
},
|
|
@@ -6428,7 +6428,7 @@ var defaultProps = {
|
|
|
6428
6428
|
};
|
|
6429
6429
|
var connectQueryRules = createConnectorWithContext({
|
|
6430
6430
|
displayName: 'AlgoliaQueryRules',
|
|
6431
|
-
defaultProps: defaultProps,
|
|
6431
|
+
defaultProps: defaultProps$1,
|
|
6432
6432
|
getProvidedProps: function getProvidedProps(props, _1, searchResults) {
|
|
6433
6433
|
var results = getResults(searchResults, {
|
|
6434
6434
|
ais: props.contextValue,
|
|
@@ -6590,7 +6590,7 @@ function (_Component) {
|
|
|
6590
6590
|
return null;
|
|
6591
6591
|
}
|
|
6592
6592
|
|
|
6593
|
-
return
|
|
6593
|
+
return React__default.createElement(IndexProvider, {
|
|
6594
6594
|
value: this.state.indexContext
|
|
6595
6595
|
}, this.props.children);
|
|
6596
6596
|
}
|
|
@@ -6605,10 +6605,20 @@ _defineProperty(Index, "propTypes", {
|
|
|
6605
6605
|
children: PropTypes.node
|
|
6606
6606
|
});
|
|
6607
6607
|
|
|
6608
|
-
({
|
|
6608
|
+
var IndexWrapper = function IndexWrapper(props) {
|
|
6609
|
+
var inferredIndexId = props.indexName;
|
|
6610
|
+
return React__default.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
6611
|
+
return React__default.createElement(Index, _extends({
|
|
6612
|
+
contextValue: contextValue,
|
|
6613
|
+
indexId: inferredIndexId
|
|
6614
|
+
}, props));
|
|
6615
|
+
});
|
|
6616
|
+
};
|
|
6617
|
+
|
|
6618
|
+
IndexWrapper.propTypes = {
|
|
6609
6619
|
indexName: PropTypes.string.isRequired,
|
|
6610
6620
|
indexId: PropTypes.string
|
|
6611
|
-
}
|
|
6621
|
+
};
|
|
6612
6622
|
|
|
6613
6623
|
function createWidgetsManager(onWidgetsUpdate) {
|
|
6614
6624
|
var widgets = []; // Is an update scheduled?
|
|
@@ -6669,7 +6679,7 @@ function createStore(initialState) {
|
|
|
6669
6679
|
function addAlgoliaAgents(searchClient) {
|
|
6670
6680
|
if (typeof searchClient.addAlgoliaAgent === 'function') {
|
|
6671
6681
|
searchClient.addAlgoliaAgent("react (".concat(version$2, ")"));
|
|
6672
|
-
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version
|
|
6682
|
+
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version, ")"));
|
|
6673
6683
|
}
|
|
6674
6684
|
}
|
|
6675
6685
|
|
|
@@ -6907,8 +6917,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6907
6917
|
nextIsSearchStalled = false;
|
|
6908
6918
|
}
|
|
6909
6919
|
|
|
6910
|
-
currentState.resultsFacetValues
|
|
6911
|
-
|
|
6920
|
+
var resultsFacetValues = currentState.resultsFacetValues,
|
|
6921
|
+
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6912
6922
|
|
|
6913
6923
|
store.setState(_objectSpread({}, partialState, {
|
|
6914
6924
|
results: results,
|
|
@@ -6929,8 +6939,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6929
6939
|
nextIsSearchStalled = false;
|
|
6930
6940
|
}
|
|
6931
6941
|
|
|
6932
|
-
currentState.resultsFacetValues
|
|
6933
|
-
|
|
6942
|
+
var resultsFacetValues = currentState.resultsFacetValues,
|
|
6943
|
+
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6934
6944
|
|
|
6935
6945
|
store.setState(_objectSpread({}, partialState, {
|
|
6936
6946
|
isSearchStalled: nextIsSearchStalled,
|
|
@@ -6942,9 +6952,9 @@ function createInstantSearchManager(_ref) {
|
|
|
6942
6952
|
function handleNewSearch() {
|
|
6943
6953
|
if (!stalledSearchTimer) {
|
|
6944
6954
|
stalledSearchTimer = setTimeout(function () {
|
|
6945
|
-
var _store$getState = store.getState()
|
|
6946
|
-
_store$getState.resultsFacetValues
|
|
6947
|
-
|
|
6955
|
+
var _store$getState = store.getState(),
|
|
6956
|
+
resultsFacetValues = _store$getState.resultsFacetValues,
|
|
6957
|
+
partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
6948
6958
|
|
|
6949
6959
|
store.setState(_objectSpread({}, partialState, {
|
|
6950
6960
|
isSearchStalled: true
|
|
@@ -7409,7 +7419,7 @@ function (_Component) {
|
|
|
7409
7419
|
return null;
|
|
7410
7420
|
}
|
|
7411
7421
|
|
|
7412
|
-
return
|
|
7422
|
+
return React__default.createElement(InstantSearchProvider, {
|
|
7413
7423
|
value: this.state.contextValue
|
|
7414
7424
|
}, this.props.children);
|
|
7415
7425
|
}
|
|
@@ -7443,21 +7453,21 @@ _defineProperty(InstantSearch, "propTypes", {
|
|
|
7443
7453
|
stalledSearchDelay: PropTypes.number
|
|
7444
7454
|
});
|
|
7445
7455
|
|
|
7446
|
-
var getId$
|
|
7456
|
+
var getId$2 = function getId(props) {
|
|
7447
7457
|
return props.attributes[0];
|
|
7448
7458
|
};
|
|
7449
|
-
var namespace
|
|
7459
|
+
var namespace = 'hierarchicalMenu';
|
|
7450
7460
|
|
|
7451
|
-
function _refine
|
|
7452
|
-
var id = getId$
|
|
7461
|
+
function _refine(props, searchState, nextRefinement, context) {
|
|
7462
|
+
var id = getId$2(props);
|
|
7453
7463
|
|
|
7454
7464
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7455
7465
|
|
|
7456
7466
|
var resetPage = true;
|
|
7457
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace
|
|
7467
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
7458
7468
|
}
|
|
7459
7469
|
|
|
7460
|
-
function transformValue
|
|
7470
|
+
function transformValue(values) {
|
|
7461
7471
|
return values.reduce(function (acc, item) {
|
|
7462
7472
|
if (item.isRefined) {
|
|
7463
7473
|
acc.push({
|
|
@@ -7468,7 +7478,7 @@ function transformValue$1(values) {
|
|
|
7468
7478
|
}); // Create a variable in order to keep the same acc for the recursion, otherwise "reduce" returns a new one
|
|
7469
7479
|
|
|
7470
7480
|
if (item.data) {
|
|
7471
|
-
acc = acc.concat(transformValue
|
|
7481
|
+
acc = acc.concat(transformValue(item.data));
|
|
7472
7482
|
}
|
|
7473
7483
|
}
|
|
7474
7484
|
|
|
@@ -7530,7 +7540,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7530
7540
|
transformItems: PropTypes.func
|
|
7531
7541
|
},
|
|
7532
7542
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
7533
|
-
var id = getId$
|
|
7543
|
+
var id = getId$2(props);
|
|
7534
7544
|
var results = getResults(searchResults, {
|
|
7535
7545
|
ais: props.contextValue,
|
|
7536
7546
|
multiIndexContext: props.indexContextValue
|
|
@@ -7545,7 +7555,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7545
7555
|
}
|
|
7546
7556
|
|
|
7547
7557
|
var values = results.getFacetValues(id);
|
|
7548
|
-
var items = values.data ? transformValue
|
|
7558
|
+
var items = values.data ? transformValue(values.data) : [];
|
|
7549
7559
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7550
7560
|
return {
|
|
7551
7561
|
canRefine: transformedItems.length > 0,
|
|
@@ -7553,7 +7563,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7553
7563
|
};
|
|
7554
7564
|
},
|
|
7555
7565
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7556
|
-
return _refine
|
|
7566
|
+
return _refine(props, searchState, nextRefinement, {
|
|
7557
7567
|
ais: props.contextValue,
|
|
7558
7568
|
multiIndexContext: props.indexContextValue
|
|
7559
7569
|
});
|
|
@@ -7616,13 +7626,13 @@ var connectCurrentRefinements = createConnectorWithContext({
|
|
|
7616
7626
|
}
|
|
7617
7627
|
});
|
|
7618
7628
|
|
|
7619
|
-
var getId$
|
|
7629
|
+
var getId$3 = function getId(props) {
|
|
7620
7630
|
return props.attributes[0];
|
|
7621
7631
|
};
|
|
7622
|
-
var namespace$
|
|
7632
|
+
var namespace$1 = 'hierarchicalMenu';
|
|
7623
7633
|
|
|
7624
|
-
function getCurrentRefinement
|
|
7625
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
7634
|
+
function getCurrentRefinement(props, searchState, context) {
|
|
7635
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$1, ".").concat(getId$3(props)), null);
|
|
7626
7636
|
|
|
7627
7637
|
if (currentRefinement === '') {
|
|
7628
7638
|
return null;
|
|
@@ -7631,13 +7641,13 @@ function getCurrentRefinement$b(props, searchState, context) {
|
|
|
7631
7641
|
return currentRefinement;
|
|
7632
7642
|
}
|
|
7633
7643
|
|
|
7634
|
-
function getValue
|
|
7644
|
+
function getValue(path, props, searchState, context) {
|
|
7635
7645
|
var id = props.id,
|
|
7636
7646
|
attributes = props.attributes,
|
|
7637
7647
|
separator = props.separator,
|
|
7638
7648
|
rootPath = props.rootPath,
|
|
7639
7649
|
showParentLevel = props.showParentLevel;
|
|
7640
|
-
var currentRefinement = getCurrentRefinement
|
|
7650
|
+
var currentRefinement = getCurrentRefinement(props, searchState, context);
|
|
7641
7651
|
var nextRefinement;
|
|
7642
7652
|
|
|
7643
7653
|
if (currentRefinement === null) {
|
|
@@ -7658,14 +7668,14 @@ function getValue$2(path, props, searchState, context) {
|
|
|
7658
7668
|
return nextRefinement;
|
|
7659
7669
|
}
|
|
7660
7670
|
|
|
7661
|
-
function transformValue(value, props, searchState, context) {
|
|
7671
|
+
function transformValue$1(value, props, searchState, context) {
|
|
7662
7672
|
return value.map(function (v) {
|
|
7663
7673
|
return {
|
|
7664
7674
|
label: v.name,
|
|
7665
|
-
value: getValue
|
|
7675
|
+
value: getValue(v.path, props, searchState, context),
|
|
7666
7676
|
count: v.count,
|
|
7667
7677
|
isRefined: v.isRefined,
|
|
7668
|
-
items: v.data && transformValue(v.data, props, searchState, context)
|
|
7678
|
+
items: v.data && transformValue$1(v.data, props, searchState, context)
|
|
7669
7679
|
};
|
|
7670
7680
|
});
|
|
7671
7681
|
}
|
|
@@ -7681,20 +7691,20 @@ var truncate = function truncate() {
|
|
|
7681
7691
|
});
|
|
7682
7692
|
};
|
|
7683
7693
|
|
|
7684
|
-
function _refine$
|
|
7685
|
-
var id = getId$
|
|
7694
|
+
function _refine$1(props, searchState, nextRefinement, context) {
|
|
7695
|
+
var id = getId$3(props);
|
|
7686
7696
|
|
|
7687
7697
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7688
7698
|
|
|
7689
7699
|
var resetPage = true;
|
|
7690
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
7700
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$1);
|
|
7691
7701
|
}
|
|
7692
7702
|
|
|
7693
|
-
function _cleanUp
|
|
7694
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
7703
|
+
function _cleanUp(props, searchState, context) {
|
|
7704
|
+
return cleanUpValue(searchState, context, "".concat(namespace$1, ".").concat(getId$3(props)));
|
|
7695
7705
|
}
|
|
7696
7706
|
|
|
7697
|
-
var sortBy
|
|
7707
|
+
var sortBy = ['name:asc'];
|
|
7698
7708
|
/**
|
|
7699
7709
|
* connectHierarchicalMenu connector provides the logic to build a widget that will
|
|
7700
7710
|
* give the user the ability to explore a tree-like structure.
|
|
@@ -7776,7 +7786,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7776
7786
|
var showMore = props.showMore,
|
|
7777
7787
|
limit = props.limit,
|
|
7778
7788
|
showMoreLimit = props.showMoreLimit;
|
|
7779
|
-
var id = getId$
|
|
7789
|
+
var id = getId$3(props);
|
|
7780
7790
|
var results = getResults(searchResults, {
|
|
7781
7791
|
ais: props.contextValue,
|
|
7782
7792
|
multiIndexContext: props.indexContextValue
|
|
@@ -7786,7 +7796,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7786
7796
|
if (!isFacetPresent) {
|
|
7787
7797
|
return {
|
|
7788
7798
|
items: [],
|
|
7789
|
-
currentRefinement: getCurrentRefinement
|
|
7799
|
+
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7790
7800
|
ais: props.contextValue,
|
|
7791
7801
|
multiIndexContext: props.indexContextValue
|
|
7792
7802
|
}),
|
|
@@ -7796,16 +7806,16 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7796
7806
|
|
|
7797
7807
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7798
7808
|
var value = results.getFacetValues(id, {
|
|
7799
|
-
sortBy: sortBy
|
|
7809
|
+
sortBy: sortBy
|
|
7800
7810
|
});
|
|
7801
|
-
var items = value.data ? transformValue(value.data, props, searchState, {
|
|
7811
|
+
var items = value.data ? transformValue$1(value.data, props, searchState, {
|
|
7802
7812
|
ais: props.contextValue,
|
|
7803
7813
|
multiIndexContext: props.indexContextValue
|
|
7804
7814
|
}) : [];
|
|
7805
7815
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7806
7816
|
return {
|
|
7807
7817
|
items: truncate(transformedItems, itemsLimit),
|
|
7808
|
-
currentRefinement: getCurrentRefinement
|
|
7818
|
+
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7809
7819
|
ais: props.contextValue,
|
|
7810
7820
|
multiIndexContext: props.indexContextValue
|
|
7811
7821
|
}),
|
|
@@ -7813,13 +7823,13 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7813
7823
|
};
|
|
7814
7824
|
},
|
|
7815
7825
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7816
|
-
return _refine$
|
|
7826
|
+
return _refine$1(props, searchState, nextRefinement, {
|
|
7817
7827
|
ais: props.contextValue,
|
|
7818
7828
|
multiIndexContext: props.indexContextValue
|
|
7819
7829
|
});
|
|
7820
7830
|
},
|
|
7821
7831
|
cleanUp: function cleanUp(props, searchState) {
|
|
7822
|
-
return _cleanUp
|
|
7832
|
+
return _cleanUp(props, searchState, {
|
|
7823
7833
|
ais: props.contextValue,
|
|
7824
7834
|
multiIndexContext: props.indexContextValue
|
|
7825
7835
|
});
|
|
@@ -7833,7 +7843,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7833
7843
|
limit = props.limit,
|
|
7834
7844
|
showMoreLimit = props.showMoreLimit,
|
|
7835
7845
|
contextValue = props.contextValue;
|
|
7836
|
-
var id = getId$
|
|
7846
|
+
var id = getId$3(props);
|
|
7837
7847
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7838
7848
|
searchParameters = searchParameters.addHierarchicalFacet({
|
|
7839
7849
|
name: id,
|
|
@@ -7844,7 +7854,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7844
7854
|
}).setQueryParameters({
|
|
7845
7855
|
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, itemsLimit)
|
|
7846
7856
|
});
|
|
7847
|
-
var currentRefinement = getCurrentRefinement
|
|
7857
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7848
7858
|
ais: contextValue,
|
|
7849
7859
|
multiIndexContext: props.indexContextValue
|
|
7850
7860
|
});
|
|
@@ -7857,8 +7867,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7857
7867
|
},
|
|
7858
7868
|
getMetadata: function getMetadata(props, searchState) {
|
|
7859
7869
|
var rootAttribute = props.attributes[0];
|
|
7860
|
-
var id = getId$
|
|
7861
|
-
var currentRefinement = getCurrentRefinement
|
|
7870
|
+
var id = getId$3(props);
|
|
7871
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7862
7872
|
ais: props.contextValue,
|
|
7863
7873
|
multiIndexContext: props.indexContextValue
|
|
7864
7874
|
});
|
|
@@ -7866,7 +7876,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7866
7876
|
label: "".concat(rootAttribute, ": ").concat(currentRefinement),
|
|
7867
7877
|
attribute: rootAttribute,
|
|
7868
7878
|
value: function value(nextState) {
|
|
7869
|
-
return _refine$
|
|
7879
|
+
return _refine$1(props, nextState, '', {
|
|
7870
7880
|
ais: props.contextValue,
|
|
7871
7881
|
multiIndexContext: props.indexContextValue
|
|
7872
7882
|
});
|
|
@@ -8043,12 +8053,12 @@ var connectHits = createConnectorWithContext({
|
|
|
8043
8053
|
}
|
|
8044
8054
|
});
|
|
8045
8055
|
|
|
8046
|
-
function getId$
|
|
8056
|
+
function getId$4() {
|
|
8047
8057
|
return 'hitsPerPage';
|
|
8048
8058
|
}
|
|
8049
8059
|
|
|
8050
|
-
function getCurrentRefinement$
|
|
8051
|
-
var id = getId$
|
|
8060
|
+
function getCurrentRefinement$1(props, searchState, context) {
|
|
8061
|
+
var id = getId$4();
|
|
8052
8062
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
8053
8063
|
|
|
8054
8064
|
if (typeof currentRefinement === 'string') {
|
|
@@ -8083,7 +8093,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8083
8093
|
transformItems: PropTypes.func
|
|
8084
8094
|
},
|
|
8085
8095
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
8086
|
-
var currentRefinement = getCurrentRefinement$
|
|
8096
|
+
var currentRefinement = getCurrentRefinement$1(props, searchState, {
|
|
8087
8097
|
ais: props.contextValue,
|
|
8088
8098
|
multiIndexContext: props.indexContextValue
|
|
8089
8099
|
});
|
|
@@ -8100,7 +8110,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8100
8110
|
};
|
|
8101
8111
|
},
|
|
8102
8112
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8103
|
-
var id = getId$
|
|
8113
|
+
var id = getId$4();
|
|
8104
8114
|
|
|
8105
8115
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
8106
8116
|
|
|
@@ -8114,27 +8124,27 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8114
8124
|
return cleanUpValue(searchState, {
|
|
8115
8125
|
ais: props.contextValue,
|
|
8116
8126
|
multiIndexContext: props.indexContextValue
|
|
8117
|
-
}, getId$
|
|
8127
|
+
}, getId$4());
|
|
8118
8128
|
},
|
|
8119
8129
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8120
|
-
return searchParameters.setHitsPerPage(getCurrentRefinement$
|
|
8130
|
+
return searchParameters.setHitsPerPage(getCurrentRefinement$1(props, searchState, {
|
|
8121
8131
|
ais: props.contextValue,
|
|
8122
8132
|
multiIndexContext: props.indexContextValue
|
|
8123
8133
|
}));
|
|
8124
8134
|
},
|
|
8125
8135
|
getMetadata: function getMetadata() {
|
|
8126
8136
|
return {
|
|
8127
|
-
id: getId$
|
|
8137
|
+
id: getId$4()
|
|
8128
8138
|
};
|
|
8129
8139
|
}
|
|
8130
8140
|
});
|
|
8131
8141
|
|
|
8132
|
-
function getId$
|
|
8142
|
+
function getId$5() {
|
|
8133
8143
|
return 'page';
|
|
8134
8144
|
}
|
|
8135
8145
|
|
|
8136
|
-
function getCurrentRefinement$
|
|
8137
|
-
var id = getId$
|
|
8146
|
+
function getCurrentRefinement$2(props, searchState, context) {
|
|
8147
|
+
var id = getId$5();
|
|
8138
8148
|
var page = 1;
|
|
8139
8149
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8140
8150
|
|
|
@@ -8146,9 +8156,9 @@ function getCurrentRefinement$9(props, searchState, context) {
|
|
|
8146
8156
|
}
|
|
8147
8157
|
|
|
8148
8158
|
function getStateWithoutPage(state) {
|
|
8149
|
-
var _ref = state || {}
|
|
8150
|
-
_ref.page
|
|
8151
|
-
|
|
8159
|
+
var _ref = state || {},
|
|
8160
|
+
page = _ref.page,
|
|
8161
|
+
rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8152
8162
|
|
|
8153
8163
|
return rest;
|
|
8154
8164
|
}
|
|
@@ -8257,14 +8267,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8257
8267
|
},
|
|
8258
8268
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8259
8269
|
return searchParameters.setQueryParameters({
|
|
8260
|
-
page: getCurrentRefinement$
|
|
8270
|
+
page: getCurrentRefinement$2(props, searchState, {
|
|
8261
8271
|
ais: props.contextValue,
|
|
8262
8272
|
multiIndexContext: props.indexContextValue
|
|
8263
8273
|
}) - 1
|
|
8264
8274
|
});
|
|
8265
8275
|
},
|
|
8266
8276
|
refine: function refine(props, searchState, event, index) {
|
|
8267
|
-
var id = getId$
|
|
8277
|
+
var id = getId$5();
|
|
8268
8278
|
|
|
8269
8279
|
var nextValue = _defineProperty({}, id, index + 1);
|
|
8270
8280
|
|
|
@@ -8276,14 +8286,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8276
8286
|
}
|
|
8277
8287
|
});
|
|
8278
8288
|
|
|
8279
|
-
var namespace$
|
|
8289
|
+
var namespace$2 = 'menu';
|
|
8280
8290
|
|
|
8281
|
-
function getId$
|
|
8291
|
+
function getId$6(props) {
|
|
8282
8292
|
return props.attribute;
|
|
8283
8293
|
}
|
|
8284
8294
|
|
|
8285
|
-
function getCurrentRefinement$
|
|
8286
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8295
|
+
function getCurrentRefinement$3(props, searchState, context) {
|
|
8296
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)), null);
|
|
8287
8297
|
|
|
8288
8298
|
if (currentRefinement === '') {
|
|
8289
8299
|
return null;
|
|
@@ -8293,28 +8303,28 @@ function getCurrentRefinement$8(props, searchState, context) {
|
|
|
8293
8303
|
}
|
|
8294
8304
|
|
|
8295
8305
|
function getValue$1(name, props, searchState, context) {
|
|
8296
|
-
var currentRefinement = getCurrentRefinement$
|
|
8306
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, context);
|
|
8297
8307
|
return name === currentRefinement ? '' : name;
|
|
8298
8308
|
}
|
|
8299
8309
|
|
|
8300
|
-
function getLimit
|
|
8310
|
+
function getLimit(_ref) {
|
|
8301
8311
|
var showMore = _ref.showMore,
|
|
8302
8312
|
limit = _ref.limit,
|
|
8303
8313
|
showMoreLimit = _ref.showMoreLimit;
|
|
8304
8314
|
return showMore ? showMoreLimit : limit;
|
|
8305
8315
|
}
|
|
8306
8316
|
|
|
8307
|
-
function _refine$
|
|
8308
|
-
var id = getId$
|
|
8317
|
+
function _refine$2(props, searchState, nextRefinement, context) {
|
|
8318
|
+
var id = getId$6(props);
|
|
8309
8319
|
|
|
8310
8320
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : '');
|
|
8311
8321
|
|
|
8312
8322
|
var resetPage = true;
|
|
8313
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
8323
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$2);
|
|
8314
8324
|
}
|
|
8315
8325
|
|
|
8316
|
-
function _cleanUp$
|
|
8317
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
8326
|
+
function _cleanUp$1(props, searchState, context) {
|
|
8327
|
+
return cleanUpValue(searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)));
|
|
8318
8328
|
}
|
|
8319
8329
|
|
|
8320
8330
|
var defaultSortBy = ['count:desc', 'name:asc'];
|
|
@@ -8373,7 +8383,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8373
8383
|
if (!canRefine) {
|
|
8374
8384
|
return {
|
|
8375
8385
|
items: [],
|
|
8376
|
-
currentRefinement: getCurrentRefinement$
|
|
8386
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
8377
8387
|
ais: props.contextValue,
|
|
8378
8388
|
multiIndexContext: props.indexContextValue
|
|
8379
8389
|
}),
|
|
@@ -8420,8 +8430,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8420
8430
|
|
|
8421
8431
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
8422
8432
|
return {
|
|
8423
|
-
items: transformedItems.slice(0, getLimit
|
|
8424
|
-
currentRefinement: getCurrentRefinement$
|
|
8433
|
+
items: transformedItems.slice(0, getLimit(props)),
|
|
8434
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
8425
8435
|
ais: props.contextValue,
|
|
8426
8436
|
multiIndexContext: props.indexContextValue
|
|
8427
8437
|
}),
|
|
@@ -8431,7 +8441,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8431
8441
|
};
|
|
8432
8442
|
},
|
|
8433
8443
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8434
|
-
return _refine$
|
|
8444
|
+
return _refine$2(props, searchState, nextRefinement, {
|
|
8435
8445
|
ais: props.contextValue,
|
|
8436
8446
|
multiIndexContext: props.indexContextValue
|
|
8437
8447
|
});
|
|
@@ -8440,11 +8450,11 @@ var connectMenu = createConnectorWithContext({
|
|
|
8440
8450
|
return {
|
|
8441
8451
|
facetName: props.attribute,
|
|
8442
8452
|
query: nextRefinement,
|
|
8443
|
-
maxFacetHits: getLimit
|
|
8453
|
+
maxFacetHits: getLimit(props)
|
|
8444
8454
|
};
|
|
8445
8455
|
},
|
|
8446
8456
|
cleanUp: function cleanUp(props, searchState) {
|
|
8447
|
-
return _cleanUp$
|
|
8457
|
+
return _cleanUp$1(props, searchState, {
|
|
8448
8458
|
ais: props.contextValue,
|
|
8449
8459
|
multiIndexContext: props.indexContextValue
|
|
8450
8460
|
});
|
|
@@ -8452,10 +8462,10 @@ var connectMenu = createConnectorWithContext({
|
|
|
8452
8462
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8453
8463
|
var attribute = props.attribute;
|
|
8454
8464
|
searchParameters = searchParameters.setQueryParameters({
|
|
8455
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit
|
|
8465
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
8456
8466
|
});
|
|
8457
8467
|
searchParameters = searchParameters.addDisjunctiveFacet(attribute);
|
|
8458
|
-
var currentRefinement = getCurrentRefinement$
|
|
8468
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
8459
8469
|
ais: props.contextValue,
|
|
8460
8470
|
multiIndexContext: props.indexContextValue
|
|
8461
8471
|
});
|
|
@@ -8467,8 +8477,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8467
8477
|
return searchParameters;
|
|
8468
8478
|
},
|
|
8469
8479
|
getMetadata: function getMetadata(props, searchState) {
|
|
8470
|
-
var id = getId$
|
|
8471
|
-
var currentRefinement = getCurrentRefinement$
|
|
8480
|
+
var id = getId$6(props);
|
|
8481
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
8472
8482
|
ais: props.contextValue,
|
|
8473
8483
|
multiIndexContext: props.indexContextValue
|
|
8474
8484
|
});
|
|
@@ -8482,7 +8492,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8482
8492
|
label: "".concat(props.attribute, ": ").concat(currentRefinement),
|
|
8483
8493
|
attribute: props.attribute,
|
|
8484
8494
|
value: function value(nextState) {
|
|
8485
|
-
return _refine$
|
|
8495
|
+
return _refine$2(props, nextState, '', {
|
|
8486
8496
|
ais: props.contextValue,
|
|
8487
8497
|
multiIndexContext: props.indexContextValue
|
|
8488
8498
|
});
|
|
@@ -8563,12 +8573,12 @@ function parseItem(value) {
|
|
|
8563
8573
|
|
|
8564
8574
|
var namespace$3 = 'multiRange';
|
|
8565
8575
|
|
|
8566
|
-
function getId$
|
|
8576
|
+
function getId$7(props) {
|
|
8567
8577
|
return props.attribute;
|
|
8568
8578
|
}
|
|
8569
8579
|
|
|
8570
|
-
function getCurrentRefinement$
|
|
8571
|
-
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8580
|
+
function getCurrentRefinement$4(props, searchState, context) {
|
|
8581
|
+
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$7(props)), '');
|
|
8572
8582
|
}
|
|
8573
8583
|
|
|
8574
8584
|
function isRefinementsRangeIncludesInsideItemRange(stats, start, end) {
|
|
@@ -8587,15 +8597,15 @@ function itemHasRefinement(attribute, results, value) {
|
|
|
8587
8597
|
return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end)));
|
|
8588
8598
|
}
|
|
8589
8599
|
|
|
8590
|
-
function _refine$
|
|
8591
|
-
var nextValue = _defineProperty({}, getId$
|
|
8600
|
+
function _refine$3(props, searchState, nextRefinement, context) {
|
|
8601
|
+
var nextValue = _defineProperty({}, getId$7(props), nextRefinement);
|
|
8592
8602
|
|
|
8593
8603
|
var resetPage = true;
|
|
8594
8604
|
return refineValue(searchState, nextValue, context, resetPage, namespace$3);
|
|
8595
8605
|
}
|
|
8596
8606
|
|
|
8597
|
-
function _cleanUp$
|
|
8598
|
-
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8607
|
+
function _cleanUp$2(props, searchState, context) {
|
|
8608
|
+
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$7(props)));
|
|
8599
8609
|
}
|
|
8600
8610
|
/**
|
|
8601
8611
|
* connectNumericMenu connector provides the logic to build a widget that will
|
|
@@ -8629,7 +8639,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8629
8639
|
},
|
|
8630
8640
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
8631
8641
|
var attribute = props.attribute;
|
|
8632
|
-
var currentRefinement = getCurrentRefinement$
|
|
8642
|
+
var currentRefinement = getCurrentRefinement$4(props, searchState, {
|
|
8633
8643
|
ais: props.contextValue,
|
|
8634
8644
|
multiIndexContext: props.indexContextValue
|
|
8635
8645
|
});
|
|
@@ -8643,11 +8653,11 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8643
8653
|
label: item.label,
|
|
8644
8654
|
value: value,
|
|
8645
8655
|
isRefined: value === currentRefinement,
|
|
8646
|
-
noRefinement: results ? itemHasRefinement(getId$
|
|
8656
|
+
noRefinement: results ? itemHasRefinement(getId$7(props), results, value) : false
|
|
8647
8657
|
};
|
|
8648
8658
|
});
|
|
8649
8659
|
var stats = results && results.getFacetByName(attribute) ? results.getFacetStats(attribute) : null;
|
|
8650
|
-
var refinedItem = find
|
|
8660
|
+
var refinedItem = find(items, function (item) {
|
|
8651
8661
|
return item.isRefined === true;
|
|
8652
8662
|
});
|
|
8653
8663
|
|
|
@@ -8672,13 +8682,13 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8672
8682
|
};
|
|
8673
8683
|
},
|
|
8674
8684
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8675
|
-
return _refine$
|
|
8685
|
+
return _refine$3(props, searchState, nextRefinement, {
|
|
8676
8686
|
ais: props.contextValue,
|
|
8677
8687
|
multiIndexContext: props.indexContextValue
|
|
8678
8688
|
});
|
|
8679
8689
|
},
|
|
8680
8690
|
cleanUp: function cleanUp(props, searchState) {
|
|
8681
|
-
return _cleanUp$
|
|
8691
|
+
return _cleanUp$2(props, searchState, {
|
|
8682
8692
|
ais: props.contextValue,
|
|
8683
8693
|
multiIndexContext: props.indexContextValue
|
|
8684
8694
|
});
|
|
@@ -8686,7 +8696,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8686
8696
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8687
8697
|
var attribute = props.attribute;
|
|
8688
8698
|
|
|
8689
|
-
var _parseItem = parseItem(getCurrentRefinement$
|
|
8699
|
+
var _parseItem = parseItem(getCurrentRefinement$4(props, searchState, {
|
|
8690
8700
|
ais: props.contextValue,
|
|
8691
8701
|
multiIndexContext: props.indexContextValue
|
|
8692
8702
|
})),
|
|
@@ -8706,8 +8716,8 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8706
8716
|
return searchParameters;
|
|
8707
8717
|
},
|
|
8708
8718
|
getMetadata: function getMetadata(props, searchState) {
|
|
8709
|
-
var id = getId$
|
|
8710
|
-
var value = getCurrentRefinement$
|
|
8719
|
+
var id = getId$7(props);
|
|
8720
|
+
var value = getCurrentRefinement$4(props, searchState, {
|
|
8711
8721
|
ais: props.contextValue,
|
|
8712
8722
|
multiIndexContext: props.indexContextValue
|
|
8713
8723
|
});
|
|
@@ -8718,7 +8728,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8718
8728
|
});
|
|
8719
8729
|
|
|
8720
8730
|
if (value !== '') {
|
|
8721
|
-
var _find = find
|
|
8731
|
+
var _find = find(props.items, function (item) {
|
|
8722
8732
|
return stringifyItem(item) === value;
|
|
8723
8733
|
}),
|
|
8724
8734
|
label = _find.label;
|
|
@@ -8728,7 +8738,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8728
8738
|
attribute: props.attribute,
|
|
8729
8739
|
currentRefinement: label,
|
|
8730
8740
|
value: function value(nextState) {
|
|
8731
|
-
return _refine$
|
|
8741
|
+
return _refine$3(props, nextState, '', {
|
|
8732
8742
|
ais: props.contextValue,
|
|
8733
8743
|
multiIndexContext: props.indexContextValue
|
|
8734
8744
|
});
|
|
@@ -8744,12 +8754,12 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8744
8754
|
}
|
|
8745
8755
|
});
|
|
8746
8756
|
|
|
8747
|
-
function getId$
|
|
8757
|
+
function getId$8() {
|
|
8748
8758
|
return 'page';
|
|
8749
8759
|
}
|
|
8750
8760
|
|
|
8751
|
-
function getCurrentRefinement$
|
|
8752
|
-
var id = getId$
|
|
8761
|
+
function getCurrentRefinement$5(props, searchState, context) {
|
|
8762
|
+
var id = getId$8();
|
|
8753
8763
|
var page = 1;
|
|
8754
8764
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8755
8765
|
|
|
@@ -8760,8 +8770,8 @@ function getCurrentRefinement$6(props, searchState, context) {
|
|
|
8760
8770
|
return currentRefinement;
|
|
8761
8771
|
}
|
|
8762
8772
|
|
|
8763
|
-
function _refine$
|
|
8764
|
-
var id = getId$
|
|
8773
|
+
function _refine$4(props, searchState, nextPage, context) {
|
|
8774
|
+
var id = getId$8();
|
|
8765
8775
|
|
|
8766
8776
|
var nextValue = _defineProperty({}, id, nextPage);
|
|
8767
8777
|
|
|
@@ -8801,7 +8811,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8801
8811
|
var nbPages = results.nbPages;
|
|
8802
8812
|
return {
|
|
8803
8813
|
nbPages: nbPages,
|
|
8804
|
-
currentRefinement: getCurrentRefinement$
|
|
8814
|
+
currentRefinement: getCurrentRefinement$5(props, searchState, {
|
|
8805
8815
|
ais: props.contextValue,
|
|
8806
8816
|
multiIndexContext: props.indexContextValue
|
|
8807
8817
|
}),
|
|
@@ -8809,7 +8819,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8809
8819
|
};
|
|
8810
8820
|
},
|
|
8811
8821
|
refine: function refine(props, searchState, nextPage) {
|
|
8812
|
-
return _refine$
|
|
8822
|
+
return _refine$4(props, searchState, nextPage, {
|
|
8813
8823
|
ais: props.contextValue,
|
|
8814
8824
|
multiIndexContext: props.indexContextValue
|
|
8815
8825
|
});
|
|
@@ -8818,17 +8828,17 @@ var connectPagination = createConnectorWithContext({
|
|
|
8818
8828
|
return cleanUpValue(searchState, {
|
|
8819
8829
|
ais: props.contextValue,
|
|
8820
8830
|
multiIndexContext: props.indexContextValue
|
|
8821
|
-
}, getId$
|
|
8831
|
+
}, getId$8());
|
|
8822
8832
|
},
|
|
8823
8833
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8824
|
-
return searchParameters.setPage(getCurrentRefinement$
|
|
8834
|
+
return searchParameters.setPage(getCurrentRefinement$5(props, searchState, {
|
|
8825
8835
|
ais: props.contextValue,
|
|
8826
8836
|
multiIndexContext: props.indexContextValue
|
|
8827
8837
|
}) - 1);
|
|
8828
8838
|
},
|
|
8829
8839
|
getMetadata: function getMetadata() {
|
|
8830
8840
|
return {
|
|
8831
|
-
id: getId$
|
|
8841
|
+
id: getId$8()
|
|
8832
8842
|
};
|
|
8833
8843
|
}
|
|
8834
8844
|
});
|
|
@@ -8874,11 +8884,11 @@ var connectPoweredBy = createConnectorWithContext({
|
|
|
8874
8884
|
* @providedPropType {number} precision - Number of digits after decimal point to use.
|
|
8875
8885
|
*/
|
|
8876
8886
|
|
|
8877
|
-
function getId$
|
|
8887
|
+
function getId$9(props) {
|
|
8878
8888
|
return props.attribute;
|
|
8879
8889
|
}
|
|
8880
8890
|
|
|
8881
|
-
var namespace$
|
|
8891
|
+
var namespace$4 = 'range';
|
|
8882
8892
|
|
|
8883
8893
|
function getCurrentRange(boundaries, stats, precision) {
|
|
8884
8894
|
var pow = Math.pow(10, precision);
|
|
@@ -8908,8 +8918,8 @@ function getCurrentRange(boundaries, stats, precision) {
|
|
|
8908
8918
|
};
|
|
8909
8919
|
}
|
|
8910
8920
|
|
|
8911
|
-
function getCurrentRefinement$
|
|
8912
|
-
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8921
|
+
function getCurrentRefinement$6(props, searchState, currentRange, context) {
|
|
8922
|
+
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)), {}),
|
|
8913
8923
|
min = _getCurrentRefinement.min,
|
|
8914
8924
|
max = _getCurrentRefinement.max;
|
|
8915
8925
|
|
|
@@ -8975,7 +8985,7 @@ function nextValueForRefinement(hasBound, isReset, range, value) {
|
|
|
8975
8985
|
return next;
|
|
8976
8986
|
}
|
|
8977
8987
|
|
|
8978
|
-
function _refine$
|
|
8988
|
+
function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
8979
8989
|
var nextMin = nextRefinement.min,
|
|
8980
8990
|
nextMax = nextRefinement.max;
|
|
8981
8991
|
var currentMinRange = currentRange.min,
|
|
@@ -8999,7 +9009,7 @@ function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
|
8999
9009
|
throw Error("You can't provide max value greater than range.");
|
|
9000
9010
|
}
|
|
9001
9011
|
|
|
9002
|
-
var id = getId$
|
|
9012
|
+
var id = getId$9(props);
|
|
9003
9013
|
var resetPage = true;
|
|
9004
9014
|
|
|
9005
9015
|
var nextValue = _defineProperty({}, id, {
|
|
@@ -9007,11 +9017,11 @@ function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
|
9007
9017
|
max: nextValueForRefinement(props.max !== undefined, isMaxReset, currentMaxRange, nextMaxAsNumber)
|
|
9008
9018
|
});
|
|
9009
9019
|
|
|
9010
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9020
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$4);
|
|
9011
9021
|
}
|
|
9012
9022
|
|
|
9013
|
-
function _cleanUp$
|
|
9014
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9023
|
+
function _cleanUp$3(props, searchState, context) {
|
|
9024
|
+
return cleanUpValue(searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)));
|
|
9015
9025
|
}
|
|
9016
9026
|
|
|
9017
9027
|
var connectRange = createConnectorWithContext({
|
|
@@ -9066,7 +9076,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9066
9076
|
min: rangeMin,
|
|
9067
9077
|
max: rangeMax
|
|
9068
9078
|
};
|
|
9069
|
-
var currentRefinement = getCurrentRefinement$
|
|
9079
|
+
var currentRefinement = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9070
9080
|
ais: props.contextValue,
|
|
9071
9081
|
multiIndexContext: props.indexContextValue
|
|
9072
9082
|
});
|
|
@@ -9080,13 +9090,13 @@ var connectRange = createConnectorWithContext({
|
|
|
9080
9090
|
};
|
|
9081
9091
|
},
|
|
9082
9092
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9083
|
-
return _refine$
|
|
9093
|
+
return _refine$5(props, searchState, nextRefinement, this._currentRange, {
|
|
9084
9094
|
ais: props.contextValue,
|
|
9085
9095
|
multiIndexContext: props.indexContextValue
|
|
9086
9096
|
});
|
|
9087
9097
|
},
|
|
9088
9098
|
cleanUp: function cleanUp(props, searchState) {
|
|
9089
|
-
return _cleanUp$
|
|
9099
|
+
return _cleanUp$3(props, searchState, {
|
|
9090
9100
|
ais: props.contextValue,
|
|
9091
9101
|
multiIndexContext: props.indexContextValue
|
|
9092
9102
|
});
|
|
@@ -9094,7 +9104,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9094
9104
|
getSearchParameters: function getSearchParameters(params, props, searchState) {
|
|
9095
9105
|
var attribute = props.attribute;
|
|
9096
9106
|
|
|
9097
|
-
var _getCurrentRefinement2 = getCurrentRefinement$
|
|
9107
|
+
var _getCurrentRefinement2 = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9098
9108
|
ais: props.contextValue,
|
|
9099
9109
|
multiIndexContext: props.indexContextValue
|
|
9100
9110
|
}),
|
|
@@ -9120,7 +9130,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9120
9130
|
minRange = _this$_currentRange.min,
|
|
9121
9131
|
maxRange = _this$_currentRange.max;
|
|
9122
9132
|
|
|
9123
|
-
var _getCurrentRefinement3 = getCurrentRefinement$
|
|
9133
|
+
var _getCurrentRefinement3 = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9124
9134
|
ais: props.contextValue,
|
|
9125
9135
|
multiIndexContext: props.indexContextValue
|
|
9126
9136
|
}),
|
|
@@ -9139,7 +9149,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9139
9149
|
label: fragments.join(''),
|
|
9140
9150
|
attribute: props.attribute,
|
|
9141
9151
|
value: function value(nextState) {
|
|
9142
|
-
return _refine$
|
|
9152
|
+
return _refine$5(props, nextState, {}, _this._currentRange, {
|
|
9143
9153
|
ais: props.contextValue,
|
|
9144
9154
|
multiIndexContext: props.indexContextValue
|
|
9145
9155
|
});
|
|
@@ -9155,7 +9165,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9155
9165
|
}
|
|
9156
9166
|
|
|
9157
9167
|
return {
|
|
9158
|
-
id: getId$
|
|
9168
|
+
id: getId$9(props),
|
|
9159
9169
|
index: getIndexId({
|
|
9160
9170
|
ais: props.contextValue,
|
|
9161
9171
|
multiIndexContext: props.indexContextValue
|
|
@@ -9165,14 +9175,14 @@ var connectRange = createConnectorWithContext({
|
|
|
9165
9175
|
}
|
|
9166
9176
|
});
|
|
9167
9177
|
|
|
9168
|
-
var namespace$
|
|
9178
|
+
var namespace$5 = 'refinementList';
|
|
9169
9179
|
|
|
9170
|
-
function getId$
|
|
9180
|
+
function getId$a(props) {
|
|
9171
9181
|
return props.attribute;
|
|
9172
9182
|
}
|
|
9173
9183
|
|
|
9174
|
-
function getCurrentRefinement$
|
|
9175
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
9184
|
+
function getCurrentRefinement$7(props, searchState, context) {
|
|
9185
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$5, ".").concat(getId$a(props)), []);
|
|
9176
9186
|
|
|
9177
9187
|
if (typeof currentRefinement !== 'string') {
|
|
9178
9188
|
return currentRefinement;
|
|
@@ -9185,8 +9195,8 @@ function getCurrentRefinement$4(props, searchState, context) {
|
|
|
9185
9195
|
return [];
|
|
9186
9196
|
}
|
|
9187
9197
|
|
|
9188
|
-
function getValue(name, props, searchState, context) {
|
|
9189
|
-
var currentRefinement = getCurrentRefinement$
|
|
9198
|
+
function getValue$2(name, props, searchState, context) {
|
|
9199
|
+
var currentRefinement = getCurrentRefinement$7(props, searchState, context);
|
|
9190
9200
|
var isAnewValue = currentRefinement.indexOf(name) === -1;
|
|
9191
9201
|
var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates
|
|
9192
9202
|
: currentRefinement.filter(function (selectedValue) {
|
|
@@ -9196,15 +9206,15 @@ function getValue(name, props, searchState, context) {
|
|
|
9196
9206
|
return nextRefinement;
|
|
9197
9207
|
}
|
|
9198
9208
|
|
|
9199
|
-
function getLimit(_ref) {
|
|
9209
|
+
function getLimit$1(_ref) {
|
|
9200
9210
|
var showMore = _ref.showMore,
|
|
9201
9211
|
limit = _ref.limit,
|
|
9202
9212
|
showMoreLimit = _ref.showMoreLimit;
|
|
9203
9213
|
return showMore ? showMoreLimit : limit;
|
|
9204
9214
|
}
|
|
9205
9215
|
|
|
9206
|
-
function _refine$
|
|
9207
|
-
var id = getId$
|
|
9216
|
+
function _refine$6(props, searchState, nextRefinement, context) {
|
|
9217
|
+
var id = getId$a(props); // Setting the value to an empty string ensures that it is persisted in
|
|
9208
9218
|
// the URL as an empty value.
|
|
9209
9219
|
// This is necessary in the case where `defaultRefinement` contains one
|
|
9210
9220
|
// item and we try to deselect it. `nextSelected` would be an empty array,
|
|
@@ -9215,11 +9225,11 @@ function _refine$3(props, searchState, nextRefinement, context) {
|
|
|
9215
9225
|
var nextValue = _defineProperty({}, id, nextRefinement.length > 0 ? nextRefinement : '');
|
|
9216
9226
|
|
|
9217
9227
|
var resetPage = true;
|
|
9218
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9228
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$5);
|
|
9219
9229
|
}
|
|
9220
9230
|
|
|
9221
|
-
function _cleanUp$
|
|
9222
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9231
|
+
function _cleanUp$4(props, searchState, context) {
|
|
9232
|
+
return cleanUpValue(searchState, context, "".concat(namespace$5, ".").concat(getId$a(props)));
|
|
9223
9233
|
}
|
|
9224
9234
|
/**
|
|
9225
9235
|
* connectRefinementList connector provides the logic to build a widget that will
|
|
@@ -9246,7 +9256,7 @@ function _cleanUp$3(props, searchState, context) {
|
|
|
9246
9256
|
*/
|
|
9247
9257
|
|
|
9248
9258
|
|
|
9249
|
-
var sortBy = ['isRefined', 'count:desc', 'name:asc'];
|
|
9259
|
+
var sortBy$1 = ['isRefined', 'count:desc', 'name:asc'];
|
|
9250
9260
|
var connectRefinementList = createConnectorWithContext({
|
|
9251
9261
|
displayName: 'AlgoliaRefinementList',
|
|
9252
9262
|
propTypes: {
|
|
@@ -9284,7 +9294,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9284
9294
|
if (!canRefine) {
|
|
9285
9295
|
return {
|
|
9286
9296
|
items: [],
|
|
9287
|
-
currentRefinement: getCurrentRefinement$
|
|
9297
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, {
|
|
9288
9298
|
ais: props.contextValue,
|
|
9289
9299
|
multiIndexContext: props.indexContextValue
|
|
9290
9300
|
}),
|
|
@@ -9297,7 +9307,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9297
9307
|
var items = isFromSearch ? searchForFacetValuesResults[attribute].map(function (v) {
|
|
9298
9308
|
return {
|
|
9299
9309
|
label: v.value,
|
|
9300
|
-
value: getValue(v.value, props, searchState, {
|
|
9310
|
+
value: getValue$2(v.value, props, searchState, {
|
|
9301
9311
|
ais: props.contextValue,
|
|
9302
9312
|
multiIndexContext: props.indexContextValue
|
|
9303
9313
|
}),
|
|
@@ -9310,11 +9320,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9310
9320
|
isRefined: v.isRefined
|
|
9311
9321
|
};
|
|
9312
9322
|
}) : results.getFacetValues(attribute, {
|
|
9313
|
-
sortBy: sortBy
|
|
9323
|
+
sortBy: sortBy$1
|
|
9314
9324
|
}).map(function (v) {
|
|
9315
9325
|
return {
|
|
9316
9326
|
label: v.name,
|
|
9317
|
-
value: getValue(v.name, props, searchState, {
|
|
9327
|
+
value: getValue$2(v.name, props, searchState, {
|
|
9318
9328
|
ais: props.contextValue,
|
|
9319
9329
|
multiIndexContext: props.indexContextValue
|
|
9320
9330
|
}),
|
|
@@ -9324,8 +9334,8 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9324
9334
|
});
|
|
9325
9335
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
9326
9336
|
return {
|
|
9327
|
-
items: transformedItems.slice(0, getLimit(props)),
|
|
9328
|
-
currentRefinement: getCurrentRefinement$
|
|
9337
|
+
items: transformedItems.slice(0, getLimit$1(props)),
|
|
9338
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, {
|
|
9329
9339
|
ais: props.contextValue,
|
|
9330
9340
|
multiIndexContext: props.indexContextValue
|
|
9331
9341
|
}),
|
|
@@ -9335,7 +9345,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9335
9345
|
};
|
|
9336
9346
|
},
|
|
9337
9347
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9338
|
-
return _refine$
|
|
9348
|
+
return _refine$6(props, searchState, nextRefinement, {
|
|
9339
9349
|
ais: props.contextValue,
|
|
9340
9350
|
multiIndexContext: props.indexContextValue
|
|
9341
9351
|
});
|
|
@@ -9344,11 +9354,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9344
9354
|
return {
|
|
9345
9355
|
facetName: props.attribute,
|
|
9346
9356
|
query: nextRefinement,
|
|
9347
|
-
maxFacetHits: getLimit(props)
|
|
9357
|
+
maxFacetHits: getLimit$1(props)
|
|
9348
9358
|
};
|
|
9349
9359
|
},
|
|
9350
9360
|
cleanUp: function cleanUp(props, searchState) {
|
|
9351
|
-
return _cleanUp$
|
|
9361
|
+
return _cleanUp$4(props, searchState, {
|
|
9352
9362
|
ais: props.contextValue,
|
|
9353
9363
|
multiIndexContext: props.indexContextValue
|
|
9354
9364
|
});
|
|
@@ -9359,10 +9369,10 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9359
9369
|
var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet';
|
|
9360
9370
|
var addRefinementKey = "".concat(addKey, "Refinement");
|
|
9361
9371
|
searchParameters = searchParameters.setQueryParameters({
|
|
9362
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
9372
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit$1(props))
|
|
9363
9373
|
});
|
|
9364
9374
|
searchParameters = searchParameters[addKey](attribute);
|
|
9365
|
-
return getCurrentRefinement$
|
|
9375
|
+
return getCurrentRefinement$7(props, searchState, {
|
|
9366
9376
|
ais: props.contextValue,
|
|
9367
9377
|
multiIndexContext: props.indexContextValue
|
|
9368
9378
|
}).reduce(function (res, val) {
|
|
@@ -9370,7 +9380,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9370
9380
|
}, searchParameters);
|
|
9371
9381
|
},
|
|
9372
9382
|
getMetadata: function getMetadata(props, searchState) {
|
|
9373
|
-
var id = getId$
|
|
9383
|
+
var id = getId$a(props);
|
|
9374
9384
|
var context = {
|
|
9375
9385
|
ais: props.contextValue,
|
|
9376
9386
|
multiIndexContext: props.indexContextValue
|
|
@@ -9378,21 +9388,21 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9378
9388
|
return {
|
|
9379
9389
|
id: id,
|
|
9380
9390
|
index: getIndexId(context),
|
|
9381
|
-
items: getCurrentRefinement$
|
|
9391
|
+
items: getCurrentRefinement$7(props, searchState, context).length > 0 ? [{
|
|
9382
9392
|
attribute: props.attribute,
|
|
9383
9393
|
label: "".concat(props.attribute, ": "),
|
|
9384
|
-
currentRefinement: getCurrentRefinement$
|
|
9394
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, context),
|
|
9385
9395
|
value: function value(nextState) {
|
|
9386
|
-
return _refine$
|
|
9396
|
+
return _refine$6(props, nextState, [], context);
|
|
9387
9397
|
},
|
|
9388
|
-
items: getCurrentRefinement$
|
|
9398
|
+
items: getCurrentRefinement$7(props, searchState, context).map(function (item) {
|
|
9389
9399
|
return {
|
|
9390
9400
|
label: "".concat(item),
|
|
9391
9401
|
value: function value(nextState) {
|
|
9392
|
-
var nextSelectedItems = getCurrentRefinement$
|
|
9402
|
+
var nextSelectedItems = getCurrentRefinement$7(props, nextState, context).filter(function (other) {
|
|
9393
9403
|
return other !== item;
|
|
9394
9404
|
});
|
|
9395
|
-
return _refine$
|
|
9405
|
+
return _refine$6(props, searchState, nextSelectedItems, context);
|
|
9396
9406
|
}
|
|
9397
9407
|
};
|
|
9398
9408
|
})
|
|
@@ -9451,7 +9461,7 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9451
9461
|
// See: https://github.com/algolia/react-instantsearch/issues/164
|
|
9452
9462
|
|
|
9453
9463
|
|
|
9454
|
-
var cleanedSearchState = omit
|
|
9464
|
+
var cleanedSearchState = omit(searchState, ['configure', id]);
|
|
9455
9465
|
var hasNotChanged = shallowEqual(this._prevSearchState, cleanedSearchState);
|
|
9456
9466
|
this._prevSearchState = cleanedSearchState;
|
|
9457
9467
|
return {
|
|
@@ -9461,12 +9471,12 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9461
9471
|
}
|
|
9462
9472
|
});
|
|
9463
9473
|
|
|
9464
|
-
function getId$
|
|
9474
|
+
function getId$b() {
|
|
9465
9475
|
return 'query';
|
|
9466
9476
|
}
|
|
9467
9477
|
|
|
9468
|
-
function getCurrentRefinement$
|
|
9469
|
-
var id = getId$
|
|
9478
|
+
function getCurrentRefinement$8(props, searchState, context) {
|
|
9479
|
+
var id = getId$b();
|
|
9470
9480
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9471
9481
|
|
|
9472
9482
|
if (currentRefinement) {
|
|
@@ -9476,8 +9486,8 @@ function getCurrentRefinement$3(props, searchState, context) {
|
|
|
9476
9486
|
return '';
|
|
9477
9487
|
}
|
|
9478
9488
|
|
|
9479
|
-
function _refine$
|
|
9480
|
-
var id = getId$
|
|
9489
|
+
function _refine$7(props, searchState, nextRefinement, context) {
|
|
9490
|
+
var id = getId$b();
|
|
9481
9491
|
|
|
9482
9492
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9483
9493
|
|
|
@@ -9485,8 +9495,8 @@ function _refine$2(props, searchState, nextRefinement, context) {
|
|
|
9485
9495
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9486
9496
|
}
|
|
9487
9497
|
|
|
9488
|
-
function _cleanUp$
|
|
9489
|
-
return cleanUpValue(searchState, context, getId$
|
|
9498
|
+
function _cleanUp$5(props, searchState, context) {
|
|
9499
|
+
return cleanUpValue(searchState, context, getId$b());
|
|
9490
9500
|
}
|
|
9491
9501
|
/**
|
|
9492
9502
|
* connectSearchBox connector provides the logic to build a widget that will
|
|
@@ -9507,7 +9517,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9507
9517
|
},
|
|
9508
9518
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
9509
9519
|
return {
|
|
9510
|
-
currentRefinement: getCurrentRefinement$
|
|
9520
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
9511
9521
|
ais: props.contextValue,
|
|
9512
9522
|
multiIndexContext: props.indexContextValue
|
|
9513
9523
|
}),
|
|
@@ -9515,26 +9525,26 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9515
9525
|
};
|
|
9516
9526
|
},
|
|
9517
9527
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9518
|
-
return _refine$
|
|
9528
|
+
return _refine$7(props, searchState, nextRefinement, {
|
|
9519
9529
|
ais: props.contextValue,
|
|
9520
9530
|
multiIndexContext: props.indexContextValue
|
|
9521
9531
|
});
|
|
9522
9532
|
},
|
|
9523
9533
|
cleanUp: function cleanUp(props, searchState) {
|
|
9524
|
-
return _cleanUp$
|
|
9534
|
+
return _cleanUp$5(props, searchState, {
|
|
9525
9535
|
ais: props.contextValue,
|
|
9526
9536
|
multiIndexContext: props.indexContextValue
|
|
9527
9537
|
});
|
|
9528
9538
|
},
|
|
9529
9539
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9530
|
-
return searchParameters.setQuery(getCurrentRefinement$
|
|
9540
|
+
return searchParameters.setQuery(getCurrentRefinement$8(props, searchState, {
|
|
9531
9541
|
ais: props.contextValue,
|
|
9532
9542
|
multiIndexContext: props.indexContextValue
|
|
9533
9543
|
}));
|
|
9534
9544
|
},
|
|
9535
9545
|
getMetadata: function getMetadata(props, searchState) {
|
|
9536
|
-
var id = getId$
|
|
9537
|
-
var currentRefinement = getCurrentRefinement$
|
|
9546
|
+
var id = getId$b();
|
|
9547
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
9538
9548
|
ais: props.contextValue,
|
|
9539
9549
|
multiIndexContext: props.indexContextValue
|
|
9540
9550
|
});
|
|
@@ -9547,7 +9557,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9547
9557
|
items: currentRefinement === null ? [] : [{
|
|
9548
9558
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9549
9559
|
value: function value(nextState) {
|
|
9550
|
-
return _refine$
|
|
9560
|
+
return _refine$7(props, nextState, '', {
|
|
9551
9561
|
ais: props.contextValue,
|
|
9552
9562
|
multiIndexContext: props.indexContextValue
|
|
9553
9563
|
});
|
|
@@ -9558,12 +9568,12 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9558
9568
|
}
|
|
9559
9569
|
});
|
|
9560
9570
|
|
|
9561
|
-
function getId$
|
|
9571
|
+
function getId$c() {
|
|
9562
9572
|
return 'relevancyStrictness';
|
|
9563
9573
|
}
|
|
9564
9574
|
|
|
9565
|
-
function getCurrentRefinement$
|
|
9566
|
-
var id = getId$
|
|
9575
|
+
function getCurrentRefinement$9(props, searchState, context) {
|
|
9576
|
+
var id = getId$c();
|
|
9567
9577
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id);
|
|
9568
9578
|
return currentRefinement;
|
|
9569
9579
|
}
|
|
@@ -9589,13 +9599,13 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9589
9599
|
};
|
|
9590
9600
|
},
|
|
9591
9601
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9592
|
-
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$
|
|
9602
|
+
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$9(props, searchState, {
|
|
9593
9603
|
ais: props.contextValue,
|
|
9594
9604
|
multiIndexContext: props.indexContextValue
|
|
9595
9605
|
}));
|
|
9596
9606
|
},
|
|
9597
9607
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9598
|
-
var nextValue = _defineProperty({}, getId$
|
|
9608
|
+
var nextValue = _defineProperty({}, getId$c(), nextRefinement);
|
|
9599
9609
|
|
|
9600
9610
|
var resetPage = true;
|
|
9601
9611
|
return refineValue(searchState, nextValue, {
|
|
@@ -9605,12 +9615,12 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9605
9615
|
}
|
|
9606
9616
|
});
|
|
9607
9617
|
|
|
9608
|
-
function getId$
|
|
9618
|
+
function getId$d() {
|
|
9609
9619
|
return 'sortBy';
|
|
9610
9620
|
}
|
|
9611
9621
|
|
|
9612
|
-
function getCurrentRefinement$
|
|
9613
|
-
var id = getId$
|
|
9622
|
+
function getCurrentRefinement$a(props, searchState, context) {
|
|
9623
|
+
var id = getId$d();
|
|
9614
9624
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
9615
9625
|
|
|
9616
9626
|
if (currentRefinement) {
|
|
@@ -9647,7 +9657,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9647
9657
|
transformItems: PropTypes.func
|
|
9648
9658
|
},
|
|
9649
9659
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
9650
|
-
var currentRefinement = getCurrentRefinement$
|
|
9660
|
+
var currentRefinement = getCurrentRefinement$a(props, searchState, {
|
|
9651
9661
|
ais: props.contextValue,
|
|
9652
9662
|
multiIndexContext: props.indexContextValue
|
|
9653
9663
|
});
|
|
@@ -9664,7 +9674,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9664
9674
|
};
|
|
9665
9675
|
},
|
|
9666
9676
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9667
|
-
var id = getId$
|
|
9677
|
+
var id = getId$d();
|
|
9668
9678
|
|
|
9669
9679
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9670
9680
|
|
|
@@ -9678,10 +9688,10 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9678
9688
|
return cleanUpValue(searchState, {
|
|
9679
9689
|
ais: props.contextValue,
|
|
9680
9690
|
multiIndexContext: props.indexContextValue
|
|
9681
|
-
}, getId$
|
|
9691
|
+
}, getId$d());
|
|
9682
9692
|
},
|
|
9683
9693
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9684
|
-
var selectedIndex = getCurrentRefinement$
|
|
9694
|
+
var selectedIndex = getCurrentRefinement$a(props, searchState, {
|
|
9685
9695
|
ais: props.contextValue,
|
|
9686
9696
|
multiIndexContext: props.indexContextValue
|
|
9687
9697
|
});
|
|
@@ -9689,7 +9699,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9689
9699
|
},
|
|
9690
9700
|
getMetadata: function getMetadata() {
|
|
9691
9701
|
return {
|
|
9692
|
-
id: getId$
|
|
9702
|
+
id: getId$d()
|
|
9693
9703
|
};
|
|
9694
9704
|
}
|
|
9695
9705
|
});
|
|
@@ -9725,15 +9735,15 @@ var connectStats = createConnectorWithContext({
|
|
|
9725
9735
|
}
|
|
9726
9736
|
});
|
|
9727
9737
|
|
|
9728
|
-
function getId$
|
|
9738
|
+
function getId$e(props) {
|
|
9729
9739
|
return props.attribute;
|
|
9730
9740
|
}
|
|
9731
9741
|
|
|
9732
|
-
var namespace = 'toggle';
|
|
9742
|
+
var namespace$6 = 'toggle';
|
|
9733
9743
|
var falsyStrings = ['0', 'false', 'null', 'undefined'];
|
|
9734
9744
|
|
|
9735
|
-
function getCurrentRefinement(props, searchState, context) {
|
|
9736
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace, ".").concat(getId$
|
|
9745
|
+
function getCurrentRefinement$b(props, searchState, context) {
|
|
9746
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$6, ".").concat(getId$e(props)), false);
|
|
9737
9747
|
|
|
9738
9748
|
if (falsyStrings.indexOf(currentRefinement) !== -1) {
|
|
9739
9749
|
return false;
|
|
@@ -9742,17 +9752,17 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
9742
9752
|
return Boolean(currentRefinement);
|
|
9743
9753
|
}
|
|
9744
9754
|
|
|
9745
|
-
function _refine$
|
|
9746
|
-
var id = getId$
|
|
9755
|
+
function _refine$8(props, searchState, nextRefinement, context) {
|
|
9756
|
+
var id = getId$e(props);
|
|
9747
9757
|
|
|
9748
9758
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : false);
|
|
9749
9759
|
|
|
9750
9760
|
var resetPage = true;
|
|
9751
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
9761
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$6);
|
|
9752
9762
|
}
|
|
9753
9763
|
|
|
9754
|
-
function _cleanUp$
|
|
9755
|
-
return cleanUpValue(searchState, context, "".concat(namespace, ".").concat(getId$
|
|
9764
|
+
function _cleanUp$6(props, searchState, context) {
|
|
9765
|
+
return cleanUpValue(searchState, context, "".concat(namespace$6, ".").concat(getId$e(props)));
|
|
9756
9766
|
}
|
|
9757
9767
|
/**
|
|
9758
9768
|
* connectToggleRefinement connector provides the logic to build a widget that will
|
|
@@ -9791,14 +9801,14 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9791
9801
|
ais: props.contextValue,
|
|
9792
9802
|
multiIndexContext: props.indexContextValue
|
|
9793
9803
|
});
|
|
9794
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
9804
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
9795
9805
|
ais: props.contextValue,
|
|
9796
9806
|
multiIndexContext: props.indexContextValue
|
|
9797
9807
|
});
|
|
9798
9808
|
var allFacetValues = results && results.getFacetByName(attribute) ? results.getFacetValues(attribute) : null;
|
|
9799
9809
|
var facetValue = // Use null to always be consistent with type of the value
|
|
9800
9810
|
// count: number | null
|
|
9801
|
-
allFacetValues && allFacetValues.length ? find
|
|
9811
|
+
allFacetValues && allFacetValues.length ? find(allFacetValues, function (item) {
|
|
9802
9812
|
return item.name === value.toString();
|
|
9803
9813
|
}) : null;
|
|
9804
9814
|
var facetValueCount = facetValue && facetValue.count;
|
|
@@ -9819,13 +9829,13 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9819
9829
|
};
|
|
9820
9830
|
},
|
|
9821
9831
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9822
|
-
return _refine$
|
|
9832
|
+
return _refine$8(props, searchState, nextRefinement, {
|
|
9823
9833
|
ais: props.contextValue,
|
|
9824
9834
|
multiIndexContext: props.indexContextValue
|
|
9825
9835
|
});
|
|
9826
9836
|
},
|
|
9827
9837
|
cleanUp: function cleanUp(props, searchState) {
|
|
9828
|
-
return _cleanUp$
|
|
9838
|
+
return _cleanUp$6(props, searchState, {
|
|
9829
9839
|
ais: props.contextValue,
|
|
9830
9840
|
multiIndexContext: props.indexContextValue
|
|
9831
9841
|
});
|
|
@@ -9834,7 +9844,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9834
9844
|
var attribute = props.attribute,
|
|
9835
9845
|
value = props.value,
|
|
9836
9846
|
filter = props.filter;
|
|
9837
|
-
var checked = getCurrentRefinement(props, searchState, {
|
|
9847
|
+
var checked = getCurrentRefinement$b(props, searchState, {
|
|
9838
9848
|
ais: props.contextValue,
|
|
9839
9849
|
multiIndexContext: props.indexContextValue
|
|
9840
9850
|
});
|
|
@@ -9851,8 +9861,8 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9851
9861
|
return nextSearchParameters;
|
|
9852
9862
|
},
|
|
9853
9863
|
getMetadata: function getMetadata(props, searchState) {
|
|
9854
|
-
var id = getId$
|
|
9855
|
-
var checked = getCurrentRefinement(props, searchState, {
|
|
9864
|
+
var id = getId$e(props);
|
|
9865
|
+
var checked = getCurrentRefinement$b(props, searchState, {
|
|
9856
9866
|
ais: props.contextValue,
|
|
9857
9867
|
multiIndexContext: props.indexContextValue
|
|
9858
9868
|
});
|
|
@@ -9868,7 +9878,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9868
9878
|
currentRefinement: checked,
|
|
9869
9879
|
attribute: props.attribute,
|
|
9870
9880
|
value: function value(nextState) {
|
|
9871
|
-
return _refine$
|
|
9881
|
+
return _refine$8(props, nextState, false, {
|
|
9872
9882
|
ais: props.contextValue,
|
|
9873
9883
|
multiIndexContext: props.indexContextValue
|
|
9874
9884
|
});
|
|
@@ -9884,7 +9894,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9884
9894
|
}
|
|
9885
9895
|
});
|
|
9886
9896
|
|
|
9887
|
-
function getId() {
|
|
9897
|
+
function getId$f() {
|
|
9888
9898
|
return 'query';
|
|
9889
9899
|
}
|
|
9890
9900
|
|
|
@@ -9893,7 +9903,7 @@ function getAdditionalId() {
|
|
|
9893
9903
|
}
|
|
9894
9904
|
|
|
9895
9905
|
function getCurrentRefinementQuery(props, searchState, context) {
|
|
9896
|
-
var id = getId();
|
|
9906
|
+
var id = getId$f();
|
|
9897
9907
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9898
9908
|
|
|
9899
9909
|
if (currentRefinement) {
|
|
@@ -9914,10 +9924,10 @@ function getCurrentRefinementAdditional(props, searchState, context) {
|
|
|
9914
9924
|
return {};
|
|
9915
9925
|
}
|
|
9916
9926
|
|
|
9917
|
-
function _refine(props, searchState, nextRefinement, context) {
|
|
9927
|
+
function _refine$9(props, searchState, nextRefinement, context) {
|
|
9918
9928
|
var _nextValue;
|
|
9919
9929
|
|
|
9920
|
-
var id = getId();
|
|
9930
|
+
var id = getId$f();
|
|
9921
9931
|
var voiceParams = getAdditionalId();
|
|
9922
9932
|
var queryLanguages = props.language ? {
|
|
9923
9933
|
queryLanguages: [props.language.split('-')[0]]
|
|
@@ -9934,8 +9944,8 @@ function _refine(props, searchState, nextRefinement, context) {
|
|
|
9934
9944
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9935
9945
|
}
|
|
9936
9946
|
|
|
9937
|
-
function _cleanUp(props, searchState, context) {
|
|
9938
|
-
var interimState = cleanUpValue(searchState, context, getId());
|
|
9947
|
+
function _cleanUp$7(props, searchState, context) {
|
|
9948
|
+
var interimState = cleanUpValue(searchState, context, getId$f());
|
|
9939
9949
|
return cleanUpValue(interimState, context, getAdditionalId());
|
|
9940
9950
|
}
|
|
9941
9951
|
|
|
@@ -9954,13 +9964,13 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9954
9964
|
};
|
|
9955
9965
|
},
|
|
9956
9966
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9957
|
-
return _refine(props, searchState, nextRefinement, {
|
|
9967
|
+
return _refine$9(props, searchState, nextRefinement, {
|
|
9958
9968
|
ais: props.contextValue,
|
|
9959
9969
|
multiIndexContext: props.indexContextValue
|
|
9960
9970
|
});
|
|
9961
9971
|
},
|
|
9962
9972
|
cleanUp: function cleanUp(props, searchState) {
|
|
9963
|
-
return _cleanUp(props, searchState, {
|
|
9973
|
+
return _cleanUp$7(props, searchState, {
|
|
9964
9974
|
ais: props.contextValue,
|
|
9965
9975
|
multiIndexContext: props.indexContextValue
|
|
9966
9976
|
});
|
|
@@ -9977,7 +9987,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9977
9987
|
return searchParameters.setQuery(query).setQueryParameters(additionalParams);
|
|
9978
9988
|
},
|
|
9979
9989
|
getMetadata: function getMetadata(props, searchState) {
|
|
9980
|
-
var id = getId();
|
|
9990
|
+
var id = getId$f();
|
|
9981
9991
|
var currentRefinement = getCurrentRefinementQuery(props, searchState, {
|
|
9982
9992
|
ais: props.contextValue,
|
|
9983
9993
|
multiIndexContext: props.indexContextValue
|
|
@@ -9991,7 +10001,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9991
10001
|
items: currentRefinement === null ? [] : [{
|
|
9992
10002
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9993
10003
|
value: function value(nextState) {
|
|
9994
|
-
return _refine(props, nextState, '', {
|
|
10004
|
+
return _refine$9(props, nextState, '', {
|
|
9995
10005
|
ais: props.contextValue,
|
|
9996
10006
|
multiIndexContext: props.indexContextValue
|
|
9997
10007
|
});
|
|
@@ -10044,7 +10054,7 @@ function range(_ref) {
|
|
|
10044
10054
|
return (start + current) * limitStep;
|
|
10045
10055
|
});
|
|
10046
10056
|
}
|
|
10047
|
-
function find(array, comparator) {
|
|
10057
|
+
function find$2(array, comparator) {
|
|
10048
10058
|
if (!Array.isArray(array)) {
|
|
10049
10059
|
return undefined;
|
|
10050
10060
|
}
|
|
@@ -10058,11 +10068,11 @@ function find(array, comparator) {
|
|
|
10058
10068
|
return undefined;
|
|
10059
10069
|
}
|
|
10060
10070
|
|
|
10061
|
-
var cx
|
|
10071
|
+
var cx = createClassNames('Panel');
|
|
10062
10072
|
|
|
10063
|
-
var _createContext = createContext(function setCanRefine() {}),
|
|
10064
|
-
PanelConsumer = _createContext.Consumer,
|
|
10065
|
-
PanelProvider = _createContext.Provider;
|
|
10073
|
+
var _createContext$1 = createContext(function setCanRefine() {}),
|
|
10074
|
+
PanelConsumer = _createContext$1.Consumer,
|
|
10075
|
+
PanelProvider = _createContext$1.Provider;
|
|
10066
10076
|
|
|
10067
10077
|
var Panel =
|
|
10068
10078
|
/*#__PURE__*/
|
|
@@ -10104,16 +10114,16 @@ function (_Component) {
|
|
|
10104
10114
|
header = _this$props.header,
|
|
10105
10115
|
footer = _this$props.footer;
|
|
10106
10116
|
var canRefine = this.state.canRefine;
|
|
10107
|
-
return
|
|
10108
|
-
className: classnames(cx
|
|
10109
|
-
}, header &&
|
|
10110
|
-
className: cx
|
|
10111
|
-
}, header),
|
|
10112
|
-
className: cx
|
|
10113
|
-
},
|
|
10117
|
+
return React__default.createElement("div", {
|
|
10118
|
+
className: classnames(cx('', !canRefine && '-noRefinement'), className)
|
|
10119
|
+
}, header && React__default.createElement("div", {
|
|
10120
|
+
className: cx('header')
|
|
10121
|
+
}, header), React__default.createElement("div", {
|
|
10122
|
+
className: cx('body')
|
|
10123
|
+
}, React__default.createElement(PanelProvider, {
|
|
10114
10124
|
value: this.setCanRefine
|
|
10115
|
-
}, children)), footer &&
|
|
10116
|
-
className: cx
|
|
10125
|
+
}, children)), footer && React__default.createElement("div", {
|
|
10126
|
+
className: cx('footer')
|
|
10117
10127
|
}, footer));
|
|
10118
10128
|
}
|
|
10119
10129
|
}]);
|
|
@@ -10176,8 +10186,8 @@ _defineProperty(PanelCallbackHandler, "propTypes", {
|
|
|
10176
10186
|
var PanelWrapper = function PanelWrapper(_ref) {
|
|
10177
10187
|
var canRefine = _ref.canRefine,
|
|
10178
10188
|
children = _ref.children;
|
|
10179
|
-
return
|
|
10180
|
-
return
|
|
10189
|
+
return React__default.createElement(PanelConsumer, null, function (setCanRefine) {
|
|
10190
|
+
return React__default.createElement(PanelCallbackHandler, {
|
|
10181
10191
|
setCanRefine: setCanRefine,
|
|
10182
10192
|
canRefine: canRefine
|
|
10183
10193
|
}, children);
|
|
@@ -10223,7 +10233,7 @@ function (_Component) {
|
|
|
10223
10233
|
_createClass(Link, [{
|
|
10224
10234
|
key: "render",
|
|
10225
10235
|
value: function render() {
|
|
10226
|
-
return
|
|
10236
|
+
return React__default.createElement("a", _extends({}, this.props, {
|
|
10227
10237
|
onClick: this.onClick
|
|
10228
10238
|
}));
|
|
10229
10239
|
}
|
|
@@ -10236,8 +10246,8 @@ _defineProperty(Link, "propTypes", {
|
|
|
10236
10246
|
onClick: PropTypes.func.isRequired
|
|
10237
10247
|
});
|
|
10238
10248
|
|
|
10239
|
-
var cx$
|
|
10240
|
-
var itemsPropType
|
|
10249
|
+
var cx$1 = createClassNames('Breadcrumb');
|
|
10250
|
+
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
10241
10251
|
label: PropTypes.string.isRequired,
|
|
10242
10252
|
value: PropTypes.string.isRequired
|
|
10243
10253
|
}));
|
|
@@ -10265,10 +10275,10 @@ function (_Component) {
|
|
|
10265
10275
|
separator = _this$props.separator,
|
|
10266
10276
|
translate = _this$props.translate,
|
|
10267
10277
|
className = _this$props.className;
|
|
10268
|
-
var rootPath = canRefine ?
|
|
10269
|
-
className: cx$
|
|
10270
|
-
},
|
|
10271
|
-
className: cx$
|
|
10278
|
+
var rootPath = canRefine ? React__default.createElement("li", {
|
|
10279
|
+
className: cx$1('item')
|
|
10280
|
+
}, React__default.createElement(Link, {
|
|
10281
|
+
className: cx$1('link'),
|
|
10272
10282
|
onClick: function onClick() {
|
|
10273
10283
|
return !rootURL ? refine() : null;
|
|
10274
10284
|
},
|
|
@@ -10276,23 +10286,23 @@ function (_Component) {
|
|
|
10276
10286
|
}, translate('rootLabel'))) : null;
|
|
10277
10287
|
var breadcrumb = items.map(function (item, idx) {
|
|
10278
10288
|
var isLast = idx === items.length - 1;
|
|
10279
|
-
return
|
|
10280
|
-
className: cx$
|
|
10289
|
+
return React__default.createElement("li", {
|
|
10290
|
+
className: cx$1('item', isLast && 'item--selected'),
|
|
10281
10291
|
key: idx
|
|
10282
|
-
},
|
|
10283
|
-
className: cx$
|
|
10284
|
-
}, separator), !isLast ?
|
|
10285
|
-
className: cx$
|
|
10292
|
+
}, React__default.createElement("span", {
|
|
10293
|
+
className: cx$1('separator')
|
|
10294
|
+
}, separator), !isLast ? React__default.createElement(Link, {
|
|
10295
|
+
className: cx$1('link'),
|
|
10286
10296
|
onClick: function onClick() {
|
|
10287
10297
|
return refine(item.value);
|
|
10288
10298
|
},
|
|
10289
10299
|
href: createURL(item.value)
|
|
10290
10300
|
}, item.label) : item.label);
|
|
10291
10301
|
});
|
|
10292
|
-
return
|
|
10293
|
-
className: classnames(cx$
|
|
10294
|
-
},
|
|
10295
|
-
className: cx$
|
|
10302
|
+
return React__default.createElement("div", {
|
|
10303
|
+
className: classnames(cx$1('', !canRefine && '-noRefinement'), className)
|
|
10304
|
+
}, React__default.createElement("ul", {
|
|
10305
|
+
className: cx$1('list')
|
|
10296
10306
|
}, rootPath, breadcrumb));
|
|
10297
10307
|
}
|
|
10298
10308
|
}]);
|
|
@@ -10303,7 +10313,7 @@ function (_Component) {
|
|
|
10303
10313
|
_defineProperty(Breadcrumb, "propTypes", {
|
|
10304
10314
|
canRefine: PropTypes.bool.isRequired,
|
|
10305
10315
|
createURL: PropTypes.func.isRequired,
|
|
10306
|
-
items: itemsPropType
|
|
10316
|
+
items: itemsPropType,
|
|
10307
10317
|
refine: PropTypes.func.isRequired,
|
|
10308
10318
|
rootURL: PropTypes.string,
|
|
10309
10319
|
separator: PropTypes.node,
|
|
@@ -10410,12 +10420,12 @@ var Breadcrumb$1 = translatable({
|
|
|
10410
10420
|
*/
|
|
10411
10421
|
|
|
10412
10422
|
var BreadcrumbWidget = function BreadcrumbWidget(props) {
|
|
10413
|
-
return
|
|
10423
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(Breadcrumb$1, props));
|
|
10414
10424
|
};
|
|
10415
10425
|
|
|
10416
10426
|
connectBreadcrumb(BreadcrumbWidget);
|
|
10417
10427
|
|
|
10418
|
-
var cx$
|
|
10428
|
+
var cx$2 = createClassNames('ClearRefinements');
|
|
10419
10429
|
|
|
10420
10430
|
var ClearRefinements =
|
|
10421
10431
|
/*#__PURE__*/
|
|
@@ -10437,10 +10447,10 @@ function (_Component) {
|
|
|
10437
10447
|
refine = _this$props.refine,
|
|
10438
10448
|
translate = _this$props.translate,
|
|
10439
10449
|
className = _this$props.className;
|
|
10440
|
-
return
|
|
10441
|
-
className: classnames(cx$
|
|
10442
|
-
},
|
|
10443
|
-
className: cx$
|
|
10450
|
+
return React__default.createElement("div", {
|
|
10451
|
+
className: classnames(cx$2(''), className)
|
|
10452
|
+
}, React__default.createElement("button", {
|
|
10453
|
+
className: cx$2('button', !canRefine && 'button--disabled'),
|
|
10444
10454
|
onClick: function onClick() {
|
|
10445
10455
|
return refine(items);
|
|
10446
10456
|
},
|
|
@@ -10503,44 +10513,44 @@ var ClearRefinements$1 = translatable({
|
|
|
10503
10513
|
*/
|
|
10504
10514
|
|
|
10505
10515
|
var ClearRefinementsWidget = function ClearRefinementsWidget(props) {
|
|
10506
|
-
return
|
|
10516
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(ClearRefinements$1, props));
|
|
10507
10517
|
};
|
|
10508
10518
|
|
|
10509
10519
|
connectCurrentRefinements(ClearRefinementsWidget);
|
|
10510
10520
|
|
|
10511
|
-
var cx$
|
|
10521
|
+
var cx$3 = createClassNames('CurrentRefinements');
|
|
10512
10522
|
var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
10513
10523
|
var items = _ref.items,
|
|
10514
10524
|
canRefine = _ref.canRefine,
|
|
10515
10525
|
refine = _ref.refine,
|
|
10516
10526
|
translate = _ref.translate,
|
|
10517
10527
|
className = _ref.className;
|
|
10518
|
-
return
|
|
10519
|
-
className: classnames(cx$
|
|
10520
|
-
},
|
|
10521
|
-
className: cx$
|
|
10528
|
+
return React__default.createElement("div", {
|
|
10529
|
+
className: classnames(cx$3('', !canRefine && '-noRefinement'), className)
|
|
10530
|
+
}, React__default.createElement("ul", {
|
|
10531
|
+
className: cx$3('list', !canRefine && 'list--noRefinement')
|
|
10522
10532
|
}, items.map(function (item) {
|
|
10523
|
-
return
|
|
10533
|
+
return React__default.createElement("li", {
|
|
10524
10534
|
key: item.label,
|
|
10525
|
-
className: cx$
|
|
10526
|
-
},
|
|
10527
|
-
className: cx$
|
|
10535
|
+
className: cx$3('item')
|
|
10536
|
+
}, React__default.createElement("span", {
|
|
10537
|
+
className: cx$3('label')
|
|
10528
10538
|
}, item.label), item.items ? item.items.map(function (nest) {
|
|
10529
|
-
return
|
|
10539
|
+
return React__default.createElement("span", {
|
|
10530
10540
|
key: nest.label,
|
|
10531
|
-
className: cx$
|
|
10532
|
-
},
|
|
10533
|
-
className: cx$
|
|
10534
|
-
}, nest.label),
|
|
10535
|
-
className: cx$
|
|
10541
|
+
className: cx$3('category')
|
|
10542
|
+
}, React__default.createElement("span", {
|
|
10543
|
+
className: cx$3('categoryLabel')
|
|
10544
|
+
}, nest.label), React__default.createElement("button", {
|
|
10545
|
+
className: cx$3('delete'),
|
|
10536
10546
|
onClick: function onClick() {
|
|
10537
10547
|
return refine(nest.value);
|
|
10538
10548
|
}
|
|
10539
10549
|
}, translate('clearFilter', nest)));
|
|
10540
|
-
}) :
|
|
10541
|
-
className: cx$
|
|
10542
|
-
},
|
|
10543
|
-
className: cx$
|
|
10550
|
+
}) : React__default.createElement("span", {
|
|
10551
|
+
className: cx$3('category')
|
|
10552
|
+
}, React__default.createElement("button", {
|
|
10553
|
+
className: cx$3('delete'),
|
|
10544
10554
|
onClick: function onClick() {
|
|
10545
10555
|
return refine(item.value);
|
|
10546
10556
|
}
|
|
@@ -10611,33 +10621,33 @@ var CurrentRefinements$1 = translatable({
|
|
|
10611
10621
|
*/
|
|
10612
10622
|
|
|
10613
10623
|
var CurrentRefinementsWidget = function CurrentRefinementsWidget(props) {
|
|
10614
|
-
return
|
|
10624
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(CurrentRefinements$1, props));
|
|
10615
10625
|
};
|
|
10616
10626
|
|
|
10617
10627
|
connectCurrentRefinements(CurrentRefinementsWidget);
|
|
10618
10628
|
|
|
10619
|
-
var cx$
|
|
10620
|
-
var defaultLoadingIndicator =
|
|
10629
|
+
var cx$4 = createClassNames('SearchBox');
|
|
10630
|
+
var defaultLoadingIndicator = React__default.createElement("svg", {
|
|
10621
10631
|
width: "18",
|
|
10622
10632
|
height: "18",
|
|
10623
10633
|
viewBox: "0 0 38 38",
|
|
10624
10634
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10625
10635
|
stroke: "#444",
|
|
10626
|
-
className: cx$
|
|
10627
|
-
},
|
|
10636
|
+
className: cx$4('loadingIcon')
|
|
10637
|
+
}, React__default.createElement("g", {
|
|
10628
10638
|
fill: "none",
|
|
10629
10639
|
fillRule: "evenodd"
|
|
10630
|
-
},
|
|
10640
|
+
}, React__default.createElement("g", {
|
|
10631
10641
|
transform: "translate(1 1)",
|
|
10632
10642
|
strokeWidth: "2"
|
|
10633
|
-
},
|
|
10643
|
+
}, React__default.createElement("circle", {
|
|
10634
10644
|
strokeOpacity: ".5",
|
|
10635
10645
|
cx: "18",
|
|
10636
10646
|
cy: "18",
|
|
10637
10647
|
r: "18"
|
|
10638
|
-
}),
|
|
10648
|
+
}), React__default.createElement("path", {
|
|
10639
10649
|
d: "M36 18c0-9.94-8.06-18-18-18"
|
|
10640
|
-
},
|
|
10650
|
+
}, React__default.createElement("animateTransform", {
|
|
10641
10651
|
attributeName: "transform",
|
|
10642
10652
|
type: "rotate",
|
|
10643
10653
|
from: "0 18 18",
|
|
@@ -10645,26 +10655,26 @@ var defaultLoadingIndicator = React.createElement("svg", {
|
|
|
10645
10655
|
dur: "1s",
|
|
10646
10656
|
repeatCount: "indefinite"
|
|
10647
10657
|
})))));
|
|
10648
|
-
var defaultReset =
|
|
10649
|
-
className: cx$
|
|
10658
|
+
var defaultReset = React__default.createElement("svg", {
|
|
10659
|
+
className: cx$4('resetIcon'),
|
|
10650
10660
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10651
10661
|
viewBox: "0 0 20 20",
|
|
10652
10662
|
width: "10",
|
|
10653
10663
|
height: "10"
|
|
10654
|
-
},
|
|
10664
|
+
}, React__default.createElement("path", {
|
|
10655
10665
|
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"
|
|
10656
10666
|
}));
|
|
10657
|
-
var defaultSubmit =
|
|
10658
|
-
className: cx$
|
|
10667
|
+
var defaultSubmit = React__default.createElement("svg", {
|
|
10668
|
+
className: cx$4('submitIcon'),
|
|
10659
10669
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10660
10670
|
width: "10",
|
|
10661
10671
|
height: "10",
|
|
10662
10672
|
viewBox: "0 0 40 40"
|
|
10663
|
-
},
|
|
10673
|
+
}, React__default.createElement("path", {
|
|
10664
10674
|
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"
|
|
10665
10675
|
}));
|
|
10666
10676
|
|
|
10667
|
-
var SearchBox
|
|
10677
|
+
var SearchBox =
|
|
10668
10678
|
/*#__PURE__*/
|
|
10669
10679
|
function (_Component) {
|
|
10670
10680
|
_inherits(SearchBox, _Component);
|
|
@@ -10826,16 +10836,16 @@ function (_Component) {
|
|
|
10826
10836
|
var isSearchStalled = this.props.showLoadingIndicator && this.props.isSearchStalled;
|
|
10827
10837
|
/* eslint-disable max-len */
|
|
10828
10838
|
|
|
10829
|
-
return
|
|
10830
|
-
className: classnames(cx$
|
|
10831
|
-
},
|
|
10839
|
+
return React__default.createElement("div", {
|
|
10840
|
+
className: classnames(cx$4(''), className)
|
|
10841
|
+
}, React__default.createElement("form", {
|
|
10832
10842
|
noValidate: true,
|
|
10833
10843
|
onSubmit: this.props.onSubmit ? this.props.onSubmit : this.onSubmit,
|
|
10834
10844
|
onReset: this.onReset,
|
|
10835
|
-
className: cx$
|
|
10845
|
+
className: cx$4('form', isSearchStalled && 'form--stalledSearch'),
|
|
10836
10846
|
action: "",
|
|
10837
10847
|
role: "search"
|
|
10838
|
-
},
|
|
10848
|
+
}, React__default.createElement("input", _extends({
|
|
10839
10849
|
ref: this.onInputMount,
|
|
10840
10850
|
type: "search",
|
|
10841
10851
|
placeholder: translate('placeholder'),
|
|
@@ -10849,19 +10859,19 @@ function (_Component) {
|
|
|
10849
10859
|
value: query,
|
|
10850
10860
|
onChange: this.onChange
|
|
10851
10861
|
}, searchInputEvents, {
|
|
10852
|
-
className: cx$
|
|
10853
|
-
})),
|
|
10862
|
+
className: cx$4('input')
|
|
10863
|
+
})), React__default.createElement("button", {
|
|
10854
10864
|
type: "submit",
|
|
10855
10865
|
title: translate('submitTitle'),
|
|
10856
|
-
className: cx$
|
|
10857
|
-
}, submit),
|
|
10866
|
+
className: cx$4('submit')
|
|
10867
|
+
}, submit), React__default.createElement("button", {
|
|
10858
10868
|
type: "reset",
|
|
10859
10869
|
title: translate('resetTitle'),
|
|
10860
|
-
className: cx$
|
|
10870
|
+
className: cx$4('reset'),
|
|
10861
10871
|
hidden: !query || isSearchStalled
|
|
10862
|
-
}, reset), this.props.showLoadingIndicator &&
|
|
10872
|
+
}, reset), this.props.showLoadingIndicator && React__default.createElement("span", {
|
|
10863
10873
|
hidden: !isSearchStalled,
|
|
10864
|
-
className: cx$
|
|
10874
|
+
className: cx$4('loadingIndicator')
|
|
10865
10875
|
}, loadingIndicator)));
|
|
10866
10876
|
/* eslint-enable */
|
|
10867
10877
|
}
|
|
@@ -10870,7 +10880,7 @@ function (_Component) {
|
|
|
10870
10880
|
return SearchBox;
|
|
10871
10881
|
}(Component);
|
|
10872
10882
|
|
|
10873
|
-
_defineProperty(SearchBox
|
|
10883
|
+
_defineProperty(SearchBox, "propTypes", {
|
|
10874
10884
|
currentRefinement: PropTypes.string,
|
|
10875
10885
|
className: PropTypes.string,
|
|
10876
10886
|
refine: PropTypes.func.isRequired,
|
|
@@ -10891,7 +10901,7 @@ _defineProperty(SearchBox$1, "propTypes", {
|
|
|
10891
10901
|
})])
|
|
10892
10902
|
});
|
|
10893
10903
|
|
|
10894
|
-
_defineProperty(SearchBox
|
|
10904
|
+
_defineProperty(SearchBox, "defaultProps", {
|
|
10895
10905
|
currentRefinement: '',
|
|
10896
10906
|
className: '',
|
|
10897
10907
|
focusShortcuts: ['s', '/'],
|
|
@@ -10904,11 +10914,11 @@ _defineProperty(SearchBox$1, "defaultProps", {
|
|
|
10904
10914
|
submit: defaultSubmit
|
|
10905
10915
|
});
|
|
10906
10916
|
|
|
10907
|
-
var SearchBox$
|
|
10917
|
+
var SearchBox$1 = translatable({
|
|
10908
10918
|
resetTitle: 'Clear the search query.',
|
|
10909
10919
|
submitTitle: 'Submit your search query.',
|
|
10910
10920
|
placeholder: 'Search here…'
|
|
10911
|
-
})(SearchBox
|
|
10921
|
+
})(SearchBox);
|
|
10912
10922
|
|
|
10913
10923
|
var itemsPropType$1 = PropTypes.arrayOf(PropTypes.shape({
|
|
10914
10924
|
value: PropTypes.any,
|
|
@@ -10954,10 +10964,10 @@ function (_Component) {
|
|
|
10954
10964
|
|
|
10955
10965
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
10956
10966
|
var itemHasChildren = item.items && Boolean(item.items.length);
|
|
10957
|
-
return
|
|
10967
|
+
return React__default.createElement("li", {
|
|
10958
10968
|
key: item.key || item.label,
|
|
10959
10969
|
className: _this.props.cx('item', item.isRefined && 'item--selected', item.noRefinement && 'item--noRefinement', itemHasChildren && 'item--parent')
|
|
10960
|
-
}, _this.props.renderItem(item, resetQuery), itemHasChildren &&
|
|
10970
|
+
}, _this.props.renderItem(item, resetQuery), itemHasChildren && React__default.createElement("ul", {
|
|
10961
10971
|
className: _this.props.cx('list', 'list--child')
|
|
10962
10972
|
}, item.items.slice(0, _this.getLimit()).map(function (child) {
|
|
10963
10973
|
return _this.renderItem(child, item);
|
|
@@ -10985,7 +10995,7 @@ function (_Component) {
|
|
|
10985
10995
|
return null;
|
|
10986
10996
|
}
|
|
10987
10997
|
|
|
10988
|
-
return
|
|
10998
|
+
return React__default.createElement("button", {
|
|
10989
10999
|
disabled: disabled,
|
|
10990
11000
|
className: cx('showMore', disabled && 'showMore--disabled'),
|
|
10991
11001
|
onClick: this.onShowMoreClick
|
|
@@ -11003,12 +11013,12 @@ function (_Component) {
|
|
|
11003
11013
|
translate = _this$props3.translate,
|
|
11004
11014
|
items = _this$props3.items,
|
|
11005
11015
|
selectItem = _this$props3.selectItem;
|
|
11006
|
-
var noResults = items.length === 0 && this.state.query !== '' ?
|
|
11016
|
+
var noResults = items.length === 0 && this.state.query !== '' ? React__default.createElement("div", {
|
|
11007
11017
|
className: cx('noResults')
|
|
11008
11018
|
}, translate('noResults')) : null;
|
|
11009
|
-
return
|
|
11019
|
+
return React__default.createElement("div", {
|
|
11010
11020
|
className: cx('searchBox')
|
|
11011
|
-
},
|
|
11021
|
+
}, React__default.createElement(SearchBox$1, {
|
|
11012
11022
|
currentRefinement: this.state.query,
|
|
11013
11023
|
refine: function refine(value) {
|
|
11014
11024
|
_this2.setState({
|
|
@@ -11044,7 +11054,7 @@ function (_Component) {
|
|
|
11044
11054
|
var rootClassName = classnames(cx('', !canRefine && '-noRefinement'), className);
|
|
11045
11055
|
|
|
11046
11056
|
if (items.length === 0) {
|
|
11047
|
-
return
|
|
11057
|
+
return React__default.createElement("div", {
|
|
11048
11058
|
className: rootClassName
|
|
11049
11059
|
}, searchBox);
|
|
11050
11060
|
} // Always limit the number of items we show on screen, since the actual
|
|
@@ -11052,9 +11062,9 @@ function (_Component) {
|
|
|
11052
11062
|
// option.
|
|
11053
11063
|
|
|
11054
11064
|
|
|
11055
|
-
return
|
|
11065
|
+
return React__default.createElement("div", {
|
|
11056
11066
|
className: rootClassName
|
|
11057
|
-
}, searchBox,
|
|
11067
|
+
}, searchBox, React__default.createElement("ul", {
|
|
11058
11068
|
className: cx('list', !canRefine && 'list--noRefinement')
|
|
11059
11069
|
}, items.slice(0, this.getLimit()).map(function (item) {
|
|
11060
11070
|
return _this3.renderItem(item, _this3.resetQuery);
|
|
@@ -11088,13 +11098,13 @@ _defineProperty(List, "defaultProps", {
|
|
|
11088
11098
|
isFromSearch: false
|
|
11089
11099
|
});
|
|
11090
11100
|
|
|
11091
|
-
var cx$
|
|
11092
|
-
var itemsPropType = PropTypes.arrayOf(PropTypes.shape({
|
|
11101
|
+
var cx$5 = createClassNames('HierarchicalMenu');
|
|
11102
|
+
var itemsPropType$2 = PropTypes.arrayOf(PropTypes.shape({
|
|
11093
11103
|
label: PropTypes.string.isRequired,
|
|
11094
11104
|
value: PropTypes.string,
|
|
11095
11105
|
count: PropTypes.number.isRequired,
|
|
11096
11106
|
items: function items() {
|
|
11097
|
-
return itemsPropType.apply(void 0, arguments);
|
|
11107
|
+
return itemsPropType$2.apply(void 0, arguments);
|
|
11098
11108
|
}
|
|
11099
11109
|
}));
|
|
11100
11110
|
|
|
@@ -11120,16 +11130,16 @@ function (_Component) {
|
|
|
11120
11130
|
var _this$props = _this.props,
|
|
11121
11131
|
createURL = _this$props.createURL,
|
|
11122
11132
|
refine = _this$props.refine;
|
|
11123
|
-
return
|
|
11124
|
-
className: cx$
|
|
11133
|
+
return React__default.createElement(Link, {
|
|
11134
|
+
className: cx$5('link'),
|
|
11125
11135
|
onClick: function onClick() {
|
|
11126
11136
|
return refine(item.value);
|
|
11127
11137
|
},
|
|
11128
11138
|
href: createURL(item.value)
|
|
11129
|
-
},
|
|
11130
|
-
className: cx$
|
|
11131
|
-
}, item.label), ' ',
|
|
11132
|
-
className: cx$
|
|
11139
|
+
}, React__default.createElement("span", {
|
|
11140
|
+
className: cx$5('label')
|
|
11141
|
+
}, item.label), ' ', React__default.createElement("span", {
|
|
11142
|
+
className: cx$5('count')
|
|
11133
11143
|
}, item.count));
|
|
11134
11144
|
});
|
|
11135
11145
|
|
|
@@ -11147,9 +11157,9 @@ function (_Component) {
|
|
|
11147
11157
|
showMoreLimit = _this$props2.showMoreLimit,
|
|
11148
11158
|
canRefine = _this$props2.canRefine,
|
|
11149
11159
|
className = _this$props2.className;
|
|
11150
|
-
return
|
|
11160
|
+
return React__default.createElement(List, {
|
|
11151
11161
|
renderItem: this.renderItem,
|
|
11152
|
-
cx: cx$
|
|
11162
|
+
cx: cx$5,
|
|
11153
11163
|
translate: translate,
|
|
11154
11164
|
items: items,
|
|
11155
11165
|
showMore: showMore,
|
|
@@ -11169,7 +11179,7 @@ _defineProperty(HierarchicalMenu, "propTypes", {
|
|
|
11169
11179
|
refine: PropTypes.func.isRequired,
|
|
11170
11180
|
createURL: PropTypes.func.isRequired,
|
|
11171
11181
|
canRefine: PropTypes.bool.isRequired,
|
|
11172
|
-
items: itemsPropType,
|
|
11182
|
+
items: itemsPropType$2,
|
|
11173
11183
|
showMore: PropTypes.bool,
|
|
11174
11184
|
className: PropTypes.string,
|
|
11175
11185
|
limit: PropTypes.number,
|
|
@@ -11278,12 +11288,12 @@ var HierarchicalMenu$1 = translatable({
|
|
|
11278
11288
|
*/
|
|
11279
11289
|
|
|
11280
11290
|
var HierarchicalMenuWidget = function HierarchicalMenuWidget(props) {
|
|
11281
|
-
return
|
|
11291
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(HierarchicalMenu$1, props));
|
|
11282
11292
|
};
|
|
11283
11293
|
|
|
11284
11294
|
connectHierarchicalMenu(HierarchicalMenuWidget);
|
|
11285
11295
|
|
|
11286
|
-
var Highlight
|
|
11296
|
+
var Highlight = function Highlight(_ref) {
|
|
11287
11297
|
var cx = _ref.cx,
|
|
11288
11298
|
value = _ref.value,
|
|
11289
11299
|
highlightedTagName = _ref.highlightedTagName,
|
|
@@ -11291,11 +11301,11 @@ var Highlight$2 = function Highlight(_ref) {
|
|
|
11291
11301
|
nonHighlightedTagName = _ref.nonHighlightedTagName;
|
|
11292
11302
|
var TagName = isHighlighted ? highlightedTagName : nonHighlightedTagName;
|
|
11293
11303
|
var className = isHighlighted ? 'highlighted' : 'nonHighlighted';
|
|
11294
|
-
return
|
|
11304
|
+
return React__default.createElement(TagName, {
|
|
11295
11305
|
className: cx(className)
|
|
11296
11306
|
}, value);
|
|
11297
11307
|
};
|
|
11298
|
-
Highlight
|
|
11308
|
+
Highlight.propTypes = {
|
|
11299
11309
|
cx: PropTypes.func.isRequired,
|
|
11300
11310
|
value: PropTypes.string.isRequired,
|
|
11301
11311
|
isHighlighted: PropTypes.bool.isRequired,
|
|
@@ -11318,15 +11328,15 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11318
11328
|
attribute: attribute,
|
|
11319
11329
|
highlightProperty: highlightProperty
|
|
11320
11330
|
});
|
|
11321
|
-
return
|
|
11331
|
+
return React__default.createElement("span", {
|
|
11322
11332
|
className: classnames(cx(''), className)
|
|
11323
11333
|
}, parsedHighlightedValue.map(function (item, i) {
|
|
11324
11334
|
if (Array.isArray(item)) {
|
|
11325
11335
|
var isLast = i === parsedHighlightedValue.length - 1;
|
|
11326
|
-
return
|
|
11336
|
+
return React__default.createElement("span", {
|
|
11327
11337
|
key: i
|
|
11328
11338
|
}, item.map(function (element, index) {
|
|
11329
|
-
return
|
|
11339
|
+
return React__default.createElement(Highlight, {
|
|
11330
11340
|
cx: cx,
|
|
11331
11341
|
key: index,
|
|
11332
11342
|
value: element.value,
|
|
@@ -11334,12 +11344,12 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11334
11344
|
nonHighlightedTagName: nonHighlightedTagName,
|
|
11335
11345
|
isHighlighted: element.isHighlighted
|
|
11336
11346
|
});
|
|
11337
|
-
}), !isLast &&
|
|
11347
|
+
}), !isLast && React__default.createElement("span", {
|
|
11338
11348
|
className: cx('separator')
|
|
11339
11349
|
}, separator));
|
|
11340
11350
|
}
|
|
11341
11351
|
|
|
11342
|
-
return
|
|
11352
|
+
return React__default.createElement(Highlight, {
|
|
11343
11353
|
cx: cx,
|
|
11344
11354
|
key: i,
|
|
11345
11355
|
value: item.value,
|
|
@@ -11368,12 +11378,12 @@ Highlighter.defaultProps = {
|
|
|
11368
11378
|
separator: ', '
|
|
11369
11379
|
};
|
|
11370
11380
|
|
|
11371
|
-
var cx$
|
|
11381
|
+
var cx$6 = createClassNames('Highlight');
|
|
11372
11382
|
|
|
11373
11383
|
var Highlight$1 = function Highlight(props) {
|
|
11374
|
-
return
|
|
11384
|
+
return React__default.createElement(Highlighter, _extends({}, props, {
|
|
11375
11385
|
highlightProperty: "_highlightResult",
|
|
11376
|
-
cx: cx$
|
|
11386
|
+
cx: cx$6
|
|
11377
11387
|
}));
|
|
11378
11388
|
};
|
|
11379
11389
|
|
|
@@ -11418,12 +11428,12 @@ var Highlight$1 = function Highlight(props) {
|
|
|
11418
11428
|
* );
|
|
11419
11429
|
*/
|
|
11420
11430
|
|
|
11421
|
-
var Highlight = connectHighlight(Highlight$1);
|
|
11431
|
+
var Highlight$2 = connectHighlight(Highlight$1);
|
|
11422
11432
|
|
|
11423
|
-
var cx$
|
|
11433
|
+
var cx$7 = createClassNames('Hits');
|
|
11424
11434
|
|
|
11425
11435
|
var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
11426
|
-
return
|
|
11436
|
+
return React__default.createElement("div", {
|
|
11427
11437
|
style: {
|
|
11428
11438
|
borderBottom: '1px solid #bbb',
|
|
11429
11439
|
paddingBottom: '5px',
|
|
@@ -11433,21 +11443,21 @@ var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
|
11433
11443
|
}, JSON.stringify(props).slice(0, 100), "...");
|
|
11434
11444
|
};
|
|
11435
11445
|
|
|
11436
|
-
var Hits
|
|
11446
|
+
var Hits = function Hits(_ref) {
|
|
11437
11447
|
var hits = _ref.hits,
|
|
11438
11448
|
_ref$className = _ref.className,
|
|
11439
11449
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
11440
11450
|
_ref$hitComponent = _ref.hitComponent,
|
|
11441
11451
|
HitComponent = _ref$hitComponent === void 0 ? DefaultHitComponent : _ref$hitComponent;
|
|
11442
|
-
return
|
|
11443
|
-
className: classnames(cx$
|
|
11444
|
-
},
|
|
11445
|
-
className: cx$
|
|
11452
|
+
return React__default.createElement("div", {
|
|
11453
|
+
className: classnames(cx$7(''), className)
|
|
11454
|
+
}, React__default.createElement("ul", {
|
|
11455
|
+
className: cx$7('list')
|
|
11446
11456
|
}, hits.map(function (hit) {
|
|
11447
|
-
return
|
|
11448
|
-
className: cx$
|
|
11457
|
+
return React__default.createElement("li", {
|
|
11458
|
+
className: cx$7('item'),
|
|
11449
11459
|
key: hit.objectID
|
|
11450
|
-
},
|
|
11460
|
+
}, React__default.createElement(HitComponent, {
|
|
11451
11461
|
hit: hit
|
|
11452
11462
|
}));
|
|
11453
11463
|
})));
|
|
@@ -11456,7 +11466,7 @@ var Hits$1 = function Hits(_ref) {
|
|
|
11456
11466
|
var HitPropTypes = PropTypes.shape({
|
|
11457
11467
|
objectID: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11458
11468
|
});
|
|
11459
|
-
Hits
|
|
11469
|
+
Hits.propTypes = {
|
|
11460
11470
|
hits: PropTypes.arrayOf(HitPropTypes.isRequired).isRequired,
|
|
11461
11471
|
className: PropTypes.string,
|
|
11462
11472
|
hitComponent: PropTypes.func
|
|
@@ -11495,7 +11505,7 @@ Hits$1.propTypes = {
|
|
|
11495
11505
|
* );
|
|
11496
11506
|
*/
|
|
11497
11507
|
|
|
11498
|
-
var Hits = connectHits(Hits
|
|
11508
|
+
var Hits$1 = connectHits(Hits);
|
|
11499
11509
|
|
|
11500
11510
|
var Select =
|
|
11501
11511
|
/*#__PURE__*/
|
|
@@ -11529,12 +11539,12 @@ function (_Component) {
|
|
|
11529
11539
|
cx = _this$props.cx,
|
|
11530
11540
|
items = _this$props.items,
|
|
11531
11541
|
selectedItem = _this$props.selectedItem;
|
|
11532
|
-
return
|
|
11542
|
+
return React__default.createElement("select", {
|
|
11533
11543
|
className: cx('select'),
|
|
11534
11544
|
value: selectedItem,
|
|
11535
11545
|
onChange: this.onChange
|
|
11536
11546
|
}, items.map(function (item) {
|
|
11537
|
-
return
|
|
11547
|
+
return React__default.createElement("option", {
|
|
11538
11548
|
className: cx('option'),
|
|
11539
11549
|
key: item.key === undefined ? item.value : item.key,
|
|
11540
11550
|
disabled: item.disabled,
|
|
@@ -11559,7 +11569,7 @@ _defineProperty(Select, "propTypes", {
|
|
|
11559
11569
|
selectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
11560
11570
|
});
|
|
11561
11571
|
|
|
11562
|
-
var cx$
|
|
11572
|
+
var cx$8 = createClassNames('HitsPerPage');
|
|
11563
11573
|
|
|
11564
11574
|
var HitsPerPage =
|
|
11565
11575
|
/*#__PURE__*/
|
|
@@ -11580,13 +11590,13 @@ function (_Component) {
|
|
|
11580
11590
|
currentRefinement = _this$props.currentRefinement,
|
|
11581
11591
|
refine = _this$props.refine,
|
|
11582
11592
|
className = _this$props.className;
|
|
11583
|
-
return
|
|
11584
|
-
className: classnames(cx$
|
|
11585
|
-
},
|
|
11593
|
+
return React__default.createElement("div", {
|
|
11594
|
+
className: classnames(cx$8(''), className)
|
|
11595
|
+
}, React__default.createElement(Select, {
|
|
11586
11596
|
onSelect: refine,
|
|
11587
11597
|
selectedItem: currentRefinement,
|
|
11588
11598
|
items: items,
|
|
11589
|
-
cx: cx$
|
|
11599
|
+
cx: cx$8
|
|
11590
11600
|
}));
|
|
11591
11601
|
}
|
|
11592
11602
|
}]);
|
|
@@ -11652,7 +11662,7 @@ _defineProperty(HitsPerPage, "defaultProps", {
|
|
|
11652
11662
|
|
|
11653
11663
|
connectHitsPerPage(HitsPerPage);
|
|
11654
11664
|
|
|
11655
|
-
var cx$
|
|
11665
|
+
var cx$9 = createClassNames('InfiniteHits');
|
|
11656
11666
|
|
|
11657
11667
|
var InfiniteHits =
|
|
11658
11668
|
/*#__PURE__*/
|
|
@@ -11678,25 +11688,25 @@ function (_Component) {
|
|
|
11678
11688
|
refineNext = _this$props.refineNext,
|
|
11679
11689
|
translate = _this$props.translate,
|
|
11680
11690
|
className = _this$props.className;
|
|
11681
|
-
return
|
|
11682
|
-
className: classnames(cx$
|
|
11683
|
-
}, showPrevious &&
|
|
11684
|
-
className: cx$
|
|
11691
|
+
return React__default.createElement("div", {
|
|
11692
|
+
className: classnames(cx$9(''), className)
|
|
11693
|
+
}, showPrevious && React__default.createElement("button", {
|
|
11694
|
+
className: cx$9('loadPrevious', !hasPrevious && 'loadPrevious--disabled'),
|
|
11685
11695
|
onClick: function onClick() {
|
|
11686
11696
|
return refinePrevious();
|
|
11687
11697
|
},
|
|
11688
11698
|
disabled: !hasPrevious
|
|
11689
|
-
}, translate('loadPrevious')),
|
|
11690
|
-
className: cx$
|
|
11699
|
+
}, translate('loadPrevious')), React__default.createElement("ul", {
|
|
11700
|
+
className: cx$9('list')
|
|
11691
11701
|
}, hits.map(function (hit) {
|
|
11692
|
-
return
|
|
11702
|
+
return React__default.createElement("li", {
|
|
11693
11703
|
key: hit.objectID,
|
|
11694
|
-
className: cx$
|
|
11695
|
-
},
|
|
11704
|
+
className: cx$9('item')
|
|
11705
|
+
}, React__default.createElement(HitComponent, {
|
|
11696
11706
|
hit: hit
|
|
11697
11707
|
}));
|
|
11698
|
-
})),
|
|
11699
|
-
className: cx$
|
|
11708
|
+
})), React__default.createElement("button", {
|
|
11709
|
+
className: cx$9('loadMore', !hasMore && 'loadMore--disabled'),
|
|
11700
11710
|
onClick: function onClick() {
|
|
11701
11711
|
return refineNext();
|
|
11702
11712
|
},
|
|
@@ -11723,7 +11733,7 @@ InfiniteHits.defaultProps = {
|
|
|
11723
11733
|
className: '',
|
|
11724
11734
|
showPrevious: false,
|
|
11725
11735
|
hitComponent: function hitComponent(hit) {
|
|
11726
|
-
return
|
|
11736
|
+
return React__default.createElement("div", {
|
|
11727
11737
|
style: {
|
|
11728
11738
|
borderBottom: '1px solid #bbb',
|
|
11729
11739
|
paddingBottom: '5px',
|
|
@@ -11777,7 +11787,7 @@ var InfiniteHits$1 = translatable({
|
|
|
11777
11787
|
|
|
11778
11788
|
connectInfiniteHits(InfiniteHits$1);
|
|
11779
11789
|
|
|
11780
|
-
var cx$
|
|
11790
|
+
var cx$a = createClassNames('Menu');
|
|
11781
11791
|
|
|
11782
11792
|
var Menu =
|
|
11783
11793
|
/*#__PURE__*/
|
|
@@ -11799,20 +11809,20 @@ function (_Component) {
|
|
|
11799
11809
|
|
|
11800
11810
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
11801
11811
|
var createURL = _this.props.createURL;
|
|
11802
|
-
var label = _this.props.isFromSearch ?
|
|
11812
|
+
var label = _this.props.isFromSearch ? React__default.createElement(Highlight$2, {
|
|
11803
11813
|
attribute: "label",
|
|
11804
11814
|
hit: item
|
|
11805
11815
|
}) : item.label;
|
|
11806
|
-
return
|
|
11807
|
-
className: cx$
|
|
11816
|
+
return React__default.createElement(Link, {
|
|
11817
|
+
className: cx$a('link'),
|
|
11808
11818
|
onClick: function onClick() {
|
|
11809
11819
|
return _this.selectItem(item, resetQuery);
|
|
11810
11820
|
},
|
|
11811
11821
|
href: createURL(item.value)
|
|
11812
|
-
},
|
|
11813
|
-
className: cx$
|
|
11814
|
-
}, label), ' ',
|
|
11815
|
-
className: cx$
|
|
11822
|
+
}, React__default.createElement("span", {
|
|
11823
|
+
className: cx$a('label')
|
|
11824
|
+
}, label), ' ', React__default.createElement("span", {
|
|
11825
|
+
className: cx$a('count')
|
|
11816
11826
|
}, item.count));
|
|
11817
11827
|
});
|
|
11818
11828
|
|
|
@@ -11839,10 +11849,10 @@ function (_Component) {
|
|
|
11839
11849
|
searchable = _this$props.searchable,
|
|
11840
11850
|
canRefine = _this$props.canRefine,
|
|
11841
11851
|
className = _this$props.className;
|
|
11842
|
-
return
|
|
11852
|
+
return React__default.createElement(List, {
|
|
11843
11853
|
renderItem: this.renderItem,
|
|
11844
11854
|
selectItem: this.selectItem,
|
|
11845
|
-
cx: cx$
|
|
11855
|
+
cx: cx$a,
|
|
11846
11856
|
translate: translate,
|
|
11847
11857
|
items: items,
|
|
11848
11858
|
showMore: showMore,
|
|
@@ -11947,12 +11957,12 @@ var Menu$1 = translatable({
|
|
|
11947
11957
|
*/
|
|
11948
11958
|
|
|
11949
11959
|
var MenuWidget = function MenuWidget(props) {
|
|
11950
|
-
return
|
|
11960
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(Menu$1, props));
|
|
11951
11961
|
};
|
|
11952
11962
|
|
|
11953
11963
|
connectMenu(MenuWidget);
|
|
11954
11964
|
|
|
11955
|
-
var cx$
|
|
11965
|
+
var cx$b = createClassNames('MenuSelect');
|
|
11956
11966
|
|
|
11957
11967
|
var MenuSelect =
|
|
11958
11968
|
/*#__PURE__*/
|
|
@@ -11989,27 +11999,27 @@ function (_Component) {
|
|
|
11989
11999
|
canRefine = _this$props.canRefine,
|
|
11990
12000
|
translate = _this$props.translate,
|
|
11991
12001
|
className = _this$props.className;
|
|
11992
|
-
return
|
|
11993
|
-
className: classnames(cx$
|
|
11994
|
-
},
|
|
12002
|
+
return React__default.createElement("div", {
|
|
12003
|
+
className: classnames(cx$b('', !canRefine && '-noRefinement'), className)
|
|
12004
|
+
}, React__default.createElement("select", {
|
|
11995
12005
|
value: this.selectedValue,
|
|
11996
12006
|
onChange: this.handleSelectChange,
|
|
11997
|
-
className: cx$
|
|
11998
|
-
},
|
|
12007
|
+
className: cx$b('select')
|
|
12008
|
+
}, React__default.createElement("option", {
|
|
11999
12009
|
value: "ais__see__all__option",
|
|
12000
|
-
className: cx$
|
|
12010
|
+
className: cx$b('option')
|
|
12001
12011
|
}, translate('seeAllOption')), items.map(function (item) {
|
|
12002
|
-
return
|
|
12012
|
+
return React__default.createElement("option", {
|
|
12003
12013
|
key: item.value,
|
|
12004
12014
|
value: item.value,
|
|
12005
|
-
className: cx$
|
|
12015
|
+
className: cx$b('option')
|
|
12006
12016
|
}, item.label, " (", item.count, ")");
|
|
12007
12017
|
})));
|
|
12008
12018
|
}
|
|
12009
12019
|
}, {
|
|
12010
12020
|
key: "selectedValue",
|
|
12011
12021
|
get: function get() {
|
|
12012
|
-
var _ref2 = find(this.props.items, function (item) {
|
|
12022
|
+
var _ref2 = find$2(this.props.items, function (item) {
|
|
12013
12023
|
return item.isRefined === true;
|
|
12014
12024
|
}) || {
|
|
12015
12025
|
value: 'ais__see__all__option'
|
|
@@ -12081,12 +12091,12 @@ var MenuSelect$1 = translatable({
|
|
|
12081
12091
|
*/
|
|
12082
12092
|
|
|
12083
12093
|
var MenuSelectWidget = function MenuSelectWidget(props) {
|
|
12084
|
-
return
|
|
12094
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(MenuSelect$1, props));
|
|
12085
12095
|
};
|
|
12086
12096
|
|
|
12087
12097
|
connectMenu(MenuSelectWidget);
|
|
12088
12098
|
|
|
12089
|
-
var cx$
|
|
12099
|
+
var cx$c = createClassNames('NumericMenu');
|
|
12090
12100
|
|
|
12091
12101
|
var NumericMenu =
|
|
12092
12102
|
/*#__PURE__*/
|
|
@@ -12110,18 +12120,18 @@ function (_Component) {
|
|
|
12110
12120
|
var _this$props = _this.props,
|
|
12111
12121
|
refine = _this$props.refine,
|
|
12112
12122
|
translate = _this$props.translate;
|
|
12113
|
-
return
|
|
12114
|
-
className: cx$
|
|
12115
|
-
},
|
|
12116
|
-
className: cx$
|
|
12123
|
+
return React__default.createElement("label", {
|
|
12124
|
+
className: cx$c('label')
|
|
12125
|
+
}, React__default.createElement("input", {
|
|
12126
|
+
className: cx$c('radio'),
|
|
12117
12127
|
type: "radio",
|
|
12118
12128
|
checked: item.isRefined,
|
|
12119
12129
|
disabled: item.noRefinement,
|
|
12120
12130
|
onChange: function onChange() {
|
|
12121
12131
|
return refine(item.value);
|
|
12122
12132
|
}
|
|
12123
|
-
}),
|
|
12124
|
-
className: cx$
|
|
12133
|
+
}), React__default.createElement("span", {
|
|
12134
|
+
className: cx$c('labelText')
|
|
12125
12135
|
}, item.value === '' ? translate('all') : item.label));
|
|
12126
12136
|
});
|
|
12127
12137
|
|
|
@@ -12135,11 +12145,11 @@ function (_Component) {
|
|
|
12135
12145
|
items = _this$props2.items,
|
|
12136
12146
|
canRefine = _this$props2.canRefine,
|
|
12137
12147
|
className = _this$props2.className;
|
|
12138
|
-
return
|
|
12148
|
+
return React__default.createElement(List, {
|
|
12139
12149
|
renderItem: this.renderItem,
|
|
12140
12150
|
showMore: false,
|
|
12141
12151
|
canRefine: canRefine,
|
|
12142
|
-
cx: cx$
|
|
12152
|
+
cx: cx$c,
|
|
12143
12153
|
items: items.map(function (item) {
|
|
12144
12154
|
return _objectSpread({}, item, {
|
|
12145
12155
|
key: item.value
|
|
@@ -12221,7 +12231,7 @@ var NumericMenu$1 = translatable({
|
|
|
12221
12231
|
*/
|
|
12222
12232
|
|
|
12223
12233
|
var NumericMenuWidget = function NumericMenuWidget(props) {
|
|
12224
|
-
return
|
|
12234
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(NumericMenu$1, props));
|
|
12225
12235
|
};
|
|
12226
12236
|
|
|
12227
12237
|
connectNumericMenu(NumericMenuWidget);
|
|
@@ -12246,15 +12256,15 @@ function (_Component) {
|
|
|
12246
12256
|
items = _this$props.items,
|
|
12247
12257
|
onSelect = _this$props.onSelect,
|
|
12248
12258
|
canRefine = _this$props.canRefine;
|
|
12249
|
-
return
|
|
12259
|
+
return React__default.createElement("ul", {
|
|
12250
12260
|
className: cx('list', !canRefine && 'list--noRefinement')
|
|
12251
12261
|
}, items.map(function (item) {
|
|
12252
|
-
return
|
|
12262
|
+
return React__default.createElement("li", {
|
|
12253
12263
|
key: item.key === undefined ? item.value : item.key,
|
|
12254
12264
|
className: cx('item', item.selected && !item.disabled && 'item--selected', item.disabled && 'item--disabled', item.modifier)
|
|
12255
|
-
}, item.disabled ?
|
|
12265
|
+
}, item.disabled ? React__default.createElement("span", {
|
|
12256
12266
|
className: cx('link')
|
|
12257
|
-
}, item.label === undefined ? item.value : item.label) :
|
|
12267
|
+
}, item.label === undefined ? item.value : item.label) : React__default.createElement(Link, {
|
|
12258
12268
|
className: cx('link', item.selected && 'link--selected'),
|
|
12259
12269
|
"aria-label": item.ariaLabel,
|
|
12260
12270
|
href: createURL(item.value),
|
|
@@ -12284,7 +12294,7 @@ _defineProperty(LinkList, "propTypes", {
|
|
|
12284
12294
|
canRefine: PropTypes.bool.isRequired
|
|
12285
12295
|
});
|
|
12286
12296
|
|
|
12287
|
-
var cx$
|
|
12297
|
+
var cx$d = createClassNames('Pagination'); // Determines the size of the widget (the number of pages displayed - that the user can directly click on)
|
|
12288
12298
|
|
|
12289
12299
|
function calculateSize(padding, maxPages) {
|
|
12290
12300
|
return Math.min(2 * padding + 1, maxPages);
|
|
@@ -12320,7 +12330,7 @@ function getPages(currentPage, maxPages, padding) {
|
|
|
12320
12330
|
});
|
|
12321
12331
|
}
|
|
12322
12332
|
|
|
12323
|
-
var Pagination
|
|
12333
|
+
var Pagination =
|
|
12324
12334
|
/*#__PURE__*/
|
|
12325
12335
|
function (_Component) {
|
|
12326
12336
|
_inherits(Pagination, _Component);
|
|
@@ -12426,10 +12436,10 @@ function (_Component) {
|
|
|
12426
12436
|
});
|
|
12427
12437
|
}
|
|
12428
12438
|
|
|
12429
|
-
return
|
|
12430
|
-
className: classnames(cx$
|
|
12431
|
-
},
|
|
12432
|
-
cx: cx$
|
|
12439
|
+
return React__default.createElement("div", {
|
|
12440
|
+
className: classnames(cx$d('', !canRefine && '-noRefinement'), className)
|
|
12441
|
+
}, React__default.createElement(ListComponent, _extends({}, otherProps, {
|
|
12442
|
+
cx: cx$d,
|
|
12433
12443
|
items: items,
|
|
12434
12444
|
onSelect: refine,
|
|
12435
12445
|
createURL: createURL,
|
|
@@ -12441,7 +12451,7 @@ function (_Component) {
|
|
|
12441
12451
|
return Pagination;
|
|
12442
12452
|
}(Component);
|
|
12443
12453
|
|
|
12444
|
-
_defineProperty(Pagination
|
|
12454
|
+
_defineProperty(Pagination, "propTypes", {
|
|
12445
12455
|
nbPages: PropTypes.number.isRequired,
|
|
12446
12456
|
currentRefinement: PropTypes.number.isRequired,
|
|
12447
12457
|
refine: PropTypes.func.isRequired,
|
|
@@ -12458,7 +12468,7 @@ _defineProperty(Pagination$1, "propTypes", {
|
|
|
12458
12468
|
className: PropTypes.string
|
|
12459
12469
|
});
|
|
12460
12470
|
|
|
12461
|
-
_defineProperty(Pagination
|
|
12471
|
+
_defineProperty(Pagination, "defaultProps", {
|
|
12462
12472
|
listComponent: LinkList,
|
|
12463
12473
|
showFirst: true,
|
|
12464
12474
|
showPrevious: true,
|
|
@@ -12469,7 +12479,7 @@ _defineProperty(Pagination$1, "defaultProps", {
|
|
|
12469
12479
|
className: ''
|
|
12470
12480
|
});
|
|
12471
12481
|
|
|
12472
|
-
var Pagination$
|
|
12482
|
+
var Pagination$1 = translatable({
|
|
12473
12483
|
previous: '‹',
|
|
12474
12484
|
next: '›',
|
|
12475
12485
|
first: '«',
|
|
@@ -12484,7 +12494,7 @@ var Pagination$2 = translatable({
|
|
|
12484
12494
|
ariaPage: function ariaPage(currentRefinement) {
|
|
12485
12495
|
return "Page ".concat(currentRefinement.toString());
|
|
12486
12496
|
}
|
|
12487
|
-
})(Pagination
|
|
12497
|
+
})(Pagination);
|
|
12488
12498
|
|
|
12489
12499
|
/**
|
|
12490
12500
|
* The Pagination widget displays a simple pagination system allowing the user to
|
|
@@ -12541,23 +12551,23 @@ var Pagination$2 = translatable({
|
|
|
12541
12551
|
*/
|
|
12542
12552
|
|
|
12543
12553
|
var PaginationWidget = function PaginationWidget(props) {
|
|
12544
|
-
return
|
|
12554
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(Pagination$1, props));
|
|
12545
12555
|
};
|
|
12546
12556
|
|
|
12547
|
-
var Pagination = connectPagination(PaginationWidget);
|
|
12557
|
+
var Pagination$2 = connectPagination(PaginationWidget);
|
|
12548
12558
|
|
|
12549
|
-
var cx$
|
|
12559
|
+
var cx$e = createClassNames('PoweredBy');
|
|
12550
12560
|
/* eslint-disable max-len */
|
|
12551
12561
|
|
|
12552
12562
|
var AlgoliaLogo = function AlgoliaLogo() {
|
|
12553
|
-
return
|
|
12563
|
+
return React__default.createElement("svg", {
|
|
12554
12564
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12555
12565
|
baseProfile: "basic",
|
|
12556
12566
|
viewBox: "0 0 1366 362",
|
|
12557
12567
|
width: "100",
|
|
12558
12568
|
height: "27",
|
|
12559
|
-
className: cx$
|
|
12560
|
-
},
|
|
12569
|
+
className: cx$e('logo')
|
|
12570
|
+
}, React__default.createElement("linearGradient", {
|
|
12561
12571
|
id: "g",
|
|
12562
12572
|
x1: "428.258",
|
|
12563
12573
|
x2: "434.145",
|
|
@@ -12565,19 +12575,19 @@ var AlgoliaLogo = function AlgoliaLogo() {
|
|
|
12565
12575
|
y2: "409.85",
|
|
12566
12576
|
gradientUnits: "userSpaceOnUse",
|
|
12567
12577
|
gradientTransform: "matrix(94.045 0 0 -94.072 -40381.527 38479.52)"
|
|
12568
|
-
},
|
|
12578
|
+
}, React__default.createElement("stop", {
|
|
12569
12579
|
offset: "0",
|
|
12570
12580
|
stopColor: "#00AEFF"
|
|
12571
|
-
}),
|
|
12581
|
+
}), React__default.createElement("stop", {
|
|
12572
12582
|
offset: "1",
|
|
12573
12583
|
stopColor: "#3369E7"
|
|
12574
|
-
})),
|
|
12584
|
+
})), React__default.createElement("path", {
|
|
12575
12585
|
d: "M61.8 15.4h242.8c23.9 0 43.4 19.4 43.4 43.4v242.9c0 23.9-19.4 43.4-43.4 43.4H61.8c-23.9 0-43.4-19.4-43.4-43.4v-243c0-23.9 19.4-43.3 43.4-43.3z",
|
|
12576
12586
|
fill: "url(#g)"
|
|
12577
|
-
}),
|
|
12587
|
+
}), React__default.createElement("path", {
|
|
12578
12588
|
d: "M187 98.7c-51.4 0-93.1 41.7-93.1 93.2S135.6 285 187 285s93.1-41.7 93.1-93.2-41.6-93.1-93.1-93.1zm0 158.8c-36.2 0-65.6-29.4-65.6-65.6s29.4-65.6 65.6-65.6 65.6 29.4 65.6 65.6-29.3 65.6-65.6 65.6zm0-117.8v48.9c0 1.4 1.5 2.4 2.8 1.7l43.4-22.5c1-.5 1.3-1.7.8-2.7-9-15.8-25.7-26.6-45-27.3-1 0-2 .8-2 1.9zm-60.8-35.9l-5.7-5.7c-5.6-5.6-14.6-5.6-20.2 0l-6.8 6.8c-5.6 5.6-5.6 14.6 0 20.2l5.6 5.6c.9.9 2.2.7 3-.2 3.3-4.5 6.9-8.8 10.9-12.8 4.1-4.1 8.3-7.7 12.9-11 1-.6 1.1-2 .3-2.9zM217.5 89V77.7c0-7.9-6.4-14.3-14.3-14.3h-33.3c-7.9 0-14.3 6.4-14.3 14.3v11.6c0 1.3 1.2 2.2 2.5 1.9 9.3-2.7 19.1-4.1 29-4.1 9.5 0 18.9 1.3 28 3.8 1.2.3 2.4-.6 2.4-1.9z",
|
|
12579
12589
|
fill: "#FFFFFF"
|
|
12580
|
-
}),
|
|
12590
|
+
}), React__default.createElement("path", {
|
|
12581
12591
|
d: "M842.5 267.6c0 26.7-6.8 46.2-20.5 58.6-13.7 12.4-34.6 18.6-62.8 18.6-10.3 0-31.7-2-48.8-5.8l6.3-31c14.3 3 33.2 3.8 43.1 3.8 15.7 0 26.9-3.2 33.6-9.6s10-15.9 10-28.5v-6.4c-3.9 1.9-9 3.8-15.3 5.8-6.3 1.9-13.6 2.9-21.8 2.9-10.8 0-20.6-1.7-29.5-5.1-8.9-3.4-16.6-8.4-22.9-15-6.3-6.6-11.3-14.9-14.8-24.8s-5.3-27.6-5.3-40.6c0-12.2 1.9-27.5 5.6-37.7 3.8-10.2 9.2-19 16.5-26.3 7.2-7.3 16-12.9 26.3-17s22.4-6.7 35.5-6.7c12.7 0 24.4 1.6 35.8 3.5 11.4 1.9 21.1 3.9 29 6.1v155.2zm-108.7-77.2c0 16.4 3.6 34.6 10.8 42.2 7.2 7.6 16.5 11.4 27.9 11.4 6.2 0 12.1-.9 17.6-2.6 5.5-1.7 9.9-3.7 13.4-6.1v-97.1c-2.8-.6-14.5-3-25.8-3.3-14.2-.4-25 5.4-32.6 14.7-7.5 9.3-11.3 25.6-11.3 40.8zm294.3 0c0 13.2-1.9 23.2-5.8 34.1s-9.4 20.2-16.5 27.9c-7.1 7.7-15.6 13.7-25.6 17.9s-25.4 6.6-33.1 6.6c-7.7-.1-23-2.3-32.9-6.6-9.9-4.3-18.4-10.2-25.5-17.9-7.1-7.7-12.6-17-16.6-27.9s-6-20.9-6-34.1c0-13.2 1.8-25.9 5.8-36.7 4-10.8 9.6-20 16.8-27.7s15.8-13.6 25.6-17.8c9.9-4.2 20.8-6.2 32.6-6.2s22.7 2.1 32.7 6.2c10 4.2 18.6 10.1 25.6 17.8 7.1 7.7 12.6 16.9 16.6 27.7 4.2 10.8 6.3 23.5 6.3 36.7zm-40 .1c0-16.9-3.7-31-10.9-40.8-7.2-9.9-17.3-14.8-30.2-14.8-12.9 0-23 4.9-30.2 14.8-7.2 9.9-10.7 23.9-10.7 40.8 0 17.1 3.6 28.6 10.8 38.5 7.2 10 17.3 14.9 30.2 14.9 12.9 0 23-5 30.2-14.9 7.2-10 10.8-21.4 10.8-38.5zm127.1 86.4c-64.1.3-64.1-51.8-64.1-60.1L1051 32l39.1-6.2v183.6c0 4.7 0 34.5 25.1 34.6v32.9zm68.9 0h-39.3V108.1l39.3-6.2v175zm-19.7-193.5c13.1 0 23.8-10.6 23.8-23.7S1177.6 36 1164.4 36s-23.8 10.6-23.8 23.7 10.7 23.7 23.8 23.7zm117.4 18.6c12.9 0 23.8 1.6 32.6 4.8 8.8 3.2 15.9 7.7 21.1 13.4s8.9 13.5 11.1 21.7c2.3 8.2 3.4 17.2 3.4 27.1v100.6c-6 1.3-15.1 2.8-27.3 4.6s-25.9 2.7-41.1 2.7c-10.1 0-19.4-1-27.7-2.9-8.4-1.9-15.5-5-21.5-9.3-5.9-4.3-10.5-9.8-13.9-16.6-3.3-6.8-5-16.4-5-26.4 0-9.6 1.9-15.7 5.6-22.3 3.8-6.6 8.9-12 15.3-16.2 6.5-4.2 13.9-7.2 22.4-9s17.4-2.7 26.6-2.7c4.3 0 8.8.3 13.6.8s9.8 1.4 15.2 2.7v-6.4c0-4.5-.5-8.8-1.6-12.8-1.1-4.1-3-7.6-5.6-10.7-2.7-3.1-6.2-5.5-10.6-7.2s-10-3-16.7-3c-9 0-17.2 1.1-24.7 2.4-7.5 1.3-13.7 2.8-18.4 4.5l-4.7-32.1c4.9-1.7 12.2-3.4 21.6-5.1s19.5-2.6 30.3-2.6zm3.3 141.9c12 0 20.9-.7 27.1-1.9v-39.8c-2.2-.6-5.3-1.3-9.4-1.9-4.1-.6-8.6-1-13.6-1-4.3 0-8.7.3-13.1 1-4.4.6-8.4 1.8-11.9 3.5s-6.4 4.1-8.5 7.2c-2.2 3.1-3.2 4.9-3.2 9.6 0 9.2 3.2 14.5 9 18 5.9 3.6 13.7 5.3 23.6 5.3zM512.9 103c12.9 0 23.8 1.6 32.6 4.8 8.8 3.2 15.9 7.7 21.1 13.4 5.3 5.8 8.9 13.5 11.1 21.7 2.3 8.2 3.4 17.2 3.4 27.1v100.6c-6 1.3-15.1 2.8-27.3 4.6-12.2 1.8-25.9 2.7-41.1 2.7-10.1 0-19.4-1-27.7-2.9-8.4-1.9-15.5-5-21.5-9.3-5.9-4.3-10.5-9.8-13.9-16.6-3.3-6.8-5-16.4-5-26.4 0-9.6 1.9-15.7 5.6-22.3 3.8-6.6 8.9-12 15.3-16.2 6.5-4.2 13.9-7.2 22.4-9s17.4-2.7 26.6-2.7c4.3 0 8.8.3 13.6.8 4.7.5 9.8 1.4 15.2 2.7v-6.4c0-4.5-.5-8.8-1.6-12.8-1.1-4.1-3-7.6-5.6-10.7-2.7-3.1-6.2-5.5-10.6-7.2-4.4-1.7-10-3-16.7-3-9 0-17.2 1.1-24.7 2.4-7.5 1.3-13.7 2.8-18.4 4.5l-4.7-32.1c4.9-1.7 12.2-3.4 21.6-5.1 9.4-1.8 19.5-2.6 30.3-2.6zm3.4 142c12 0 20.9-.7 27.1-1.9v-39.8c-2.2-.6-5.3-1.3-9.4-1.9-4.1-.6-8.6-1-13.6-1-4.3 0-8.7.3-13.1 1-4.4.6-8.4 1.8-11.9 3.5s-6.4 4.1-8.5 7.2c-2.2 3.1-3.2 4.9-3.2 9.6 0 9.2 3.2 14.5 9 18s13.7 5.3 23.6 5.3zm158.5 31.9c-64.1.3-64.1-51.8-64.1-60.1L610.6 32l39.1-6.2v183.6c0 4.7 0 34.5 25.1 34.6v32.9z",
|
|
12582
12592
|
fill: "#182359"
|
|
12583
12593
|
}));
|
|
@@ -12603,17 +12613,17 @@ function (_Component) {
|
|
|
12603
12613
|
url = _this$props.url,
|
|
12604
12614
|
translate = _this$props.translate,
|
|
12605
12615
|
className = _this$props.className;
|
|
12606
|
-
return
|
|
12607
|
-
className: classnames(cx$
|
|
12608
|
-
},
|
|
12609
|
-
className: cx$
|
|
12610
|
-
}, translate('searchBy')), ' ',
|
|
12616
|
+
return React__default.createElement("div", {
|
|
12617
|
+
className: classnames(cx$e(''), className)
|
|
12618
|
+
}, React__default.createElement("span", {
|
|
12619
|
+
className: cx$e('text')
|
|
12620
|
+
}, translate('searchBy')), ' ', React__default.createElement("a", {
|
|
12611
12621
|
href: url,
|
|
12612
12622
|
target: "_blank",
|
|
12613
|
-
className: cx$
|
|
12623
|
+
className: cx$e('link'),
|
|
12614
12624
|
"aria-label": "Algolia",
|
|
12615
12625
|
rel: "noopener noreferrer"
|
|
12616
|
-
},
|
|
12626
|
+
}, React__default.createElement(AlgoliaLogo, null)));
|
|
12617
12627
|
}
|
|
12618
12628
|
}]);
|
|
12619
12629
|
|
|
@@ -12663,7 +12673,7 @@ var PoweredBy$1 = translatable({
|
|
|
12663
12673
|
|
|
12664
12674
|
connectPoweredBy(PoweredBy$1);
|
|
12665
12675
|
|
|
12666
|
-
var cx$
|
|
12676
|
+
var cx$f = createClassNames('RangeInput');
|
|
12667
12677
|
var RawRangeInput =
|
|
12668
12678
|
/*#__PURE__*/
|
|
12669
12679
|
function (_Component) {
|
|
@@ -12742,13 +12752,13 @@ function (_Component) {
|
|
|
12742
12752
|
max = _this$normalizeRangeF.max;
|
|
12743
12753
|
|
|
12744
12754
|
var step = 1 / Math.pow(10, precision);
|
|
12745
|
-
return
|
|
12746
|
-
className: classnames(cx$
|
|
12747
|
-
},
|
|
12748
|
-
className: cx$
|
|
12755
|
+
return React__default.createElement("div", {
|
|
12756
|
+
className: classnames(cx$f('', !canRefine && '-noRefinement'), className)
|
|
12757
|
+
}, React__default.createElement("form", {
|
|
12758
|
+
className: cx$f('form'),
|
|
12749
12759
|
onSubmit: this.onSubmit
|
|
12750
|
-
},
|
|
12751
|
-
className: cx$
|
|
12760
|
+
}, React__default.createElement("input", {
|
|
12761
|
+
className: cx$f('input', 'input--min'),
|
|
12752
12762
|
type: "number",
|
|
12753
12763
|
min: min,
|
|
12754
12764
|
max: max,
|
|
@@ -12761,10 +12771,10 @@ function (_Component) {
|
|
|
12761
12771
|
from: e.currentTarget.value
|
|
12762
12772
|
});
|
|
12763
12773
|
}
|
|
12764
|
-
}),
|
|
12765
|
-
className: cx$
|
|
12766
|
-
}, translate('separator')),
|
|
12767
|
-
className: cx$
|
|
12774
|
+
}), React__default.createElement("span", {
|
|
12775
|
+
className: cx$f('separator')
|
|
12776
|
+
}, translate('separator')), React__default.createElement("input", {
|
|
12777
|
+
className: cx$f('input', 'input--max'),
|
|
12768
12778
|
type: "number",
|
|
12769
12779
|
min: min,
|
|
12770
12780
|
max: max,
|
|
@@ -12777,8 +12787,8 @@ function (_Component) {
|
|
|
12777
12787
|
to: e.currentTarget.value
|
|
12778
12788
|
});
|
|
12779
12789
|
}
|
|
12780
|
-
}),
|
|
12781
|
-
className: cx$
|
|
12790
|
+
}), React__default.createElement("button", {
|
|
12791
|
+
className: cx$f('submit'),
|
|
12782
12792
|
type: "submit"
|
|
12783
12793
|
}, translate('submit'))));
|
|
12784
12794
|
}
|
|
@@ -12854,12 +12864,12 @@ var RangeInput = translatable({
|
|
|
12854
12864
|
*/
|
|
12855
12865
|
|
|
12856
12866
|
var RangeInputWidget = function RangeInputWidget(props) {
|
|
12857
|
-
return
|
|
12867
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(RangeInput, props));
|
|
12858
12868
|
};
|
|
12859
12869
|
|
|
12860
12870
|
connectRange(RangeInputWidget);
|
|
12861
12871
|
|
|
12862
|
-
var cx$
|
|
12872
|
+
var cx$g = createClassNames('RatingMenu');
|
|
12863
12873
|
|
|
12864
12874
|
var RatingMenu =
|
|
12865
12875
|
/*#__PURE__*/
|
|
@@ -12910,14 +12920,14 @@ function (_Component) {
|
|
|
12910
12920
|
rating++;
|
|
12911
12921
|
}
|
|
12912
12922
|
|
|
12913
|
-
icons.push([
|
|
12923
|
+
icons.push([React__default.createElement("svg", {
|
|
12914
12924
|
key: icon,
|
|
12915
|
-
className: cx$
|
|
12925
|
+
className: cx$g('starIcon', icon >= lowerBound ? 'starIcon--empty' : 'starIcon--full'),
|
|
12916
12926
|
"aria-hidden": "true",
|
|
12917
12927
|
width: "24",
|
|
12918
12928
|
height: "24"
|
|
12919
|
-
},
|
|
12920
|
-
xlinkHref: "#".concat(cx$
|
|
12929
|
+
}, React__default.createElement("use", {
|
|
12930
|
+
xlinkHref: "#".concat(cx$g(icon >= lowerBound ? 'starEmptySymbol' : 'starSymbol'))
|
|
12921
12931
|
})), ' ']);
|
|
12922
12932
|
} // The last item of the list (the default item), should not
|
|
12923
12933
|
// be clickable if it is selected.
|
|
@@ -12931,17 +12941,17 @@ function (_Component) {
|
|
|
12931
12941
|
}),
|
|
12932
12942
|
onClick: this.onClick.bind(this, lowerBound, max)
|
|
12933
12943
|
};
|
|
12934
|
-
return
|
|
12944
|
+
return React__default.createElement("li", {
|
|
12935
12945
|
key: lowerBound,
|
|
12936
|
-
className: cx$
|
|
12937
|
-
},
|
|
12938
|
-
className: cx$
|
|
12946
|
+
className: cx$g('item', selected && 'item--selected', disabled && 'item--disabled')
|
|
12947
|
+
}, React__default.createElement("a", _extends({
|
|
12948
|
+
className: cx$g('link'),
|
|
12939
12949
|
"aria-label": "".concat(rating).concat(translate('ratingLabel'))
|
|
12940
|
-
}, onClickHandler), icons,
|
|
12941
|
-
className: cx$
|
|
12950
|
+
}, onClickHandler), icons, React__default.createElement("span", {
|
|
12951
|
+
className: cx$g('label'),
|
|
12942
12952
|
"aria-hidden": "true"
|
|
12943
|
-
}, translate('ratingLabel')), ' ',
|
|
12944
|
-
className: cx$
|
|
12953
|
+
}, translate('ratingLabel')), ' ', React__default.createElement("span", {
|
|
12954
|
+
className: cx$g('count')
|
|
12945
12955
|
}, count)));
|
|
12946
12956
|
}
|
|
12947
12957
|
}, {
|
|
@@ -12973,7 +12983,7 @@ function (_Component) {
|
|
|
12973
12983
|
start: 0,
|
|
12974
12984
|
end: Math.max(inclusiveLength, 0)
|
|
12975
12985
|
}).map(function (index) {
|
|
12976
|
-
var element = find(values, function (item) {
|
|
12986
|
+
var element = find$2(values, function (item) {
|
|
12977
12987
|
return item.value === limitMax - index;
|
|
12978
12988
|
});
|
|
12979
12989
|
var placeholder = {
|
|
@@ -12996,25 +13006,25 @@ function (_Component) {
|
|
|
12996
13006
|
createURL: createURL
|
|
12997
13007
|
});
|
|
12998
13008
|
});
|
|
12999
|
-
return
|
|
13000
|
-
className: classnames(cx$
|
|
13001
|
-
},
|
|
13009
|
+
return React__default.createElement("div", {
|
|
13010
|
+
className: classnames(cx$g('', !canRefine && '-noRefinement'), className)
|
|
13011
|
+
}, React__default.createElement("svg", {
|
|
13002
13012
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13003
13013
|
style: {
|
|
13004
13014
|
display: 'none'
|
|
13005
13015
|
}
|
|
13006
|
-
},
|
|
13007
|
-
id: cx$
|
|
13016
|
+
}, React__default.createElement("symbol", {
|
|
13017
|
+
id: cx$g('starSymbol'),
|
|
13008
13018
|
viewBox: "0 0 24 24"
|
|
13009
|
-
},
|
|
13019
|
+
}, React__default.createElement("path", {
|
|
13010
13020
|
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"
|
|
13011
|
-
})),
|
|
13012
|
-
id: cx$
|
|
13021
|
+
})), React__default.createElement("symbol", {
|
|
13022
|
+
id: cx$g('starEmptySymbol'),
|
|
13013
13023
|
viewBox: "0 0 24 24"
|
|
13014
|
-
},
|
|
13024
|
+
}, React__default.createElement("path", {
|
|
13015
13025
|
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"
|
|
13016
|
-
}))),
|
|
13017
|
-
className: cx$
|
|
13026
|
+
}))), React__default.createElement("ul", {
|
|
13027
|
+
className: cx$g('list', !canRefine && 'list--noRefinement')
|
|
13018
13028
|
}, items));
|
|
13019
13029
|
}
|
|
13020
13030
|
}]);
|
|
@@ -13097,12 +13107,12 @@ var RatingMenu$1 = translatable({
|
|
|
13097
13107
|
*/
|
|
13098
13108
|
|
|
13099
13109
|
var RatingMenuWidget = function RatingMenuWidget(props) {
|
|
13100
|
-
return
|
|
13110
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(RatingMenu$1, props));
|
|
13101
13111
|
};
|
|
13102
13112
|
|
|
13103
13113
|
connectRange(RatingMenuWidget);
|
|
13104
13114
|
|
|
13105
|
-
var cx$
|
|
13115
|
+
var cx$h = createClassNames('RefinementList');
|
|
13106
13116
|
|
|
13107
13117
|
var RefinementList$1 =
|
|
13108
13118
|
/*#__PURE__*/
|
|
@@ -13133,23 +13143,23 @@ function (_Component) {
|
|
|
13133
13143
|
});
|
|
13134
13144
|
|
|
13135
13145
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
13136
|
-
var label = _this.props.isFromSearch ?
|
|
13146
|
+
var label = _this.props.isFromSearch ? React__default.createElement(Highlight$2, {
|
|
13137
13147
|
attribute: "label",
|
|
13138
13148
|
hit: item
|
|
13139
13149
|
}) : item.label;
|
|
13140
|
-
return
|
|
13141
|
-
className: cx$
|
|
13142
|
-
},
|
|
13143
|
-
className: cx$
|
|
13150
|
+
return React__default.createElement("label", {
|
|
13151
|
+
className: cx$h('label')
|
|
13152
|
+
}, React__default.createElement("input", {
|
|
13153
|
+
className: cx$h('checkbox'),
|
|
13144
13154
|
type: "checkbox",
|
|
13145
13155
|
checked: item.isRefined,
|
|
13146
13156
|
onChange: function onChange() {
|
|
13147
13157
|
return _this.selectItem(item, resetQuery);
|
|
13148
13158
|
}
|
|
13149
|
-
}),
|
|
13150
|
-
className: cx$
|
|
13151
|
-
}, label), ' ',
|
|
13152
|
-
className: cx$
|
|
13159
|
+
}), React__default.createElement("span", {
|
|
13160
|
+
className: cx$h('labelText')
|
|
13161
|
+
}, label), ' ', React__default.createElement("span", {
|
|
13162
|
+
className: cx$h('count')
|
|
13153
13163
|
}, item.count.toLocaleString()));
|
|
13154
13164
|
});
|
|
13155
13165
|
|
|
@@ -13170,10 +13180,10 @@ function (_Component) {
|
|
|
13170
13180
|
searchable = _this$props.searchable,
|
|
13171
13181
|
canRefine = _this$props.canRefine,
|
|
13172
13182
|
className = _this$props.className;
|
|
13173
|
-
return
|
|
13183
|
+
return React__default.createElement(List, {
|
|
13174
13184
|
renderItem: this.renderItem,
|
|
13175
13185
|
selectItem: this.selectItem,
|
|
13176
|
-
cx: cx$
|
|
13186
|
+
cx: cx$h,
|
|
13177
13187
|
translate: translate,
|
|
13178
13188
|
items: items,
|
|
13179
13189
|
showMore: showMore,
|
|
@@ -13282,12 +13292,12 @@ var RefinementList$2 = translatable({
|
|
|
13282
13292
|
*/
|
|
13283
13293
|
|
|
13284
13294
|
var RefinementListWidget = function RefinementListWidget(props) {
|
|
13285
|
-
return
|
|
13295
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(RefinementList$2, props));
|
|
13286
13296
|
};
|
|
13287
13297
|
|
|
13288
|
-
var RefinementList = connectRefinementList(RefinementListWidget);
|
|
13298
|
+
var RefinementList$3 = connectRefinementList(RefinementListWidget);
|
|
13289
13299
|
|
|
13290
|
-
var cx$
|
|
13300
|
+
var cx$i = createClassNames('ScrollTo');
|
|
13291
13301
|
|
|
13292
13302
|
var ScrollTo =
|
|
13293
13303
|
/*#__PURE__*/
|
|
@@ -13316,11 +13326,11 @@ function (_Component) {
|
|
|
13316
13326
|
value: function render() {
|
|
13317
13327
|
var _this = this;
|
|
13318
13328
|
|
|
13319
|
-
return
|
|
13329
|
+
return React__default.createElement("div", {
|
|
13320
13330
|
ref: function ref(_ref) {
|
|
13321
13331
|
return _this.el = _ref;
|
|
13322
13332
|
},
|
|
13323
|
-
className: cx$
|
|
13333
|
+
className: cx$i('')
|
|
13324
13334
|
}, this.props.children);
|
|
13325
13335
|
}
|
|
13326
13336
|
}]);
|
|
@@ -13414,14 +13424,14 @@ connectScrollTo(ScrollTo);
|
|
|
13414
13424
|
* );
|
|
13415
13425
|
*/
|
|
13416
13426
|
|
|
13417
|
-
var SearchBox = connectSearchBox(SearchBox$
|
|
13427
|
+
var SearchBox$2 = connectSearchBox(SearchBox$1);
|
|
13418
13428
|
|
|
13419
|
-
var cx$
|
|
13429
|
+
var cx$j = createClassNames('Snippet');
|
|
13420
13430
|
|
|
13421
13431
|
var Snippet = function Snippet(props) {
|
|
13422
|
-
return
|
|
13432
|
+
return React__default.createElement(Highlighter, _extends({}, props, {
|
|
13423
13433
|
highlightProperty: "_snippetResult",
|
|
13424
|
-
cx: cx$
|
|
13434
|
+
cx: cx$j
|
|
13425
13435
|
}));
|
|
13426
13436
|
};
|
|
13427
13437
|
|
|
@@ -13471,11 +13481,11 @@ var Snippet = function Snippet(props) {
|
|
|
13471
13481
|
|
|
13472
13482
|
connectHighlight(Snippet);
|
|
13473
13483
|
|
|
13474
|
-
var cx$
|
|
13484
|
+
var cx$k = createClassNames('RelevantSort');
|
|
13475
13485
|
|
|
13476
13486
|
var DefaultButtonTextComponent = function DefaultButtonTextComponent(_ref) {
|
|
13477
13487
|
var isRelevantSorted = _ref.isRelevantSorted;
|
|
13478
|
-
return
|
|
13488
|
+
return React__default.createElement("span", null, isRelevantSorted ? 'See all results' : 'See relevant results');
|
|
13479
13489
|
};
|
|
13480
13490
|
|
|
13481
13491
|
var RelevantSort = function RelevantSort(_ref2) {
|
|
@@ -13487,18 +13497,18 @@ var RelevantSort = function RelevantSort(_ref2) {
|
|
|
13487
13497
|
ButtonTextComponent = _ref2$buttonTextCompo === void 0 ? DefaultButtonTextComponent : _ref2$buttonTextCompo,
|
|
13488
13498
|
TextComponent = _ref2.textComponent,
|
|
13489
13499
|
refine = _ref2.refine;
|
|
13490
|
-
return !isVirtualReplica ? null :
|
|
13491
|
-
className: classnames(cx$
|
|
13492
|
-
},
|
|
13493
|
-
className: cx$
|
|
13494
|
-
}, TextComponent &&
|
|
13500
|
+
return !isVirtualReplica ? null : React__default.createElement("div", {
|
|
13501
|
+
className: classnames(cx$k(''), className)
|
|
13502
|
+
}, React__default.createElement("div", {
|
|
13503
|
+
className: cx$k('text')
|
|
13504
|
+
}, TextComponent && React__default.createElement(TextComponent, {
|
|
13495
13505
|
isRelevantSorted: isRelevantSorted
|
|
13496
|
-
})),
|
|
13497
|
-
className: cx$
|
|
13506
|
+
})), React__default.createElement("button", {
|
|
13507
|
+
className: cx$k('button'),
|
|
13498
13508
|
onClick: function onClick() {
|
|
13499
13509
|
return refine(isRelevantSorted ? 0 : undefined);
|
|
13500
13510
|
}
|
|
13501
|
-
},
|
|
13511
|
+
}, React__default.createElement(ButtonTextComponent, {
|
|
13502
13512
|
isRelevantSorted: isRelevantSorted
|
|
13503
13513
|
})));
|
|
13504
13514
|
};
|
|
@@ -13514,7 +13524,7 @@ RelevantSort.propTypes = {
|
|
|
13514
13524
|
|
|
13515
13525
|
connectRelevantSort(RelevantSort);
|
|
13516
13526
|
|
|
13517
|
-
var cx$
|
|
13527
|
+
var cx$l = createClassNames('SortBy');
|
|
13518
13528
|
|
|
13519
13529
|
var SortBy =
|
|
13520
13530
|
/*#__PURE__*/
|
|
@@ -13535,10 +13545,10 @@ function (_Component) {
|
|
|
13535
13545
|
currentRefinement = _this$props.currentRefinement,
|
|
13536
13546
|
refine = _this$props.refine,
|
|
13537
13547
|
className = _this$props.className;
|
|
13538
|
-
return
|
|
13539
|
-
className: classnames(cx$
|
|
13540
|
-
},
|
|
13541
|
-
cx: cx$
|
|
13548
|
+
return React__default.createElement("div", {
|
|
13549
|
+
className: classnames(cx$l(''), className)
|
|
13550
|
+
}, React__default.createElement(Select, {
|
|
13551
|
+
cx: cx$l,
|
|
13542
13552
|
items: items,
|
|
13543
13553
|
selectedItem: currentRefinement,
|
|
13544
13554
|
onSelect: refine
|
|
@@ -13604,7 +13614,7 @@ _defineProperty(SortBy, "defaultProps", {
|
|
|
13604
13614
|
|
|
13605
13615
|
connectSortBy(SortBy);
|
|
13606
13616
|
|
|
13607
|
-
var cx$
|
|
13617
|
+
var cx$m = createClassNames('Stats');
|
|
13608
13618
|
|
|
13609
13619
|
var Stats = function Stats(_ref) {
|
|
13610
13620
|
var _ref$className = _ref.className,
|
|
@@ -13614,10 +13624,10 @@ var Stats = function Stats(_ref) {
|
|
|
13614
13624
|
nbSortedHits = _ref.nbSortedHits,
|
|
13615
13625
|
processingTimeMS = _ref.processingTimeMS,
|
|
13616
13626
|
translate = _ref.translate;
|
|
13617
|
-
return
|
|
13618
|
-
className: classnames(cx$
|
|
13619
|
-
},
|
|
13620
|
-
className: cx$
|
|
13627
|
+
return React__default.createElement("div", {
|
|
13628
|
+
className: classnames(cx$m(''), className)
|
|
13629
|
+
}, React__default.createElement("span", {
|
|
13630
|
+
className: cx$m('text')
|
|
13621
13631
|
}, translate('stats', nbHits, processingTimeMS, nbSortedHits, areHitsSorted)));
|
|
13622
13632
|
};
|
|
13623
13633
|
|
|
@@ -13665,7 +13675,7 @@ var Stats$1 = translatable({
|
|
|
13665
13675
|
|
|
13666
13676
|
connectStats(Stats$1);
|
|
13667
13677
|
|
|
13668
|
-
var cx$
|
|
13678
|
+
var cx$n = createClassNames('ToggleRefinement');
|
|
13669
13679
|
|
|
13670
13680
|
var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
13671
13681
|
var currentRefinement = _ref.currentRefinement,
|
|
@@ -13673,19 +13683,19 @@ var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
|
13673
13683
|
canRefine = _ref.canRefine,
|
|
13674
13684
|
refine = _ref.refine,
|
|
13675
13685
|
className = _ref.className;
|
|
13676
|
-
return
|
|
13677
|
-
className: classnames(cx$
|
|
13678
|
-
},
|
|
13679
|
-
className: cx$
|
|
13680
|
-
},
|
|
13681
|
-
className: cx$
|
|
13686
|
+
return React__default.createElement("div", {
|
|
13687
|
+
className: classnames(cx$n('', !canRefine && '-noRefinement'), className)
|
|
13688
|
+
}, React__default.createElement("label", {
|
|
13689
|
+
className: cx$n('label')
|
|
13690
|
+
}, React__default.createElement("input", {
|
|
13691
|
+
className: cx$n('checkbox'),
|
|
13682
13692
|
type: "checkbox",
|
|
13683
13693
|
checked: currentRefinement,
|
|
13684
13694
|
onChange: function onChange(event) {
|
|
13685
13695
|
return refine(event.target.checked);
|
|
13686
13696
|
}
|
|
13687
|
-
}),
|
|
13688
|
-
className: cx$
|
|
13697
|
+
}), React__default.createElement("span", {
|
|
13698
|
+
className: cx$n('labelText')
|
|
13689
13699
|
}, label)));
|
|
13690
13700
|
};
|
|
13691
13701
|
|
|
@@ -13894,11 +13904,11 @@ function createVoiceSearchHelper(_ref) {
|
|
|
13894
13904
|
};
|
|
13895
13905
|
}
|
|
13896
13906
|
|
|
13897
|
-
var cx$
|
|
13907
|
+
var cx$o = createClassNames('VoiceSearch');
|
|
13898
13908
|
|
|
13899
13909
|
var ButtonSvg = function ButtonSvg(_ref) {
|
|
13900
13910
|
var children = _ref.children;
|
|
13901
|
-
return
|
|
13911
|
+
return React__default.createElement("svg", {
|
|
13902
13912
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13903
13913
|
width: "16",
|
|
13904
13914
|
height: "16",
|
|
@@ -13915,36 +13925,36 @@ var DefaultButtonText = function DefaultButtonText(_ref2) {
|
|
|
13915
13925
|
var status = _ref2.status,
|
|
13916
13926
|
errorCode = _ref2.errorCode,
|
|
13917
13927
|
isListening = _ref2.isListening;
|
|
13918
|
-
return status === 'error' && errorCode === 'not-allowed' ?
|
|
13928
|
+
return status === 'error' && errorCode === 'not-allowed' ? React__default.createElement(ButtonSvg, null, React__default.createElement("line", {
|
|
13919
13929
|
x1: "1",
|
|
13920
13930
|
y1: "1",
|
|
13921
13931
|
x2: "23",
|
|
13922
13932
|
y2: "23"
|
|
13923
|
-
}),
|
|
13933
|
+
}), React__default.createElement("path", {
|
|
13924
13934
|
d: "M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"
|
|
13925
|
-
}),
|
|
13935
|
+
}), React__default.createElement("path", {
|
|
13926
13936
|
d: "M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"
|
|
13927
|
-
}),
|
|
13937
|
+
}), React__default.createElement("line", {
|
|
13928
13938
|
x1: "12",
|
|
13929
13939
|
y1: "19",
|
|
13930
13940
|
x2: "12",
|
|
13931
13941
|
y2: "23"
|
|
13932
|
-
}),
|
|
13942
|
+
}), React__default.createElement("line", {
|
|
13933
13943
|
x1: "8",
|
|
13934
13944
|
y1: "23",
|
|
13935
13945
|
x2: "16",
|
|
13936
13946
|
y2: "23"
|
|
13937
|
-
})) :
|
|
13947
|
+
})) : React__default.createElement(ButtonSvg, null, React__default.createElement("path", {
|
|
13938
13948
|
d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z",
|
|
13939
13949
|
fill: isListening ? 'currentColor' : ''
|
|
13940
|
-
}),
|
|
13950
|
+
}), React__default.createElement("path", {
|
|
13941
13951
|
d: "M19 10v2a7 7 0 0 1-14 0v-2"
|
|
13942
|
-
}),
|
|
13952
|
+
}), React__default.createElement("line", {
|
|
13943
13953
|
x1: "12",
|
|
13944
13954
|
y1: "19",
|
|
13945
13955
|
x2: "12",
|
|
13946
13956
|
y2: "23"
|
|
13947
|
-
}),
|
|
13957
|
+
}), React__default.createElement("line", {
|
|
13948
13958
|
x1: "8",
|
|
13949
13959
|
y1: "23",
|
|
13950
13960
|
x2: "16",
|
|
@@ -13954,7 +13964,7 @@ var DefaultButtonText = function DefaultButtonText(_ref2) {
|
|
|
13954
13964
|
|
|
13955
13965
|
var DefaultStatus = function DefaultStatus(_ref3) {
|
|
13956
13966
|
var transcript = _ref3.transcript;
|
|
13957
|
-
return
|
|
13967
|
+
return React__default.createElement("p", null, transcript);
|
|
13958
13968
|
};
|
|
13959
13969
|
|
|
13960
13970
|
var VoiceSearch =
|
|
@@ -14039,17 +14049,17 @@ function (_Component) {
|
|
|
14039
14049
|
isSpeechFinal: isSpeechFinal,
|
|
14040
14050
|
isBrowserSupported: isBrowserSupported()
|
|
14041
14051
|
};
|
|
14042
|
-
return
|
|
14043
|
-
className: cx$
|
|
14044
|
-
},
|
|
14045
|
-
className: cx$
|
|
14052
|
+
return React__default.createElement("div", {
|
|
14053
|
+
className: cx$o('')
|
|
14054
|
+
}, React__default.createElement("button", {
|
|
14055
|
+
className: cx$o('button'),
|
|
14046
14056
|
type: "button",
|
|
14047
14057
|
title: isBrowserSupported() ? translate('buttonTitle') : translate('disabledButtonTitle'),
|
|
14048
14058
|
onClick: this.onClick,
|
|
14049
14059
|
disabled: !isBrowserSupported()
|
|
14050
|
-
},
|
|
14051
|
-
className: cx$
|
|
14052
|
-
},
|
|
14060
|
+
}, React__default.createElement(ButtonTextComponent, innerProps)), React__default.createElement("div", {
|
|
14061
|
+
className: cx$o('status')
|
|
14062
|
+
}, React__default.createElement(StatusComponent, innerProps)));
|
|
14053
14063
|
}
|
|
14054
14064
|
}, {
|
|
14055
14065
|
key: "componentWillUnmount",
|
|
@@ -14076,14 +14086,14 @@ var VoiceSearch$1 = translatable({
|
|
|
14076
14086
|
|
|
14077
14087
|
connectVoiceSearch(VoiceSearch$1);
|
|
14078
14088
|
|
|
14079
|
-
var cx = createClassNames('QueryRuleCustomData');
|
|
14089
|
+
var cx$p = createClassNames('QueryRuleCustomData');
|
|
14080
14090
|
|
|
14081
14091
|
var QueryRuleCustomData = function QueryRuleCustomData(_ref) {
|
|
14082
14092
|
var items = _ref.items,
|
|
14083
14093
|
className = _ref.className,
|
|
14084
14094
|
children = _ref.children;
|
|
14085
|
-
return
|
|
14086
|
-
className: classnames(cx(''), className)
|
|
14095
|
+
return React__default.createElement("div", {
|
|
14096
|
+
className: classnames(cx$p(''), className)
|
|
14087
14097
|
}, children({
|
|
14088
14098
|
items: items
|
|
14089
14099
|
}));
|
|
@@ -14096,7 +14106,7 @@ QueryRuleCustomData.propTypes = {
|
|
|
14096
14106
|
};
|
|
14097
14107
|
|
|
14098
14108
|
var QueryRuleCustomDataWidget = function QueryRuleCustomDataWidget(props) {
|
|
14099
|
-
return
|
|
14109
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(QueryRuleCustomData, props));
|
|
14100
14110
|
};
|
|
14101
14111
|
|
|
14102
14112
|
connectQueryRules(QueryRuleCustomDataWidget);
|
|
@@ -14120,57 +14130,57 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14120
14130
|
|
|
14121
14131
|
var hit = props.hit;
|
|
14122
14132
|
if (moment().isSameOrBefore(props.hit.pubDateSort)) return null;
|
|
14123
|
-
return
|
|
14133
|
+
return React__default.createElement(
|
|
14124
14134
|
'div',
|
|
14125
14135
|
{ key: hit.url, className: 'hitResult ' + styles.article },
|
|
14126
|
-
|
|
14136
|
+
React__default.createElement(
|
|
14127
14137
|
'a',
|
|
14128
14138
|
{ href: '/view/' + hit.url, style: this.props.variant === 'right' ? { flexDirection: 'row-reverse' } : {} },
|
|
14129
|
-
|
|
14139
|
+
React__default.createElement(
|
|
14130
14140
|
'div',
|
|
14131
14141
|
{ className: styles.thumb },
|
|
14132
|
-
|
|
14142
|
+
React__default.createElement(
|
|
14133
14143
|
'figure',
|
|
14134
14144
|
null,
|
|
14135
|
-
|
|
14145
|
+
React__default.createElement(
|
|
14136
14146
|
LazyLoad,
|
|
14137
14147
|
{ once: true },
|
|
14138
|
-
|
|
14148
|
+
React__default.createElement('img', {
|
|
14139
14149
|
src: hit.thumbnail && hit.thumbnail.asset ? urlFor({ client: client, source: hit.thumbnail }) : hit.thumbnail && _typeof$2(hit.thumbnail === 'string') ? hit.thumbnail : this.props.defaultImage
|
|
14140
14150
|
})
|
|
14141
14151
|
)
|
|
14142
14152
|
)
|
|
14143
14153
|
)
|
|
14144
14154
|
),
|
|
14145
|
-
|
|
14155
|
+
React__default.createElement(
|
|
14146
14156
|
'div',
|
|
14147
14157
|
{ className: styles.info, style: this.props.variant === 'right' ? { padding: '0 1rem 0 0' } : { padding: ' 0 0 0 1rem' } },
|
|
14148
|
-
|
|
14158
|
+
React__default.createElement(
|
|
14149
14159
|
'a',
|
|
14150
14160
|
{ href: '/view/' + hit.url },
|
|
14151
|
-
|
|
14161
|
+
React__default.createElement(
|
|
14152
14162
|
'h2',
|
|
14153
14163
|
null,
|
|
14154
14164
|
hit.title
|
|
14155
14165
|
)
|
|
14156
14166
|
),
|
|
14157
|
-
hit.pubDateSort &&
|
|
14167
|
+
hit.pubDateSort && React__default.createElement(
|
|
14158
14168
|
'p',
|
|
14159
14169
|
{ className: styles.published },
|
|
14160
14170
|
moment(hit.pubDateSort).format('MMMM Do YYYY')
|
|
14161
14171
|
),
|
|
14162
|
-
hit.authorMapping && hit.authorMapping.length > 0 &&
|
|
14172
|
+
hit.authorMapping && hit.authorMapping.length > 0 && React__default.createElement(
|
|
14163
14173
|
'p',
|
|
14164
14174
|
{ className: styles.author },
|
|
14165
14175
|
hit.authorMapping.map(function (author) {
|
|
14166
|
-
return
|
|
14176
|
+
return React__default.createElement(
|
|
14167
14177
|
'span',
|
|
14168
14178
|
null,
|
|
14169
14179
|
author.displayName
|
|
14170
14180
|
);
|
|
14171
14181
|
})
|
|
14172
14182
|
),
|
|
14173
|
-
hit.summary &&
|
|
14183
|
+
hit.summary && React__default.createElement('p', { dangerouslySetInnerHTML: { __html: hit.summary }, className: styles.summary })
|
|
14174
14184
|
)
|
|
14175
14185
|
);
|
|
14176
14186
|
}
|
|
@@ -14183,10 +14193,10 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14183
14193
|
styles: this.props.deckStyles,
|
|
14184
14194
|
client: this.props.sanityClient
|
|
14185
14195
|
};
|
|
14186
|
-
return
|
|
14187
|
-
|
|
14196
|
+
return React__default.createElement(
|
|
14197
|
+
React__default.Fragment,
|
|
14188
14198
|
null,
|
|
14189
|
-
|
|
14199
|
+
React__default.createElement(
|
|
14190
14200
|
InstantSearch,
|
|
14191
14201
|
_extends$1({
|
|
14192
14202
|
searchClient: this.props.searchClient,
|
|
@@ -14197,29 +14207,29 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14197
14207
|
indexName: this.props.indexName,
|
|
14198
14208
|
onSearchParameters: this.props.onSearchParameters
|
|
14199
14209
|
}, this.props),
|
|
14200
|
-
|
|
14201
|
-
|
|
14202
|
-
this.props.refinementAttributes &&
|
|
14210
|
+
React__default.createElement(Configure, { hitsPerPage: this.props.hitsPerPage || 20 }),
|
|
14211
|
+
React__default.createElement(SearchBox$2, null),
|
|
14212
|
+
this.props.refinementAttributes && React__default.createElement(
|
|
14203
14213
|
'div',
|
|
14204
14214
|
{ className: 'search_refinement' },
|
|
14205
14215
|
this.props.refinementAttributes.map(function (item, index) {
|
|
14206
|
-
return
|
|
14216
|
+
return React__default.createElement(
|
|
14207
14217
|
DropdownButton,
|
|
14208
14218
|
{ title: item.title },
|
|
14209
|
-
|
|
14219
|
+
React__default.createElement(RefinementList$3, { showMore: item.showMore, limit: item.limit, showMoreLimit: item.showMoreLimit, attribute: item.attribute })
|
|
14210
14220
|
);
|
|
14211
14221
|
})
|
|
14212
14222
|
),
|
|
14213
|
-
|
|
14223
|
+
React__default.createElement(
|
|
14214
14224
|
'div',
|
|
14215
14225
|
{ className: 'AlgoliaResults' },
|
|
14216
|
-
|
|
14226
|
+
React__default.createElement(Hits$1, { hitComponent: function hitComponent(hit) {
|
|
14217
14227
|
return _this2.Deck(_extends$1({}, hit, { propsObj: propsObj }));
|
|
14218
14228
|
} })
|
|
14219
14229
|
),
|
|
14220
|
-
|
|
14230
|
+
React__default.createElement(Pagination$2, null)
|
|
14221
14231
|
),
|
|
14222
|
-
|
|
14232
|
+
React__default.createElement(
|
|
14223
14233
|
'style',
|
|
14224
14234
|
{ jsx: 'true' },
|
|
14225
14235
|
'\n .hitResult {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-bottom: 1rem;\n border-bottom: 1px solid #00000024;\n padding: 1rem 0;\n }\n .hitResult > a:first-child {\n width: 30%;\n }\n .hitResult > a:first-child > div{\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n .hitResult > div:last-child > a {\n margin-bottom: .5rem;\n width: 100%;\n }\n @media only screen and (max-width: 568px) {\n .hitResult {\n flex-direction: column;\n align-items: center;\n border: none;\n padding: 0;\n }\n .hitResult > a:first-child {\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n }\n .AlgoliaResults {\n padding-left: 15px;\n margin-top: 3rem;\n }\n\n .search_refinement {\n display: flex;\n margin: 2rem 0;\n }\n\n .search_refinement > div {\n padding-right: 1rem;\n max-height: 500px;\n }\n\n .ais-Hits-list {\n margin: 0;\n list-style: none;\n padding-inline-start: 0;\n }\n .ais-Pagination-list {\n list-style: none;\n }\n .ais-Pagination-list {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n .ais-Pagination-item + .ais-Pagination-item {\n margin-left: 0.3rem;\n }\n .ais-Pagination-link {\n padding: 0.3rem 0.6rem;\n display: block;\n border: 1px solid var(--search-primary);\n border-radius: 5px;\n transition: background-color 0.2s ease-out;\n }\n .ais-Pagination-link:focus,\n .ais-Pagination-link:hover {\n background-color: var(--search-secondary);\n color: #fff;\n }\n .ais-Pagination-item--disabled .ais-Pagination-link {\n opacity: 0.6;\n cursor: not-allowed;\n color: var(--search-secondary);\n }\n .ais-Pagination-item--disabled .ais-Pagination-link:focus,\n .ais-Pagination-item--disabled .ais-Pagination-link:hover {\n color: #fff;\n background-color: var(--search-secondary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link {\n color: #fff;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link:focus,\n .ais-Pagination-item--selected .ais-Pagination-link:hover {\n color: #fff;\n }\n .ais-Pagination-list,\n .ais-Results-list {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .ais-Pagination-list,\n .ais-PoweredBy,\n .ais-RangeInput-form,\n .ais-RatingMenu-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .ais-RefinementList-item {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .ais-RefinementList-list {\n margin: 0;\n padding: 0 1rem;\n width: max-content;\n }\n .ais-SearchBox-form {\n width: 100%;\n border-radius: 5px;\n height: 48px;\n }\n .ais-SearchBox-input {\n padding: 0.5rem;\n border-radius: 5px;\n width: calc(100% - 150px);\n height: 48px;\n border: 0;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit {\n width: 78px;\n border-radius: 5px;\n padding: 7px;\n margin-left: 5px;\n height: 48px;\n background-color: var(--search-primary);\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit > svg {\n fill: #fff;\n }\n .search_refinement > .dropdown > button {\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n\n .ais-SearchBox-reset {\n height: 48px;\n width: 48px;\n color: #fff;\n background-color: var(--search-primary);\n border: 0;\n margin-left: 5px;\n border-radius: 5px;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-reset > svg {\n fill: #fff;\n }\n .ais-RefinementList-checkbox {\n margin-right: 5px;\n }\n\n .ais-RefinementList-showMore {\n padding: 0.5rem;\n border: 0;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n color: #fff;\n border: 1px solid;\n border-radius: 5px;\n margin-left: 1rem;\n }\n '
|
|
@@ -14229,7 +14239,7 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14229
14239
|
}]);
|
|
14230
14240
|
|
|
14231
14241
|
return AlgoliaSearch;
|
|
14232
|
-
}(
|
|
14242
|
+
}(React__default.Component);
|
|
14233
14243
|
|
|
14234
14244
|
AlgoliaSearch.propTypes = {
|
|
14235
14245
|
searchState: PropTypes.object,
|