@mjhls/mjh-framework 1.0.840 → 1.0.841-dv
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 +1 -1
- package/dist/cjs/AD300x250.js +24 -24
- package/dist/cjs/AD300x250x600.js +24 -24
- package/dist/cjs/AD728x90.js +27 -27
- package/dist/cjs/ADFloatingFooter.js +23 -23
- package/dist/cjs/ADFooter.js +6 -6
- package/dist/cjs/ADGutter.js +23 -23
- package/dist/cjs/{ADInfeed-8b336c67.js → ADInfeed-ad02bfab.js} +4 -4
- package/dist/cjs/ADSkyscraper.js +23 -23
- package/dist/cjs/ADSponsoredResources.js +23 -23
- package/dist/cjs/ADWebcast.js +23 -23
- package/dist/cjs/ADWelcome.js +20 -20
- package/dist/cjs/{ADlgInfeed-aedd5e18.js → ADlgInfeed-eb23fc9f.js} +4 -4
- package/dist/cjs/AccordionPanel.js +8 -8
- package/dist/cjs/AdSlot.js +92 -24
- package/dist/cjs/AdSlotsProvider.js +22 -16
- package/dist/cjs/AlgoliaSearch.js +493 -483
- package/dist/cjs/AlphabeticList.js +10 -10
- package/dist/cjs/ArticleCarousel.js +17 -17
- package/dist/cjs/ArticleProgramLandingPage.js +50 -50
- package/dist/cjs/ArticleSeriesLandingPage.js +32 -32
- package/dist/cjs/ArticleSeriesListing.js +33 -33
- package/dist/cjs/Auth.js +348 -519
- package/dist/cjs/AuthWrapper.js +19 -19
- package/dist/cjs/{AuthorComponent-c21aac7f.js → AuthorComponent-ac8972ce.js} +1 -1
- package/dist/cjs/Beam.js +8 -8
- package/dist/cjs/{BlockContent-36e54d77.js → BlockContent-8b494587.js} +34 -34
- package/dist/cjs/Breadcrumbs.js +8 -8
- package/dist/cjs/CMEDeck.js +24 -24
- package/dist/cjs/Column2.js +16 -16
- package/dist/cjs/Column3.js +33 -33
- package/dist/cjs/ConferenceArticleCard.js +7 -7
- package/dist/cjs/DeckContent.js +35 -35
- package/dist/cjs/DeckQueue.js +32 -32
- package/dist/cjs/{Dfp-93399f8c.js → Dfp-391fd124.js} +15 -15
- package/dist/cjs/EventsDeck.js +28 -28
- package/dist/cjs/ExternalResources.js +47 -47
- package/dist/cjs/Feature.js +4 -4
- package/dist/cjs/ForbesHero.js +12 -12
- package/dist/cjs/GridContent.js +48 -48
- package/dist/cjs/GridHero.js +13 -13
- package/dist/cjs/GroupDeck.js +14 -14
- package/dist/cjs/HamMagazine.js +27 -27
- package/dist/cjs/Hero.js +4 -4
- package/dist/cjs/HighlightenVideo.js +2 -2
- package/dist/cjs/HorizontalArticleListing.js +47 -47
- package/dist/cjs/HorizontalHero.js +4 -4
- package/dist/cjs/IssueContentDeck.js +13 -13
- package/dist/cjs/IssueDeck.js +17 -17
- package/dist/cjs/IssueLanding.js +55 -55
- package/dist/cjs/LeftNav.js +22 -22
- package/dist/cjs/MasterDeck.js +34 -34
- package/dist/cjs/MediaSeriesLanding.js +327 -327
- package/dist/cjs/NavDvm.js +13 -13
- package/dist/cjs/NavMagazine.js +30 -30
- package/dist/cjs/NavNative.js +32 -32
- package/dist/cjs/OncliveHero.js +4 -4
- package/dist/cjs/OncliveLargeHero.js +13 -13
- package/dist/cjs/PageFilter.js +6 -6
- package/dist/cjs/PartnerDetailListing.js +57 -57
- package/dist/cjs/PdfDownload.js +1 -1
- package/dist/cjs/PopUpModal.js +6 -6
- package/dist/cjs/PubSection.js +34 -34
- package/dist/cjs/PubToc.js +8 -8
- package/dist/cjs/PublicationDeck.js +8 -8
- package/dist/cjs/PublicationLanding.js +28 -28
- package/dist/cjs/QueueDeckExpanded.js +38 -38
- package/dist/cjs/RecentNews.js +3 -3
- package/dist/cjs/RelatedContent.js +7 -7
- package/dist/cjs/Search.js +8 -8
- package/dist/cjs/Segment.js +6 -6
- package/dist/cjs/SeriesListingDeck.js +20 -20
- package/dist/cjs/{SeriesSlider-cbab9f0f.js → SeriesSlider-d38767ae.js} +10 -10
- package/dist/cjs/SetCookie.js +1 -1
- package/dist/cjs/SideFooter.js +15 -15
- package/dist/cjs/{SocialSearchComponent-ecb4f972.js → SocialSearchComponent-9a9d6f8c.js} +10 -10
- package/dist/cjs/TaxonomyCard.js +10 -10
- package/dist/cjs/TaxonomyDescription.js +46 -46
- package/dist/cjs/TemplateNormal.js +47 -47
- package/dist/cjs/ThumbnailCard.js +7 -7
- package/dist/cjs/Ustream.js +13 -13
- package/dist/cjs/VerticalHero.js +3 -3
- package/dist/cjs/VideoProgramLandingPage.js +52 -52
- package/dist/cjs/VideoSeriesCard.js +13 -13
- package/dist/cjs/VideoSeriesFilter.js +9 -9
- package/dist/cjs/VideoSeriesLandingPage.js +38 -38
- package/dist/cjs/VideoSeriesListing.js +33 -33
- package/dist/cjs/View.js +172 -91
- package/dist/cjs/YahooHero.js +15 -15
- package/dist/cjs/YoutubeGroup.js +22 -22
- package/dist/cjs/{_is-array-6128bd56.js → _is-array-754e012d.js} +6 -6
- package/dist/cjs/{_iter-detect-55a5657a.js → _iter-detect-60b2f026.js} +8 -8
- package/dist/cjs/{_object-pie-083f2dd6.js → _object-pie-68c5bcbc.js} +4 -4
- package/dist/cjs/{_object-sap-a175b4a9.js → _object-sap-5e74ba08.js} +1 -1
- package/dist/cjs/{_object-to-array-8fe5a54f.js → _object-to-array-5762f850.js} +2 -2
- package/dist/cjs/{_to-object-6de10e57.js → _to-object-329a650b.js} +8 -8
- package/dist/cjs/{asyncToGenerator-58c289d9.js → asyncToGenerator-140e5f89.js} +32 -32
- package/dist/cjs/{brightcove-react-player-loader.es-a195642e.js → brightcove-react-player-loader.es-4ba0d3d5.js} +4 -5
- package/dist/cjs/{core.get-iterator-method-f474eacc.js → core.get-iterator-method-f62321d4.js} +2 -2
- package/dist/cjs/{debounce-d4a2369b.js → debounce-529c8d06.js} +2 -2
- package/dist/cjs/{define-property-c88be878.js → define-property-f4d12f4e.js} +6 -6
- package/dist/cjs/{defineProperty-0cb76d99.js → defineProperty-55548b25.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/{es6.string.iterator-c2573ffd.js → es6.string.iterator-cc0bbaa4.js} +6 -6
- package/dist/cjs/{extends-29bdbc6d.js → extends-0a918631.js} +7 -7
- package/dist/cjs/faundadb.js +7 -7
- package/dist/cjs/{get-5839e5b5.js → get-adbb11e3.js} +21 -21
- package/dist/cjs/getRelatedArticle.js +14 -14
- package/dist/cjs/getRootDocGroup.js +6 -6
- package/dist/cjs/getSerializers.js +45 -45
- package/dist/cjs/{getTargeting-be6168ad.js → getTargeting-ea2ea5e7.js} +2 -2
- package/dist/cjs/getTargeting.js +8 -8
- package/dist/cjs/{index-fc2f1ca2.js → index-2cf30c83.js} +4 -4
- package/dist/cjs/{index-f86bb269.js → index-5be2866f.js} +45 -44
- package/dist/cjs/{index-eadd5035.js → index-9d365128.js} +7 -7
- package/dist/cjs/{index-efca863c.js → index-b5eb3ff8.js} +11 -16
- package/dist/cjs/{index-0a582ba9.js → index-c1d8b5a1.js} +167 -167
- package/dist/cjs/{index-8041a4eb.js → index-f0677b9d.js} +1 -1
- package/dist/cjs/{index.es-f3e47207.js → index.es-13533f24.js} +4 -20
- package/dist/cjs/{index.esm-8123cf40.js → index.esm-3ffa049c.js} +1 -1
- package/dist/cjs/index.js +137 -137
- package/dist/cjs/{inherits-c2065b95.js → inherits-0c7830c5.js} +19 -19
- package/dist/cjs/{isSymbol-03abbdf0.js → isSymbol-04666465.js} +15 -15
- package/dist/cjs/keys-a586b7a0.js +25 -0
- package/dist/cjs/{lodash-f0783643.js → lodash-7fd85bcf.js} +10 -58
- package/dist/cjs/{main-025fdc78.js → main-11ec04d2.js} +161 -240
- package/dist/cjs/{moment-aca40de1.js → moment-66a6a284.js} +9 -11
- package/dist/cjs/{react-social-icons-af932527.js → react-social-icons-07939b41.js} +17 -17
- package/dist/cjs/{slicedToArray-5d1bc3b3.js → slicedToArray-8f385299.js} +14 -14
- package/dist/cjs/{smoothscroll-99df7f93.js → smoothscroll-5054361f.js} +1 -1
- package/dist/cjs/stringify-7c5aff47.js +17 -0
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-ddb70795.js → toConsumableArray-9a3476fe.js} +9 -9
- package/dist/cjs/{toNumber-5e1fac58.js → toNumber-36d1e7e5.js} +5 -40
- package/dist/cjs/{typeof-88a668c5.js → typeof-9d7f610f.js} +35 -35
- package/dist/cjs/urlFor.js +1 -1
- package/dist/cjs/{ustream-api-b2b9092f.js → ustream-api-d092dc31.js} +4 -4
- package/dist/cjs/{util-6f784d85.js → util-f2c1b65b.js} +1 -1
- package/dist/cjs/{web.dom.iterable-46657b5c.js → web.dom.iterable-a0e279c1.js} +3 -3
- package/dist/esm/AD.js +1 -1
- 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 +23 -23
- package/dist/esm/ADFooter.js +6 -6
- package/dist/esm/ADGutter.js +23 -23
- package/dist/esm/{ADInfeed-28b1e946.js → ADInfeed-e8ab7008.js} +4 -4
- package/dist/esm/ADSkyscraper.js +23 -23
- package/dist/esm/ADSponsoredResources.js +23 -23
- package/dist/esm/ADWebcast.js +23 -23
- package/dist/esm/ADWelcome.js +20 -20
- package/dist/esm/{ADlgInfeed-0b474b02.js → ADlgInfeed-882b23a8.js} +4 -4
- package/dist/esm/AccordionPanel.js +8 -8
- package/dist/esm/AdSlot.js +92 -24
- package/dist/esm/AdSlotsProvider.js +22 -16
- package/dist/esm/AlgoliaSearch.js +493 -483
- package/dist/esm/AlphabeticList.js +10 -10
- package/dist/esm/ArticleCarousel.js +17 -17
- package/dist/esm/ArticleProgramLandingPage.js +50 -50
- package/dist/esm/ArticleSeriesLandingPage.js +32 -32
- package/dist/esm/ArticleSeriesListing.js +33 -33
- package/dist/esm/Auth.js +348 -519
- package/dist/esm/AuthWrapper.js +19 -19
- package/dist/esm/{AuthorComponent-5ae7409f.js → AuthorComponent-8ffd4679.js} +1 -1
- package/dist/esm/Beam.js +8 -8
- package/dist/esm/{BlockContent-52cf21c5.js → BlockContent-d05b5b23.js} +34 -34
- package/dist/esm/Breadcrumbs.js +7 -7
- package/dist/esm/CMEDeck.js +24 -24
- package/dist/esm/Column2.js +16 -16
- package/dist/esm/Column3.js +33 -33
- package/dist/esm/ConferenceArticleCard.js +7 -7
- package/dist/esm/DeckContent.js +35 -35
- package/dist/esm/DeckQueue.js +32 -32
- package/dist/esm/{Dfp-43f121ff.js → Dfp-2f9796e1.js} +15 -15
- package/dist/esm/EventsDeck.js +26 -26
- package/dist/esm/ExternalResources.js +47 -47
- package/dist/esm/Feature.js +4 -4
- package/dist/esm/ForbesHero.js +12 -12
- package/dist/esm/GridContent.js +48 -48
- package/dist/esm/GridHero.js +13 -13
- package/dist/esm/GroupDeck.js +14 -14
- package/dist/esm/HamMagazine.js +27 -27
- package/dist/esm/Hero.js +4 -4
- package/dist/esm/HighlightenVideo.js +2 -2
- package/dist/esm/HorizontalArticleListing.js +47 -47
- package/dist/esm/HorizontalHero.js +4 -4
- package/dist/esm/IssueContentDeck.js +13 -13
- package/dist/esm/IssueDeck.js +16 -16
- package/dist/esm/IssueLanding.js +55 -55
- package/dist/esm/LeftNav.js +22 -22
- package/dist/esm/MasterDeck.js +34 -34
- package/dist/esm/MediaSeriesLanding.js +327 -327
- package/dist/esm/NavDvm.js +13 -13
- package/dist/esm/NavMagazine.js +30 -30
- package/dist/esm/NavNative.js +30 -30
- package/dist/esm/OncliveHero.js +4 -4
- package/dist/esm/OncliveLargeHero.js +13 -13
- package/dist/esm/PageFilter.js +6 -6
- package/dist/esm/PartnerDetailListing.js +57 -57
- package/dist/esm/PdfDownload.js +1 -1
- package/dist/esm/PopUpModal.js +6 -6
- package/dist/esm/PubSection.js +34 -34
- package/dist/esm/PubToc.js +8 -8
- package/dist/esm/PublicationDeck.js +7 -7
- package/dist/esm/PublicationLanding.js +27 -27
- package/dist/esm/QueueDeckExpanded.js +38 -38
- package/dist/esm/RecentNews.js +3 -3
- package/dist/esm/RelatedContent.js +7 -7
- package/dist/esm/Search.js +7 -7
- package/dist/esm/Segment.js +6 -6
- package/dist/esm/SeriesListingDeck.js +20 -20
- package/dist/esm/{SeriesSlider-5c62a578.js → SeriesSlider-b8cc1baa.js} +10 -10
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +15 -15
- package/dist/esm/{SocialSearchComponent-cd38ae60.js → SocialSearchComponent-c54d43cb.js} +9 -9
- package/dist/esm/TaxonomyCard.js +10 -10
- package/dist/esm/TaxonomyDescription.js +46 -46
- package/dist/esm/TemplateNormal.js +47 -47
- package/dist/esm/ThumbnailCard.js +7 -7
- package/dist/esm/Ustream.js +13 -13
- package/dist/esm/VerticalHero.js +3 -3
- package/dist/esm/VideoProgramLandingPage.js +51 -51
- package/dist/esm/VideoSeriesCard.js +13 -13
- package/dist/esm/VideoSeriesFilter.js +9 -9
- package/dist/esm/VideoSeriesLandingPage.js +38 -38
- package/dist/esm/VideoSeriesListing.js +33 -33
- package/dist/esm/View.js +171 -90
- package/dist/esm/YahooHero.js +15 -15
- package/dist/esm/YoutubeGroup.js +22 -22
- package/dist/esm/{_is-array-3e99e06e.js → _is-array-58e95429.js} +6 -6
- package/dist/esm/{_iter-detect-7e5e5ce2.js → _iter-detect-5d49a330.js} +8 -8
- package/dist/esm/{_object-pie-133f504a.js → _object-pie-33c40e79.js} +4 -4
- package/dist/esm/{_object-sap-f353c2a9.js → _object-sap-964b6feb.js} +1 -1
- package/dist/esm/{_object-to-array-0f197f89.js → _object-to-array-7e804fce.js} +2 -2
- package/dist/esm/{_to-object-b50e61c3.js → _to-object-a4107da3.js} +9 -9
- package/dist/esm/{asyncToGenerator-7f8f9219.js → asyncToGenerator-fc1c2e29.js} +32 -32
- package/dist/esm/{brightcove-react-player-loader.es-b43c695a.js → brightcove-react-player-loader.es-e1c6b0f2.js} +4 -5
- package/dist/esm/{core.get-iterator-method-133dfacd.js → core.get-iterator-method-e1de7503.js} +2 -2
- package/dist/esm/{debounce-533d9748.js → debounce-9207d8ee.js} +2 -2
- package/dist/esm/{define-property-fe54dc9f.js → define-property-8af5f002.js} +6 -6
- package/dist/esm/{defineProperty-f5ff6f5a.js → defineProperty-94fd8bfc.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/{es6.string.iterator-bc33758b.js → es6.string.iterator-c990c18c.js} +7 -7
- package/dist/esm/{extends-60e0e1c6.js → extends-6f2fcc99.js} +7 -7
- package/dist/esm/faundadb.js +7 -7
- package/dist/esm/{get-3c308da4.js → get-1e515072.js} +21 -21
- package/dist/esm/getRelatedArticle.js +14 -14
- package/dist/esm/getRootDocGroup.js +6 -6
- package/dist/esm/getSerializers.js +45 -45
- package/dist/esm/{getTargeting-68291ce9.js → getTargeting-831bc794.js} +2 -2
- package/dist/esm/getTargeting.js +8 -8
- package/dist/esm/{index-66ffc224.js → index-1fd83450.js} +164 -164
- package/dist/esm/{index-0dbff1d1.js → index-51a80699.js} +11 -16
- package/dist/esm/{index-35bdcc81.js → index-6c12bdd5.js} +6 -6
- package/dist/esm/{index-67e1773f.js → index-b68072f5.js} +1 -1
- package/dist/esm/{index-79cfd25c.js → index-d2f90501.js} +45 -44
- package/dist/esm/{index-2446af28.js → index-f7fb1e25.js} +4 -4
- package/dist/esm/{index.es-c6222053.js → index.es-7dda2f0a.js} +4 -20
- package/dist/esm/{index.esm-8016b507.js → index.esm-8ee5ff72.js} +1 -1
- package/dist/esm/index.js +118 -118
- package/dist/esm/{inherits-a41fe93f.js → inherits-75d45541.js} +19 -19
- package/dist/esm/{isSymbol-a7e9aafe.js → isSymbol-1981418f.js} +15 -15
- package/dist/esm/{keys-7a3adabf.js → keys-8eda7a5c.js} +6 -6
- package/dist/esm/{lodash-f97fd99a.js → lodash-ec8c6b48.js} +10 -58
- package/dist/esm/{main-b5c5aac1.js → main-aef58dbc.js} +156 -235
- package/dist/esm/{moment-bc12cb97.js → moment-12415288.js} +9 -11
- package/dist/esm/{react-social-icons-91f9716f.js → react-social-icons-3822f1ce.js} +16 -16
- package/dist/esm/{slicedToArray-be2f7a22.js → slicedToArray-641f241f.js} +14 -14
- package/dist/esm/{smoothscroll-fa4e3f8c.js → smoothscroll-0cd4c7a6.js} +1 -1
- package/dist/esm/stringify-4330ccdc.js +15 -0
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/{toConsumableArray-6d9a4616.js → toConsumableArray-43aa614d.js} +9 -9
- package/dist/esm/{toNumber-5aeba6e7.js → toNumber-2f7a84cd.js} +5 -40
- package/dist/esm/{typeof-a286cf0c.js → typeof-af9c50d8.js} +35 -35
- package/dist/esm/urlFor.js +1 -1
- package/dist/esm/{ustream-api-33a866b6.js → ustream-api-9a50644d.js} +4 -4
- package/dist/esm/{util-3ab476bf.js → util-7700fc59.js} +1 -1
- package/dist/esm/{web.dom.iterable-4109ff68.js → web.dom.iterable-4439f05a.js} +3 -3
- package/package.json +1 -1
- package/dist/cjs/keys-7f2c2108.js +0 -25
- package/dist/cjs/stringify-c9ac1214.js +0 -17
- package/dist/esm/stringify-59c8f690.js +0 -15
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { _ as _extends$1 } from './extends-60e0e1c6.js';
|
|
2
|
-
import { _ as _typeof$2 } from './typeof-a286cf0c.js';
|
|
3
|
-
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-a41fe93f.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
|
|
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 './_to-object-b50e61c3.js';
|
|
14
|
-
import './_object-pie-133f504a.js';
|
|
15
|
-
import './es6.string.iterator-bc33758b.js';
|
|
16
|
-
import './web.dom.iterable-4109ff68.js';
|
|
17
|
-
import './_is-array-3e99e06e.js';
|
|
2
|
+
import './_to-object-a4107da3.js';
|
|
3
|
+
import './es6.string.iterator-c990c18c.js';
|
|
18
4
|
import './_library-528f1934.js';
|
|
19
|
-
import './_object-
|
|
20
|
-
import './
|
|
21
|
-
import './
|
|
5
|
+
import './_object-pie-33c40e79.js';
|
|
6
|
+
import { _ as _extends$1 } from './extends-6f2fcc99.js';
|
|
7
|
+
import './_object-sap-964b6feb.js';
|
|
8
|
+
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-75d45541.js';
|
|
9
|
+
import './define-property-8af5f002.js';
|
|
10
|
+
import './web.dom.iterable-4439f05a.js';
|
|
11
|
+
import { _ as _typeof$2 } from './typeof-af9c50d8.js';
|
|
12
|
+
import './_is-array-58e95429.js';
|
|
13
|
+
import React, { createContext, Component, Children, version as version$2 } from 'react';
|
|
14
|
+
import { E as EventEmitter } from './events-6c3a7a63.js';
|
|
15
|
+
import PropTypes from 'prop-types';
|
|
16
|
+
import { m as moment } from './moment-12415288.js';
|
|
22
17
|
import 'react-dom';
|
|
18
|
+
import './index-51a80699.js';
|
|
19
|
+
import urlFor from './urlFor.js';
|
|
20
|
+
import { L as LazyLoad } from './index-6c12bdd5.js';
|
|
21
|
+
import { DropdownButton } from 'react-bootstrap';
|
|
22
|
+
import { _ as _objectWithoutPropertiesLoose$1, a as _setPrototypeOf, b as _extends, c as classnames } from './index-b68072f5.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
|
|
|
@@ -848,7 +848,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
848
848
|
});
|
|
849
849
|
}
|
|
850
850
|
|
|
851
|
-
var version
|
|
851
|
+
var version = '6.11.0';
|
|
852
852
|
|
|
853
853
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
854
854
|
return function (props, propName, componentName) {
|
|
@@ -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,
|
|
@@ -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.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
6611
|
+
return React.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
|
|
@@ -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
|
});
|
|
@@ -8556,19 +8566,19 @@ function parseItem(value) {
|
|
|
8556
8566
|
endStr = _value$split2[1];
|
|
8557
8567
|
|
|
8558
8568
|
return {
|
|
8559
|
-
start: startStr.length > 0 ?
|
|
8560
|
-
end: endStr.length > 0 ?
|
|
8569
|
+
start: startStr.length > 0 ? parseFloat(startStr) : null,
|
|
8570
|
+
end: endStr.length > 0 ? parseFloat(endStr) : null
|
|
8561
8571
|
};
|
|
8562
8572
|
}
|
|
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__*/
|
|
@@ -10105,15 +10115,15 @@ function (_Component) {
|
|
|
10105
10115
|
footer = _this$props.footer;
|
|
10106
10116
|
var canRefine = this.state.canRefine;
|
|
10107
10117
|
return React.createElement("div", {
|
|
10108
|
-
className: classnames(cx
|
|
10118
|
+
className: classnames(cx('', !canRefine && '-noRefinement'), className)
|
|
10109
10119
|
}, header && React.createElement("div", {
|
|
10110
|
-
className: cx
|
|
10120
|
+
className: cx('header')
|
|
10111
10121
|
}, header), React.createElement("div", {
|
|
10112
|
-
className: cx
|
|
10122
|
+
className: cx('body')
|
|
10113
10123
|
}, React.createElement(PanelProvider, {
|
|
10114
10124
|
value: this.setCanRefine
|
|
10115
10125
|
}, children)), footer && React.createElement("div", {
|
|
10116
|
-
className: cx
|
|
10126
|
+
className: cx('footer')
|
|
10117
10127
|
}, footer));
|
|
10118
10128
|
}
|
|
10119
10129
|
}]);
|
|
@@ -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
|
}));
|
|
@@ -10266,9 +10276,9 @@ function (_Component) {
|
|
|
10266
10276
|
translate = _this$props.translate,
|
|
10267
10277
|
className = _this$props.className;
|
|
10268
10278
|
var rootPath = canRefine ? React.createElement("li", {
|
|
10269
|
-
className: cx$
|
|
10279
|
+
className: cx$1('item')
|
|
10270
10280
|
}, React.createElement(Link, {
|
|
10271
|
-
className: cx$
|
|
10281
|
+
className: cx$1('link'),
|
|
10272
10282
|
onClick: function onClick() {
|
|
10273
10283
|
return !rootURL ? refine() : null;
|
|
10274
10284
|
},
|
|
@@ -10277,12 +10287,12 @@ function (_Component) {
|
|
|
10277
10287
|
var breadcrumb = items.map(function (item, idx) {
|
|
10278
10288
|
var isLast = idx === items.length - 1;
|
|
10279
10289
|
return React.createElement("li", {
|
|
10280
|
-
className: cx$
|
|
10290
|
+
className: cx$1('item', isLast && 'item--selected'),
|
|
10281
10291
|
key: idx
|
|
10282
10292
|
}, React.createElement("span", {
|
|
10283
|
-
className: cx$
|
|
10293
|
+
className: cx$1('separator')
|
|
10284
10294
|
}, separator), !isLast ? React.createElement(Link, {
|
|
10285
|
-
className: cx$
|
|
10295
|
+
className: cx$1('link'),
|
|
10286
10296
|
onClick: function onClick() {
|
|
10287
10297
|
return refine(item.value);
|
|
10288
10298
|
},
|
|
@@ -10290,9 +10300,9 @@ function (_Component) {
|
|
|
10290
10300
|
}, item.label) : item.label);
|
|
10291
10301
|
});
|
|
10292
10302
|
return React.createElement("div", {
|
|
10293
|
-
className: classnames(cx$
|
|
10303
|
+
className: classnames(cx$1('', !canRefine && '-noRefinement'), className)
|
|
10294
10304
|
}, React.createElement("ul", {
|
|
10295
|
-
className: cx$
|
|
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,
|
|
@@ -10415,7 +10425,7 @@ var BreadcrumbWidget = function BreadcrumbWidget(props) {
|
|
|
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__*/
|
|
@@ -10438,9 +10448,9 @@ function (_Component) {
|
|
|
10438
10448
|
translate = _this$props.translate,
|
|
10439
10449
|
className = _this$props.className;
|
|
10440
10450
|
return React.createElement("div", {
|
|
10441
|
-
className: classnames(cx$
|
|
10451
|
+
className: classnames(cx$2(''), className)
|
|
10442
10452
|
}, React.createElement("button", {
|
|
10443
|
-
className: cx$
|
|
10453
|
+
className: cx$2('button', !canRefine && 'button--disabled'),
|
|
10444
10454
|
onClick: function onClick() {
|
|
10445
10455
|
return refine(items);
|
|
10446
10456
|
},
|
|
@@ -10508,7 +10518,7 @@ var ClearRefinementsWidget = function ClearRefinementsWidget(props) {
|
|
|
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,
|
|
@@ -10516,31 +10526,31 @@ var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
|
10516
10526
|
translate = _ref.translate,
|
|
10517
10527
|
className = _ref.className;
|
|
10518
10528
|
return React.createElement("div", {
|
|
10519
|
-
className: classnames(cx$
|
|
10529
|
+
className: classnames(cx$3('', !canRefine && '-noRefinement'), className)
|
|
10520
10530
|
}, React.createElement("ul", {
|
|
10521
|
-
className: cx$
|
|
10531
|
+
className: cx$3('list', !canRefine && 'list--noRefinement')
|
|
10522
10532
|
}, items.map(function (item) {
|
|
10523
10533
|
return React.createElement("li", {
|
|
10524
10534
|
key: item.label,
|
|
10525
|
-
className: cx$
|
|
10535
|
+
className: cx$3('item')
|
|
10526
10536
|
}, React.createElement("span", {
|
|
10527
|
-
className: cx$
|
|
10537
|
+
className: cx$3('label')
|
|
10528
10538
|
}, item.label), item.items ? item.items.map(function (nest) {
|
|
10529
10539
|
return React.createElement("span", {
|
|
10530
10540
|
key: nest.label,
|
|
10531
|
-
className: cx$
|
|
10541
|
+
className: cx$3('category')
|
|
10532
10542
|
}, React.createElement("span", {
|
|
10533
|
-
className: cx$
|
|
10543
|
+
className: cx$3('categoryLabel')
|
|
10534
10544
|
}, nest.label), React.createElement("button", {
|
|
10535
|
-
className: cx$
|
|
10545
|
+
className: cx$3('delete'),
|
|
10536
10546
|
onClick: function onClick() {
|
|
10537
10547
|
return refine(nest.value);
|
|
10538
10548
|
}
|
|
10539
10549
|
}, translate('clearFilter', nest)));
|
|
10540
10550
|
}) : React.createElement("span", {
|
|
10541
|
-
className: cx$
|
|
10551
|
+
className: cx$3('category')
|
|
10542
10552
|
}, React.createElement("button", {
|
|
10543
|
-
className: cx$
|
|
10553
|
+
className: cx$3('delete'),
|
|
10544
10554
|
onClick: function onClick() {
|
|
10545
10555
|
return refine(item.value);
|
|
10546
10556
|
}
|
|
@@ -10616,14 +10626,14 @@ var CurrentRefinementsWidget = function CurrentRefinementsWidget(props) {
|
|
|
10616
10626
|
|
|
10617
10627
|
connectCurrentRefinements(CurrentRefinementsWidget);
|
|
10618
10628
|
|
|
10619
|
-
var cx$
|
|
10629
|
+
var cx$4 = createClassNames('SearchBox');
|
|
10620
10630
|
var defaultLoadingIndicator = React.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$
|
|
10636
|
+
className: cx$4('loadingIcon')
|
|
10627
10637
|
}, React.createElement("g", {
|
|
10628
10638
|
fill: "none",
|
|
10629
10639
|
fillRule: "evenodd"
|
|
@@ -10646,7 +10656,7 @@ var defaultLoadingIndicator = React.createElement("svg", {
|
|
|
10646
10656
|
repeatCount: "indefinite"
|
|
10647
10657
|
})))));
|
|
10648
10658
|
var defaultReset = React.createElement("svg", {
|
|
10649
|
-
className: cx$
|
|
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",
|
|
@@ -10655,7 +10665,7 @@ var defaultReset = React.createElement("svg", {
|
|
|
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
10667
|
var defaultSubmit = React.createElement("svg", {
|
|
10658
|
-
className: cx$
|
|
10668
|
+
className: cx$4('submitIcon'),
|
|
10659
10669
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10660
10670
|
width: "10",
|
|
10661
10671
|
height: "10",
|
|
@@ -10664,7 +10674,7 @@ var defaultSubmit = React.createElement("svg", {
|
|
|
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);
|
|
@@ -10827,12 +10837,12 @@ function (_Component) {
|
|
|
10827
10837
|
/* eslint-disable max-len */
|
|
10828
10838
|
|
|
10829
10839
|
return React.createElement("div", {
|
|
10830
|
-
className: classnames(cx$
|
|
10840
|
+
className: classnames(cx$4(''), className)
|
|
10831
10841
|
}, React.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.createElement("input", _extends({
|
|
@@ -10849,19 +10859,19 @@ function (_Component) {
|
|
|
10849
10859
|
value: query,
|
|
10850
10860
|
onChange: this.onChange
|
|
10851
10861
|
}, searchInputEvents, {
|
|
10852
|
-
className: cx$
|
|
10862
|
+
className: cx$4('input')
|
|
10853
10863
|
})), React.createElement("button", {
|
|
10854
10864
|
type: "submit",
|
|
10855
10865
|
title: translate('submitTitle'),
|
|
10856
|
-
className: cx$
|
|
10866
|
+
className: cx$4('submit')
|
|
10857
10867
|
}, submit), React.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
10872
|
}, reset), this.props.showLoadingIndicator && React.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,
|
|
@@ -11008,7 +11018,7 @@ function (_Component) {
|
|
|
11008
11018
|
}, translate('noResults')) : null;
|
|
11009
11019
|
return React.createElement("div", {
|
|
11010
11020
|
className: cx('searchBox')
|
|
11011
|
-
}, React.createElement(SearchBox$
|
|
11021
|
+
}, React.createElement(SearchBox$1, {
|
|
11012
11022
|
currentRefinement: this.state.query,
|
|
11013
11023
|
refine: function refine(value) {
|
|
11014
11024
|
_this2.setState({
|
|
@@ -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
|
|
|
@@ -11121,15 +11131,15 @@ function (_Component) {
|
|
|
11121
11131
|
createURL = _this$props.createURL,
|
|
11122
11132
|
refine = _this$props.refine;
|
|
11123
11133
|
return React.createElement(Link, {
|
|
11124
|
-
className: cx$
|
|
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
11139
|
}, React.createElement("span", {
|
|
11130
|
-
className: cx$
|
|
11140
|
+
className: cx$5('label')
|
|
11131
11141
|
}, item.label), ' ', React.createElement("span", {
|
|
11132
|
-
className: cx$
|
|
11142
|
+
className: cx$5('count')
|
|
11133
11143
|
}, item.count));
|
|
11134
11144
|
});
|
|
11135
11145
|
|
|
@@ -11149,7 +11159,7 @@ function (_Component) {
|
|
|
11149
11159
|
className = _this$props2.className;
|
|
11150
11160
|
return React.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,
|
|
@@ -11283,7 +11293,7 @@ var HierarchicalMenuWidget = function HierarchicalMenuWidget(props) {
|
|
|
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,
|
|
@@ -11295,7 +11305,7 @@ var Highlight$2 = function Highlight(_ref) {
|
|
|
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,
|
|
@@ -11326,7 +11336,7 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11326
11336
|
return React.createElement("span", {
|
|
11327
11337
|
key: i
|
|
11328
11338
|
}, item.map(function (element, index) {
|
|
11329
|
-
return React.createElement(Highlight
|
|
11339
|
+
return React.createElement(Highlight, {
|
|
11330
11340
|
cx: cx,
|
|
11331
11341
|
key: index,
|
|
11332
11342
|
value: element.value,
|
|
@@ -11339,7 +11349,7 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11339
11349
|
}, separator));
|
|
11340
11350
|
}
|
|
11341
11351
|
|
|
11342
|
-
return React.createElement(Highlight
|
|
11352
|
+
return React.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
11384
|
return React.createElement(Highlighter, _extends({}, props, {
|
|
11375
11385
|
highlightProperty: "_highlightResult",
|
|
11376
|
-
cx: cx$
|
|
11386
|
+
cx: cx$6
|
|
11377
11387
|
}));
|
|
11378
11388
|
};
|
|
11379
11389
|
|
|
@@ -11418,9 +11428,9 @@ 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
11436
|
return React.createElement("div", {
|
|
@@ -11433,19 +11443,19 @@ 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
11452
|
return React.createElement("div", {
|
|
11443
|
-
className: classnames(cx$
|
|
11453
|
+
className: classnames(cx$7(''), className)
|
|
11444
11454
|
}, React.createElement("ul", {
|
|
11445
|
-
className: cx$
|
|
11455
|
+
className: cx$7('list')
|
|
11446
11456
|
}, hits.map(function (hit) {
|
|
11447
11457
|
return React.createElement("li", {
|
|
11448
|
-
className: cx$
|
|
11458
|
+
className: cx$7('item'),
|
|
11449
11459
|
key: hit.objectID
|
|
11450
11460
|
}, React.createElement(HitComponent, {
|
|
11451
11461
|
hit: hit
|
|
@@ -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__*/
|
|
@@ -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__*/
|
|
@@ -11581,12 +11591,12 @@ function (_Component) {
|
|
|
11581
11591
|
refine = _this$props.refine,
|
|
11582
11592
|
className = _this$props.className;
|
|
11583
11593
|
return React.createElement("div", {
|
|
11584
|
-
className: classnames(cx$
|
|
11594
|
+
className: classnames(cx$8(''), className)
|
|
11585
11595
|
}, React.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__*/
|
|
@@ -11679,24 +11689,24 @@ function (_Component) {
|
|
|
11679
11689
|
translate = _this$props.translate,
|
|
11680
11690
|
className = _this$props.className;
|
|
11681
11691
|
return React.createElement("div", {
|
|
11682
|
-
className: classnames(cx$
|
|
11692
|
+
className: classnames(cx$9(''), className)
|
|
11683
11693
|
}, showPrevious && React.createElement("button", {
|
|
11684
|
-
className: cx$
|
|
11694
|
+
className: cx$9('loadPrevious', !hasPrevious && 'loadPrevious--disabled'),
|
|
11685
11695
|
onClick: function onClick() {
|
|
11686
11696
|
return refinePrevious();
|
|
11687
11697
|
},
|
|
11688
11698
|
disabled: !hasPrevious
|
|
11689
11699
|
}, translate('loadPrevious')), React.createElement("ul", {
|
|
11690
|
-
className: cx$
|
|
11700
|
+
className: cx$9('list')
|
|
11691
11701
|
}, hits.map(function (hit) {
|
|
11692
11702
|
return React.createElement("li", {
|
|
11693
11703
|
key: hit.objectID,
|
|
11694
|
-
className: cx$
|
|
11704
|
+
className: cx$9('item')
|
|
11695
11705
|
}, React.createElement(HitComponent, {
|
|
11696
11706
|
hit: hit
|
|
11697
11707
|
}));
|
|
11698
11708
|
})), React.createElement("button", {
|
|
11699
|
-
className: cx$
|
|
11709
|
+
className: cx$9('loadMore', !hasMore && 'loadMore--disabled'),
|
|
11700
11710
|
onClick: function onClick() {
|
|
11701
11711
|
return refineNext();
|
|
11702
11712
|
},
|
|
@@ -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 ? React.createElement(Highlight, {
|
|
11812
|
+
var label = _this.props.isFromSearch ? React.createElement(Highlight$2, {
|
|
11803
11813
|
attribute: "label",
|
|
11804
11814
|
hit: item
|
|
11805
11815
|
}) : item.label;
|
|
11806
11816
|
return React.createElement(Link, {
|
|
11807
|
-
className: cx$
|
|
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
11822
|
}, React.createElement("span", {
|
|
11813
|
-
className: cx$
|
|
11823
|
+
className: cx$a('label')
|
|
11814
11824
|
}, label), ' ', React.createElement("span", {
|
|
11815
|
-
className: cx$
|
|
11825
|
+
className: cx$a('count')
|
|
11816
11826
|
}, item.count));
|
|
11817
11827
|
});
|
|
11818
11828
|
|
|
@@ -11842,7 +11852,7 @@ function (_Component) {
|
|
|
11842
11852
|
return React.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,
|
|
@@ -11952,7 +11962,7 @@ var MenuWidget = function MenuWidget(props) {
|
|
|
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__*/
|
|
@@ -11990,26 +12000,26 @@ function (_Component) {
|
|
|
11990
12000
|
translate = _this$props.translate,
|
|
11991
12001
|
className = _this$props.className;
|
|
11992
12002
|
return React.createElement("div", {
|
|
11993
|
-
className: classnames(cx$
|
|
12003
|
+
className: classnames(cx$b('', !canRefine && '-noRefinement'), className)
|
|
11994
12004
|
}, React.createElement("select", {
|
|
11995
12005
|
value: this.selectedValue,
|
|
11996
12006
|
onChange: this.handleSelectChange,
|
|
11997
|
-
className: cx$
|
|
12007
|
+
className: cx$b('select')
|
|
11998
12008
|
}, React.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
12012
|
return React.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'
|
|
@@ -12086,7 +12096,7 @@ var MenuSelectWidget = function MenuSelectWidget(props) {
|
|
|
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__*/
|
|
@@ -12111,9 +12121,9 @@ function (_Component) {
|
|
|
12111
12121
|
refine = _this$props.refine,
|
|
12112
12122
|
translate = _this$props.translate;
|
|
12113
12123
|
return React.createElement("label", {
|
|
12114
|
-
className: cx$
|
|
12124
|
+
className: cx$c('label')
|
|
12115
12125
|
}, React.createElement("input", {
|
|
12116
|
-
className: cx$
|
|
12126
|
+
className: cx$c('radio'),
|
|
12117
12127
|
type: "radio",
|
|
12118
12128
|
checked: item.isRefined,
|
|
12119
12129
|
disabled: item.noRefinement,
|
|
@@ -12121,7 +12131,7 @@ function (_Component) {
|
|
|
12121
12131
|
return refine(item.value);
|
|
12122
12132
|
}
|
|
12123
12133
|
}), React.createElement("span", {
|
|
12124
|
-
className: cx$
|
|
12134
|
+
className: cx$c('labelText')
|
|
12125
12135
|
}, item.value === '' ? translate('all') : item.label));
|
|
12126
12136
|
});
|
|
12127
12137
|
|
|
@@ -12139,7 +12149,7 @@ function (_Component) {
|
|
|
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
|
|
@@ -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);
|
|
@@ -12427,9 +12437,9 @@ function (_Component) {
|
|
|
12427
12437
|
}
|
|
12428
12438
|
|
|
12429
12439
|
return React.createElement("div", {
|
|
12430
|
-
className: classnames(cx$
|
|
12440
|
+
className: classnames(cx$d('', !canRefine && '-noRefinement'), className)
|
|
12431
12441
|
}, React.createElement(ListComponent, _extends({}, otherProps, {
|
|
12432
|
-
cx: cx$
|
|
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,12 +12551,12 @@ var Pagination$2 = translatable({
|
|
|
12541
12551
|
*/
|
|
12542
12552
|
|
|
12543
12553
|
var PaginationWidget = function PaginationWidget(props) {
|
|
12544
|
-
return React.createElement(PanelWrapper, props, React.createElement(Pagination$
|
|
12554
|
+
return React.createElement(PanelWrapper, props, React.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() {
|
|
@@ -12556,7 +12566,7 @@ var AlgoliaLogo = function AlgoliaLogo() {
|
|
|
12556
12566
|
viewBox: "0 0 1366 362",
|
|
12557
12567
|
width: "100",
|
|
12558
12568
|
height: "27",
|
|
12559
|
-
className: cx$
|
|
12569
|
+
className: cx$e('logo')
|
|
12560
12570
|
}, React.createElement("linearGradient", {
|
|
12561
12571
|
id: "g",
|
|
12562
12572
|
x1: "428.258",
|
|
@@ -12604,13 +12614,13 @@ function (_Component) {
|
|
|
12604
12614
|
translate = _this$props.translate,
|
|
12605
12615
|
className = _this$props.className;
|
|
12606
12616
|
return React.createElement("div", {
|
|
12607
|
-
className: classnames(cx$
|
|
12617
|
+
className: classnames(cx$e(''), className)
|
|
12608
12618
|
}, React.createElement("span", {
|
|
12609
|
-
className: cx$
|
|
12619
|
+
className: cx$e('text')
|
|
12610
12620
|
}, translate('searchBy')), ' ', React.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.createElement(AlgoliaLogo, null)));
|
|
@@ -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) {
|
|
@@ -12743,12 +12753,12 @@ function (_Component) {
|
|
|
12743
12753
|
|
|
12744
12754
|
var step = 1 / Math.pow(10, precision);
|
|
12745
12755
|
return React.createElement("div", {
|
|
12746
|
-
className: classnames(cx$
|
|
12756
|
+
className: classnames(cx$f('', !canRefine && '-noRefinement'), className)
|
|
12747
12757
|
}, React.createElement("form", {
|
|
12748
|
-
className: cx$
|
|
12758
|
+
className: cx$f('form'),
|
|
12749
12759
|
onSubmit: this.onSubmit
|
|
12750
12760
|
}, React.createElement("input", {
|
|
12751
|
-
className: cx$
|
|
12761
|
+
className: cx$f('input', 'input--min'),
|
|
12752
12762
|
type: "number",
|
|
12753
12763
|
min: min,
|
|
12754
12764
|
max: max,
|
|
@@ -12762,9 +12772,9 @@ function (_Component) {
|
|
|
12762
12772
|
});
|
|
12763
12773
|
}
|
|
12764
12774
|
}), React.createElement("span", {
|
|
12765
|
-
className: cx$
|
|
12775
|
+
className: cx$f('separator')
|
|
12766
12776
|
}, translate('separator')), React.createElement("input", {
|
|
12767
|
-
className: cx$
|
|
12777
|
+
className: cx$f('input', 'input--max'),
|
|
12768
12778
|
type: "number",
|
|
12769
12779
|
min: min,
|
|
12770
12780
|
max: max,
|
|
@@ -12778,7 +12788,7 @@ function (_Component) {
|
|
|
12778
12788
|
});
|
|
12779
12789
|
}
|
|
12780
12790
|
}), React.createElement("button", {
|
|
12781
|
-
className: cx$
|
|
12791
|
+
className: cx$f('submit'),
|
|
12782
12792
|
type: "submit"
|
|
12783
12793
|
}, translate('submit'))));
|
|
12784
12794
|
}
|
|
@@ -12859,7 +12869,7 @@ var RangeInputWidget = function RangeInputWidget(props) {
|
|
|
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__*/
|
|
@@ -12912,12 +12922,12 @@ function (_Component) {
|
|
|
12912
12922
|
|
|
12913
12923
|
icons.push([React.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
12929
|
}, React.createElement("use", {
|
|
12920
|
-
xlinkHref: "#".concat(cx$
|
|
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.
|
|
@@ -12933,15 +12943,15 @@ function (_Component) {
|
|
|
12933
12943
|
};
|
|
12934
12944
|
return React.createElement("li", {
|
|
12935
12945
|
key: lowerBound,
|
|
12936
|
-
className: cx$
|
|
12946
|
+
className: cx$g('item', selected && 'item--selected', disabled && 'item--disabled')
|
|
12937
12947
|
}, React.createElement("a", _extends({
|
|
12938
|
-
className: cx$
|
|
12948
|
+
className: cx$g('link'),
|
|
12939
12949
|
"aria-label": "".concat(rating).concat(translate('ratingLabel'))
|
|
12940
12950
|
}, onClickHandler), icons, React.createElement("span", {
|
|
12941
|
-
className: cx$
|
|
12951
|
+
className: cx$g('label'),
|
|
12942
12952
|
"aria-hidden": "true"
|
|
12943
12953
|
}, translate('ratingLabel')), ' ', React.createElement("span", {
|
|
12944
|
-
className: cx$
|
|
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 = {
|
|
@@ -12997,24 +13007,24 @@ function (_Component) {
|
|
|
12997
13007
|
});
|
|
12998
13008
|
});
|
|
12999
13009
|
return React.createElement("div", {
|
|
13000
|
-
className: classnames(cx$
|
|
13010
|
+
className: classnames(cx$g('', !canRefine && '-noRefinement'), className)
|
|
13001
13011
|
}, React.createElement("svg", {
|
|
13002
13012
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13003
13013
|
style: {
|
|
13004
13014
|
display: 'none'
|
|
13005
13015
|
}
|
|
13006
13016
|
}, React.createElement("symbol", {
|
|
13007
|
-
id: cx$
|
|
13017
|
+
id: cx$g('starSymbol'),
|
|
13008
13018
|
viewBox: "0 0 24 24"
|
|
13009
13019
|
}, React.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
13021
|
})), React.createElement("symbol", {
|
|
13012
|
-
id: cx$
|
|
13022
|
+
id: cx$g('starEmptySymbol'),
|
|
13013
13023
|
viewBox: "0 0 24 24"
|
|
13014
13024
|
}, React.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
13026
|
}))), React.createElement("ul", {
|
|
13017
|
-
className: cx$
|
|
13027
|
+
className: cx$g('list', !canRefine && 'list--noRefinement')
|
|
13018
13028
|
}, items));
|
|
13019
13029
|
}
|
|
13020
13030
|
}]);
|
|
@@ -13102,7 +13112,7 @@ var RatingMenuWidget = function RatingMenuWidget(props) {
|
|
|
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 ? React.createElement(Highlight, {
|
|
13146
|
+
var label = _this.props.isFromSearch ? React.createElement(Highlight$2, {
|
|
13137
13147
|
attribute: "label",
|
|
13138
13148
|
hit: item
|
|
13139
13149
|
}) : item.label;
|
|
13140
13150
|
return React.createElement("label", {
|
|
13141
|
-
className: cx$
|
|
13151
|
+
className: cx$h('label')
|
|
13142
13152
|
}, React.createElement("input", {
|
|
13143
|
-
className: cx$
|
|
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
13159
|
}), React.createElement("span", {
|
|
13150
|
-
className: cx$
|
|
13160
|
+
className: cx$h('labelText')
|
|
13151
13161
|
}, label), ' ', React.createElement("span", {
|
|
13152
|
-
className: cx$
|
|
13162
|
+
className: cx$h('count')
|
|
13153
13163
|
}, item.count.toLocaleString()));
|
|
13154
13164
|
});
|
|
13155
13165
|
|
|
@@ -13173,7 +13183,7 @@ function (_Component) {
|
|
|
13173
13183
|
return React.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,
|
|
@@ -13285,9 +13295,9 @@ var RefinementListWidget = function RefinementListWidget(props) {
|
|
|
13285
13295
|
return React.createElement(PanelWrapper, props, React.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__*/
|
|
@@ -13320,7 +13330,7 @@ function (_Component) {
|
|
|
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
13432
|
return React.createElement(Highlighter, _extends({}, props, {
|
|
13423
13433
|
highlightProperty: "_snippetResult",
|
|
13424
|
-
cx: cx$
|
|
13434
|
+
cx: cx$j
|
|
13425
13435
|
}));
|
|
13426
13436
|
};
|
|
13427
13437
|
|
|
@@ -13471,7 +13481,7 @@ 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;
|
|
@@ -13488,13 +13498,13 @@ var RelevantSort = function RelevantSort(_ref2) {
|
|
|
13488
13498
|
TextComponent = _ref2.textComponent,
|
|
13489
13499
|
refine = _ref2.refine;
|
|
13490
13500
|
return !isVirtualReplica ? null : React.createElement("div", {
|
|
13491
|
-
className: classnames(cx$
|
|
13501
|
+
className: classnames(cx$k(''), className)
|
|
13492
13502
|
}, React.createElement("div", {
|
|
13493
|
-
className: cx$
|
|
13503
|
+
className: cx$k('text')
|
|
13494
13504
|
}, TextComponent && React.createElement(TextComponent, {
|
|
13495
13505
|
isRelevantSorted: isRelevantSorted
|
|
13496
13506
|
})), React.createElement("button", {
|
|
13497
|
-
className: cx$
|
|
13507
|
+
className: cx$k('button'),
|
|
13498
13508
|
onClick: function onClick() {
|
|
13499
13509
|
return refine(isRelevantSorted ? 0 : undefined);
|
|
13500
13510
|
}
|
|
@@ -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__*/
|
|
@@ -13536,9 +13546,9 @@ function (_Component) {
|
|
|
13536
13546
|
refine = _this$props.refine,
|
|
13537
13547
|
className = _this$props.className;
|
|
13538
13548
|
return React.createElement("div", {
|
|
13539
|
-
className: classnames(cx$
|
|
13549
|
+
className: classnames(cx$l(''), className)
|
|
13540
13550
|
}, React.createElement(Select, {
|
|
13541
|
-
cx: cx$
|
|
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,
|
|
@@ -13615,9 +13625,9 @@ var Stats = function Stats(_ref) {
|
|
|
13615
13625
|
processingTimeMS = _ref.processingTimeMS,
|
|
13616
13626
|
translate = _ref.translate;
|
|
13617
13627
|
return React.createElement("div", {
|
|
13618
|
-
className: classnames(cx$
|
|
13628
|
+
className: classnames(cx$m(''), className)
|
|
13619
13629
|
}, React.createElement("span", {
|
|
13620
|
-
className: cx$
|
|
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,
|
|
@@ -13674,18 +13684,18 @@ var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
|
13674
13684
|
refine = _ref.refine,
|
|
13675
13685
|
className = _ref.className;
|
|
13676
13686
|
return React.createElement("div", {
|
|
13677
|
-
className: classnames(cx$
|
|
13687
|
+
className: classnames(cx$n('', !canRefine && '-noRefinement'), className)
|
|
13678
13688
|
}, React.createElement("label", {
|
|
13679
|
-
className: cx$
|
|
13689
|
+
className: cx$n('label')
|
|
13680
13690
|
}, React.createElement("input", {
|
|
13681
|
-
className: cx$
|
|
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
13697
|
}), React.createElement("span", {
|
|
13688
|
-
className: cx$
|
|
13698
|
+
className: cx$n('labelText')
|
|
13689
13699
|
}, label)));
|
|
13690
13700
|
};
|
|
13691
13701
|
|
|
@@ -13894,7 +13904,7 @@ 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;
|
|
@@ -14040,15 +14050,15 @@ function (_Component) {
|
|
|
14040
14050
|
isBrowserSupported: isBrowserSupported()
|
|
14041
14051
|
};
|
|
14042
14052
|
return React.createElement("div", {
|
|
14043
|
-
className: cx$
|
|
14053
|
+
className: cx$o('')
|
|
14044
14054
|
}, React.createElement("button", {
|
|
14045
|
-
className: cx$
|
|
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
14060
|
}, React.createElement(ButtonTextComponent, innerProps)), React.createElement("div", {
|
|
14051
|
-
className: cx$
|
|
14061
|
+
className: cx$o('status')
|
|
14052
14062
|
}, React.createElement(StatusComponent, innerProps)));
|
|
14053
14063
|
}
|
|
14054
14064
|
}, {
|
|
@@ -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
14095
|
return React.createElement("div", {
|
|
14086
|
-
className: classnames(cx(''), className)
|
|
14096
|
+
className: classnames(cx$p(''), className)
|
|
14087
14097
|
}, children({
|
|
14088
14098
|
items: items
|
|
14089
14099
|
}));
|
|
@@ -14194,7 +14204,7 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14194
14204
|
onSearchParameters: this.props.onSearchParameters
|
|
14195
14205
|
}, this.props),
|
|
14196
14206
|
React.createElement(Configure, { hitsPerPage: this.props.hitsPerPage || 20 }),
|
|
14197
|
-
React.createElement(SearchBox, null),
|
|
14207
|
+
React.createElement(SearchBox$2, null),
|
|
14198
14208
|
this.props.refinementAttributes && React.createElement(
|
|
14199
14209
|
'div',
|
|
14200
14210
|
{ className: 'search_refinement' },
|
|
@@ -14202,18 +14212,18 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14202
14212
|
return React.createElement(
|
|
14203
14213
|
DropdownButton,
|
|
14204
14214
|
{ title: item.title },
|
|
14205
|
-
React.createElement(RefinementList, { showMore: item.showMore, limit: item.limit, showMoreLimit: item.showMoreLimit, attribute: item.attribute })
|
|
14215
|
+
React.createElement(RefinementList$3, { showMore: item.showMore, limit: item.limit, showMoreLimit: item.showMoreLimit, attribute: item.attribute })
|
|
14206
14216
|
);
|
|
14207
14217
|
})
|
|
14208
14218
|
),
|
|
14209
14219
|
React.createElement(
|
|
14210
14220
|
'div',
|
|
14211
14221
|
{ className: 'AlgoliaResults' },
|
|
14212
|
-
React.createElement(Hits, { hitComponent: function hitComponent(hit) {
|
|
14222
|
+
React.createElement(Hits$1, { hitComponent: function hitComponent(hit) {
|
|
14213
14223
|
return _this2.Deck(_extends$1({}, hit, { propsObj: propsObj }));
|
|
14214
14224
|
} })
|
|
14215
14225
|
),
|
|
14216
|
-
React.createElement(Pagination, null)
|
|
14226
|
+
React.createElement(Pagination$2, null)
|
|
14217
14227
|
),
|
|
14218
14228
|
React.createElement(
|
|
14219
14229
|
'style',
|