@mjhls/mjh-framework 1.0.866-youtube-group-v1 → 1.0.867
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +168 -168
- package/dist/cjs/AD.js +1 -1
- package/dist/cjs/AD300x250.js +22 -24
- package/dist/cjs/AD300x250x600.js +22 -24
- package/dist/cjs/AD728x90.js +25 -27
- package/dist/cjs/ADFloatingFooter.js +21 -23
- package/dist/cjs/ADFooter.js +4 -6
- package/dist/cjs/ADGutter.js +21 -23
- package/dist/cjs/{ADInfeed-25d48cc2.js → ADInfeed-7d13830e.js} +4 -4
- package/dist/cjs/ADSkyscraper.js +21 -23
- package/dist/cjs/ADSponsoredResources.js +21 -23
- package/dist/cjs/ADWebcast.js +21 -23
- package/dist/cjs/ADWelcome.js +18 -20
- package/dist/cjs/{ADlgInfeed-a535a768.js → ADlgInfeed-d9dbfadc.js} +4 -4
- package/dist/cjs/AccordionPanel.js +6 -8
- package/dist/cjs/AdSlot.js +22 -24
- package/dist/cjs/AdSlotsProvider.js +11 -13
- package/dist/cjs/AlgoliaSearch.js +508 -500
- package/dist/cjs/AlphabeticList.js +8 -10
- package/dist/cjs/ArticleCarousel.js +13 -15
- package/dist/cjs/ArticleProgramLandingPage.js +48 -50
- package/dist/cjs/ArticleSeriesLandingPage.js +29 -31
- package/dist/cjs/ArticleSeriesListing.js +31 -33
- package/dist/cjs/Auth.js +482 -348
- package/dist/cjs/AuthWrapper.js +199 -240
- package/dist/cjs/{AuthorComponent-ac8972ce.js → AuthorComponent-39b37d84.js} +1 -1
- package/dist/cjs/Beam.js +6 -8
- package/dist/cjs/{BlockContent-8b494587.js → BlockContent-36e54d77.js} +34 -34
- package/dist/cjs/Breadcrumbs.js +6 -8
- package/dist/cjs/CMEDeck.js +22 -24
- package/dist/cjs/Column2.js +14 -16
- package/dist/cjs/Column3.js +31 -33
- package/dist/cjs/ConferenceArticleCard.js +25 -22
- package/dist/cjs/DeckContent.js +40 -42
- package/dist/cjs/DeckQueue.js +30 -31
- package/dist/cjs/{Dfp-391fd124.js → Dfp-9be904d5.js} +13 -15
- package/dist/cjs/EventsDeck.js +44 -46
- package/dist/cjs/ExternalResources.js +45 -47
- package/dist/cjs/Feature.js +7 -4
- package/dist/cjs/ForbesHero.js +10 -12
- package/dist/cjs/GridContent.js +45 -47
- package/dist/cjs/GridHero.js +11 -13
- package/dist/cjs/GroupDeck.js +12 -14
- package/dist/cjs/HamMagazine.js +34 -36
- package/dist/cjs/Hero.js +7 -4
- package/dist/cjs/HighlightenVideo.js +2 -2
- package/dist/cjs/HorizontalArticleListing.js +46 -48
- package/dist/cjs/HorizontalHero.js +7 -4
- package/dist/cjs/IssueContentDeck.js +11 -13
- package/dist/cjs/IssueDeck.js +14 -16
- package/dist/cjs/IssueLanding.js +82 -84
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/LeftNav.js +20 -22
- package/dist/cjs/MasterDeck.js +39 -41
- package/dist/cjs/MediaSeriesLanding.js +507 -465
- package/dist/cjs/NavDvm.js +11 -13
- package/dist/cjs/NavMagazine.js +38 -40
- package/dist/cjs/NavNative.js +39 -41
- package/dist/cjs/OncliveHero.js +7 -4
- package/dist/cjs/OncliveLargeHero.js +11 -13
- package/dist/cjs/PageFilter.js +4 -6
- package/dist/cjs/PartnerDetailListing.js +64 -2770
- package/dist/cjs/PdfDownload.js +1 -1
- package/dist/cjs/PopUpModal.js +4 -6
- package/dist/cjs/PubSection.js +32 -34
- package/dist/cjs/PubToc.js +6 -8
- package/dist/cjs/PublicationDeck.js +11 -8
- package/dist/cjs/PublicationLanding.js +76 -78
- package/dist/cjs/QueueDeckExpanded.js +36 -38
- package/dist/cjs/RecentNews.js +3 -3
- package/dist/cjs/RelatedContent.js +38 -35
- package/dist/cjs/RelatedTopicsDropdown.js +10 -10
- package/dist/cjs/Search.js +6 -8
- package/dist/cjs/Segment.js +4 -6
- package/dist/cjs/SeriesListingDeck.js +18 -20
- package/dist/cjs/{SeriesSlider-0d3bf265.js → SeriesSlider-ce3261cb.js} +14 -14
- package/dist/cjs/SetCookie.js +1 -1
- package/dist/cjs/SideFooter.js +15 -17
- package/dist/cjs/{SocialSearchComponent-19548e2a.js → SocialSearchComponent-a4ae7b88.js} +10 -10
- package/dist/cjs/TaxonomyCard.js +12 -10
- package/dist/cjs/TaxonomyDescription.js +44 -46
- package/dist/cjs/TemplateNormal.js +45 -47
- package/dist/cjs/ThumbnailCard.js +10 -7
- package/dist/cjs/Ustream.js +11 -13
- package/dist/cjs/VerticalHero.js +6 -3
- package/dist/cjs/VideoProgramLandingPage.js +50 -52
- package/dist/cjs/VideoSeriesCard.js +14 -14
- package/dist/cjs/VideoSeriesFilter.js +7 -9
- package/dist/cjs/VideoSeriesLandingPage.js +35 -37
- package/dist/cjs/VideoSeriesListing.js +31 -33
- package/dist/cjs/View.js +89 -92
- package/dist/cjs/YahooHero.js +13 -15
- package/dist/cjs/YoutubeGroup.js +25 -46
- package/dist/cjs/{_is-array-754e012d.js → _is-array-54228b29.js} +14 -14
- package/dist/cjs/{_iter-detect-60b2f026.js → _iter-detect-b1df62f0.js} +9 -10
- package/dist/cjs/{_object-pie-68c5bcbc.js → _object-pie-083f2dd6.js} +4 -4
- package/dist/cjs/_object-sap-d1978572.js +16 -0
- package/dist/cjs/{_object-to-array-5762f850.js → _object-to-array-ce86cae7.js} +5 -5
- package/dist/cjs/{asyncToGenerator-140e5f89.js → asyncToGenerator-77821af0.js} +82 -84
- package/dist/cjs/{_to-object-329a650b.js → core.get-iterator-method-5643aa10.js} +256 -20
- package/dist/cjs/{debounce-529c8d06.js → debounce-d4a2369b.js} +2 -2
- package/dist/cjs/define-property-e8404b64.js +20 -0
- package/dist/cjs/{defineProperty-55548b25.js → defineProperty-9673846a.js} +1 -1
- package/dist/cjs/{entities-310b46ee.js → entities-3f9d0f2f.js} +1 -1
- package/dist/cjs/{eq-bb2843ed.js → eq-5fc26c07.js} +1 -1
- package/dist/cjs/{extends-0a918631.js → extends-7c86182f.js} +13 -13
- package/dist/cjs/faundadb.js +5 -7
- package/dist/cjs/{get-adbb11e3.js → get-5839e5b5.js} +21 -21
- package/dist/cjs/getQuery.js +2 -2
- package/dist/cjs/getRelatedArticle.js +133 -71
- package/dist/cjs/getRootDocGroup.js +4 -6
- package/dist/cjs/getSerializers.js +43 -45
- package/dist/cjs/{getTargeting-a9a871f0.js → getTargeting-9d509319.js} +11 -11
- package/dist/cjs/getTargeting.js +6 -8
- package/dist/cjs/{index-e2e62963.js → index-8041a4eb.js} +11 -1
- package/dist/cjs/{index-f83a102a.js → index-ad4e6a69.js} +202 -181
- package/dist/cjs/{index-9d365128.js → index-eadd5035.js} +7 -7
- package/dist/cjs/{index-b5eb3ff8.js → index-efca863c.js} +16 -11
- package/dist/cjs/{index-6367b7bf.js → index-f86bb269.js} +35 -35
- package/dist/cjs/{index-2cf30c83.js → index-fc2f1ca2.js} +4 -4
- package/dist/cjs/{index.esm-3ffa049c.js → index.esm-8123cf40.js} +1 -1
- package/dist/cjs/index.js +139 -140
- package/dist/cjs/{inherits-0c7830c5.js → inherits-de66ea16.js} +25 -26
- package/dist/cjs/{isSymbol-04666465.js → isSymbol-03abbdf0.js} +15 -15
- package/dist/cjs/keys-e982b3fa.js +25 -0
- package/dist/cjs/{lodash-7fd85bcf.js → lodash-f0783643.js} +58 -10
- package/dist/cjs/{main-7b5e57b0.js → main-025fdc78.js} +234 -159
- package/dist/cjs/{moment-ca3bd9fb.js → moment-aca40de1.js} +1 -1
- package/dist/cjs/{react-social-icons-07939b41.js → react-social-icons-af932527.js} +17 -17
- package/dist/cjs/{slicedToArray-8f385299.js → slicedToArray-067dd3bc.js} +17 -19
- package/dist/cjs/{smoothscroll-5054361f.js → smoothscroll-99df7f93.js} +1 -1
- package/dist/cjs/stringify-f7a37a8d.js +17 -0
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-9a3476fe.js → toConsumableArray-d7797c2b.js} +12 -14
- package/dist/cjs/{toNumber-36d1e7e5.js → toNumber-5e1fac58.js} +40 -5
- package/dist/cjs/{typeof-9d7f610f.js → typeof-567e31ff.js} +97 -98
- package/dist/cjs/urlFor.js +19 -2
- package/dist/cjs/{ustream-api-d092dc31.js → ustream-api-3819e4aa.js} +4 -4
- package/dist/cjs/{util-f2c1b65b.js → util-6f784d85.js} +1 -1
- package/dist/cjs/{web.dom.iterable-a0e279c1.js → web.dom.iterable-d98303e0.js} +8 -9
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +22 -24
- package/dist/esm/AD300x250x600.js +22 -24
- package/dist/esm/AD728x90.js +25 -27
- package/dist/esm/ADFloatingFooter.js +21 -23
- package/dist/esm/ADFooter.js +4 -6
- package/dist/esm/ADGutter.js +21 -23
- package/dist/esm/{ADInfeed-56a3db8b.js → ADInfeed-0cbd7bed.js} +4 -4
- package/dist/esm/ADSkyscraper.js +21 -23
- package/dist/esm/ADSponsoredResources.js +21 -23
- package/dist/esm/ADWebcast.js +21 -23
- package/dist/esm/ADWelcome.js +18 -20
- package/dist/esm/{ADlgInfeed-53edb995.js → ADlgInfeed-2d1a52d9.js} +4 -4
- package/dist/esm/AccordionPanel.js +6 -8
- package/dist/esm/AdSlot.js +22 -24
- package/dist/esm/AdSlotsProvider.js +11 -13
- package/dist/esm/AlgoliaSearch.js +507 -499
- package/dist/esm/AlphabeticList.js +8 -10
- package/dist/esm/ArticleCarousel.js +13 -15
- package/dist/esm/ArticleProgramLandingPage.js +48 -50
- package/dist/esm/ArticleSeriesLandingPage.js +29 -31
- package/dist/esm/ArticleSeriesListing.js +31 -33
- package/dist/esm/Auth.js +482 -348
- package/dist/esm/AuthWrapper.js +199 -240
- package/dist/esm/{AuthorComponent-8ffd4679.js → AuthorComponent-46a745ba.js} +1 -1
- package/dist/esm/Beam.js +6 -8
- package/dist/esm/{BlockContent-d05b5b23.js → BlockContent-52cf21c5.js} +34 -34
- package/dist/esm/Breadcrumbs.js +5 -7
- package/dist/esm/CMEDeck.js +22 -24
- package/dist/esm/Column2.js +14 -16
- package/dist/esm/Column3.js +31 -33
- package/dist/esm/ConferenceArticleCard.js +25 -22
- package/dist/esm/DeckContent.js +40 -42
- package/dist/esm/DeckQueue.js +30 -31
- package/dist/esm/{Dfp-2f9796e1.js → Dfp-4ca12f2e.js} +13 -15
- package/dist/esm/EventsDeck.js +41 -43
- package/dist/esm/ExternalResources.js +45 -47
- package/dist/esm/Feature.js +7 -4
- package/dist/esm/ForbesHero.js +10 -12
- package/dist/esm/GridContent.js +45 -47
- package/dist/esm/GridHero.js +11 -13
- package/dist/esm/GroupDeck.js +12 -14
- package/dist/esm/HamMagazine.js +34 -36
- package/dist/esm/Hero.js +7 -4
- package/dist/esm/HighlightenVideo.js +2 -2
- package/dist/esm/HorizontalArticleListing.js +46 -48
- package/dist/esm/HorizontalHero.js +7 -4
- package/dist/esm/IssueContentDeck.js +11 -13
- package/dist/esm/IssueDeck.js +13 -15
- package/dist/esm/IssueLanding.js +82 -84
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/LeftNav.js +20 -22
- package/dist/esm/MasterDeck.js +39 -41
- package/dist/esm/MediaSeriesLanding.js +507 -465
- package/dist/esm/NavDvm.js +11 -13
- package/dist/esm/NavMagazine.js +38 -40
- package/dist/esm/NavNative.js +37 -39
- package/dist/esm/OncliveHero.js +7 -4
- package/dist/esm/OncliveLargeHero.js +11 -13
- package/dist/esm/PageFilter.js +4 -6
- package/dist/esm/PartnerDetailListing.js +62 -2767
- package/dist/esm/PdfDownload.js +1 -1
- package/dist/esm/PopUpModal.js +4 -6
- package/dist/esm/PubSection.js +32 -34
- package/dist/esm/PubToc.js +6 -8
- package/dist/esm/PublicationDeck.js +10 -7
- package/dist/esm/PublicationLanding.js +52 -54
- package/dist/esm/QueueDeckExpanded.js +36 -38
- package/dist/esm/RecentNews.js +3 -3
- package/dist/esm/RelatedContent.js +38 -35
- package/dist/esm/RelatedTopicsDropdown.js +10 -10
- package/dist/esm/Search.js +5 -7
- package/dist/esm/Segment.js +4 -6
- package/dist/esm/SeriesListingDeck.js +18 -20
- package/dist/esm/{SeriesSlider-7d89f4d9.js → SeriesSlider-485f514e.js} +14 -14
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +15 -17
- package/dist/esm/{SocialSearchComponent-47815365.js → SocialSearchComponent-41b6b480.js} +9 -9
- package/dist/esm/TaxonomyCard.js +12 -10
- package/dist/esm/TaxonomyDescription.js +44 -46
- package/dist/esm/TemplateNormal.js +45 -47
- package/dist/esm/ThumbnailCard.js +10 -7
- package/dist/esm/Ustream.js +11 -13
- package/dist/esm/VerticalHero.js +6 -3
- package/dist/esm/VideoProgramLandingPage.js +49 -51
- package/dist/esm/VideoSeriesCard.js +14 -14
- package/dist/esm/VideoSeriesFilter.js +7 -9
- package/dist/esm/VideoSeriesLandingPage.js +35 -37
- package/dist/esm/VideoSeriesListing.js +31 -33
- package/dist/esm/View.js +88 -91
- package/dist/esm/YahooHero.js +13 -15
- package/dist/esm/YoutubeGroup.js +25 -46
- package/dist/esm/{_is-array-58e95429.js → _is-array-893ab020.js} +6 -6
- package/dist/esm/{_iter-detect-5d49a330.js → _iter-detect-f089461c.js} +7 -8
- package/dist/esm/{_object-pie-33c40e79.js → _object-pie-133f504a.js} +4 -4
- package/dist/esm/{_object-sap-964b6feb.js → _object-sap-169d6272.js} +1 -1
- package/dist/esm/{_object-to-array-7e804fce.js → _object-to-array-50a6b9a3.js} +2 -2
- package/dist/esm/{asyncToGenerator-fc1c2e29.js → asyncToGenerator-b4dfe691.js} +30 -32
- package/dist/esm/{_to-object-a4107da3.js → core.get-iterator-method-e903ff31.js} +247 -18
- package/dist/esm/{debounce-9207d8ee.js → debounce-533d9748.js} +2 -2
- package/dist/esm/define-property-99e66838.js +18 -0
- package/dist/esm/{defineProperty-94fd8bfc.js → defineProperty-8fa0bc8d.js} +1 -1
- package/dist/esm/{entities-7cc3bf45.js → entities-932b50cf.js} +1 -1
- package/dist/esm/{eq-b470f743.js → eq-bdcbf886.js} +1 -1
- package/dist/esm/{extends-6f2fcc99.js → extends-dc6a71fd.js} +7 -7
- package/dist/esm/faundadb.js +5 -7
- package/dist/esm/{get-1e515072.js → get-3c308da4.js} +21 -21
- package/dist/esm/getQuery.js +2 -2
- package/dist/esm/getRelatedArticle.js +133 -71
- package/dist/esm/getRootDocGroup.js +4 -6
- package/dist/esm/getSerializers.js +43 -45
- package/dist/esm/{getTargeting-bd800589.js → getTargeting-ff2c9409.js} +11 -11
- package/dist/esm/getTargeting.js +6 -8
- package/dist/esm/{index-51a80699.js → index-0dbff1d1.js} +16 -11
- package/dist/esm/{index-f7fb1e25.js → index-2446af28.js} +4 -4
- package/dist/esm/{index-6c12bdd5.js → index-35bdcc81.js} +6 -6
- package/dist/esm/{index-82fea143.js → index-61397130.js} +198 -177
- package/dist/esm/{index-aaa2dae0.js → index-67e1773f.js} +11 -2
- package/dist/esm/{index-c00b0bbb.js → index-79cfd25c.js} +35 -35
- package/dist/esm/{index.esm-8ee5ff72.js → index.esm-8016b507.js} +1 -1
- package/dist/esm/index.js +120 -121
- package/dist/esm/{inherits-75d45541.js → inherits-8a801a18.js} +18 -19
- package/dist/esm/{isSymbol-1981418f.js → isSymbol-a7e9aafe.js} +15 -15
- package/dist/esm/keys-425c8ab0.js +23 -0
- package/dist/esm/{lodash-ec8c6b48.js → lodash-f97fd99a.js} +58 -10
- package/dist/esm/{main-747e7d25.js → main-b5c5aac1.js} +228 -153
- package/dist/esm/{moment-b6f49411.js → moment-bc12cb97.js} +1 -1
- package/dist/esm/{react-social-icons-3822f1ce.js → react-social-icons-91f9716f.js} +16 -16
- package/dist/esm/{slicedToArray-641f241f.js → slicedToArray-ca2c8b8d.js} +12 -14
- package/dist/esm/{smoothscroll-0cd4c7a6.js → smoothscroll-fa4e3f8c.js} +1 -1
- package/dist/esm/stringify-c21932b3.js +15 -0
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/{toConsumableArray-43aa614d.js → toConsumableArray-7b1c0e23.js} +7 -9
- package/dist/esm/{toNumber-2f7a84cd.js → toNumber-5aeba6e7.js} +40 -5
- package/dist/esm/{typeof-af9c50d8.js → typeof-83d9eb10.js} +34 -35
- package/dist/esm/urlFor.js +19 -2
- package/dist/esm/{ustream-api-9a50644d.js → ustream-api-41166338.js} +4 -4
- package/dist/esm/{util-7700fc59.js → util-3ab476bf.js} +1 -1
- package/dist/esm/{web.dom.iterable-4439f05a.js → web.dom.iterable-fdf034f5.js} +2 -3
- package/package.json +111 -111
- package/dist/cjs/_object-sap-5e74ba08.js +0 -16
- package/dist/cjs/core.get-iterator-method-f62321d4.js +0 -39
- package/dist/cjs/define-property-f4d12f4e.js +0 -20
- package/dist/cjs/es6.string.iterator-cc0bbaa4.js +0 -210
- package/dist/cjs/keys-a586b7a0.js +0 -25
- package/dist/cjs/stringify-7c5aff47.js +0 -17
- package/dist/esm/core.get-iterator-method-e1de7503.js +0 -36
- package/dist/esm/define-property-8af5f002.js +0 -18
- package/dist/esm/es6.string.iterator-c990c18c.js +0 -201
- package/dist/esm/keys-8eda7a5c.js +0 -23
- package/dist/esm/stringify-4330ccdc.js +0 -15
- package/dist/cjs/{brightcove-react-player-loader.es-5c98aec7.js → brightcove-react-player-loader.es-a195642e.js} +1 -1
- package/dist/esm/{brightcove-react-player-loader.es-4abff0b1.js → brightcove-react-player-loader.es-b43c695a.js} +1 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('./
|
|
4
|
-
require('./
|
|
5
|
-
require('./
|
|
6
|
-
require('./_library-dd23b178.js');
|
|
7
|
-
require('./_object-pie-68c5bcbc.js');
|
|
8
|
-
var _extends = require('./extends-0a918631.js');
|
|
9
|
-
require('./_object-sap-5e74ba08.js');
|
|
10
|
-
var inherits$1 = require('./inherits-0c7830c5.js');
|
|
11
|
-
require('./define-property-f4d12f4e.js');
|
|
12
|
-
require('./web.dom.iterable-a0e279c1.js');
|
|
13
|
-
var _typeof$1 = require('./typeof-9d7f610f.js');
|
|
14
|
-
require('./_is-array-754e012d.js');
|
|
3
|
+
var _extends = require('./extends-7c86182f.js');
|
|
4
|
+
var _typeof$2 = require('./typeof-567e31ff.js');
|
|
5
|
+
var inherits$1 = require('./inherits-de66ea16.js');
|
|
15
6
|
var React = require('react');
|
|
16
|
-
var events = require('./events-1b438fe7.js');
|
|
17
7
|
var PropTypes = require('prop-types');
|
|
18
|
-
var
|
|
19
|
-
require('
|
|
20
|
-
require('./
|
|
21
|
-
var urlFor = require('./urlFor.js');
|
|
22
|
-
var index$1 = require('./index-9d365128.js');
|
|
8
|
+
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
9
|
+
var index = require('./index-8041a4eb.js');
|
|
10
|
+
var events = require('./events-1b438fe7.js');
|
|
23
11
|
var reactBootstrap = require('react-bootstrap');
|
|
24
|
-
var
|
|
12
|
+
var urlFor = require('./urlFor.js');
|
|
13
|
+
var moment = require('./moment-aca40de1.js');
|
|
14
|
+
var index$1 = require('./index-eadd5035.js');
|
|
15
|
+
require('./core.get-iterator-method-5643aa10.js');
|
|
16
|
+
require('./_object-pie-083f2dd6.js');
|
|
17
|
+
require('./web.dom.iterable-d98303e0.js');
|
|
18
|
+
require('./_is-array-54228b29.js');
|
|
19
|
+
require('./_library-dd23b178.js');
|
|
20
|
+
require('./_object-sap-d1978572.js');
|
|
21
|
+
require('./define-property-e8404b64.js');
|
|
22
|
+
require('./slicedToArray-067dd3bc.js');
|
|
23
|
+
require('./index-efca863c.js');
|
|
24
|
+
require('react-dom');
|
|
25
25
|
|
|
26
26
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
27
27
|
|
|
@@ -103,22 +103,33 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
103
103
|
return Constructor;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
var _typeof_1 = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
106
107
|
function _typeof(obj) {
|
|
107
108
|
"@babel/helpers - typeof";
|
|
108
109
|
|
|
109
110
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
110
|
-
_typeof = function _typeof(obj) {
|
|
111
|
+
module.exports = _typeof = function _typeof(obj) {
|
|
111
112
|
return typeof obj;
|
|
112
113
|
};
|
|
114
|
+
|
|
115
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
113
116
|
} else {
|
|
114
|
-
_typeof = function _typeof(obj) {
|
|
117
|
+
module.exports = _typeof = function _typeof(obj) {
|
|
115
118
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
116
119
|
};
|
|
120
|
+
|
|
121
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
117
122
|
}
|
|
118
123
|
|
|
119
124
|
return _typeof(obj);
|
|
120
125
|
}
|
|
121
126
|
|
|
127
|
+
module.exports = _typeof;
|
|
128
|
+
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
var _typeof$1 = _commonjsHelpers.unwrapExports(_typeof_1);
|
|
132
|
+
|
|
122
133
|
function _assertThisInitialized(self) {
|
|
123
134
|
if (self === void 0) {
|
|
124
135
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -128,7 +139,7 @@ function _assertThisInitialized(self) {
|
|
|
128
139
|
}
|
|
129
140
|
|
|
130
141
|
function _possibleConstructorReturn(self, call) {
|
|
131
|
-
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
142
|
+
if (call && (_typeof$1(call) === "object" || typeof call === "function")) {
|
|
132
143
|
return call;
|
|
133
144
|
}
|
|
134
145
|
|
|
@@ -142,15 +153,6 @@ function _getPrototypeOf(o) {
|
|
|
142
153
|
return _getPrototypeOf(o);
|
|
143
154
|
}
|
|
144
155
|
|
|
145
|
-
function _setPrototypeOf(o, p) {
|
|
146
|
-
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
147
|
-
o.__proto__ = p;
|
|
148
|
-
return o;
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
return _setPrototypeOf(o, p);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
156
|
function _inherits(subClass, superClass) {
|
|
155
157
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
156
158
|
throw new TypeError("Super expression must either be null or a function");
|
|
@@ -163,7 +165,7 @@ function _inherits(subClass, superClass) {
|
|
|
163
165
|
configurable: true
|
|
164
166
|
}
|
|
165
167
|
});
|
|
166
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
168
|
+
if (superClass) index._setPrototypeOf(subClass, superClass);
|
|
167
169
|
}
|
|
168
170
|
|
|
169
171
|
/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */
|
|
@@ -301,6 +303,22 @@ var reactFastCompare = function isEqual(a, b) {
|
|
|
301
303
|
}
|
|
302
304
|
};
|
|
303
305
|
|
|
306
|
+
function _typeof(obj) {
|
|
307
|
+
"@babel/helpers - typeof";
|
|
308
|
+
|
|
309
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
310
|
+
_typeof = function _typeof(obj) {
|
|
311
|
+
return typeof obj;
|
|
312
|
+
};
|
|
313
|
+
} else {
|
|
314
|
+
_typeof = function _typeof(obj) {
|
|
315
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
return _typeof(obj);
|
|
320
|
+
}
|
|
321
|
+
|
|
304
322
|
// From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
305
323
|
var shallowEqual = function shallowEqual(objA, objB) {
|
|
306
324
|
if (objA === objB) {
|
|
@@ -345,7 +363,7 @@ var removeEmptyKey = function removeEmptyKey(obj) {
|
|
|
345
363
|
return;
|
|
346
364
|
}
|
|
347
365
|
|
|
348
|
-
if (!objectHasKeys(value)) {
|
|
366
|
+
if (!objectHasKeys$1(value)) {
|
|
349
367
|
delete obj[key];
|
|
350
368
|
} else {
|
|
351
369
|
removeEmptyKey(value);
|
|
@@ -381,7 +399,7 @@ function addQueryID(hits, queryID) {
|
|
|
381
399
|
});
|
|
382
400
|
});
|
|
383
401
|
}
|
|
384
|
-
function find(array, comparator) {
|
|
402
|
+
function find$2(array, comparator) {
|
|
385
403
|
if (!Array.isArray(array)) {
|
|
386
404
|
return undefined;
|
|
387
405
|
}
|
|
@@ -394,11 +412,11 @@ function find(array, comparator) {
|
|
|
394
412
|
|
|
395
413
|
return undefined;
|
|
396
414
|
}
|
|
397
|
-
function objectHasKeys(object) {
|
|
415
|
+
function objectHasKeys$1(object) {
|
|
398
416
|
return object && Object.keys(object).length > 0;
|
|
399
417
|
} // https://github.com/babel/babel/blob/3aaafae053fa75febb3aa45d45b6f00646e30ba4/packages/babel-helpers/src/helpers.js#L604-L620
|
|
400
418
|
|
|
401
|
-
function omit(source, excluded) {
|
|
419
|
+
function omit$1(source, excluded) {
|
|
402
420
|
if (source === null || source === undefined) {
|
|
403
421
|
return {};
|
|
404
422
|
}
|
|
@@ -469,9 +487,9 @@ var instantSearchContext = React.createContext({
|
|
|
469
487
|
var InstantSearchConsumer = instantSearchContext.Consumer,
|
|
470
488
|
InstantSearchProvider = instantSearchContext.Provider;
|
|
471
489
|
|
|
472
|
-
var _createContext = React.createContext(undefined),
|
|
473
|
-
IndexConsumer = _createContext.Consumer,
|
|
474
|
-
IndexProvider = _createContext.Provider;
|
|
490
|
+
var _createContext$1 = React.createContext(undefined),
|
|
491
|
+
IndexConsumer = _createContext$1.Consumer,
|
|
492
|
+
IndexProvider = _createContext$1.Provider;
|
|
475
493
|
|
|
476
494
|
/**
|
|
477
495
|
* Connectors are the HOC used to transform React components
|
|
@@ -684,9 +702,9 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
684
702
|
}, {
|
|
685
703
|
key: "render",
|
|
686
704
|
value: function render() {
|
|
687
|
-
var _this$props = this.props
|
|
688
|
-
|
|
689
|
-
props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
705
|
+
var _this$props = this.props;
|
|
706
|
+
_this$props.contextValue;
|
|
707
|
+
var props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
690
708
|
|
|
691
709
|
var providedProps = this.state.providedProps;
|
|
692
710
|
|
|
@@ -837,7 +855,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
837
855
|
});
|
|
838
856
|
}
|
|
839
857
|
|
|
840
|
-
var version = '6.
|
|
858
|
+
var version$1 = '6.10.3';
|
|
841
859
|
|
|
842
860
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
843
861
|
return function (props, propName, componentName) {
|
|
@@ -1034,7 +1052,7 @@ function hasRefinements(_ref) {
|
|
|
1034
1052
|
return Object.hasOwnProperty.call(searchState, id);
|
|
1035
1053
|
}
|
|
1036
1054
|
|
|
1037
|
-
function getRefinements(_ref2) {
|
|
1055
|
+
function getRefinements$1(_ref2) {
|
|
1038
1056
|
var multiIndex = _ref2.multiIndex,
|
|
1039
1057
|
indexId = _ref2.indexId,
|
|
1040
1058
|
namespace = _ref2.namespace,
|
|
@@ -1076,7 +1094,7 @@ function getCurrentRefinementValue(props, searchState, context, id, defaultValue
|
|
|
1076
1094
|
var hasRefinementsValue = hasRefinements(args);
|
|
1077
1095
|
|
|
1078
1096
|
if (hasRefinementsValue) {
|
|
1079
|
-
return getRefinements(args);
|
|
1097
|
+
return getRefinements$1(args);
|
|
1080
1098
|
}
|
|
1081
1099
|
|
|
1082
1100
|
if (props.defaultRefinement) {
|
|
@@ -1117,10 +1135,10 @@ function cleanUpValueWithSingleIndex(_ref3) {
|
|
|
1117
1135
|
attribute = _ref3.attribute;
|
|
1118
1136
|
|
|
1119
1137
|
if (namespace) {
|
|
1120
|
-
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit(searchState[namespace], [attribute])));
|
|
1138
|
+
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit$1(searchState[namespace], [attribute])));
|
|
1121
1139
|
}
|
|
1122
1140
|
|
|
1123
|
-
return omit(searchState, [id]);
|
|
1141
|
+
return omit$1(searchState, [id]);
|
|
1124
1142
|
}
|
|
1125
1143
|
|
|
1126
1144
|
function cleanUpValueWithMultiIndex(_ref4) {
|
|
@@ -1133,20 +1151,20 @@ function cleanUpValueWithMultiIndex(_ref4) {
|
|
|
1133
1151
|
|
|
1134
1152
|
if (namespace && indexSearchState) {
|
|
1135
1153
|
return _objectSpread({}, searchState, {
|
|
1136
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit(indexSearchState[namespace], [attribute])))))
|
|
1154
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit$1(indexSearchState[namespace], [attribute])))))
|
|
1137
1155
|
});
|
|
1138
1156
|
}
|
|
1139
1157
|
|
|
1140
1158
|
if (indexSearchState) {
|
|
1141
1159
|
return _objectSpread({}, searchState, {
|
|
1142
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit(indexSearchState, [id])))
|
|
1160
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit$1(indexSearchState, [id])))
|
|
1143
1161
|
});
|
|
1144
1162
|
}
|
|
1145
1163
|
|
|
1146
1164
|
return searchState;
|
|
1147
1165
|
}
|
|
1148
1166
|
|
|
1149
|
-
function getId() {
|
|
1167
|
+
function getId$f() {
|
|
1150
1168
|
return 'configure';
|
|
1151
1169
|
}
|
|
1152
1170
|
|
|
@@ -1156,20 +1174,20 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1156
1174
|
return {};
|
|
1157
1175
|
},
|
|
1158
1176
|
getSearchParameters: function getSearchParameters(searchParameters, props) {
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1177
|
+
props.children;
|
|
1178
|
+
props.contextValue;
|
|
1179
|
+
props.indexContextValue;
|
|
1180
|
+
var items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1163
1181
|
|
|
1164
1182
|
return searchParameters.setQueryParameters(items);
|
|
1165
1183
|
},
|
|
1166
1184
|
transitionState: function transitionState(props, prevSearchState, nextSearchState) {
|
|
1167
|
-
var id = getId();
|
|
1185
|
+
var id = getId$f();
|
|
1168
1186
|
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1187
|
+
props.children;
|
|
1188
|
+
props.contextValue;
|
|
1189
|
+
props.indexContextValue;
|
|
1190
|
+
var items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1173
1191
|
|
|
1174
1192
|
var propKeys = Object.keys(props);
|
|
1175
1193
|
var nonPresentKeys = this._props ? Object.keys(this._props).filter(function (prop) {
|
|
@@ -1177,7 +1195,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1177
1195
|
}) : [];
|
|
1178
1196
|
this._props = props;
|
|
1179
1197
|
|
|
1180
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), items));
|
|
1198
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit$1(nextSearchState[id], nonPresentKeys), items));
|
|
1181
1199
|
|
|
1182
1200
|
return refineValue(nextSearchState, nextValue, {
|
|
1183
1201
|
ais: props.contextValue,
|
|
@@ -1185,7 +1203,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1185
1203
|
});
|
|
1186
1204
|
},
|
|
1187
1205
|
cleanUp: function cleanUp(props, searchState) {
|
|
1188
|
-
var id = getId();
|
|
1206
|
+
var id = getId$f();
|
|
1189
1207
|
var indexId = getIndexId({
|
|
1190
1208
|
ais: props.contextValue,
|
|
1191
1209
|
multiIndexContext: props.indexContextValue
|
|
@@ -1433,13 +1451,13 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
1433
1451
|
return target;
|
|
1434
1452
|
}
|
|
1435
1453
|
|
|
1436
|
-
var omit
|
|
1454
|
+
var omit = _objectWithoutPropertiesLoose;
|
|
1437
1455
|
|
|
1438
|
-
function objectHasKeys
|
|
1456
|
+
function objectHasKeys(obj) {
|
|
1439
1457
|
return obj && Object.keys(obj).length > 0;
|
|
1440
1458
|
}
|
|
1441
1459
|
|
|
1442
|
-
var objectHasKeys_1 = objectHasKeys
|
|
1460
|
+
var objectHasKeys_1 = objectHasKeys;
|
|
1443
1461
|
|
|
1444
1462
|
var isValidUserToken = function isValidUserToken(userToken) {
|
|
1445
1463
|
if (userToken === null) {
|
|
@@ -1547,7 +1565,7 @@ var lib = {
|
|
|
1547
1565
|
}
|
|
1548
1566
|
return {};
|
|
1549
1567
|
} else if (typeof attribute === 'string') {
|
|
1550
|
-
return omit
|
|
1568
|
+
return omit(refinementList, [attribute]);
|
|
1551
1569
|
} else if (typeof attribute === 'function') {
|
|
1552
1570
|
var hasChanged = false;
|
|
1553
1571
|
|
|
@@ -1592,7 +1610,7 @@ var lib = {
|
|
|
1592
1610
|
}
|
|
1593
1611
|
};
|
|
1594
1612
|
|
|
1595
|
-
var RefinementList = lib;
|
|
1613
|
+
var RefinementList$3 = lib;
|
|
1596
1614
|
|
|
1597
1615
|
/**
|
|
1598
1616
|
* isEqual, but only for numeric refinement values, possible values:
|
|
@@ -1961,22 +1979,22 @@ SearchParameters.prototype = {
|
|
|
1961
1979
|
clearRefinements: function clearRefinements(attribute) {
|
|
1962
1980
|
var patch = {
|
|
1963
1981
|
numericRefinements: this._clearNumericRefinements(attribute),
|
|
1964
|
-
facetsRefinements: RefinementList.clearRefinement(
|
|
1982
|
+
facetsRefinements: RefinementList$3.clearRefinement(
|
|
1965
1983
|
this.facetsRefinements,
|
|
1966
1984
|
attribute,
|
|
1967
1985
|
'conjunctiveFacet'
|
|
1968
1986
|
),
|
|
1969
|
-
facetsExcludes: RefinementList.clearRefinement(
|
|
1987
|
+
facetsExcludes: RefinementList$3.clearRefinement(
|
|
1970
1988
|
this.facetsExcludes,
|
|
1971
1989
|
attribute,
|
|
1972
1990
|
'exclude'
|
|
1973
1991
|
),
|
|
1974
|
-
disjunctiveFacetsRefinements: RefinementList.clearRefinement(
|
|
1992
|
+
disjunctiveFacetsRefinements: RefinementList$3.clearRefinement(
|
|
1975
1993
|
this.disjunctiveFacetsRefinements,
|
|
1976
1994
|
attribute,
|
|
1977
1995
|
'disjunctiveFacet'
|
|
1978
1996
|
),
|
|
1979
|
-
hierarchicalFacetsRefinements: RefinementList.clearRefinement(
|
|
1997
|
+
hierarchicalFacetsRefinements: RefinementList$3.clearRefinement(
|
|
1980
1998
|
this.hierarchicalFacetsRefinements,
|
|
1981
1999
|
attribute,
|
|
1982
2000
|
'hierarchicalFacet'
|
|
@@ -2252,7 +2270,7 @@ SearchParameters.prototype = {
|
|
|
2252
2270
|
}
|
|
2253
2271
|
return {};
|
|
2254
2272
|
} else if (typeof attribute === 'string') {
|
|
2255
|
-
return omit
|
|
2273
|
+
return omit(this.numericRefinements, [attribute]);
|
|
2256
2274
|
} else if (typeof attribute === 'function') {
|
|
2257
2275
|
var hasChanged = false;
|
|
2258
2276
|
var numericRefinements = this.numericRefinements;
|
|
@@ -2344,10 +2362,10 @@ SearchParameters.prototype = {
|
|
|
2344
2362
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2345
2363
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2346
2364
|
}
|
|
2347
|
-
if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2365
|
+
if (RefinementList$3.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2348
2366
|
|
|
2349
2367
|
return this.setQueryParameters({
|
|
2350
|
-
facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value)
|
|
2368
|
+
facetsRefinements: RefinementList$3.addRefinement(this.facetsRefinements, facet, value)
|
|
2351
2369
|
});
|
|
2352
2370
|
},
|
|
2353
2371
|
/**
|
|
@@ -2361,10 +2379,10 @@ SearchParameters.prototype = {
|
|
|
2361
2379
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2362
2380
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2363
2381
|
}
|
|
2364
|
-
if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2382
|
+
if (RefinementList$3.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2365
2383
|
|
|
2366
2384
|
return this.setQueryParameters({
|
|
2367
|
-
facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value)
|
|
2385
|
+
facetsExcludes: RefinementList$3.addRefinement(this.facetsExcludes, facet, value)
|
|
2368
2386
|
});
|
|
2369
2387
|
},
|
|
2370
2388
|
/**
|
|
@@ -2380,10 +2398,10 @@ SearchParameters.prototype = {
|
|
|
2380
2398
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2381
2399
|
}
|
|
2382
2400
|
|
|
2383
|
-
if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2401
|
+
if (RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2384
2402
|
|
|
2385
2403
|
return this.setQueryParameters({
|
|
2386
|
-
disjunctiveFacetsRefinements: RefinementList.addRefinement(
|
|
2404
|
+
disjunctiveFacetsRefinements: RefinementList$3.addRefinement(
|
|
2387
2405
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2388
2406
|
});
|
|
2389
2407
|
},
|
|
@@ -2468,10 +2486,10 @@ SearchParameters.prototype = {
|
|
|
2468
2486
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2469
2487
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2470
2488
|
}
|
|
2471
|
-
if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2489
|
+
if (!RefinementList$3.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2472
2490
|
|
|
2473
2491
|
return this.setQueryParameters({
|
|
2474
|
-
facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value)
|
|
2492
|
+
facetsRefinements: RefinementList$3.removeRefinement(this.facetsRefinements, facet, value)
|
|
2475
2493
|
});
|
|
2476
2494
|
},
|
|
2477
2495
|
/**
|
|
@@ -2485,10 +2503,10 @@ SearchParameters.prototype = {
|
|
|
2485
2503
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2486
2504
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2487
2505
|
}
|
|
2488
|
-
if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2506
|
+
if (!RefinementList$3.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2489
2507
|
|
|
2490
2508
|
return this.setQueryParameters({
|
|
2491
|
-
facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value)
|
|
2509
|
+
facetsExcludes: RefinementList$3.removeRefinement(this.facetsExcludes, facet, value)
|
|
2492
2510
|
});
|
|
2493
2511
|
},
|
|
2494
2512
|
/**
|
|
@@ -2503,10 +2521,10 @@ SearchParameters.prototype = {
|
|
|
2503
2521
|
throw new Error(
|
|
2504
2522
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2505
2523
|
}
|
|
2506
|
-
if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2524
|
+
if (!RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2507
2525
|
|
|
2508
2526
|
return this.setQueryParameters({
|
|
2509
|
-
disjunctiveFacetsRefinements: RefinementList.removeRefinement(
|
|
2527
|
+
disjunctiveFacetsRefinements: RefinementList$3.removeRefinement(
|
|
2510
2528
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2511
2529
|
});
|
|
2512
2530
|
},
|
|
@@ -2572,7 +2590,7 @@ SearchParameters.prototype = {
|
|
|
2572
2590
|
}
|
|
2573
2591
|
|
|
2574
2592
|
return this.setQueryParameters({
|
|
2575
|
-
facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2593
|
+
facetsRefinements: RefinementList$3.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2576
2594
|
});
|
|
2577
2595
|
},
|
|
2578
2596
|
/**
|
|
@@ -2588,7 +2606,7 @@ SearchParameters.prototype = {
|
|
|
2588
2606
|
}
|
|
2589
2607
|
|
|
2590
2608
|
return this.setQueryParameters({
|
|
2591
|
-
facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2609
|
+
facetsExcludes: RefinementList$3.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2592
2610
|
});
|
|
2593
2611
|
},
|
|
2594
2612
|
/**
|
|
@@ -2605,7 +2623,7 @@ SearchParameters.prototype = {
|
|
|
2605
2623
|
}
|
|
2606
2624
|
|
|
2607
2625
|
return this.setQueryParameters({
|
|
2608
|
-
disjunctiveFacetsRefinements: RefinementList.toggleRefinement(
|
|
2626
|
+
disjunctiveFacetsRefinements: RefinementList$3.toggleRefinement(
|
|
2609
2627
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2610
2628
|
});
|
|
2611
2629
|
},
|
|
@@ -2744,7 +2762,7 @@ SearchParameters.prototype = {
|
|
|
2744
2762
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2745
2763
|
return false;
|
|
2746
2764
|
}
|
|
2747
|
-
return RefinementList.isRefined(this.facetsRefinements, facet, value);
|
|
2765
|
+
return RefinementList$3.isRefined(this.facetsRefinements, facet, value);
|
|
2748
2766
|
},
|
|
2749
2767
|
/**
|
|
2750
2768
|
* Returns true if the facet contains exclusions or if a specific value is
|
|
@@ -2760,7 +2778,7 @@ SearchParameters.prototype = {
|
|
|
2760
2778
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2761
2779
|
return false;
|
|
2762
2780
|
}
|
|
2763
|
-
return RefinementList.isRefined(this.facetsExcludes, facet, value);
|
|
2781
|
+
return RefinementList$3.isRefined(this.facetsExcludes, facet, value);
|
|
2764
2782
|
},
|
|
2765
2783
|
/**
|
|
2766
2784
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2775,7 +2793,7 @@ SearchParameters.prototype = {
|
|
|
2775
2793
|
if (!this.isDisjunctiveFacet(facet)) {
|
|
2776
2794
|
return false;
|
|
2777
2795
|
}
|
|
2778
|
-
return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2796
|
+
return RefinementList$3.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2779
2797
|
},
|
|
2780
2798
|
/**
|
|
2781
2799
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2961,7 +2979,7 @@ SearchParameters.prototype = {
|
|
|
2961
2979
|
var isNextValueDefined = nextWithNumbers[key] !== undefined;
|
|
2962
2980
|
|
|
2963
2981
|
if (isPreviousValueDefined && !isNextValueDefined) {
|
|
2964
|
-
return omit
|
|
2982
|
+
return omit(previous, [key]);
|
|
2965
2983
|
}
|
|
2966
2984
|
|
|
2967
2985
|
if (isNextValueDefined) {
|
|
@@ -4694,7 +4712,7 @@ var requestBuilder = {
|
|
|
4694
4712
|
|
|
4695
4713
|
var requestBuilder_1 = requestBuilder;
|
|
4696
4714
|
|
|
4697
|
-
var version
|
|
4715
|
+
var version = '3.4.4';
|
|
4698
4716
|
|
|
4699
4717
|
/**
|
|
4700
4718
|
* Event triggered when a parameter is set or updated
|
|
@@ -4801,7 +4819,7 @@ var version$1 = '3.4.4';
|
|
|
4801
4819
|
*/
|
|
4802
4820
|
function AlgoliaSearchHelper(client, index, options) {
|
|
4803
4821
|
if (typeof client.addAlgoliaAgent === 'function') {
|
|
4804
|
-
client.addAlgoliaAgent('JS Helper (' + version
|
|
4822
|
+
client.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
4805
4823
|
}
|
|
4806
4824
|
|
|
4807
4825
|
this.setClient(client);
|
|
@@ -4956,7 +4974,7 @@ AlgoliaSearchHelper.prototype.findAnswers = function(options) {
|
|
|
4956
4974
|
nbHits: options.nbHits
|
|
4957
4975
|
},
|
|
4958
4976
|
{
|
|
4959
|
-
params: omit
|
|
4977
|
+
params: omit(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
4960
4978
|
'attributesToSnippet',
|
|
4961
4979
|
'hitsPerPage',
|
|
4962
4980
|
'restrictSearchableAttributes',
|
|
@@ -6070,7 +6088,7 @@ AlgoliaSearchHelper.prototype.setClient = function(newClient) {
|
|
|
6070
6088
|
if (this.client === newClient) return this;
|
|
6071
6089
|
|
|
6072
6090
|
if (typeof newClient.addAlgoliaAgent === 'function') {
|
|
6073
|
-
newClient.addAlgoliaAgent('JS Helper (' + version
|
|
6091
|
+
newClient.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
6074
6092
|
}
|
|
6075
6093
|
this.client = newClient;
|
|
6076
6094
|
|
|
@@ -6189,7 +6207,7 @@ function algoliasearchHelper(client, index, opts) {
|
|
|
6189
6207
|
* @member module:algoliasearchHelper.version
|
|
6190
6208
|
* @type {number}
|
|
6191
6209
|
*/
|
|
6192
|
-
algoliasearchHelper.version = version
|
|
6210
|
+
algoliasearchHelper.version = version;
|
|
6193
6211
|
|
|
6194
6212
|
/**
|
|
6195
6213
|
* Constructor for the Helper.
|
|
@@ -6221,13 +6239,13 @@ function createOptionalFilter(_ref) {
|
|
|
6221
6239
|
return "".concat(attributeName, ":").concat(attributeValue, "<score=").concat(attributeScore || 1, ">");
|
|
6222
6240
|
}
|
|
6223
6241
|
|
|
6224
|
-
var defaultProps = {
|
|
6242
|
+
var defaultProps$1 = {
|
|
6225
6243
|
transformSearchParameters: function transformSearchParameters(x) {
|
|
6226
6244
|
return _objectSpread({}, x);
|
|
6227
6245
|
}
|
|
6228
6246
|
};
|
|
6229
6247
|
|
|
6230
|
-
function getId$
|
|
6248
|
+
function getId$e() {
|
|
6231
6249
|
// We store the search state of this widget in `configure`.
|
|
6232
6250
|
return 'configure';
|
|
6233
6251
|
}
|
|
@@ -6275,7 +6293,7 @@ function getSearchParametersFromProps(props) {
|
|
|
6275
6293
|
|
|
6276
6294
|
var connectConfigureRelatedItems = createConnectorWithContext({
|
|
6277
6295
|
displayName: 'AlgoliaConfigureRelatedItems',
|
|
6278
|
-
defaultProps: defaultProps,
|
|
6296
|
+
defaultProps: defaultProps$1,
|
|
6279
6297
|
getProvidedProps: function getProvidedProps() {
|
|
6280
6298
|
return {};
|
|
6281
6299
|
},
|
|
@@ -6283,7 +6301,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6283
6301
|
return searchParameters.setQueryParameters(getSearchParametersFromProps(props));
|
|
6284
6302
|
},
|
|
6285
6303
|
transitionState: function transitionState(props, _prevSearchState, nextSearchState) {
|
|
6286
|
-
var id = getId$
|
|
6304
|
+
var id = getId$e(); // We need to transform the exhaustive search parameters back to clean
|
|
6287
6305
|
// search parameters without the empty default keys so we don't pollute the
|
|
6288
6306
|
// `configure` search state.
|
|
6289
6307
|
|
|
@@ -6294,7 +6312,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6294
6312
|
}) : [];
|
|
6295
6313
|
this._searchParameters = searchParameters;
|
|
6296
6314
|
|
|
6297
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6315
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit$1(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6298
6316
|
|
|
6299
6317
|
return refineValue(nextSearchState, nextValue, {
|
|
6300
6318
|
ais: props.contextValue,
|
|
@@ -6304,7 +6322,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6304
6322
|
cleanUp: function cleanUp(props, searchState) {
|
|
6305
6323
|
var _this = this;
|
|
6306
6324
|
|
|
6307
|
-
var id = getId$
|
|
6325
|
+
var id = getId$e();
|
|
6308
6326
|
var indexId = getIndexId({
|
|
6309
6327
|
ais: props.contextValue,
|
|
6310
6328
|
multiIndexContext: props.indexContextValue
|
|
@@ -6377,7 +6395,7 @@ function getWidgetRefinements(attribute, widgetKey, searchState) {
|
|
|
6377
6395
|
}
|
|
6378
6396
|
}
|
|
6379
6397
|
|
|
6380
|
-
function getRefinements
|
|
6398
|
+
function getRefinements(attribute) {
|
|
6381
6399
|
var searchState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6382
6400
|
var refinements = Object.keys(searchState).filter(function (widgetKey) {
|
|
6383
6401
|
return searchState[widgetKey] !== undefined && searchState[widgetKey][attribute] !== undefined;
|
|
@@ -6394,7 +6412,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6394
6412
|
var searchState = _ref.searchState,
|
|
6395
6413
|
trackedFilters = _ref.trackedFilters;
|
|
6396
6414
|
var ruleContexts = Object.keys(trackedFilters).reduce(function (facets, facetName) {
|
|
6397
|
-
var facetRefinements = getRefinements
|
|
6415
|
+
var facetRefinements = getRefinements(facetName, searchState);
|
|
6398
6416
|
var getTrackedFacetValues = trackedFilters[facetName];
|
|
6399
6417
|
var trackedFacetValues = getTrackedFacetValues(facetRefinements);
|
|
6400
6418
|
return [].concat(_toConsumableArray(facets), _toConsumableArray(facetRefinements.filter(function (facetRefinement) {
|
|
@@ -6406,7 +6424,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6406
6424
|
return ruleContexts;
|
|
6407
6425
|
}
|
|
6408
6426
|
|
|
6409
|
-
var defaultProps
|
|
6427
|
+
var defaultProps = {
|
|
6410
6428
|
transformItems: function transformItems(items) {
|
|
6411
6429
|
return items;
|
|
6412
6430
|
},
|
|
@@ -6417,7 +6435,7 @@ var defaultProps$1 = {
|
|
|
6417
6435
|
};
|
|
6418
6436
|
var connectQueryRules = createConnectorWithContext({
|
|
6419
6437
|
displayName: 'AlgoliaQueryRules',
|
|
6420
|
-
defaultProps: defaultProps
|
|
6438
|
+
defaultProps: defaultProps,
|
|
6421
6439
|
getProvidedProps: function getProvidedProps(props, _1, searchResults) {
|
|
6422
6440
|
var results = getResults(searchResults, {
|
|
6423
6441
|
ais: props.contextValue,
|
|
@@ -6594,20 +6612,10 @@ _defineProperty(Index, "propTypes", {
|
|
|
6594
6612
|
children: PropTypes__default['default'].node
|
|
6595
6613
|
});
|
|
6596
6614
|
|
|
6597
|
-
|
|
6598
|
-
var inferredIndexId = props.indexName;
|
|
6599
|
-
return React__default['default'].createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
6600
|
-
return React__default['default'].createElement(Index, index._extends({
|
|
6601
|
-
contextValue: contextValue,
|
|
6602
|
-
indexId: inferredIndexId
|
|
6603
|
-
}, props));
|
|
6604
|
-
});
|
|
6605
|
-
};
|
|
6606
|
-
|
|
6607
|
-
IndexWrapper.propTypes = {
|
|
6615
|
+
({
|
|
6608
6616
|
indexName: PropTypes__default['default'].string.isRequired,
|
|
6609
6617
|
indexId: PropTypes__default['default'].string
|
|
6610
|
-
};
|
|
6618
|
+
});
|
|
6611
6619
|
|
|
6612
6620
|
function createWidgetsManager(onWidgetsUpdate) {
|
|
6613
6621
|
var widgets = []; // Is an update scheduled?
|
|
@@ -6668,7 +6676,7 @@ function createStore(initialState) {
|
|
|
6668
6676
|
function addAlgoliaAgents(searchClient) {
|
|
6669
6677
|
if (typeof searchClient.addAlgoliaAgent === 'function') {
|
|
6670
6678
|
searchClient.addAlgoliaAgent("react (".concat(React.version, ")"));
|
|
6671
|
-
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version, ")"));
|
|
6679
|
+
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version$1, ")"));
|
|
6672
6680
|
}
|
|
6673
6681
|
}
|
|
6674
6682
|
|
|
@@ -6906,8 +6914,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6906
6914
|
nextIsSearchStalled = false;
|
|
6907
6915
|
}
|
|
6908
6916
|
|
|
6909
|
-
|
|
6910
|
-
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6917
|
+
currentState.resultsFacetValues;
|
|
6918
|
+
var partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6911
6919
|
|
|
6912
6920
|
store.setState(_objectSpread({}, partialState, {
|
|
6913
6921
|
results: results,
|
|
@@ -6928,8 +6936,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6928
6936
|
nextIsSearchStalled = false;
|
|
6929
6937
|
}
|
|
6930
6938
|
|
|
6931
|
-
|
|
6932
|
-
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6939
|
+
currentState.resultsFacetValues;
|
|
6940
|
+
var partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6933
6941
|
|
|
6934
6942
|
store.setState(_objectSpread({}, partialState, {
|
|
6935
6943
|
isSearchStalled: nextIsSearchStalled,
|
|
@@ -6941,9 +6949,9 @@ function createInstantSearchManager(_ref) {
|
|
|
6941
6949
|
function handleNewSearch() {
|
|
6942
6950
|
if (!stalledSearchTimer) {
|
|
6943
6951
|
stalledSearchTimer = setTimeout(function () {
|
|
6944
|
-
var _store$getState = store.getState()
|
|
6945
|
-
|
|
6946
|
-
partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
6952
|
+
var _store$getState = store.getState();
|
|
6953
|
+
_store$getState.resultsFacetValues;
|
|
6954
|
+
var partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
6947
6955
|
|
|
6948
6956
|
store.setState(_objectSpread({}, partialState, {
|
|
6949
6957
|
isSearchStalled: true
|
|
@@ -7442,21 +7450,21 @@ _defineProperty(InstantSearch, "propTypes", {
|
|
|
7442
7450
|
stalledSearchDelay: PropTypes__default['default'].number
|
|
7443
7451
|
});
|
|
7444
7452
|
|
|
7445
|
-
var getId$
|
|
7453
|
+
var getId$d = function getId(props) {
|
|
7446
7454
|
return props.attributes[0];
|
|
7447
7455
|
};
|
|
7448
|
-
var namespace = 'hierarchicalMenu';
|
|
7456
|
+
var namespace$6 = 'hierarchicalMenu';
|
|
7449
7457
|
|
|
7450
|
-
function _refine(props, searchState, nextRefinement, context) {
|
|
7451
|
-
var id = getId$
|
|
7458
|
+
function _refine$9(props, searchState, nextRefinement, context) {
|
|
7459
|
+
var id = getId$d(props);
|
|
7452
7460
|
|
|
7453
7461
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7454
7462
|
|
|
7455
7463
|
var resetPage = true;
|
|
7456
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
7464
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$6);
|
|
7457
7465
|
}
|
|
7458
7466
|
|
|
7459
|
-
function transformValue(values) {
|
|
7467
|
+
function transformValue$1(values) {
|
|
7460
7468
|
return values.reduce(function (acc, item) {
|
|
7461
7469
|
if (item.isRefined) {
|
|
7462
7470
|
acc.push({
|
|
@@ -7467,7 +7475,7 @@ function transformValue(values) {
|
|
|
7467
7475
|
}); // Create a variable in order to keep the same acc for the recursion, otherwise "reduce" returns a new one
|
|
7468
7476
|
|
|
7469
7477
|
if (item.data) {
|
|
7470
|
-
acc = acc.concat(transformValue(item.data));
|
|
7478
|
+
acc = acc.concat(transformValue$1(item.data));
|
|
7471
7479
|
}
|
|
7472
7480
|
}
|
|
7473
7481
|
|
|
@@ -7529,7 +7537,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7529
7537
|
transformItems: PropTypes__default['default'].func
|
|
7530
7538
|
},
|
|
7531
7539
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
7532
|
-
var id = getId$
|
|
7540
|
+
var id = getId$d(props);
|
|
7533
7541
|
var results = getResults(searchResults, {
|
|
7534
7542
|
ais: props.contextValue,
|
|
7535
7543
|
multiIndexContext: props.indexContextValue
|
|
@@ -7544,7 +7552,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7544
7552
|
}
|
|
7545
7553
|
|
|
7546
7554
|
var values = results.getFacetValues(id);
|
|
7547
|
-
var items = values.data ? transformValue(values.data) : [];
|
|
7555
|
+
var items = values.data ? transformValue$1(values.data) : [];
|
|
7548
7556
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7549
7557
|
return {
|
|
7550
7558
|
canRefine: transformedItems.length > 0,
|
|
@@ -7552,7 +7560,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7552
7560
|
};
|
|
7553
7561
|
},
|
|
7554
7562
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7555
|
-
return _refine(props, searchState, nextRefinement, {
|
|
7563
|
+
return _refine$9(props, searchState, nextRefinement, {
|
|
7556
7564
|
ais: props.contextValue,
|
|
7557
7565
|
multiIndexContext: props.indexContextValue
|
|
7558
7566
|
});
|
|
@@ -7615,13 +7623,13 @@ var connectCurrentRefinements = createConnectorWithContext({
|
|
|
7615
7623
|
}
|
|
7616
7624
|
});
|
|
7617
7625
|
|
|
7618
|
-
var getId$
|
|
7626
|
+
var getId$c = function getId(props) {
|
|
7619
7627
|
return props.attributes[0];
|
|
7620
7628
|
};
|
|
7621
|
-
var namespace$
|
|
7629
|
+
var namespace$5 = 'hierarchicalMenu';
|
|
7622
7630
|
|
|
7623
|
-
function getCurrentRefinement(props, searchState, context) {
|
|
7624
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
7631
|
+
function getCurrentRefinement$b(props, searchState, context) {
|
|
7632
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$5, ".").concat(getId$c(props)), null);
|
|
7625
7633
|
|
|
7626
7634
|
if (currentRefinement === '') {
|
|
7627
7635
|
return null;
|
|
@@ -7630,13 +7638,13 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
7630
7638
|
return currentRefinement;
|
|
7631
7639
|
}
|
|
7632
7640
|
|
|
7633
|
-
function getValue(path, props, searchState, context) {
|
|
7641
|
+
function getValue$2(path, props, searchState, context) {
|
|
7634
7642
|
var id = props.id,
|
|
7635
7643
|
attributes = props.attributes,
|
|
7636
7644
|
separator = props.separator,
|
|
7637
7645
|
rootPath = props.rootPath,
|
|
7638
7646
|
showParentLevel = props.showParentLevel;
|
|
7639
|
-
var currentRefinement = getCurrentRefinement(props, searchState, context);
|
|
7647
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, context);
|
|
7640
7648
|
var nextRefinement;
|
|
7641
7649
|
|
|
7642
7650
|
if (currentRefinement === null) {
|
|
@@ -7657,14 +7665,14 @@ function getValue(path, props, searchState, context) {
|
|
|
7657
7665
|
return nextRefinement;
|
|
7658
7666
|
}
|
|
7659
7667
|
|
|
7660
|
-
function transformValue
|
|
7668
|
+
function transformValue(value, props, searchState, context) {
|
|
7661
7669
|
return value.map(function (v) {
|
|
7662
7670
|
return {
|
|
7663
7671
|
label: v.name,
|
|
7664
|
-
value: getValue(v.path, props, searchState, context),
|
|
7672
|
+
value: getValue$2(v.path, props, searchState, context),
|
|
7665
7673
|
count: v.count,
|
|
7666
7674
|
isRefined: v.isRefined,
|
|
7667
|
-
items: v.data && transformValue
|
|
7675
|
+
items: v.data && transformValue(v.data, props, searchState, context)
|
|
7668
7676
|
};
|
|
7669
7677
|
});
|
|
7670
7678
|
}
|
|
@@ -7680,20 +7688,20 @@ var truncate = function truncate() {
|
|
|
7680
7688
|
});
|
|
7681
7689
|
};
|
|
7682
7690
|
|
|
7683
|
-
function _refine$
|
|
7684
|
-
var id = getId$
|
|
7691
|
+
function _refine$8(props, searchState, nextRefinement, context) {
|
|
7692
|
+
var id = getId$c(props);
|
|
7685
7693
|
|
|
7686
7694
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7687
7695
|
|
|
7688
7696
|
var resetPage = true;
|
|
7689
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
7697
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$5);
|
|
7690
7698
|
}
|
|
7691
7699
|
|
|
7692
|
-
function _cleanUp(props, searchState, context) {
|
|
7693
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
7700
|
+
function _cleanUp$7(props, searchState, context) {
|
|
7701
|
+
return cleanUpValue(searchState, context, "".concat(namespace$5, ".").concat(getId$c(props)));
|
|
7694
7702
|
}
|
|
7695
7703
|
|
|
7696
|
-
var sortBy = ['name:asc'];
|
|
7704
|
+
var sortBy$1 = ['name:asc'];
|
|
7697
7705
|
/**
|
|
7698
7706
|
* connectHierarchicalMenu connector provides the logic to build a widget that will
|
|
7699
7707
|
* give the user the ability to explore a tree-like structure.
|
|
@@ -7775,7 +7783,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7775
7783
|
var showMore = props.showMore,
|
|
7776
7784
|
limit = props.limit,
|
|
7777
7785
|
showMoreLimit = props.showMoreLimit;
|
|
7778
|
-
var id = getId$
|
|
7786
|
+
var id = getId$c(props);
|
|
7779
7787
|
var results = getResults(searchResults, {
|
|
7780
7788
|
ais: props.contextValue,
|
|
7781
7789
|
multiIndexContext: props.indexContextValue
|
|
@@ -7785,7 +7793,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7785
7793
|
if (!isFacetPresent) {
|
|
7786
7794
|
return {
|
|
7787
7795
|
items: [],
|
|
7788
|
-
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7796
|
+
currentRefinement: getCurrentRefinement$b(props, searchState, {
|
|
7789
7797
|
ais: props.contextValue,
|
|
7790
7798
|
multiIndexContext: props.indexContextValue
|
|
7791
7799
|
}),
|
|
@@ -7795,16 +7803,16 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7795
7803
|
|
|
7796
7804
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7797
7805
|
var value = results.getFacetValues(id, {
|
|
7798
|
-
sortBy: sortBy
|
|
7806
|
+
sortBy: sortBy$1
|
|
7799
7807
|
});
|
|
7800
|
-
var items = value.data ? transformValue
|
|
7808
|
+
var items = value.data ? transformValue(value.data, props, searchState, {
|
|
7801
7809
|
ais: props.contextValue,
|
|
7802
7810
|
multiIndexContext: props.indexContextValue
|
|
7803
7811
|
}) : [];
|
|
7804
7812
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7805
7813
|
return {
|
|
7806
7814
|
items: truncate(transformedItems, itemsLimit),
|
|
7807
|
-
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7815
|
+
currentRefinement: getCurrentRefinement$b(props, searchState, {
|
|
7808
7816
|
ais: props.contextValue,
|
|
7809
7817
|
multiIndexContext: props.indexContextValue
|
|
7810
7818
|
}),
|
|
@@ -7812,13 +7820,13 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7812
7820
|
};
|
|
7813
7821
|
},
|
|
7814
7822
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7815
|
-
return _refine$
|
|
7823
|
+
return _refine$8(props, searchState, nextRefinement, {
|
|
7816
7824
|
ais: props.contextValue,
|
|
7817
7825
|
multiIndexContext: props.indexContextValue
|
|
7818
7826
|
});
|
|
7819
7827
|
},
|
|
7820
7828
|
cleanUp: function cleanUp(props, searchState) {
|
|
7821
|
-
return _cleanUp(props, searchState, {
|
|
7829
|
+
return _cleanUp$7(props, searchState, {
|
|
7822
7830
|
ais: props.contextValue,
|
|
7823
7831
|
multiIndexContext: props.indexContextValue
|
|
7824
7832
|
});
|
|
@@ -7832,7 +7840,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7832
7840
|
limit = props.limit,
|
|
7833
7841
|
showMoreLimit = props.showMoreLimit,
|
|
7834
7842
|
contextValue = props.contextValue;
|
|
7835
|
-
var id = getId$
|
|
7843
|
+
var id = getId$c(props);
|
|
7836
7844
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7837
7845
|
searchParameters = searchParameters.addHierarchicalFacet({
|
|
7838
7846
|
name: id,
|
|
@@ -7843,7 +7851,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7843
7851
|
}).setQueryParameters({
|
|
7844
7852
|
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, itemsLimit)
|
|
7845
7853
|
});
|
|
7846
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7854
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
7847
7855
|
ais: contextValue,
|
|
7848
7856
|
multiIndexContext: props.indexContextValue
|
|
7849
7857
|
});
|
|
@@ -7856,8 +7864,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7856
7864
|
},
|
|
7857
7865
|
getMetadata: function getMetadata(props, searchState) {
|
|
7858
7866
|
var rootAttribute = props.attributes[0];
|
|
7859
|
-
var id = getId$
|
|
7860
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7867
|
+
var id = getId$c(props);
|
|
7868
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
7861
7869
|
ais: props.contextValue,
|
|
7862
7870
|
multiIndexContext: props.indexContextValue
|
|
7863
7871
|
});
|
|
@@ -7865,7 +7873,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7865
7873
|
label: "".concat(rootAttribute, ": ").concat(currentRefinement),
|
|
7866
7874
|
attribute: rootAttribute,
|
|
7867
7875
|
value: function value(nextState) {
|
|
7868
|
-
return _refine$
|
|
7876
|
+
return _refine$8(props, nextState, '', {
|
|
7869
7877
|
ais: props.contextValue,
|
|
7870
7878
|
multiIndexContext: props.indexContextValue
|
|
7871
7879
|
});
|
|
@@ -8042,12 +8050,12 @@ var connectHits = createConnectorWithContext({
|
|
|
8042
8050
|
}
|
|
8043
8051
|
});
|
|
8044
8052
|
|
|
8045
|
-
function getId$
|
|
8053
|
+
function getId$b() {
|
|
8046
8054
|
return 'hitsPerPage';
|
|
8047
8055
|
}
|
|
8048
8056
|
|
|
8049
|
-
function getCurrentRefinement$
|
|
8050
|
-
var id = getId$
|
|
8057
|
+
function getCurrentRefinement$a(props, searchState, context) {
|
|
8058
|
+
var id = getId$b();
|
|
8051
8059
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
8052
8060
|
|
|
8053
8061
|
if (typeof currentRefinement === 'string') {
|
|
@@ -8082,7 +8090,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8082
8090
|
transformItems: PropTypes__default['default'].func
|
|
8083
8091
|
},
|
|
8084
8092
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
8085
|
-
var currentRefinement = getCurrentRefinement$
|
|
8093
|
+
var currentRefinement = getCurrentRefinement$a(props, searchState, {
|
|
8086
8094
|
ais: props.contextValue,
|
|
8087
8095
|
multiIndexContext: props.indexContextValue
|
|
8088
8096
|
});
|
|
@@ -8099,7 +8107,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8099
8107
|
};
|
|
8100
8108
|
},
|
|
8101
8109
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8102
|
-
var id = getId$
|
|
8110
|
+
var id = getId$b();
|
|
8103
8111
|
|
|
8104
8112
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
8105
8113
|
|
|
@@ -8113,27 +8121,27 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8113
8121
|
return cleanUpValue(searchState, {
|
|
8114
8122
|
ais: props.contextValue,
|
|
8115
8123
|
multiIndexContext: props.indexContextValue
|
|
8116
|
-
}, getId$
|
|
8124
|
+
}, getId$b());
|
|
8117
8125
|
},
|
|
8118
8126
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8119
|
-
return searchParameters.setHitsPerPage(getCurrentRefinement$
|
|
8127
|
+
return searchParameters.setHitsPerPage(getCurrentRefinement$a(props, searchState, {
|
|
8120
8128
|
ais: props.contextValue,
|
|
8121
8129
|
multiIndexContext: props.indexContextValue
|
|
8122
8130
|
}));
|
|
8123
8131
|
},
|
|
8124
8132
|
getMetadata: function getMetadata() {
|
|
8125
8133
|
return {
|
|
8126
|
-
id: getId$
|
|
8134
|
+
id: getId$b()
|
|
8127
8135
|
};
|
|
8128
8136
|
}
|
|
8129
8137
|
});
|
|
8130
8138
|
|
|
8131
|
-
function getId$
|
|
8139
|
+
function getId$a() {
|
|
8132
8140
|
return 'page';
|
|
8133
8141
|
}
|
|
8134
8142
|
|
|
8135
|
-
function getCurrentRefinement$
|
|
8136
|
-
var id = getId$
|
|
8143
|
+
function getCurrentRefinement$9(props, searchState, context) {
|
|
8144
|
+
var id = getId$a();
|
|
8137
8145
|
var page = 1;
|
|
8138
8146
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8139
8147
|
|
|
@@ -8145,9 +8153,9 @@ function getCurrentRefinement$2(props, searchState, context) {
|
|
|
8145
8153
|
}
|
|
8146
8154
|
|
|
8147
8155
|
function getStateWithoutPage(state) {
|
|
8148
|
-
var _ref = state || {}
|
|
8149
|
-
|
|
8150
|
-
rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8156
|
+
var _ref = state || {};
|
|
8157
|
+
_ref.page;
|
|
8158
|
+
var rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8151
8159
|
|
|
8152
8160
|
return rest;
|
|
8153
8161
|
}
|
|
@@ -8256,14 +8264,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8256
8264
|
},
|
|
8257
8265
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8258
8266
|
return searchParameters.setQueryParameters({
|
|
8259
|
-
page: getCurrentRefinement$
|
|
8267
|
+
page: getCurrentRefinement$9(props, searchState, {
|
|
8260
8268
|
ais: props.contextValue,
|
|
8261
8269
|
multiIndexContext: props.indexContextValue
|
|
8262
8270
|
}) - 1
|
|
8263
8271
|
});
|
|
8264
8272
|
},
|
|
8265
8273
|
refine: function refine(props, searchState, event, index) {
|
|
8266
|
-
var id = getId$
|
|
8274
|
+
var id = getId$a();
|
|
8267
8275
|
|
|
8268
8276
|
var nextValue = _defineProperty({}, id, index + 1);
|
|
8269
8277
|
|
|
@@ -8275,14 +8283,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8275
8283
|
}
|
|
8276
8284
|
});
|
|
8277
8285
|
|
|
8278
|
-
var namespace$
|
|
8286
|
+
var namespace$4 = 'menu';
|
|
8279
8287
|
|
|
8280
|
-
function getId$
|
|
8288
|
+
function getId$9(props) {
|
|
8281
8289
|
return props.attribute;
|
|
8282
8290
|
}
|
|
8283
8291
|
|
|
8284
|
-
function getCurrentRefinement$
|
|
8285
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8292
|
+
function getCurrentRefinement$8(props, searchState, context) {
|
|
8293
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)), null);
|
|
8286
8294
|
|
|
8287
8295
|
if (currentRefinement === '') {
|
|
8288
8296
|
return null;
|
|
@@ -8292,28 +8300,28 @@ function getCurrentRefinement$3(props, searchState, context) {
|
|
|
8292
8300
|
}
|
|
8293
8301
|
|
|
8294
8302
|
function getValue$1(name, props, searchState, context) {
|
|
8295
|
-
var currentRefinement = getCurrentRefinement$
|
|
8303
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, context);
|
|
8296
8304
|
return name === currentRefinement ? '' : name;
|
|
8297
8305
|
}
|
|
8298
8306
|
|
|
8299
|
-
function getLimit(_ref) {
|
|
8307
|
+
function getLimit$1(_ref) {
|
|
8300
8308
|
var showMore = _ref.showMore,
|
|
8301
8309
|
limit = _ref.limit,
|
|
8302
8310
|
showMoreLimit = _ref.showMoreLimit;
|
|
8303
8311
|
return showMore ? showMoreLimit : limit;
|
|
8304
8312
|
}
|
|
8305
8313
|
|
|
8306
|
-
function _refine$
|
|
8307
|
-
var id = getId$
|
|
8314
|
+
function _refine$7(props, searchState, nextRefinement, context) {
|
|
8315
|
+
var id = getId$9(props);
|
|
8308
8316
|
|
|
8309
8317
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : '');
|
|
8310
8318
|
|
|
8311
8319
|
var resetPage = true;
|
|
8312
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
8320
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$4);
|
|
8313
8321
|
}
|
|
8314
8322
|
|
|
8315
|
-
function _cleanUp$
|
|
8316
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
8323
|
+
function _cleanUp$6(props, searchState, context) {
|
|
8324
|
+
return cleanUpValue(searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)));
|
|
8317
8325
|
}
|
|
8318
8326
|
|
|
8319
8327
|
var defaultSortBy = ['count:desc', 'name:asc'];
|
|
@@ -8372,7 +8380,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8372
8380
|
if (!canRefine) {
|
|
8373
8381
|
return {
|
|
8374
8382
|
items: [],
|
|
8375
|
-
currentRefinement: getCurrentRefinement$
|
|
8383
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
8376
8384
|
ais: props.contextValue,
|
|
8377
8385
|
multiIndexContext: props.indexContextValue
|
|
8378
8386
|
}),
|
|
@@ -8419,8 +8427,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8419
8427
|
|
|
8420
8428
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
8421
8429
|
return {
|
|
8422
|
-
items: transformedItems.slice(0, getLimit(props)),
|
|
8423
|
-
currentRefinement: getCurrentRefinement$
|
|
8430
|
+
items: transformedItems.slice(0, getLimit$1(props)),
|
|
8431
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
8424
8432
|
ais: props.contextValue,
|
|
8425
8433
|
multiIndexContext: props.indexContextValue
|
|
8426
8434
|
}),
|
|
@@ -8430,7 +8438,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8430
8438
|
};
|
|
8431
8439
|
},
|
|
8432
8440
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8433
|
-
return _refine$
|
|
8441
|
+
return _refine$7(props, searchState, nextRefinement, {
|
|
8434
8442
|
ais: props.contextValue,
|
|
8435
8443
|
multiIndexContext: props.indexContextValue
|
|
8436
8444
|
});
|
|
@@ -8439,11 +8447,11 @@ var connectMenu = createConnectorWithContext({
|
|
|
8439
8447
|
return {
|
|
8440
8448
|
facetName: props.attribute,
|
|
8441
8449
|
query: nextRefinement,
|
|
8442
|
-
maxFacetHits: getLimit(props)
|
|
8450
|
+
maxFacetHits: getLimit$1(props)
|
|
8443
8451
|
};
|
|
8444
8452
|
},
|
|
8445
8453
|
cleanUp: function cleanUp(props, searchState) {
|
|
8446
|
-
return _cleanUp$
|
|
8454
|
+
return _cleanUp$6(props, searchState, {
|
|
8447
8455
|
ais: props.contextValue,
|
|
8448
8456
|
multiIndexContext: props.indexContextValue
|
|
8449
8457
|
});
|
|
@@ -8451,10 +8459,10 @@ var connectMenu = createConnectorWithContext({
|
|
|
8451
8459
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8452
8460
|
var attribute = props.attribute;
|
|
8453
8461
|
searchParameters = searchParameters.setQueryParameters({
|
|
8454
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
8462
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit$1(props))
|
|
8455
8463
|
});
|
|
8456
8464
|
searchParameters = searchParameters.addDisjunctiveFacet(attribute);
|
|
8457
|
-
var currentRefinement = getCurrentRefinement$
|
|
8465
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
8458
8466
|
ais: props.contextValue,
|
|
8459
8467
|
multiIndexContext: props.indexContextValue
|
|
8460
8468
|
});
|
|
@@ -8466,8 +8474,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8466
8474
|
return searchParameters;
|
|
8467
8475
|
},
|
|
8468
8476
|
getMetadata: function getMetadata(props, searchState) {
|
|
8469
|
-
var id = getId$
|
|
8470
|
-
var currentRefinement = getCurrentRefinement$
|
|
8477
|
+
var id = getId$9(props);
|
|
8478
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
8471
8479
|
ais: props.contextValue,
|
|
8472
8480
|
multiIndexContext: props.indexContextValue
|
|
8473
8481
|
});
|
|
@@ -8481,7 +8489,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8481
8489
|
label: "".concat(props.attribute, ": ").concat(currentRefinement),
|
|
8482
8490
|
attribute: props.attribute,
|
|
8483
8491
|
value: function value(nextState) {
|
|
8484
|
-
return _refine$
|
|
8492
|
+
return _refine$7(props, nextState, '', {
|
|
8485
8493
|
ais: props.contextValue,
|
|
8486
8494
|
multiIndexContext: props.indexContextValue
|
|
8487
8495
|
});
|
|
@@ -8555,19 +8563,19 @@ function parseItem(value) {
|
|
|
8555
8563
|
endStr = _value$split2[1];
|
|
8556
8564
|
|
|
8557
8565
|
return {
|
|
8558
|
-
start: startStr.length > 0 ?
|
|
8559
|
-
end: endStr.length > 0 ?
|
|
8566
|
+
start: startStr.length > 0 ? parseInt(startStr, 10) : null,
|
|
8567
|
+
end: endStr.length > 0 ? parseInt(endStr, 10) : null
|
|
8560
8568
|
};
|
|
8561
8569
|
}
|
|
8562
8570
|
|
|
8563
8571
|
var namespace$3 = 'multiRange';
|
|
8564
8572
|
|
|
8565
|
-
function getId$
|
|
8573
|
+
function getId$8(props) {
|
|
8566
8574
|
return props.attribute;
|
|
8567
8575
|
}
|
|
8568
8576
|
|
|
8569
|
-
function getCurrentRefinement$
|
|
8570
|
-
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8577
|
+
function getCurrentRefinement$7(props, searchState, context) {
|
|
8578
|
+
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$8(props)), '');
|
|
8571
8579
|
}
|
|
8572
8580
|
|
|
8573
8581
|
function isRefinementsRangeIncludesInsideItemRange(stats, start, end) {
|
|
@@ -8586,15 +8594,15 @@ function itemHasRefinement(attribute, results, value) {
|
|
|
8586
8594
|
return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end)));
|
|
8587
8595
|
}
|
|
8588
8596
|
|
|
8589
|
-
function _refine$
|
|
8590
|
-
var nextValue = _defineProperty({}, getId$
|
|
8597
|
+
function _refine$6(props, searchState, nextRefinement, context) {
|
|
8598
|
+
var nextValue = _defineProperty({}, getId$8(props), nextRefinement);
|
|
8591
8599
|
|
|
8592
8600
|
var resetPage = true;
|
|
8593
8601
|
return refineValue(searchState, nextValue, context, resetPage, namespace$3);
|
|
8594
8602
|
}
|
|
8595
8603
|
|
|
8596
|
-
function _cleanUp$
|
|
8597
|
-
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8604
|
+
function _cleanUp$5(props, searchState, context) {
|
|
8605
|
+
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$8(props)));
|
|
8598
8606
|
}
|
|
8599
8607
|
/**
|
|
8600
8608
|
* connectNumericMenu connector provides the logic to build a widget that will
|
|
@@ -8628,7 +8636,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8628
8636
|
},
|
|
8629
8637
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
8630
8638
|
var attribute = props.attribute;
|
|
8631
|
-
var currentRefinement = getCurrentRefinement$
|
|
8639
|
+
var currentRefinement = getCurrentRefinement$7(props, searchState, {
|
|
8632
8640
|
ais: props.contextValue,
|
|
8633
8641
|
multiIndexContext: props.indexContextValue
|
|
8634
8642
|
});
|
|
@@ -8642,11 +8650,11 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8642
8650
|
label: item.label,
|
|
8643
8651
|
value: value,
|
|
8644
8652
|
isRefined: value === currentRefinement,
|
|
8645
|
-
noRefinement: results ? itemHasRefinement(getId$
|
|
8653
|
+
noRefinement: results ? itemHasRefinement(getId$8(props), results, value) : false
|
|
8646
8654
|
};
|
|
8647
8655
|
});
|
|
8648
8656
|
var stats = results && results.getFacetByName(attribute) ? results.getFacetStats(attribute) : null;
|
|
8649
|
-
var refinedItem = find(items, function (item) {
|
|
8657
|
+
var refinedItem = find$2(items, function (item) {
|
|
8650
8658
|
return item.isRefined === true;
|
|
8651
8659
|
});
|
|
8652
8660
|
|
|
@@ -8671,13 +8679,13 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8671
8679
|
};
|
|
8672
8680
|
},
|
|
8673
8681
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8674
|
-
return _refine$
|
|
8682
|
+
return _refine$6(props, searchState, nextRefinement, {
|
|
8675
8683
|
ais: props.contextValue,
|
|
8676
8684
|
multiIndexContext: props.indexContextValue
|
|
8677
8685
|
});
|
|
8678
8686
|
},
|
|
8679
8687
|
cleanUp: function cleanUp(props, searchState) {
|
|
8680
|
-
return _cleanUp$
|
|
8688
|
+
return _cleanUp$5(props, searchState, {
|
|
8681
8689
|
ais: props.contextValue,
|
|
8682
8690
|
multiIndexContext: props.indexContextValue
|
|
8683
8691
|
});
|
|
@@ -8685,7 +8693,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8685
8693
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8686
8694
|
var attribute = props.attribute;
|
|
8687
8695
|
|
|
8688
|
-
var _parseItem = parseItem(getCurrentRefinement$
|
|
8696
|
+
var _parseItem = parseItem(getCurrentRefinement$7(props, searchState, {
|
|
8689
8697
|
ais: props.contextValue,
|
|
8690
8698
|
multiIndexContext: props.indexContextValue
|
|
8691
8699
|
})),
|
|
@@ -8705,8 +8713,8 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8705
8713
|
return searchParameters;
|
|
8706
8714
|
},
|
|
8707
8715
|
getMetadata: function getMetadata(props, searchState) {
|
|
8708
|
-
var id = getId$
|
|
8709
|
-
var value = getCurrentRefinement$
|
|
8716
|
+
var id = getId$8(props);
|
|
8717
|
+
var value = getCurrentRefinement$7(props, searchState, {
|
|
8710
8718
|
ais: props.contextValue,
|
|
8711
8719
|
multiIndexContext: props.indexContextValue
|
|
8712
8720
|
});
|
|
@@ -8717,7 +8725,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8717
8725
|
});
|
|
8718
8726
|
|
|
8719
8727
|
if (value !== '') {
|
|
8720
|
-
var _find = find(props.items, function (item) {
|
|
8728
|
+
var _find = find$2(props.items, function (item) {
|
|
8721
8729
|
return stringifyItem(item) === value;
|
|
8722
8730
|
}),
|
|
8723
8731
|
label = _find.label;
|
|
@@ -8727,7 +8735,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8727
8735
|
attribute: props.attribute,
|
|
8728
8736
|
currentRefinement: label,
|
|
8729
8737
|
value: function value(nextState) {
|
|
8730
|
-
return _refine$
|
|
8738
|
+
return _refine$6(props, nextState, '', {
|
|
8731
8739
|
ais: props.contextValue,
|
|
8732
8740
|
multiIndexContext: props.indexContextValue
|
|
8733
8741
|
});
|
|
@@ -8743,12 +8751,12 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8743
8751
|
}
|
|
8744
8752
|
});
|
|
8745
8753
|
|
|
8746
|
-
function getId$
|
|
8754
|
+
function getId$7() {
|
|
8747
8755
|
return 'page';
|
|
8748
8756
|
}
|
|
8749
8757
|
|
|
8750
|
-
function getCurrentRefinement$
|
|
8751
|
-
var id = getId$
|
|
8758
|
+
function getCurrentRefinement$6(props, searchState, context) {
|
|
8759
|
+
var id = getId$7();
|
|
8752
8760
|
var page = 1;
|
|
8753
8761
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8754
8762
|
|
|
@@ -8759,8 +8767,8 @@ function getCurrentRefinement$5(props, searchState, context) {
|
|
|
8759
8767
|
return currentRefinement;
|
|
8760
8768
|
}
|
|
8761
8769
|
|
|
8762
|
-
function _refine$
|
|
8763
|
-
var id = getId$
|
|
8770
|
+
function _refine$5(props, searchState, nextPage, context) {
|
|
8771
|
+
var id = getId$7();
|
|
8764
8772
|
|
|
8765
8773
|
var nextValue = _defineProperty({}, id, nextPage);
|
|
8766
8774
|
|
|
@@ -8800,7 +8808,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8800
8808
|
var nbPages = results.nbPages;
|
|
8801
8809
|
return {
|
|
8802
8810
|
nbPages: nbPages,
|
|
8803
|
-
currentRefinement: getCurrentRefinement$
|
|
8811
|
+
currentRefinement: getCurrentRefinement$6(props, searchState, {
|
|
8804
8812
|
ais: props.contextValue,
|
|
8805
8813
|
multiIndexContext: props.indexContextValue
|
|
8806
8814
|
}),
|
|
@@ -8808,7 +8816,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8808
8816
|
};
|
|
8809
8817
|
},
|
|
8810
8818
|
refine: function refine(props, searchState, nextPage) {
|
|
8811
|
-
return _refine$
|
|
8819
|
+
return _refine$5(props, searchState, nextPage, {
|
|
8812
8820
|
ais: props.contextValue,
|
|
8813
8821
|
multiIndexContext: props.indexContextValue
|
|
8814
8822
|
});
|
|
@@ -8817,17 +8825,17 @@ var connectPagination = createConnectorWithContext({
|
|
|
8817
8825
|
return cleanUpValue(searchState, {
|
|
8818
8826
|
ais: props.contextValue,
|
|
8819
8827
|
multiIndexContext: props.indexContextValue
|
|
8820
|
-
}, getId$
|
|
8828
|
+
}, getId$7());
|
|
8821
8829
|
},
|
|
8822
8830
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8823
|
-
return searchParameters.setPage(getCurrentRefinement$
|
|
8831
|
+
return searchParameters.setPage(getCurrentRefinement$6(props, searchState, {
|
|
8824
8832
|
ais: props.contextValue,
|
|
8825
8833
|
multiIndexContext: props.indexContextValue
|
|
8826
8834
|
}) - 1);
|
|
8827
8835
|
},
|
|
8828
8836
|
getMetadata: function getMetadata() {
|
|
8829
8837
|
return {
|
|
8830
|
-
id: getId$
|
|
8838
|
+
id: getId$7()
|
|
8831
8839
|
};
|
|
8832
8840
|
}
|
|
8833
8841
|
});
|
|
@@ -8873,11 +8881,11 @@ var connectPoweredBy = createConnectorWithContext({
|
|
|
8873
8881
|
* @providedPropType {number} precision - Number of digits after decimal point to use.
|
|
8874
8882
|
*/
|
|
8875
8883
|
|
|
8876
|
-
function getId$
|
|
8884
|
+
function getId$6(props) {
|
|
8877
8885
|
return props.attribute;
|
|
8878
8886
|
}
|
|
8879
8887
|
|
|
8880
|
-
var namespace$
|
|
8888
|
+
var namespace$2 = 'range';
|
|
8881
8889
|
|
|
8882
8890
|
function getCurrentRange(boundaries, stats, precision) {
|
|
8883
8891
|
var pow = Math.pow(10, precision);
|
|
@@ -8907,8 +8915,8 @@ function getCurrentRange(boundaries, stats, precision) {
|
|
|
8907
8915
|
};
|
|
8908
8916
|
}
|
|
8909
8917
|
|
|
8910
|
-
function getCurrentRefinement$
|
|
8911
|
-
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8918
|
+
function getCurrentRefinement$5(props, searchState, currentRange, context) {
|
|
8919
|
+
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)), {}),
|
|
8912
8920
|
min = _getCurrentRefinement.min,
|
|
8913
8921
|
max = _getCurrentRefinement.max;
|
|
8914
8922
|
|
|
@@ -8974,7 +8982,7 @@ function nextValueForRefinement(hasBound, isReset, range, value) {
|
|
|
8974
8982
|
return next;
|
|
8975
8983
|
}
|
|
8976
8984
|
|
|
8977
|
-
function _refine$
|
|
8985
|
+
function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
8978
8986
|
var nextMin = nextRefinement.min,
|
|
8979
8987
|
nextMax = nextRefinement.max;
|
|
8980
8988
|
var currentMinRange = currentRange.min,
|
|
@@ -8998,7 +9006,7 @@ function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
|
8998
9006
|
throw Error("You can't provide max value greater than range.");
|
|
8999
9007
|
}
|
|
9000
9008
|
|
|
9001
|
-
var id = getId$
|
|
9009
|
+
var id = getId$6(props);
|
|
9002
9010
|
var resetPage = true;
|
|
9003
9011
|
|
|
9004
9012
|
var nextValue = _defineProperty({}, id, {
|
|
@@ -9006,11 +9014,11 @@ function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
|
9006
9014
|
max: nextValueForRefinement(props.max !== undefined, isMaxReset, currentMaxRange, nextMaxAsNumber)
|
|
9007
9015
|
});
|
|
9008
9016
|
|
|
9009
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9017
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$2);
|
|
9010
9018
|
}
|
|
9011
9019
|
|
|
9012
|
-
function _cleanUp$
|
|
9013
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9020
|
+
function _cleanUp$4(props, searchState, context) {
|
|
9021
|
+
return cleanUpValue(searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)));
|
|
9014
9022
|
}
|
|
9015
9023
|
|
|
9016
9024
|
var connectRange = createConnectorWithContext({
|
|
@@ -9065,7 +9073,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9065
9073
|
min: rangeMin,
|
|
9066
9074
|
max: rangeMax
|
|
9067
9075
|
};
|
|
9068
|
-
var currentRefinement = getCurrentRefinement$
|
|
9076
|
+
var currentRefinement = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
9069
9077
|
ais: props.contextValue,
|
|
9070
9078
|
multiIndexContext: props.indexContextValue
|
|
9071
9079
|
});
|
|
@@ -9079,13 +9087,13 @@ var connectRange = createConnectorWithContext({
|
|
|
9079
9087
|
};
|
|
9080
9088
|
},
|
|
9081
9089
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9082
|
-
return _refine$
|
|
9090
|
+
return _refine$4(props, searchState, nextRefinement, this._currentRange, {
|
|
9083
9091
|
ais: props.contextValue,
|
|
9084
9092
|
multiIndexContext: props.indexContextValue
|
|
9085
9093
|
});
|
|
9086
9094
|
},
|
|
9087
9095
|
cleanUp: function cleanUp(props, searchState) {
|
|
9088
|
-
return _cleanUp$
|
|
9096
|
+
return _cleanUp$4(props, searchState, {
|
|
9089
9097
|
ais: props.contextValue,
|
|
9090
9098
|
multiIndexContext: props.indexContextValue
|
|
9091
9099
|
});
|
|
@@ -9093,7 +9101,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9093
9101
|
getSearchParameters: function getSearchParameters(params, props, searchState) {
|
|
9094
9102
|
var attribute = props.attribute;
|
|
9095
9103
|
|
|
9096
|
-
var _getCurrentRefinement2 = getCurrentRefinement$
|
|
9104
|
+
var _getCurrentRefinement2 = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
9097
9105
|
ais: props.contextValue,
|
|
9098
9106
|
multiIndexContext: props.indexContextValue
|
|
9099
9107
|
}),
|
|
@@ -9119,7 +9127,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9119
9127
|
minRange = _this$_currentRange.min,
|
|
9120
9128
|
maxRange = _this$_currentRange.max;
|
|
9121
9129
|
|
|
9122
|
-
var _getCurrentRefinement3 = getCurrentRefinement$
|
|
9130
|
+
var _getCurrentRefinement3 = getCurrentRefinement$5(props, searchState, this._currentRange, {
|
|
9123
9131
|
ais: props.contextValue,
|
|
9124
9132
|
multiIndexContext: props.indexContextValue
|
|
9125
9133
|
}),
|
|
@@ -9138,7 +9146,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9138
9146
|
label: fragments.join(''),
|
|
9139
9147
|
attribute: props.attribute,
|
|
9140
9148
|
value: function value(nextState) {
|
|
9141
|
-
return _refine$
|
|
9149
|
+
return _refine$4(props, nextState, {}, _this._currentRange, {
|
|
9142
9150
|
ais: props.contextValue,
|
|
9143
9151
|
multiIndexContext: props.indexContextValue
|
|
9144
9152
|
});
|
|
@@ -9154,7 +9162,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9154
9162
|
}
|
|
9155
9163
|
|
|
9156
9164
|
return {
|
|
9157
|
-
id: getId$
|
|
9165
|
+
id: getId$6(props),
|
|
9158
9166
|
index: getIndexId({
|
|
9159
9167
|
ais: props.contextValue,
|
|
9160
9168
|
multiIndexContext: props.indexContextValue
|
|
@@ -9164,14 +9172,14 @@ var connectRange = createConnectorWithContext({
|
|
|
9164
9172
|
}
|
|
9165
9173
|
});
|
|
9166
9174
|
|
|
9167
|
-
var namespace$
|
|
9175
|
+
var namespace$1 = 'refinementList';
|
|
9168
9176
|
|
|
9169
|
-
function getId$
|
|
9177
|
+
function getId$5(props) {
|
|
9170
9178
|
return props.attribute;
|
|
9171
9179
|
}
|
|
9172
9180
|
|
|
9173
|
-
function getCurrentRefinement$
|
|
9174
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
9181
|
+
function getCurrentRefinement$4(props, searchState, context) {
|
|
9182
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$1, ".").concat(getId$5(props)), []);
|
|
9175
9183
|
|
|
9176
9184
|
if (typeof currentRefinement !== 'string') {
|
|
9177
9185
|
return currentRefinement;
|
|
@@ -9184,8 +9192,8 @@ function getCurrentRefinement$7(props, searchState, context) {
|
|
|
9184
9192
|
return [];
|
|
9185
9193
|
}
|
|
9186
9194
|
|
|
9187
|
-
function getValue
|
|
9188
|
-
var currentRefinement = getCurrentRefinement$
|
|
9195
|
+
function getValue(name, props, searchState, context) {
|
|
9196
|
+
var currentRefinement = getCurrentRefinement$4(props, searchState, context);
|
|
9189
9197
|
var isAnewValue = currentRefinement.indexOf(name) === -1;
|
|
9190
9198
|
var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates
|
|
9191
9199
|
: currentRefinement.filter(function (selectedValue) {
|
|
@@ -9195,15 +9203,15 @@ function getValue$2(name, props, searchState, context) {
|
|
|
9195
9203
|
return nextRefinement;
|
|
9196
9204
|
}
|
|
9197
9205
|
|
|
9198
|
-
function getLimit
|
|
9206
|
+
function getLimit(_ref) {
|
|
9199
9207
|
var showMore = _ref.showMore,
|
|
9200
9208
|
limit = _ref.limit,
|
|
9201
9209
|
showMoreLimit = _ref.showMoreLimit;
|
|
9202
9210
|
return showMore ? showMoreLimit : limit;
|
|
9203
9211
|
}
|
|
9204
9212
|
|
|
9205
|
-
function _refine$
|
|
9206
|
-
var id = getId$
|
|
9213
|
+
function _refine$3(props, searchState, nextRefinement, context) {
|
|
9214
|
+
var id = getId$5(props); // Setting the value to an empty string ensures that it is persisted in
|
|
9207
9215
|
// the URL as an empty value.
|
|
9208
9216
|
// This is necessary in the case where `defaultRefinement` contains one
|
|
9209
9217
|
// item and we try to deselect it. `nextSelected` would be an empty array,
|
|
@@ -9214,11 +9222,11 @@ function _refine$6(props, searchState, nextRefinement, context) {
|
|
|
9214
9222
|
var nextValue = _defineProperty({}, id, nextRefinement.length > 0 ? nextRefinement : '');
|
|
9215
9223
|
|
|
9216
9224
|
var resetPage = true;
|
|
9217
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9225
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$1);
|
|
9218
9226
|
}
|
|
9219
9227
|
|
|
9220
|
-
function _cleanUp$
|
|
9221
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9228
|
+
function _cleanUp$3(props, searchState, context) {
|
|
9229
|
+
return cleanUpValue(searchState, context, "".concat(namespace$1, ".").concat(getId$5(props)));
|
|
9222
9230
|
}
|
|
9223
9231
|
/**
|
|
9224
9232
|
* connectRefinementList connector provides the logic to build a widget that will
|
|
@@ -9245,7 +9253,7 @@ function _cleanUp$4(props, searchState, context) {
|
|
|
9245
9253
|
*/
|
|
9246
9254
|
|
|
9247
9255
|
|
|
9248
|
-
var sortBy
|
|
9256
|
+
var sortBy = ['isRefined', 'count:desc', 'name:asc'];
|
|
9249
9257
|
var connectRefinementList = createConnectorWithContext({
|
|
9250
9258
|
displayName: 'AlgoliaRefinementList',
|
|
9251
9259
|
propTypes: {
|
|
@@ -9283,7 +9291,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9283
9291
|
if (!canRefine) {
|
|
9284
9292
|
return {
|
|
9285
9293
|
items: [],
|
|
9286
|
-
currentRefinement: getCurrentRefinement$
|
|
9294
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, {
|
|
9287
9295
|
ais: props.contextValue,
|
|
9288
9296
|
multiIndexContext: props.indexContextValue
|
|
9289
9297
|
}),
|
|
@@ -9296,7 +9304,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9296
9304
|
var items = isFromSearch ? searchForFacetValuesResults[attribute].map(function (v) {
|
|
9297
9305
|
return {
|
|
9298
9306
|
label: v.value,
|
|
9299
|
-
value: getValue
|
|
9307
|
+
value: getValue(v.value, props, searchState, {
|
|
9300
9308
|
ais: props.contextValue,
|
|
9301
9309
|
multiIndexContext: props.indexContextValue
|
|
9302
9310
|
}),
|
|
@@ -9309,11 +9317,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9309
9317
|
isRefined: v.isRefined
|
|
9310
9318
|
};
|
|
9311
9319
|
}) : results.getFacetValues(attribute, {
|
|
9312
|
-
sortBy: sortBy
|
|
9320
|
+
sortBy: sortBy
|
|
9313
9321
|
}).map(function (v) {
|
|
9314
9322
|
return {
|
|
9315
9323
|
label: v.name,
|
|
9316
|
-
value: getValue
|
|
9324
|
+
value: getValue(v.name, props, searchState, {
|
|
9317
9325
|
ais: props.contextValue,
|
|
9318
9326
|
multiIndexContext: props.indexContextValue
|
|
9319
9327
|
}),
|
|
@@ -9323,8 +9331,8 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9323
9331
|
});
|
|
9324
9332
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
9325
9333
|
return {
|
|
9326
|
-
items: transformedItems.slice(0, getLimit
|
|
9327
|
-
currentRefinement: getCurrentRefinement$
|
|
9334
|
+
items: transformedItems.slice(0, getLimit(props)),
|
|
9335
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, {
|
|
9328
9336
|
ais: props.contextValue,
|
|
9329
9337
|
multiIndexContext: props.indexContextValue
|
|
9330
9338
|
}),
|
|
@@ -9334,7 +9342,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9334
9342
|
};
|
|
9335
9343
|
},
|
|
9336
9344
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9337
|
-
return _refine$
|
|
9345
|
+
return _refine$3(props, searchState, nextRefinement, {
|
|
9338
9346
|
ais: props.contextValue,
|
|
9339
9347
|
multiIndexContext: props.indexContextValue
|
|
9340
9348
|
});
|
|
@@ -9343,11 +9351,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9343
9351
|
return {
|
|
9344
9352
|
facetName: props.attribute,
|
|
9345
9353
|
query: nextRefinement,
|
|
9346
|
-
maxFacetHits: getLimit
|
|
9354
|
+
maxFacetHits: getLimit(props)
|
|
9347
9355
|
};
|
|
9348
9356
|
},
|
|
9349
9357
|
cleanUp: function cleanUp(props, searchState) {
|
|
9350
|
-
return _cleanUp$
|
|
9358
|
+
return _cleanUp$3(props, searchState, {
|
|
9351
9359
|
ais: props.contextValue,
|
|
9352
9360
|
multiIndexContext: props.indexContextValue
|
|
9353
9361
|
});
|
|
@@ -9358,10 +9366,10 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9358
9366
|
var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet';
|
|
9359
9367
|
var addRefinementKey = "".concat(addKey, "Refinement");
|
|
9360
9368
|
searchParameters = searchParameters.setQueryParameters({
|
|
9361
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit
|
|
9369
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
9362
9370
|
});
|
|
9363
9371
|
searchParameters = searchParameters[addKey](attribute);
|
|
9364
|
-
return getCurrentRefinement$
|
|
9372
|
+
return getCurrentRefinement$4(props, searchState, {
|
|
9365
9373
|
ais: props.contextValue,
|
|
9366
9374
|
multiIndexContext: props.indexContextValue
|
|
9367
9375
|
}).reduce(function (res, val) {
|
|
@@ -9369,7 +9377,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9369
9377
|
}, searchParameters);
|
|
9370
9378
|
},
|
|
9371
9379
|
getMetadata: function getMetadata(props, searchState) {
|
|
9372
|
-
var id = getId$
|
|
9380
|
+
var id = getId$5(props);
|
|
9373
9381
|
var context = {
|
|
9374
9382
|
ais: props.contextValue,
|
|
9375
9383
|
multiIndexContext: props.indexContextValue
|
|
@@ -9377,21 +9385,21 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9377
9385
|
return {
|
|
9378
9386
|
id: id,
|
|
9379
9387
|
index: getIndexId(context),
|
|
9380
|
-
items: getCurrentRefinement$
|
|
9388
|
+
items: getCurrentRefinement$4(props, searchState, context).length > 0 ? [{
|
|
9381
9389
|
attribute: props.attribute,
|
|
9382
9390
|
label: "".concat(props.attribute, ": "),
|
|
9383
|
-
currentRefinement: getCurrentRefinement$
|
|
9391
|
+
currentRefinement: getCurrentRefinement$4(props, searchState, context),
|
|
9384
9392
|
value: function value(nextState) {
|
|
9385
|
-
return _refine$
|
|
9393
|
+
return _refine$3(props, nextState, [], context);
|
|
9386
9394
|
},
|
|
9387
|
-
items: getCurrentRefinement$
|
|
9395
|
+
items: getCurrentRefinement$4(props, searchState, context).map(function (item) {
|
|
9388
9396
|
return {
|
|
9389
9397
|
label: "".concat(item),
|
|
9390
9398
|
value: function value(nextState) {
|
|
9391
|
-
var nextSelectedItems = getCurrentRefinement$
|
|
9399
|
+
var nextSelectedItems = getCurrentRefinement$4(props, nextState, context).filter(function (other) {
|
|
9392
9400
|
return other !== item;
|
|
9393
9401
|
});
|
|
9394
|
-
return _refine$
|
|
9402
|
+
return _refine$3(props, searchState, nextSelectedItems, context);
|
|
9395
9403
|
}
|
|
9396
9404
|
};
|
|
9397
9405
|
})
|
|
@@ -9450,7 +9458,7 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9450
9458
|
// See: https://github.com/algolia/react-instantsearch/issues/164
|
|
9451
9459
|
|
|
9452
9460
|
|
|
9453
|
-
var cleanedSearchState = omit(searchState, ['configure', id]);
|
|
9461
|
+
var cleanedSearchState = omit$1(searchState, ['configure', id]);
|
|
9454
9462
|
var hasNotChanged = shallowEqual(this._prevSearchState, cleanedSearchState);
|
|
9455
9463
|
this._prevSearchState = cleanedSearchState;
|
|
9456
9464
|
return {
|
|
@@ -9460,12 +9468,12 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9460
9468
|
}
|
|
9461
9469
|
});
|
|
9462
9470
|
|
|
9463
|
-
function getId$
|
|
9471
|
+
function getId$4() {
|
|
9464
9472
|
return 'query';
|
|
9465
9473
|
}
|
|
9466
9474
|
|
|
9467
|
-
function getCurrentRefinement$
|
|
9468
|
-
var id = getId$
|
|
9475
|
+
function getCurrentRefinement$3(props, searchState, context) {
|
|
9476
|
+
var id = getId$4();
|
|
9469
9477
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9470
9478
|
|
|
9471
9479
|
if (currentRefinement) {
|
|
@@ -9475,8 +9483,8 @@ function getCurrentRefinement$8(props, searchState, context) {
|
|
|
9475
9483
|
return '';
|
|
9476
9484
|
}
|
|
9477
9485
|
|
|
9478
|
-
function _refine$
|
|
9479
|
-
var id = getId$
|
|
9486
|
+
function _refine$2(props, searchState, nextRefinement, context) {
|
|
9487
|
+
var id = getId$4();
|
|
9480
9488
|
|
|
9481
9489
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9482
9490
|
|
|
@@ -9484,8 +9492,8 @@ function _refine$7(props, searchState, nextRefinement, context) {
|
|
|
9484
9492
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9485
9493
|
}
|
|
9486
9494
|
|
|
9487
|
-
function _cleanUp$
|
|
9488
|
-
return cleanUpValue(searchState, context, getId$
|
|
9495
|
+
function _cleanUp$2(props, searchState, context) {
|
|
9496
|
+
return cleanUpValue(searchState, context, getId$4());
|
|
9489
9497
|
}
|
|
9490
9498
|
/**
|
|
9491
9499
|
* connectSearchBox connector provides the logic to build a widget that will
|
|
@@ -9506,7 +9514,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9506
9514
|
},
|
|
9507
9515
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
9508
9516
|
return {
|
|
9509
|
-
currentRefinement: getCurrentRefinement$
|
|
9517
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
9510
9518
|
ais: props.contextValue,
|
|
9511
9519
|
multiIndexContext: props.indexContextValue
|
|
9512
9520
|
}),
|
|
@@ -9514,26 +9522,26 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9514
9522
|
};
|
|
9515
9523
|
},
|
|
9516
9524
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9517
|
-
return _refine$
|
|
9525
|
+
return _refine$2(props, searchState, nextRefinement, {
|
|
9518
9526
|
ais: props.contextValue,
|
|
9519
9527
|
multiIndexContext: props.indexContextValue
|
|
9520
9528
|
});
|
|
9521
9529
|
},
|
|
9522
9530
|
cleanUp: function cleanUp(props, searchState) {
|
|
9523
|
-
return _cleanUp$
|
|
9531
|
+
return _cleanUp$2(props, searchState, {
|
|
9524
9532
|
ais: props.contextValue,
|
|
9525
9533
|
multiIndexContext: props.indexContextValue
|
|
9526
9534
|
});
|
|
9527
9535
|
},
|
|
9528
9536
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9529
|
-
return searchParameters.setQuery(getCurrentRefinement$
|
|
9537
|
+
return searchParameters.setQuery(getCurrentRefinement$3(props, searchState, {
|
|
9530
9538
|
ais: props.contextValue,
|
|
9531
9539
|
multiIndexContext: props.indexContextValue
|
|
9532
9540
|
}));
|
|
9533
9541
|
},
|
|
9534
9542
|
getMetadata: function getMetadata(props, searchState) {
|
|
9535
|
-
var id = getId$
|
|
9536
|
-
var currentRefinement = getCurrentRefinement$
|
|
9543
|
+
var id = getId$4();
|
|
9544
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
9537
9545
|
ais: props.contextValue,
|
|
9538
9546
|
multiIndexContext: props.indexContextValue
|
|
9539
9547
|
});
|
|
@@ -9546,7 +9554,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9546
9554
|
items: currentRefinement === null ? [] : [{
|
|
9547
9555
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9548
9556
|
value: function value(nextState) {
|
|
9549
|
-
return _refine$
|
|
9557
|
+
return _refine$2(props, nextState, '', {
|
|
9550
9558
|
ais: props.contextValue,
|
|
9551
9559
|
multiIndexContext: props.indexContextValue
|
|
9552
9560
|
});
|
|
@@ -9557,12 +9565,12 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9557
9565
|
}
|
|
9558
9566
|
});
|
|
9559
9567
|
|
|
9560
|
-
function getId$
|
|
9568
|
+
function getId$3() {
|
|
9561
9569
|
return 'relevancyStrictness';
|
|
9562
9570
|
}
|
|
9563
9571
|
|
|
9564
|
-
function getCurrentRefinement$
|
|
9565
|
-
var id = getId$
|
|
9572
|
+
function getCurrentRefinement$2(props, searchState, context) {
|
|
9573
|
+
var id = getId$3();
|
|
9566
9574
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id);
|
|
9567
9575
|
return currentRefinement;
|
|
9568
9576
|
}
|
|
@@ -9588,13 +9596,13 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9588
9596
|
};
|
|
9589
9597
|
},
|
|
9590
9598
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9591
|
-
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$
|
|
9599
|
+
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$2(props, searchState, {
|
|
9592
9600
|
ais: props.contextValue,
|
|
9593
9601
|
multiIndexContext: props.indexContextValue
|
|
9594
9602
|
}));
|
|
9595
9603
|
},
|
|
9596
9604
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9597
|
-
var nextValue = _defineProperty({}, getId$
|
|
9605
|
+
var nextValue = _defineProperty({}, getId$3(), nextRefinement);
|
|
9598
9606
|
|
|
9599
9607
|
var resetPage = true;
|
|
9600
9608
|
return refineValue(searchState, nextValue, {
|
|
@@ -9604,12 +9612,12 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9604
9612
|
}
|
|
9605
9613
|
});
|
|
9606
9614
|
|
|
9607
|
-
function getId$
|
|
9615
|
+
function getId$2() {
|
|
9608
9616
|
return 'sortBy';
|
|
9609
9617
|
}
|
|
9610
9618
|
|
|
9611
|
-
function getCurrentRefinement$
|
|
9612
|
-
var id = getId$
|
|
9619
|
+
function getCurrentRefinement$1(props, searchState, context) {
|
|
9620
|
+
var id = getId$2();
|
|
9613
9621
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
9614
9622
|
|
|
9615
9623
|
if (currentRefinement) {
|
|
@@ -9646,7 +9654,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9646
9654
|
transformItems: PropTypes__default['default'].func
|
|
9647
9655
|
},
|
|
9648
9656
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
9649
|
-
var currentRefinement = getCurrentRefinement$
|
|
9657
|
+
var currentRefinement = getCurrentRefinement$1(props, searchState, {
|
|
9650
9658
|
ais: props.contextValue,
|
|
9651
9659
|
multiIndexContext: props.indexContextValue
|
|
9652
9660
|
});
|
|
@@ -9663,7 +9671,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9663
9671
|
};
|
|
9664
9672
|
},
|
|
9665
9673
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9666
|
-
var id = getId$
|
|
9674
|
+
var id = getId$2();
|
|
9667
9675
|
|
|
9668
9676
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9669
9677
|
|
|
@@ -9677,10 +9685,10 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9677
9685
|
return cleanUpValue(searchState, {
|
|
9678
9686
|
ais: props.contextValue,
|
|
9679
9687
|
multiIndexContext: props.indexContextValue
|
|
9680
|
-
}, getId$
|
|
9688
|
+
}, getId$2());
|
|
9681
9689
|
},
|
|
9682
9690
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9683
|
-
var selectedIndex = getCurrentRefinement$
|
|
9691
|
+
var selectedIndex = getCurrentRefinement$1(props, searchState, {
|
|
9684
9692
|
ais: props.contextValue,
|
|
9685
9693
|
multiIndexContext: props.indexContextValue
|
|
9686
9694
|
});
|
|
@@ -9688,7 +9696,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9688
9696
|
},
|
|
9689
9697
|
getMetadata: function getMetadata() {
|
|
9690
9698
|
return {
|
|
9691
|
-
id: getId$
|
|
9699
|
+
id: getId$2()
|
|
9692
9700
|
};
|
|
9693
9701
|
}
|
|
9694
9702
|
});
|
|
@@ -9724,15 +9732,15 @@ var connectStats = createConnectorWithContext({
|
|
|
9724
9732
|
}
|
|
9725
9733
|
});
|
|
9726
9734
|
|
|
9727
|
-
function getId$
|
|
9735
|
+
function getId$1(props) {
|
|
9728
9736
|
return props.attribute;
|
|
9729
9737
|
}
|
|
9730
9738
|
|
|
9731
|
-
var namespace
|
|
9739
|
+
var namespace = 'toggle';
|
|
9732
9740
|
var falsyStrings = ['0', 'false', 'null', 'undefined'];
|
|
9733
9741
|
|
|
9734
|
-
function getCurrentRefinement
|
|
9735
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace
|
|
9742
|
+
function getCurrentRefinement(props, searchState, context) {
|
|
9743
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace, ".").concat(getId$1(props)), false);
|
|
9736
9744
|
|
|
9737
9745
|
if (falsyStrings.indexOf(currentRefinement) !== -1) {
|
|
9738
9746
|
return false;
|
|
@@ -9741,17 +9749,17 @@ function getCurrentRefinement$b(props, searchState, context) {
|
|
|
9741
9749
|
return Boolean(currentRefinement);
|
|
9742
9750
|
}
|
|
9743
9751
|
|
|
9744
|
-
function _refine$
|
|
9745
|
-
var id = getId$
|
|
9752
|
+
function _refine$1(props, searchState, nextRefinement, context) {
|
|
9753
|
+
var id = getId$1(props);
|
|
9746
9754
|
|
|
9747
9755
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : false);
|
|
9748
9756
|
|
|
9749
9757
|
var resetPage = true;
|
|
9750
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace
|
|
9758
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
9751
9759
|
}
|
|
9752
9760
|
|
|
9753
|
-
function _cleanUp$
|
|
9754
|
-
return cleanUpValue(searchState, context, "".concat(namespace
|
|
9761
|
+
function _cleanUp$1(props, searchState, context) {
|
|
9762
|
+
return cleanUpValue(searchState, context, "".concat(namespace, ".").concat(getId$1(props)));
|
|
9755
9763
|
}
|
|
9756
9764
|
/**
|
|
9757
9765
|
* connectToggleRefinement connector provides the logic to build a widget that will
|
|
@@ -9790,14 +9798,14 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9790
9798
|
ais: props.contextValue,
|
|
9791
9799
|
multiIndexContext: props.indexContextValue
|
|
9792
9800
|
});
|
|
9793
|
-
var currentRefinement = getCurrentRefinement
|
|
9801
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
9794
9802
|
ais: props.contextValue,
|
|
9795
9803
|
multiIndexContext: props.indexContextValue
|
|
9796
9804
|
});
|
|
9797
9805
|
var allFacetValues = results && results.getFacetByName(attribute) ? results.getFacetValues(attribute) : null;
|
|
9798
9806
|
var facetValue = // Use null to always be consistent with type of the value
|
|
9799
9807
|
// count: number | null
|
|
9800
|
-
allFacetValues && allFacetValues.length ? find(allFacetValues, function (item) {
|
|
9808
|
+
allFacetValues && allFacetValues.length ? find$2(allFacetValues, function (item) {
|
|
9801
9809
|
return item.name === value.toString();
|
|
9802
9810
|
}) : null;
|
|
9803
9811
|
var facetValueCount = facetValue && facetValue.count;
|
|
@@ -9818,13 +9826,13 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9818
9826
|
};
|
|
9819
9827
|
},
|
|
9820
9828
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9821
|
-
return _refine$
|
|
9829
|
+
return _refine$1(props, searchState, nextRefinement, {
|
|
9822
9830
|
ais: props.contextValue,
|
|
9823
9831
|
multiIndexContext: props.indexContextValue
|
|
9824
9832
|
});
|
|
9825
9833
|
},
|
|
9826
9834
|
cleanUp: function cleanUp(props, searchState) {
|
|
9827
|
-
return _cleanUp$
|
|
9835
|
+
return _cleanUp$1(props, searchState, {
|
|
9828
9836
|
ais: props.contextValue,
|
|
9829
9837
|
multiIndexContext: props.indexContextValue
|
|
9830
9838
|
});
|
|
@@ -9833,7 +9841,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9833
9841
|
var attribute = props.attribute,
|
|
9834
9842
|
value = props.value,
|
|
9835
9843
|
filter = props.filter;
|
|
9836
|
-
var checked = getCurrentRefinement
|
|
9844
|
+
var checked = getCurrentRefinement(props, searchState, {
|
|
9837
9845
|
ais: props.contextValue,
|
|
9838
9846
|
multiIndexContext: props.indexContextValue
|
|
9839
9847
|
});
|
|
@@ -9850,8 +9858,8 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9850
9858
|
return nextSearchParameters;
|
|
9851
9859
|
},
|
|
9852
9860
|
getMetadata: function getMetadata(props, searchState) {
|
|
9853
|
-
var id = getId$
|
|
9854
|
-
var checked = getCurrentRefinement
|
|
9861
|
+
var id = getId$1(props);
|
|
9862
|
+
var checked = getCurrentRefinement(props, searchState, {
|
|
9855
9863
|
ais: props.contextValue,
|
|
9856
9864
|
multiIndexContext: props.indexContextValue
|
|
9857
9865
|
});
|
|
@@ -9867,7 +9875,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9867
9875
|
currentRefinement: checked,
|
|
9868
9876
|
attribute: props.attribute,
|
|
9869
9877
|
value: function value(nextState) {
|
|
9870
|
-
return _refine$
|
|
9878
|
+
return _refine$1(props, nextState, false, {
|
|
9871
9879
|
ais: props.contextValue,
|
|
9872
9880
|
multiIndexContext: props.indexContextValue
|
|
9873
9881
|
});
|
|
@@ -9883,7 +9891,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9883
9891
|
}
|
|
9884
9892
|
});
|
|
9885
9893
|
|
|
9886
|
-
function getId
|
|
9894
|
+
function getId() {
|
|
9887
9895
|
return 'query';
|
|
9888
9896
|
}
|
|
9889
9897
|
|
|
@@ -9892,7 +9900,7 @@ function getAdditionalId() {
|
|
|
9892
9900
|
}
|
|
9893
9901
|
|
|
9894
9902
|
function getCurrentRefinementQuery(props, searchState, context) {
|
|
9895
|
-
var id = getId
|
|
9903
|
+
var id = getId();
|
|
9896
9904
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9897
9905
|
|
|
9898
9906
|
if (currentRefinement) {
|
|
@@ -9913,10 +9921,10 @@ function getCurrentRefinementAdditional(props, searchState, context) {
|
|
|
9913
9921
|
return {};
|
|
9914
9922
|
}
|
|
9915
9923
|
|
|
9916
|
-
function _refine
|
|
9924
|
+
function _refine(props, searchState, nextRefinement, context) {
|
|
9917
9925
|
var _nextValue;
|
|
9918
9926
|
|
|
9919
|
-
var id = getId
|
|
9927
|
+
var id = getId();
|
|
9920
9928
|
var voiceParams = getAdditionalId();
|
|
9921
9929
|
var queryLanguages = props.language ? {
|
|
9922
9930
|
queryLanguages: [props.language.split('-')[0]]
|
|
@@ -9933,8 +9941,8 @@ function _refine$9(props, searchState, nextRefinement, context) {
|
|
|
9933
9941
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9934
9942
|
}
|
|
9935
9943
|
|
|
9936
|
-
function _cleanUp
|
|
9937
|
-
var interimState = cleanUpValue(searchState, context, getId
|
|
9944
|
+
function _cleanUp(props, searchState, context) {
|
|
9945
|
+
var interimState = cleanUpValue(searchState, context, getId());
|
|
9938
9946
|
return cleanUpValue(interimState, context, getAdditionalId());
|
|
9939
9947
|
}
|
|
9940
9948
|
|
|
@@ -9953,13 +9961,13 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9953
9961
|
};
|
|
9954
9962
|
},
|
|
9955
9963
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9956
|
-
return _refine
|
|
9964
|
+
return _refine(props, searchState, nextRefinement, {
|
|
9957
9965
|
ais: props.contextValue,
|
|
9958
9966
|
multiIndexContext: props.indexContextValue
|
|
9959
9967
|
});
|
|
9960
9968
|
},
|
|
9961
9969
|
cleanUp: function cleanUp(props, searchState) {
|
|
9962
|
-
return _cleanUp
|
|
9970
|
+
return _cleanUp(props, searchState, {
|
|
9963
9971
|
ais: props.contextValue,
|
|
9964
9972
|
multiIndexContext: props.indexContextValue
|
|
9965
9973
|
});
|
|
@@ -9976,7 +9984,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9976
9984
|
return searchParameters.setQuery(query).setQueryParameters(additionalParams);
|
|
9977
9985
|
},
|
|
9978
9986
|
getMetadata: function getMetadata(props, searchState) {
|
|
9979
|
-
var id = getId
|
|
9987
|
+
var id = getId();
|
|
9980
9988
|
var currentRefinement = getCurrentRefinementQuery(props, searchState, {
|
|
9981
9989
|
ais: props.contextValue,
|
|
9982
9990
|
multiIndexContext: props.indexContextValue
|
|
@@ -9990,7 +9998,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9990
9998
|
items: currentRefinement === null ? [] : [{
|
|
9991
9999
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9992
10000
|
value: function value(nextState) {
|
|
9993
|
-
return _refine
|
|
10001
|
+
return _refine(props, nextState, '', {
|
|
9994
10002
|
ais: props.contextValue,
|
|
9995
10003
|
multiIndexContext: props.indexContextValue
|
|
9996
10004
|
});
|
|
@@ -10043,7 +10051,7 @@ function range(_ref) {
|
|
|
10043
10051
|
return (start + current) * limitStep;
|
|
10044
10052
|
});
|
|
10045
10053
|
}
|
|
10046
|
-
function find
|
|
10054
|
+
function find(array, comparator) {
|
|
10047
10055
|
if (!Array.isArray(array)) {
|
|
10048
10056
|
return undefined;
|
|
10049
10057
|
}
|
|
@@ -10057,11 +10065,11 @@ function find$2(array, comparator) {
|
|
|
10057
10065
|
return undefined;
|
|
10058
10066
|
}
|
|
10059
10067
|
|
|
10060
|
-
var cx = createClassNames('Panel');
|
|
10068
|
+
var cx$p = createClassNames('Panel');
|
|
10061
10069
|
|
|
10062
|
-
var _createContext
|
|
10063
|
-
PanelConsumer = _createContext
|
|
10064
|
-
PanelProvider = _createContext
|
|
10070
|
+
var _createContext = React.createContext(function setCanRefine() {}),
|
|
10071
|
+
PanelConsumer = _createContext.Consumer,
|
|
10072
|
+
PanelProvider = _createContext.Provider;
|
|
10065
10073
|
|
|
10066
10074
|
var Panel =
|
|
10067
10075
|
/*#__PURE__*/
|
|
@@ -10104,15 +10112,15 @@ function (_Component) {
|
|
|
10104
10112
|
footer = _this$props.footer;
|
|
10105
10113
|
var canRefine = this.state.canRefine;
|
|
10106
10114
|
return React__default['default'].createElement("div", {
|
|
10107
|
-
className: index.classnames(cx('', !canRefine && '-noRefinement'), className)
|
|
10115
|
+
className: index.classnames(cx$p('', !canRefine && '-noRefinement'), className)
|
|
10108
10116
|
}, header && React__default['default'].createElement("div", {
|
|
10109
|
-
className: cx('header')
|
|
10117
|
+
className: cx$p('header')
|
|
10110
10118
|
}, header), React__default['default'].createElement("div", {
|
|
10111
|
-
className: cx('body')
|
|
10119
|
+
className: cx$p('body')
|
|
10112
10120
|
}, React__default['default'].createElement(PanelProvider, {
|
|
10113
10121
|
value: this.setCanRefine
|
|
10114
10122
|
}, children)), footer && React__default['default'].createElement("div", {
|
|
10115
|
-
className: cx('footer')
|
|
10123
|
+
className: cx$p('footer')
|
|
10116
10124
|
}, footer));
|
|
10117
10125
|
}
|
|
10118
10126
|
}]);
|
|
@@ -10235,8 +10243,8 @@ _defineProperty(Link, "propTypes", {
|
|
|
10235
10243
|
onClick: PropTypes__default['default'].func.isRequired
|
|
10236
10244
|
});
|
|
10237
10245
|
|
|
10238
|
-
var cx$
|
|
10239
|
-
var itemsPropType = PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
|
|
10246
|
+
var cx$o = createClassNames('Breadcrumb');
|
|
10247
|
+
var itemsPropType$2 = PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
|
|
10240
10248
|
label: PropTypes__default['default'].string.isRequired,
|
|
10241
10249
|
value: PropTypes__default['default'].string.isRequired
|
|
10242
10250
|
}));
|
|
@@ -10265,9 +10273,9 @@ function (_Component) {
|
|
|
10265
10273
|
translate = _this$props.translate,
|
|
10266
10274
|
className = _this$props.className;
|
|
10267
10275
|
var rootPath = canRefine ? React__default['default'].createElement("li", {
|
|
10268
|
-
className: cx$
|
|
10276
|
+
className: cx$o('item')
|
|
10269
10277
|
}, React__default['default'].createElement(Link, {
|
|
10270
|
-
className: cx$
|
|
10278
|
+
className: cx$o('link'),
|
|
10271
10279
|
onClick: function onClick() {
|
|
10272
10280
|
return !rootURL ? refine() : null;
|
|
10273
10281
|
},
|
|
@@ -10276,12 +10284,12 @@ function (_Component) {
|
|
|
10276
10284
|
var breadcrumb = items.map(function (item, idx) {
|
|
10277
10285
|
var isLast = idx === items.length - 1;
|
|
10278
10286
|
return React__default['default'].createElement("li", {
|
|
10279
|
-
className: cx$
|
|
10287
|
+
className: cx$o('item', isLast && 'item--selected'),
|
|
10280
10288
|
key: idx
|
|
10281
10289
|
}, React__default['default'].createElement("span", {
|
|
10282
|
-
className: cx$
|
|
10290
|
+
className: cx$o('separator')
|
|
10283
10291
|
}, separator), !isLast ? React__default['default'].createElement(Link, {
|
|
10284
|
-
className: cx$
|
|
10292
|
+
className: cx$o('link'),
|
|
10285
10293
|
onClick: function onClick() {
|
|
10286
10294
|
return refine(item.value);
|
|
10287
10295
|
},
|
|
@@ -10289,9 +10297,9 @@ function (_Component) {
|
|
|
10289
10297
|
}, item.label) : item.label);
|
|
10290
10298
|
});
|
|
10291
10299
|
return React__default['default'].createElement("div", {
|
|
10292
|
-
className: index.classnames(cx$
|
|
10300
|
+
className: index.classnames(cx$o('', !canRefine && '-noRefinement'), className)
|
|
10293
10301
|
}, React__default['default'].createElement("ul", {
|
|
10294
|
-
className: cx$
|
|
10302
|
+
className: cx$o('list')
|
|
10295
10303
|
}, rootPath, breadcrumb));
|
|
10296
10304
|
}
|
|
10297
10305
|
}]);
|
|
@@ -10302,7 +10310,7 @@ function (_Component) {
|
|
|
10302
10310
|
_defineProperty(Breadcrumb, "propTypes", {
|
|
10303
10311
|
canRefine: PropTypes__default['default'].bool.isRequired,
|
|
10304
10312
|
createURL: PropTypes__default['default'].func.isRequired,
|
|
10305
|
-
items: itemsPropType,
|
|
10313
|
+
items: itemsPropType$2,
|
|
10306
10314
|
refine: PropTypes__default['default'].func.isRequired,
|
|
10307
10315
|
rootURL: PropTypes__default['default'].string,
|
|
10308
10316
|
separator: PropTypes__default['default'].node,
|
|
@@ -10414,7 +10422,7 @@ var BreadcrumbWidget = function BreadcrumbWidget(props) {
|
|
|
10414
10422
|
|
|
10415
10423
|
connectBreadcrumb(BreadcrumbWidget);
|
|
10416
10424
|
|
|
10417
|
-
var cx$
|
|
10425
|
+
var cx$n = createClassNames('ClearRefinements');
|
|
10418
10426
|
|
|
10419
10427
|
var ClearRefinements =
|
|
10420
10428
|
/*#__PURE__*/
|
|
@@ -10437,9 +10445,9 @@ function (_Component) {
|
|
|
10437
10445
|
translate = _this$props.translate,
|
|
10438
10446
|
className = _this$props.className;
|
|
10439
10447
|
return React__default['default'].createElement("div", {
|
|
10440
|
-
className: index.classnames(cx$
|
|
10448
|
+
className: index.classnames(cx$n(''), className)
|
|
10441
10449
|
}, React__default['default'].createElement("button", {
|
|
10442
|
-
className: cx$
|
|
10450
|
+
className: cx$n('button', !canRefine && 'button--disabled'),
|
|
10443
10451
|
onClick: function onClick() {
|
|
10444
10452
|
return refine(items);
|
|
10445
10453
|
},
|
|
@@ -10507,7 +10515,7 @@ var ClearRefinementsWidget = function ClearRefinementsWidget(props) {
|
|
|
10507
10515
|
|
|
10508
10516
|
connectCurrentRefinements(ClearRefinementsWidget);
|
|
10509
10517
|
|
|
10510
|
-
var cx$
|
|
10518
|
+
var cx$m = createClassNames('CurrentRefinements');
|
|
10511
10519
|
var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
10512
10520
|
var items = _ref.items,
|
|
10513
10521
|
canRefine = _ref.canRefine,
|
|
@@ -10515,31 +10523,31 @@ var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
|
10515
10523
|
translate = _ref.translate,
|
|
10516
10524
|
className = _ref.className;
|
|
10517
10525
|
return React__default['default'].createElement("div", {
|
|
10518
|
-
className: index.classnames(cx$
|
|
10526
|
+
className: index.classnames(cx$m('', !canRefine && '-noRefinement'), className)
|
|
10519
10527
|
}, React__default['default'].createElement("ul", {
|
|
10520
|
-
className: cx$
|
|
10528
|
+
className: cx$m('list', !canRefine && 'list--noRefinement')
|
|
10521
10529
|
}, items.map(function (item) {
|
|
10522
10530
|
return React__default['default'].createElement("li", {
|
|
10523
10531
|
key: item.label,
|
|
10524
|
-
className: cx$
|
|
10532
|
+
className: cx$m('item')
|
|
10525
10533
|
}, React__default['default'].createElement("span", {
|
|
10526
|
-
className: cx$
|
|
10534
|
+
className: cx$m('label')
|
|
10527
10535
|
}, item.label), item.items ? item.items.map(function (nest) {
|
|
10528
10536
|
return React__default['default'].createElement("span", {
|
|
10529
10537
|
key: nest.label,
|
|
10530
|
-
className: cx$
|
|
10538
|
+
className: cx$m('category')
|
|
10531
10539
|
}, React__default['default'].createElement("span", {
|
|
10532
|
-
className: cx$
|
|
10540
|
+
className: cx$m('categoryLabel')
|
|
10533
10541
|
}, nest.label), React__default['default'].createElement("button", {
|
|
10534
|
-
className: cx$
|
|
10542
|
+
className: cx$m('delete'),
|
|
10535
10543
|
onClick: function onClick() {
|
|
10536
10544
|
return refine(nest.value);
|
|
10537
10545
|
}
|
|
10538
10546
|
}, translate('clearFilter', nest)));
|
|
10539
10547
|
}) : React__default['default'].createElement("span", {
|
|
10540
|
-
className: cx$
|
|
10548
|
+
className: cx$m('category')
|
|
10541
10549
|
}, React__default['default'].createElement("button", {
|
|
10542
|
-
className: cx$
|
|
10550
|
+
className: cx$m('delete'),
|
|
10543
10551
|
onClick: function onClick() {
|
|
10544
10552
|
return refine(item.value);
|
|
10545
10553
|
}
|
|
@@ -10615,14 +10623,14 @@ var CurrentRefinementsWidget = function CurrentRefinementsWidget(props) {
|
|
|
10615
10623
|
|
|
10616
10624
|
connectCurrentRefinements(CurrentRefinementsWidget);
|
|
10617
10625
|
|
|
10618
|
-
var cx$
|
|
10626
|
+
var cx$l = createClassNames('SearchBox');
|
|
10619
10627
|
var defaultLoadingIndicator = React__default['default'].createElement("svg", {
|
|
10620
10628
|
width: "18",
|
|
10621
10629
|
height: "18",
|
|
10622
10630
|
viewBox: "0 0 38 38",
|
|
10623
10631
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10624
10632
|
stroke: "#444",
|
|
10625
|
-
className: cx$
|
|
10633
|
+
className: cx$l('loadingIcon')
|
|
10626
10634
|
}, React__default['default'].createElement("g", {
|
|
10627
10635
|
fill: "none",
|
|
10628
10636
|
fillRule: "evenodd"
|
|
@@ -10645,7 +10653,7 @@ var defaultLoadingIndicator = React__default['default'].createElement("svg", {
|
|
|
10645
10653
|
repeatCount: "indefinite"
|
|
10646
10654
|
})))));
|
|
10647
10655
|
var defaultReset = React__default['default'].createElement("svg", {
|
|
10648
|
-
className: cx$
|
|
10656
|
+
className: cx$l('resetIcon'),
|
|
10649
10657
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10650
10658
|
viewBox: "0 0 20 20",
|
|
10651
10659
|
width: "10",
|
|
@@ -10654,7 +10662,7 @@ var defaultReset = React__default['default'].createElement("svg", {
|
|
|
10654
10662
|
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"
|
|
10655
10663
|
}));
|
|
10656
10664
|
var defaultSubmit = React__default['default'].createElement("svg", {
|
|
10657
|
-
className: cx$
|
|
10665
|
+
className: cx$l('submitIcon'),
|
|
10658
10666
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10659
10667
|
width: "10",
|
|
10660
10668
|
height: "10",
|
|
@@ -10663,7 +10671,7 @@ var defaultSubmit = React__default['default'].createElement("svg", {
|
|
|
10663
10671
|
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"
|
|
10664
10672
|
}));
|
|
10665
10673
|
|
|
10666
|
-
var SearchBox =
|
|
10674
|
+
var SearchBox$1 =
|
|
10667
10675
|
/*#__PURE__*/
|
|
10668
10676
|
function (_Component) {
|
|
10669
10677
|
_inherits(SearchBox, _Component);
|
|
@@ -10826,12 +10834,12 @@ function (_Component) {
|
|
|
10826
10834
|
/* eslint-disable max-len */
|
|
10827
10835
|
|
|
10828
10836
|
return React__default['default'].createElement("div", {
|
|
10829
|
-
className: index.classnames(cx$
|
|
10837
|
+
className: index.classnames(cx$l(''), className)
|
|
10830
10838
|
}, React__default['default'].createElement("form", {
|
|
10831
10839
|
noValidate: true,
|
|
10832
10840
|
onSubmit: this.props.onSubmit ? this.props.onSubmit : this.onSubmit,
|
|
10833
10841
|
onReset: this.onReset,
|
|
10834
|
-
className: cx$
|
|
10842
|
+
className: cx$l('form', isSearchStalled && 'form--stalledSearch'),
|
|
10835
10843
|
action: "",
|
|
10836
10844
|
role: "search"
|
|
10837
10845
|
}, React__default['default'].createElement("input", index._extends({
|
|
@@ -10848,19 +10856,19 @@ function (_Component) {
|
|
|
10848
10856
|
value: query,
|
|
10849
10857
|
onChange: this.onChange
|
|
10850
10858
|
}, searchInputEvents, {
|
|
10851
|
-
className: cx$
|
|
10859
|
+
className: cx$l('input')
|
|
10852
10860
|
})), React__default['default'].createElement("button", {
|
|
10853
10861
|
type: "submit",
|
|
10854
10862
|
title: translate('submitTitle'),
|
|
10855
|
-
className: cx$
|
|
10863
|
+
className: cx$l('submit')
|
|
10856
10864
|
}, submit), React__default['default'].createElement("button", {
|
|
10857
10865
|
type: "reset",
|
|
10858
10866
|
title: translate('resetTitle'),
|
|
10859
|
-
className: cx$
|
|
10867
|
+
className: cx$l('reset'),
|
|
10860
10868
|
hidden: !query || isSearchStalled
|
|
10861
10869
|
}, reset), this.props.showLoadingIndicator && React__default['default'].createElement("span", {
|
|
10862
10870
|
hidden: !isSearchStalled,
|
|
10863
|
-
className: cx$
|
|
10871
|
+
className: cx$l('loadingIndicator')
|
|
10864
10872
|
}, loadingIndicator)));
|
|
10865
10873
|
/* eslint-enable */
|
|
10866
10874
|
}
|
|
@@ -10869,7 +10877,7 @@ function (_Component) {
|
|
|
10869
10877
|
return SearchBox;
|
|
10870
10878
|
}(React.Component);
|
|
10871
10879
|
|
|
10872
|
-
_defineProperty(SearchBox, "propTypes", {
|
|
10880
|
+
_defineProperty(SearchBox$1, "propTypes", {
|
|
10873
10881
|
currentRefinement: PropTypes__default['default'].string,
|
|
10874
10882
|
className: PropTypes__default['default'].string,
|
|
10875
10883
|
refine: PropTypes__default['default'].func.isRequired,
|
|
@@ -10890,7 +10898,7 @@ _defineProperty(SearchBox, "propTypes", {
|
|
|
10890
10898
|
})])
|
|
10891
10899
|
});
|
|
10892
10900
|
|
|
10893
|
-
_defineProperty(SearchBox, "defaultProps", {
|
|
10901
|
+
_defineProperty(SearchBox$1, "defaultProps", {
|
|
10894
10902
|
currentRefinement: '',
|
|
10895
10903
|
className: '',
|
|
10896
10904
|
focusShortcuts: ['s', '/'],
|
|
@@ -10903,11 +10911,11 @@ _defineProperty(SearchBox, "defaultProps", {
|
|
|
10903
10911
|
submit: defaultSubmit
|
|
10904
10912
|
});
|
|
10905
10913
|
|
|
10906
|
-
var SearchBox$
|
|
10914
|
+
var SearchBox$2 = translatable({
|
|
10907
10915
|
resetTitle: 'Clear the search query.',
|
|
10908
10916
|
submitTitle: 'Submit your search query.',
|
|
10909
10917
|
placeholder: 'Search here…'
|
|
10910
|
-
})(SearchBox);
|
|
10918
|
+
})(SearchBox$1);
|
|
10911
10919
|
|
|
10912
10920
|
var itemsPropType$1 = PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
|
|
10913
10921
|
value: PropTypes__default['default'].any,
|
|
@@ -11007,7 +11015,7 @@ function (_Component) {
|
|
|
11007
11015
|
}, translate('noResults')) : null;
|
|
11008
11016
|
return React__default['default'].createElement("div", {
|
|
11009
11017
|
className: cx('searchBox')
|
|
11010
|
-
}, React__default['default'].createElement(SearchBox$
|
|
11018
|
+
}, React__default['default'].createElement(SearchBox$2, {
|
|
11011
11019
|
currentRefinement: this.state.query,
|
|
11012
11020
|
refine: function refine(value) {
|
|
11013
11021
|
_this2.setState({
|
|
@@ -11087,13 +11095,13 @@ _defineProperty(List, "defaultProps", {
|
|
|
11087
11095
|
isFromSearch: false
|
|
11088
11096
|
});
|
|
11089
11097
|
|
|
11090
|
-
var cx$
|
|
11091
|
-
var itemsPropType
|
|
11098
|
+
var cx$k = createClassNames('HierarchicalMenu');
|
|
11099
|
+
var itemsPropType = PropTypes__default['default'].arrayOf(PropTypes__default['default'].shape({
|
|
11092
11100
|
label: PropTypes__default['default'].string.isRequired,
|
|
11093
11101
|
value: PropTypes__default['default'].string,
|
|
11094
11102
|
count: PropTypes__default['default'].number.isRequired,
|
|
11095
11103
|
items: function items() {
|
|
11096
|
-
return itemsPropType
|
|
11104
|
+
return itemsPropType.apply(void 0, arguments);
|
|
11097
11105
|
}
|
|
11098
11106
|
}));
|
|
11099
11107
|
|
|
@@ -11120,15 +11128,15 @@ function (_Component) {
|
|
|
11120
11128
|
createURL = _this$props.createURL,
|
|
11121
11129
|
refine = _this$props.refine;
|
|
11122
11130
|
return React__default['default'].createElement(Link, {
|
|
11123
|
-
className: cx$
|
|
11131
|
+
className: cx$k('link'),
|
|
11124
11132
|
onClick: function onClick() {
|
|
11125
11133
|
return refine(item.value);
|
|
11126
11134
|
},
|
|
11127
11135
|
href: createURL(item.value)
|
|
11128
11136
|
}, React__default['default'].createElement("span", {
|
|
11129
|
-
className: cx$
|
|
11137
|
+
className: cx$k('label')
|
|
11130
11138
|
}, item.label), ' ', React__default['default'].createElement("span", {
|
|
11131
|
-
className: cx$
|
|
11139
|
+
className: cx$k('count')
|
|
11132
11140
|
}, item.count));
|
|
11133
11141
|
});
|
|
11134
11142
|
|
|
@@ -11148,7 +11156,7 @@ function (_Component) {
|
|
|
11148
11156
|
className = _this$props2.className;
|
|
11149
11157
|
return React__default['default'].createElement(List, {
|
|
11150
11158
|
renderItem: this.renderItem,
|
|
11151
|
-
cx: cx$
|
|
11159
|
+
cx: cx$k,
|
|
11152
11160
|
translate: translate,
|
|
11153
11161
|
items: items,
|
|
11154
11162
|
showMore: showMore,
|
|
@@ -11168,7 +11176,7 @@ _defineProperty(HierarchicalMenu, "propTypes", {
|
|
|
11168
11176
|
refine: PropTypes__default['default'].func.isRequired,
|
|
11169
11177
|
createURL: PropTypes__default['default'].func.isRequired,
|
|
11170
11178
|
canRefine: PropTypes__default['default'].bool.isRequired,
|
|
11171
|
-
items: itemsPropType
|
|
11179
|
+
items: itemsPropType,
|
|
11172
11180
|
showMore: PropTypes__default['default'].bool,
|
|
11173
11181
|
className: PropTypes__default['default'].string,
|
|
11174
11182
|
limit: PropTypes__default['default'].number,
|
|
@@ -11282,7 +11290,7 @@ var HierarchicalMenuWidget = function HierarchicalMenuWidget(props) {
|
|
|
11282
11290
|
|
|
11283
11291
|
connectHierarchicalMenu(HierarchicalMenuWidget);
|
|
11284
11292
|
|
|
11285
|
-
var Highlight = function Highlight(_ref) {
|
|
11293
|
+
var Highlight$2 = function Highlight(_ref) {
|
|
11286
11294
|
var cx = _ref.cx,
|
|
11287
11295
|
value = _ref.value,
|
|
11288
11296
|
highlightedTagName = _ref.highlightedTagName,
|
|
@@ -11294,7 +11302,7 @@ var Highlight = function Highlight(_ref) {
|
|
|
11294
11302
|
className: cx(className)
|
|
11295
11303
|
}, value);
|
|
11296
11304
|
};
|
|
11297
|
-
Highlight.propTypes = {
|
|
11305
|
+
Highlight$2.propTypes = {
|
|
11298
11306
|
cx: PropTypes__default['default'].func.isRequired,
|
|
11299
11307
|
value: PropTypes__default['default'].string.isRequired,
|
|
11300
11308
|
isHighlighted: PropTypes__default['default'].bool.isRequired,
|
|
@@ -11325,7 +11333,7 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11325
11333
|
return React__default['default'].createElement("span", {
|
|
11326
11334
|
key: i
|
|
11327
11335
|
}, item.map(function (element, index) {
|
|
11328
|
-
return React__default['default'].createElement(Highlight, {
|
|
11336
|
+
return React__default['default'].createElement(Highlight$2, {
|
|
11329
11337
|
cx: cx,
|
|
11330
11338
|
key: index,
|
|
11331
11339
|
value: element.value,
|
|
@@ -11338,7 +11346,7 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11338
11346
|
}, separator));
|
|
11339
11347
|
}
|
|
11340
11348
|
|
|
11341
|
-
return React__default['default'].createElement(Highlight, {
|
|
11349
|
+
return React__default['default'].createElement(Highlight$2, {
|
|
11342
11350
|
cx: cx,
|
|
11343
11351
|
key: i,
|
|
11344
11352
|
value: item.value,
|
|
@@ -11367,12 +11375,12 @@ Highlighter.defaultProps = {
|
|
|
11367
11375
|
separator: ', '
|
|
11368
11376
|
};
|
|
11369
11377
|
|
|
11370
|
-
var cx$
|
|
11378
|
+
var cx$j = createClassNames('Highlight');
|
|
11371
11379
|
|
|
11372
11380
|
var Highlight$1 = function Highlight(props) {
|
|
11373
11381
|
return React__default['default'].createElement(Highlighter, index._extends({}, props, {
|
|
11374
11382
|
highlightProperty: "_highlightResult",
|
|
11375
|
-
cx: cx$
|
|
11383
|
+
cx: cx$j
|
|
11376
11384
|
}));
|
|
11377
11385
|
};
|
|
11378
11386
|
|
|
@@ -11417,9 +11425,9 @@ var Highlight$1 = function Highlight(props) {
|
|
|
11417
11425
|
* );
|
|
11418
11426
|
*/
|
|
11419
11427
|
|
|
11420
|
-
var Highlight
|
|
11428
|
+
var Highlight = connectHighlight(Highlight$1);
|
|
11421
11429
|
|
|
11422
|
-
var cx$
|
|
11430
|
+
var cx$i = createClassNames('Hits');
|
|
11423
11431
|
|
|
11424
11432
|
var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
11425
11433
|
return React__default['default'].createElement("div", {
|
|
@@ -11432,19 +11440,19 @@ var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
|
11432
11440
|
}, JSON.stringify(props).slice(0, 100), "...");
|
|
11433
11441
|
};
|
|
11434
11442
|
|
|
11435
|
-
var Hits = function Hits(_ref) {
|
|
11443
|
+
var Hits$1 = function Hits(_ref) {
|
|
11436
11444
|
var hits = _ref.hits,
|
|
11437
11445
|
_ref$className = _ref.className,
|
|
11438
11446
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
11439
11447
|
_ref$hitComponent = _ref.hitComponent,
|
|
11440
11448
|
HitComponent = _ref$hitComponent === void 0 ? DefaultHitComponent : _ref$hitComponent;
|
|
11441
11449
|
return React__default['default'].createElement("div", {
|
|
11442
|
-
className: index.classnames(cx$
|
|
11450
|
+
className: index.classnames(cx$i(''), className)
|
|
11443
11451
|
}, React__default['default'].createElement("ul", {
|
|
11444
|
-
className: cx$
|
|
11452
|
+
className: cx$i('list')
|
|
11445
11453
|
}, hits.map(function (hit) {
|
|
11446
11454
|
return React__default['default'].createElement("li", {
|
|
11447
|
-
className: cx$
|
|
11455
|
+
className: cx$i('item'),
|
|
11448
11456
|
key: hit.objectID
|
|
11449
11457
|
}, React__default['default'].createElement(HitComponent, {
|
|
11450
11458
|
hit: hit
|
|
@@ -11455,7 +11463,7 @@ var Hits = function Hits(_ref) {
|
|
|
11455
11463
|
var HitPropTypes = PropTypes__default['default'].shape({
|
|
11456
11464
|
objectID: PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].number]).isRequired
|
|
11457
11465
|
});
|
|
11458
|
-
Hits.propTypes = {
|
|
11466
|
+
Hits$1.propTypes = {
|
|
11459
11467
|
hits: PropTypes__default['default'].arrayOf(HitPropTypes.isRequired).isRequired,
|
|
11460
11468
|
className: PropTypes__default['default'].string,
|
|
11461
11469
|
hitComponent: PropTypes__default['default'].func
|
|
@@ -11494,7 +11502,7 @@ Hits.propTypes = {
|
|
|
11494
11502
|
* );
|
|
11495
11503
|
*/
|
|
11496
11504
|
|
|
11497
|
-
var Hits
|
|
11505
|
+
var Hits = connectHits(Hits$1);
|
|
11498
11506
|
|
|
11499
11507
|
var Select =
|
|
11500
11508
|
/*#__PURE__*/
|
|
@@ -11558,7 +11566,7 @@ _defineProperty(Select, "propTypes", {
|
|
|
11558
11566
|
selectedItem: PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].number]).isRequired
|
|
11559
11567
|
});
|
|
11560
11568
|
|
|
11561
|
-
var cx$
|
|
11569
|
+
var cx$h = createClassNames('HitsPerPage');
|
|
11562
11570
|
|
|
11563
11571
|
var HitsPerPage =
|
|
11564
11572
|
/*#__PURE__*/
|
|
@@ -11580,12 +11588,12 @@ function (_Component) {
|
|
|
11580
11588
|
refine = _this$props.refine,
|
|
11581
11589
|
className = _this$props.className;
|
|
11582
11590
|
return React__default['default'].createElement("div", {
|
|
11583
|
-
className: index.classnames(cx$
|
|
11591
|
+
className: index.classnames(cx$h(''), className)
|
|
11584
11592
|
}, React__default['default'].createElement(Select, {
|
|
11585
11593
|
onSelect: refine,
|
|
11586
11594
|
selectedItem: currentRefinement,
|
|
11587
11595
|
items: items,
|
|
11588
|
-
cx: cx$
|
|
11596
|
+
cx: cx$h
|
|
11589
11597
|
}));
|
|
11590
11598
|
}
|
|
11591
11599
|
}]);
|
|
@@ -11651,7 +11659,7 @@ _defineProperty(HitsPerPage, "defaultProps", {
|
|
|
11651
11659
|
|
|
11652
11660
|
connectHitsPerPage(HitsPerPage);
|
|
11653
11661
|
|
|
11654
|
-
var cx$
|
|
11662
|
+
var cx$g = createClassNames('InfiniteHits');
|
|
11655
11663
|
|
|
11656
11664
|
var InfiniteHits =
|
|
11657
11665
|
/*#__PURE__*/
|
|
@@ -11678,24 +11686,24 @@ function (_Component) {
|
|
|
11678
11686
|
translate = _this$props.translate,
|
|
11679
11687
|
className = _this$props.className;
|
|
11680
11688
|
return React__default['default'].createElement("div", {
|
|
11681
|
-
className: index.classnames(cx$
|
|
11689
|
+
className: index.classnames(cx$g(''), className)
|
|
11682
11690
|
}, showPrevious && React__default['default'].createElement("button", {
|
|
11683
|
-
className: cx$
|
|
11691
|
+
className: cx$g('loadPrevious', !hasPrevious && 'loadPrevious--disabled'),
|
|
11684
11692
|
onClick: function onClick() {
|
|
11685
11693
|
return refinePrevious();
|
|
11686
11694
|
},
|
|
11687
11695
|
disabled: !hasPrevious
|
|
11688
11696
|
}, translate('loadPrevious')), React__default['default'].createElement("ul", {
|
|
11689
|
-
className: cx$
|
|
11697
|
+
className: cx$g('list')
|
|
11690
11698
|
}, hits.map(function (hit) {
|
|
11691
11699
|
return React__default['default'].createElement("li", {
|
|
11692
11700
|
key: hit.objectID,
|
|
11693
|
-
className: cx$
|
|
11701
|
+
className: cx$g('item')
|
|
11694
11702
|
}, React__default['default'].createElement(HitComponent, {
|
|
11695
11703
|
hit: hit
|
|
11696
11704
|
}));
|
|
11697
11705
|
})), React__default['default'].createElement("button", {
|
|
11698
|
-
className: cx$
|
|
11706
|
+
className: cx$g('loadMore', !hasMore && 'loadMore--disabled'),
|
|
11699
11707
|
onClick: function onClick() {
|
|
11700
11708
|
return refineNext();
|
|
11701
11709
|
},
|
|
@@ -11776,7 +11784,7 @@ var InfiniteHits$1 = translatable({
|
|
|
11776
11784
|
|
|
11777
11785
|
connectInfiniteHits(InfiniteHits$1);
|
|
11778
11786
|
|
|
11779
|
-
var cx$
|
|
11787
|
+
var cx$f = createClassNames('Menu');
|
|
11780
11788
|
|
|
11781
11789
|
var Menu =
|
|
11782
11790
|
/*#__PURE__*/
|
|
@@ -11798,20 +11806,20 @@ function (_Component) {
|
|
|
11798
11806
|
|
|
11799
11807
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
11800
11808
|
var createURL = _this.props.createURL;
|
|
11801
|
-
var label = _this.props.isFromSearch ? React__default['default'].createElement(Highlight
|
|
11809
|
+
var label = _this.props.isFromSearch ? React__default['default'].createElement(Highlight, {
|
|
11802
11810
|
attribute: "label",
|
|
11803
11811
|
hit: item
|
|
11804
11812
|
}) : item.label;
|
|
11805
11813
|
return React__default['default'].createElement(Link, {
|
|
11806
|
-
className: cx$
|
|
11814
|
+
className: cx$f('link'),
|
|
11807
11815
|
onClick: function onClick() {
|
|
11808
11816
|
return _this.selectItem(item, resetQuery);
|
|
11809
11817
|
},
|
|
11810
11818
|
href: createURL(item.value)
|
|
11811
11819
|
}, React__default['default'].createElement("span", {
|
|
11812
|
-
className: cx$
|
|
11820
|
+
className: cx$f('label')
|
|
11813
11821
|
}, label), ' ', React__default['default'].createElement("span", {
|
|
11814
|
-
className: cx$
|
|
11822
|
+
className: cx$f('count')
|
|
11815
11823
|
}, item.count));
|
|
11816
11824
|
});
|
|
11817
11825
|
|
|
@@ -11841,7 +11849,7 @@ function (_Component) {
|
|
|
11841
11849
|
return React__default['default'].createElement(List, {
|
|
11842
11850
|
renderItem: this.renderItem,
|
|
11843
11851
|
selectItem: this.selectItem,
|
|
11844
|
-
cx: cx$
|
|
11852
|
+
cx: cx$f,
|
|
11845
11853
|
translate: translate,
|
|
11846
11854
|
items: items,
|
|
11847
11855
|
showMore: showMore,
|
|
@@ -11951,7 +11959,7 @@ var MenuWidget = function MenuWidget(props) {
|
|
|
11951
11959
|
|
|
11952
11960
|
connectMenu(MenuWidget);
|
|
11953
11961
|
|
|
11954
|
-
var cx$
|
|
11962
|
+
var cx$e = createClassNames('MenuSelect');
|
|
11955
11963
|
|
|
11956
11964
|
var MenuSelect =
|
|
11957
11965
|
/*#__PURE__*/
|
|
@@ -11989,26 +11997,26 @@ function (_Component) {
|
|
|
11989
11997
|
translate = _this$props.translate,
|
|
11990
11998
|
className = _this$props.className;
|
|
11991
11999
|
return React__default['default'].createElement("div", {
|
|
11992
|
-
className: index.classnames(cx$
|
|
12000
|
+
className: index.classnames(cx$e('', !canRefine && '-noRefinement'), className)
|
|
11993
12001
|
}, React__default['default'].createElement("select", {
|
|
11994
12002
|
value: this.selectedValue,
|
|
11995
12003
|
onChange: this.handleSelectChange,
|
|
11996
|
-
className: cx$
|
|
12004
|
+
className: cx$e('select')
|
|
11997
12005
|
}, React__default['default'].createElement("option", {
|
|
11998
12006
|
value: "ais__see__all__option",
|
|
11999
|
-
className: cx$
|
|
12007
|
+
className: cx$e('option')
|
|
12000
12008
|
}, translate('seeAllOption')), items.map(function (item) {
|
|
12001
12009
|
return React__default['default'].createElement("option", {
|
|
12002
12010
|
key: item.value,
|
|
12003
12011
|
value: item.value,
|
|
12004
|
-
className: cx$
|
|
12012
|
+
className: cx$e('option')
|
|
12005
12013
|
}, item.label, " (", item.count, ")");
|
|
12006
12014
|
})));
|
|
12007
12015
|
}
|
|
12008
12016
|
}, {
|
|
12009
12017
|
key: "selectedValue",
|
|
12010
12018
|
get: function get() {
|
|
12011
|
-
var _ref2 = find
|
|
12019
|
+
var _ref2 = find(this.props.items, function (item) {
|
|
12012
12020
|
return item.isRefined === true;
|
|
12013
12021
|
}) || {
|
|
12014
12022
|
value: 'ais__see__all__option'
|
|
@@ -12085,7 +12093,7 @@ var MenuSelectWidget = function MenuSelectWidget(props) {
|
|
|
12085
12093
|
|
|
12086
12094
|
connectMenu(MenuSelectWidget);
|
|
12087
12095
|
|
|
12088
|
-
var cx$
|
|
12096
|
+
var cx$d = createClassNames('NumericMenu');
|
|
12089
12097
|
|
|
12090
12098
|
var NumericMenu =
|
|
12091
12099
|
/*#__PURE__*/
|
|
@@ -12110,9 +12118,9 @@ function (_Component) {
|
|
|
12110
12118
|
refine = _this$props.refine,
|
|
12111
12119
|
translate = _this$props.translate;
|
|
12112
12120
|
return React__default['default'].createElement("label", {
|
|
12113
|
-
className: cx$
|
|
12121
|
+
className: cx$d('label')
|
|
12114
12122
|
}, React__default['default'].createElement("input", {
|
|
12115
|
-
className: cx$
|
|
12123
|
+
className: cx$d('radio'),
|
|
12116
12124
|
type: "radio",
|
|
12117
12125
|
checked: item.isRefined,
|
|
12118
12126
|
disabled: item.noRefinement,
|
|
@@ -12120,7 +12128,7 @@ function (_Component) {
|
|
|
12120
12128
|
return refine(item.value);
|
|
12121
12129
|
}
|
|
12122
12130
|
}), React__default['default'].createElement("span", {
|
|
12123
|
-
className: cx$
|
|
12131
|
+
className: cx$d('labelText')
|
|
12124
12132
|
}, item.value === '' ? translate('all') : item.label));
|
|
12125
12133
|
});
|
|
12126
12134
|
|
|
@@ -12138,7 +12146,7 @@ function (_Component) {
|
|
|
12138
12146
|
renderItem: this.renderItem,
|
|
12139
12147
|
showMore: false,
|
|
12140
12148
|
canRefine: canRefine,
|
|
12141
|
-
cx: cx$
|
|
12149
|
+
cx: cx$d,
|
|
12142
12150
|
items: items.map(function (item) {
|
|
12143
12151
|
return _objectSpread({}, item, {
|
|
12144
12152
|
key: item.value
|
|
@@ -12283,7 +12291,7 @@ _defineProperty(LinkList, "propTypes", {
|
|
|
12283
12291
|
canRefine: PropTypes__default['default'].bool.isRequired
|
|
12284
12292
|
});
|
|
12285
12293
|
|
|
12286
|
-
var cx$
|
|
12294
|
+
var cx$c = createClassNames('Pagination'); // Determines the size of the widget (the number of pages displayed - that the user can directly click on)
|
|
12287
12295
|
|
|
12288
12296
|
function calculateSize(padding, maxPages) {
|
|
12289
12297
|
return Math.min(2 * padding + 1, maxPages);
|
|
@@ -12319,7 +12327,7 @@ function getPages(currentPage, maxPages, padding) {
|
|
|
12319
12327
|
});
|
|
12320
12328
|
}
|
|
12321
12329
|
|
|
12322
|
-
var Pagination =
|
|
12330
|
+
var Pagination$1 =
|
|
12323
12331
|
/*#__PURE__*/
|
|
12324
12332
|
function (_Component) {
|
|
12325
12333
|
_inherits(Pagination, _Component);
|
|
@@ -12426,9 +12434,9 @@ function (_Component) {
|
|
|
12426
12434
|
}
|
|
12427
12435
|
|
|
12428
12436
|
return React__default['default'].createElement("div", {
|
|
12429
|
-
className: index.classnames(cx$
|
|
12437
|
+
className: index.classnames(cx$c('', !canRefine && '-noRefinement'), className)
|
|
12430
12438
|
}, React__default['default'].createElement(ListComponent, index._extends({}, otherProps, {
|
|
12431
|
-
cx: cx$
|
|
12439
|
+
cx: cx$c,
|
|
12432
12440
|
items: items,
|
|
12433
12441
|
onSelect: refine,
|
|
12434
12442
|
createURL: createURL,
|
|
@@ -12440,7 +12448,7 @@ function (_Component) {
|
|
|
12440
12448
|
return Pagination;
|
|
12441
12449
|
}(React.Component);
|
|
12442
12450
|
|
|
12443
|
-
_defineProperty(Pagination, "propTypes", {
|
|
12451
|
+
_defineProperty(Pagination$1, "propTypes", {
|
|
12444
12452
|
nbPages: PropTypes__default['default'].number.isRequired,
|
|
12445
12453
|
currentRefinement: PropTypes__default['default'].number.isRequired,
|
|
12446
12454
|
refine: PropTypes__default['default'].func.isRequired,
|
|
@@ -12457,7 +12465,7 @@ _defineProperty(Pagination, "propTypes", {
|
|
|
12457
12465
|
className: PropTypes__default['default'].string
|
|
12458
12466
|
});
|
|
12459
12467
|
|
|
12460
|
-
_defineProperty(Pagination, "defaultProps", {
|
|
12468
|
+
_defineProperty(Pagination$1, "defaultProps", {
|
|
12461
12469
|
listComponent: LinkList,
|
|
12462
12470
|
showFirst: true,
|
|
12463
12471
|
showPrevious: true,
|
|
@@ -12468,7 +12476,7 @@ _defineProperty(Pagination, "defaultProps", {
|
|
|
12468
12476
|
className: ''
|
|
12469
12477
|
});
|
|
12470
12478
|
|
|
12471
|
-
var Pagination$
|
|
12479
|
+
var Pagination$2 = translatable({
|
|
12472
12480
|
previous: '‹',
|
|
12473
12481
|
next: '›',
|
|
12474
12482
|
first: '«',
|
|
@@ -12483,7 +12491,7 @@ var Pagination$1 = translatable({
|
|
|
12483
12491
|
ariaPage: function ariaPage(currentRefinement) {
|
|
12484
12492
|
return "Page ".concat(currentRefinement.toString());
|
|
12485
12493
|
}
|
|
12486
|
-
})(Pagination);
|
|
12494
|
+
})(Pagination$1);
|
|
12487
12495
|
|
|
12488
12496
|
/**
|
|
12489
12497
|
* The Pagination widget displays a simple pagination system allowing the user to
|
|
@@ -12540,12 +12548,12 @@ var Pagination$1 = translatable({
|
|
|
12540
12548
|
*/
|
|
12541
12549
|
|
|
12542
12550
|
var PaginationWidget = function PaginationWidget(props) {
|
|
12543
|
-
return React__default['default'].createElement(PanelWrapper, props, React__default['default'].createElement(Pagination$
|
|
12551
|
+
return React__default['default'].createElement(PanelWrapper, props, React__default['default'].createElement(Pagination$2, props));
|
|
12544
12552
|
};
|
|
12545
12553
|
|
|
12546
|
-
var Pagination
|
|
12554
|
+
var Pagination = connectPagination(PaginationWidget);
|
|
12547
12555
|
|
|
12548
|
-
var cx$
|
|
12556
|
+
var cx$b = createClassNames('PoweredBy');
|
|
12549
12557
|
/* eslint-disable max-len */
|
|
12550
12558
|
|
|
12551
12559
|
var AlgoliaLogo = function AlgoliaLogo() {
|
|
@@ -12555,7 +12563,7 @@ var AlgoliaLogo = function AlgoliaLogo() {
|
|
|
12555
12563
|
viewBox: "0 0 1366 362",
|
|
12556
12564
|
width: "100",
|
|
12557
12565
|
height: "27",
|
|
12558
|
-
className: cx$
|
|
12566
|
+
className: cx$b('logo')
|
|
12559
12567
|
}, React__default['default'].createElement("linearGradient", {
|
|
12560
12568
|
id: "g",
|
|
12561
12569
|
x1: "428.258",
|
|
@@ -12603,13 +12611,13 @@ function (_Component) {
|
|
|
12603
12611
|
translate = _this$props.translate,
|
|
12604
12612
|
className = _this$props.className;
|
|
12605
12613
|
return React__default['default'].createElement("div", {
|
|
12606
|
-
className: index.classnames(cx$
|
|
12614
|
+
className: index.classnames(cx$b(''), className)
|
|
12607
12615
|
}, React__default['default'].createElement("span", {
|
|
12608
|
-
className: cx$
|
|
12616
|
+
className: cx$b('text')
|
|
12609
12617
|
}, translate('searchBy')), ' ', React__default['default'].createElement("a", {
|
|
12610
12618
|
href: url,
|
|
12611
12619
|
target: "_blank",
|
|
12612
|
-
className: cx$
|
|
12620
|
+
className: cx$b('link'),
|
|
12613
12621
|
"aria-label": "Algolia",
|
|
12614
12622
|
rel: "noopener noreferrer"
|
|
12615
12623
|
}, React__default['default'].createElement(AlgoliaLogo, null)));
|
|
@@ -12662,7 +12670,7 @@ var PoweredBy$1 = translatable({
|
|
|
12662
12670
|
|
|
12663
12671
|
connectPoweredBy(PoweredBy$1);
|
|
12664
12672
|
|
|
12665
|
-
var cx$
|
|
12673
|
+
var cx$a = createClassNames('RangeInput');
|
|
12666
12674
|
var RawRangeInput =
|
|
12667
12675
|
/*#__PURE__*/
|
|
12668
12676
|
function (_Component) {
|
|
@@ -12742,12 +12750,12 @@ function (_Component) {
|
|
|
12742
12750
|
|
|
12743
12751
|
var step = 1 / Math.pow(10, precision);
|
|
12744
12752
|
return React__default['default'].createElement("div", {
|
|
12745
|
-
className: index.classnames(cx$
|
|
12753
|
+
className: index.classnames(cx$a('', !canRefine && '-noRefinement'), className)
|
|
12746
12754
|
}, React__default['default'].createElement("form", {
|
|
12747
|
-
className: cx$
|
|
12755
|
+
className: cx$a('form'),
|
|
12748
12756
|
onSubmit: this.onSubmit
|
|
12749
12757
|
}, React__default['default'].createElement("input", {
|
|
12750
|
-
className: cx$
|
|
12758
|
+
className: cx$a('input', 'input--min'),
|
|
12751
12759
|
type: "number",
|
|
12752
12760
|
min: min,
|
|
12753
12761
|
max: max,
|
|
@@ -12761,9 +12769,9 @@ function (_Component) {
|
|
|
12761
12769
|
});
|
|
12762
12770
|
}
|
|
12763
12771
|
}), React__default['default'].createElement("span", {
|
|
12764
|
-
className: cx$
|
|
12772
|
+
className: cx$a('separator')
|
|
12765
12773
|
}, translate('separator')), React__default['default'].createElement("input", {
|
|
12766
|
-
className: cx$
|
|
12774
|
+
className: cx$a('input', 'input--max'),
|
|
12767
12775
|
type: "number",
|
|
12768
12776
|
min: min,
|
|
12769
12777
|
max: max,
|
|
@@ -12777,7 +12785,7 @@ function (_Component) {
|
|
|
12777
12785
|
});
|
|
12778
12786
|
}
|
|
12779
12787
|
}), React__default['default'].createElement("button", {
|
|
12780
|
-
className: cx$
|
|
12788
|
+
className: cx$a('submit'),
|
|
12781
12789
|
type: "submit"
|
|
12782
12790
|
}, translate('submit'))));
|
|
12783
12791
|
}
|
|
@@ -12858,7 +12866,7 @@ var RangeInputWidget = function RangeInputWidget(props) {
|
|
|
12858
12866
|
|
|
12859
12867
|
connectRange(RangeInputWidget);
|
|
12860
12868
|
|
|
12861
|
-
var cx$
|
|
12869
|
+
var cx$9 = createClassNames('RatingMenu');
|
|
12862
12870
|
|
|
12863
12871
|
var RatingMenu =
|
|
12864
12872
|
/*#__PURE__*/
|
|
@@ -12911,12 +12919,12 @@ function (_Component) {
|
|
|
12911
12919
|
|
|
12912
12920
|
icons.push([React__default['default'].createElement("svg", {
|
|
12913
12921
|
key: icon,
|
|
12914
|
-
className: cx$
|
|
12922
|
+
className: cx$9('starIcon', icon >= lowerBound ? 'starIcon--empty' : 'starIcon--full'),
|
|
12915
12923
|
"aria-hidden": "true",
|
|
12916
12924
|
width: "24",
|
|
12917
12925
|
height: "24"
|
|
12918
12926
|
}, React__default['default'].createElement("use", {
|
|
12919
|
-
xlinkHref: "#".concat(cx$
|
|
12927
|
+
xlinkHref: "#".concat(cx$9(icon >= lowerBound ? 'starEmptySymbol' : 'starSymbol'))
|
|
12920
12928
|
})), ' ']);
|
|
12921
12929
|
} // The last item of the list (the default item), should not
|
|
12922
12930
|
// be clickable if it is selected.
|
|
@@ -12932,15 +12940,15 @@ function (_Component) {
|
|
|
12932
12940
|
};
|
|
12933
12941
|
return React__default['default'].createElement("li", {
|
|
12934
12942
|
key: lowerBound,
|
|
12935
|
-
className: cx$
|
|
12943
|
+
className: cx$9('item', selected && 'item--selected', disabled && 'item--disabled')
|
|
12936
12944
|
}, React__default['default'].createElement("a", index._extends({
|
|
12937
|
-
className: cx$
|
|
12945
|
+
className: cx$9('link'),
|
|
12938
12946
|
"aria-label": "".concat(rating).concat(translate('ratingLabel'))
|
|
12939
12947
|
}, onClickHandler), icons, React__default['default'].createElement("span", {
|
|
12940
|
-
className: cx$
|
|
12948
|
+
className: cx$9('label'),
|
|
12941
12949
|
"aria-hidden": "true"
|
|
12942
12950
|
}, translate('ratingLabel')), ' ', React__default['default'].createElement("span", {
|
|
12943
|
-
className: cx$
|
|
12951
|
+
className: cx$9('count')
|
|
12944
12952
|
}, count)));
|
|
12945
12953
|
}
|
|
12946
12954
|
}, {
|
|
@@ -12972,7 +12980,7 @@ function (_Component) {
|
|
|
12972
12980
|
start: 0,
|
|
12973
12981
|
end: Math.max(inclusiveLength, 0)
|
|
12974
12982
|
}).map(function (index) {
|
|
12975
|
-
var element = find
|
|
12983
|
+
var element = find(values, function (item) {
|
|
12976
12984
|
return item.value === limitMax - index;
|
|
12977
12985
|
});
|
|
12978
12986
|
var placeholder = {
|
|
@@ -12996,24 +13004,24 @@ function (_Component) {
|
|
|
12996
13004
|
});
|
|
12997
13005
|
});
|
|
12998
13006
|
return React__default['default'].createElement("div", {
|
|
12999
|
-
className: index.classnames(cx$
|
|
13007
|
+
className: index.classnames(cx$9('', !canRefine && '-noRefinement'), className)
|
|
13000
13008
|
}, React__default['default'].createElement("svg", {
|
|
13001
13009
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13002
13010
|
style: {
|
|
13003
13011
|
display: 'none'
|
|
13004
13012
|
}
|
|
13005
13013
|
}, React__default['default'].createElement("symbol", {
|
|
13006
|
-
id: cx$
|
|
13014
|
+
id: cx$9('starSymbol'),
|
|
13007
13015
|
viewBox: "0 0 24 24"
|
|
13008
13016
|
}, React__default['default'].createElement("path", {
|
|
13009
13017
|
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"
|
|
13010
13018
|
})), React__default['default'].createElement("symbol", {
|
|
13011
|
-
id: cx$
|
|
13019
|
+
id: cx$9('starEmptySymbol'),
|
|
13012
13020
|
viewBox: "0 0 24 24"
|
|
13013
13021
|
}, React__default['default'].createElement("path", {
|
|
13014
13022
|
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"
|
|
13015
13023
|
}))), React__default['default'].createElement("ul", {
|
|
13016
|
-
className: cx$
|
|
13024
|
+
className: cx$9('list', !canRefine && 'list--noRefinement')
|
|
13017
13025
|
}, items));
|
|
13018
13026
|
}
|
|
13019
13027
|
}]);
|
|
@@ -13101,7 +13109,7 @@ var RatingMenuWidget = function RatingMenuWidget(props) {
|
|
|
13101
13109
|
|
|
13102
13110
|
connectRange(RatingMenuWidget);
|
|
13103
13111
|
|
|
13104
|
-
var cx$
|
|
13112
|
+
var cx$8 = createClassNames('RefinementList');
|
|
13105
13113
|
|
|
13106
13114
|
var RefinementList$1 =
|
|
13107
13115
|
/*#__PURE__*/
|
|
@@ -13132,23 +13140,23 @@ function (_Component) {
|
|
|
13132
13140
|
});
|
|
13133
13141
|
|
|
13134
13142
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
13135
|
-
var label = _this.props.isFromSearch ? React__default['default'].createElement(Highlight
|
|
13143
|
+
var label = _this.props.isFromSearch ? React__default['default'].createElement(Highlight, {
|
|
13136
13144
|
attribute: "label",
|
|
13137
13145
|
hit: item
|
|
13138
13146
|
}) : item.label;
|
|
13139
13147
|
return React__default['default'].createElement("label", {
|
|
13140
|
-
className: cx$
|
|
13148
|
+
className: cx$8('label')
|
|
13141
13149
|
}, React__default['default'].createElement("input", {
|
|
13142
|
-
className: cx$
|
|
13150
|
+
className: cx$8('checkbox'),
|
|
13143
13151
|
type: "checkbox",
|
|
13144
13152
|
checked: item.isRefined,
|
|
13145
13153
|
onChange: function onChange() {
|
|
13146
13154
|
return _this.selectItem(item, resetQuery);
|
|
13147
13155
|
}
|
|
13148
13156
|
}), React__default['default'].createElement("span", {
|
|
13149
|
-
className: cx$
|
|
13157
|
+
className: cx$8('labelText')
|
|
13150
13158
|
}, label), ' ', React__default['default'].createElement("span", {
|
|
13151
|
-
className: cx$
|
|
13159
|
+
className: cx$8('count')
|
|
13152
13160
|
}, item.count.toLocaleString()));
|
|
13153
13161
|
});
|
|
13154
13162
|
|
|
@@ -13172,7 +13180,7 @@ function (_Component) {
|
|
|
13172
13180
|
return React__default['default'].createElement(List, {
|
|
13173
13181
|
renderItem: this.renderItem,
|
|
13174
13182
|
selectItem: this.selectItem,
|
|
13175
|
-
cx: cx$
|
|
13183
|
+
cx: cx$8,
|
|
13176
13184
|
translate: translate,
|
|
13177
13185
|
items: items,
|
|
13178
13186
|
showMore: showMore,
|
|
@@ -13284,9 +13292,9 @@ var RefinementListWidget = function RefinementListWidget(props) {
|
|
|
13284
13292
|
return React__default['default'].createElement(PanelWrapper, props, React__default['default'].createElement(RefinementList$2, props));
|
|
13285
13293
|
};
|
|
13286
13294
|
|
|
13287
|
-
var RefinementList
|
|
13295
|
+
var RefinementList = connectRefinementList(RefinementListWidget);
|
|
13288
13296
|
|
|
13289
|
-
var cx$
|
|
13297
|
+
var cx$7 = createClassNames('ScrollTo');
|
|
13290
13298
|
|
|
13291
13299
|
var ScrollTo =
|
|
13292
13300
|
/*#__PURE__*/
|
|
@@ -13319,7 +13327,7 @@ function (_Component) {
|
|
|
13319
13327
|
ref: function ref(_ref) {
|
|
13320
13328
|
return _this.el = _ref;
|
|
13321
13329
|
},
|
|
13322
|
-
className: cx$
|
|
13330
|
+
className: cx$7('')
|
|
13323
13331
|
}, this.props.children);
|
|
13324
13332
|
}
|
|
13325
13333
|
}]);
|
|
@@ -13413,14 +13421,14 @@ connectScrollTo(ScrollTo);
|
|
|
13413
13421
|
* );
|
|
13414
13422
|
*/
|
|
13415
13423
|
|
|
13416
|
-
var SearchBox
|
|
13424
|
+
var SearchBox = connectSearchBox(SearchBox$2);
|
|
13417
13425
|
|
|
13418
|
-
var cx$
|
|
13426
|
+
var cx$6 = createClassNames('Snippet');
|
|
13419
13427
|
|
|
13420
13428
|
var Snippet = function Snippet(props) {
|
|
13421
13429
|
return React__default['default'].createElement(Highlighter, index._extends({}, props, {
|
|
13422
13430
|
highlightProperty: "_snippetResult",
|
|
13423
|
-
cx: cx$
|
|
13431
|
+
cx: cx$6
|
|
13424
13432
|
}));
|
|
13425
13433
|
};
|
|
13426
13434
|
|
|
@@ -13470,7 +13478,7 @@ var Snippet = function Snippet(props) {
|
|
|
13470
13478
|
|
|
13471
13479
|
connectHighlight(Snippet);
|
|
13472
13480
|
|
|
13473
|
-
var cx$
|
|
13481
|
+
var cx$5 = createClassNames('RelevantSort');
|
|
13474
13482
|
|
|
13475
13483
|
var DefaultButtonTextComponent = function DefaultButtonTextComponent(_ref) {
|
|
13476
13484
|
var isRelevantSorted = _ref.isRelevantSorted;
|
|
@@ -13487,13 +13495,13 @@ var RelevantSort = function RelevantSort(_ref2) {
|
|
|
13487
13495
|
TextComponent = _ref2.textComponent,
|
|
13488
13496
|
refine = _ref2.refine;
|
|
13489
13497
|
return !isVirtualReplica ? null : React__default['default'].createElement("div", {
|
|
13490
|
-
className: index.classnames(cx$
|
|
13498
|
+
className: index.classnames(cx$5(''), className)
|
|
13491
13499
|
}, React__default['default'].createElement("div", {
|
|
13492
|
-
className: cx$
|
|
13500
|
+
className: cx$5('text')
|
|
13493
13501
|
}, TextComponent && React__default['default'].createElement(TextComponent, {
|
|
13494
13502
|
isRelevantSorted: isRelevantSorted
|
|
13495
13503
|
})), React__default['default'].createElement("button", {
|
|
13496
|
-
className: cx$
|
|
13504
|
+
className: cx$5('button'),
|
|
13497
13505
|
onClick: function onClick() {
|
|
13498
13506
|
return refine(isRelevantSorted ? 0 : undefined);
|
|
13499
13507
|
}
|
|
@@ -13513,7 +13521,7 @@ RelevantSort.propTypes = {
|
|
|
13513
13521
|
|
|
13514
13522
|
connectRelevantSort(RelevantSort);
|
|
13515
13523
|
|
|
13516
|
-
var cx$
|
|
13524
|
+
var cx$4 = createClassNames('SortBy');
|
|
13517
13525
|
|
|
13518
13526
|
var SortBy =
|
|
13519
13527
|
/*#__PURE__*/
|
|
@@ -13535,9 +13543,9 @@ function (_Component) {
|
|
|
13535
13543
|
refine = _this$props.refine,
|
|
13536
13544
|
className = _this$props.className;
|
|
13537
13545
|
return React__default['default'].createElement("div", {
|
|
13538
|
-
className: index.classnames(cx$
|
|
13546
|
+
className: index.classnames(cx$4(''), className)
|
|
13539
13547
|
}, React__default['default'].createElement(Select, {
|
|
13540
|
-
cx: cx$
|
|
13548
|
+
cx: cx$4,
|
|
13541
13549
|
items: items,
|
|
13542
13550
|
selectedItem: currentRefinement,
|
|
13543
13551
|
onSelect: refine
|
|
@@ -13603,7 +13611,7 @@ _defineProperty(SortBy, "defaultProps", {
|
|
|
13603
13611
|
|
|
13604
13612
|
connectSortBy(SortBy);
|
|
13605
13613
|
|
|
13606
|
-
var cx$
|
|
13614
|
+
var cx$3 = createClassNames('Stats');
|
|
13607
13615
|
|
|
13608
13616
|
var Stats = function Stats(_ref) {
|
|
13609
13617
|
var _ref$className = _ref.className,
|
|
@@ -13614,9 +13622,9 @@ var Stats = function Stats(_ref) {
|
|
|
13614
13622
|
processingTimeMS = _ref.processingTimeMS,
|
|
13615
13623
|
translate = _ref.translate;
|
|
13616
13624
|
return React__default['default'].createElement("div", {
|
|
13617
|
-
className: index.classnames(cx$
|
|
13625
|
+
className: index.classnames(cx$3(''), className)
|
|
13618
13626
|
}, React__default['default'].createElement("span", {
|
|
13619
|
-
className: cx$
|
|
13627
|
+
className: cx$3('text')
|
|
13620
13628
|
}, translate('stats', nbHits, processingTimeMS, nbSortedHits, areHitsSorted)));
|
|
13621
13629
|
};
|
|
13622
13630
|
|
|
@@ -13664,7 +13672,7 @@ var Stats$1 = translatable({
|
|
|
13664
13672
|
|
|
13665
13673
|
connectStats(Stats$1);
|
|
13666
13674
|
|
|
13667
|
-
var cx$
|
|
13675
|
+
var cx$2 = createClassNames('ToggleRefinement');
|
|
13668
13676
|
|
|
13669
13677
|
var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
13670
13678
|
var currentRefinement = _ref.currentRefinement,
|
|
@@ -13673,18 +13681,18 @@ var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
|
13673
13681
|
refine = _ref.refine,
|
|
13674
13682
|
className = _ref.className;
|
|
13675
13683
|
return React__default['default'].createElement("div", {
|
|
13676
|
-
className: index.classnames(cx$
|
|
13684
|
+
className: index.classnames(cx$2('', !canRefine && '-noRefinement'), className)
|
|
13677
13685
|
}, React__default['default'].createElement("label", {
|
|
13678
|
-
className: cx$
|
|
13686
|
+
className: cx$2('label')
|
|
13679
13687
|
}, React__default['default'].createElement("input", {
|
|
13680
|
-
className: cx$
|
|
13688
|
+
className: cx$2('checkbox'),
|
|
13681
13689
|
type: "checkbox",
|
|
13682
13690
|
checked: currentRefinement,
|
|
13683
13691
|
onChange: function onChange(event) {
|
|
13684
13692
|
return refine(event.target.checked);
|
|
13685
13693
|
}
|
|
13686
13694
|
}), React__default['default'].createElement("span", {
|
|
13687
|
-
className: cx$
|
|
13695
|
+
className: cx$2('labelText')
|
|
13688
13696
|
}, label)));
|
|
13689
13697
|
};
|
|
13690
13698
|
|
|
@@ -13893,7 +13901,7 @@ function createVoiceSearchHelper(_ref) {
|
|
|
13893
13901
|
};
|
|
13894
13902
|
}
|
|
13895
13903
|
|
|
13896
|
-
var cx$
|
|
13904
|
+
var cx$1 = createClassNames('VoiceSearch');
|
|
13897
13905
|
|
|
13898
13906
|
var ButtonSvg = function ButtonSvg(_ref) {
|
|
13899
13907
|
var children = _ref.children;
|
|
@@ -14039,15 +14047,15 @@ function (_Component) {
|
|
|
14039
14047
|
isBrowserSupported: isBrowserSupported()
|
|
14040
14048
|
};
|
|
14041
14049
|
return React__default['default'].createElement("div", {
|
|
14042
|
-
className: cx$
|
|
14050
|
+
className: cx$1('')
|
|
14043
14051
|
}, React__default['default'].createElement("button", {
|
|
14044
|
-
className: cx$
|
|
14052
|
+
className: cx$1('button'),
|
|
14045
14053
|
type: "button",
|
|
14046
14054
|
title: isBrowserSupported() ? translate('buttonTitle') : translate('disabledButtonTitle'),
|
|
14047
14055
|
onClick: this.onClick,
|
|
14048
14056
|
disabled: !isBrowserSupported()
|
|
14049
14057
|
}, React__default['default'].createElement(ButtonTextComponent, innerProps)), React__default['default'].createElement("div", {
|
|
14050
|
-
className: cx$
|
|
14058
|
+
className: cx$1('status')
|
|
14051
14059
|
}, React__default['default'].createElement(StatusComponent, innerProps)));
|
|
14052
14060
|
}
|
|
14053
14061
|
}, {
|
|
@@ -14075,14 +14083,14 @@ var VoiceSearch$1 = translatable({
|
|
|
14075
14083
|
|
|
14076
14084
|
connectVoiceSearch(VoiceSearch$1);
|
|
14077
14085
|
|
|
14078
|
-
var cx
|
|
14086
|
+
var cx = createClassNames('QueryRuleCustomData');
|
|
14079
14087
|
|
|
14080
14088
|
var QueryRuleCustomData = function QueryRuleCustomData(_ref) {
|
|
14081
14089
|
var items = _ref.items,
|
|
14082
14090
|
className = _ref.className,
|
|
14083
14091
|
children = _ref.children;
|
|
14084
14092
|
return React__default['default'].createElement("div", {
|
|
14085
|
-
className: index.classnames(cx
|
|
14093
|
+
className: index.classnames(cx(''), className)
|
|
14086
14094
|
}, children({
|
|
14087
14095
|
items: items
|
|
14088
14096
|
}));
|
|
@@ -14135,7 +14143,7 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14135
14143
|
index$1.LazyLoad,
|
|
14136
14144
|
{ once: true },
|
|
14137
14145
|
React__default['default'].createElement('img', {
|
|
14138
|
-
src: hit.thumbnail && hit.thumbnail.asset ? urlFor({ client: client, source: hit.thumbnail }) : hit.thumbnail && _typeof$
|
|
14146
|
+
src: hit.thumbnail && hit.thumbnail.asset ? urlFor({ client: client, source: hit.thumbnail }) : hit.thumbnail && _typeof$2._typeof(hit.thumbnail === 'string') ? hit.thumbnail : this.props.defaultImage
|
|
14139
14147
|
})
|
|
14140
14148
|
)
|
|
14141
14149
|
)
|
|
@@ -14197,7 +14205,7 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14197
14205
|
onSearchParameters: this.props.onSearchParameters
|
|
14198
14206
|
}, this.props),
|
|
14199
14207
|
React__default['default'].createElement(Configure, { hitsPerPage: this.props.hitsPerPage || 20 }),
|
|
14200
|
-
React__default['default'].createElement(SearchBox
|
|
14208
|
+
React__default['default'].createElement(SearchBox, null),
|
|
14201
14209
|
this.props.refinementAttributes && React__default['default'].createElement(
|
|
14202
14210
|
'div',
|
|
14203
14211
|
{ className: 'search_refinement' },
|
|
@@ -14205,18 +14213,18 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14205
14213
|
return React__default['default'].createElement(
|
|
14206
14214
|
reactBootstrap.DropdownButton,
|
|
14207
14215
|
{ title: item.title },
|
|
14208
|
-
React__default['default'].createElement(RefinementList
|
|
14216
|
+
React__default['default'].createElement(RefinementList, { showMore: item.showMore, limit: item.limit, showMoreLimit: item.showMoreLimit, attribute: item.attribute })
|
|
14209
14217
|
);
|
|
14210
14218
|
})
|
|
14211
14219
|
),
|
|
14212
14220
|
React__default['default'].createElement(
|
|
14213
14221
|
'div',
|
|
14214
14222
|
{ className: 'AlgoliaResults' },
|
|
14215
|
-
React__default['default'].createElement(Hits
|
|
14223
|
+
React__default['default'].createElement(Hits, { hitComponent: function hitComponent(hit) {
|
|
14216
14224
|
return _this2.Deck(_extends._extends({}, hit, { propsObj: propsObj }));
|
|
14217
14225
|
} })
|
|
14218
14226
|
),
|
|
14219
|
-
React__default['default'].createElement(Pagination
|
|
14227
|
+
React__default['default'].createElement(Pagination, null)
|
|
14220
14228
|
),
|
|
14221
14229
|
React__default['default'].createElement(
|
|
14222
14230
|
'style',
|