@mjhls/mjh-framework 1.0.869 → 1.0.871
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/AD.js +9 -10
- package/dist/cjs/AD300x250.js +27 -28
- package/dist/cjs/AD300x250x600.js +27 -28
- package/dist/cjs/AD728x90.js +30 -31
- package/dist/cjs/ADFloatingFooter.js +30 -31
- package/dist/cjs/ADFooter.js +12 -13
- package/dist/cjs/ADGutter.js +30 -31
- package/dist/cjs/{ADInfeed-b9e5ff3f.js → ADInfeed-326c6278.js} +13 -15
- package/dist/cjs/ADSkyscraper.js +30 -31
- package/dist/cjs/ADSponsoredResources.js +30 -31
- package/dist/cjs/ADWebcast.js +30 -31
- package/dist/cjs/ADWelcome.js +31 -32
- package/dist/cjs/{ADlgInfeed-3cdefebd.js → ADlgInfeed-a14f79ce.js} +10 -11
- package/dist/cjs/AccordionPanel.js +27 -29
- package/dist/cjs/AdSlot.js +31 -32
- package/dist/cjs/AdSlotsProvider.js +15 -17
- package/dist/cjs/AlgoliaSearch.js +1042 -1033
- package/dist/cjs/AlphabeticList.js +23 -24
- package/dist/cjs/ArticleCarousel.js +19 -20
- package/dist/cjs/ArticleProgramLandingPage.js +57 -58
- package/dist/cjs/ArticleSeriesLandingPage.js +38 -39
- package/dist/cjs/ArticleSeriesListing.js +59 -60
- package/dist/cjs/Auth.js +283 -287
- package/dist/cjs/AuthWrapper.js +44 -45
- package/dist/cjs/{AuthorComponent-39b37d84.js → AuthorComponent-421d5ec1.js} +13 -14
- package/dist/cjs/Beam.js +6 -6
- package/dist/cjs/{BlockContent-36e54d77.js → BlockContent-bac780ac.js} +55 -56
- package/dist/cjs/Breadcrumbs.js +25 -27
- package/dist/cjs/CMEDeck.js +81 -81
- package/dist/cjs/Column1.js +11 -14
- package/dist/cjs/Column2.js +31 -34
- package/dist/cjs/Column3.js +56 -59
- package/dist/cjs/ConferenceArticleCard.js +25 -26
- package/dist/cjs/ConferenceBanner-4a16fddc.js +23 -0
- package/dist/cjs/DeckContent.js +92 -96
- package/dist/cjs/DeckQueue.js +86 -90
- package/dist/cjs/{Dfp-9be904d5.js → Dfp-57cecb43.js} +32 -33
- package/dist/cjs/EventsDeck.js +133 -140
- package/dist/cjs/ExternalResources.js +78 -79
- package/dist/cjs/Feature.js +26 -28
- package/dist/cjs/ForbesHero.js +40 -41
- package/dist/cjs/GridContent.js +231 -236
- package/dist/cjs/GridHero.js +42 -43
- package/dist/cjs/GroupDeck.js +57 -58
- package/dist/cjs/HamMagazine.js +126 -131
- package/dist/cjs/Header.js +12 -14
- package/dist/cjs/Hero.js +15 -16
- package/dist/cjs/HighlightenVideo.js +17 -18
- package/dist/cjs/HorizontalArticleListing.js +71 -72
- package/dist/cjs/HorizontalHero.js +27 -28
- package/dist/cjs/IssueContentDeck.js +71 -76
- package/dist/cjs/IssueDeck.js +70 -75
- package/dist/cjs/IssueLanding.js +64 -65
- package/dist/cjs/LeftNav.js +37 -39
- package/dist/cjs/MasterDeck.js +70 -71
- package/dist/cjs/MediaSeriesLanding.js +986 -978
- package/dist/cjs/NavDvm.js +72 -77
- package/dist/cjs/{NavFooter-3dcd99a8.js → NavFooter-76c913e3.js} +14 -15
- package/dist/cjs/NavMagazine.js +133 -138
- package/dist/cjs/NavNative.js +126 -134
- package/dist/cjs/OncliveHero.js +21 -22
- package/dist/cjs/OncliveLargeHero.js +70 -71
- package/dist/cjs/PageFilter.js +12 -13
- package/dist/cjs/PartnerDetailListing.js +112 -113
- package/dist/cjs/PdfDownload.js +8 -9
- package/dist/cjs/PopUpModal.js +17 -19
- package/dist/cjs/PubSection.js +40 -41
- package/dist/cjs/PubToc.js +13 -14
- package/dist/cjs/PublicationDeck.js +65 -70
- package/dist/cjs/PublicationLanding.js +106 -110
- package/dist/cjs/QueueDeckExpanded.js +310 -310
- package/dist/cjs/RecentNews.js +21 -22
- package/dist/cjs/RelatedContent.js +29 -30
- package/dist/cjs/RelatedTopicsDropdown.js +19 -22
- package/dist/cjs/RolesDeck.js +27 -32
- package/dist/cjs/Search.js +16 -20
- package/dist/cjs/Segment.js +4 -4
- package/dist/cjs/SeriesListingDeck.js +34 -34
- package/dist/cjs/{SeriesSlider-ce3261cb.js → SeriesSlider-372e418f.js} +30 -31
- package/dist/cjs/SetCookie.js +1 -1
- package/dist/cjs/SideFooter.js +34 -35
- package/dist/cjs/SocialIcons.js +9 -10
- package/dist/cjs/{SocialSearchComponent-a4ae7b88.js → SocialSearchComponent-8ac52b2d.js} +32 -36
- package/dist/cjs/SocialShare.js +29 -31
- package/dist/cjs/TaxonomyCard.js +61 -66
- package/dist/cjs/TaxonomyDescription.js +53 -54
- package/dist/cjs/TemplateNormal.js +71 -72
- package/dist/cjs/ThumbnailCard.js +24 -26
- package/dist/cjs/Ustream.js +26 -27
- package/dist/cjs/VerticalHero.js +19 -20
- package/dist/cjs/VideoProgramLandingPage.js +72 -76
- package/dist/cjs/VideoSeriesCard.js +32 -33
- package/dist/cjs/VideoSeriesFilter.js +16 -16
- package/dist/cjs/VideoSeriesLandingPage.js +48 -49
- package/dist/cjs/VideoSeriesListing.js +76 -77
- package/dist/cjs/View.js +249 -252
- package/dist/cjs/YahooHero.js +39 -40
- package/dist/cjs/YoutubeGroup.js +74 -56
- package/dist/cjs/{_is-array-54228b29.js → _is-array-bd978497.js} +6 -6
- package/dist/cjs/{_iter-detect-b1df62f0.js → _iter-detect-ee3d4802.js} +7 -7
- package/dist/cjs/{_object-pie-083f2dd6.js → _object-pie-68c5bcbc.js} +4 -4
- package/dist/cjs/{_object-sap-d1978572.js → _object-sap-fee50a62.js} +1 -1
- package/dist/cjs/{_object-to-array-ce86cae7.js → _object-to-array-18379aba.js} +2 -2
- package/dist/cjs/{asyncToGenerator-77821af0.js → asyncToGenerator-15014394.js} +30 -30
- package/dist/cjs/{brightcove-react-player-loader.es-a195642e.js → brightcove-react-player-loader.es-05029198.js} +6 -7
- package/dist/cjs/{core.get-iterator-method-5643aa10.js → core.get-iterator-method-5cb3af28.js} +33 -33
- package/dist/cjs/{debounce-d4a2369b.js → debounce-6191c8ee.js} +2 -2
- package/dist/cjs/{define-property-e8404b64.js → define-property-530a5e9e.js} +6 -6
- package/dist/cjs/{defineProperty-9673846a.js → defineProperty-5ca424cd.js} +1 -1
- package/dist/cjs/{entities-3f9d0f2f.js → entities-310b46ee.js} +1 -1
- package/dist/cjs/{eq-5fc26c07.js → eq-bb2843ed.js} +1 -1
- package/dist/cjs/{extends-7c86182f.js → extends-1d905ddb.js} +7 -7
- package/dist/cjs/faundadb.js +5 -5
- package/dist/cjs/{get-5839e5b5.js → get-adbb11e3.js} +21 -21
- package/dist/cjs/getRelatedArticle.js +18 -18
- package/dist/cjs/getRootDocGroup.js +4 -4
- package/dist/cjs/getSerializers.js +43 -43
- package/dist/cjs/{getTargeting-9d509319.js → getTargeting-9d63325d.js} +2 -2
- package/dist/cjs/getTargeting.js +6 -6
- package/dist/cjs/iconBase-68959171.js +3 -0
- package/dist/cjs/{index-8041a4eb.js → index-53e27416.js} +16 -10
- package/dist/cjs/{index-f86bb269.js → index-79eed652.js} +6 -6
- package/dist/cjs/{index-eadd5035.js → index-96b3db50.js} +15 -17
- package/dist/cjs/{index-fc2f1ca2.js → index-98e01cb9.js} +12 -13
- package/dist/cjs/{index-a13a767d.js → index-bbf836af.js} +571 -581
- package/dist/cjs/{index-efca863c.js → index-ff69979f.js} +8 -8
- package/dist/cjs/{index.es-f3e47207.js → index.es-e9d84959.js} +7 -8
- package/dist/cjs/{index.esm-8123cf40.js → index.esm-bf016399.js} +17 -18
- package/dist/cjs/index.js +164 -167
- package/dist/cjs/{inherits-de66ea16.js → inherits-1dcf1280.js} +21 -21
- package/dist/cjs/{isSymbol-03abbdf0.js → isSymbol-04666465.js} +15 -15
- package/dist/cjs/{keys-e982b3fa.js → keys-91f31941.js} +6 -6
- package/dist/cjs/{lodash-f0783643.js → lodash-b5e0d5f6.js} +1 -1
- package/dist/cjs/{main-025fdc78.js → main-bc7d4bf8.js} +72 -73
- package/dist/cjs/{moment-aca40de1.js → moment-ca3bd9fb.js} +1 -1
- package/dist/cjs/{react-social-icons-af932527.js → react-social-icons-f7f48f71.js} +27 -28
- package/dist/cjs/{slicedToArray-067dd3bc.js → slicedToArray-0a78cdf3.js} +12 -12
- package/dist/cjs/{smoothscroll-99df7f93.js → smoothscroll-5054361f.js} +1 -1
- package/dist/cjs/{stringify-f7a37a8d.js → stringify-13405ce2.js} +5 -5
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-d7797c2b.js → toConsumableArray-39fd0757.js} +7 -7
- package/dist/cjs/{toNumber-5e1fac58.js → toNumber-f2f8744b.js} +1 -1
- package/dist/cjs/{typeof-567e31ff.js → typeof-3dd6d3df.js} +35 -35
- package/dist/cjs/urlFor.js +6 -6
- package/dist/cjs/{ustream-api-3819e4aa.js → ustream-api-5619c1fa.js} +4 -4
- package/dist/cjs/{util-6f784d85.js → util-f2c1b65b.js} +1 -1
- package/dist/cjs/{visibility-sensor-eb2c5b69.js → visibility-sensor-ad5e3116.js} +5 -7
- package/dist/cjs/{web.dom.iterable-d98303e0.js → web.dom.iterable-a9359910.js} +2 -2
- package/dist/esm/AD.js +7 -7
- package/dist/esm/AD300x250.js +24 -24
- package/dist/esm/AD300x250x600.js +24 -24
- package/dist/esm/AD728x90.js +27 -27
- package/dist/esm/ADFloatingFooter.js +27 -27
- package/dist/esm/ADFooter.js +9 -9
- package/dist/esm/ADGutter.js +27 -27
- package/dist/esm/{ADInfeed-6c6093ae.js → ADInfeed-dbdb0513.js} +11 -11
- package/dist/esm/ADSkyscraper.js +27 -27
- package/dist/esm/ADSponsoredResources.js +27 -27
- package/dist/esm/ADWebcast.js +27 -27
- package/dist/esm/ADWelcome.js +28 -28
- package/dist/esm/{ADlgInfeed-5d7386e8.js → ADlgInfeed-f1c2c5cd.js} +8 -8
- package/dist/esm/AccordionPanel.js +22 -22
- package/dist/esm/AdSlot.js +23 -23
- package/dist/esm/AdSlotsProvider.js +10 -10
- package/dist/esm/AlgoliaSearch.js +691 -681
- package/dist/esm/AlphabeticList.js +20 -20
- package/dist/esm/ArticleCarousel.js +16 -16
- package/dist/esm/ArticleProgramLandingPage.js +54 -54
- package/dist/esm/ArticleSeriesLandingPage.js +35 -35
- package/dist/esm/ArticleSeriesListing.js +55 -55
- package/dist/esm/Auth.js +268 -268
- package/dist/esm/AuthWrapper.js +42 -42
- package/dist/esm/{AuthorComponent-46a745ba.js → AuthorComponent-2277b67c.js} +11 -11
- package/dist/esm/Beam.js +6 -6
- package/dist/esm/{BlockContent-52cf21c5.js → BlockContent-ea93e8f7.js} +35 -35
- package/dist/esm/Breadcrumbs.js +15 -15
- package/dist/esm/CMEDeck.js +77 -77
- package/dist/esm/Column1.js +9 -9
- package/dist/esm/Column2.js +28 -28
- package/dist/esm/Column3.js +53 -53
- package/dist/esm/ConferenceArticleCard.js +23 -23
- package/dist/esm/{ConferenceBanner-9162d0ca.js → ConferenceBanner-8792ebd2.js} +4 -4
- package/dist/esm/DeckContent.js +87 -87
- package/dist/esm/DeckQueue.js +81 -81
- package/dist/esm/{Dfp-4ca12f2e.js → Dfp-d6a5629f.js} +20 -20
- package/dist/esm/EventsDeck.js +110 -110
- package/dist/esm/ExternalResources.js +72 -72
- package/dist/esm/Feature.js +20 -20
- package/dist/esm/ForbesHero.js +33 -33
- package/dist/esm/GridContent.js +196 -196
- package/dist/esm/GridHero.js +35 -35
- package/dist/esm/GroupDeck.js +45 -45
- package/dist/esm/HamMagazine.js +101 -101
- package/dist/esm/Header.js +8 -8
- package/dist/esm/Hero.js +13 -13
- package/dist/esm/HighlightenVideo.js +14 -14
- package/dist/esm/HorizontalArticleListing.js +68 -68
- package/dist/esm/HorizontalHero.js +25 -25
- package/dist/esm/IssueContentDeck.js +59 -59
- package/dist/esm/IssueDeck.js +63 -63
- package/dist/esm/IssueLanding.js +61 -61
- package/dist/esm/LeftNav.js +33 -33
- package/dist/esm/MasterDeck.js +67 -67
- package/dist/esm/MediaSeriesLanding.js +627 -616
- package/dist/esm/NavDvm.js +57 -57
- package/dist/esm/{NavFooter-c29526b7.js → NavFooter-e27bd93b.js} +12 -12
- package/dist/esm/NavMagazine.js +111 -111
- package/dist/esm/NavNative.js +103 -103
- package/dist/esm/OncliveHero.js +19 -19
- package/dist/esm/OncliveLargeHero.js +58 -58
- package/dist/esm/PageFilter.js +10 -10
- package/dist/esm/PartnerDetailListing.js +109 -109
- package/dist/esm/PdfDownload.js +6 -6
- package/dist/esm/PopUpModal.js +12 -12
- package/dist/esm/PubSection.js +37 -37
- package/dist/esm/PubToc.js +10 -10
- package/dist/esm/PublicationDeck.js +56 -56
- package/dist/esm/PublicationLanding.js +93 -93
- package/dist/esm/QueueDeckExpanded.js +273 -273
- package/dist/esm/RecentNews.js +19 -19
- package/dist/esm/RelatedContent.js +23 -23
- package/dist/esm/RelatedTopicsDropdown.js +11 -11
- package/dist/esm/RolesDeck.js +25 -25
- package/dist/esm/Search.js +11 -11
- package/dist/esm/Segment.js +4 -4
- package/dist/esm/SeriesListingDeck.js +30 -30
- package/dist/esm/{SeriesSlider-485f514e.js → SeriesSlider-ae692d40.js} +22 -22
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +30 -30
- package/dist/esm/SocialIcons.js +7 -7
- package/dist/esm/{SocialSearchComponent-41b6b480.js → SocialSearchComponent-8725e61b.js} +26 -26
- package/dist/esm/SocialShare.js +25 -25
- package/dist/esm/TaxonomyCard.js +56 -56
- package/dist/esm/TaxonomyDescription.js +48 -48
- package/dist/esm/TemplateNormal.js +67 -67
- package/dist/esm/ThumbnailCard.js +17 -17
- package/dist/esm/Ustream.js +23 -23
- package/dist/esm/VerticalHero.js +17 -17
- package/dist/esm/VideoProgramLandingPage.js +65 -65
- package/dist/esm/VideoSeriesCard.js +25 -25
- package/dist/esm/VideoSeriesFilter.js +13 -13
- package/dist/esm/VideoSeriesLandingPage.js +40 -40
- package/dist/esm/VideoSeriesListing.js +72 -72
- package/dist/esm/View.js +241 -240
- package/dist/esm/YahooHero.js +33 -33
- package/dist/esm/YoutubeGroup.js +59 -40
- package/dist/esm/{_is-array-893ab020.js → _is-array-8914b83f.js} +6 -6
- package/dist/esm/{_iter-detect-f089461c.js → _iter-detect-13e31915.js} +7 -7
- package/dist/esm/{_object-pie-133f504a.js → _object-pie-33c40e79.js} +4 -4
- package/dist/esm/{_object-sap-169d6272.js → _object-sap-fc9da7e8.js} +1 -1
- package/dist/esm/{_object-to-array-50a6b9a3.js → _object-to-array-ee8f6d98.js} +2 -2
- package/dist/esm/{asyncToGenerator-b4dfe691.js → asyncToGenerator-40371743.js} +30 -30
- package/dist/esm/{brightcove-react-player-loader.es-b43c695a.js → brightcove-react-player-loader.es-e761d404.js} +3 -3
- package/dist/esm/{core.get-iterator-method-e903ff31.js → core.get-iterator-method-0fb60d94.js} +34 -34
- package/dist/esm/{debounce-533d9748.js → debounce-89969f66.js} +2 -2
- package/dist/esm/{define-property-99e66838.js → define-property-73034847.js} +6 -6
- package/dist/esm/{defineProperty-8fa0bc8d.js → defineProperty-e66a2c7c.js} +1 -1
- package/dist/esm/{entities-932b50cf.js → entities-7cc3bf45.js} +1 -1
- package/dist/esm/{eq-bdcbf886.js → eq-b470f743.js} +1 -1
- package/dist/esm/{extends-dc6a71fd.js → extends-9a61581c.js} +7 -7
- package/dist/esm/faundadb.js +5 -5
- package/dist/esm/{get-3c308da4.js → get-1e515072.js} +21 -21
- package/dist/esm/getRelatedArticle.js +12 -12
- package/dist/esm/getRootDocGroup.js +4 -4
- package/dist/esm/getSerializers.js +43 -43
- package/dist/esm/{getTargeting-ff2c9409.js → getTargeting-e6820763.js} +2 -2
- package/dist/esm/getTargeting.js +6 -6
- package/dist/esm/{index-2446af28.js → index-41a678ea.js} +6 -6
- package/dist/esm/{index-79cfd25c.js → index-511bdaa5.js} +6 -6
- package/dist/esm/{index-35bdcc81.js → index-5f7e79e7.js} +10 -10
- package/dist/esm/{index-67e1773f.js → index-637e8f49.js} +16 -10
- package/dist/esm/{index-bd9ce1da.js → index-bac4334f.js} +528 -528
- package/dist/esm/{index-0dbff1d1.js → index-f7fdcc91.js} +8 -8
- package/dist/esm/{index.es-c6222053.js → index.es-a6137319.js} +5 -5
- package/dist/esm/{index.esm-8016b507.js → index.esm-ed50151c.js} +15 -15
- package/dist/esm/index.js +137 -137
- package/dist/esm/{inherits-8a801a18.js → inherits-eeaf6740.js} +18 -18
- package/dist/esm/{isSymbol-a7e9aafe.js → isSymbol-1981418f.js} +15 -15
- package/dist/esm/{keys-425c8ab0.js → keys-a5ffafe7.js} +6 -6
- package/dist/esm/{lodash-f97fd99a.js → lodash-a818d390.js} +1 -1
- package/dist/esm/{main-b5c5aac1.js → main-ae902629.js} +72 -72
- package/dist/esm/{moment-bc12cb97.js → moment-b6f49411.js} +1 -1
- package/dist/esm/{react-social-icons-91f9716f.js → react-social-icons-a7d5c5c7.js} +20 -20
- package/dist/esm/{slicedToArray-ca2c8b8d.js → slicedToArray-9c3bb613.js} +12 -12
- package/dist/esm/{smoothscroll-fa4e3f8c.js → smoothscroll-0cd4c7a6.js} +1 -1
- package/dist/esm/stringify-ebc16384.js +15 -0
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/{toConsumableArray-7b1c0e23.js → toConsumableArray-e333293f.js} +7 -7
- package/dist/esm/{toNumber-5aeba6e7.js → toNumber-e3dcad26.js} +1 -1
- package/dist/esm/{typeof-83d9eb10.js → typeof-938ae770.js} +35 -35
- package/dist/esm/urlFor.js +4 -4
- package/dist/esm/{ustream-api-41166338.js → ustream-api-d325d196.js} +4 -4
- package/dist/esm/{util-3ab476bf.js → util-7700fc59.js} +1 -1
- package/dist/esm/{visibility-sensor-f40c2564.js → visibility-sensor-72fd8f8b.js} +2 -2
- package/dist/esm/{web.dom.iterable-fdf034f5.js → web.dom.iterable-6b037ff9.js} +2 -2
- package/package.json +1 -1
- package/dist/cjs/ConferenceBanner-6c9e718a.js +0 -24
- package/dist/esm/stringify-c21932b3.js +0 -15
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var inherits$1 = require('./inherits-de66ea16.js');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var PropTypes = require('prop-types');
|
|
3
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
+
|
|
8
5
|
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
9
|
-
|
|
10
|
-
var events = require('./events-1b438fe7.js');
|
|
11
|
-
var reactBootstrap = require('react-bootstrap');
|
|
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');
|
|
6
|
+
require('./core.get-iterator-method-5cb3af28.js');
|
|
19
7
|
require('./_library-dd23b178.js');
|
|
20
|
-
require('./_object-
|
|
21
|
-
require('./
|
|
22
|
-
require('./
|
|
23
|
-
require('./
|
|
8
|
+
require('./_object-pie-68c5bcbc.js');
|
|
9
|
+
var _extends = require('./extends-1d905ddb.js');
|
|
10
|
+
require('./_object-sap-fee50a62.js');
|
|
11
|
+
var inherits$1 = require('./inherits-1dcf1280.js');
|
|
12
|
+
require('./define-property-530a5e9e.js');
|
|
13
|
+
require('./web.dom.iterable-a9359910.js');
|
|
14
|
+
var _typeof$2 = require('./typeof-3dd6d3df.js');
|
|
15
|
+
require('./_is-array-bd978497.js');
|
|
16
|
+
var React = require('react');
|
|
17
|
+
var React__default = _interopDefault(React);
|
|
18
|
+
var events = require('./events-1b438fe7.js');
|
|
19
|
+
var PropTypes = require('prop-types');
|
|
20
|
+
var PropTypes__default = _interopDefault(PropTypes);
|
|
21
|
+
var moment = require('./moment-ca3bd9fb.js');
|
|
24
22
|
require('react-dom');
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
-
var
|
|
23
|
+
require('./slicedToArray-0a78cdf3.js');
|
|
24
|
+
require('./index-ff69979f.js');
|
|
25
|
+
var urlFor = require('./urlFor.js');
|
|
26
|
+
var index$2 = require('./index-96b3db50.js');
|
|
27
|
+
var reactBootstrap = require('react-bootstrap');
|
|
28
|
+
var index$5 = require('./index-53e27416.js');
|
|
30
29
|
|
|
31
30
|
function _objectWithoutProperties(source, excluded) {
|
|
32
31
|
if (source == null) return {};
|
|
33
|
-
var target = index._objectWithoutPropertiesLoose(source, excluded);
|
|
32
|
+
var target = index$5._objectWithoutPropertiesLoose(source, excluded);
|
|
34
33
|
var key, i;
|
|
35
34
|
|
|
36
35
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -128,7 +127,7 @@ module.exports = _typeof;
|
|
|
128
127
|
module.exports["default"] = module.exports, module.exports.__esModule = true;
|
|
129
128
|
});
|
|
130
129
|
|
|
131
|
-
var _typeof
|
|
130
|
+
var _typeof = _commonjsHelpers.unwrapExports(_typeof_1);
|
|
132
131
|
|
|
133
132
|
function _assertThisInitialized(self) {
|
|
134
133
|
if (self === void 0) {
|
|
@@ -139,7 +138,7 @@ function _assertThisInitialized(self) {
|
|
|
139
138
|
}
|
|
140
139
|
|
|
141
140
|
function _possibleConstructorReturn(self, call) {
|
|
142
|
-
if (call && (_typeof
|
|
141
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
143
142
|
return call;
|
|
144
143
|
}
|
|
145
144
|
|
|
@@ -165,7 +164,7 @@ function _inherits(subClass, superClass) {
|
|
|
165
164
|
configurable: true
|
|
166
165
|
}
|
|
167
166
|
});
|
|
168
|
-
if (superClass) index._setPrototypeOf(subClass, superClass);
|
|
167
|
+
if (superClass) index$5._setPrototypeOf(subClass, superClass);
|
|
169
168
|
}
|
|
170
169
|
|
|
171
170
|
/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */
|
|
@@ -303,20 +302,20 @@ var reactFastCompare = function isEqual(a, b) {
|
|
|
303
302
|
}
|
|
304
303
|
};
|
|
305
304
|
|
|
306
|
-
function _typeof(obj) {
|
|
305
|
+
function _typeof$1(obj) {
|
|
307
306
|
"@babel/helpers - typeof";
|
|
308
307
|
|
|
309
308
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
310
|
-
_typeof = function _typeof(obj) {
|
|
309
|
+
_typeof$1 = function _typeof(obj) {
|
|
311
310
|
return typeof obj;
|
|
312
311
|
};
|
|
313
312
|
} else {
|
|
314
|
-
_typeof = function _typeof(obj) {
|
|
313
|
+
_typeof$1 = function _typeof(obj) {
|
|
315
314
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
316
315
|
};
|
|
317
316
|
}
|
|
318
317
|
|
|
319
|
-
return _typeof(obj);
|
|
318
|
+
return _typeof$1(obj);
|
|
320
319
|
}
|
|
321
320
|
|
|
322
321
|
// From https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
@@ -352,7 +351,7 @@ var defer = function defer(f) {
|
|
|
352
351
|
};
|
|
353
352
|
|
|
354
353
|
var isPlainObject = function isPlainObject(value) {
|
|
355
|
-
return _typeof(value) === 'object' && value !== null && !Array.isArray(value);
|
|
354
|
+
return _typeof$1(value) === 'object' && value !== null && !Array.isArray(value);
|
|
356
355
|
};
|
|
357
356
|
|
|
358
357
|
var removeEmptyKey = function removeEmptyKey(obj) {
|
|
@@ -363,7 +362,7 @@ var removeEmptyKey = function removeEmptyKey(obj) {
|
|
|
363
362
|
return;
|
|
364
363
|
}
|
|
365
364
|
|
|
366
|
-
if (!objectHasKeys
|
|
365
|
+
if (!objectHasKeys(value)) {
|
|
367
366
|
delete obj[key];
|
|
368
367
|
} else {
|
|
369
368
|
removeEmptyKey(value);
|
|
@@ -399,7 +398,7 @@ function addQueryID(hits, queryID) {
|
|
|
399
398
|
});
|
|
400
399
|
});
|
|
401
400
|
}
|
|
402
|
-
function find
|
|
401
|
+
function find(array, comparator) {
|
|
403
402
|
if (!Array.isArray(array)) {
|
|
404
403
|
return undefined;
|
|
405
404
|
}
|
|
@@ -412,11 +411,11 @@ function find$2(array, comparator) {
|
|
|
412
411
|
|
|
413
412
|
return undefined;
|
|
414
413
|
}
|
|
415
|
-
function objectHasKeys
|
|
414
|
+
function objectHasKeys(object) {
|
|
416
415
|
return object && Object.keys(object).length > 0;
|
|
417
416
|
} // https://github.com/babel/babel/blob/3aaafae053fa75febb3aa45d45b6f00646e30ba4/packages/babel-helpers/src/helpers.js#L604-L620
|
|
418
417
|
|
|
419
|
-
function omit
|
|
418
|
+
function omit(source, excluded) {
|
|
420
419
|
if (source === null || source === undefined) {
|
|
421
420
|
return {};
|
|
422
421
|
}
|
|
@@ -487,9 +486,9 @@ var instantSearchContext = React.createContext({
|
|
|
487
486
|
var InstantSearchConsumer = instantSearchContext.Consumer,
|
|
488
487
|
InstantSearchProvider = instantSearchContext.Provider;
|
|
489
488
|
|
|
490
|
-
var _createContext
|
|
491
|
-
IndexConsumer = _createContext
|
|
492
|
-
IndexProvider = _createContext
|
|
489
|
+
var _createContext = React.createContext(undefined),
|
|
490
|
+
IndexConsumer = _createContext.Consumer,
|
|
491
|
+
IndexProvider = _createContext.Provider;
|
|
493
492
|
|
|
494
493
|
/**
|
|
495
494
|
* Connectors are the HOC used to transform React components
|
|
@@ -702,9 +701,9 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
702
701
|
}, {
|
|
703
702
|
key: "render",
|
|
704
703
|
value: function render() {
|
|
705
|
-
var _this$props = this.props
|
|
706
|
-
_this$props.contextValue
|
|
707
|
-
|
|
704
|
+
var _this$props = this.props,
|
|
705
|
+
contextValue = _this$props.contextValue,
|
|
706
|
+
props = _objectWithoutProperties(_this$props, ["contextValue"]);
|
|
708
707
|
|
|
709
708
|
var providedProps = this.state.providedProps;
|
|
710
709
|
|
|
@@ -719,7 +718,7 @@ function createConnectorWithoutContext(connectorDesc) {
|
|
|
719
718
|
var searchForFacetValuesProps = typeof connectorDesc.searchForFacetValues === 'function' ? {
|
|
720
719
|
searchForItems: this.searchForFacetValues
|
|
721
720
|
} : {};
|
|
722
|
-
return React__default
|
|
721
|
+
return React__default.createElement(Composed, index$5._extends({}, props, providedProps, refineProps, searchForFacetValuesProps));
|
|
723
722
|
}
|
|
724
723
|
}]);
|
|
725
724
|
|
|
@@ -741,9 +740,9 @@ var createConnectorWithContext = function createConnectorWithContext(connectorDe
|
|
|
741
740
|
var Connector = createConnectorWithoutContext(connectorDesc)(Composed);
|
|
742
741
|
|
|
743
742
|
var ConnectorWrapper = function ConnectorWrapper(props) {
|
|
744
|
-
return React__default
|
|
745
|
-
return React__default
|
|
746
|
-
return React__default
|
|
743
|
+
return React__default.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
744
|
+
return React__default.createElement(IndexConsumer, null, function (indexContextValue) {
|
|
745
|
+
return React__default.createElement(Connector, index$5._extends({
|
|
747
746
|
contextValue: contextValue,
|
|
748
747
|
indexContextValue: indexContextValue
|
|
749
748
|
}, props));
|
|
@@ -855,7 +854,7 @@ function parseAlgoliaHit(_ref2) {
|
|
|
855
854
|
});
|
|
856
855
|
}
|
|
857
856
|
|
|
858
|
-
var version
|
|
857
|
+
var version = '6.10.3';
|
|
859
858
|
|
|
860
859
|
var withKeysPropType = function withKeysPropType(keys) {
|
|
861
860
|
return function (props, propName, componentName) {
|
|
@@ -916,7 +915,7 @@ function translatable(defaultTranslations) {
|
|
|
916
915
|
_createClass(Translatable, [{
|
|
917
916
|
key: "render",
|
|
918
917
|
value: function render() {
|
|
919
|
-
return React__default
|
|
918
|
+
return React__default.createElement(Composed, index$5._extends({
|
|
920
919
|
translate: this.translate
|
|
921
920
|
}, this.props));
|
|
922
921
|
}
|
|
@@ -1052,7 +1051,7 @@ function hasRefinements(_ref) {
|
|
|
1052
1051
|
return Object.hasOwnProperty.call(searchState, id);
|
|
1053
1052
|
}
|
|
1054
1053
|
|
|
1055
|
-
function getRefinements
|
|
1054
|
+
function getRefinements(_ref2) {
|
|
1056
1055
|
var multiIndex = _ref2.multiIndex,
|
|
1057
1056
|
indexId = _ref2.indexId,
|
|
1058
1057
|
namespace = _ref2.namespace,
|
|
@@ -1094,7 +1093,7 @@ function getCurrentRefinementValue(props, searchState, context, id, defaultValue
|
|
|
1094
1093
|
var hasRefinementsValue = hasRefinements(args);
|
|
1095
1094
|
|
|
1096
1095
|
if (hasRefinementsValue) {
|
|
1097
|
-
return getRefinements
|
|
1096
|
+
return getRefinements(args);
|
|
1098
1097
|
}
|
|
1099
1098
|
|
|
1100
1099
|
if (props.defaultRefinement) {
|
|
@@ -1135,10 +1134,10 @@ function cleanUpValueWithSingleIndex(_ref3) {
|
|
|
1135
1134
|
attribute = _ref3.attribute;
|
|
1136
1135
|
|
|
1137
1136
|
if (namespace) {
|
|
1138
|
-
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit
|
|
1137
|
+
return _objectSpread({}, searchState, _defineProperty({}, namespace, omit(searchState[namespace], [attribute])));
|
|
1139
1138
|
}
|
|
1140
1139
|
|
|
1141
|
-
return omit
|
|
1140
|
+
return omit(searchState, [id]);
|
|
1142
1141
|
}
|
|
1143
1142
|
|
|
1144
1143
|
function cleanUpValueWithMultiIndex(_ref4) {
|
|
@@ -1151,20 +1150,20 @@ function cleanUpValueWithMultiIndex(_ref4) {
|
|
|
1151
1150
|
|
|
1152
1151
|
if (namespace && indexSearchState) {
|
|
1153
1152
|
return _objectSpread({}, searchState, {
|
|
1154
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit
|
|
1153
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, _objectSpread({}, indexSearchState, _defineProperty({}, namespace, omit(indexSearchState[namespace], [attribute])))))
|
|
1155
1154
|
});
|
|
1156
1155
|
}
|
|
1157
1156
|
|
|
1158
1157
|
if (indexSearchState) {
|
|
1159
1158
|
return _objectSpread({}, searchState, {
|
|
1160
|
-
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit
|
|
1159
|
+
indices: _objectSpread({}, searchState.indices, _defineProperty({}, indexId, omit(indexSearchState, [id])))
|
|
1161
1160
|
});
|
|
1162
1161
|
}
|
|
1163
1162
|
|
|
1164
1163
|
return searchState;
|
|
1165
1164
|
}
|
|
1166
1165
|
|
|
1167
|
-
function getId
|
|
1166
|
+
function getId() {
|
|
1168
1167
|
return 'configure';
|
|
1169
1168
|
}
|
|
1170
1169
|
|
|
@@ -1174,20 +1173,20 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1174
1173
|
return {};
|
|
1175
1174
|
},
|
|
1176
1175
|
getSearchParameters: function getSearchParameters(searchParameters, props) {
|
|
1177
|
-
props.children
|
|
1178
|
-
props.contextValue
|
|
1179
|
-
props.indexContextValue
|
|
1180
|
-
|
|
1176
|
+
var children = props.children,
|
|
1177
|
+
contextValue = props.contextValue,
|
|
1178
|
+
indexContextValue = props.indexContextValue,
|
|
1179
|
+
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1181
1180
|
|
|
1182
1181
|
return searchParameters.setQueryParameters(items);
|
|
1183
1182
|
},
|
|
1184
1183
|
transitionState: function transitionState(props, prevSearchState, nextSearchState) {
|
|
1185
|
-
var id = getId
|
|
1184
|
+
var id = getId();
|
|
1186
1185
|
|
|
1187
|
-
props.children
|
|
1188
|
-
props.contextValue
|
|
1189
|
-
props.indexContextValue
|
|
1190
|
-
|
|
1186
|
+
var children = props.children,
|
|
1187
|
+
contextValue = props.contextValue,
|
|
1188
|
+
indexContextValue = props.indexContextValue,
|
|
1189
|
+
items = _objectWithoutProperties(props, ["children", "contextValue", "indexContextValue"]);
|
|
1191
1190
|
|
|
1192
1191
|
var propKeys = Object.keys(props);
|
|
1193
1192
|
var nonPresentKeys = this._props ? Object.keys(this._props).filter(function (prop) {
|
|
@@ -1195,7 +1194,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1195
1194
|
}) : [];
|
|
1196
1195
|
this._props = props;
|
|
1197
1196
|
|
|
1198
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit
|
|
1197
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), items));
|
|
1199
1198
|
|
|
1200
1199
|
return refineValue(nextSearchState, nextValue, {
|
|
1201
1200
|
ais: props.contextValue,
|
|
@@ -1203,7 +1202,7 @@ var connectConfigure = createConnectorWithContext({
|
|
|
1203
1202
|
});
|
|
1204
1203
|
},
|
|
1205
1204
|
cleanUp: function cleanUp(props, searchState) {
|
|
1206
|
-
var id = getId
|
|
1205
|
+
var id = getId();
|
|
1207
1206
|
var indexId = getIndexId({
|
|
1208
1207
|
ais: props.contextValue,
|
|
1209
1208
|
multiIndexContext: props.indexContextValue
|
|
@@ -1451,13 +1450,13 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
1451
1450
|
return target;
|
|
1452
1451
|
}
|
|
1453
1452
|
|
|
1454
|
-
var omit = _objectWithoutPropertiesLoose;
|
|
1453
|
+
var omit$1 = _objectWithoutPropertiesLoose;
|
|
1455
1454
|
|
|
1456
|
-
function objectHasKeys(obj) {
|
|
1455
|
+
function objectHasKeys$1(obj) {
|
|
1457
1456
|
return obj && Object.keys(obj).length > 0;
|
|
1458
1457
|
}
|
|
1459
1458
|
|
|
1460
|
-
var objectHasKeys_1 = objectHasKeys;
|
|
1459
|
+
var objectHasKeys_1 = objectHasKeys$1;
|
|
1461
1460
|
|
|
1462
1461
|
var isValidUserToken = function isValidUserToken(userToken) {
|
|
1463
1462
|
if (userToken === null) {
|
|
@@ -1565,7 +1564,7 @@ var lib = {
|
|
|
1565
1564
|
}
|
|
1566
1565
|
return {};
|
|
1567
1566
|
} else if (typeof attribute === 'string') {
|
|
1568
|
-
return omit(refinementList, [attribute]);
|
|
1567
|
+
return omit$1(refinementList, [attribute]);
|
|
1569
1568
|
} else if (typeof attribute === 'function') {
|
|
1570
1569
|
var hasChanged = false;
|
|
1571
1570
|
|
|
@@ -1610,7 +1609,7 @@ var lib = {
|
|
|
1610
1609
|
}
|
|
1611
1610
|
};
|
|
1612
1611
|
|
|
1613
|
-
var RefinementList
|
|
1612
|
+
var RefinementList = lib;
|
|
1614
1613
|
|
|
1615
1614
|
/**
|
|
1616
1615
|
* isEqual, but only for numeric refinement values, possible values:
|
|
@@ -1979,22 +1978,22 @@ SearchParameters.prototype = {
|
|
|
1979
1978
|
clearRefinements: function clearRefinements(attribute) {
|
|
1980
1979
|
var patch = {
|
|
1981
1980
|
numericRefinements: this._clearNumericRefinements(attribute),
|
|
1982
|
-
facetsRefinements: RefinementList
|
|
1981
|
+
facetsRefinements: RefinementList.clearRefinement(
|
|
1983
1982
|
this.facetsRefinements,
|
|
1984
1983
|
attribute,
|
|
1985
1984
|
'conjunctiveFacet'
|
|
1986
1985
|
),
|
|
1987
|
-
facetsExcludes: RefinementList
|
|
1986
|
+
facetsExcludes: RefinementList.clearRefinement(
|
|
1988
1987
|
this.facetsExcludes,
|
|
1989
1988
|
attribute,
|
|
1990
1989
|
'exclude'
|
|
1991
1990
|
),
|
|
1992
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
1991
|
+
disjunctiveFacetsRefinements: RefinementList.clearRefinement(
|
|
1993
1992
|
this.disjunctiveFacetsRefinements,
|
|
1994
1993
|
attribute,
|
|
1995
1994
|
'disjunctiveFacet'
|
|
1996
1995
|
),
|
|
1997
|
-
hierarchicalFacetsRefinements: RefinementList
|
|
1996
|
+
hierarchicalFacetsRefinements: RefinementList.clearRefinement(
|
|
1998
1997
|
this.hierarchicalFacetsRefinements,
|
|
1999
1998
|
attribute,
|
|
2000
1999
|
'hierarchicalFacet'
|
|
@@ -2270,7 +2269,7 @@ SearchParameters.prototype = {
|
|
|
2270
2269
|
}
|
|
2271
2270
|
return {};
|
|
2272
2271
|
} else if (typeof attribute === 'string') {
|
|
2273
|
-
return omit(this.numericRefinements, [attribute]);
|
|
2272
|
+
return omit$1(this.numericRefinements, [attribute]);
|
|
2274
2273
|
} else if (typeof attribute === 'function') {
|
|
2275
2274
|
var hasChanged = false;
|
|
2276
2275
|
var numericRefinements = this.numericRefinements;
|
|
@@ -2362,10 +2361,10 @@ SearchParameters.prototype = {
|
|
|
2362
2361
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2363
2362
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2364
2363
|
}
|
|
2365
|
-
if (RefinementList
|
|
2364
|
+
if (RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2366
2365
|
|
|
2367
2366
|
return this.setQueryParameters({
|
|
2368
|
-
facetsRefinements: RefinementList
|
|
2367
|
+
facetsRefinements: RefinementList.addRefinement(this.facetsRefinements, facet, value)
|
|
2369
2368
|
});
|
|
2370
2369
|
},
|
|
2371
2370
|
/**
|
|
@@ -2379,10 +2378,10 @@ SearchParameters.prototype = {
|
|
|
2379
2378
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2380
2379
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2381
2380
|
}
|
|
2382
|
-
if (RefinementList
|
|
2381
|
+
if (RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2383
2382
|
|
|
2384
2383
|
return this.setQueryParameters({
|
|
2385
|
-
facetsExcludes: RefinementList
|
|
2384
|
+
facetsExcludes: RefinementList.addRefinement(this.facetsExcludes, facet, value)
|
|
2386
2385
|
});
|
|
2387
2386
|
},
|
|
2388
2387
|
/**
|
|
@@ -2398,10 +2397,10 @@ SearchParameters.prototype = {
|
|
|
2398
2397
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2399
2398
|
}
|
|
2400
2399
|
|
|
2401
|
-
if (RefinementList
|
|
2400
|
+
if (RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2402
2401
|
|
|
2403
2402
|
return this.setQueryParameters({
|
|
2404
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2403
|
+
disjunctiveFacetsRefinements: RefinementList.addRefinement(
|
|
2405
2404
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2406
2405
|
});
|
|
2407
2406
|
},
|
|
@@ -2486,10 +2485,10 @@ SearchParameters.prototype = {
|
|
|
2486
2485
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2487
2486
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2488
2487
|
}
|
|
2489
|
-
if (!RefinementList
|
|
2488
|
+
if (!RefinementList.isRefined(this.facetsRefinements, facet, value)) return this;
|
|
2490
2489
|
|
|
2491
2490
|
return this.setQueryParameters({
|
|
2492
|
-
facetsRefinements: RefinementList
|
|
2491
|
+
facetsRefinements: RefinementList.removeRefinement(this.facetsRefinements, facet, value)
|
|
2493
2492
|
});
|
|
2494
2493
|
},
|
|
2495
2494
|
/**
|
|
@@ -2503,10 +2502,10 @@ SearchParameters.prototype = {
|
|
|
2503
2502
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2504
2503
|
throw new Error(facet + ' is not defined in the facets attribute of the helper configuration');
|
|
2505
2504
|
}
|
|
2506
|
-
if (!RefinementList
|
|
2505
|
+
if (!RefinementList.isRefined(this.facetsExcludes, facet, value)) return this;
|
|
2507
2506
|
|
|
2508
2507
|
return this.setQueryParameters({
|
|
2509
|
-
facetsExcludes: RefinementList
|
|
2508
|
+
facetsExcludes: RefinementList.removeRefinement(this.facetsExcludes, facet, value)
|
|
2510
2509
|
});
|
|
2511
2510
|
},
|
|
2512
2511
|
/**
|
|
@@ -2521,10 +2520,10 @@ SearchParameters.prototype = {
|
|
|
2521
2520
|
throw new Error(
|
|
2522
2521
|
facet + ' is not defined in the disjunctiveFacets attribute of the helper configuration');
|
|
2523
2522
|
}
|
|
2524
|
-
if (!RefinementList
|
|
2523
|
+
if (!RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value)) return this;
|
|
2525
2524
|
|
|
2526
2525
|
return this.setQueryParameters({
|
|
2527
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2526
|
+
disjunctiveFacetsRefinements: RefinementList.removeRefinement(
|
|
2528
2527
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2529
2528
|
});
|
|
2530
2529
|
},
|
|
@@ -2590,7 +2589,7 @@ SearchParameters.prototype = {
|
|
|
2590
2589
|
}
|
|
2591
2590
|
|
|
2592
2591
|
return this.setQueryParameters({
|
|
2593
|
-
facetsRefinements: RefinementList
|
|
2592
|
+
facetsRefinements: RefinementList.toggleRefinement(this.facetsRefinements, facet, value)
|
|
2594
2593
|
});
|
|
2595
2594
|
},
|
|
2596
2595
|
/**
|
|
@@ -2606,7 +2605,7 @@ SearchParameters.prototype = {
|
|
|
2606
2605
|
}
|
|
2607
2606
|
|
|
2608
2607
|
return this.setQueryParameters({
|
|
2609
|
-
facetsExcludes: RefinementList
|
|
2608
|
+
facetsExcludes: RefinementList.toggleRefinement(this.facetsExcludes, facet, value)
|
|
2610
2609
|
});
|
|
2611
2610
|
},
|
|
2612
2611
|
/**
|
|
@@ -2623,7 +2622,7 @@ SearchParameters.prototype = {
|
|
|
2623
2622
|
}
|
|
2624
2623
|
|
|
2625
2624
|
return this.setQueryParameters({
|
|
2626
|
-
disjunctiveFacetsRefinements: RefinementList
|
|
2625
|
+
disjunctiveFacetsRefinements: RefinementList.toggleRefinement(
|
|
2627
2626
|
this.disjunctiveFacetsRefinements, facet, value)
|
|
2628
2627
|
});
|
|
2629
2628
|
},
|
|
@@ -2762,7 +2761,7 @@ SearchParameters.prototype = {
|
|
|
2762
2761
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2763
2762
|
return false;
|
|
2764
2763
|
}
|
|
2765
|
-
return RefinementList
|
|
2764
|
+
return RefinementList.isRefined(this.facetsRefinements, facet, value);
|
|
2766
2765
|
},
|
|
2767
2766
|
/**
|
|
2768
2767
|
* Returns true if the facet contains exclusions or if a specific value is
|
|
@@ -2778,7 +2777,7 @@ SearchParameters.prototype = {
|
|
|
2778
2777
|
if (!this.isConjunctiveFacet(facet)) {
|
|
2779
2778
|
return false;
|
|
2780
2779
|
}
|
|
2781
|
-
return RefinementList
|
|
2780
|
+
return RefinementList.isRefined(this.facetsExcludes, facet, value);
|
|
2782
2781
|
},
|
|
2783
2782
|
/**
|
|
2784
2783
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2793,7 +2792,7 @@ SearchParameters.prototype = {
|
|
|
2793
2792
|
if (!this.isDisjunctiveFacet(facet)) {
|
|
2794
2793
|
return false;
|
|
2795
2794
|
}
|
|
2796
|
-
return RefinementList
|
|
2795
|
+
return RefinementList.isRefined(this.disjunctiveFacetsRefinements, facet, value);
|
|
2797
2796
|
},
|
|
2798
2797
|
/**
|
|
2799
2798
|
* Returns true if the facet contains a refinement, or if a value passed is a
|
|
@@ -2979,7 +2978,7 @@ SearchParameters.prototype = {
|
|
|
2979
2978
|
var isNextValueDefined = nextWithNumbers[key] !== undefined;
|
|
2980
2979
|
|
|
2981
2980
|
if (isPreviousValueDefined && !isNextValueDefined) {
|
|
2982
|
-
return omit(previous, [key]);
|
|
2981
|
+
return omit$1(previous, [key]);
|
|
2983
2982
|
}
|
|
2984
2983
|
|
|
2985
2984
|
if (isNextValueDefined) {
|
|
@@ -4712,7 +4711,7 @@ var requestBuilder = {
|
|
|
4712
4711
|
|
|
4713
4712
|
var requestBuilder_1 = requestBuilder;
|
|
4714
4713
|
|
|
4715
|
-
var version = '3.4.4';
|
|
4714
|
+
var version$1 = '3.4.4';
|
|
4716
4715
|
|
|
4717
4716
|
/**
|
|
4718
4717
|
* Event triggered when a parameter is set or updated
|
|
@@ -4819,7 +4818,7 @@ var version = '3.4.4';
|
|
|
4819
4818
|
*/
|
|
4820
4819
|
function AlgoliaSearchHelper(client, index, options) {
|
|
4821
4820
|
if (typeof client.addAlgoliaAgent === 'function') {
|
|
4822
|
-
client.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
4821
|
+
client.addAlgoliaAgent('JS Helper (' + version$1 + ')');
|
|
4823
4822
|
}
|
|
4824
4823
|
|
|
4825
4824
|
this.setClient(client);
|
|
@@ -4974,7 +4973,7 @@ AlgoliaSearchHelper.prototype.findAnswers = function(options) {
|
|
|
4974
4973
|
nbHits: options.nbHits
|
|
4975
4974
|
},
|
|
4976
4975
|
{
|
|
4977
|
-
params: omit(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
4976
|
+
params: omit$1(requestBuilder_1._getHitsSearchParams(derivedState), [
|
|
4978
4977
|
'attributesToSnippet',
|
|
4979
4978
|
'hitsPerPage',
|
|
4980
4979
|
'restrictSearchableAttributes',
|
|
@@ -6088,7 +6087,7 @@ AlgoliaSearchHelper.prototype.setClient = function(newClient) {
|
|
|
6088
6087
|
if (this.client === newClient) return this;
|
|
6089
6088
|
|
|
6090
6089
|
if (typeof newClient.addAlgoliaAgent === 'function') {
|
|
6091
|
-
newClient.addAlgoliaAgent('JS Helper (' + version + ')');
|
|
6090
|
+
newClient.addAlgoliaAgent('JS Helper (' + version$1 + ')');
|
|
6092
6091
|
}
|
|
6093
6092
|
this.client = newClient;
|
|
6094
6093
|
|
|
@@ -6207,7 +6206,7 @@ function algoliasearchHelper(client, index, opts) {
|
|
|
6207
6206
|
* @member module:algoliasearchHelper.version
|
|
6208
6207
|
* @type {number}
|
|
6209
6208
|
*/
|
|
6210
|
-
algoliasearchHelper.version = version;
|
|
6209
|
+
algoliasearchHelper.version = version$1;
|
|
6211
6210
|
|
|
6212
6211
|
/**
|
|
6213
6212
|
* Constructor for the Helper.
|
|
@@ -6239,13 +6238,13 @@ function createOptionalFilter(_ref) {
|
|
|
6239
6238
|
return "".concat(attributeName, ":").concat(attributeValue, "<score=").concat(attributeScore || 1, ">");
|
|
6240
6239
|
}
|
|
6241
6240
|
|
|
6242
|
-
var defaultProps
|
|
6241
|
+
var defaultProps = {
|
|
6243
6242
|
transformSearchParameters: function transformSearchParameters(x) {
|
|
6244
6243
|
return _objectSpread({}, x);
|
|
6245
6244
|
}
|
|
6246
6245
|
};
|
|
6247
6246
|
|
|
6248
|
-
function getId$
|
|
6247
|
+
function getId$1() {
|
|
6249
6248
|
// We store the search state of this widget in `configure`.
|
|
6250
6249
|
return 'configure';
|
|
6251
6250
|
}
|
|
@@ -6293,7 +6292,7 @@ function getSearchParametersFromProps(props) {
|
|
|
6293
6292
|
|
|
6294
6293
|
var connectConfigureRelatedItems = createConnectorWithContext({
|
|
6295
6294
|
displayName: 'AlgoliaConfigureRelatedItems',
|
|
6296
|
-
defaultProps: defaultProps
|
|
6295
|
+
defaultProps: defaultProps,
|
|
6297
6296
|
getProvidedProps: function getProvidedProps() {
|
|
6298
6297
|
return {};
|
|
6299
6298
|
},
|
|
@@ -6301,7 +6300,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6301
6300
|
return searchParameters.setQueryParameters(getSearchParametersFromProps(props));
|
|
6302
6301
|
},
|
|
6303
6302
|
transitionState: function transitionState(props, _prevSearchState, nextSearchState) {
|
|
6304
|
-
var id = getId$
|
|
6303
|
+
var id = getId$1(); // We need to transform the exhaustive search parameters back to clean
|
|
6305
6304
|
// search parameters without the empty default keys so we don't pollute the
|
|
6306
6305
|
// `configure` search state.
|
|
6307
6306
|
|
|
@@ -6312,7 +6311,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6312
6311
|
}) : [];
|
|
6313
6312
|
this._searchParameters = searchParameters;
|
|
6314
6313
|
|
|
6315
|
-
var nextValue = _defineProperty({}, id, _objectSpread({}, omit
|
|
6314
|
+
var nextValue = _defineProperty({}, id, _objectSpread({}, omit(nextSearchState[id], nonPresentKeys), searchParameters));
|
|
6316
6315
|
|
|
6317
6316
|
return refineValue(nextSearchState, nextValue, {
|
|
6318
6317
|
ais: props.contextValue,
|
|
@@ -6322,7 +6321,7 @@ var connectConfigureRelatedItems = createConnectorWithContext({
|
|
|
6322
6321
|
cleanUp: function cleanUp(props, searchState) {
|
|
6323
6322
|
var _this = this;
|
|
6324
6323
|
|
|
6325
|
-
var id = getId$
|
|
6324
|
+
var id = getId$1();
|
|
6326
6325
|
var indexId = getIndexId({
|
|
6327
6326
|
ais: props.contextValue,
|
|
6328
6327
|
multiIndexContext: props.indexContextValue
|
|
@@ -6354,9 +6353,9 @@ function ConfigureRelatedItems() {
|
|
|
6354
6353
|
}
|
|
6355
6354
|
|
|
6356
6355
|
ConfigureRelatedItems.propTypes = {
|
|
6357
|
-
hit: PropTypes__default
|
|
6358
|
-
matchingPatterns: PropTypes__default
|
|
6359
|
-
transformSearchParameters: PropTypes__default
|
|
6356
|
+
hit: PropTypes__default.object.isRequired,
|
|
6357
|
+
matchingPatterns: PropTypes__default.object.isRequired,
|
|
6358
|
+
transformSearchParameters: PropTypes__default.func
|
|
6360
6359
|
};
|
|
6361
6360
|
connectConfigureRelatedItems(ConfigureRelatedItems);
|
|
6362
6361
|
|
|
@@ -6395,7 +6394,7 @@ function getWidgetRefinements(attribute, widgetKey, searchState) {
|
|
|
6395
6394
|
}
|
|
6396
6395
|
}
|
|
6397
6396
|
|
|
6398
|
-
function getRefinements(attribute) {
|
|
6397
|
+
function getRefinements$1(attribute) {
|
|
6399
6398
|
var searchState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6400
6399
|
var refinements = Object.keys(searchState).filter(function (widgetKey) {
|
|
6401
6400
|
return searchState[widgetKey] !== undefined && searchState[widgetKey][attribute] !== undefined;
|
|
@@ -6412,7 +6411,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6412
6411
|
var searchState = _ref.searchState,
|
|
6413
6412
|
trackedFilters = _ref.trackedFilters;
|
|
6414
6413
|
var ruleContexts = Object.keys(trackedFilters).reduce(function (facets, facetName) {
|
|
6415
|
-
var facetRefinements = getRefinements(facetName, searchState);
|
|
6414
|
+
var facetRefinements = getRefinements$1(facetName, searchState);
|
|
6416
6415
|
var getTrackedFacetValues = trackedFilters[facetName];
|
|
6417
6416
|
var trackedFacetValues = getTrackedFacetValues(facetRefinements);
|
|
6418
6417
|
return [].concat(_toConsumableArray(facets), _toConsumableArray(facetRefinements.filter(function (facetRefinement) {
|
|
@@ -6424,7 +6423,7 @@ function getRuleContextsFromTrackedFilters(_ref) {
|
|
|
6424
6423
|
return ruleContexts;
|
|
6425
6424
|
}
|
|
6426
6425
|
|
|
6427
|
-
var defaultProps = {
|
|
6426
|
+
var defaultProps$1 = {
|
|
6428
6427
|
transformItems: function transformItems(items) {
|
|
6429
6428
|
return items;
|
|
6430
6429
|
},
|
|
@@ -6435,7 +6434,7 @@ var defaultProps = {
|
|
|
6435
6434
|
};
|
|
6436
6435
|
var connectQueryRules = createConnectorWithContext({
|
|
6437
6436
|
displayName: 'AlgoliaQueryRules',
|
|
6438
|
-
defaultProps: defaultProps,
|
|
6437
|
+
defaultProps: defaultProps$1,
|
|
6439
6438
|
getProvidedProps: function getProvidedProps(props, _1, searchResults) {
|
|
6440
6439
|
var results = getResults(searchResults, {
|
|
6441
6440
|
ais: props.contextValue,
|
|
@@ -6597,7 +6596,7 @@ function (_Component) {
|
|
|
6597
6596
|
return null;
|
|
6598
6597
|
}
|
|
6599
6598
|
|
|
6600
|
-
return React__default
|
|
6599
|
+
return React__default.createElement(IndexProvider, {
|
|
6601
6600
|
value: this.state.indexContext
|
|
6602
6601
|
}, this.props.children);
|
|
6603
6602
|
}
|
|
@@ -6607,15 +6606,25 @@ function (_Component) {
|
|
|
6607
6606
|
}(React.Component);
|
|
6608
6607
|
|
|
6609
6608
|
_defineProperty(Index, "propTypes", {
|
|
6610
|
-
indexName: PropTypes__default
|
|
6611
|
-
indexId: PropTypes__default
|
|
6612
|
-
children: PropTypes__default
|
|
6609
|
+
indexName: PropTypes__default.string.isRequired,
|
|
6610
|
+
indexId: PropTypes__default.string.isRequired,
|
|
6611
|
+
children: PropTypes__default.node
|
|
6613
6612
|
});
|
|
6614
6613
|
|
|
6615
|
-
({
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6614
|
+
var IndexWrapper = function IndexWrapper(props) {
|
|
6615
|
+
var inferredIndexId = props.indexName;
|
|
6616
|
+
return React__default.createElement(InstantSearchConsumer, null, function (contextValue) {
|
|
6617
|
+
return React__default.createElement(Index, index$5._extends({
|
|
6618
|
+
contextValue: contextValue,
|
|
6619
|
+
indexId: inferredIndexId
|
|
6620
|
+
}, props));
|
|
6621
|
+
});
|
|
6622
|
+
};
|
|
6623
|
+
|
|
6624
|
+
IndexWrapper.propTypes = {
|
|
6625
|
+
indexName: PropTypes__default.string.isRequired,
|
|
6626
|
+
indexId: PropTypes__default.string
|
|
6627
|
+
};
|
|
6619
6628
|
|
|
6620
6629
|
function createWidgetsManager(onWidgetsUpdate) {
|
|
6621
6630
|
var widgets = []; // Is an update scheduled?
|
|
@@ -6676,7 +6685,7 @@ function createStore(initialState) {
|
|
|
6676
6685
|
function addAlgoliaAgents(searchClient) {
|
|
6677
6686
|
if (typeof searchClient.addAlgoliaAgent === 'function') {
|
|
6678
6687
|
searchClient.addAlgoliaAgent("react (".concat(React.version, ")"));
|
|
6679
|
-
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version
|
|
6688
|
+
searchClient.addAlgoliaAgent("react-instantsearch (".concat(version, ")"));
|
|
6680
6689
|
}
|
|
6681
6690
|
}
|
|
6682
6691
|
|
|
@@ -6914,8 +6923,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6914
6923
|
nextIsSearchStalled = false;
|
|
6915
6924
|
}
|
|
6916
6925
|
|
|
6917
|
-
currentState.resultsFacetValues
|
|
6918
|
-
|
|
6926
|
+
var resultsFacetValues = currentState.resultsFacetValues,
|
|
6927
|
+
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6919
6928
|
|
|
6920
6929
|
store.setState(_objectSpread({}, partialState, {
|
|
6921
6930
|
results: results,
|
|
@@ -6936,8 +6945,8 @@ function createInstantSearchManager(_ref) {
|
|
|
6936
6945
|
nextIsSearchStalled = false;
|
|
6937
6946
|
}
|
|
6938
6947
|
|
|
6939
|
-
currentState.resultsFacetValues
|
|
6940
|
-
|
|
6948
|
+
var resultsFacetValues = currentState.resultsFacetValues,
|
|
6949
|
+
partialState = _objectWithoutProperties(currentState, ["resultsFacetValues"]);
|
|
6941
6950
|
|
|
6942
6951
|
store.setState(_objectSpread({}, partialState, {
|
|
6943
6952
|
isSearchStalled: nextIsSearchStalled,
|
|
@@ -6949,9 +6958,9 @@ function createInstantSearchManager(_ref) {
|
|
|
6949
6958
|
function handleNewSearch() {
|
|
6950
6959
|
if (!stalledSearchTimer) {
|
|
6951
6960
|
stalledSearchTimer = setTimeout(function () {
|
|
6952
|
-
var _store$getState = store.getState()
|
|
6953
|
-
_store$getState.resultsFacetValues
|
|
6954
|
-
|
|
6961
|
+
var _store$getState = store.getState(),
|
|
6962
|
+
resultsFacetValues = _store$getState.resultsFacetValues,
|
|
6963
|
+
partialState = _objectWithoutProperties(_store$getState, ["resultsFacetValues"]);
|
|
6955
6964
|
|
|
6956
6965
|
store.setState(_objectSpread({}, partialState, {
|
|
6957
6966
|
isSearchStalled: true
|
|
@@ -7416,7 +7425,7 @@ function (_Component) {
|
|
|
7416
7425
|
return null;
|
|
7417
7426
|
}
|
|
7418
7427
|
|
|
7419
|
-
return React__default
|
|
7428
|
+
return React__default.createElement(InstantSearchProvider, {
|
|
7420
7429
|
value: this.state.contextValue
|
|
7421
7430
|
}, this.props.children);
|
|
7422
7431
|
}
|
|
@@ -7432,39 +7441,39 @@ _defineProperty(InstantSearch, "defaultProps", {
|
|
|
7432
7441
|
|
|
7433
7442
|
_defineProperty(InstantSearch, "propTypes", {
|
|
7434
7443
|
// @TODO: These props are currently constant.
|
|
7435
|
-
indexName: PropTypes__default
|
|
7436
|
-
searchClient: PropTypes__default
|
|
7437
|
-
search: PropTypes__default
|
|
7438
|
-
searchForFacetValues: PropTypes__default
|
|
7439
|
-
addAlgoliaAgent: PropTypes__default
|
|
7440
|
-
clearCache: PropTypes__default
|
|
7444
|
+
indexName: PropTypes__default.string.isRequired,
|
|
7445
|
+
searchClient: PropTypes__default.shape({
|
|
7446
|
+
search: PropTypes__default.func.isRequired,
|
|
7447
|
+
searchForFacetValues: PropTypes__default.func,
|
|
7448
|
+
addAlgoliaAgent: PropTypes__default.func,
|
|
7449
|
+
clearCache: PropTypes__default.func
|
|
7441
7450
|
}).isRequired,
|
|
7442
|
-
createURL: PropTypes__default
|
|
7443
|
-
refresh: PropTypes__default
|
|
7444
|
-
searchState: PropTypes__default
|
|
7445
|
-
onSearchStateChange: PropTypes__default
|
|
7446
|
-
onSearchParameters: PropTypes__default
|
|
7447
|
-
widgetsCollector: PropTypes__default
|
|
7448
|
-
resultsState: PropTypes__default
|
|
7449
|
-
children: PropTypes__default
|
|
7450
|
-
stalledSearchDelay: PropTypes__default
|
|
7451
|
+
createURL: PropTypes__default.func,
|
|
7452
|
+
refresh: PropTypes__default.bool,
|
|
7453
|
+
searchState: PropTypes__default.object,
|
|
7454
|
+
onSearchStateChange: PropTypes__default.func,
|
|
7455
|
+
onSearchParameters: PropTypes__default.func,
|
|
7456
|
+
widgetsCollector: PropTypes__default.func,
|
|
7457
|
+
resultsState: PropTypes__default.oneOfType([PropTypes__default.object, PropTypes__default.array]),
|
|
7458
|
+
children: PropTypes__default.node,
|
|
7459
|
+
stalledSearchDelay: PropTypes__default.number
|
|
7451
7460
|
});
|
|
7452
7461
|
|
|
7453
|
-
var getId$
|
|
7462
|
+
var getId$2 = function getId(props) {
|
|
7454
7463
|
return props.attributes[0];
|
|
7455
7464
|
};
|
|
7456
|
-
var namespace
|
|
7465
|
+
var namespace = 'hierarchicalMenu';
|
|
7457
7466
|
|
|
7458
|
-
function _refine
|
|
7459
|
-
var id = getId$
|
|
7467
|
+
function _refine(props, searchState, nextRefinement, context) {
|
|
7468
|
+
var id = getId$2(props);
|
|
7460
7469
|
|
|
7461
7470
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7462
7471
|
|
|
7463
7472
|
var resetPage = true;
|
|
7464
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace
|
|
7473
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
7465
7474
|
}
|
|
7466
7475
|
|
|
7467
|
-
function transformValue
|
|
7476
|
+
function transformValue(values) {
|
|
7468
7477
|
return values.reduce(function (acc, item) {
|
|
7469
7478
|
if (item.isRefined) {
|
|
7470
7479
|
acc.push({
|
|
@@ -7475,7 +7484,7 @@ function transformValue$1(values) {
|
|
|
7475
7484
|
}); // Create a variable in order to keep the same acc for the recursion, otherwise "reduce" returns a new one
|
|
7476
7485
|
|
|
7477
7486
|
if (item.data) {
|
|
7478
|
-
acc = acc.concat(transformValue
|
|
7487
|
+
acc = acc.concat(transformValue(item.data));
|
|
7479
7488
|
}
|
|
7480
7489
|
}
|
|
7481
7490
|
|
|
@@ -7534,10 +7543,10 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7534
7543
|
|
|
7535
7544
|
return undefined;
|
|
7536
7545
|
},
|
|
7537
|
-
transformItems: PropTypes__default
|
|
7546
|
+
transformItems: PropTypes__default.func
|
|
7538
7547
|
},
|
|
7539
7548
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
7540
|
-
var id = getId$
|
|
7549
|
+
var id = getId$2(props);
|
|
7541
7550
|
var results = getResults(searchResults, {
|
|
7542
7551
|
ais: props.contextValue,
|
|
7543
7552
|
multiIndexContext: props.indexContextValue
|
|
@@ -7552,7 +7561,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7552
7561
|
}
|
|
7553
7562
|
|
|
7554
7563
|
var values = results.getFacetValues(id);
|
|
7555
|
-
var items = values.data ? transformValue
|
|
7564
|
+
var items = values.data ? transformValue(values.data) : [];
|
|
7556
7565
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7557
7566
|
return {
|
|
7558
7567
|
canRefine: transformedItems.length > 0,
|
|
@@ -7560,7 +7569,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7560
7569
|
};
|
|
7561
7570
|
},
|
|
7562
7571
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7563
|
-
return _refine
|
|
7572
|
+
return _refine(props, searchState, nextRefinement, {
|
|
7564
7573
|
ais: props.contextValue,
|
|
7565
7574
|
multiIndexContext: props.indexContextValue
|
|
7566
7575
|
});
|
|
@@ -7583,7 +7592,7 @@ var connectBreadcrumb = createConnectorWithContext({
|
|
|
7583
7592
|
var connectCurrentRefinements = createConnectorWithContext({
|
|
7584
7593
|
displayName: 'AlgoliaCurrentRefinements',
|
|
7585
7594
|
propTypes: {
|
|
7586
|
-
transformItems: PropTypes__default
|
|
7595
|
+
transformItems: PropTypes__default.func
|
|
7587
7596
|
},
|
|
7588
7597
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults, metadata) {
|
|
7589
7598
|
var items = metadata.reduce(function (res, meta) {
|
|
@@ -7623,13 +7632,13 @@ var connectCurrentRefinements = createConnectorWithContext({
|
|
|
7623
7632
|
}
|
|
7624
7633
|
});
|
|
7625
7634
|
|
|
7626
|
-
var getId$
|
|
7635
|
+
var getId$3 = function getId(props) {
|
|
7627
7636
|
return props.attributes[0];
|
|
7628
7637
|
};
|
|
7629
|
-
var namespace$
|
|
7638
|
+
var namespace$1 = 'hierarchicalMenu';
|
|
7630
7639
|
|
|
7631
|
-
function getCurrentRefinement
|
|
7632
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
7640
|
+
function getCurrentRefinement(props, searchState, context) {
|
|
7641
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$1, ".").concat(getId$3(props)), null);
|
|
7633
7642
|
|
|
7634
7643
|
if (currentRefinement === '') {
|
|
7635
7644
|
return null;
|
|
@@ -7638,13 +7647,13 @@ function getCurrentRefinement$b(props, searchState, context) {
|
|
|
7638
7647
|
return currentRefinement;
|
|
7639
7648
|
}
|
|
7640
7649
|
|
|
7641
|
-
function getValue
|
|
7650
|
+
function getValue(path, props, searchState, context) {
|
|
7642
7651
|
var id = props.id,
|
|
7643
7652
|
attributes = props.attributes,
|
|
7644
7653
|
separator = props.separator,
|
|
7645
7654
|
rootPath = props.rootPath,
|
|
7646
7655
|
showParentLevel = props.showParentLevel;
|
|
7647
|
-
var currentRefinement = getCurrentRefinement
|
|
7656
|
+
var currentRefinement = getCurrentRefinement(props, searchState, context);
|
|
7648
7657
|
var nextRefinement;
|
|
7649
7658
|
|
|
7650
7659
|
if (currentRefinement === null) {
|
|
@@ -7665,14 +7674,14 @@ function getValue$2(path, props, searchState, context) {
|
|
|
7665
7674
|
return nextRefinement;
|
|
7666
7675
|
}
|
|
7667
7676
|
|
|
7668
|
-
function transformValue(value, props, searchState, context) {
|
|
7677
|
+
function transformValue$1(value, props, searchState, context) {
|
|
7669
7678
|
return value.map(function (v) {
|
|
7670
7679
|
return {
|
|
7671
7680
|
label: v.name,
|
|
7672
|
-
value: getValue
|
|
7681
|
+
value: getValue(v.path, props, searchState, context),
|
|
7673
7682
|
count: v.count,
|
|
7674
7683
|
isRefined: v.isRefined,
|
|
7675
|
-
items: v.data && transformValue(v.data, props, searchState, context)
|
|
7684
|
+
items: v.data && transformValue$1(v.data, props, searchState, context)
|
|
7676
7685
|
};
|
|
7677
7686
|
});
|
|
7678
7687
|
}
|
|
@@ -7688,20 +7697,20 @@ var truncate = function truncate() {
|
|
|
7688
7697
|
});
|
|
7689
7698
|
};
|
|
7690
7699
|
|
|
7691
|
-
function _refine$
|
|
7692
|
-
var id = getId$
|
|
7700
|
+
function _refine$1(props, searchState, nextRefinement, context) {
|
|
7701
|
+
var id = getId$3(props);
|
|
7693
7702
|
|
|
7694
7703
|
var nextValue = _defineProperty({}, id, nextRefinement || '');
|
|
7695
7704
|
|
|
7696
7705
|
var resetPage = true;
|
|
7697
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
7706
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$1);
|
|
7698
7707
|
}
|
|
7699
7708
|
|
|
7700
|
-
function _cleanUp
|
|
7701
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
7709
|
+
function _cleanUp(props, searchState, context) {
|
|
7710
|
+
return cleanUpValue(searchState, context, "".concat(namespace$1, ".").concat(getId$3(props)));
|
|
7702
7711
|
}
|
|
7703
7712
|
|
|
7704
|
-
var sortBy
|
|
7713
|
+
var sortBy = ['name:asc'];
|
|
7705
7714
|
/**
|
|
7706
7715
|
* connectHierarchicalMenu connector provides the logic to build a widget that will
|
|
7707
7716
|
* give the user the ability to explore a tree-like structure.
|
|
@@ -7762,14 +7771,14 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7762
7771
|
|
|
7763
7772
|
return undefined;
|
|
7764
7773
|
},
|
|
7765
|
-
separator: PropTypes__default
|
|
7766
|
-
rootPath: PropTypes__default
|
|
7767
|
-
showParentLevel: PropTypes__default
|
|
7768
|
-
defaultRefinement: PropTypes__default
|
|
7769
|
-
showMore: PropTypes__default
|
|
7770
|
-
limit: PropTypes__default
|
|
7771
|
-
showMoreLimit: PropTypes__default
|
|
7772
|
-
transformItems: PropTypes__default
|
|
7774
|
+
separator: PropTypes__default.string,
|
|
7775
|
+
rootPath: PropTypes__default.string,
|
|
7776
|
+
showParentLevel: PropTypes__default.bool,
|
|
7777
|
+
defaultRefinement: PropTypes__default.string,
|
|
7778
|
+
showMore: PropTypes__default.bool,
|
|
7779
|
+
limit: PropTypes__default.number,
|
|
7780
|
+
showMoreLimit: PropTypes__default.number,
|
|
7781
|
+
transformItems: PropTypes__default.func
|
|
7773
7782
|
},
|
|
7774
7783
|
defaultProps: {
|
|
7775
7784
|
showMore: false,
|
|
@@ -7783,7 +7792,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7783
7792
|
var showMore = props.showMore,
|
|
7784
7793
|
limit = props.limit,
|
|
7785
7794
|
showMoreLimit = props.showMoreLimit;
|
|
7786
|
-
var id = getId$
|
|
7795
|
+
var id = getId$3(props);
|
|
7787
7796
|
var results = getResults(searchResults, {
|
|
7788
7797
|
ais: props.contextValue,
|
|
7789
7798
|
multiIndexContext: props.indexContextValue
|
|
@@ -7793,7 +7802,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7793
7802
|
if (!isFacetPresent) {
|
|
7794
7803
|
return {
|
|
7795
7804
|
items: [],
|
|
7796
|
-
currentRefinement: getCurrentRefinement
|
|
7805
|
+
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7797
7806
|
ais: props.contextValue,
|
|
7798
7807
|
multiIndexContext: props.indexContextValue
|
|
7799
7808
|
}),
|
|
@@ -7803,16 +7812,16 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7803
7812
|
|
|
7804
7813
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7805
7814
|
var value = results.getFacetValues(id, {
|
|
7806
|
-
sortBy: sortBy
|
|
7815
|
+
sortBy: sortBy
|
|
7807
7816
|
});
|
|
7808
|
-
var items = value.data ? transformValue(value.data, props, searchState, {
|
|
7817
|
+
var items = value.data ? transformValue$1(value.data, props, searchState, {
|
|
7809
7818
|
ais: props.contextValue,
|
|
7810
7819
|
multiIndexContext: props.indexContextValue
|
|
7811
7820
|
}) : [];
|
|
7812
7821
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
7813
7822
|
return {
|
|
7814
7823
|
items: truncate(transformedItems, itemsLimit),
|
|
7815
|
-
currentRefinement: getCurrentRefinement
|
|
7824
|
+
currentRefinement: getCurrentRefinement(props, searchState, {
|
|
7816
7825
|
ais: props.contextValue,
|
|
7817
7826
|
multiIndexContext: props.indexContextValue
|
|
7818
7827
|
}),
|
|
@@ -7820,13 +7829,13 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7820
7829
|
};
|
|
7821
7830
|
},
|
|
7822
7831
|
refine: function refine(props, searchState, nextRefinement) {
|
|
7823
|
-
return _refine$
|
|
7832
|
+
return _refine$1(props, searchState, nextRefinement, {
|
|
7824
7833
|
ais: props.contextValue,
|
|
7825
7834
|
multiIndexContext: props.indexContextValue
|
|
7826
7835
|
});
|
|
7827
7836
|
},
|
|
7828
7837
|
cleanUp: function cleanUp(props, searchState) {
|
|
7829
|
-
return _cleanUp
|
|
7838
|
+
return _cleanUp(props, searchState, {
|
|
7830
7839
|
ais: props.contextValue,
|
|
7831
7840
|
multiIndexContext: props.indexContextValue
|
|
7832
7841
|
});
|
|
@@ -7840,7 +7849,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7840
7849
|
limit = props.limit,
|
|
7841
7850
|
showMoreLimit = props.showMoreLimit,
|
|
7842
7851
|
contextValue = props.contextValue;
|
|
7843
|
-
var id = getId$
|
|
7852
|
+
var id = getId$3(props);
|
|
7844
7853
|
var itemsLimit = showMore ? showMoreLimit : limit;
|
|
7845
7854
|
searchParameters = searchParameters.addHierarchicalFacet({
|
|
7846
7855
|
name: id,
|
|
@@ -7851,7 +7860,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7851
7860
|
}).setQueryParameters({
|
|
7852
7861
|
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, itemsLimit)
|
|
7853
7862
|
});
|
|
7854
|
-
var currentRefinement = getCurrentRefinement
|
|
7863
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7855
7864
|
ais: contextValue,
|
|
7856
7865
|
multiIndexContext: props.indexContextValue
|
|
7857
7866
|
});
|
|
@@ -7864,8 +7873,8 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7864
7873
|
},
|
|
7865
7874
|
getMetadata: function getMetadata(props, searchState) {
|
|
7866
7875
|
var rootAttribute = props.attributes[0];
|
|
7867
|
-
var id = getId$
|
|
7868
|
-
var currentRefinement = getCurrentRefinement
|
|
7876
|
+
var id = getId$3(props);
|
|
7877
|
+
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
7869
7878
|
ais: props.contextValue,
|
|
7870
7879
|
multiIndexContext: props.indexContextValue
|
|
7871
7880
|
});
|
|
@@ -7873,7 +7882,7 @@ var connectHierarchicalMenu = createConnectorWithContext({
|
|
|
7873
7882
|
label: "".concat(rootAttribute, ": ").concat(currentRefinement),
|
|
7874
7883
|
attribute: rootAttribute,
|
|
7875
7884
|
value: function value(nextState) {
|
|
7876
|
-
return _refine$
|
|
7885
|
+
return _refine$1(props, nextState, '', {
|
|
7877
7886
|
ais: props.contextValue,
|
|
7878
7887
|
multiIndexContext: props.indexContextValue
|
|
7879
7888
|
});
|
|
@@ -8050,12 +8059,12 @@ var connectHits = createConnectorWithContext({
|
|
|
8050
8059
|
}
|
|
8051
8060
|
});
|
|
8052
8061
|
|
|
8053
|
-
function getId$
|
|
8062
|
+
function getId$4() {
|
|
8054
8063
|
return 'hitsPerPage';
|
|
8055
8064
|
}
|
|
8056
8065
|
|
|
8057
|
-
function getCurrentRefinement$
|
|
8058
|
-
var id = getId$
|
|
8066
|
+
function getCurrentRefinement$1(props, searchState, context) {
|
|
8067
|
+
var id = getId$4();
|
|
8059
8068
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
8060
8069
|
|
|
8061
8070
|
if (typeof currentRefinement === 'string') {
|
|
@@ -8082,15 +8091,15 @@ function getCurrentRefinement$a(props, searchState, context) {
|
|
|
8082
8091
|
var connectHitsPerPage = createConnectorWithContext({
|
|
8083
8092
|
displayName: 'AlgoliaHitsPerPage',
|
|
8084
8093
|
propTypes: {
|
|
8085
|
-
defaultRefinement: PropTypes__default
|
|
8086
|
-
items: PropTypes__default
|
|
8087
|
-
label: PropTypes__default
|
|
8088
|
-
value: PropTypes__default
|
|
8094
|
+
defaultRefinement: PropTypes__default.number.isRequired,
|
|
8095
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
8096
|
+
label: PropTypes__default.string,
|
|
8097
|
+
value: PropTypes__default.number.isRequired
|
|
8089
8098
|
})).isRequired,
|
|
8090
|
-
transformItems: PropTypes__default
|
|
8099
|
+
transformItems: PropTypes__default.func
|
|
8091
8100
|
},
|
|
8092
8101
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
8093
|
-
var currentRefinement = getCurrentRefinement$
|
|
8102
|
+
var currentRefinement = getCurrentRefinement$1(props, searchState, {
|
|
8094
8103
|
ais: props.contextValue,
|
|
8095
8104
|
multiIndexContext: props.indexContextValue
|
|
8096
8105
|
});
|
|
@@ -8107,7 +8116,7 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8107
8116
|
};
|
|
8108
8117
|
},
|
|
8109
8118
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8110
|
-
var id = getId$
|
|
8119
|
+
var id = getId$4();
|
|
8111
8120
|
|
|
8112
8121
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
8113
8122
|
|
|
@@ -8121,27 +8130,27 @@ var connectHitsPerPage = createConnectorWithContext({
|
|
|
8121
8130
|
return cleanUpValue(searchState, {
|
|
8122
8131
|
ais: props.contextValue,
|
|
8123
8132
|
multiIndexContext: props.indexContextValue
|
|
8124
|
-
}, getId$
|
|
8133
|
+
}, getId$4());
|
|
8125
8134
|
},
|
|
8126
8135
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8127
|
-
return searchParameters.setHitsPerPage(getCurrentRefinement$
|
|
8136
|
+
return searchParameters.setHitsPerPage(getCurrentRefinement$1(props, searchState, {
|
|
8128
8137
|
ais: props.contextValue,
|
|
8129
8138
|
multiIndexContext: props.indexContextValue
|
|
8130
8139
|
}));
|
|
8131
8140
|
},
|
|
8132
8141
|
getMetadata: function getMetadata() {
|
|
8133
8142
|
return {
|
|
8134
|
-
id: getId$
|
|
8143
|
+
id: getId$4()
|
|
8135
8144
|
};
|
|
8136
8145
|
}
|
|
8137
8146
|
});
|
|
8138
8147
|
|
|
8139
|
-
function getId$
|
|
8148
|
+
function getId$5() {
|
|
8140
8149
|
return 'page';
|
|
8141
8150
|
}
|
|
8142
8151
|
|
|
8143
|
-
function getCurrentRefinement$
|
|
8144
|
-
var id = getId$
|
|
8152
|
+
function getCurrentRefinement$2(props, searchState, context) {
|
|
8153
|
+
var id = getId$5();
|
|
8145
8154
|
var page = 1;
|
|
8146
8155
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8147
8156
|
|
|
@@ -8153,9 +8162,9 @@ function getCurrentRefinement$9(props, searchState, context) {
|
|
|
8153
8162
|
}
|
|
8154
8163
|
|
|
8155
8164
|
function getStateWithoutPage(state) {
|
|
8156
|
-
var _ref = state || {}
|
|
8157
|
-
_ref.page
|
|
8158
|
-
|
|
8165
|
+
var _ref = state || {},
|
|
8166
|
+
page = _ref.page,
|
|
8167
|
+
rest = _objectWithoutProperties(_ref, ["page"]);
|
|
8159
8168
|
|
|
8160
8169
|
return rest;
|
|
8161
8170
|
}
|
|
@@ -8264,14 +8273,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8264
8273
|
},
|
|
8265
8274
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8266
8275
|
return searchParameters.setQueryParameters({
|
|
8267
|
-
page: getCurrentRefinement$
|
|
8276
|
+
page: getCurrentRefinement$2(props, searchState, {
|
|
8268
8277
|
ais: props.contextValue,
|
|
8269
8278
|
multiIndexContext: props.indexContextValue
|
|
8270
8279
|
}) - 1
|
|
8271
8280
|
});
|
|
8272
8281
|
},
|
|
8273
8282
|
refine: function refine(props, searchState, event, index) {
|
|
8274
|
-
var id = getId$
|
|
8283
|
+
var id = getId$5();
|
|
8275
8284
|
|
|
8276
8285
|
var nextValue = _defineProperty({}, id, index + 1);
|
|
8277
8286
|
|
|
@@ -8283,14 +8292,14 @@ var connectInfiniteHits = createConnectorWithContext({
|
|
|
8283
8292
|
}
|
|
8284
8293
|
});
|
|
8285
8294
|
|
|
8286
|
-
var namespace$
|
|
8295
|
+
var namespace$2 = 'menu';
|
|
8287
8296
|
|
|
8288
|
-
function getId$
|
|
8297
|
+
function getId$6(props) {
|
|
8289
8298
|
return props.attribute;
|
|
8290
8299
|
}
|
|
8291
8300
|
|
|
8292
|
-
function getCurrentRefinement$
|
|
8293
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8301
|
+
function getCurrentRefinement$3(props, searchState, context) {
|
|
8302
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)), null);
|
|
8294
8303
|
|
|
8295
8304
|
if (currentRefinement === '') {
|
|
8296
8305
|
return null;
|
|
@@ -8300,28 +8309,28 @@ function getCurrentRefinement$8(props, searchState, context) {
|
|
|
8300
8309
|
}
|
|
8301
8310
|
|
|
8302
8311
|
function getValue$1(name, props, searchState, context) {
|
|
8303
|
-
var currentRefinement = getCurrentRefinement$
|
|
8312
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, context);
|
|
8304
8313
|
return name === currentRefinement ? '' : name;
|
|
8305
8314
|
}
|
|
8306
8315
|
|
|
8307
|
-
function getLimit
|
|
8316
|
+
function getLimit(_ref) {
|
|
8308
8317
|
var showMore = _ref.showMore,
|
|
8309
8318
|
limit = _ref.limit,
|
|
8310
8319
|
showMoreLimit = _ref.showMoreLimit;
|
|
8311
8320
|
return showMore ? showMoreLimit : limit;
|
|
8312
8321
|
}
|
|
8313
8322
|
|
|
8314
|
-
function _refine$
|
|
8315
|
-
var id = getId$
|
|
8323
|
+
function _refine$2(props, searchState, nextRefinement, context) {
|
|
8324
|
+
var id = getId$6(props);
|
|
8316
8325
|
|
|
8317
8326
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : '');
|
|
8318
8327
|
|
|
8319
8328
|
var resetPage = true;
|
|
8320
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
8329
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$2);
|
|
8321
8330
|
}
|
|
8322
8331
|
|
|
8323
|
-
function _cleanUp$
|
|
8324
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
8332
|
+
function _cleanUp$1(props, searchState, context) {
|
|
8333
|
+
return cleanUpValue(searchState, context, "".concat(namespace$2, ".").concat(getId$6(props)));
|
|
8325
8334
|
}
|
|
8326
8335
|
|
|
8327
8336
|
var defaultSortBy = ['count:desc', 'name:asc'];
|
|
@@ -8349,13 +8358,13 @@ var defaultSortBy = ['count:desc', 'name:asc'];
|
|
|
8349
8358
|
var connectMenu = createConnectorWithContext({
|
|
8350
8359
|
displayName: 'AlgoliaMenu',
|
|
8351
8360
|
propTypes: {
|
|
8352
|
-
attribute: PropTypes__default
|
|
8353
|
-
showMore: PropTypes__default
|
|
8354
|
-
limit: PropTypes__default
|
|
8355
|
-
showMoreLimit: PropTypes__default
|
|
8356
|
-
defaultRefinement: PropTypes__default
|
|
8357
|
-
transformItems: PropTypes__default
|
|
8358
|
-
searchable: PropTypes__default
|
|
8361
|
+
attribute: PropTypes__default.string.isRequired,
|
|
8362
|
+
showMore: PropTypes__default.bool,
|
|
8363
|
+
limit: PropTypes__default.number,
|
|
8364
|
+
showMoreLimit: PropTypes__default.number,
|
|
8365
|
+
defaultRefinement: PropTypes__default.string,
|
|
8366
|
+
transformItems: PropTypes__default.func,
|
|
8367
|
+
searchable: PropTypes__default.bool
|
|
8359
8368
|
},
|
|
8360
8369
|
defaultProps: {
|
|
8361
8370
|
showMore: false,
|
|
@@ -8380,7 +8389,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8380
8389
|
if (!canRefine) {
|
|
8381
8390
|
return {
|
|
8382
8391
|
items: [],
|
|
8383
|
-
currentRefinement: getCurrentRefinement$
|
|
8392
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
8384
8393
|
ais: props.contextValue,
|
|
8385
8394
|
multiIndexContext: props.indexContextValue
|
|
8386
8395
|
}),
|
|
@@ -8427,8 +8436,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8427
8436
|
|
|
8428
8437
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
8429
8438
|
return {
|
|
8430
|
-
items: transformedItems.slice(0, getLimit
|
|
8431
|
-
currentRefinement: getCurrentRefinement$
|
|
8439
|
+
items: transformedItems.slice(0, getLimit(props)),
|
|
8440
|
+
currentRefinement: getCurrentRefinement$3(props, searchState, {
|
|
8432
8441
|
ais: props.contextValue,
|
|
8433
8442
|
multiIndexContext: props.indexContextValue
|
|
8434
8443
|
}),
|
|
@@ -8438,7 +8447,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8438
8447
|
};
|
|
8439
8448
|
},
|
|
8440
8449
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8441
|
-
return _refine$
|
|
8450
|
+
return _refine$2(props, searchState, nextRefinement, {
|
|
8442
8451
|
ais: props.contextValue,
|
|
8443
8452
|
multiIndexContext: props.indexContextValue
|
|
8444
8453
|
});
|
|
@@ -8447,11 +8456,11 @@ var connectMenu = createConnectorWithContext({
|
|
|
8447
8456
|
return {
|
|
8448
8457
|
facetName: props.attribute,
|
|
8449
8458
|
query: nextRefinement,
|
|
8450
|
-
maxFacetHits: getLimit
|
|
8459
|
+
maxFacetHits: getLimit(props)
|
|
8451
8460
|
};
|
|
8452
8461
|
},
|
|
8453
8462
|
cleanUp: function cleanUp(props, searchState) {
|
|
8454
|
-
return _cleanUp$
|
|
8463
|
+
return _cleanUp$1(props, searchState, {
|
|
8455
8464
|
ais: props.contextValue,
|
|
8456
8465
|
multiIndexContext: props.indexContextValue
|
|
8457
8466
|
});
|
|
@@ -8459,10 +8468,10 @@ var connectMenu = createConnectorWithContext({
|
|
|
8459
8468
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8460
8469
|
var attribute = props.attribute;
|
|
8461
8470
|
searchParameters = searchParameters.setQueryParameters({
|
|
8462
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit
|
|
8471
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
8463
8472
|
});
|
|
8464
8473
|
searchParameters = searchParameters.addDisjunctiveFacet(attribute);
|
|
8465
|
-
var currentRefinement = getCurrentRefinement$
|
|
8474
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
8466
8475
|
ais: props.contextValue,
|
|
8467
8476
|
multiIndexContext: props.indexContextValue
|
|
8468
8477
|
});
|
|
@@ -8474,8 +8483,8 @@ var connectMenu = createConnectorWithContext({
|
|
|
8474
8483
|
return searchParameters;
|
|
8475
8484
|
},
|
|
8476
8485
|
getMetadata: function getMetadata(props, searchState) {
|
|
8477
|
-
var id = getId$
|
|
8478
|
-
var currentRefinement = getCurrentRefinement$
|
|
8486
|
+
var id = getId$6(props);
|
|
8487
|
+
var currentRefinement = getCurrentRefinement$3(props, searchState, {
|
|
8479
8488
|
ais: props.contextValue,
|
|
8480
8489
|
multiIndexContext: props.indexContextValue
|
|
8481
8490
|
});
|
|
@@ -8489,7 +8498,7 @@ var connectMenu = createConnectorWithContext({
|
|
|
8489
8498
|
label: "".concat(props.attribute, ": ").concat(currentRefinement),
|
|
8490
8499
|
attribute: props.attribute,
|
|
8491
8500
|
value: function value(nextState) {
|
|
8492
|
-
return _refine$
|
|
8501
|
+
return _refine$2(props, nextState, '', {
|
|
8493
8502
|
ais: props.contextValue,
|
|
8494
8503
|
multiIndexContext: props.indexContextValue
|
|
8495
8504
|
});
|
|
@@ -8570,12 +8579,12 @@ function parseItem(value) {
|
|
|
8570
8579
|
|
|
8571
8580
|
var namespace$3 = 'multiRange';
|
|
8572
8581
|
|
|
8573
|
-
function getId$
|
|
8582
|
+
function getId$7(props) {
|
|
8574
8583
|
return props.attribute;
|
|
8575
8584
|
}
|
|
8576
8585
|
|
|
8577
|
-
function getCurrentRefinement$
|
|
8578
|
-
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8586
|
+
function getCurrentRefinement$4(props, searchState, context) {
|
|
8587
|
+
return getCurrentRefinementValue(props, searchState, context, "".concat(namespace$3, ".").concat(getId$7(props)), '');
|
|
8579
8588
|
}
|
|
8580
8589
|
|
|
8581
8590
|
function isRefinementsRangeIncludesInsideItemRange(stats, start, end) {
|
|
@@ -8594,15 +8603,15 @@ function itemHasRefinement(attribute, results, value) {
|
|
|
8594
8603
|
return !(Boolean(stats) && (isRefinementsRangeIncludesInsideItemRange(stats, start, end) || isItemRangeIncludedInsideRefinementsRange(stats, start, end)));
|
|
8595
8604
|
}
|
|
8596
8605
|
|
|
8597
|
-
function _refine$
|
|
8598
|
-
var nextValue = _defineProperty({}, getId$
|
|
8606
|
+
function _refine$3(props, searchState, nextRefinement, context) {
|
|
8607
|
+
var nextValue = _defineProperty({}, getId$7(props), nextRefinement);
|
|
8599
8608
|
|
|
8600
8609
|
var resetPage = true;
|
|
8601
8610
|
return refineValue(searchState, nextValue, context, resetPage, namespace$3);
|
|
8602
8611
|
}
|
|
8603
8612
|
|
|
8604
|
-
function _cleanUp$
|
|
8605
|
-
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$
|
|
8613
|
+
function _cleanUp$2(props, searchState, context) {
|
|
8614
|
+
return cleanUpValue(searchState, context, "".concat(namespace$3, ".").concat(getId$7(props)));
|
|
8606
8615
|
}
|
|
8607
8616
|
/**
|
|
8608
8617
|
* connectNumericMenu connector provides the logic to build a widget that will
|
|
@@ -8625,18 +8634,18 @@ function _cleanUp$5(props, searchState, context) {
|
|
|
8625
8634
|
var connectNumericMenu = createConnectorWithContext({
|
|
8626
8635
|
displayName: 'AlgoliaNumericMenu',
|
|
8627
8636
|
propTypes: {
|
|
8628
|
-
id: PropTypes__default
|
|
8629
|
-
attribute: PropTypes__default
|
|
8630
|
-
items: PropTypes__default
|
|
8631
|
-
label: PropTypes__default
|
|
8632
|
-
start: PropTypes__default
|
|
8633
|
-
end: PropTypes__default
|
|
8637
|
+
id: PropTypes__default.string,
|
|
8638
|
+
attribute: PropTypes__default.string.isRequired,
|
|
8639
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
8640
|
+
label: PropTypes__default.node,
|
|
8641
|
+
start: PropTypes__default.number,
|
|
8642
|
+
end: PropTypes__default.number
|
|
8634
8643
|
})).isRequired,
|
|
8635
|
-
transformItems: PropTypes__default
|
|
8644
|
+
transformItems: PropTypes__default.func
|
|
8636
8645
|
},
|
|
8637
8646
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
8638
8647
|
var attribute = props.attribute;
|
|
8639
|
-
var currentRefinement = getCurrentRefinement$
|
|
8648
|
+
var currentRefinement = getCurrentRefinement$4(props, searchState, {
|
|
8640
8649
|
ais: props.contextValue,
|
|
8641
8650
|
multiIndexContext: props.indexContextValue
|
|
8642
8651
|
});
|
|
@@ -8650,11 +8659,11 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8650
8659
|
label: item.label,
|
|
8651
8660
|
value: value,
|
|
8652
8661
|
isRefined: value === currentRefinement,
|
|
8653
|
-
noRefinement: results ? itemHasRefinement(getId$
|
|
8662
|
+
noRefinement: results ? itemHasRefinement(getId$7(props), results, value) : false
|
|
8654
8663
|
};
|
|
8655
8664
|
});
|
|
8656
8665
|
var stats = results && results.getFacetByName(attribute) ? results.getFacetStats(attribute) : null;
|
|
8657
|
-
var refinedItem = find
|
|
8666
|
+
var refinedItem = find(items, function (item) {
|
|
8658
8667
|
return item.isRefined === true;
|
|
8659
8668
|
});
|
|
8660
8669
|
|
|
@@ -8679,13 +8688,13 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8679
8688
|
};
|
|
8680
8689
|
},
|
|
8681
8690
|
refine: function refine(props, searchState, nextRefinement) {
|
|
8682
|
-
return _refine$
|
|
8691
|
+
return _refine$3(props, searchState, nextRefinement, {
|
|
8683
8692
|
ais: props.contextValue,
|
|
8684
8693
|
multiIndexContext: props.indexContextValue
|
|
8685
8694
|
});
|
|
8686
8695
|
},
|
|
8687
8696
|
cleanUp: function cleanUp(props, searchState) {
|
|
8688
|
-
return _cleanUp$
|
|
8697
|
+
return _cleanUp$2(props, searchState, {
|
|
8689
8698
|
ais: props.contextValue,
|
|
8690
8699
|
multiIndexContext: props.indexContextValue
|
|
8691
8700
|
});
|
|
@@ -8693,7 +8702,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8693
8702
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8694
8703
|
var attribute = props.attribute;
|
|
8695
8704
|
|
|
8696
|
-
var _parseItem = parseItem(getCurrentRefinement$
|
|
8705
|
+
var _parseItem = parseItem(getCurrentRefinement$4(props, searchState, {
|
|
8697
8706
|
ais: props.contextValue,
|
|
8698
8707
|
multiIndexContext: props.indexContextValue
|
|
8699
8708
|
})),
|
|
@@ -8713,8 +8722,8 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8713
8722
|
return searchParameters;
|
|
8714
8723
|
},
|
|
8715
8724
|
getMetadata: function getMetadata(props, searchState) {
|
|
8716
|
-
var id = getId$
|
|
8717
|
-
var value = getCurrentRefinement$
|
|
8725
|
+
var id = getId$7(props);
|
|
8726
|
+
var value = getCurrentRefinement$4(props, searchState, {
|
|
8718
8727
|
ais: props.contextValue,
|
|
8719
8728
|
multiIndexContext: props.indexContextValue
|
|
8720
8729
|
});
|
|
@@ -8725,7 +8734,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8725
8734
|
});
|
|
8726
8735
|
|
|
8727
8736
|
if (value !== '') {
|
|
8728
|
-
var _find = find
|
|
8737
|
+
var _find = find(props.items, function (item) {
|
|
8729
8738
|
return stringifyItem(item) === value;
|
|
8730
8739
|
}),
|
|
8731
8740
|
label = _find.label;
|
|
@@ -8735,7 +8744,7 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8735
8744
|
attribute: props.attribute,
|
|
8736
8745
|
currentRefinement: label,
|
|
8737
8746
|
value: function value(nextState) {
|
|
8738
|
-
return _refine$
|
|
8747
|
+
return _refine$3(props, nextState, '', {
|
|
8739
8748
|
ais: props.contextValue,
|
|
8740
8749
|
multiIndexContext: props.indexContextValue
|
|
8741
8750
|
});
|
|
@@ -8751,12 +8760,12 @@ var connectNumericMenu = createConnectorWithContext({
|
|
|
8751
8760
|
}
|
|
8752
8761
|
});
|
|
8753
8762
|
|
|
8754
|
-
function getId$
|
|
8763
|
+
function getId$8() {
|
|
8755
8764
|
return 'page';
|
|
8756
8765
|
}
|
|
8757
8766
|
|
|
8758
|
-
function getCurrentRefinement$
|
|
8759
|
-
var id = getId$
|
|
8767
|
+
function getCurrentRefinement$5(props, searchState, context) {
|
|
8768
|
+
var id = getId$8();
|
|
8760
8769
|
var page = 1;
|
|
8761
8770
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, page);
|
|
8762
8771
|
|
|
@@ -8767,8 +8776,8 @@ function getCurrentRefinement$6(props, searchState, context) {
|
|
|
8767
8776
|
return currentRefinement;
|
|
8768
8777
|
}
|
|
8769
8778
|
|
|
8770
|
-
function _refine$
|
|
8771
|
-
var id = getId$
|
|
8779
|
+
function _refine$4(props, searchState, nextPage, context) {
|
|
8780
|
+
var id = getId$8();
|
|
8772
8781
|
|
|
8773
8782
|
var nextValue = _defineProperty({}, id, nextPage);
|
|
8774
8783
|
|
|
@@ -8808,7 +8817,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8808
8817
|
var nbPages = results.nbPages;
|
|
8809
8818
|
return {
|
|
8810
8819
|
nbPages: nbPages,
|
|
8811
|
-
currentRefinement: getCurrentRefinement$
|
|
8820
|
+
currentRefinement: getCurrentRefinement$5(props, searchState, {
|
|
8812
8821
|
ais: props.contextValue,
|
|
8813
8822
|
multiIndexContext: props.indexContextValue
|
|
8814
8823
|
}),
|
|
@@ -8816,7 +8825,7 @@ var connectPagination = createConnectorWithContext({
|
|
|
8816
8825
|
};
|
|
8817
8826
|
},
|
|
8818
8827
|
refine: function refine(props, searchState, nextPage) {
|
|
8819
|
-
return _refine$
|
|
8828
|
+
return _refine$4(props, searchState, nextPage, {
|
|
8820
8829
|
ais: props.contextValue,
|
|
8821
8830
|
multiIndexContext: props.indexContextValue
|
|
8822
8831
|
});
|
|
@@ -8825,17 +8834,17 @@ var connectPagination = createConnectorWithContext({
|
|
|
8825
8834
|
return cleanUpValue(searchState, {
|
|
8826
8835
|
ais: props.contextValue,
|
|
8827
8836
|
multiIndexContext: props.indexContextValue
|
|
8828
|
-
}, getId$
|
|
8837
|
+
}, getId$8());
|
|
8829
8838
|
},
|
|
8830
8839
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
8831
|
-
return searchParameters.setPage(getCurrentRefinement$
|
|
8840
|
+
return searchParameters.setPage(getCurrentRefinement$5(props, searchState, {
|
|
8832
8841
|
ais: props.contextValue,
|
|
8833
8842
|
multiIndexContext: props.indexContextValue
|
|
8834
8843
|
}) - 1);
|
|
8835
8844
|
},
|
|
8836
8845
|
getMetadata: function getMetadata() {
|
|
8837
8846
|
return {
|
|
8838
|
-
id: getId$
|
|
8847
|
+
id: getId$8()
|
|
8839
8848
|
};
|
|
8840
8849
|
}
|
|
8841
8850
|
});
|
|
@@ -8881,11 +8890,11 @@ var connectPoweredBy = createConnectorWithContext({
|
|
|
8881
8890
|
* @providedPropType {number} precision - Number of digits after decimal point to use.
|
|
8882
8891
|
*/
|
|
8883
8892
|
|
|
8884
|
-
function getId$
|
|
8893
|
+
function getId$9(props) {
|
|
8885
8894
|
return props.attribute;
|
|
8886
8895
|
}
|
|
8887
8896
|
|
|
8888
|
-
var namespace$
|
|
8897
|
+
var namespace$4 = 'range';
|
|
8889
8898
|
|
|
8890
8899
|
function getCurrentRange(boundaries, stats, precision) {
|
|
8891
8900
|
var pow = Math.pow(10, precision);
|
|
@@ -8915,8 +8924,8 @@ function getCurrentRange(boundaries, stats, precision) {
|
|
|
8915
8924
|
};
|
|
8916
8925
|
}
|
|
8917
8926
|
|
|
8918
|
-
function getCurrentRefinement$
|
|
8919
|
-
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
8927
|
+
function getCurrentRefinement$6(props, searchState, currentRange, context) {
|
|
8928
|
+
var _getCurrentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)), {}),
|
|
8920
8929
|
min = _getCurrentRefinement.min,
|
|
8921
8930
|
max = _getCurrentRefinement.max;
|
|
8922
8931
|
|
|
@@ -8982,7 +8991,7 @@ function nextValueForRefinement(hasBound, isReset, range, value) {
|
|
|
8982
8991
|
return next;
|
|
8983
8992
|
}
|
|
8984
8993
|
|
|
8985
|
-
function _refine$
|
|
8994
|
+
function _refine$5(props, searchState, nextRefinement, currentRange, context) {
|
|
8986
8995
|
var nextMin = nextRefinement.min,
|
|
8987
8996
|
nextMax = nextRefinement.max;
|
|
8988
8997
|
var currentMinRange = currentRange.min,
|
|
@@ -9006,7 +9015,7 @@ function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
|
9006
9015
|
throw Error("You can't provide max value greater than range.");
|
|
9007
9016
|
}
|
|
9008
9017
|
|
|
9009
|
-
var id = getId$
|
|
9018
|
+
var id = getId$9(props);
|
|
9010
9019
|
var resetPage = true;
|
|
9011
9020
|
|
|
9012
9021
|
var nextValue = _defineProperty({}, id, {
|
|
@@ -9014,27 +9023,27 @@ function _refine$4(props, searchState, nextRefinement, currentRange, context) {
|
|
|
9014
9023
|
max: nextValueForRefinement(props.max !== undefined, isMaxReset, currentMaxRange, nextMaxAsNumber)
|
|
9015
9024
|
});
|
|
9016
9025
|
|
|
9017
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9026
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$4);
|
|
9018
9027
|
}
|
|
9019
9028
|
|
|
9020
|
-
function _cleanUp$
|
|
9021
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9029
|
+
function _cleanUp$3(props, searchState, context) {
|
|
9030
|
+
return cleanUpValue(searchState, context, "".concat(namespace$4, ".").concat(getId$9(props)));
|
|
9022
9031
|
}
|
|
9023
9032
|
|
|
9024
9033
|
var connectRange = createConnectorWithContext({
|
|
9025
9034
|
displayName: 'AlgoliaRange',
|
|
9026
9035
|
propTypes: {
|
|
9027
|
-
id: PropTypes__default
|
|
9028
|
-
attribute: PropTypes__default
|
|
9029
|
-
defaultRefinement: PropTypes__default
|
|
9030
|
-
min: PropTypes__default
|
|
9031
|
-
max: PropTypes__default
|
|
9036
|
+
id: PropTypes__default.string,
|
|
9037
|
+
attribute: PropTypes__default.string.isRequired,
|
|
9038
|
+
defaultRefinement: PropTypes__default.shape({
|
|
9039
|
+
min: PropTypes__default.number,
|
|
9040
|
+
max: PropTypes__default.number
|
|
9032
9041
|
}),
|
|
9033
|
-
min: PropTypes__default
|
|
9034
|
-
max: PropTypes__default
|
|
9035
|
-
precision: PropTypes__default
|
|
9036
|
-
header: PropTypes__default
|
|
9037
|
-
footer: PropTypes__default
|
|
9042
|
+
min: PropTypes__default.number,
|
|
9043
|
+
max: PropTypes__default.number,
|
|
9044
|
+
precision: PropTypes__default.number,
|
|
9045
|
+
header: PropTypes__default.node,
|
|
9046
|
+
footer: PropTypes__default.node
|
|
9038
9047
|
},
|
|
9039
9048
|
defaultProps: {
|
|
9040
9049
|
precision: 0
|
|
@@ -9073,7 +9082,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9073
9082
|
min: rangeMin,
|
|
9074
9083
|
max: rangeMax
|
|
9075
9084
|
};
|
|
9076
|
-
var currentRefinement = getCurrentRefinement$
|
|
9085
|
+
var currentRefinement = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9077
9086
|
ais: props.contextValue,
|
|
9078
9087
|
multiIndexContext: props.indexContextValue
|
|
9079
9088
|
});
|
|
@@ -9087,13 +9096,13 @@ var connectRange = createConnectorWithContext({
|
|
|
9087
9096
|
};
|
|
9088
9097
|
},
|
|
9089
9098
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9090
|
-
return _refine$
|
|
9099
|
+
return _refine$5(props, searchState, nextRefinement, this._currentRange, {
|
|
9091
9100
|
ais: props.contextValue,
|
|
9092
9101
|
multiIndexContext: props.indexContextValue
|
|
9093
9102
|
});
|
|
9094
9103
|
},
|
|
9095
9104
|
cleanUp: function cleanUp(props, searchState) {
|
|
9096
|
-
return _cleanUp$
|
|
9105
|
+
return _cleanUp$3(props, searchState, {
|
|
9097
9106
|
ais: props.contextValue,
|
|
9098
9107
|
multiIndexContext: props.indexContextValue
|
|
9099
9108
|
});
|
|
@@ -9101,7 +9110,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9101
9110
|
getSearchParameters: function getSearchParameters(params, props, searchState) {
|
|
9102
9111
|
var attribute = props.attribute;
|
|
9103
9112
|
|
|
9104
|
-
var _getCurrentRefinement2 = getCurrentRefinement$
|
|
9113
|
+
var _getCurrentRefinement2 = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9105
9114
|
ais: props.contextValue,
|
|
9106
9115
|
multiIndexContext: props.indexContextValue
|
|
9107
9116
|
}),
|
|
@@ -9127,7 +9136,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9127
9136
|
minRange = _this$_currentRange.min,
|
|
9128
9137
|
maxRange = _this$_currentRange.max;
|
|
9129
9138
|
|
|
9130
|
-
var _getCurrentRefinement3 = getCurrentRefinement$
|
|
9139
|
+
var _getCurrentRefinement3 = getCurrentRefinement$6(props, searchState, this._currentRange, {
|
|
9131
9140
|
ais: props.contextValue,
|
|
9132
9141
|
multiIndexContext: props.indexContextValue
|
|
9133
9142
|
}),
|
|
@@ -9146,7 +9155,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9146
9155
|
label: fragments.join(''),
|
|
9147
9156
|
attribute: props.attribute,
|
|
9148
9157
|
value: function value(nextState) {
|
|
9149
|
-
return _refine$
|
|
9158
|
+
return _refine$5(props, nextState, {}, _this._currentRange, {
|
|
9150
9159
|
ais: props.contextValue,
|
|
9151
9160
|
multiIndexContext: props.indexContextValue
|
|
9152
9161
|
});
|
|
@@ -9162,7 +9171,7 @@ var connectRange = createConnectorWithContext({
|
|
|
9162
9171
|
}
|
|
9163
9172
|
|
|
9164
9173
|
return {
|
|
9165
|
-
id: getId$
|
|
9174
|
+
id: getId$9(props),
|
|
9166
9175
|
index: getIndexId({
|
|
9167
9176
|
ais: props.contextValue,
|
|
9168
9177
|
multiIndexContext: props.indexContextValue
|
|
@@ -9172,14 +9181,14 @@ var connectRange = createConnectorWithContext({
|
|
|
9172
9181
|
}
|
|
9173
9182
|
});
|
|
9174
9183
|
|
|
9175
|
-
var namespace$
|
|
9184
|
+
var namespace$5 = 'refinementList';
|
|
9176
9185
|
|
|
9177
|
-
function getId$
|
|
9186
|
+
function getId$a(props) {
|
|
9178
9187
|
return props.attribute;
|
|
9179
9188
|
}
|
|
9180
9189
|
|
|
9181
|
-
function getCurrentRefinement$
|
|
9182
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$
|
|
9190
|
+
function getCurrentRefinement$7(props, searchState, context) {
|
|
9191
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$5, ".").concat(getId$a(props)), []);
|
|
9183
9192
|
|
|
9184
9193
|
if (typeof currentRefinement !== 'string') {
|
|
9185
9194
|
return currentRefinement;
|
|
@@ -9192,8 +9201,8 @@ function getCurrentRefinement$4(props, searchState, context) {
|
|
|
9192
9201
|
return [];
|
|
9193
9202
|
}
|
|
9194
9203
|
|
|
9195
|
-
function getValue(name, props, searchState, context) {
|
|
9196
|
-
var currentRefinement = getCurrentRefinement$
|
|
9204
|
+
function getValue$2(name, props, searchState, context) {
|
|
9205
|
+
var currentRefinement = getCurrentRefinement$7(props, searchState, context);
|
|
9197
9206
|
var isAnewValue = currentRefinement.indexOf(name) === -1;
|
|
9198
9207
|
var nextRefinement = isAnewValue ? currentRefinement.concat([name]) // cannot use .push(), it mutates
|
|
9199
9208
|
: currentRefinement.filter(function (selectedValue) {
|
|
@@ -9203,15 +9212,15 @@ function getValue(name, props, searchState, context) {
|
|
|
9203
9212
|
return nextRefinement;
|
|
9204
9213
|
}
|
|
9205
9214
|
|
|
9206
|
-
function getLimit(_ref) {
|
|
9215
|
+
function getLimit$1(_ref) {
|
|
9207
9216
|
var showMore = _ref.showMore,
|
|
9208
9217
|
limit = _ref.limit,
|
|
9209
9218
|
showMoreLimit = _ref.showMoreLimit;
|
|
9210
9219
|
return showMore ? showMoreLimit : limit;
|
|
9211
9220
|
}
|
|
9212
9221
|
|
|
9213
|
-
function _refine$
|
|
9214
|
-
var id = getId$
|
|
9222
|
+
function _refine$6(props, searchState, nextRefinement, context) {
|
|
9223
|
+
var id = getId$a(props); // Setting the value to an empty string ensures that it is persisted in
|
|
9215
9224
|
// the URL as an empty value.
|
|
9216
9225
|
// This is necessary in the case where `defaultRefinement` contains one
|
|
9217
9226
|
// item and we try to deselect it. `nextSelected` would be an empty array,
|
|
@@ -9222,11 +9231,11 @@ function _refine$3(props, searchState, nextRefinement, context) {
|
|
|
9222
9231
|
var nextValue = _defineProperty({}, id, nextRefinement.length > 0 ? nextRefinement : '');
|
|
9223
9232
|
|
|
9224
9233
|
var resetPage = true;
|
|
9225
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace$
|
|
9234
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$5);
|
|
9226
9235
|
}
|
|
9227
9236
|
|
|
9228
|
-
function _cleanUp$
|
|
9229
|
-
return cleanUpValue(searchState, context, "".concat(namespace$
|
|
9237
|
+
function _cleanUp$4(props, searchState, context) {
|
|
9238
|
+
return cleanUpValue(searchState, context, "".concat(namespace$5, ".").concat(getId$a(props)));
|
|
9230
9239
|
}
|
|
9231
9240
|
/**
|
|
9232
9241
|
* connectRefinementList connector provides the logic to build a widget that will
|
|
@@ -9253,19 +9262,19 @@ function _cleanUp$3(props, searchState, context) {
|
|
|
9253
9262
|
*/
|
|
9254
9263
|
|
|
9255
9264
|
|
|
9256
|
-
var sortBy = ['isRefined', 'count:desc', 'name:asc'];
|
|
9265
|
+
var sortBy$1 = ['isRefined', 'count:desc', 'name:asc'];
|
|
9257
9266
|
var connectRefinementList = createConnectorWithContext({
|
|
9258
9267
|
displayName: 'AlgoliaRefinementList',
|
|
9259
9268
|
propTypes: {
|
|
9260
|
-
id: PropTypes__default
|
|
9261
|
-
attribute: PropTypes__default
|
|
9262
|
-
operator: PropTypes__default
|
|
9263
|
-
showMore: PropTypes__default
|
|
9264
|
-
limit: PropTypes__default
|
|
9265
|
-
showMoreLimit: PropTypes__default
|
|
9266
|
-
defaultRefinement: PropTypes__default
|
|
9267
|
-
searchable: PropTypes__default
|
|
9268
|
-
transformItems: PropTypes__default
|
|
9269
|
+
id: PropTypes__default.string,
|
|
9270
|
+
attribute: PropTypes__default.string.isRequired,
|
|
9271
|
+
operator: PropTypes__default.oneOf(['and', 'or']),
|
|
9272
|
+
showMore: PropTypes__default.bool,
|
|
9273
|
+
limit: PropTypes__default.number,
|
|
9274
|
+
showMoreLimit: PropTypes__default.number,
|
|
9275
|
+
defaultRefinement: PropTypes__default.arrayOf(PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number])),
|
|
9276
|
+
searchable: PropTypes__default.bool,
|
|
9277
|
+
transformItems: PropTypes__default.func
|
|
9269
9278
|
},
|
|
9270
9279
|
defaultProps: {
|
|
9271
9280
|
operator: 'or',
|
|
@@ -9291,7 +9300,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9291
9300
|
if (!canRefine) {
|
|
9292
9301
|
return {
|
|
9293
9302
|
items: [],
|
|
9294
|
-
currentRefinement: getCurrentRefinement$
|
|
9303
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, {
|
|
9295
9304
|
ais: props.contextValue,
|
|
9296
9305
|
multiIndexContext: props.indexContextValue
|
|
9297
9306
|
}),
|
|
@@ -9304,7 +9313,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9304
9313
|
var items = isFromSearch ? searchForFacetValuesResults[attribute].map(function (v) {
|
|
9305
9314
|
return {
|
|
9306
9315
|
label: v.value,
|
|
9307
|
-
value: getValue(v.value, props, searchState, {
|
|
9316
|
+
value: getValue$2(v.value, props, searchState, {
|
|
9308
9317
|
ais: props.contextValue,
|
|
9309
9318
|
multiIndexContext: props.indexContextValue
|
|
9310
9319
|
}),
|
|
@@ -9317,11 +9326,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9317
9326
|
isRefined: v.isRefined
|
|
9318
9327
|
};
|
|
9319
9328
|
}) : results.getFacetValues(attribute, {
|
|
9320
|
-
sortBy: sortBy
|
|
9329
|
+
sortBy: sortBy$1
|
|
9321
9330
|
}).map(function (v) {
|
|
9322
9331
|
return {
|
|
9323
9332
|
label: v.name,
|
|
9324
|
-
value: getValue(v.name, props, searchState, {
|
|
9333
|
+
value: getValue$2(v.name, props, searchState, {
|
|
9325
9334
|
ais: props.contextValue,
|
|
9326
9335
|
multiIndexContext: props.indexContextValue
|
|
9327
9336
|
}),
|
|
@@ -9331,8 +9340,8 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9331
9340
|
});
|
|
9332
9341
|
var transformedItems = props.transformItems ? props.transformItems(items) : items;
|
|
9333
9342
|
return {
|
|
9334
|
-
items: transformedItems.slice(0, getLimit(props)),
|
|
9335
|
-
currentRefinement: getCurrentRefinement$
|
|
9343
|
+
items: transformedItems.slice(0, getLimit$1(props)),
|
|
9344
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, {
|
|
9336
9345
|
ais: props.contextValue,
|
|
9337
9346
|
multiIndexContext: props.indexContextValue
|
|
9338
9347
|
}),
|
|
@@ -9342,7 +9351,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9342
9351
|
};
|
|
9343
9352
|
},
|
|
9344
9353
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9345
|
-
return _refine$
|
|
9354
|
+
return _refine$6(props, searchState, nextRefinement, {
|
|
9346
9355
|
ais: props.contextValue,
|
|
9347
9356
|
multiIndexContext: props.indexContextValue
|
|
9348
9357
|
});
|
|
@@ -9351,11 +9360,11 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9351
9360
|
return {
|
|
9352
9361
|
facetName: props.attribute,
|
|
9353
9362
|
query: nextRefinement,
|
|
9354
|
-
maxFacetHits: getLimit(props)
|
|
9363
|
+
maxFacetHits: getLimit$1(props)
|
|
9355
9364
|
};
|
|
9356
9365
|
},
|
|
9357
9366
|
cleanUp: function cleanUp(props, searchState) {
|
|
9358
|
-
return _cleanUp$
|
|
9367
|
+
return _cleanUp$4(props, searchState, {
|
|
9359
9368
|
ais: props.contextValue,
|
|
9360
9369
|
multiIndexContext: props.indexContextValue
|
|
9361
9370
|
});
|
|
@@ -9366,10 +9375,10 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9366
9375
|
var addKey = operator === 'and' ? 'addFacet' : 'addDisjunctiveFacet';
|
|
9367
9376
|
var addRefinementKey = "".concat(addKey, "Refinement");
|
|
9368
9377
|
searchParameters = searchParameters.setQueryParameters({
|
|
9369
|
-
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit(props))
|
|
9378
|
+
maxValuesPerFacet: Math.max(searchParameters.maxValuesPerFacet || 0, getLimit$1(props))
|
|
9370
9379
|
});
|
|
9371
9380
|
searchParameters = searchParameters[addKey](attribute);
|
|
9372
|
-
return getCurrentRefinement$
|
|
9381
|
+
return getCurrentRefinement$7(props, searchState, {
|
|
9373
9382
|
ais: props.contextValue,
|
|
9374
9383
|
multiIndexContext: props.indexContextValue
|
|
9375
9384
|
}).reduce(function (res, val) {
|
|
@@ -9377,7 +9386,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9377
9386
|
}, searchParameters);
|
|
9378
9387
|
},
|
|
9379
9388
|
getMetadata: function getMetadata(props, searchState) {
|
|
9380
|
-
var id = getId$
|
|
9389
|
+
var id = getId$a(props);
|
|
9381
9390
|
var context = {
|
|
9382
9391
|
ais: props.contextValue,
|
|
9383
9392
|
multiIndexContext: props.indexContextValue
|
|
@@ -9385,21 +9394,21 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9385
9394
|
return {
|
|
9386
9395
|
id: id,
|
|
9387
9396
|
index: getIndexId(context),
|
|
9388
|
-
items: getCurrentRefinement$
|
|
9397
|
+
items: getCurrentRefinement$7(props, searchState, context).length > 0 ? [{
|
|
9389
9398
|
attribute: props.attribute,
|
|
9390
9399
|
label: "".concat(props.attribute, ": "),
|
|
9391
|
-
currentRefinement: getCurrentRefinement$
|
|
9400
|
+
currentRefinement: getCurrentRefinement$7(props, searchState, context),
|
|
9392
9401
|
value: function value(nextState) {
|
|
9393
|
-
return _refine$
|
|
9402
|
+
return _refine$6(props, nextState, [], context);
|
|
9394
9403
|
},
|
|
9395
|
-
items: getCurrentRefinement$
|
|
9404
|
+
items: getCurrentRefinement$7(props, searchState, context).map(function (item) {
|
|
9396
9405
|
return {
|
|
9397
9406
|
label: "".concat(item),
|
|
9398
9407
|
value: function value(nextState) {
|
|
9399
|
-
var nextSelectedItems = getCurrentRefinement$
|
|
9408
|
+
var nextSelectedItems = getCurrentRefinement$7(props, nextState, context).filter(function (other) {
|
|
9400
9409
|
return other !== item;
|
|
9401
9410
|
});
|
|
9402
|
-
return _refine$
|
|
9411
|
+
return _refine$6(props, searchState, nextSelectedItems, context);
|
|
9403
9412
|
}
|
|
9404
9413
|
};
|
|
9405
9414
|
})
|
|
@@ -9421,7 +9430,7 @@ var connectRefinementList = createConnectorWithContext({
|
|
|
9421
9430
|
var connectScrollTo = createConnectorWithContext({
|
|
9422
9431
|
displayName: 'AlgoliaScrollTo',
|
|
9423
9432
|
propTypes: {
|
|
9424
|
-
scrollOn: PropTypes__default
|
|
9433
|
+
scrollOn: PropTypes__default.string
|
|
9425
9434
|
},
|
|
9426
9435
|
defaultProps: {
|
|
9427
9436
|
scrollOn: 'page'
|
|
@@ -9458,7 +9467,7 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9458
9467
|
// See: https://github.com/algolia/react-instantsearch/issues/164
|
|
9459
9468
|
|
|
9460
9469
|
|
|
9461
|
-
var cleanedSearchState = omit
|
|
9470
|
+
var cleanedSearchState = omit(searchState, ['configure', id]);
|
|
9462
9471
|
var hasNotChanged = shallowEqual(this._prevSearchState, cleanedSearchState);
|
|
9463
9472
|
this._prevSearchState = cleanedSearchState;
|
|
9464
9473
|
return {
|
|
@@ -9468,12 +9477,12 @@ var connectScrollTo = createConnectorWithContext({
|
|
|
9468
9477
|
}
|
|
9469
9478
|
});
|
|
9470
9479
|
|
|
9471
|
-
function getId$
|
|
9480
|
+
function getId$b() {
|
|
9472
9481
|
return 'query';
|
|
9473
9482
|
}
|
|
9474
9483
|
|
|
9475
|
-
function getCurrentRefinement$
|
|
9476
|
-
var id = getId$
|
|
9484
|
+
function getCurrentRefinement$8(props, searchState, context) {
|
|
9485
|
+
var id = getId$b();
|
|
9477
9486
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9478
9487
|
|
|
9479
9488
|
if (currentRefinement) {
|
|
@@ -9483,8 +9492,8 @@ function getCurrentRefinement$3(props, searchState, context) {
|
|
|
9483
9492
|
return '';
|
|
9484
9493
|
}
|
|
9485
9494
|
|
|
9486
|
-
function _refine$
|
|
9487
|
-
var id = getId$
|
|
9495
|
+
function _refine$7(props, searchState, nextRefinement, context) {
|
|
9496
|
+
var id = getId$b();
|
|
9488
9497
|
|
|
9489
9498
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9490
9499
|
|
|
@@ -9492,8 +9501,8 @@ function _refine$2(props, searchState, nextRefinement, context) {
|
|
|
9492
9501
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9493
9502
|
}
|
|
9494
9503
|
|
|
9495
|
-
function _cleanUp$
|
|
9496
|
-
return cleanUpValue(searchState, context, getId$
|
|
9504
|
+
function _cleanUp$5(props, searchState, context) {
|
|
9505
|
+
return cleanUpValue(searchState, context, getId$b());
|
|
9497
9506
|
}
|
|
9498
9507
|
/**
|
|
9499
9508
|
* connectSearchBox connector provides the logic to build a widget that will
|
|
@@ -9510,11 +9519,11 @@ function _cleanUp$2(props, searchState, context) {
|
|
|
9510
9519
|
var connectSearchBox = createConnectorWithContext({
|
|
9511
9520
|
displayName: 'AlgoliaSearchBox',
|
|
9512
9521
|
propTypes: {
|
|
9513
|
-
defaultRefinement: PropTypes__default
|
|
9522
|
+
defaultRefinement: PropTypes__default.string
|
|
9514
9523
|
},
|
|
9515
9524
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
9516
9525
|
return {
|
|
9517
|
-
currentRefinement: getCurrentRefinement$
|
|
9526
|
+
currentRefinement: getCurrentRefinement$8(props, searchState, {
|
|
9518
9527
|
ais: props.contextValue,
|
|
9519
9528
|
multiIndexContext: props.indexContextValue
|
|
9520
9529
|
}),
|
|
@@ -9522,26 +9531,26 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9522
9531
|
};
|
|
9523
9532
|
},
|
|
9524
9533
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9525
|
-
return _refine$
|
|
9534
|
+
return _refine$7(props, searchState, nextRefinement, {
|
|
9526
9535
|
ais: props.contextValue,
|
|
9527
9536
|
multiIndexContext: props.indexContextValue
|
|
9528
9537
|
});
|
|
9529
9538
|
},
|
|
9530
9539
|
cleanUp: function cleanUp(props, searchState) {
|
|
9531
|
-
return _cleanUp$
|
|
9540
|
+
return _cleanUp$5(props, searchState, {
|
|
9532
9541
|
ais: props.contextValue,
|
|
9533
9542
|
multiIndexContext: props.indexContextValue
|
|
9534
9543
|
});
|
|
9535
9544
|
},
|
|
9536
9545
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9537
|
-
return searchParameters.setQuery(getCurrentRefinement$
|
|
9546
|
+
return searchParameters.setQuery(getCurrentRefinement$8(props, searchState, {
|
|
9538
9547
|
ais: props.contextValue,
|
|
9539
9548
|
multiIndexContext: props.indexContextValue
|
|
9540
9549
|
}));
|
|
9541
9550
|
},
|
|
9542
9551
|
getMetadata: function getMetadata(props, searchState) {
|
|
9543
|
-
var id = getId$
|
|
9544
|
-
var currentRefinement = getCurrentRefinement$
|
|
9552
|
+
var id = getId$b();
|
|
9553
|
+
var currentRefinement = getCurrentRefinement$8(props, searchState, {
|
|
9545
9554
|
ais: props.contextValue,
|
|
9546
9555
|
multiIndexContext: props.indexContextValue
|
|
9547
9556
|
});
|
|
@@ -9554,7 +9563,7 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9554
9563
|
items: currentRefinement === null ? [] : [{
|
|
9555
9564
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
9556
9565
|
value: function value(nextState) {
|
|
9557
|
-
return _refine$
|
|
9566
|
+
return _refine$7(props, nextState, '', {
|
|
9558
9567
|
ais: props.contextValue,
|
|
9559
9568
|
multiIndexContext: props.indexContextValue
|
|
9560
9569
|
});
|
|
@@ -9565,12 +9574,12 @@ var connectSearchBox = createConnectorWithContext({
|
|
|
9565
9574
|
}
|
|
9566
9575
|
});
|
|
9567
9576
|
|
|
9568
|
-
function getId$
|
|
9577
|
+
function getId$c() {
|
|
9569
9578
|
return 'relevancyStrictness';
|
|
9570
9579
|
}
|
|
9571
9580
|
|
|
9572
|
-
function getCurrentRefinement$
|
|
9573
|
-
var id = getId$
|
|
9581
|
+
function getCurrentRefinement$9(props, searchState, context) {
|
|
9582
|
+
var id = getId$c();
|
|
9574
9583
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id);
|
|
9575
9584
|
return currentRefinement;
|
|
9576
9585
|
}
|
|
@@ -9596,13 +9605,13 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9596
9605
|
};
|
|
9597
9606
|
},
|
|
9598
9607
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9599
|
-
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$
|
|
9608
|
+
return searchParameters.setQueryParameter('relevancyStrictness', getCurrentRefinement$9(props, searchState, {
|
|
9600
9609
|
ais: props.contextValue,
|
|
9601
9610
|
multiIndexContext: props.indexContextValue
|
|
9602
9611
|
}));
|
|
9603
9612
|
},
|
|
9604
9613
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9605
|
-
var nextValue = _defineProperty({}, getId$
|
|
9614
|
+
var nextValue = _defineProperty({}, getId$c(), nextRefinement);
|
|
9606
9615
|
|
|
9607
9616
|
var resetPage = true;
|
|
9608
9617
|
return refineValue(searchState, nextValue, {
|
|
@@ -9612,12 +9621,12 @@ var connectRelevantSort = createConnectorWithContext({
|
|
|
9612
9621
|
}
|
|
9613
9622
|
});
|
|
9614
9623
|
|
|
9615
|
-
function getId$
|
|
9624
|
+
function getId$d() {
|
|
9616
9625
|
return 'sortBy';
|
|
9617
9626
|
}
|
|
9618
9627
|
|
|
9619
|
-
function getCurrentRefinement$
|
|
9620
|
-
var id = getId$
|
|
9628
|
+
function getCurrentRefinement$a(props, searchState, context) {
|
|
9629
|
+
var id = getId$d();
|
|
9621
9630
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, null);
|
|
9622
9631
|
|
|
9623
9632
|
if (currentRefinement) {
|
|
@@ -9646,15 +9655,15 @@ function getCurrentRefinement$1(props, searchState, context) {
|
|
|
9646
9655
|
var connectSortBy = createConnectorWithContext({
|
|
9647
9656
|
displayName: 'AlgoliaSortBy',
|
|
9648
9657
|
propTypes: {
|
|
9649
|
-
defaultRefinement: PropTypes__default
|
|
9650
|
-
items: PropTypes__default
|
|
9651
|
-
label: PropTypes__default
|
|
9652
|
-
value: PropTypes__default
|
|
9658
|
+
defaultRefinement: PropTypes__default.string,
|
|
9659
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
9660
|
+
label: PropTypes__default.string,
|
|
9661
|
+
value: PropTypes__default.string.isRequired
|
|
9653
9662
|
})).isRequired,
|
|
9654
|
-
transformItems: PropTypes__default
|
|
9663
|
+
transformItems: PropTypes__default.func
|
|
9655
9664
|
},
|
|
9656
9665
|
getProvidedProps: function getProvidedProps(props, searchState) {
|
|
9657
|
-
var currentRefinement = getCurrentRefinement$
|
|
9666
|
+
var currentRefinement = getCurrentRefinement$a(props, searchState, {
|
|
9658
9667
|
ais: props.contextValue,
|
|
9659
9668
|
multiIndexContext: props.indexContextValue
|
|
9660
9669
|
});
|
|
@@ -9671,7 +9680,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9671
9680
|
};
|
|
9672
9681
|
},
|
|
9673
9682
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9674
|
-
var id = getId$
|
|
9683
|
+
var id = getId$d();
|
|
9675
9684
|
|
|
9676
9685
|
var nextValue = _defineProperty({}, id, nextRefinement);
|
|
9677
9686
|
|
|
@@ -9685,10 +9694,10 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9685
9694
|
return cleanUpValue(searchState, {
|
|
9686
9695
|
ais: props.contextValue,
|
|
9687
9696
|
multiIndexContext: props.indexContextValue
|
|
9688
|
-
}, getId$
|
|
9697
|
+
}, getId$d());
|
|
9689
9698
|
},
|
|
9690
9699
|
getSearchParameters: function getSearchParameters(searchParameters, props, searchState) {
|
|
9691
|
-
var selectedIndex = getCurrentRefinement$
|
|
9700
|
+
var selectedIndex = getCurrentRefinement$a(props, searchState, {
|
|
9692
9701
|
ais: props.contextValue,
|
|
9693
9702
|
multiIndexContext: props.indexContextValue
|
|
9694
9703
|
});
|
|
@@ -9696,7 +9705,7 @@ var connectSortBy = createConnectorWithContext({
|
|
|
9696
9705
|
},
|
|
9697
9706
|
getMetadata: function getMetadata() {
|
|
9698
9707
|
return {
|
|
9699
|
-
id: getId$
|
|
9708
|
+
id: getId$d()
|
|
9700
9709
|
};
|
|
9701
9710
|
}
|
|
9702
9711
|
});
|
|
@@ -9732,15 +9741,15 @@ var connectStats = createConnectorWithContext({
|
|
|
9732
9741
|
}
|
|
9733
9742
|
});
|
|
9734
9743
|
|
|
9735
|
-
function getId$
|
|
9744
|
+
function getId$e(props) {
|
|
9736
9745
|
return props.attribute;
|
|
9737
9746
|
}
|
|
9738
9747
|
|
|
9739
|
-
var namespace = 'toggle';
|
|
9748
|
+
var namespace$6 = 'toggle';
|
|
9740
9749
|
var falsyStrings = ['0', 'false', 'null', 'undefined'];
|
|
9741
9750
|
|
|
9742
|
-
function getCurrentRefinement(props, searchState, context) {
|
|
9743
|
-
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace, ".").concat(getId$
|
|
9751
|
+
function getCurrentRefinement$b(props, searchState, context) {
|
|
9752
|
+
var currentRefinement = getCurrentRefinementValue(props, searchState, context, "".concat(namespace$6, ".").concat(getId$e(props)), false);
|
|
9744
9753
|
|
|
9745
9754
|
if (falsyStrings.indexOf(currentRefinement) !== -1) {
|
|
9746
9755
|
return false;
|
|
@@ -9749,17 +9758,17 @@ function getCurrentRefinement(props, searchState, context) {
|
|
|
9749
9758
|
return Boolean(currentRefinement);
|
|
9750
9759
|
}
|
|
9751
9760
|
|
|
9752
|
-
function _refine$
|
|
9753
|
-
var id = getId$
|
|
9761
|
+
function _refine$8(props, searchState, nextRefinement, context) {
|
|
9762
|
+
var id = getId$e(props);
|
|
9754
9763
|
|
|
9755
9764
|
var nextValue = _defineProperty({}, id, nextRefinement ? nextRefinement : false);
|
|
9756
9765
|
|
|
9757
9766
|
var resetPage = true;
|
|
9758
|
-
return refineValue(searchState, nextValue, context, resetPage, namespace);
|
|
9767
|
+
return refineValue(searchState, nextValue, context, resetPage, namespace$6);
|
|
9759
9768
|
}
|
|
9760
9769
|
|
|
9761
|
-
function _cleanUp$
|
|
9762
|
-
return cleanUpValue(searchState, context, "".concat(namespace, ".").concat(getId$
|
|
9770
|
+
function _cleanUp$6(props, searchState, context) {
|
|
9771
|
+
return cleanUpValue(searchState, context, "".concat(namespace$6, ".").concat(getId$e(props)));
|
|
9763
9772
|
}
|
|
9764
9773
|
/**
|
|
9765
9774
|
* connectToggleRefinement connector provides the logic to build a widget that will
|
|
@@ -9785,11 +9794,11 @@ function _cleanUp$1(props, searchState, context) {
|
|
|
9785
9794
|
var connectToggleRefinement = createConnectorWithContext({
|
|
9786
9795
|
displayName: 'AlgoliaToggle',
|
|
9787
9796
|
propTypes: {
|
|
9788
|
-
label: PropTypes__default
|
|
9789
|
-
attribute: PropTypes__default
|
|
9790
|
-
value: PropTypes__default
|
|
9791
|
-
filter: PropTypes__default
|
|
9792
|
-
defaultRefinement: PropTypes__default
|
|
9797
|
+
label: PropTypes__default.string.isRequired,
|
|
9798
|
+
attribute: PropTypes__default.string.isRequired,
|
|
9799
|
+
value: PropTypes__default.any.isRequired,
|
|
9800
|
+
filter: PropTypes__default.func,
|
|
9801
|
+
defaultRefinement: PropTypes__default.bool
|
|
9793
9802
|
},
|
|
9794
9803
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
9795
9804
|
var attribute = props.attribute,
|
|
@@ -9798,14 +9807,14 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9798
9807
|
ais: props.contextValue,
|
|
9799
9808
|
multiIndexContext: props.indexContextValue
|
|
9800
9809
|
});
|
|
9801
|
-
var currentRefinement = getCurrentRefinement(props, searchState, {
|
|
9810
|
+
var currentRefinement = getCurrentRefinement$b(props, searchState, {
|
|
9802
9811
|
ais: props.contextValue,
|
|
9803
9812
|
multiIndexContext: props.indexContextValue
|
|
9804
9813
|
});
|
|
9805
9814
|
var allFacetValues = results && results.getFacetByName(attribute) ? results.getFacetValues(attribute) : null;
|
|
9806
9815
|
var facetValue = // Use null to always be consistent with type of the value
|
|
9807
9816
|
// count: number | null
|
|
9808
|
-
allFacetValues && allFacetValues.length ? find
|
|
9817
|
+
allFacetValues && allFacetValues.length ? find(allFacetValues, function (item) {
|
|
9809
9818
|
return item.name === value.toString();
|
|
9810
9819
|
}) : null;
|
|
9811
9820
|
var facetValueCount = facetValue && facetValue.count;
|
|
@@ -9826,13 +9835,13 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9826
9835
|
};
|
|
9827
9836
|
},
|
|
9828
9837
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9829
|
-
return _refine$
|
|
9838
|
+
return _refine$8(props, searchState, nextRefinement, {
|
|
9830
9839
|
ais: props.contextValue,
|
|
9831
9840
|
multiIndexContext: props.indexContextValue
|
|
9832
9841
|
});
|
|
9833
9842
|
},
|
|
9834
9843
|
cleanUp: function cleanUp(props, searchState) {
|
|
9835
|
-
return _cleanUp$
|
|
9844
|
+
return _cleanUp$6(props, searchState, {
|
|
9836
9845
|
ais: props.contextValue,
|
|
9837
9846
|
multiIndexContext: props.indexContextValue
|
|
9838
9847
|
});
|
|
@@ -9841,7 +9850,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9841
9850
|
var attribute = props.attribute,
|
|
9842
9851
|
value = props.value,
|
|
9843
9852
|
filter = props.filter;
|
|
9844
|
-
var checked = getCurrentRefinement(props, searchState, {
|
|
9853
|
+
var checked = getCurrentRefinement$b(props, searchState, {
|
|
9845
9854
|
ais: props.contextValue,
|
|
9846
9855
|
multiIndexContext: props.indexContextValue
|
|
9847
9856
|
});
|
|
@@ -9858,8 +9867,8 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9858
9867
|
return nextSearchParameters;
|
|
9859
9868
|
},
|
|
9860
9869
|
getMetadata: function getMetadata(props, searchState) {
|
|
9861
|
-
var id = getId$
|
|
9862
|
-
var checked = getCurrentRefinement(props, searchState, {
|
|
9870
|
+
var id = getId$e(props);
|
|
9871
|
+
var checked = getCurrentRefinement$b(props, searchState, {
|
|
9863
9872
|
ais: props.contextValue,
|
|
9864
9873
|
multiIndexContext: props.indexContextValue
|
|
9865
9874
|
});
|
|
@@ -9875,7 +9884,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9875
9884
|
currentRefinement: checked,
|
|
9876
9885
|
attribute: props.attribute,
|
|
9877
9886
|
value: function value(nextState) {
|
|
9878
|
-
return _refine$
|
|
9887
|
+
return _refine$8(props, nextState, false, {
|
|
9879
9888
|
ais: props.contextValue,
|
|
9880
9889
|
multiIndexContext: props.indexContextValue
|
|
9881
9890
|
});
|
|
@@ -9891,7 +9900,7 @@ var connectToggleRefinement = createConnectorWithContext({
|
|
|
9891
9900
|
}
|
|
9892
9901
|
});
|
|
9893
9902
|
|
|
9894
|
-
function getId() {
|
|
9903
|
+
function getId$f() {
|
|
9895
9904
|
return 'query';
|
|
9896
9905
|
}
|
|
9897
9906
|
|
|
@@ -9900,7 +9909,7 @@ function getAdditionalId() {
|
|
|
9900
9909
|
}
|
|
9901
9910
|
|
|
9902
9911
|
function getCurrentRefinementQuery(props, searchState, context) {
|
|
9903
|
-
var id = getId();
|
|
9912
|
+
var id = getId$f();
|
|
9904
9913
|
var currentRefinement = getCurrentRefinementValue(props, searchState, context, id, '');
|
|
9905
9914
|
|
|
9906
9915
|
if (currentRefinement) {
|
|
@@ -9921,10 +9930,10 @@ function getCurrentRefinementAdditional(props, searchState, context) {
|
|
|
9921
9930
|
return {};
|
|
9922
9931
|
}
|
|
9923
9932
|
|
|
9924
|
-
function _refine(props, searchState, nextRefinement, context) {
|
|
9933
|
+
function _refine$9(props, searchState, nextRefinement, context) {
|
|
9925
9934
|
var _nextValue;
|
|
9926
9935
|
|
|
9927
|
-
var id = getId();
|
|
9936
|
+
var id = getId$f();
|
|
9928
9937
|
var voiceParams = getAdditionalId();
|
|
9929
9938
|
var queryLanguages = props.language ? {
|
|
9930
9939
|
queryLanguages: [props.language.split('-')[0]]
|
|
@@ -9941,15 +9950,15 @@ function _refine(props, searchState, nextRefinement, context) {
|
|
|
9941
9950
|
return refineValue(searchState, nextValue, context, resetPage);
|
|
9942
9951
|
}
|
|
9943
9952
|
|
|
9944
|
-
function _cleanUp(props, searchState, context) {
|
|
9945
|
-
var interimState = cleanUpValue(searchState, context, getId());
|
|
9953
|
+
function _cleanUp$7(props, searchState, context) {
|
|
9954
|
+
var interimState = cleanUpValue(searchState, context, getId$f());
|
|
9946
9955
|
return cleanUpValue(interimState, context, getAdditionalId());
|
|
9947
9956
|
}
|
|
9948
9957
|
|
|
9949
9958
|
var connectVoiceSearch = createConnectorWithContext({
|
|
9950
9959
|
displayName: 'AlgoliaVoiceSearch',
|
|
9951
9960
|
propTypes: {
|
|
9952
|
-
defaultRefinement: PropTypes__default
|
|
9961
|
+
defaultRefinement: PropTypes__default.string
|
|
9953
9962
|
},
|
|
9954
9963
|
getProvidedProps: function getProvidedProps(props, searchState, searchResults) {
|
|
9955
9964
|
return {
|
|
@@ -9961,13 +9970,13 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9961
9970
|
};
|
|
9962
9971
|
},
|
|
9963
9972
|
refine: function refine(props, searchState, nextRefinement) {
|
|
9964
|
-
return _refine(props, searchState, nextRefinement, {
|
|
9973
|
+
return _refine$9(props, searchState, nextRefinement, {
|
|
9965
9974
|
ais: props.contextValue,
|
|
9966
9975
|
multiIndexContext: props.indexContextValue
|
|
9967
9976
|
});
|
|
9968
9977
|
},
|
|
9969
9978
|
cleanUp: function cleanUp(props, searchState) {
|
|
9970
|
-
return _cleanUp(props, searchState, {
|
|
9979
|
+
return _cleanUp$7(props, searchState, {
|
|
9971
9980
|
ais: props.contextValue,
|
|
9972
9981
|
multiIndexContext: props.indexContextValue
|
|
9973
9982
|
});
|
|
@@ -9984,7 +9993,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9984
9993
|
return searchParameters.setQuery(query).setQueryParameters(additionalParams);
|
|
9985
9994
|
},
|
|
9986
9995
|
getMetadata: function getMetadata(props, searchState) {
|
|
9987
|
-
var id = getId();
|
|
9996
|
+
var id = getId$f();
|
|
9988
9997
|
var currentRefinement = getCurrentRefinementQuery(props, searchState, {
|
|
9989
9998
|
ais: props.contextValue,
|
|
9990
9999
|
multiIndexContext: props.indexContextValue
|
|
@@ -9998,7 +10007,7 @@ var connectVoiceSearch = createConnectorWithContext({
|
|
|
9998
10007
|
items: currentRefinement === null ? [] : [{
|
|
9999
10008
|
label: "".concat(id, ": ").concat(currentRefinement),
|
|
10000
10009
|
value: function value(nextState) {
|
|
10001
|
-
return _refine(props, nextState, '', {
|
|
10010
|
+
return _refine$9(props, nextState, '', {
|
|
10002
10011
|
ais: props.contextValue,
|
|
10003
10012
|
multiIndexContext: props.indexContextValue
|
|
10004
10013
|
});
|
|
@@ -10022,7 +10031,7 @@ var createClassNames = function createClassNames(block) {
|
|
|
10022
10031
|
var baseClassName = "".concat(prefix, "-").concat(block);
|
|
10023
10032
|
return element ? "".concat(baseClassName, "-").concat(element) : baseClassName;
|
|
10024
10033
|
});
|
|
10025
|
-
return index.classnames(suitElements);
|
|
10034
|
+
return index$5.classnames(suitElements);
|
|
10026
10035
|
};
|
|
10027
10036
|
};
|
|
10028
10037
|
var isSpecialClick = function isSpecialClick(event) {
|
|
@@ -10051,7 +10060,7 @@ function range(_ref) {
|
|
|
10051
10060
|
return (start + current) * limitStep;
|
|
10052
10061
|
});
|
|
10053
10062
|
}
|
|
10054
|
-
function find(array, comparator) {
|
|
10063
|
+
function find$2(array, comparator) {
|
|
10055
10064
|
if (!Array.isArray(array)) {
|
|
10056
10065
|
return undefined;
|
|
10057
10066
|
}
|
|
@@ -10065,11 +10074,11 @@ function find(array, comparator) {
|
|
|
10065
10074
|
return undefined;
|
|
10066
10075
|
}
|
|
10067
10076
|
|
|
10068
|
-
var cx
|
|
10077
|
+
var cx = createClassNames('Panel');
|
|
10069
10078
|
|
|
10070
|
-
var _createContext = React.createContext(function setCanRefine() {}),
|
|
10071
|
-
PanelConsumer = _createContext.Consumer,
|
|
10072
|
-
PanelProvider = _createContext.Provider;
|
|
10079
|
+
var _createContext$1 = React.createContext(function setCanRefine() {}),
|
|
10080
|
+
PanelConsumer = _createContext$1.Consumer,
|
|
10081
|
+
PanelProvider = _createContext$1.Provider;
|
|
10073
10082
|
|
|
10074
10083
|
var Panel =
|
|
10075
10084
|
/*#__PURE__*/
|
|
@@ -10111,16 +10120,16 @@ function (_Component) {
|
|
|
10111
10120
|
header = _this$props.header,
|
|
10112
10121
|
footer = _this$props.footer;
|
|
10113
10122
|
var canRefine = this.state.canRefine;
|
|
10114
|
-
return React__default
|
|
10115
|
-
className: index.classnames(cx
|
|
10116
|
-
}, header && React__default
|
|
10117
|
-
className: cx
|
|
10118
|
-
}, header), React__default
|
|
10119
|
-
className: cx
|
|
10120
|
-
}, React__default
|
|
10123
|
+
return React__default.createElement("div", {
|
|
10124
|
+
className: index$5.classnames(cx('', !canRefine && '-noRefinement'), className)
|
|
10125
|
+
}, header && React__default.createElement("div", {
|
|
10126
|
+
className: cx('header')
|
|
10127
|
+
}, header), React__default.createElement("div", {
|
|
10128
|
+
className: cx('body')
|
|
10129
|
+
}, React__default.createElement(PanelProvider, {
|
|
10121
10130
|
value: this.setCanRefine
|
|
10122
|
-
}, children)), footer && React__default
|
|
10123
|
-
className: cx
|
|
10131
|
+
}, children)), footer && React__default.createElement("div", {
|
|
10132
|
+
className: cx('footer')
|
|
10124
10133
|
}, footer));
|
|
10125
10134
|
}
|
|
10126
10135
|
}]);
|
|
@@ -10129,10 +10138,10 @@ function (_Component) {
|
|
|
10129
10138
|
}(React.Component);
|
|
10130
10139
|
|
|
10131
10140
|
_defineProperty(Panel, "propTypes", {
|
|
10132
|
-
children: PropTypes__default
|
|
10133
|
-
className: PropTypes__default
|
|
10134
|
-
header: PropTypes__default
|
|
10135
|
-
footer: PropTypes__default
|
|
10141
|
+
children: PropTypes__default.node.isRequired,
|
|
10142
|
+
className: PropTypes__default.string,
|
|
10143
|
+
header: PropTypes__default.node,
|
|
10144
|
+
footer: PropTypes__default.node
|
|
10136
10145
|
});
|
|
10137
10146
|
|
|
10138
10147
|
_defineProperty(Panel, "defaultProps", {
|
|
@@ -10175,16 +10184,16 @@ function (_Component) {
|
|
|
10175
10184
|
}(React.Component);
|
|
10176
10185
|
|
|
10177
10186
|
_defineProperty(PanelCallbackHandler, "propTypes", {
|
|
10178
|
-
children: PropTypes__default
|
|
10179
|
-
canRefine: PropTypes__default
|
|
10180
|
-
setCanRefine: PropTypes__default
|
|
10187
|
+
children: PropTypes__default.node.isRequired,
|
|
10188
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
10189
|
+
setCanRefine: PropTypes__default.func.isRequired
|
|
10181
10190
|
});
|
|
10182
10191
|
|
|
10183
10192
|
var PanelWrapper = function PanelWrapper(_ref) {
|
|
10184
10193
|
var canRefine = _ref.canRefine,
|
|
10185
10194
|
children = _ref.children;
|
|
10186
|
-
return React__default
|
|
10187
|
-
return React__default
|
|
10195
|
+
return React__default.createElement(PanelConsumer, null, function (setCanRefine) {
|
|
10196
|
+
return React__default.createElement(PanelCallbackHandler, {
|
|
10188
10197
|
setCanRefine: setCanRefine,
|
|
10189
10198
|
canRefine: canRefine
|
|
10190
10199
|
}, children);
|
|
@@ -10192,8 +10201,8 @@ var PanelWrapper = function PanelWrapper(_ref) {
|
|
|
10192
10201
|
};
|
|
10193
10202
|
|
|
10194
10203
|
PanelWrapper.propTypes = {
|
|
10195
|
-
canRefine: PropTypes__default
|
|
10196
|
-
children: PropTypes__default
|
|
10204
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
10205
|
+
children: PropTypes__default.node.isRequired
|
|
10197
10206
|
};
|
|
10198
10207
|
|
|
10199
10208
|
var Link =
|
|
@@ -10230,7 +10239,7 @@ function (_Component) {
|
|
|
10230
10239
|
_createClass(Link, [{
|
|
10231
10240
|
key: "render",
|
|
10232
10241
|
value: function render() {
|
|
10233
|
-
return React__default
|
|
10242
|
+
return React__default.createElement("a", index$5._extends({}, this.props, {
|
|
10234
10243
|
onClick: this.onClick
|
|
10235
10244
|
}));
|
|
10236
10245
|
}
|
|
@@ -10240,13 +10249,13 @@ function (_Component) {
|
|
|
10240
10249
|
}(React.Component);
|
|
10241
10250
|
|
|
10242
10251
|
_defineProperty(Link, "propTypes", {
|
|
10243
|
-
onClick: PropTypes__default
|
|
10252
|
+
onClick: PropTypes__default.func.isRequired
|
|
10244
10253
|
});
|
|
10245
10254
|
|
|
10246
|
-
var cx$
|
|
10247
|
-
var itemsPropType
|
|
10248
|
-
label: PropTypes__default
|
|
10249
|
-
value: PropTypes__default
|
|
10255
|
+
var cx$1 = createClassNames('Breadcrumb');
|
|
10256
|
+
var itemsPropType = PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
10257
|
+
label: PropTypes__default.string.isRequired,
|
|
10258
|
+
value: PropTypes__default.string.isRequired
|
|
10250
10259
|
}));
|
|
10251
10260
|
|
|
10252
10261
|
var Breadcrumb =
|
|
@@ -10272,10 +10281,10 @@ function (_Component) {
|
|
|
10272
10281
|
separator = _this$props.separator,
|
|
10273
10282
|
translate = _this$props.translate,
|
|
10274
10283
|
className = _this$props.className;
|
|
10275
|
-
var rootPath = canRefine ? React__default
|
|
10276
|
-
className: cx$
|
|
10277
|
-
}, React__default
|
|
10278
|
-
className: cx$
|
|
10284
|
+
var rootPath = canRefine ? React__default.createElement("li", {
|
|
10285
|
+
className: cx$1('item')
|
|
10286
|
+
}, React__default.createElement(Link, {
|
|
10287
|
+
className: cx$1('link'),
|
|
10279
10288
|
onClick: function onClick() {
|
|
10280
10289
|
return !rootURL ? refine() : null;
|
|
10281
10290
|
},
|
|
@@ -10283,23 +10292,23 @@ function (_Component) {
|
|
|
10283
10292
|
}, translate('rootLabel'))) : null;
|
|
10284
10293
|
var breadcrumb = items.map(function (item, idx) {
|
|
10285
10294
|
var isLast = idx === items.length - 1;
|
|
10286
|
-
return React__default
|
|
10287
|
-
className: cx$
|
|
10295
|
+
return React__default.createElement("li", {
|
|
10296
|
+
className: cx$1('item', isLast && 'item--selected'),
|
|
10288
10297
|
key: idx
|
|
10289
|
-
}, React__default
|
|
10290
|
-
className: cx$
|
|
10291
|
-
}, separator), !isLast ? React__default
|
|
10292
|
-
className: cx$
|
|
10298
|
+
}, React__default.createElement("span", {
|
|
10299
|
+
className: cx$1('separator')
|
|
10300
|
+
}, separator), !isLast ? React__default.createElement(Link, {
|
|
10301
|
+
className: cx$1('link'),
|
|
10293
10302
|
onClick: function onClick() {
|
|
10294
10303
|
return refine(item.value);
|
|
10295
10304
|
},
|
|
10296
10305
|
href: createURL(item.value)
|
|
10297
10306
|
}, item.label) : item.label);
|
|
10298
10307
|
});
|
|
10299
|
-
return React__default
|
|
10300
|
-
className: index.classnames(cx$
|
|
10301
|
-
}, React__default
|
|
10302
|
-
className: cx$
|
|
10308
|
+
return React__default.createElement("div", {
|
|
10309
|
+
className: index$5.classnames(cx$1('', !canRefine && '-noRefinement'), className)
|
|
10310
|
+
}, React__default.createElement("ul", {
|
|
10311
|
+
className: cx$1('list')
|
|
10303
10312
|
}, rootPath, breadcrumb));
|
|
10304
10313
|
}
|
|
10305
10314
|
}]);
|
|
@@ -10308,14 +10317,14 @@ function (_Component) {
|
|
|
10308
10317
|
}(React.Component);
|
|
10309
10318
|
|
|
10310
10319
|
_defineProperty(Breadcrumb, "propTypes", {
|
|
10311
|
-
canRefine: PropTypes__default
|
|
10312
|
-
createURL: PropTypes__default
|
|
10313
|
-
items: itemsPropType
|
|
10314
|
-
refine: PropTypes__default
|
|
10315
|
-
rootURL: PropTypes__default
|
|
10316
|
-
separator: PropTypes__default
|
|
10317
|
-
translate: PropTypes__default
|
|
10318
|
-
className: PropTypes__default
|
|
10320
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
10321
|
+
createURL: PropTypes__default.func.isRequired,
|
|
10322
|
+
items: itemsPropType,
|
|
10323
|
+
refine: PropTypes__default.func.isRequired,
|
|
10324
|
+
rootURL: PropTypes__default.string,
|
|
10325
|
+
separator: PropTypes__default.node,
|
|
10326
|
+
translate: PropTypes__default.func.isRequired,
|
|
10327
|
+
className: PropTypes__default.string
|
|
10319
10328
|
});
|
|
10320
10329
|
|
|
10321
10330
|
_defineProperty(Breadcrumb, "defaultProps", {
|
|
@@ -10417,12 +10426,12 @@ var Breadcrumb$1 = translatable({
|
|
|
10417
10426
|
*/
|
|
10418
10427
|
|
|
10419
10428
|
var BreadcrumbWidget = function BreadcrumbWidget(props) {
|
|
10420
|
-
return React__default
|
|
10429
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(Breadcrumb$1, props));
|
|
10421
10430
|
};
|
|
10422
10431
|
|
|
10423
10432
|
connectBreadcrumb(BreadcrumbWidget);
|
|
10424
10433
|
|
|
10425
|
-
var cx$
|
|
10434
|
+
var cx$2 = createClassNames('ClearRefinements');
|
|
10426
10435
|
|
|
10427
10436
|
var ClearRefinements =
|
|
10428
10437
|
/*#__PURE__*/
|
|
@@ -10444,10 +10453,10 @@ function (_Component) {
|
|
|
10444
10453
|
refine = _this$props.refine,
|
|
10445
10454
|
translate = _this$props.translate,
|
|
10446
10455
|
className = _this$props.className;
|
|
10447
|
-
return React__default
|
|
10448
|
-
className: index.classnames(cx$
|
|
10449
|
-
}, React__default
|
|
10450
|
-
className: cx$
|
|
10456
|
+
return React__default.createElement("div", {
|
|
10457
|
+
className: index$5.classnames(cx$2(''), className)
|
|
10458
|
+
}, React__default.createElement("button", {
|
|
10459
|
+
className: cx$2('button', !canRefine && 'button--disabled'),
|
|
10451
10460
|
onClick: function onClick() {
|
|
10452
10461
|
return refine(items);
|
|
10453
10462
|
},
|
|
@@ -10460,11 +10469,11 @@ function (_Component) {
|
|
|
10460
10469
|
}(React.Component);
|
|
10461
10470
|
|
|
10462
10471
|
_defineProperty(ClearRefinements, "propTypes", {
|
|
10463
|
-
items: PropTypes__default
|
|
10464
|
-
canRefine: PropTypes__default
|
|
10465
|
-
refine: PropTypes__default
|
|
10466
|
-
translate: PropTypes__default
|
|
10467
|
-
className: PropTypes__default
|
|
10472
|
+
items: PropTypes__default.arrayOf(PropTypes__default.object).isRequired,
|
|
10473
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
10474
|
+
refine: PropTypes__default.func.isRequired,
|
|
10475
|
+
translate: PropTypes__default.func.isRequired,
|
|
10476
|
+
className: PropTypes__default.string
|
|
10468
10477
|
});
|
|
10469
10478
|
|
|
10470
10479
|
_defineProperty(ClearRefinements, "defaultProps", {
|
|
@@ -10510,63 +10519,63 @@ var ClearRefinements$1 = translatable({
|
|
|
10510
10519
|
*/
|
|
10511
10520
|
|
|
10512
10521
|
var ClearRefinementsWidget = function ClearRefinementsWidget(props) {
|
|
10513
|
-
return React__default
|
|
10522
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(ClearRefinements$1, props));
|
|
10514
10523
|
};
|
|
10515
10524
|
|
|
10516
10525
|
connectCurrentRefinements(ClearRefinementsWidget);
|
|
10517
10526
|
|
|
10518
|
-
var cx$
|
|
10527
|
+
var cx$3 = createClassNames('CurrentRefinements');
|
|
10519
10528
|
var CurrentRefinements = function CurrentRefinements(_ref) {
|
|
10520
10529
|
var items = _ref.items,
|
|
10521
10530
|
canRefine = _ref.canRefine,
|
|
10522
10531
|
refine = _ref.refine,
|
|
10523
10532
|
translate = _ref.translate,
|
|
10524
10533
|
className = _ref.className;
|
|
10525
|
-
return React__default
|
|
10526
|
-
className: index.classnames(cx$
|
|
10527
|
-
}, React__default
|
|
10528
|
-
className: cx$
|
|
10534
|
+
return React__default.createElement("div", {
|
|
10535
|
+
className: index$5.classnames(cx$3('', !canRefine && '-noRefinement'), className)
|
|
10536
|
+
}, React__default.createElement("ul", {
|
|
10537
|
+
className: cx$3('list', !canRefine && 'list--noRefinement')
|
|
10529
10538
|
}, items.map(function (item) {
|
|
10530
|
-
return React__default
|
|
10539
|
+
return React__default.createElement("li", {
|
|
10531
10540
|
key: item.label,
|
|
10532
|
-
className: cx$
|
|
10533
|
-
}, React__default
|
|
10534
|
-
className: cx$
|
|
10541
|
+
className: cx$3('item')
|
|
10542
|
+
}, React__default.createElement("span", {
|
|
10543
|
+
className: cx$3('label')
|
|
10535
10544
|
}, item.label), item.items ? item.items.map(function (nest) {
|
|
10536
|
-
return React__default
|
|
10545
|
+
return React__default.createElement("span", {
|
|
10537
10546
|
key: nest.label,
|
|
10538
|
-
className: cx$
|
|
10539
|
-
}, React__default
|
|
10540
|
-
className: cx$
|
|
10541
|
-
}, nest.label), React__default
|
|
10542
|
-
className: cx$
|
|
10547
|
+
className: cx$3('category')
|
|
10548
|
+
}, React__default.createElement("span", {
|
|
10549
|
+
className: cx$3('categoryLabel')
|
|
10550
|
+
}, nest.label), React__default.createElement("button", {
|
|
10551
|
+
className: cx$3('delete'),
|
|
10543
10552
|
onClick: function onClick() {
|
|
10544
10553
|
return refine(nest.value);
|
|
10545
10554
|
}
|
|
10546
10555
|
}, translate('clearFilter', nest)));
|
|
10547
|
-
}) : React__default
|
|
10548
|
-
className: cx$
|
|
10549
|
-
}, React__default
|
|
10550
|
-
className: cx$
|
|
10556
|
+
}) : React__default.createElement("span", {
|
|
10557
|
+
className: cx$3('category')
|
|
10558
|
+
}, React__default.createElement("button", {
|
|
10559
|
+
className: cx$3('delete'),
|
|
10551
10560
|
onClick: function onClick() {
|
|
10552
10561
|
return refine(item.value);
|
|
10553
10562
|
}
|
|
10554
10563
|
}, translate('clearFilter', item))));
|
|
10555
10564
|
})));
|
|
10556
10565
|
};
|
|
10557
|
-
var itemPropTypes = PropTypes__default
|
|
10558
|
-
label: PropTypes__default
|
|
10559
|
-
value: PropTypes__default
|
|
10566
|
+
var itemPropTypes = PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
10567
|
+
label: PropTypes__default.string.isRequired,
|
|
10568
|
+
value: PropTypes__default.func.isRequired,
|
|
10560
10569
|
items: function items() {
|
|
10561
10570
|
return itemPropTypes.apply(void 0, arguments);
|
|
10562
10571
|
}
|
|
10563
10572
|
}));
|
|
10564
10573
|
CurrentRefinements.propTypes = {
|
|
10565
10574
|
items: itemPropTypes.isRequired,
|
|
10566
|
-
canRefine: PropTypes__default
|
|
10567
|
-
refine: PropTypes__default
|
|
10568
|
-
translate: PropTypes__default
|
|
10569
|
-
className: PropTypes__default
|
|
10575
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
10576
|
+
refine: PropTypes__default.func.isRequired,
|
|
10577
|
+
translate: PropTypes__default.func.isRequired,
|
|
10578
|
+
className: PropTypes__default.string
|
|
10570
10579
|
};
|
|
10571
10580
|
CurrentRefinements.defaultProps = {
|
|
10572
10581
|
className: ''
|
|
@@ -10618,33 +10627,33 @@ var CurrentRefinements$1 = translatable({
|
|
|
10618
10627
|
*/
|
|
10619
10628
|
|
|
10620
10629
|
var CurrentRefinementsWidget = function CurrentRefinementsWidget(props) {
|
|
10621
|
-
return React__default
|
|
10630
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(CurrentRefinements$1, props));
|
|
10622
10631
|
};
|
|
10623
10632
|
|
|
10624
10633
|
connectCurrentRefinements(CurrentRefinementsWidget);
|
|
10625
10634
|
|
|
10626
|
-
var cx$
|
|
10627
|
-
var defaultLoadingIndicator = React__default
|
|
10635
|
+
var cx$4 = createClassNames('SearchBox');
|
|
10636
|
+
var defaultLoadingIndicator = React__default.createElement("svg", {
|
|
10628
10637
|
width: "18",
|
|
10629
10638
|
height: "18",
|
|
10630
10639
|
viewBox: "0 0 38 38",
|
|
10631
10640
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10632
10641
|
stroke: "#444",
|
|
10633
|
-
className: cx$
|
|
10634
|
-
}, React__default
|
|
10642
|
+
className: cx$4('loadingIcon')
|
|
10643
|
+
}, React__default.createElement("g", {
|
|
10635
10644
|
fill: "none",
|
|
10636
10645
|
fillRule: "evenodd"
|
|
10637
|
-
}, React__default
|
|
10646
|
+
}, React__default.createElement("g", {
|
|
10638
10647
|
transform: "translate(1 1)",
|
|
10639
10648
|
strokeWidth: "2"
|
|
10640
|
-
}, React__default
|
|
10649
|
+
}, React__default.createElement("circle", {
|
|
10641
10650
|
strokeOpacity: ".5",
|
|
10642
10651
|
cx: "18",
|
|
10643
10652
|
cy: "18",
|
|
10644
10653
|
r: "18"
|
|
10645
|
-
}), React__default
|
|
10654
|
+
}), React__default.createElement("path", {
|
|
10646
10655
|
d: "M36 18c0-9.94-8.06-18-18-18"
|
|
10647
|
-
}, React__default
|
|
10656
|
+
}, React__default.createElement("animateTransform", {
|
|
10648
10657
|
attributeName: "transform",
|
|
10649
10658
|
type: "rotate",
|
|
10650
10659
|
from: "0 18 18",
|
|
@@ -10652,26 +10661,26 @@ var defaultLoadingIndicator = React__default['default'].createElement("svg", {
|
|
|
10652
10661
|
dur: "1s",
|
|
10653
10662
|
repeatCount: "indefinite"
|
|
10654
10663
|
})))));
|
|
10655
|
-
var defaultReset = React__default
|
|
10656
|
-
className: cx$
|
|
10664
|
+
var defaultReset = React__default.createElement("svg", {
|
|
10665
|
+
className: cx$4('resetIcon'),
|
|
10657
10666
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10658
10667
|
viewBox: "0 0 20 20",
|
|
10659
10668
|
width: "10",
|
|
10660
10669
|
height: "10"
|
|
10661
|
-
}, React__default
|
|
10670
|
+
}, React__default.createElement("path", {
|
|
10662
10671
|
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"
|
|
10663
10672
|
}));
|
|
10664
|
-
var defaultSubmit = React__default
|
|
10665
|
-
className: cx$
|
|
10673
|
+
var defaultSubmit = React__default.createElement("svg", {
|
|
10674
|
+
className: cx$4('submitIcon'),
|
|
10666
10675
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10667
10676
|
width: "10",
|
|
10668
10677
|
height: "10",
|
|
10669
10678
|
viewBox: "0 0 40 40"
|
|
10670
|
-
}, React__default
|
|
10679
|
+
}, React__default.createElement("path", {
|
|
10671
10680
|
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"
|
|
10672
10681
|
}));
|
|
10673
10682
|
|
|
10674
|
-
var SearchBox
|
|
10683
|
+
var SearchBox =
|
|
10675
10684
|
/*#__PURE__*/
|
|
10676
10685
|
function (_Component) {
|
|
10677
10686
|
_inherits(SearchBox, _Component);
|
|
@@ -10833,16 +10842,16 @@ function (_Component) {
|
|
|
10833
10842
|
var isSearchStalled = this.props.showLoadingIndicator && this.props.isSearchStalled;
|
|
10834
10843
|
/* eslint-disable max-len */
|
|
10835
10844
|
|
|
10836
|
-
return React__default
|
|
10837
|
-
className: index.classnames(cx$
|
|
10838
|
-
}, React__default
|
|
10845
|
+
return React__default.createElement("div", {
|
|
10846
|
+
className: index$5.classnames(cx$4(''), className)
|
|
10847
|
+
}, React__default.createElement("form", {
|
|
10839
10848
|
noValidate: true,
|
|
10840
10849
|
onSubmit: this.props.onSubmit ? this.props.onSubmit : this.onSubmit,
|
|
10841
10850
|
onReset: this.onReset,
|
|
10842
|
-
className: cx$
|
|
10851
|
+
className: cx$4('form', isSearchStalled && 'form--stalledSearch'),
|
|
10843
10852
|
action: "",
|
|
10844
10853
|
role: "search"
|
|
10845
|
-
}, React__default
|
|
10854
|
+
}, React__default.createElement("input", index$5._extends({
|
|
10846
10855
|
ref: this.onInputMount,
|
|
10847
10856
|
type: "search",
|
|
10848
10857
|
placeholder: translate('placeholder'),
|
|
@@ -10856,19 +10865,19 @@ function (_Component) {
|
|
|
10856
10865
|
value: query,
|
|
10857
10866
|
onChange: this.onChange
|
|
10858
10867
|
}, searchInputEvents, {
|
|
10859
|
-
className: cx$
|
|
10860
|
-
})), React__default
|
|
10868
|
+
className: cx$4('input')
|
|
10869
|
+
})), React__default.createElement("button", {
|
|
10861
10870
|
type: "submit",
|
|
10862
10871
|
title: translate('submitTitle'),
|
|
10863
|
-
className: cx$
|
|
10864
|
-
}, submit), React__default
|
|
10872
|
+
className: cx$4('submit')
|
|
10873
|
+
}, submit), React__default.createElement("button", {
|
|
10865
10874
|
type: "reset",
|
|
10866
10875
|
title: translate('resetTitle'),
|
|
10867
|
-
className: cx$
|
|
10876
|
+
className: cx$4('reset'),
|
|
10868
10877
|
hidden: !query || isSearchStalled
|
|
10869
|
-
}, reset), this.props.showLoadingIndicator && React__default
|
|
10878
|
+
}, reset), this.props.showLoadingIndicator && React__default.createElement("span", {
|
|
10870
10879
|
hidden: !isSearchStalled,
|
|
10871
|
-
className: cx$
|
|
10880
|
+
className: cx$4('loadingIndicator')
|
|
10872
10881
|
}, loadingIndicator)));
|
|
10873
10882
|
/* eslint-enable */
|
|
10874
10883
|
}
|
|
@@ -10877,28 +10886,28 @@ function (_Component) {
|
|
|
10877
10886
|
return SearchBox;
|
|
10878
10887
|
}(React.Component);
|
|
10879
10888
|
|
|
10880
|
-
_defineProperty(SearchBox
|
|
10881
|
-
currentRefinement: PropTypes__default
|
|
10882
|
-
className: PropTypes__default
|
|
10883
|
-
refine: PropTypes__default
|
|
10884
|
-
translate: PropTypes__default
|
|
10885
|
-
loadingIndicator: PropTypes__default
|
|
10886
|
-
reset: PropTypes__default
|
|
10887
|
-
submit: PropTypes__default
|
|
10888
|
-
focusShortcuts: PropTypes__default
|
|
10889
|
-
autoFocus: PropTypes__default
|
|
10890
|
-
searchAsYouType: PropTypes__default
|
|
10891
|
-
onSubmit: PropTypes__default
|
|
10892
|
-
onReset: PropTypes__default
|
|
10893
|
-
onChange: PropTypes__default
|
|
10894
|
-
isSearchStalled: PropTypes__default
|
|
10895
|
-
showLoadingIndicator: PropTypes__default
|
|
10896
|
-
inputRef: PropTypes__default
|
|
10897
|
-
current: PropTypes__default
|
|
10889
|
+
_defineProperty(SearchBox, "propTypes", {
|
|
10890
|
+
currentRefinement: PropTypes__default.string,
|
|
10891
|
+
className: PropTypes__default.string,
|
|
10892
|
+
refine: PropTypes__default.func.isRequired,
|
|
10893
|
+
translate: PropTypes__default.func.isRequired,
|
|
10894
|
+
loadingIndicator: PropTypes__default.node,
|
|
10895
|
+
reset: PropTypes__default.node,
|
|
10896
|
+
submit: PropTypes__default.node,
|
|
10897
|
+
focusShortcuts: PropTypes__default.arrayOf(PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number])),
|
|
10898
|
+
autoFocus: PropTypes__default.bool,
|
|
10899
|
+
searchAsYouType: PropTypes__default.bool,
|
|
10900
|
+
onSubmit: PropTypes__default.func,
|
|
10901
|
+
onReset: PropTypes__default.func,
|
|
10902
|
+
onChange: PropTypes__default.func,
|
|
10903
|
+
isSearchStalled: PropTypes__default.bool,
|
|
10904
|
+
showLoadingIndicator: PropTypes__default.bool,
|
|
10905
|
+
inputRef: PropTypes__default.oneOfType([PropTypes__default.func, PropTypes__default.exact({
|
|
10906
|
+
current: PropTypes__default.object
|
|
10898
10907
|
})])
|
|
10899
10908
|
});
|
|
10900
10909
|
|
|
10901
|
-
_defineProperty(SearchBox
|
|
10910
|
+
_defineProperty(SearchBox, "defaultProps", {
|
|
10902
10911
|
currentRefinement: '',
|
|
10903
10912
|
className: '',
|
|
10904
10913
|
focusShortcuts: ['s', '/'],
|
|
@@ -10911,15 +10920,15 @@ _defineProperty(SearchBox$1, "defaultProps", {
|
|
|
10911
10920
|
submit: defaultSubmit
|
|
10912
10921
|
});
|
|
10913
10922
|
|
|
10914
|
-
var SearchBox$
|
|
10923
|
+
var SearchBox$1 = translatable({
|
|
10915
10924
|
resetTitle: 'Clear the search query.',
|
|
10916
10925
|
submitTitle: 'Submit your search query.',
|
|
10917
10926
|
placeholder: 'Search here…'
|
|
10918
|
-
})(SearchBox
|
|
10927
|
+
})(SearchBox);
|
|
10919
10928
|
|
|
10920
|
-
var itemsPropType$1 = PropTypes__default
|
|
10921
|
-
value: PropTypes__default
|
|
10922
|
-
label: PropTypes__default
|
|
10929
|
+
var itemsPropType$1 = PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
10930
|
+
value: PropTypes__default.any,
|
|
10931
|
+
label: PropTypes__default.node.isRequired,
|
|
10923
10932
|
items: function items() {
|
|
10924
10933
|
return itemsPropType$1.apply(void 0, arguments);
|
|
10925
10934
|
}
|
|
@@ -10961,10 +10970,10 @@ function (_Component) {
|
|
|
10961
10970
|
|
|
10962
10971
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
10963
10972
|
var itemHasChildren = item.items && Boolean(item.items.length);
|
|
10964
|
-
return React__default
|
|
10973
|
+
return React__default.createElement("li", {
|
|
10965
10974
|
key: item.key || item.label,
|
|
10966
10975
|
className: _this.props.cx('item', item.isRefined && 'item--selected', item.noRefinement && 'item--noRefinement', itemHasChildren && 'item--parent')
|
|
10967
|
-
}, _this.props.renderItem(item, resetQuery), itemHasChildren && React__default
|
|
10976
|
+
}, _this.props.renderItem(item, resetQuery), itemHasChildren && React__default.createElement("ul", {
|
|
10968
10977
|
className: _this.props.cx('list', 'list--child')
|
|
10969
10978
|
}, item.items.slice(0, _this.getLimit()).map(function (child) {
|
|
10970
10979
|
return _this.renderItem(child, item);
|
|
@@ -10992,7 +11001,7 @@ function (_Component) {
|
|
|
10992
11001
|
return null;
|
|
10993
11002
|
}
|
|
10994
11003
|
|
|
10995
|
-
return React__default
|
|
11004
|
+
return React__default.createElement("button", {
|
|
10996
11005
|
disabled: disabled,
|
|
10997
11006
|
className: cx('showMore', disabled && 'showMore--disabled'),
|
|
10998
11007
|
onClick: this.onShowMoreClick
|
|
@@ -11010,12 +11019,12 @@ function (_Component) {
|
|
|
11010
11019
|
translate = _this$props3.translate,
|
|
11011
11020
|
items = _this$props3.items,
|
|
11012
11021
|
selectItem = _this$props3.selectItem;
|
|
11013
|
-
var noResults = items.length === 0 && this.state.query !== '' ? React__default
|
|
11022
|
+
var noResults = items.length === 0 && this.state.query !== '' ? React__default.createElement("div", {
|
|
11014
11023
|
className: cx('noResults')
|
|
11015
11024
|
}, translate('noResults')) : null;
|
|
11016
|
-
return React__default
|
|
11025
|
+
return React__default.createElement("div", {
|
|
11017
11026
|
className: cx('searchBox')
|
|
11018
|
-
}, React__default
|
|
11027
|
+
}, React__default.createElement(SearchBox$1, {
|
|
11019
11028
|
currentRefinement: this.state.query,
|
|
11020
11029
|
refine: function refine(value) {
|
|
11021
11030
|
_this2.setState({
|
|
@@ -11048,10 +11057,10 @@ function (_Component) {
|
|
|
11048
11057
|
searchable = _this$props4.searchable,
|
|
11049
11058
|
canRefine = _this$props4.canRefine;
|
|
11050
11059
|
var searchBox = searchable ? this.renderSearchBox() : null;
|
|
11051
|
-
var rootClassName = index.classnames(cx('', !canRefine && '-noRefinement'), className);
|
|
11060
|
+
var rootClassName = index$5.classnames(cx('', !canRefine && '-noRefinement'), className);
|
|
11052
11061
|
|
|
11053
11062
|
if (items.length === 0) {
|
|
11054
|
-
return React__default
|
|
11063
|
+
return React__default.createElement("div", {
|
|
11055
11064
|
className: rootClassName
|
|
11056
11065
|
}, searchBox);
|
|
11057
11066
|
} // Always limit the number of items we show on screen, since the actual
|
|
@@ -11059,9 +11068,9 @@ function (_Component) {
|
|
|
11059
11068
|
// option.
|
|
11060
11069
|
|
|
11061
11070
|
|
|
11062
|
-
return React__default
|
|
11071
|
+
return React__default.createElement("div", {
|
|
11063
11072
|
className: rootClassName
|
|
11064
|
-
}, searchBox, React__default
|
|
11073
|
+
}, searchBox, React__default.createElement("ul", {
|
|
11065
11074
|
className: cx('list', !canRefine && 'list--noRefinement')
|
|
11066
11075
|
}, items.slice(0, this.getLimit()).map(function (item) {
|
|
11067
11076
|
return _this3.renderItem(item, _this3.resetQuery);
|
|
@@ -11073,21 +11082,21 @@ function (_Component) {
|
|
|
11073
11082
|
}(React.Component);
|
|
11074
11083
|
|
|
11075
11084
|
_defineProperty(List, "propTypes", {
|
|
11076
|
-
cx: PropTypes__default
|
|
11085
|
+
cx: PropTypes__default.func.isRequired,
|
|
11077
11086
|
// Only required with showMore.
|
|
11078
|
-
translate: PropTypes__default
|
|
11087
|
+
translate: PropTypes__default.func,
|
|
11079
11088
|
items: itemsPropType$1,
|
|
11080
|
-
renderItem: PropTypes__default
|
|
11081
|
-
selectItem: PropTypes__default
|
|
11082
|
-
className: PropTypes__default
|
|
11083
|
-
showMore: PropTypes__default
|
|
11084
|
-
limit: PropTypes__default
|
|
11085
|
-
showMoreLimit: PropTypes__default
|
|
11086
|
-
show: PropTypes__default
|
|
11087
|
-
searchForItems: PropTypes__default
|
|
11088
|
-
searchable: PropTypes__default
|
|
11089
|
-
isFromSearch: PropTypes__default
|
|
11090
|
-
canRefine: PropTypes__default
|
|
11089
|
+
renderItem: PropTypes__default.func.isRequired,
|
|
11090
|
+
selectItem: PropTypes__default.func,
|
|
11091
|
+
className: PropTypes__default.string,
|
|
11092
|
+
showMore: PropTypes__default.bool,
|
|
11093
|
+
limit: PropTypes__default.number,
|
|
11094
|
+
showMoreLimit: PropTypes__default.number,
|
|
11095
|
+
show: PropTypes__default.func,
|
|
11096
|
+
searchForItems: PropTypes__default.func,
|
|
11097
|
+
searchable: PropTypes__default.bool,
|
|
11098
|
+
isFromSearch: PropTypes__default.bool,
|
|
11099
|
+
canRefine: PropTypes__default.bool
|
|
11091
11100
|
});
|
|
11092
11101
|
|
|
11093
11102
|
_defineProperty(List, "defaultProps", {
|
|
@@ -11095,13 +11104,13 @@ _defineProperty(List, "defaultProps", {
|
|
|
11095
11104
|
isFromSearch: false
|
|
11096
11105
|
});
|
|
11097
11106
|
|
|
11098
|
-
var cx$
|
|
11099
|
-
var itemsPropType = PropTypes__default
|
|
11100
|
-
label: PropTypes__default
|
|
11101
|
-
value: PropTypes__default
|
|
11102
|
-
count: PropTypes__default
|
|
11107
|
+
var cx$5 = createClassNames('HierarchicalMenu');
|
|
11108
|
+
var itemsPropType$2 = PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
11109
|
+
label: PropTypes__default.string.isRequired,
|
|
11110
|
+
value: PropTypes__default.string,
|
|
11111
|
+
count: PropTypes__default.number.isRequired,
|
|
11103
11112
|
items: function items() {
|
|
11104
|
-
return itemsPropType.apply(void 0, arguments);
|
|
11113
|
+
return itemsPropType$2.apply(void 0, arguments);
|
|
11105
11114
|
}
|
|
11106
11115
|
}));
|
|
11107
11116
|
|
|
@@ -11127,16 +11136,16 @@ function (_Component) {
|
|
|
11127
11136
|
var _this$props = _this.props,
|
|
11128
11137
|
createURL = _this$props.createURL,
|
|
11129
11138
|
refine = _this$props.refine;
|
|
11130
|
-
return React__default
|
|
11131
|
-
className: cx$
|
|
11139
|
+
return React__default.createElement(Link, {
|
|
11140
|
+
className: cx$5('link'),
|
|
11132
11141
|
onClick: function onClick() {
|
|
11133
11142
|
return refine(item.value);
|
|
11134
11143
|
},
|
|
11135
11144
|
href: createURL(item.value)
|
|
11136
|
-
}, React__default
|
|
11137
|
-
className: cx$
|
|
11138
|
-
}, item.label), ' ', React__default
|
|
11139
|
-
className: cx$
|
|
11145
|
+
}, React__default.createElement("span", {
|
|
11146
|
+
className: cx$5('label')
|
|
11147
|
+
}, item.label), ' ', React__default.createElement("span", {
|
|
11148
|
+
className: cx$5('count')
|
|
11140
11149
|
}, item.count));
|
|
11141
11150
|
});
|
|
11142
11151
|
|
|
@@ -11154,9 +11163,9 @@ function (_Component) {
|
|
|
11154
11163
|
showMoreLimit = _this$props2.showMoreLimit,
|
|
11155
11164
|
canRefine = _this$props2.canRefine,
|
|
11156
11165
|
className = _this$props2.className;
|
|
11157
|
-
return React__default
|
|
11166
|
+
return React__default.createElement(List, {
|
|
11158
11167
|
renderItem: this.renderItem,
|
|
11159
|
-
cx: cx$
|
|
11168
|
+
cx: cx$5,
|
|
11160
11169
|
translate: translate,
|
|
11161
11170
|
items: items,
|
|
11162
11171
|
showMore: showMore,
|
|
@@ -11172,16 +11181,16 @@ function (_Component) {
|
|
|
11172
11181
|
}(React.Component);
|
|
11173
11182
|
|
|
11174
11183
|
_defineProperty(HierarchicalMenu, "propTypes", {
|
|
11175
|
-
translate: PropTypes__default
|
|
11176
|
-
refine: PropTypes__default
|
|
11177
|
-
createURL: PropTypes__default
|
|
11178
|
-
canRefine: PropTypes__default
|
|
11179
|
-
items: itemsPropType,
|
|
11180
|
-
showMore: PropTypes__default
|
|
11181
|
-
className: PropTypes__default
|
|
11182
|
-
limit: PropTypes__default
|
|
11183
|
-
showMoreLimit: PropTypes__default
|
|
11184
|
-
transformItems: PropTypes__default
|
|
11184
|
+
translate: PropTypes__default.func.isRequired,
|
|
11185
|
+
refine: PropTypes__default.func.isRequired,
|
|
11186
|
+
createURL: PropTypes__default.func.isRequired,
|
|
11187
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
11188
|
+
items: itemsPropType$2,
|
|
11189
|
+
showMore: PropTypes__default.bool,
|
|
11190
|
+
className: PropTypes__default.string,
|
|
11191
|
+
limit: PropTypes__default.number,
|
|
11192
|
+
showMoreLimit: PropTypes__default.number,
|
|
11193
|
+
transformItems: PropTypes__default.func
|
|
11185
11194
|
});
|
|
11186
11195
|
|
|
11187
11196
|
_defineProperty(HierarchicalMenu, "defaultProps", {
|
|
@@ -11285,12 +11294,12 @@ var HierarchicalMenu$1 = translatable({
|
|
|
11285
11294
|
*/
|
|
11286
11295
|
|
|
11287
11296
|
var HierarchicalMenuWidget = function HierarchicalMenuWidget(props) {
|
|
11288
|
-
return React__default
|
|
11297
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(HierarchicalMenu$1, props));
|
|
11289
11298
|
};
|
|
11290
11299
|
|
|
11291
11300
|
connectHierarchicalMenu(HierarchicalMenuWidget);
|
|
11292
11301
|
|
|
11293
|
-
var Highlight
|
|
11302
|
+
var Highlight = function Highlight(_ref) {
|
|
11294
11303
|
var cx = _ref.cx,
|
|
11295
11304
|
value = _ref.value,
|
|
11296
11305
|
highlightedTagName = _ref.highlightedTagName,
|
|
@@ -11298,16 +11307,16 @@ var Highlight$2 = function Highlight(_ref) {
|
|
|
11298
11307
|
nonHighlightedTagName = _ref.nonHighlightedTagName;
|
|
11299
11308
|
var TagName = isHighlighted ? highlightedTagName : nonHighlightedTagName;
|
|
11300
11309
|
var className = isHighlighted ? 'highlighted' : 'nonHighlighted';
|
|
11301
|
-
return React__default
|
|
11310
|
+
return React__default.createElement(TagName, {
|
|
11302
11311
|
className: cx(className)
|
|
11303
11312
|
}, value);
|
|
11304
11313
|
};
|
|
11305
|
-
Highlight
|
|
11306
|
-
cx: PropTypes__default
|
|
11307
|
-
value: PropTypes__default
|
|
11308
|
-
isHighlighted: PropTypes__default
|
|
11309
|
-
highlightedTagName: PropTypes__default
|
|
11310
|
-
nonHighlightedTagName: PropTypes__default
|
|
11314
|
+
Highlight.propTypes = {
|
|
11315
|
+
cx: PropTypes__default.func.isRequired,
|
|
11316
|
+
value: PropTypes__default.string.isRequired,
|
|
11317
|
+
isHighlighted: PropTypes__default.bool.isRequired,
|
|
11318
|
+
highlightedTagName: PropTypes__default.string.isRequired,
|
|
11319
|
+
nonHighlightedTagName: PropTypes__default.string.isRequired
|
|
11311
11320
|
};
|
|
11312
11321
|
|
|
11313
11322
|
var Highlighter = function Highlighter(_ref2) {
|
|
@@ -11325,15 +11334,15 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11325
11334
|
attribute: attribute,
|
|
11326
11335
|
highlightProperty: highlightProperty
|
|
11327
11336
|
});
|
|
11328
|
-
return React__default
|
|
11329
|
-
className: index.classnames(cx(''), className)
|
|
11337
|
+
return React__default.createElement("span", {
|
|
11338
|
+
className: index$5.classnames(cx(''), className)
|
|
11330
11339
|
}, parsedHighlightedValue.map(function (item, i) {
|
|
11331
11340
|
if (Array.isArray(item)) {
|
|
11332
11341
|
var isLast = i === parsedHighlightedValue.length - 1;
|
|
11333
|
-
return React__default
|
|
11342
|
+
return React__default.createElement("span", {
|
|
11334
11343
|
key: i
|
|
11335
11344
|
}, item.map(function (element, index) {
|
|
11336
|
-
return React__default
|
|
11345
|
+
return React__default.createElement(Highlight, {
|
|
11337
11346
|
cx: cx,
|
|
11338
11347
|
key: index,
|
|
11339
11348
|
value: element.value,
|
|
@@ -11341,12 +11350,12 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11341
11350
|
nonHighlightedTagName: nonHighlightedTagName,
|
|
11342
11351
|
isHighlighted: element.isHighlighted
|
|
11343
11352
|
});
|
|
11344
|
-
}), !isLast && React__default
|
|
11353
|
+
}), !isLast && React__default.createElement("span", {
|
|
11345
11354
|
className: cx('separator')
|
|
11346
11355
|
}, separator));
|
|
11347
11356
|
}
|
|
11348
11357
|
|
|
11349
|
-
return React__default
|
|
11358
|
+
return React__default.createElement(Highlight, {
|
|
11350
11359
|
cx: cx,
|
|
11351
11360
|
key: i,
|
|
11352
11361
|
value: item.value,
|
|
@@ -11358,15 +11367,15 @@ var Highlighter = function Highlighter(_ref2) {
|
|
|
11358
11367
|
};
|
|
11359
11368
|
|
|
11360
11369
|
Highlighter.propTypes = {
|
|
11361
|
-
cx: PropTypes__default
|
|
11362
|
-
hit: PropTypes__default
|
|
11363
|
-
attribute: PropTypes__default
|
|
11364
|
-
highlight: PropTypes__default
|
|
11365
|
-
highlightProperty: PropTypes__default
|
|
11366
|
-
tagName: PropTypes__default
|
|
11367
|
-
nonHighlightedTagName: PropTypes__default
|
|
11368
|
-
className: PropTypes__default
|
|
11369
|
-
separator: PropTypes__default
|
|
11370
|
+
cx: PropTypes__default.func.isRequired,
|
|
11371
|
+
hit: PropTypes__default.object.isRequired,
|
|
11372
|
+
attribute: PropTypes__default.oneOfType([PropTypes__default.arrayOf(PropTypes__default.string), PropTypes__default.string]).isRequired,
|
|
11373
|
+
highlight: PropTypes__default.func.isRequired,
|
|
11374
|
+
highlightProperty: PropTypes__default.string.isRequired,
|
|
11375
|
+
tagName: PropTypes__default.string,
|
|
11376
|
+
nonHighlightedTagName: PropTypes__default.string,
|
|
11377
|
+
className: PropTypes__default.string,
|
|
11378
|
+
separator: PropTypes__default.node
|
|
11370
11379
|
};
|
|
11371
11380
|
Highlighter.defaultProps = {
|
|
11372
11381
|
tagName: 'em',
|
|
@@ -11375,12 +11384,12 @@ Highlighter.defaultProps = {
|
|
|
11375
11384
|
separator: ', '
|
|
11376
11385
|
};
|
|
11377
11386
|
|
|
11378
|
-
var cx$
|
|
11387
|
+
var cx$6 = createClassNames('Highlight');
|
|
11379
11388
|
|
|
11380
11389
|
var Highlight$1 = function Highlight(props) {
|
|
11381
|
-
return React__default
|
|
11390
|
+
return React__default.createElement(Highlighter, index$5._extends({}, props, {
|
|
11382
11391
|
highlightProperty: "_highlightResult",
|
|
11383
|
-
cx: cx$
|
|
11392
|
+
cx: cx$6
|
|
11384
11393
|
}));
|
|
11385
11394
|
};
|
|
11386
11395
|
|
|
@@ -11425,12 +11434,12 @@ var Highlight$1 = function Highlight(props) {
|
|
|
11425
11434
|
* );
|
|
11426
11435
|
*/
|
|
11427
11436
|
|
|
11428
|
-
var Highlight = connectHighlight(Highlight$1);
|
|
11437
|
+
var Highlight$2 = connectHighlight(Highlight$1);
|
|
11429
11438
|
|
|
11430
|
-
var cx$
|
|
11439
|
+
var cx$7 = createClassNames('Hits');
|
|
11431
11440
|
|
|
11432
11441
|
var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
11433
|
-
return React__default
|
|
11442
|
+
return React__default.createElement("div", {
|
|
11434
11443
|
style: {
|
|
11435
11444
|
borderBottom: '1px solid #bbb',
|
|
11436
11445
|
paddingBottom: '5px',
|
|
@@ -11440,33 +11449,33 @@ var DefaultHitComponent = function DefaultHitComponent(props) {
|
|
|
11440
11449
|
}, JSON.stringify(props).slice(0, 100), "...");
|
|
11441
11450
|
};
|
|
11442
11451
|
|
|
11443
|
-
var Hits
|
|
11452
|
+
var Hits = function Hits(_ref) {
|
|
11444
11453
|
var hits = _ref.hits,
|
|
11445
11454
|
_ref$className = _ref.className,
|
|
11446
11455
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
11447
11456
|
_ref$hitComponent = _ref.hitComponent,
|
|
11448
11457
|
HitComponent = _ref$hitComponent === void 0 ? DefaultHitComponent : _ref$hitComponent;
|
|
11449
|
-
return React__default
|
|
11450
|
-
className: index.classnames(cx$
|
|
11451
|
-
}, React__default
|
|
11452
|
-
className: cx$
|
|
11458
|
+
return React__default.createElement("div", {
|
|
11459
|
+
className: index$5.classnames(cx$7(''), className)
|
|
11460
|
+
}, React__default.createElement("ul", {
|
|
11461
|
+
className: cx$7('list')
|
|
11453
11462
|
}, hits.map(function (hit) {
|
|
11454
|
-
return React__default
|
|
11455
|
-
className: cx$
|
|
11463
|
+
return React__default.createElement("li", {
|
|
11464
|
+
className: cx$7('item'),
|
|
11456
11465
|
key: hit.objectID
|
|
11457
|
-
}, React__default
|
|
11466
|
+
}, React__default.createElement(HitComponent, {
|
|
11458
11467
|
hit: hit
|
|
11459
11468
|
}));
|
|
11460
11469
|
})));
|
|
11461
11470
|
};
|
|
11462
11471
|
|
|
11463
|
-
var HitPropTypes = PropTypes__default
|
|
11464
|
-
objectID: PropTypes__default
|
|
11472
|
+
var HitPropTypes = PropTypes__default.shape({
|
|
11473
|
+
objectID: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number]).isRequired
|
|
11465
11474
|
});
|
|
11466
|
-
Hits
|
|
11467
|
-
hits: PropTypes__default
|
|
11468
|
-
className: PropTypes__default
|
|
11469
|
-
hitComponent: PropTypes__default
|
|
11475
|
+
Hits.propTypes = {
|
|
11476
|
+
hits: PropTypes__default.arrayOf(HitPropTypes.isRequired).isRequired,
|
|
11477
|
+
className: PropTypes__default.string,
|
|
11478
|
+
hitComponent: PropTypes__default.func
|
|
11470
11479
|
};
|
|
11471
11480
|
|
|
11472
11481
|
/**
|
|
@@ -11502,7 +11511,7 @@ Hits$1.propTypes = {
|
|
|
11502
11511
|
* );
|
|
11503
11512
|
*/
|
|
11504
11513
|
|
|
11505
|
-
var Hits = connectHits(Hits
|
|
11514
|
+
var Hits$1 = connectHits(Hits);
|
|
11506
11515
|
|
|
11507
11516
|
var Select =
|
|
11508
11517
|
/*#__PURE__*/
|
|
@@ -11536,12 +11545,12 @@ function (_Component) {
|
|
|
11536
11545
|
cx = _this$props.cx,
|
|
11537
11546
|
items = _this$props.items,
|
|
11538
11547
|
selectedItem = _this$props.selectedItem;
|
|
11539
|
-
return React__default
|
|
11548
|
+
return React__default.createElement("select", {
|
|
11540
11549
|
className: cx('select'),
|
|
11541
11550
|
value: selectedItem,
|
|
11542
11551
|
onChange: this.onChange
|
|
11543
11552
|
}, items.map(function (item) {
|
|
11544
|
-
return React__default
|
|
11553
|
+
return React__default.createElement("option", {
|
|
11545
11554
|
className: cx('option'),
|
|
11546
11555
|
key: item.key === undefined ? item.value : item.key,
|
|
11547
11556
|
disabled: item.disabled,
|
|
@@ -11555,18 +11564,18 @@ function (_Component) {
|
|
|
11555
11564
|
}(React.Component);
|
|
11556
11565
|
|
|
11557
11566
|
_defineProperty(Select, "propTypes", {
|
|
11558
|
-
cx: PropTypes__default
|
|
11559
|
-
onSelect: PropTypes__default
|
|
11560
|
-
items: PropTypes__default
|
|
11561
|
-
value: PropTypes__default
|
|
11562
|
-
key: PropTypes__default
|
|
11563
|
-
label: PropTypes__default
|
|
11564
|
-
disabled: PropTypes__default
|
|
11567
|
+
cx: PropTypes__default.func.isRequired,
|
|
11568
|
+
onSelect: PropTypes__default.func.isRequired,
|
|
11569
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
11570
|
+
value: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number]).isRequired,
|
|
11571
|
+
key: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number]),
|
|
11572
|
+
label: PropTypes__default.string,
|
|
11573
|
+
disabled: PropTypes__default.bool
|
|
11565
11574
|
})).isRequired,
|
|
11566
|
-
selectedItem: PropTypes__default
|
|
11575
|
+
selectedItem: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number]).isRequired
|
|
11567
11576
|
});
|
|
11568
11577
|
|
|
11569
|
-
var cx$
|
|
11578
|
+
var cx$8 = createClassNames('HitsPerPage');
|
|
11570
11579
|
|
|
11571
11580
|
var HitsPerPage =
|
|
11572
11581
|
/*#__PURE__*/
|
|
@@ -11587,13 +11596,13 @@ function (_Component) {
|
|
|
11587
11596
|
currentRefinement = _this$props.currentRefinement,
|
|
11588
11597
|
refine = _this$props.refine,
|
|
11589
11598
|
className = _this$props.className;
|
|
11590
|
-
return React__default
|
|
11591
|
-
className: index.classnames(cx$
|
|
11592
|
-
}, React__default
|
|
11599
|
+
return React__default.createElement("div", {
|
|
11600
|
+
className: index$5.classnames(cx$8(''), className)
|
|
11601
|
+
}, React__default.createElement(Select, {
|
|
11593
11602
|
onSelect: refine,
|
|
11594
11603
|
selectedItem: currentRefinement,
|
|
11595
11604
|
items: items,
|
|
11596
|
-
cx: cx$
|
|
11605
|
+
cx: cx$8
|
|
11597
11606
|
}));
|
|
11598
11607
|
}
|
|
11599
11608
|
}]);
|
|
@@ -11602,13 +11611,13 @@ function (_Component) {
|
|
|
11602
11611
|
}(React.Component);
|
|
11603
11612
|
|
|
11604
11613
|
_defineProperty(HitsPerPage, "propTypes", {
|
|
11605
|
-
items: PropTypes__default
|
|
11606
|
-
value: PropTypes__default
|
|
11607
|
-
label: PropTypes__default
|
|
11614
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
11615
|
+
value: PropTypes__default.number.isRequired,
|
|
11616
|
+
label: PropTypes__default.string
|
|
11608
11617
|
})).isRequired,
|
|
11609
|
-
currentRefinement: PropTypes__default
|
|
11610
|
-
refine: PropTypes__default
|
|
11611
|
-
className: PropTypes__default
|
|
11618
|
+
currentRefinement: PropTypes__default.number.isRequired,
|
|
11619
|
+
refine: PropTypes__default.func.isRequired,
|
|
11620
|
+
className: PropTypes__default.string
|
|
11612
11621
|
});
|
|
11613
11622
|
|
|
11614
11623
|
_defineProperty(HitsPerPage, "defaultProps", {
|
|
@@ -11659,7 +11668,7 @@ _defineProperty(HitsPerPage, "defaultProps", {
|
|
|
11659
11668
|
|
|
11660
11669
|
connectHitsPerPage(HitsPerPage);
|
|
11661
11670
|
|
|
11662
|
-
var cx$
|
|
11671
|
+
var cx$9 = createClassNames('InfiniteHits');
|
|
11663
11672
|
|
|
11664
11673
|
var InfiniteHits =
|
|
11665
11674
|
/*#__PURE__*/
|
|
@@ -11685,25 +11694,25 @@ function (_Component) {
|
|
|
11685
11694
|
refineNext = _this$props.refineNext,
|
|
11686
11695
|
translate = _this$props.translate,
|
|
11687
11696
|
className = _this$props.className;
|
|
11688
|
-
return React__default
|
|
11689
|
-
className: index.classnames(cx$
|
|
11690
|
-
}, showPrevious && React__default
|
|
11691
|
-
className: cx$
|
|
11697
|
+
return React__default.createElement("div", {
|
|
11698
|
+
className: index$5.classnames(cx$9(''), className)
|
|
11699
|
+
}, showPrevious && React__default.createElement("button", {
|
|
11700
|
+
className: cx$9('loadPrevious', !hasPrevious && 'loadPrevious--disabled'),
|
|
11692
11701
|
onClick: function onClick() {
|
|
11693
11702
|
return refinePrevious();
|
|
11694
11703
|
},
|
|
11695
11704
|
disabled: !hasPrevious
|
|
11696
|
-
}, translate('loadPrevious')), React__default
|
|
11697
|
-
className: cx$
|
|
11705
|
+
}, translate('loadPrevious')), React__default.createElement("ul", {
|
|
11706
|
+
className: cx$9('list')
|
|
11698
11707
|
}, hits.map(function (hit) {
|
|
11699
|
-
return React__default
|
|
11708
|
+
return React__default.createElement("li", {
|
|
11700
11709
|
key: hit.objectID,
|
|
11701
|
-
className: cx$
|
|
11702
|
-
}, React__default
|
|
11710
|
+
className: cx$9('item')
|
|
11711
|
+
}, React__default.createElement(HitComponent, {
|
|
11703
11712
|
hit: hit
|
|
11704
11713
|
}));
|
|
11705
|
-
})), React__default
|
|
11706
|
-
className: cx$
|
|
11714
|
+
})), React__default.createElement("button", {
|
|
11715
|
+
className: cx$9('loadMore', !hasMore && 'loadMore--disabled'),
|
|
11707
11716
|
onClick: function onClick() {
|
|
11708
11717
|
return refineNext();
|
|
11709
11718
|
},
|
|
@@ -11716,21 +11725,21 @@ function (_Component) {
|
|
|
11716
11725
|
}(React.Component);
|
|
11717
11726
|
|
|
11718
11727
|
InfiniteHits.propTypes = {
|
|
11719
|
-
hits: PropTypes__default
|
|
11720
|
-
showPrevious: PropTypes__default
|
|
11721
|
-
hasPrevious: PropTypes__default
|
|
11722
|
-
hasMore: PropTypes__default
|
|
11723
|
-
refinePrevious: PropTypes__default
|
|
11724
|
-
refineNext: PropTypes__default
|
|
11725
|
-
translate: PropTypes__default
|
|
11726
|
-
className: PropTypes__default
|
|
11727
|
-
hitComponent: PropTypes__default
|
|
11728
|
+
hits: PropTypes__default.arrayOf(PropTypes__default.object).isRequired,
|
|
11729
|
+
showPrevious: PropTypes__default.bool.isRequired,
|
|
11730
|
+
hasPrevious: PropTypes__default.bool.isRequired,
|
|
11731
|
+
hasMore: PropTypes__default.bool.isRequired,
|
|
11732
|
+
refinePrevious: PropTypes__default.func.isRequired,
|
|
11733
|
+
refineNext: PropTypes__default.func.isRequired,
|
|
11734
|
+
translate: PropTypes__default.func.isRequired,
|
|
11735
|
+
className: PropTypes__default.string,
|
|
11736
|
+
hitComponent: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.func])
|
|
11728
11737
|
};
|
|
11729
11738
|
InfiniteHits.defaultProps = {
|
|
11730
11739
|
className: '',
|
|
11731
11740
|
showPrevious: false,
|
|
11732
11741
|
hitComponent: function hitComponent(hit) {
|
|
11733
|
-
return React__default
|
|
11742
|
+
return React__default.createElement("div", {
|
|
11734
11743
|
style: {
|
|
11735
11744
|
borderBottom: '1px solid #bbb',
|
|
11736
11745
|
paddingBottom: '5px',
|
|
@@ -11784,7 +11793,7 @@ var InfiniteHits$1 = translatable({
|
|
|
11784
11793
|
|
|
11785
11794
|
connectInfiniteHits(InfiniteHits$1);
|
|
11786
11795
|
|
|
11787
|
-
var cx$
|
|
11796
|
+
var cx$a = createClassNames('Menu');
|
|
11788
11797
|
|
|
11789
11798
|
var Menu =
|
|
11790
11799
|
/*#__PURE__*/
|
|
@@ -11806,20 +11815,20 @@ function (_Component) {
|
|
|
11806
11815
|
|
|
11807
11816
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
11808
11817
|
var createURL = _this.props.createURL;
|
|
11809
|
-
var label = _this.props.isFromSearch ? React__default
|
|
11818
|
+
var label = _this.props.isFromSearch ? React__default.createElement(Highlight$2, {
|
|
11810
11819
|
attribute: "label",
|
|
11811
11820
|
hit: item
|
|
11812
11821
|
}) : item.label;
|
|
11813
|
-
return React__default
|
|
11814
|
-
className: cx$
|
|
11822
|
+
return React__default.createElement(Link, {
|
|
11823
|
+
className: cx$a('link'),
|
|
11815
11824
|
onClick: function onClick() {
|
|
11816
11825
|
return _this.selectItem(item, resetQuery);
|
|
11817
11826
|
},
|
|
11818
11827
|
href: createURL(item.value)
|
|
11819
|
-
}, React__default
|
|
11820
|
-
className: cx$
|
|
11821
|
-
}, label), ' ', React__default
|
|
11822
|
-
className: cx$
|
|
11828
|
+
}, React__default.createElement("span", {
|
|
11829
|
+
className: cx$a('label')
|
|
11830
|
+
}, label), ' ', React__default.createElement("span", {
|
|
11831
|
+
className: cx$a('count')
|
|
11823
11832
|
}, item.count));
|
|
11824
11833
|
});
|
|
11825
11834
|
|
|
@@ -11846,10 +11855,10 @@ function (_Component) {
|
|
|
11846
11855
|
searchable = _this$props.searchable,
|
|
11847
11856
|
canRefine = _this$props.canRefine,
|
|
11848
11857
|
className = _this$props.className;
|
|
11849
|
-
return React__default
|
|
11858
|
+
return React__default.createElement(List, {
|
|
11850
11859
|
renderItem: this.renderItem,
|
|
11851
11860
|
selectItem: this.selectItem,
|
|
11852
|
-
cx: cx$
|
|
11861
|
+
cx: cx$a,
|
|
11853
11862
|
translate: translate,
|
|
11854
11863
|
items: items,
|
|
11855
11864
|
showMore: showMore,
|
|
@@ -11868,24 +11877,24 @@ function (_Component) {
|
|
|
11868
11877
|
}(React.Component);
|
|
11869
11878
|
|
|
11870
11879
|
_defineProperty(Menu, "propTypes", {
|
|
11871
|
-
translate: PropTypes__default
|
|
11872
|
-
refine: PropTypes__default
|
|
11873
|
-
searchForItems: PropTypes__default
|
|
11874
|
-
searchable: PropTypes__default
|
|
11875
|
-
createURL: PropTypes__default
|
|
11876
|
-
items: PropTypes__default
|
|
11877
|
-
label: PropTypes__default
|
|
11878
|
-
value: PropTypes__default
|
|
11879
|
-
count: PropTypes__default
|
|
11880
|
-
isRefined: PropTypes__default
|
|
11880
|
+
translate: PropTypes__default.func.isRequired,
|
|
11881
|
+
refine: PropTypes__default.func.isRequired,
|
|
11882
|
+
searchForItems: PropTypes__default.func.isRequired,
|
|
11883
|
+
searchable: PropTypes__default.bool,
|
|
11884
|
+
createURL: PropTypes__default.func.isRequired,
|
|
11885
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
11886
|
+
label: PropTypes__default.string.isRequired,
|
|
11887
|
+
value: PropTypes__default.string.isRequired,
|
|
11888
|
+
count: PropTypes__default.number.isRequired,
|
|
11889
|
+
isRefined: PropTypes__default.bool.isRequired
|
|
11881
11890
|
})),
|
|
11882
|
-
isFromSearch: PropTypes__default
|
|
11883
|
-
canRefine: PropTypes__default
|
|
11884
|
-
showMore: PropTypes__default
|
|
11885
|
-
limit: PropTypes__default
|
|
11886
|
-
showMoreLimit: PropTypes__default
|
|
11887
|
-
transformItems: PropTypes__default
|
|
11888
|
-
className: PropTypes__default
|
|
11891
|
+
isFromSearch: PropTypes__default.bool.isRequired,
|
|
11892
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
11893
|
+
showMore: PropTypes__default.bool,
|
|
11894
|
+
limit: PropTypes__default.number,
|
|
11895
|
+
showMoreLimit: PropTypes__default.number,
|
|
11896
|
+
transformItems: PropTypes__default.func,
|
|
11897
|
+
className: PropTypes__default.string
|
|
11889
11898
|
});
|
|
11890
11899
|
|
|
11891
11900
|
_defineProperty(Menu, "defaultProps", {
|
|
@@ -11954,12 +11963,12 @@ var Menu$1 = translatable({
|
|
|
11954
11963
|
*/
|
|
11955
11964
|
|
|
11956
11965
|
var MenuWidget = function MenuWidget(props) {
|
|
11957
|
-
return React__default
|
|
11966
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(Menu$1, props));
|
|
11958
11967
|
};
|
|
11959
11968
|
|
|
11960
11969
|
connectMenu(MenuWidget);
|
|
11961
11970
|
|
|
11962
|
-
var cx$
|
|
11971
|
+
var cx$b = createClassNames('MenuSelect');
|
|
11963
11972
|
|
|
11964
11973
|
var MenuSelect =
|
|
11965
11974
|
/*#__PURE__*/
|
|
@@ -11996,27 +12005,27 @@ function (_Component) {
|
|
|
11996
12005
|
canRefine = _this$props.canRefine,
|
|
11997
12006
|
translate = _this$props.translate,
|
|
11998
12007
|
className = _this$props.className;
|
|
11999
|
-
return React__default
|
|
12000
|
-
className: index.classnames(cx$
|
|
12001
|
-
}, React__default
|
|
12008
|
+
return React__default.createElement("div", {
|
|
12009
|
+
className: index$5.classnames(cx$b('', !canRefine && '-noRefinement'), className)
|
|
12010
|
+
}, React__default.createElement("select", {
|
|
12002
12011
|
value: this.selectedValue,
|
|
12003
12012
|
onChange: this.handleSelectChange,
|
|
12004
|
-
className: cx$
|
|
12005
|
-
}, React__default
|
|
12013
|
+
className: cx$b('select')
|
|
12014
|
+
}, React__default.createElement("option", {
|
|
12006
12015
|
value: "ais__see__all__option",
|
|
12007
|
-
className: cx$
|
|
12016
|
+
className: cx$b('option')
|
|
12008
12017
|
}, translate('seeAllOption')), items.map(function (item) {
|
|
12009
|
-
return React__default
|
|
12018
|
+
return React__default.createElement("option", {
|
|
12010
12019
|
key: item.value,
|
|
12011
12020
|
value: item.value,
|
|
12012
|
-
className: cx$
|
|
12021
|
+
className: cx$b('option')
|
|
12013
12022
|
}, item.label, " (", item.count, ")");
|
|
12014
12023
|
})));
|
|
12015
12024
|
}
|
|
12016
12025
|
}, {
|
|
12017
12026
|
key: "selectedValue",
|
|
12018
12027
|
get: function get() {
|
|
12019
|
-
var _ref2 = find(this.props.items, function (item) {
|
|
12028
|
+
var _ref2 = find$2(this.props.items, function (item) {
|
|
12020
12029
|
return item.isRefined === true;
|
|
12021
12030
|
}) || {
|
|
12022
12031
|
value: 'ais__see__all__option'
|
|
@@ -12031,16 +12040,16 @@ function (_Component) {
|
|
|
12031
12040
|
}(React.Component);
|
|
12032
12041
|
|
|
12033
12042
|
_defineProperty(MenuSelect, "propTypes", {
|
|
12034
|
-
items: PropTypes__default
|
|
12035
|
-
label: PropTypes__default
|
|
12036
|
-
value: PropTypes__default
|
|
12037
|
-
count: PropTypes__default
|
|
12038
|
-
isRefined: PropTypes__default
|
|
12043
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
12044
|
+
label: PropTypes__default.string.isRequired,
|
|
12045
|
+
value: PropTypes__default.string.isRequired,
|
|
12046
|
+
count: PropTypes__default.oneOfType([PropTypes__default.number.isRequired, PropTypes__default.string.isRequired]),
|
|
12047
|
+
isRefined: PropTypes__default.bool.isRequired
|
|
12039
12048
|
})).isRequired,
|
|
12040
|
-
canRefine: PropTypes__default
|
|
12041
|
-
refine: PropTypes__default
|
|
12042
|
-
translate: PropTypes__default
|
|
12043
|
-
className: PropTypes__default
|
|
12049
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
12050
|
+
refine: PropTypes__default.func.isRequired,
|
|
12051
|
+
translate: PropTypes__default.func.isRequired,
|
|
12052
|
+
className: PropTypes__default.string
|
|
12044
12053
|
});
|
|
12045
12054
|
|
|
12046
12055
|
_defineProperty(MenuSelect, "defaultProps", {
|
|
@@ -12088,12 +12097,12 @@ var MenuSelect$1 = translatable({
|
|
|
12088
12097
|
*/
|
|
12089
12098
|
|
|
12090
12099
|
var MenuSelectWidget = function MenuSelectWidget(props) {
|
|
12091
|
-
return React__default
|
|
12100
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(MenuSelect$1, props));
|
|
12092
12101
|
};
|
|
12093
12102
|
|
|
12094
12103
|
connectMenu(MenuSelectWidget);
|
|
12095
12104
|
|
|
12096
|
-
var cx$
|
|
12105
|
+
var cx$c = createClassNames('NumericMenu');
|
|
12097
12106
|
|
|
12098
12107
|
var NumericMenu =
|
|
12099
12108
|
/*#__PURE__*/
|
|
@@ -12117,18 +12126,18 @@ function (_Component) {
|
|
|
12117
12126
|
var _this$props = _this.props,
|
|
12118
12127
|
refine = _this$props.refine,
|
|
12119
12128
|
translate = _this$props.translate;
|
|
12120
|
-
return React__default
|
|
12121
|
-
className: cx$
|
|
12122
|
-
}, React__default
|
|
12123
|
-
className: cx$
|
|
12129
|
+
return React__default.createElement("label", {
|
|
12130
|
+
className: cx$c('label')
|
|
12131
|
+
}, React__default.createElement("input", {
|
|
12132
|
+
className: cx$c('radio'),
|
|
12124
12133
|
type: "radio",
|
|
12125
12134
|
checked: item.isRefined,
|
|
12126
12135
|
disabled: item.noRefinement,
|
|
12127
12136
|
onChange: function onChange() {
|
|
12128
12137
|
return refine(item.value);
|
|
12129
12138
|
}
|
|
12130
|
-
}), React__default
|
|
12131
|
-
className: cx$
|
|
12139
|
+
}), React__default.createElement("span", {
|
|
12140
|
+
className: cx$c('labelText')
|
|
12132
12141
|
}, item.value === '' ? translate('all') : item.label));
|
|
12133
12142
|
});
|
|
12134
12143
|
|
|
@@ -12142,11 +12151,11 @@ function (_Component) {
|
|
|
12142
12151
|
items = _this$props2.items,
|
|
12143
12152
|
canRefine = _this$props2.canRefine,
|
|
12144
12153
|
className = _this$props2.className;
|
|
12145
|
-
return React__default
|
|
12154
|
+
return React__default.createElement(List, {
|
|
12146
12155
|
renderItem: this.renderItem,
|
|
12147
12156
|
showMore: false,
|
|
12148
12157
|
canRefine: canRefine,
|
|
12149
|
-
cx: cx$
|
|
12158
|
+
cx: cx$c,
|
|
12150
12159
|
items: items.map(function (item) {
|
|
12151
12160
|
return _objectSpread({}, item, {
|
|
12152
12161
|
key: item.value
|
|
@@ -12161,16 +12170,16 @@ function (_Component) {
|
|
|
12161
12170
|
}(React.Component);
|
|
12162
12171
|
|
|
12163
12172
|
_defineProperty(NumericMenu, "propTypes", {
|
|
12164
|
-
items: PropTypes__default
|
|
12165
|
-
label: PropTypes__default
|
|
12166
|
-
value: PropTypes__default
|
|
12167
|
-
isRefined: PropTypes__default
|
|
12168
|
-
noRefinement: PropTypes__default
|
|
12173
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
12174
|
+
label: PropTypes__default.node.isRequired,
|
|
12175
|
+
value: PropTypes__default.string.isRequired,
|
|
12176
|
+
isRefined: PropTypes__default.bool.isRequired,
|
|
12177
|
+
noRefinement: PropTypes__default.bool.isRequired
|
|
12169
12178
|
})).isRequired,
|
|
12170
|
-
canRefine: PropTypes__default
|
|
12171
|
-
refine: PropTypes__default
|
|
12172
|
-
translate: PropTypes__default
|
|
12173
|
-
className: PropTypes__default
|
|
12179
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
12180
|
+
refine: PropTypes__default.func.isRequired,
|
|
12181
|
+
translate: PropTypes__default.func.isRequired,
|
|
12182
|
+
className: PropTypes__default.string
|
|
12174
12183
|
});
|
|
12175
12184
|
|
|
12176
12185
|
_defineProperty(NumericMenu, "defaultProps", {
|
|
@@ -12228,7 +12237,7 @@ var NumericMenu$1 = translatable({
|
|
|
12228
12237
|
*/
|
|
12229
12238
|
|
|
12230
12239
|
var NumericMenuWidget = function NumericMenuWidget(props) {
|
|
12231
|
-
return React__default
|
|
12240
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(NumericMenu$1, props));
|
|
12232
12241
|
};
|
|
12233
12242
|
|
|
12234
12243
|
connectNumericMenu(NumericMenuWidget);
|
|
@@ -12253,15 +12262,15 @@ function (_Component) {
|
|
|
12253
12262
|
items = _this$props.items,
|
|
12254
12263
|
onSelect = _this$props.onSelect,
|
|
12255
12264
|
canRefine = _this$props.canRefine;
|
|
12256
|
-
return React__default
|
|
12265
|
+
return React__default.createElement("ul", {
|
|
12257
12266
|
className: cx('list', !canRefine && 'list--noRefinement')
|
|
12258
12267
|
}, items.map(function (item) {
|
|
12259
|
-
return React__default
|
|
12268
|
+
return React__default.createElement("li", {
|
|
12260
12269
|
key: item.key === undefined ? item.value : item.key,
|
|
12261
12270
|
className: cx('item', item.selected && !item.disabled && 'item--selected', item.disabled && 'item--disabled', item.modifier)
|
|
12262
|
-
}, item.disabled ? React__default
|
|
12271
|
+
}, item.disabled ? React__default.createElement("span", {
|
|
12263
12272
|
className: cx('link')
|
|
12264
|
-
}, item.label === undefined ? item.value : item.label) : React__default
|
|
12273
|
+
}, item.label === undefined ? item.value : item.label) : React__default.createElement(Link, {
|
|
12265
12274
|
className: cx('link', item.selected && 'link--selected'),
|
|
12266
12275
|
"aria-label": item.ariaLabel,
|
|
12267
12276
|
href: createURL(item.value),
|
|
@@ -12277,21 +12286,21 @@ function (_Component) {
|
|
|
12277
12286
|
}(React.Component);
|
|
12278
12287
|
|
|
12279
12288
|
_defineProperty(LinkList, "propTypes", {
|
|
12280
|
-
cx: PropTypes__default
|
|
12281
|
-
createURL: PropTypes__default
|
|
12282
|
-
items: PropTypes__default
|
|
12283
|
-
value: PropTypes__default
|
|
12284
|
-
key: PropTypes__default
|
|
12285
|
-
label: PropTypes__default
|
|
12286
|
-
modifier: PropTypes__default
|
|
12287
|
-
ariaLabel: PropTypes__default
|
|
12288
|
-
disabled: PropTypes__default
|
|
12289
|
+
cx: PropTypes__default.func.isRequired,
|
|
12290
|
+
createURL: PropTypes__default.func.isRequired,
|
|
12291
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
12292
|
+
value: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number, PropTypes__default.object]).isRequired,
|
|
12293
|
+
key: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.number]),
|
|
12294
|
+
label: PropTypes__default.node,
|
|
12295
|
+
modifier: PropTypes__default.string,
|
|
12296
|
+
ariaLabel: PropTypes__default.string,
|
|
12297
|
+
disabled: PropTypes__default.bool
|
|
12289
12298
|
})),
|
|
12290
|
-
onSelect: PropTypes__default
|
|
12291
|
-
canRefine: PropTypes__default
|
|
12299
|
+
onSelect: PropTypes__default.func.isRequired,
|
|
12300
|
+
canRefine: PropTypes__default.bool.isRequired
|
|
12292
12301
|
});
|
|
12293
12302
|
|
|
12294
|
-
var cx$
|
|
12303
|
+
var cx$d = createClassNames('Pagination'); // Determines the size of the widget (the number of pages displayed - that the user can directly click on)
|
|
12295
12304
|
|
|
12296
12305
|
function calculateSize(padding, maxPages) {
|
|
12297
12306
|
return Math.min(2 * padding + 1, maxPages);
|
|
@@ -12327,7 +12336,7 @@ function getPages(currentPage, maxPages, padding) {
|
|
|
12327
12336
|
});
|
|
12328
12337
|
}
|
|
12329
12338
|
|
|
12330
|
-
var Pagination
|
|
12339
|
+
var Pagination =
|
|
12331
12340
|
/*#__PURE__*/
|
|
12332
12341
|
function (_Component) {
|
|
12333
12342
|
_inherits(Pagination, _Component);
|
|
@@ -12433,10 +12442,10 @@ function (_Component) {
|
|
|
12433
12442
|
});
|
|
12434
12443
|
}
|
|
12435
12444
|
|
|
12436
|
-
return React__default
|
|
12437
|
-
className: index.classnames(cx$
|
|
12438
|
-
}, React__default
|
|
12439
|
-
cx: cx$
|
|
12445
|
+
return React__default.createElement("div", {
|
|
12446
|
+
className: index$5.classnames(cx$d('', !canRefine && '-noRefinement'), className)
|
|
12447
|
+
}, React__default.createElement(ListComponent, index$5._extends({}, otherProps, {
|
|
12448
|
+
cx: cx$d,
|
|
12440
12449
|
items: items,
|
|
12441
12450
|
onSelect: refine,
|
|
12442
12451
|
createURL: createURL,
|
|
@@ -12448,24 +12457,24 @@ function (_Component) {
|
|
|
12448
12457
|
return Pagination;
|
|
12449
12458
|
}(React.Component);
|
|
12450
12459
|
|
|
12451
|
-
_defineProperty(Pagination
|
|
12452
|
-
nbPages: PropTypes__default
|
|
12453
|
-
currentRefinement: PropTypes__default
|
|
12454
|
-
refine: PropTypes__default
|
|
12455
|
-
createURL: PropTypes__default
|
|
12456
|
-
canRefine: PropTypes__default
|
|
12457
|
-
translate: PropTypes__default
|
|
12458
|
-
listComponent: PropTypes__default
|
|
12459
|
-
showFirst: PropTypes__default
|
|
12460
|
-
showPrevious: PropTypes__default
|
|
12461
|
-
showNext: PropTypes__default
|
|
12462
|
-
showLast: PropTypes__default
|
|
12463
|
-
padding: PropTypes__default
|
|
12464
|
-
totalPages: PropTypes__default
|
|
12465
|
-
className: PropTypes__default
|
|
12460
|
+
_defineProperty(Pagination, "propTypes", {
|
|
12461
|
+
nbPages: PropTypes__default.number.isRequired,
|
|
12462
|
+
currentRefinement: PropTypes__default.number.isRequired,
|
|
12463
|
+
refine: PropTypes__default.func.isRequired,
|
|
12464
|
+
createURL: PropTypes__default.func.isRequired,
|
|
12465
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
12466
|
+
translate: PropTypes__default.func.isRequired,
|
|
12467
|
+
listComponent: PropTypes__default.func,
|
|
12468
|
+
showFirst: PropTypes__default.bool,
|
|
12469
|
+
showPrevious: PropTypes__default.bool,
|
|
12470
|
+
showNext: PropTypes__default.bool,
|
|
12471
|
+
showLast: PropTypes__default.bool,
|
|
12472
|
+
padding: PropTypes__default.number,
|
|
12473
|
+
totalPages: PropTypes__default.number,
|
|
12474
|
+
className: PropTypes__default.string
|
|
12466
12475
|
});
|
|
12467
12476
|
|
|
12468
|
-
_defineProperty(Pagination
|
|
12477
|
+
_defineProperty(Pagination, "defaultProps", {
|
|
12469
12478
|
listComponent: LinkList,
|
|
12470
12479
|
showFirst: true,
|
|
12471
12480
|
showPrevious: true,
|
|
@@ -12476,7 +12485,7 @@ _defineProperty(Pagination$1, "defaultProps", {
|
|
|
12476
12485
|
className: ''
|
|
12477
12486
|
});
|
|
12478
12487
|
|
|
12479
|
-
var Pagination$
|
|
12488
|
+
var Pagination$1 = translatable({
|
|
12480
12489
|
previous: '‹',
|
|
12481
12490
|
next: '›',
|
|
12482
12491
|
first: '«',
|
|
@@ -12491,7 +12500,7 @@ var Pagination$2 = translatable({
|
|
|
12491
12500
|
ariaPage: function ariaPage(currentRefinement) {
|
|
12492
12501
|
return "Page ".concat(currentRefinement.toString());
|
|
12493
12502
|
}
|
|
12494
|
-
})(Pagination
|
|
12503
|
+
})(Pagination);
|
|
12495
12504
|
|
|
12496
12505
|
/**
|
|
12497
12506
|
* The Pagination widget displays a simple pagination system allowing the user to
|
|
@@ -12548,23 +12557,23 @@ var Pagination$2 = translatable({
|
|
|
12548
12557
|
*/
|
|
12549
12558
|
|
|
12550
12559
|
var PaginationWidget = function PaginationWidget(props) {
|
|
12551
|
-
return React__default
|
|
12560
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(Pagination$1, props));
|
|
12552
12561
|
};
|
|
12553
12562
|
|
|
12554
|
-
var Pagination = connectPagination(PaginationWidget);
|
|
12563
|
+
var Pagination$2 = connectPagination(PaginationWidget);
|
|
12555
12564
|
|
|
12556
|
-
var cx$
|
|
12565
|
+
var cx$e = createClassNames('PoweredBy');
|
|
12557
12566
|
/* eslint-disable max-len */
|
|
12558
12567
|
|
|
12559
12568
|
var AlgoliaLogo = function AlgoliaLogo() {
|
|
12560
|
-
return React__default
|
|
12569
|
+
return React__default.createElement("svg", {
|
|
12561
12570
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12562
12571
|
baseProfile: "basic",
|
|
12563
12572
|
viewBox: "0 0 1366 362",
|
|
12564
12573
|
width: "100",
|
|
12565
12574
|
height: "27",
|
|
12566
|
-
className: cx$
|
|
12567
|
-
}, React__default
|
|
12575
|
+
className: cx$e('logo')
|
|
12576
|
+
}, React__default.createElement("linearGradient", {
|
|
12568
12577
|
id: "g",
|
|
12569
12578
|
x1: "428.258",
|
|
12570
12579
|
x2: "434.145",
|
|
@@ -12572,19 +12581,19 @@ var AlgoliaLogo = function AlgoliaLogo() {
|
|
|
12572
12581
|
y2: "409.85",
|
|
12573
12582
|
gradientUnits: "userSpaceOnUse",
|
|
12574
12583
|
gradientTransform: "matrix(94.045 0 0 -94.072 -40381.527 38479.52)"
|
|
12575
|
-
}, React__default
|
|
12584
|
+
}, React__default.createElement("stop", {
|
|
12576
12585
|
offset: "0",
|
|
12577
12586
|
stopColor: "#00AEFF"
|
|
12578
|
-
}), React__default
|
|
12587
|
+
}), React__default.createElement("stop", {
|
|
12579
12588
|
offset: "1",
|
|
12580
12589
|
stopColor: "#3369E7"
|
|
12581
|
-
})), React__default
|
|
12590
|
+
})), React__default.createElement("path", {
|
|
12582
12591
|
d: "M61.8 15.4h242.8c23.9 0 43.4 19.4 43.4 43.4v242.9c0 23.9-19.4 43.4-43.4 43.4H61.8c-23.9 0-43.4-19.4-43.4-43.4v-243c0-23.9 19.4-43.3 43.4-43.3z",
|
|
12583
12592
|
fill: "url(#g)"
|
|
12584
|
-
}), React__default
|
|
12593
|
+
}), React__default.createElement("path", {
|
|
12585
12594
|
d: "M187 98.7c-51.4 0-93.1 41.7-93.1 93.2S135.6 285 187 285s93.1-41.7 93.1-93.2-41.6-93.1-93.1-93.1zm0 158.8c-36.2 0-65.6-29.4-65.6-65.6s29.4-65.6 65.6-65.6 65.6 29.4 65.6 65.6-29.3 65.6-65.6 65.6zm0-117.8v48.9c0 1.4 1.5 2.4 2.8 1.7l43.4-22.5c1-.5 1.3-1.7.8-2.7-9-15.8-25.7-26.6-45-27.3-1 0-2 .8-2 1.9zm-60.8-35.9l-5.7-5.7c-5.6-5.6-14.6-5.6-20.2 0l-6.8 6.8c-5.6 5.6-5.6 14.6 0 20.2l5.6 5.6c.9.9 2.2.7 3-.2 3.3-4.5 6.9-8.8 10.9-12.8 4.1-4.1 8.3-7.7 12.9-11 1-.6 1.1-2 .3-2.9zM217.5 89V77.7c0-7.9-6.4-14.3-14.3-14.3h-33.3c-7.9 0-14.3 6.4-14.3 14.3v11.6c0 1.3 1.2 2.2 2.5 1.9 9.3-2.7 19.1-4.1 29-4.1 9.5 0 18.9 1.3 28 3.8 1.2.3 2.4-.6 2.4-1.9z",
|
|
12586
12595
|
fill: "#FFFFFF"
|
|
12587
|
-
}), React__default
|
|
12596
|
+
}), React__default.createElement("path", {
|
|
12588
12597
|
d: "M842.5 267.6c0 26.7-6.8 46.2-20.5 58.6-13.7 12.4-34.6 18.6-62.8 18.6-10.3 0-31.7-2-48.8-5.8l6.3-31c14.3 3 33.2 3.8 43.1 3.8 15.7 0 26.9-3.2 33.6-9.6s10-15.9 10-28.5v-6.4c-3.9 1.9-9 3.8-15.3 5.8-6.3 1.9-13.6 2.9-21.8 2.9-10.8 0-20.6-1.7-29.5-5.1-8.9-3.4-16.6-8.4-22.9-15-6.3-6.6-11.3-14.9-14.8-24.8s-5.3-27.6-5.3-40.6c0-12.2 1.9-27.5 5.6-37.7 3.8-10.2 9.2-19 16.5-26.3 7.2-7.3 16-12.9 26.3-17s22.4-6.7 35.5-6.7c12.7 0 24.4 1.6 35.8 3.5 11.4 1.9 21.1 3.9 29 6.1v155.2zm-108.7-77.2c0 16.4 3.6 34.6 10.8 42.2 7.2 7.6 16.5 11.4 27.9 11.4 6.2 0 12.1-.9 17.6-2.6 5.5-1.7 9.9-3.7 13.4-6.1v-97.1c-2.8-.6-14.5-3-25.8-3.3-14.2-.4-25 5.4-32.6 14.7-7.5 9.3-11.3 25.6-11.3 40.8zm294.3 0c0 13.2-1.9 23.2-5.8 34.1s-9.4 20.2-16.5 27.9c-7.1 7.7-15.6 13.7-25.6 17.9s-25.4 6.6-33.1 6.6c-7.7-.1-23-2.3-32.9-6.6-9.9-4.3-18.4-10.2-25.5-17.9-7.1-7.7-12.6-17-16.6-27.9s-6-20.9-6-34.1c0-13.2 1.8-25.9 5.8-36.7 4-10.8 9.6-20 16.8-27.7s15.8-13.6 25.6-17.8c9.9-4.2 20.8-6.2 32.6-6.2s22.7 2.1 32.7 6.2c10 4.2 18.6 10.1 25.6 17.8 7.1 7.7 12.6 16.9 16.6 27.7 4.2 10.8 6.3 23.5 6.3 36.7zm-40 .1c0-16.9-3.7-31-10.9-40.8-7.2-9.9-17.3-14.8-30.2-14.8-12.9 0-23 4.9-30.2 14.8-7.2 9.9-10.7 23.9-10.7 40.8 0 17.1 3.6 28.6 10.8 38.5 7.2 10 17.3 14.9 30.2 14.9 12.9 0 23-5 30.2-14.9 7.2-10 10.8-21.4 10.8-38.5zm127.1 86.4c-64.1.3-64.1-51.8-64.1-60.1L1051 32l39.1-6.2v183.6c0 4.7 0 34.5 25.1 34.6v32.9zm68.9 0h-39.3V108.1l39.3-6.2v175zm-19.7-193.5c13.1 0 23.8-10.6 23.8-23.7S1177.6 36 1164.4 36s-23.8 10.6-23.8 23.7 10.7 23.7 23.8 23.7zm117.4 18.6c12.9 0 23.8 1.6 32.6 4.8 8.8 3.2 15.9 7.7 21.1 13.4s8.9 13.5 11.1 21.7c2.3 8.2 3.4 17.2 3.4 27.1v100.6c-6 1.3-15.1 2.8-27.3 4.6s-25.9 2.7-41.1 2.7c-10.1 0-19.4-1-27.7-2.9-8.4-1.9-15.5-5-21.5-9.3-5.9-4.3-10.5-9.8-13.9-16.6-3.3-6.8-5-16.4-5-26.4 0-9.6 1.9-15.7 5.6-22.3 3.8-6.6 8.9-12 15.3-16.2 6.5-4.2 13.9-7.2 22.4-9s17.4-2.7 26.6-2.7c4.3 0 8.8.3 13.6.8s9.8 1.4 15.2 2.7v-6.4c0-4.5-.5-8.8-1.6-12.8-1.1-4.1-3-7.6-5.6-10.7-2.7-3.1-6.2-5.5-10.6-7.2s-10-3-16.7-3c-9 0-17.2 1.1-24.7 2.4-7.5 1.3-13.7 2.8-18.4 4.5l-4.7-32.1c4.9-1.7 12.2-3.4 21.6-5.1s19.5-2.6 30.3-2.6zm3.3 141.9c12 0 20.9-.7 27.1-1.9v-39.8c-2.2-.6-5.3-1.3-9.4-1.9-4.1-.6-8.6-1-13.6-1-4.3 0-8.7.3-13.1 1-4.4.6-8.4 1.8-11.9 3.5s-6.4 4.1-8.5 7.2c-2.2 3.1-3.2 4.9-3.2 9.6 0 9.2 3.2 14.5 9 18 5.9 3.6 13.7 5.3 23.6 5.3zM512.9 103c12.9 0 23.8 1.6 32.6 4.8 8.8 3.2 15.9 7.7 21.1 13.4 5.3 5.8 8.9 13.5 11.1 21.7 2.3 8.2 3.4 17.2 3.4 27.1v100.6c-6 1.3-15.1 2.8-27.3 4.6-12.2 1.8-25.9 2.7-41.1 2.7-10.1 0-19.4-1-27.7-2.9-8.4-1.9-15.5-5-21.5-9.3-5.9-4.3-10.5-9.8-13.9-16.6-3.3-6.8-5-16.4-5-26.4 0-9.6 1.9-15.7 5.6-22.3 3.8-6.6 8.9-12 15.3-16.2 6.5-4.2 13.9-7.2 22.4-9s17.4-2.7 26.6-2.7c4.3 0 8.8.3 13.6.8 4.7.5 9.8 1.4 15.2 2.7v-6.4c0-4.5-.5-8.8-1.6-12.8-1.1-4.1-3-7.6-5.6-10.7-2.7-3.1-6.2-5.5-10.6-7.2-4.4-1.7-10-3-16.7-3-9 0-17.2 1.1-24.7 2.4-7.5 1.3-13.7 2.8-18.4 4.5l-4.7-32.1c4.9-1.7 12.2-3.4 21.6-5.1 9.4-1.8 19.5-2.6 30.3-2.6zm3.4 142c12 0 20.9-.7 27.1-1.9v-39.8c-2.2-.6-5.3-1.3-9.4-1.9-4.1-.6-8.6-1-13.6-1-4.3 0-8.7.3-13.1 1-4.4.6-8.4 1.8-11.9 3.5s-6.4 4.1-8.5 7.2c-2.2 3.1-3.2 4.9-3.2 9.6 0 9.2 3.2 14.5 9 18s13.7 5.3 23.6 5.3zm158.5 31.9c-64.1.3-64.1-51.8-64.1-60.1L610.6 32l39.1-6.2v183.6c0 4.7 0 34.5 25.1 34.6v32.9z",
|
|
12589
12598
|
fill: "#182359"
|
|
12590
12599
|
}));
|
|
@@ -12610,17 +12619,17 @@ function (_Component) {
|
|
|
12610
12619
|
url = _this$props.url,
|
|
12611
12620
|
translate = _this$props.translate,
|
|
12612
12621
|
className = _this$props.className;
|
|
12613
|
-
return React__default
|
|
12614
|
-
className: index.classnames(cx$
|
|
12615
|
-
}, React__default
|
|
12616
|
-
className: cx$
|
|
12617
|
-
}, translate('searchBy')), ' ', React__default
|
|
12622
|
+
return React__default.createElement("div", {
|
|
12623
|
+
className: index$5.classnames(cx$e(''), className)
|
|
12624
|
+
}, React__default.createElement("span", {
|
|
12625
|
+
className: cx$e('text')
|
|
12626
|
+
}, translate('searchBy')), ' ', React__default.createElement("a", {
|
|
12618
12627
|
href: url,
|
|
12619
12628
|
target: "_blank",
|
|
12620
|
-
className: cx$
|
|
12629
|
+
className: cx$e('link'),
|
|
12621
12630
|
"aria-label": "Algolia",
|
|
12622
12631
|
rel: "noopener noreferrer"
|
|
12623
|
-
}, React__default
|
|
12632
|
+
}, React__default.createElement(AlgoliaLogo, null)));
|
|
12624
12633
|
}
|
|
12625
12634
|
}]);
|
|
12626
12635
|
|
|
@@ -12628,9 +12637,9 @@ function (_Component) {
|
|
|
12628
12637
|
}(React.Component);
|
|
12629
12638
|
|
|
12630
12639
|
_defineProperty(PoweredBy, "propTypes", {
|
|
12631
|
-
url: PropTypes__default
|
|
12632
|
-
translate: PropTypes__default
|
|
12633
|
-
className: PropTypes__default
|
|
12640
|
+
url: PropTypes__default.string.isRequired,
|
|
12641
|
+
translate: PropTypes__default.func.isRequired,
|
|
12642
|
+
className: PropTypes__default.string
|
|
12634
12643
|
});
|
|
12635
12644
|
|
|
12636
12645
|
var PoweredBy$1 = translatable({
|
|
@@ -12670,7 +12679,7 @@ var PoweredBy$1 = translatable({
|
|
|
12670
12679
|
|
|
12671
12680
|
connectPoweredBy(PoweredBy$1);
|
|
12672
12681
|
|
|
12673
|
-
var cx$
|
|
12682
|
+
var cx$f = createClassNames('RangeInput');
|
|
12674
12683
|
var RawRangeInput =
|
|
12675
12684
|
/*#__PURE__*/
|
|
12676
12685
|
function (_Component) {
|
|
@@ -12749,13 +12758,13 @@ function (_Component) {
|
|
|
12749
12758
|
max = _this$normalizeRangeF.max;
|
|
12750
12759
|
|
|
12751
12760
|
var step = 1 / Math.pow(10, precision);
|
|
12752
|
-
return React__default
|
|
12753
|
-
className: index.classnames(cx$
|
|
12754
|
-
}, React__default
|
|
12755
|
-
className: cx$
|
|
12761
|
+
return React__default.createElement("div", {
|
|
12762
|
+
className: index$5.classnames(cx$f('', !canRefine && '-noRefinement'), className)
|
|
12763
|
+
}, React__default.createElement("form", {
|
|
12764
|
+
className: cx$f('form'),
|
|
12756
12765
|
onSubmit: this.onSubmit
|
|
12757
|
-
}, React__default
|
|
12758
|
-
className: cx$
|
|
12766
|
+
}, React__default.createElement("input", {
|
|
12767
|
+
className: cx$f('input', 'input--min'),
|
|
12759
12768
|
type: "number",
|
|
12760
12769
|
min: min,
|
|
12761
12770
|
max: max,
|
|
@@ -12768,10 +12777,10 @@ function (_Component) {
|
|
|
12768
12777
|
from: e.currentTarget.value
|
|
12769
12778
|
});
|
|
12770
12779
|
}
|
|
12771
|
-
}), React__default
|
|
12772
|
-
className: cx$
|
|
12773
|
-
}, translate('separator')), React__default
|
|
12774
|
-
className: cx$
|
|
12780
|
+
}), React__default.createElement("span", {
|
|
12781
|
+
className: cx$f('separator')
|
|
12782
|
+
}, translate('separator')), React__default.createElement("input", {
|
|
12783
|
+
className: cx$f('input', 'input--max'),
|
|
12775
12784
|
type: "number",
|
|
12776
12785
|
min: min,
|
|
12777
12786
|
max: max,
|
|
@@ -12784,8 +12793,8 @@ function (_Component) {
|
|
|
12784
12793
|
to: e.currentTarget.value
|
|
12785
12794
|
});
|
|
12786
12795
|
}
|
|
12787
|
-
}), React__default
|
|
12788
|
-
className: cx$
|
|
12796
|
+
}), React__default.createElement("button", {
|
|
12797
|
+
className: cx$f('submit'),
|
|
12789
12798
|
type: "submit"
|
|
12790
12799
|
}, translate('submit'))));
|
|
12791
12800
|
}
|
|
@@ -12795,17 +12804,17 @@ function (_Component) {
|
|
|
12795
12804
|
}(React.Component);
|
|
12796
12805
|
|
|
12797
12806
|
_defineProperty(RawRangeInput, "propTypes", {
|
|
12798
|
-
canRefine: PropTypes__default
|
|
12799
|
-
precision: PropTypes__default
|
|
12800
|
-
translate: PropTypes__default
|
|
12801
|
-
refine: PropTypes__default
|
|
12802
|
-
min: PropTypes__default
|
|
12803
|
-
max: PropTypes__default
|
|
12804
|
-
currentRefinement: PropTypes__default
|
|
12805
|
-
min: PropTypes__default
|
|
12806
|
-
max: PropTypes__default
|
|
12807
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
12808
|
+
precision: PropTypes__default.number.isRequired,
|
|
12809
|
+
translate: PropTypes__default.func.isRequired,
|
|
12810
|
+
refine: PropTypes__default.func.isRequired,
|
|
12811
|
+
min: PropTypes__default.number,
|
|
12812
|
+
max: PropTypes__default.number,
|
|
12813
|
+
currentRefinement: PropTypes__default.shape({
|
|
12814
|
+
min: PropTypes__default.number,
|
|
12815
|
+
max: PropTypes__default.number
|
|
12807
12816
|
}),
|
|
12808
|
-
className: PropTypes__default
|
|
12817
|
+
className: PropTypes__default.string
|
|
12809
12818
|
});
|
|
12810
12819
|
|
|
12811
12820
|
_defineProperty(RawRangeInput, "defaultProps", {
|
|
@@ -12861,12 +12870,12 @@ var RangeInput = translatable({
|
|
|
12861
12870
|
*/
|
|
12862
12871
|
|
|
12863
12872
|
var RangeInputWidget = function RangeInputWidget(props) {
|
|
12864
|
-
return React__default
|
|
12873
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(RangeInput, props));
|
|
12865
12874
|
};
|
|
12866
12875
|
|
|
12867
12876
|
connectRange(RangeInputWidget);
|
|
12868
12877
|
|
|
12869
|
-
var cx$
|
|
12878
|
+
var cx$g = createClassNames('RatingMenu');
|
|
12870
12879
|
|
|
12871
12880
|
var RatingMenu =
|
|
12872
12881
|
/*#__PURE__*/
|
|
@@ -12917,14 +12926,14 @@ function (_Component) {
|
|
|
12917
12926
|
rating++;
|
|
12918
12927
|
}
|
|
12919
12928
|
|
|
12920
|
-
icons.push([React__default
|
|
12929
|
+
icons.push([React__default.createElement("svg", {
|
|
12921
12930
|
key: icon,
|
|
12922
|
-
className: cx$
|
|
12931
|
+
className: cx$g('starIcon', icon >= lowerBound ? 'starIcon--empty' : 'starIcon--full'),
|
|
12923
12932
|
"aria-hidden": "true",
|
|
12924
12933
|
width: "24",
|
|
12925
12934
|
height: "24"
|
|
12926
|
-
}, React__default
|
|
12927
|
-
xlinkHref: "#".concat(cx$
|
|
12935
|
+
}, React__default.createElement("use", {
|
|
12936
|
+
xlinkHref: "#".concat(cx$g(icon >= lowerBound ? 'starEmptySymbol' : 'starSymbol'))
|
|
12928
12937
|
})), ' ']);
|
|
12929
12938
|
} // The last item of the list (the default item), should not
|
|
12930
12939
|
// be clickable if it is selected.
|
|
@@ -12938,17 +12947,17 @@ function (_Component) {
|
|
|
12938
12947
|
}),
|
|
12939
12948
|
onClick: this.onClick.bind(this, lowerBound, max)
|
|
12940
12949
|
};
|
|
12941
|
-
return React__default
|
|
12950
|
+
return React__default.createElement("li", {
|
|
12942
12951
|
key: lowerBound,
|
|
12943
|
-
className: cx$
|
|
12944
|
-
}, React__default
|
|
12945
|
-
className: cx$
|
|
12952
|
+
className: cx$g('item', selected && 'item--selected', disabled && 'item--disabled')
|
|
12953
|
+
}, React__default.createElement("a", index$5._extends({
|
|
12954
|
+
className: cx$g('link'),
|
|
12946
12955
|
"aria-label": "".concat(rating).concat(translate('ratingLabel'))
|
|
12947
|
-
}, onClickHandler), icons, React__default
|
|
12948
|
-
className: cx$
|
|
12956
|
+
}, onClickHandler), icons, React__default.createElement("span", {
|
|
12957
|
+
className: cx$g('label'),
|
|
12949
12958
|
"aria-hidden": "true"
|
|
12950
|
-
}, translate('ratingLabel')), ' ', React__default
|
|
12951
|
-
className: cx$
|
|
12959
|
+
}, translate('ratingLabel')), ' ', React__default.createElement("span", {
|
|
12960
|
+
className: cx$g('count')
|
|
12952
12961
|
}, count)));
|
|
12953
12962
|
}
|
|
12954
12963
|
}, {
|
|
@@ -12980,7 +12989,7 @@ function (_Component) {
|
|
|
12980
12989
|
start: 0,
|
|
12981
12990
|
end: Math.max(inclusiveLength, 0)
|
|
12982
12991
|
}).map(function (index) {
|
|
12983
|
-
var element = find(values, function (item) {
|
|
12992
|
+
var element = find$2(values, function (item) {
|
|
12984
12993
|
return item.value === limitMax - index;
|
|
12985
12994
|
});
|
|
12986
12995
|
var placeholder = {
|
|
@@ -13003,25 +13012,25 @@ function (_Component) {
|
|
|
13003
13012
|
createURL: createURL
|
|
13004
13013
|
});
|
|
13005
13014
|
});
|
|
13006
|
-
return React__default
|
|
13007
|
-
className: index.classnames(cx$
|
|
13008
|
-
}, React__default
|
|
13015
|
+
return React__default.createElement("div", {
|
|
13016
|
+
className: index$5.classnames(cx$g('', !canRefine && '-noRefinement'), className)
|
|
13017
|
+
}, React__default.createElement("svg", {
|
|
13009
13018
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13010
13019
|
style: {
|
|
13011
13020
|
display: 'none'
|
|
13012
13021
|
}
|
|
13013
|
-
}, React__default
|
|
13014
|
-
id: cx$
|
|
13022
|
+
}, React__default.createElement("symbol", {
|
|
13023
|
+
id: cx$g('starSymbol'),
|
|
13015
13024
|
viewBox: "0 0 24 24"
|
|
13016
|
-
}, React__default
|
|
13025
|
+
}, React__default.createElement("path", {
|
|
13017
13026
|
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"
|
|
13018
|
-
})), React__default
|
|
13019
|
-
id: cx$
|
|
13027
|
+
})), React__default.createElement("symbol", {
|
|
13028
|
+
id: cx$g('starEmptySymbol'),
|
|
13020
13029
|
viewBox: "0 0 24 24"
|
|
13021
|
-
}, React__default
|
|
13030
|
+
}, React__default.createElement("path", {
|
|
13022
13031
|
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"
|
|
13023
|
-
}))), React__default
|
|
13024
|
-
className: cx$
|
|
13032
|
+
}))), React__default.createElement("ul", {
|
|
13033
|
+
className: cx$g('list', !canRefine && 'list--noRefinement')
|
|
13025
13034
|
}, items));
|
|
13026
13035
|
}
|
|
13027
13036
|
}]);
|
|
@@ -13030,21 +13039,21 @@ function (_Component) {
|
|
|
13030
13039
|
}(React.Component);
|
|
13031
13040
|
|
|
13032
13041
|
_defineProperty(RatingMenu, "propTypes", {
|
|
13033
|
-
translate: PropTypes__default
|
|
13034
|
-
refine: PropTypes__default
|
|
13035
|
-
createURL: PropTypes__default
|
|
13036
|
-
min: PropTypes__default
|
|
13037
|
-
max: PropTypes__default
|
|
13038
|
-
currentRefinement: PropTypes__default
|
|
13039
|
-
min: PropTypes__default
|
|
13040
|
-
max: PropTypes__default
|
|
13042
|
+
translate: PropTypes__default.func.isRequired,
|
|
13043
|
+
refine: PropTypes__default.func.isRequired,
|
|
13044
|
+
createURL: PropTypes__default.func.isRequired,
|
|
13045
|
+
min: PropTypes__default.number,
|
|
13046
|
+
max: PropTypes__default.number,
|
|
13047
|
+
currentRefinement: PropTypes__default.shape({
|
|
13048
|
+
min: PropTypes__default.number,
|
|
13049
|
+
max: PropTypes__default.number
|
|
13041
13050
|
}),
|
|
13042
|
-
count: PropTypes__default
|
|
13043
|
-
value: PropTypes__default
|
|
13044
|
-
count: PropTypes__default
|
|
13051
|
+
count: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
13052
|
+
value: PropTypes__default.string,
|
|
13053
|
+
count: PropTypes__default.number
|
|
13045
13054
|
})),
|
|
13046
|
-
canRefine: PropTypes__default
|
|
13047
|
-
className: PropTypes__default
|
|
13055
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
13056
|
+
className: PropTypes__default.string
|
|
13048
13057
|
});
|
|
13049
13058
|
|
|
13050
13059
|
_defineProperty(RatingMenu, "defaultProps", {
|
|
@@ -13104,12 +13113,12 @@ var RatingMenu$1 = translatable({
|
|
|
13104
13113
|
*/
|
|
13105
13114
|
|
|
13106
13115
|
var RatingMenuWidget = function RatingMenuWidget(props) {
|
|
13107
|
-
return React__default
|
|
13116
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(RatingMenu$1, props));
|
|
13108
13117
|
};
|
|
13109
13118
|
|
|
13110
13119
|
connectRange(RatingMenuWidget);
|
|
13111
13120
|
|
|
13112
|
-
var cx$
|
|
13121
|
+
var cx$h = createClassNames('RefinementList');
|
|
13113
13122
|
|
|
13114
13123
|
var RefinementList$1 =
|
|
13115
13124
|
/*#__PURE__*/
|
|
@@ -13140,23 +13149,23 @@ function (_Component) {
|
|
|
13140
13149
|
});
|
|
13141
13150
|
|
|
13142
13151
|
_defineProperty(_assertThisInitialized(_this), "renderItem", function (item, resetQuery) {
|
|
13143
|
-
var label = _this.props.isFromSearch ? React__default
|
|
13152
|
+
var label = _this.props.isFromSearch ? React__default.createElement(Highlight$2, {
|
|
13144
13153
|
attribute: "label",
|
|
13145
13154
|
hit: item
|
|
13146
13155
|
}) : item.label;
|
|
13147
|
-
return React__default
|
|
13148
|
-
className: cx$
|
|
13149
|
-
}, React__default
|
|
13150
|
-
className: cx$
|
|
13156
|
+
return React__default.createElement("label", {
|
|
13157
|
+
className: cx$h('label')
|
|
13158
|
+
}, React__default.createElement("input", {
|
|
13159
|
+
className: cx$h('checkbox'),
|
|
13151
13160
|
type: "checkbox",
|
|
13152
13161
|
checked: item.isRefined,
|
|
13153
13162
|
onChange: function onChange() {
|
|
13154
13163
|
return _this.selectItem(item, resetQuery);
|
|
13155
13164
|
}
|
|
13156
|
-
}), React__default
|
|
13157
|
-
className: cx$
|
|
13158
|
-
}, label), ' ', React__default
|
|
13159
|
-
className: cx$
|
|
13165
|
+
}), React__default.createElement("span", {
|
|
13166
|
+
className: cx$h('labelText')
|
|
13167
|
+
}, label), ' ', React__default.createElement("span", {
|
|
13168
|
+
className: cx$h('count')
|
|
13160
13169
|
}, item.count.toLocaleString()));
|
|
13161
13170
|
});
|
|
13162
13171
|
|
|
@@ -13177,10 +13186,10 @@ function (_Component) {
|
|
|
13177
13186
|
searchable = _this$props.searchable,
|
|
13178
13187
|
canRefine = _this$props.canRefine,
|
|
13179
13188
|
className = _this$props.className;
|
|
13180
|
-
return React__default
|
|
13189
|
+
return React__default.createElement(List, {
|
|
13181
13190
|
renderItem: this.renderItem,
|
|
13182
13191
|
selectItem: this.selectItem,
|
|
13183
|
-
cx: cx$
|
|
13192
|
+
cx: cx$h,
|
|
13184
13193
|
translate: translate,
|
|
13185
13194
|
items: items,
|
|
13186
13195
|
showMore: showMore,
|
|
@@ -13200,24 +13209,24 @@ function (_Component) {
|
|
|
13200
13209
|
}(React.Component);
|
|
13201
13210
|
|
|
13202
13211
|
_defineProperty(RefinementList$1, "propTypes", {
|
|
13203
|
-
translate: PropTypes__default
|
|
13204
|
-
refine: PropTypes__default
|
|
13205
|
-
searchForItems: PropTypes__default
|
|
13206
|
-
searchable: PropTypes__default
|
|
13207
|
-
createURL: PropTypes__default
|
|
13208
|
-
items: PropTypes__default
|
|
13209
|
-
label: PropTypes__default
|
|
13210
|
-
value: PropTypes__default
|
|
13211
|
-
count: PropTypes__default
|
|
13212
|
-
isRefined: PropTypes__default
|
|
13212
|
+
translate: PropTypes__default.func.isRequired,
|
|
13213
|
+
refine: PropTypes__default.func.isRequired,
|
|
13214
|
+
searchForItems: PropTypes__default.func.isRequired,
|
|
13215
|
+
searchable: PropTypes__default.bool,
|
|
13216
|
+
createURL: PropTypes__default.func.isRequired,
|
|
13217
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
13218
|
+
label: PropTypes__default.string.isRequired,
|
|
13219
|
+
value: PropTypes__default.arrayOf(PropTypes__default.string).isRequired,
|
|
13220
|
+
count: PropTypes__default.number.isRequired,
|
|
13221
|
+
isRefined: PropTypes__default.bool.isRequired
|
|
13213
13222
|
})),
|
|
13214
|
-
isFromSearch: PropTypes__default
|
|
13215
|
-
canRefine: PropTypes__default
|
|
13216
|
-
showMore: PropTypes__default
|
|
13217
|
-
limit: PropTypes__default
|
|
13218
|
-
showMoreLimit: PropTypes__default
|
|
13219
|
-
transformItems: PropTypes__default
|
|
13220
|
-
className: PropTypes__default
|
|
13223
|
+
isFromSearch: PropTypes__default.bool.isRequired,
|
|
13224
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
13225
|
+
showMore: PropTypes__default.bool,
|
|
13226
|
+
limit: PropTypes__default.number,
|
|
13227
|
+
showMoreLimit: PropTypes__default.number,
|
|
13228
|
+
transformItems: PropTypes__default.func,
|
|
13229
|
+
className: PropTypes__default.string
|
|
13221
13230
|
});
|
|
13222
13231
|
|
|
13223
13232
|
_defineProperty(RefinementList$1, "defaultProps", {
|
|
@@ -13289,12 +13298,12 @@ var RefinementList$2 = translatable({
|
|
|
13289
13298
|
*/
|
|
13290
13299
|
|
|
13291
13300
|
var RefinementListWidget = function RefinementListWidget(props) {
|
|
13292
|
-
return React__default
|
|
13301
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(RefinementList$2, props));
|
|
13293
13302
|
};
|
|
13294
13303
|
|
|
13295
|
-
var RefinementList = connectRefinementList(RefinementListWidget);
|
|
13304
|
+
var RefinementList$3 = connectRefinementList(RefinementListWidget);
|
|
13296
13305
|
|
|
13297
|
-
var cx$
|
|
13306
|
+
var cx$i = createClassNames('ScrollTo');
|
|
13298
13307
|
|
|
13299
13308
|
var ScrollTo =
|
|
13300
13309
|
/*#__PURE__*/
|
|
@@ -13323,11 +13332,11 @@ function (_Component) {
|
|
|
13323
13332
|
value: function render() {
|
|
13324
13333
|
var _this = this;
|
|
13325
13334
|
|
|
13326
|
-
return React__default
|
|
13335
|
+
return React__default.createElement("div", {
|
|
13327
13336
|
ref: function ref(_ref) {
|
|
13328
13337
|
return _this.el = _ref;
|
|
13329
13338
|
},
|
|
13330
|
-
className: cx$
|
|
13339
|
+
className: cx$i('')
|
|
13331
13340
|
}, this.props.children);
|
|
13332
13341
|
}
|
|
13333
13342
|
}]);
|
|
@@ -13336,9 +13345,9 @@ function (_Component) {
|
|
|
13336
13345
|
}(React.Component);
|
|
13337
13346
|
|
|
13338
13347
|
_defineProperty(ScrollTo, "propTypes", {
|
|
13339
|
-
value: PropTypes__default
|
|
13340
|
-
children: PropTypes__default
|
|
13341
|
-
hasNotChanged: PropTypes__default
|
|
13348
|
+
value: PropTypes__default.any,
|
|
13349
|
+
children: PropTypes__default.node,
|
|
13350
|
+
hasNotChanged: PropTypes__default.bool
|
|
13342
13351
|
});
|
|
13343
13352
|
|
|
13344
13353
|
/**
|
|
@@ -13421,14 +13430,14 @@ connectScrollTo(ScrollTo);
|
|
|
13421
13430
|
* );
|
|
13422
13431
|
*/
|
|
13423
13432
|
|
|
13424
|
-
var SearchBox = connectSearchBox(SearchBox$
|
|
13433
|
+
var SearchBox$2 = connectSearchBox(SearchBox$1);
|
|
13425
13434
|
|
|
13426
|
-
var cx$
|
|
13435
|
+
var cx$j = createClassNames('Snippet');
|
|
13427
13436
|
|
|
13428
13437
|
var Snippet = function Snippet(props) {
|
|
13429
|
-
return React__default
|
|
13438
|
+
return React__default.createElement(Highlighter, index$5._extends({}, props, {
|
|
13430
13439
|
highlightProperty: "_snippetResult",
|
|
13431
|
-
cx: cx$
|
|
13440
|
+
cx: cx$j
|
|
13432
13441
|
}));
|
|
13433
13442
|
};
|
|
13434
13443
|
|
|
@@ -13478,11 +13487,11 @@ var Snippet = function Snippet(props) {
|
|
|
13478
13487
|
|
|
13479
13488
|
connectHighlight(Snippet);
|
|
13480
13489
|
|
|
13481
|
-
var cx$
|
|
13490
|
+
var cx$k = createClassNames('RelevantSort');
|
|
13482
13491
|
|
|
13483
13492
|
var DefaultButtonTextComponent = function DefaultButtonTextComponent(_ref) {
|
|
13484
13493
|
var isRelevantSorted = _ref.isRelevantSorted;
|
|
13485
|
-
return React__default
|
|
13494
|
+
return React__default.createElement("span", null, isRelevantSorted ? 'See all results' : 'See relevant results');
|
|
13486
13495
|
};
|
|
13487
13496
|
|
|
13488
13497
|
var RelevantSort = function RelevantSort(_ref2) {
|
|
@@ -13494,34 +13503,34 @@ var RelevantSort = function RelevantSort(_ref2) {
|
|
|
13494
13503
|
ButtonTextComponent = _ref2$buttonTextCompo === void 0 ? DefaultButtonTextComponent : _ref2$buttonTextCompo,
|
|
13495
13504
|
TextComponent = _ref2.textComponent,
|
|
13496
13505
|
refine = _ref2.refine;
|
|
13497
|
-
return !isVirtualReplica ? null : React__default
|
|
13498
|
-
className: index.classnames(cx$
|
|
13499
|
-
}, React__default
|
|
13500
|
-
className: cx$
|
|
13501
|
-
}, TextComponent && React__default
|
|
13506
|
+
return !isVirtualReplica ? null : React__default.createElement("div", {
|
|
13507
|
+
className: index$5.classnames(cx$k(''), className)
|
|
13508
|
+
}, React__default.createElement("div", {
|
|
13509
|
+
className: cx$k('text')
|
|
13510
|
+
}, TextComponent && React__default.createElement(TextComponent, {
|
|
13502
13511
|
isRelevantSorted: isRelevantSorted
|
|
13503
|
-
})), React__default
|
|
13504
|
-
className: cx$
|
|
13512
|
+
})), React__default.createElement("button", {
|
|
13513
|
+
className: cx$k('button'),
|
|
13505
13514
|
onClick: function onClick() {
|
|
13506
13515
|
return refine(isRelevantSorted ? 0 : undefined);
|
|
13507
13516
|
}
|
|
13508
|
-
}, React__default
|
|
13517
|
+
}, React__default.createElement(ButtonTextComponent, {
|
|
13509
13518
|
isRelevantSorted: isRelevantSorted
|
|
13510
13519
|
})));
|
|
13511
13520
|
};
|
|
13512
13521
|
|
|
13513
13522
|
RelevantSort.propTypes = {
|
|
13514
|
-
buttonTextComponent: PropTypes__default
|
|
13515
|
-
className: PropTypes__default
|
|
13516
|
-
isVirtualReplica: PropTypes__default
|
|
13517
|
-
isRelevantSorted: PropTypes__default
|
|
13518
|
-
refine: PropTypes__default
|
|
13519
|
-
textComponent: PropTypes__default
|
|
13523
|
+
buttonTextComponent: PropTypes__default.func,
|
|
13524
|
+
className: PropTypes__default.string,
|
|
13525
|
+
isVirtualReplica: PropTypes__default.bool.isRequired,
|
|
13526
|
+
isRelevantSorted: PropTypes__default.bool.isRequired,
|
|
13527
|
+
refine: PropTypes__default.func.isRequired,
|
|
13528
|
+
textComponent: PropTypes__default.func
|
|
13520
13529
|
};
|
|
13521
13530
|
|
|
13522
13531
|
connectRelevantSort(RelevantSort);
|
|
13523
13532
|
|
|
13524
|
-
var cx$
|
|
13533
|
+
var cx$l = createClassNames('SortBy');
|
|
13525
13534
|
|
|
13526
13535
|
var SortBy =
|
|
13527
13536
|
/*#__PURE__*/
|
|
@@ -13542,10 +13551,10 @@ function (_Component) {
|
|
|
13542
13551
|
currentRefinement = _this$props.currentRefinement,
|
|
13543
13552
|
refine = _this$props.refine,
|
|
13544
13553
|
className = _this$props.className;
|
|
13545
|
-
return React__default
|
|
13546
|
-
className: index.classnames(cx$
|
|
13547
|
-
}, React__default
|
|
13548
|
-
cx: cx$
|
|
13554
|
+
return React__default.createElement("div", {
|
|
13555
|
+
className: index$5.classnames(cx$l(''), className)
|
|
13556
|
+
}, React__default.createElement(Select, {
|
|
13557
|
+
cx: cx$l,
|
|
13549
13558
|
items: items,
|
|
13550
13559
|
selectedItem: currentRefinement,
|
|
13551
13560
|
onSelect: refine
|
|
@@ -13557,13 +13566,13 @@ function (_Component) {
|
|
|
13557
13566
|
}(React.Component);
|
|
13558
13567
|
|
|
13559
13568
|
_defineProperty(SortBy, "propTypes", {
|
|
13560
|
-
items: PropTypes__default
|
|
13561
|
-
label: PropTypes__default
|
|
13562
|
-
value: PropTypes__default
|
|
13569
|
+
items: PropTypes__default.arrayOf(PropTypes__default.shape({
|
|
13570
|
+
label: PropTypes__default.string,
|
|
13571
|
+
value: PropTypes__default.string.isRequired
|
|
13563
13572
|
})).isRequired,
|
|
13564
|
-
currentRefinement: PropTypes__default
|
|
13565
|
-
refine: PropTypes__default
|
|
13566
|
-
className: PropTypes__default
|
|
13573
|
+
currentRefinement: PropTypes__default.string.isRequired,
|
|
13574
|
+
refine: PropTypes__default.func.isRequired,
|
|
13575
|
+
className: PropTypes__default.string
|
|
13567
13576
|
});
|
|
13568
13577
|
|
|
13569
13578
|
_defineProperty(SortBy, "defaultProps", {
|
|
@@ -13611,7 +13620,7 @@ _defineProperty(SortBy, "defaultProps", {
|
|
|
13611
13620
|
|
|
13612
13621
|
connectSortBy(SortBy);
|
|
13613
13622
|
|
|
13614
|
-
var cx$
|
|
13623
|
+
var cx$m = createClassNames('Stats');
|
|
13615
13624
|
|
|
13616
13625
|
var Stats = function Stats(_ref) {
|
|
13617
13626
|
var _ref$className = _ref.className,
|
|
@@ -13621,20 +13630,20 @@ var Stats = function Stats(_ref) {
|
|
|
13621
13630
|
nbSortedHits = _ref.nbSortedHits,
|
|
13622
13631
|
processingTimeMS = _ref.processingTimeMS,
|
|
13623
13632
|
translate = _ref.translate;
|
|
13624
|
-
return React__default
|
|
13625
|
-
className: index.classnames(cx$
|
|
13626
|
-
}, React__default
|
|
13627
|
-
className: cx$
|
|
13633
|
+
return React__default.createElement("div", {
|
|
13634
|
+
className: index$5.classnames(cx$m(''), className)
|
|
13635
|
+
}, React__default.createElement("span", {
|
|
13636
|
+
className: cx$m('text')
|
|
13628
13637
|
}, translate('stats', nbHits, processingTimeMS, nbSortedHits, areHitsSorted)));
|
|
13629
13638
|
};
|
|
13630
13639
|
|
|
13631
13640
|
Stats.propTypes = {
|
|
13632
|
-
className: PropTypes__default
|
|
13633
|
-
areHitsSorted: PropTypes__default
|
|
13634
|
-
nbHits: PropTypes__default
|
|
13635
|
-
nbSortedHits: PropTypes__default
|
|
13636
|
-
processingTimeMS: PropTypes__default
|
|
13637
|
-
translate: PropTypes__default
|
|
13641
|
+
className: PropTypes__default.string,
|
|
13642
|
+
areHitsSorted: PropTypes__default.bool.isRequired,
|
|
13643
|
+
nbHits: PropTypes__default.number.isRequired,
|
|
13644
|
+
nbSortedHits: PropTypes__default.number,
|
|
13645
|
+
processingTimeMS: PropTypes__default.number.isRequired,
|
|
13646
|
+
translate: PropTypes__default.func.isRequired
|
|
13638
13647
|
};
|
|
13639
13648
|
var Stats$1 = translatable({
|
|
13640
13649
|
stats: function stats(n, ms, nSorted, areHitsSorted) {
|
|
@@ -13672,7 +13681,7 @@ var Stats$1 = translatable({
|
|
|
13672
13681
|
|
|
13673
13682
|
connectStats(Stats$1);
|
|
13674
13683
|
|
|
13675
|
-
var cx$
|
|
13684
|
+
var cx$n = createClassNames('ToggleRefinement');
|
|
13676
13685
|
|
|
13677
13686
|
var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
13678
13687
|
var currentRefinement = _ref.currentRefinement,
|
|
@@ -13680,28 +13689,28 @@ var ToggleRefinement = function ToggleRefinement(_ref) {
|
|
|
13680
13689
|
canRefine = _ref.canRefine,
|
|
13681
13690
|
refine = _ref.refine,
|
|
13682
13691
|
className = _ref.className;
|
|
13683
|
-
return React__default
|
|
13684
|
-
className: index.classnames(cx$
|
|
13685
|
-
}, React__default
|
|
13686
|
-
className: cx$
|
|
13687
|
-
}, React__default
|
|
13688
|
-
className: cx$
|
|
13692
|
+
return React__default.createElement("div", {
|
|
13693
|
+
className: index$5.classnames(cx$n('', !canRefine && '-noRefinement'), className)
|
|
13694
|
+
}, React__default.createElement("label", {
|
|
13695
|
+
className: cx$n('label')
|
|
13696
|
+
}, React__default.createElement("input", {
|
|
13697
|
+
className: cx$n('checkbox'),
|
|
13689
13698
|
type: "checkbox",
|
|
13690
13699
|
checked: currentRefinement,
|
|
13691
13700
|
onChange: function onChange(event) {
|
|
13692
13701
|
return refine(event.target.checked);
|
|
13693
13702
|
}
|
|
13694
|
-
}), React__default
|
|
13695
|
-
className: cx$
|
|
13703
|
+
}), React__default.createElement("span", {
|
|
13704
|
+
className: cx$n('labelText')
|
|
13696
13705
|
}, label)));
|
|
13697
13706
|
};
|
|
13698
13707
|
|
|
13699
13708
|
ToggleRefinement.propTypes = {
|
|
13700
|
-
currentRefinement: PropTypes__default
|
|
13701
|
-
label: PropTypes__default
|
|
13702
|
-
canRefine: PropTypes__default
|
|
13703
|
-
refine: PropTypes__default
|
|
13704
|
-
className: PropTypes__default
|
|
13709
|
+
currentRefinement: PropTypes__default.bool.isRequired,
|
|
13710
|
+
label: PropTypes__default.string.isRequired,
|
|
13711
|
+
canRefine: PropTypes__default.bool.isRequired,
|
|
13712
|
+
refine: PropTypes__default.func.isRequired,
|
|
13713
|
+
className: PropTypes__default.string
|
|
13705
13714
|
};
|
|
13706
13715
|
ToggleRefinement.defaultProps = {
|
|
13707
13716
|
className: ''
|
|
@@ -13901,11 +13910,11 @@ function createVoiceSearchHelper(_ref) {
|
|
|
13901
13910
|
};
|
|
13902
13911
|
}
|
|
13903
13912
|
|
|
13904
|
-
var cx$
|
|
13913
|
+
var cx$o = createClassNames('VoiceSearch');
|
|
13905
13914
|
|
|
13906
13915
|
var ButtonSvg = function ButtonSvg(_ref) {
|
|
13907
13916
|
var children = _ref.children;
|
|
13908
|
-
return React__default
|
|
13917
|
+
return React__default.createElement("svg", {
|
|
13909
13918
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13910
13919
|
width: "16",
|
|
13911
13920
|
height: "16",
|
|
@@ -13922,36 +13931,36 @@ var DefaultButtonText = function DefaultButtonText(_ref2) {
|
|
|
13922
13931
|
var status = _ref2.status,
|
|
13923
13932
|
errorCode = _ref2.errorCode,
|
|
13924
13933
|
isListening = _ref2.isListening;
|
|
13925
|
-
return status === 'error' && errorCode === 'not-allowed' ? React__default
|
|
13934
|
+
return status === 'error' && errorCode === 'not-allowed' ? React__default.createElement(ButtonSvg, null, React__default.createElement("line", {
|
|
13926
13935
|
x1: "1",
|
|
13927
13936
|
y1: "1",
|
|
13928
13937
|
x2: "23",
|
|
13929
13938
|
y2: "23"
|
|
13930
|
-
}), React__default
|
|
13939
|
+
}), React__default.createElement("path", {
|
|
13931
13940
|
d: "M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"
|
|
13932
|
-
}), React__default
|
|
13941
|
+
}), React__default.createElement("path", {
|
|
13933
13942
|
d: "M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"
|
|
13934
|
-
}), React__default
|
|
13943
|
+
}), React__default.createElement("line", {
|
|
13935
13944
|
x1: "12",
|
|
13936
13945
|
y1: "19",
|
|
13937
13946
|
x2: "12",
|
|
13938
13947
|
y2: "23"
|
|
13939
|
-
}), React__default
|
|
13948
|
+
}), React__default.createElement("line", {
|
|
13940
13949
|
x1: "8",
|
|
13941
13950
|
y1: "23",
|
|
13942
13951
|
x2: "16",
|
|
13943
13952
|
y2: "23"
|
|
13944
|
-
})) : React__default
|
|
13953
|
+
})) : React__default.createElement(ButtonSvg, null, React__default.createElement("path", {
|
|
13945
13954
|
d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z",
|
|
13946
13955
|
fill: isListening ? 'currentColor' : ''
|
|
13947
|
-
}), React__default
|
|
13956
|
+
}), React__default.createElement("path", {
|
|
13948
13957
|
d: "M19 10v2a7 7 0 0 1-14 0v-2"
|
|
13949
|
-
}), React__default
|
|
13958
|
+
}), React__default.createElement("line", {
|
|
13950
13959
|
x1: "12",
|
|
13951
13960
|
y1: "19",
|
|
13952
13961
|
x2: "12",
|
|
13953
13962
|
y2: "23"
|
|
13954
|
-
}), React__default
|
|
13963
|
+
}), React__default.createElement("line", {
|
|
13955
13964
|
x1: "8",
|
|
13956
13965
|
y1: "23",
|
|
13957
13966
|
x2: "16",
|
|
@@ -13961,7 +13970,7 @@ var DefaultButtonText = function DefaultButtonText(_ref2) {
|
|
|
13961
13970
|
|
|
13962
13971
|
var DefaultStatus = function DefaultStatus(_ref3) {
|
|
13963
13972
|
var transcript = _ref3.transcript;
|
|
13964
|
-
return React__default
|
|
13973
|
+
return React__default.createElement("p", null, transcript);
|
|
13965
13974
|
};
|
|
13966
13975
|
|
|
13967
13976
|
var VoiceSearch =
|
|
@@ -14046,17 +14055,17 @@ function (_Component) {
|
|
|
14046
14055
|
isSpeechFinal: isSpeechFinal,
|
|
14047
14056
|
isBrowserSupported: isBrowserSupported()
|
|
14048
14057
|
};
|
|
14049
|
-
return React__default
|
|
14050
|
-
className: cx$
|
|
14051
|
-
}, React__default
|
|
14052
|
-
className: cx$
|
|
14058
|
+
return React__default.createElement("div", {
|
|
14059
|
+
className: cx$o('')
|
|
14060
|
+
}, React__default.createElement("button", {
|
|
14061
|
+
className: cx$o('button'),
|
|
14053
14062
|
type: "button",
|
|
14054
14063
|
title: isBrowserSupported() ? translate('buttonTitle') : translate('disabledButtonTitle'),
|
|
14055
14064
|
onClick: this.onClick,
|
|
14056
14065
|
disabled: !isBrowserSupported()
|
|
14057
|
-
}, React__default
|
|
14058
|
-
className: cx$
|
|
14059
|
-
}, React__default
|
|
14066
|
+
}, React__default.createElement(ButtonTextComponent, innerProps)), React__default.createElement("div", {
|
|
14067
|
+
className: cx$o('status')
|
|
14068
|
+
}, React__default.createElement(StatusComponent, innerProps)));
|
|
14060
14069
|
}
|
|
14061
14070
|
}, {
|
|
14062
14071
|
key: "componentWillUnmount",
|
|
@@ -14083,27 +14092,27 @@ var VoiceSearch$1 = translatable({
|
|
|
14083
14092
|
|
|
14084
14093
|
connectVoiceSearch(VoiceSearch$1);
|
|
14085
14094
|
|
|
14086
|
-
var cx = createClassNames('QueryRuleCustomData');
|
|
14095
|
+
var cx$p = createClassNames('QueryRuleCustomData');
|
|
14087
14096
|
|
|
14088
14097
|
var QueryRuleCustomData = function QueryRuleCustomData(_ref) {
|
|
14089
14098
|
var items = _ref.items,
|
|
14090
14099
|
className = _ref.className,
|
|
14091
14100
|
children = _ref.children;
|
|
14092
|
-
return React__default
|
|
14093
|
-
className: index.classnames(cx(''), className)
|
|
14101
|
+
return React__default.createElement("div", {
|
|
14102
|
+
className: index$5.classnames(cx$p(''), className)
|
|
14094
14103
|
}, children({
|
|
14095
14104
|
items: items
|
|
14096
14105
|
}));
|
|
14097
14106
|
};
|
|
14098
14107
|
|
|
14099
14108
|
QueryRuleCustomData.propTypes = {
|
|
14100
|
-
items: PropTypes__default
|
|
14101
|
-
className: PropTypes__default
|
|
14102
|
-
children: PropTypes__default
|
|
14109
|
+
items: PropTypes__default.arrayOf(PropTypes__default.object).isRequired,
|
|
14110
|
+
className: PropTypes__default.string,
|
|
14111
|
+
children: PropTypes__default.func.isRequired
|
|
14103
14112
|
};
|
|
14104
14113
|
|
|
14105
14114
|
var QueryRuleCustomDataWidget = function QueryRuleCustomDataWidget(props) {
|
|
14106
|
-
return React__default
|
|
14115
|
+
return React__default.createElement(PanelWrapper, props, React__default.createElement(QueryRuleCustomData, props));
|
|
14107
14116
|
};
|
|
14108
14117
|
|
|
14109
14118
|
connectQueryRules(QueryRuleCustomDataWidget);
|
|
@@ -14127,57 +14136,57 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14127
14136
|
|
|
14128
14137
|
var hit = props.hit;
|
|
14129
14138
|
if (moment.moment().isSameOrBefore(props.hit.pubDateSort)) return null;
|
|
14130
|
-
return React__default
|
|
14139
|
+
return React__default.createElement(
|
|
14131
14140
|
'div',
|
|
14132
14141
|
{ key: hit.url, className: 'hitResult ' + styles.article },
|
|
14133
|
-
React__default
|
|
14142
|
+
React__default.createElement(
|
|
14134
14143
|
'a',
|
|
14135
14144
|
{ href: '/view/' + hit.url, style: this.props.variant === 'right' ? { flexDirection: 'row-reverse' } : {} },
|
|
14136
|
-
React__default
|
|
14145
|
+
React__default.createElement(
|
|
14137
14146
|
'div',
|
|
14138
14147
|
{ className: styles.thumb },
|
|
14139
|
-
React__default
|
|
14148
|
+
React__default.createElement(
|
|
14140
14149
|
'figure',
|
|
14141
14150
|
null,
|
|
14142
|
-
React__default
|
|
14143
|
-
index$
|
|
14151
|
+
React__default.createElement(
|
|
14152
|
+
index$2.LazyLoad,
|
|
14144
14153
|
{ once: true },
|
|
14145
|
-
React__default
|
|
14154
|
+
React__default.createElement('img', {
|
|
14146
14155
|
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
|
|
14147
14156
|
})
|
|
14148
14157
|
)
|
|
14149
14158
|
)
|
|
14150
14159
|
)
|
|
14151
14160
|
),
|
|
14152
|
-
React__default
|
|
14161
|
+
React__default.createElement(
|
|
14153
14162
|
'div',
|
|
14154
14163
|
{ className: styles.info, style: this.props.variant === 'right' ? { padding: '0 1rem 0 0' } : { padding: ' 0 0 0 1rem' } },
|
|
14155
|
-
React__default
|
|
14164
|
+
React__default.createElement(
|
|
14156
14165
|
'a',
|
|
14157
14166
|
{ href: '/view/' + hit.url },
|
|
14158
|
-
React__default
|
|
14167
|
+
React__default.createElement(
|
|
14159
14168
|
'h2',
|
|
14160
14169
|
null,
|
|
14161
14170
|
hit.title
|
|
14162
14171
|
)
|
|
14163
14172
|
),
|
|
14164
|
-
hit.pubDateSort && React__default
|
|
14173
|
+
hit.pubDateSort && React__default.createElement(
|
|
14165
14174
|
'p',
|
|
14166
14175
|
{ className: styles.published },
|
|
14167
14176
|
moment.moment(hit.pubDateSort).format('MMMM Do YYYY')
|
|
14168
14177
|
),
|
|
14169
|
-
hit.authorMapping && hit.authorMapping.length > 0 && React__default
|
|
14178
|
+
hit.authorMapping && hit.authorMapping.length > 0 && React__default.createElement(
|
|
14170
14179
|
'p',
|
|
14171
14180
|
{ className: styles.author },
|
|
14172
14181
|
hit.authorMapping.map(function (author) {
|
|
14173
|
-
return React__default
|
|
14182
|
+
return React__default.createElement(
|
|
14174
14183
|
'span',
|
|
14175
14184
|
null,
|
|
14176
14185
|
author.displayName
|
|
14177
14186
|
);
|
|
14178
14187
|
})
|
|
14179
14188
|
),
|
|
14180
|
-
hit.summary && React__default
|
|
14189
|
+
hit.summary && React__default.createElement('p', { dangerouslySetInnerHTML: { __html: hit.summary }, className: styles.summary })
|
|
14181
14190
|
)
|
|
14182
14191
|
);
|
|
14183
14192
|
}
|
|
@@ -14190,10 +14199,10 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14190
14199
|
styles: this.props.deckStyles,
|
|
14191
14200
|
client: this.props.sanityClient
|
|
14192
14201
|
};
|
|
14193
|
-
return React__default
|
|
14194
|
-
React__default
|
|
14202
|
+
return React__default.createElement(
|
|
14203
|
+
React__default.Fragment,
|
|
14195
14204
|
null,
|
|
14196
|
-
React__default
|
|
14205
|
+
React__default.createElement(
|
|
14197
14206
|
InstantSearch,
|
|
14198
14207
|
_extends._extends({
|
|
14199
14208
|
searchClient: this.props.searchClient,
|
|
@@ -14204,29 +14213,29 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14204
14213
|
indexName: this.props.indexName,
|
|
14205
14214
|
onSearchParameters: this.props.onSearchParameters
|
|
14206
14215
|
}, this.props),
|
|
14207
|
-
React__default
|
|
14208
|
-
React__default
|
|
14209
|
-
this.props.refinementAttributes && React__default
|
|
14216
|
+
React__default.createElement(Configure, { hitsPerPage: this.props.hitsPerPage || 20 }),
|
|
14217
|
+
React__default.createElement(SearchBox$2, null),
|
|
14218
|
+
this.props.refinementAttributes && React__default.createElement(
|
|
14210
14219
|
'div',
|
|
14211
14220
|
{ className: 'search_refinement' },
|
|
14212
14221
|
this.props.refinementAttributes.map(function (item, index) {
|
|
14213
|
-
return React__default
|
|
14222
|
+
return React__default.createElement(
|
|
14214
14223
|
reactBootstrap.DropdownButton,
|
|
14215
14224
|
{ title: item.title },
|
|
14216
|
-
React__default
|
|
14225
|
+
React__default.createElement(RefinementList$3, { showMore: item.showMore, limit: item.limit, showMoreLimit: item.showMoreLimit, attribute: item.attribute })
|
|
14217
14226
|
);
|
|
14218
14227
|
})
|
|
14219
14228
|
),
|
|
14220
|
-
React__default
|
|
14229
|
+
React__default.createElement(
|
|
14221
14230
|
'div',
|
|
14222
14231
|
{ className: 'AlgoliaResults' },
|
|
14223
|
-
React__default
|
|
14232
|
+
React__default.createElement(Hits$1, { hitComponent: function hitComponent(hit) {
|
|
14224
14233
|
return _this2.Deck(_extends._extends({}, hit, { propsObj: propsObj }));
|
|
14225
14234
|
} })
|
|
14226
14235
|
),
|
|
14227
|
-
React__default
|
|
14236
|
+
React__default.createElement(Pagination$2, null)
|
|
14228
14237
|
),
|
|
14229
|
-
React__default
|
|
14238
|
+
React__default.createElement(
|
|
14230
14239
|
'style',
|
|
14231
14240
|
{ jsx: 'true' },
|
|
14232
14241
|
'\n .hitResult {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-bottom: 1rem;\n border-bottom: 1px solid #00000024;\n padding: 1rem 0;\n }\n .hitResult > a:first-child {\n width: 30%;\n }\n .hitResult > a:first-child > div{\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n .hitResult > div:last-child > a {\n margin-bottom: .5rem;\n width: 100%;\n }\n @media only screen and (max-width: 568px) {\n .hitResult {\n flex-direction: column;\n align-items: center;\n border: none;\n padding: 0;\n }\n .hitResult > a:first-child {\n width: 100%;\n }\n .hitResult > div:last-child {\n width: 100%;\n }\n }\n .AlgoliaResults {\n padding-left: 15px;\n margin-top: 3rem;\n }\n\n .search_refinement {\n display: flex;\n margin: 2rem 0;\n }\n\n .search_refinement > div {\n padding-right: 1rem;\n max-height: 500px;\n }\n\n .ais-Hits-list {\n margin: 0;\n list-style: none;\n padding-inline-start: 0;\n }\n .ais-Pagination-list {\n list-style: none;\n }\n .ais-Pagination-list {\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n .ais-Pagination-item + .ais-Pagination-item {\n margin-left: 0.3rem;\n }\n .ais-Pagination-link {\n padding: 0.3rem 0.6rem;\n display: block;\n border: 1px solid var(--search-primary);\n border-radius: 5px;\n transition: background-color 0.2s ease-out;\n }\n .ais-Pagination-link:focus,\n .ais-Pagination-link:hover {\n background-color: var(--search-secondary);\n color: #fff;\n }\n .ais-Pagination-item--disabled .ais-Pagination-link {\n opacity: 0.6;\n cursor: not-allowed;\n color: var(--search-secondary);\n }\n .ais-Pagination-item--disabled .ais-Pagination-link:focus,\n .ais-Pagination-item--disabled .ais-Pagination-link:hover {\n color: #fff;\n background-color: var(--search-secondary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link {\n color: #fff;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n .ais-Pagination-item--selected .ais-Pagination-link:focus,\n .ais-Pagination-item--selected .ais-Pagination-link:hover {\n color: #fff;\n }\n .ais-Pagination-list,\n .ais-Results-list {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .ais-Pagination-list,\n .ais-PoweredBy,\n .ais-RangeInput-form,\n .ais-RatingMenu-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .ais-RefinementList-item {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .ais-RefinementList-list {\n margin: 0;\n padding: 0 1rem;\n width: max-content;\n }\n .ais-SearchBox-form {\n width: 100%;\n border-radius: 5px;\n height: 48px;\n }\n .ais-SearchBox-input {\n padding: 0.5rem;\n border-radius: 5px;\n width: calc(100% - 150px);\n height: 48px;\n border: 0;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit {\n width: 78px;\n border-radius: 5px;\n padding: 7px;\n margin-left: 5px;\n height: 48px;\n background-color: var(--search-primary);\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-submit > svg {\n fill: #fff;\n }\n .search_refinement > .dropdown > button {\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n }\n\n .ais-SearchBox-reset {\n height: 48px;\n width: 48px;\n color: #fff;\n background-color: var(--search-primary);\n border: 0;\n margin-left: 5px;\n border-radius: 5px;\n border: 0.5px solid var(--search-secondary);\n }\n\n .ais-SearchBox-reset > svg {\n fill: #fff;\n }\n .ais-RefinementList-checkbox {\n margin-right: 5px;\n }\n\n .ais-RefinementList-showMore {\n padding: 0.5rem;\n border: 0;\n background-color: var(--search-primary);\n border-color: var(--search-primary);\n color: #fff;\n border: 1px solid;\n border-radius: 5px;\n margin-left: 1rem;\n }\n '
|
|
@@ -14236,16 +14245,16 @@ var AlgoliaSearch = function (_React$Component) {
|
|
|
14236
14245
|
}]);
|
|
14237
14246
|
|
|
14238
14247
|
return AlgoliaSearch;
|
|
14239
|
-
}(React__default
|
|
14248
|
+
}(React__default.Component);
|
|
14240
14249
|
|
|
14241
14250
|
AlgoliaSearch.propTypes = {
|
|
14242
|
-
searchState: PropTypes__default
|
|
14243
|
-
resultsState: PropTypes__default
|
|
14244
|
-
onSearchStateChange: PropTypes__default
|
|
14245
|
-
createURL: PropTypes__default
|
|
14246
|
-
indexName: PropTypes__default
|
|
14247
|
-
searchClient: PropTypes__default
|
|
14248
|
-
refinementAttributes: PropTypes__default
|
|
14251
|
+
searchState: PropTypes__default.object,
|
|
14252
|
+
resultsState: PropTypes__default.oneOfType([PropTypes__default.object, PropTypes__default.array]),
|
|
14253
|
+
onSearchStateChange: PropTypes__default.func,
|
|
14254
|
+
createURL: PropTypes__default.func,
|
|
14255
|
+
indexName: PropTypes__default.string,
|
|
14256
|
+
searchClient: PropTypes__default.object,
|
|
14257
|
+
refinementAttributes: PropTypes__default.array
|
|
14249
14258
|
};
|
|
14250
14259
|
|
|
14251
14260
|
module.exports = AlgoliaSearch;
|