@blaze-cms/react-page-builder 0.146.0-core-styles.43 → 0.146.0-node18.0
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/CHANGELOG.md +31 -216
- package/lib/BannerContext/helpers/index.js.map +1 -1
- package/lib/BannerContext/helpers/set-initial-banner-counters.js +1 -1
- package/lib/BannerContext/helpers/set-initial-banner-counters.js.map +1 -1
- package/lib/BannerContext/index.js +3 -3
- package/lib/BannerContext/index.js.map +1 -1
- package/lib/HOC/index.js.map +1 -1
- package/lib/HOC/recreateOnNavigation.js +1 -1
- package/lib/HOC/recreateOnNavigation.js.map +1 -1
- package/lib/HOC/withInfiniteScroll.js +4 -4
- package/lib/HOC/withInfiniteScroll.js.map +1 -1
- package/lib/HOC/withTitle.js +3 -3
- package/lib/HOC/withTitle.js.map +1 -1
- package/lib/PBContext/index.js.map +1 -1
- package/lib/application/query/index.js +2 -1
- package/lib/application/query/index.js.map +1 -1
- package/lib/components/BackToTop/BackToTop.js +3 -3
- package/lib/components/BackToTop/BackToTop.js.map +1 -1
- package/lib/components/BackToTop/index.js.map +1 -1
- package/lib/components/Banner/AdSlotRender.js +6 -6
- package/lib/components/Banner/AdSlotRender.js.map +1 -1
- package/lib/components/Banner/Banner.js +5 -5
- package/lib/components/Banner/Banner.js.map +1 -1
- package/lib/components/Banner/BannerRender.js +4 -4
- package/lib/components/Banner/BannerRender.js.map +1 -1
- package/lib/components/Banner/helpers.js +19 -19
- package/lib/components/Banner/helpers.js.map +1 -1
- package/lib/components/Banner/index.js +5 -5
- package/lib/components/Banner/index.js.map +1 -1
- package/lib/components/BlazeLink.js +7 -7
- package/lib/components/BlazeLink.js.map +1 -1
- package/lib/components/Breadcrumb/Breadcrumb.js +5 -5
- package/lib/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/lib/components/Breadcrumb/index.js.map +1 -1
- package/lib/components/Button.js +7 -7
- package/lib/components/Button.js.map +1 -1
- package/lib/components/Card/Card.js +5 -5
- package/lib/components/Card/Card.js.map +1 -1
- package/lib/components/Card/CardsContainer.js +9 -9
- package/lib/components/Card/CardsContainer.js.map +1 -1
- package/lib/components/Card/CardsFactory.js +1 -1
- package/lib/components/Card/CardsFactory.js.map +1 -1
- package/lib/components/Card/CardsRender.js +13 -13
- package/lib/components/Card/CardsRender.js.map +1 -1
- package/lib/components/Card/constants.js.map +1 -1
- package/lib/components/Card/helpers/get-dynamic-grid-classes.js +3 -3
- package/lib/components/Card/helpers/get-dynamic-grid-classes.js.map +1 -1
- package/lib/components/Card/helpers/get-published-listing-url.js.map +1 -1
- package/lib/components/Card/helpers/index.js.map +1 -1
- package/lib/components/Card/helpers/use-dynamic-size-key.js +3 -3
- package/lib/components/Card/helpers/use-dynamic-size-key.js.map +1 -1
- package/lib/components/Card/index.js.map +1 -1
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselImage/CarouselImage.js.map +1 -1
- package/lib/components/Carousel/CarouselImage/constants.js.map +1 -1
- package/lib/components/Carousel/CarouselImage/index.js.map +1 -1
- package/lib/components/Carousel/CarouselRender/CarouselRender.js +1 -0
- package/lib/components/Carousel/CarouselRender/CarouselRender.js.map +1 -1
- package/lib/components/Carousel/CarouselRender/index.js.map +1 -1
- package/lib/components/Carousel/hooks/useCarouselNavigation.js.map +1 -1
- package/lib/components/Carousel/index.js.map +1 -1
- package/lib/components/CarouselWrapper/CarouselWrapper.js.map +1 -1
- package/lib/components/CarouselWrapper/DefaultCarousel.js +4 -4
- package/lib/components/CarouselWrapper/DefaultCarousel.js.map +1 -1
- package/lib/components/CarouselWrapper/SmoothScrollCarousel.js.map +1 -1
- package/lib/components/CarouselWrapper/index.js.map +1 -1
- package/lib/components/ClickWrapper.js +7 -7
- package/lib/components/ClickWrapper.js.map +1 -1
- package/lib/components/Code/Code.js +7 -7
- package/lib/components/Code/Code.js.map +1 -1
- package/lib/components/Code/ScriptTag.js +4 -4
- package/lib/components/Code/ScriptTag.js.map +1 -1
- package/lib/components/Code/helpers/index.js.map +1 -1
- package/lib/components/Code/helpers/wrap-script-tags.js +1 -1
- package/lib/components/Code/helpers/wrap-script-tags.js.map +1 -1
- package/lib/components/Code/index.js.map +1 -1
- package/lib/components/ContentGroup/ContentGroup.js.map +1 -1
- package/lib/components/ContentGroup/ContentGroupTabs.js +5 -5
- package/lib/components/ContentGroup/ContentGroupTabs.js.map +1 -1
- package/lib/components/ContentGroup/constants.js.map +1 -1
- package/lib/components/ContentGroup/helpers/get-active-tab.js +1 -1
- package/lib/components/ContentGroup/helpers/get-active-tab.js.map +1 -1
- package/lib/components/ContentGroup/helpers/get-sections-data.js +1 -0
- package/lib/components/ContentGroup/helpers/get-sections-data.js.map +1 -1
- package/lib/components/ContentGroup/helpers/index.js.map +1 -1
- package/lib/components/ContentGroup/index.js.map +1 -1
- package/lib/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
- package/lib/components/ContentGroupSection/index.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryFactory.js +3 -3
- package/lib/components/DataSummary/DataSummaryFactory.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryRender.js +1 -0
- package/lib/components/DataSummary/DataSummaryRender.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummary.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js +5 -5
- package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/index.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummary.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js +5 -5
- package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/index.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummary.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js +5 -5
- package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/index.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummary.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js +5 -5
- package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/ListSummary/index.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummary.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js +5 -5
- package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/TextSummary/index.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/index.js +9 -9
- package/lib/components/DataSummary/DataSummaryTypes/index.js.map +1 -1
- package/lib/components/DataSummary/helpers/build-loop-props-content.js +5 -5
- package/lib/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
- package/lib/components/DataSummary/helpers/build-props-to-display-with-content.js +2 -2
- package/lib/components/DataSummary/helpers/build-props-to-display-with-content.js.map +1 -1
- package/lib/components/DataSummary/helpers/get-data-summary-query.js.map +1 -1
- package/lib/components/DataSummary/helpers/get-link-based-on-value.js.map +1 -1
- package/lib/components/DataSummary/helpers/get-link-props.js +2 -2
- package/lib/components/DataSummary/helpers/get-link-props.js.map +1 -1
- package/lib/components/DataSummary/helpers/get-link-to-published-content.js.map +1 -1
- package/lib/components/DataSummary/helpers/get-loop-props-limit.js +2 -2
- package/lib/components/DataSummary/helpers/get-loop-props-limit.js.map +1 -1
- package/lib/components/DataSummary/helpers/get-prop-value.js +3 -3
- package/lib/components/DataSummary/helpers/get-prop-value.js.map +1 -1
- package/lib/components/DataSummary/helpers/get-value-from-array.js +2 -2
- package/lib/components/DataSummary/helpers/get-value-from-array.js.map +1 -1
- package/lib/components/DataSummary/helpers/index.js.map +1 -1
- package/lib/components/DataSummary/helpers/parse-boolean-values.js.map +1 -1
- package/lib/components/DataSummary/helpers/strip-summary-props-content.js.map +1 -1
- package/lib/components/DataSummary/index.js.map +1 -1
- package/lib/components/DateTime/DateTime.js +4 -4
- package/lib/components/DateTime/DateTime.js.map +1 -1
- package/lib/components/DateTime/index.js.map +1 -1
- package/lib/components/EmailConfirm/EmailConfirm.js +6 -6
- package/lib/components/EmailConfirm/EmailConfirm.js.map +1 -1
- package/lib/components/EmailConfirm/index.js.map +1 -1
- package/lib/components/EmailConfirm/mutation.js.map +1 -1
- package/lib/components/Iframe/Iframe.js.map +1 -1
- package/lib/components/Iframe/constants.js.map +1 -1
- package/lib/components/Iframe/index.js.map +1 -1
- package/lib/components/Image/GlobalLightbox/GlobalLightbox.js +6 -6
- package/lib/components/Image/GlobalLightbox/GlobalLightbox.js.map +1 -1
- package/lib/components/Image/GlobalLightbox/NavButton.js.map +1 -1
- package/lib/components/Image/GlobalLightbox/index.js +5 -5
- package/lib/components/Image/GlobalLightbox/index.js.map +1 -1
- package/lib/components/Image/Image.js +8 -8
- package/lib/components/Image/Image.js.map +1 -1
- package/lib/components/Image/ImageDetails.js.map +1 -1
- package/lib/components/Image/ImageFactory.js +4 -4
- package/lib/components/Image/ImageFactory.js.map +1 -1
- package/lib/components/Image/ImageRender.js.map +1 -1
- package/lib/components/Image/Lightbox/Lightbox.js +3 -3
- package/lib/components/Image/Lightbox/Lightbox.js.map +1 -1
- package/lib/components/Image/Lightbox/index.js.map +1 -1
- package/lib/components/Image/index.js.map +1 -1
- package/lib/components/ItemList/ItemListButton/ItemListButton.js +5 -5
- package/lib/components/ItemList/ItemListButton/ItemListButton.js.map +1 -1
- package/lib/components/ItemList/ItemListButton/index.js.map +1 -1
- package/lib/components/ItemList/ItemListCounter/ItemListCounter.js.map +1 -1
- package/lib/components/ItemList/ItemListCounter/index.js.map +1 -1
- package/lib/components/ItemList/ItemListNew/ItemListNew.js.map +1 -1
- package/lib/components/ItemList/ItemListNew/index.js.map +1 -1
- package/lib/components/ItemList/constants.js.map +1 -1
- package/lib/components/ItemList/helpers/get-item-list-data.js.map +1 -1
- package/lib/components/ItemList/helpers/get-item-list-id.js.map +1 -1
- package/lib/components/ItemList/helpers/get-item-list-ids.js +1 -0
- package/lib/components/ItemList/helpers/get-item-list-ids.js.map +1 -1
- package/lib/components/ItemList/helpers/index.js.map +1 -1
- package/lib/components/ItemList/helpers/set-item-list-id.js.map +1 -1
- package/lib/components/ItemList/helpers/set-param-and-redirect.js +5 -4
- package/lib/components/ItemList/helpers/set-param-and-redirect.js.map +1 -1
- package/lib/components/ItemList/hooks/index.js.map +1 -1
- package/lib/components/ItemList/hooks/use-item-list-id.js.map +1 -1
- package/lib/components/Layout/Layout.js +5 -5
- package/lib/components/Layout/Layout.js.map +1 -1
- package/lib/components/Layout/LayoutFactory.js +5 -5
- package/lib/components/Layout/LayoutFactory.js.map +1 -1
- package/lib/components/Layout/LayoutWithStickyTimer.js +3 -3
- package/lib/components/Layout/LayoutWithStickyTimer.js.map +1 -1
- package/lib/components/Layout/constants.js.map +1 -1
- package/lib/components/Layout/helpers/check-if-row-has-columns.js +1 -1
- package/lib/components/Layout/helpers/check-if-row-has-columns.js.map +1 -1
- package/lib/components/Layout/helpers/get-styles-to-update.js.map +1 -1
- package/lib/components/Layout/helpers/index.js.map +1 -1
- package/lib/components/Layout/index.js.map +1 -1
- package/lib/components/LazyImage/LazyImage.js.map +1 -1
- package/lib/components/LazyImage/index.js +5 -5
- package/lib/components/LazyImage/index.js.map +1 -1
- package/lib/components/List/ListBuilder.js +5 -5
- package/lib/components/List/ListBuilder.js.map +1 -1
- package/lib/components/List/ListFactory.js +11 -11
- package/lib/components/List/ListFactory.js.map +1 -1
- package/lib/components/List/ListRender.js.map +1 -1
- package/lib/components/List/components/Cards/CardRenderWithInfiniteScroll.js.map +1 -1
- package/lib/components/List/components/Cards/CardsRender.js +8 -8
- package/lib/components/List/components/Cards/CardsRender.js.map +1 -1
- package/lib/components/List/components/Cards/CardsRenderItem.js.map +1 -1
- package/lib/components/List/components/Cards/CardsRenderWrapper.js +4 -4
- package/lib/components/List/components/Cards/CardsRenderWrapper.js.map +1 -1
- package/lib/components/List/components/Cards/index.js.map +1 -1
- package/lib/components/List/components/Full/FullRender.js +7 -7
- package/lib/components/List/components/Full/FullRender.js.map +1 -1
- package/lib/components/List/components/Full/FullRenderItem.js +7 -7
- package/lib/components/List/components/Full/FullRenderItem.js.map +1 -1
- package/lib/components/List/components/Full/FullRenderWithInfiniteScroll.js.map +1 -1
- package/lib/components/List/components/Full/index.js.map +1 -1
- package/lib/components/List/components/Header/ListHeader.js +2 -1
- package/lib/components/List/components/Header/ListHeader.js.map +1 -1
- package/lib/components/List/components/Header/index.js.map +1 -1
- package/lib/components/List/components/Pagination/Classic.js.map +1 -1
- package/lib/components/List/components/Pagination/ListPagination.js +7 -7
- package/lib/components/List/components/Pagination/ListPagination.js.map +1 -1
- package/lib/components/List/components/Pagination/LoadMore.js +2 -2
- package/lib/components/List/components/Pagination/LoadMore.js.map +1 -1
- package/lib/components/List/components/Pagination/index.js.map +1 -1
- package/lib/components/List/components/helpers/check-if-should-render-banner.js +1 -2
- package/lib/components/List/components/helpers/check-if-should-render-banner.js.map +1 -1
- package/lib/components/List/components/helpers/check-if-should-render-gtm.js +1 -2
- package/lib/components/List/components/helpers/check-if-should-render-gtm.js.map +1 -1
- package/lib/components/List/components/helpers/index.js.map +1 -1
- package/lib/components/List/components/index.js.map +1 -1
- package/lib/components/List/constants.js.map +1 -1
- package/lib/components/List/helpers/build-az-aggregations.js +3 -3
- package/lib/components/List/helpers/build-az-aggregations.js.map +1 -1
- package/lib/components/List/helpers/build-az-url.js +5 -5
- package/lib/components/List/helpers/build-az-url.js.map +1 -1
- package/lib/components/List/helpers/build-pagination-items.js.map +1 -1
- package/lib/components/List/helpers/build-pagination-url.js +5 -5
- package/lib/components/List/helpers/build-pagination-url.js.map +1 -1
- package/lib/components/List/helpers/build-query-booster.js +7 -6
- package/lib/components/List/helpers/build-query-booster.js.map +1 -1
- package/lib/components/List/helpers/get-az-query-filter.js.map +1 -1
- package/lib/components/List/helpers/get-items-per-page-to-use.js.map +1 -1
- package/lib/components/List/helpers/get-list-component.js.map +1 -1
- package/lib/components/List/helpers/get-list-query.js +3 -3
- package/lib/components/List/helpers/get-list-query.js.map +1 -1
- package/lib/components/List/helpers/get-list-specific-search-filter.js.map +1 -1
- package/lib/components/List/helpers/get-sort-props.js +2 -2
- package/lib/components/List/helpers/get-sort-props.js.map +1 -1
- package/lib/components/List/helpers/has-required-item-list-details.js.map +1 -1
- package/lib/components/List/helpers/index.js.map +1 -1
- package/lib/components/List/helpers/sort-aggs.js.map +1 -1
- package/lib/components/List/helpers/strip-query-key.js.map +1 -1
- package/lib/components/List/index.js.map +1 -1
- package/lib/components/Loading/Loading.js.map +1 -1
- package/lib/components/Loading/constants.js.map +1 -1
- package/lib/components/Loading/helpers.js.map +1 -1
- package/lib/components/Loading/index.js.map +1 -1
- package/lib/components/Menu/Menu.js +4 -7
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/Menu/MenuContext.js +1 -2
- package/lib/components/Menu/MenuContext.js.map +1 -1
- package/lib/components/Menu/index.js.map +1 -1
- package/lib/components/MenuItem/MenuEntitiesItem.js +5 -5
- package/lib/components/MenuItem/MenuEntitiesItem.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.js.map +1 -1
- package/lib/components/MenuItem/MenuItemRender.js +9 -23
- package/lib/components/MenuItem/MenuItemRender.js.map +1 -1
- package/lib/components/MenuItem/helpers/index.js +0 -14
- package/lib/components/MenuItem/helpers/index.js.map +1 -1
- package/lib/components/MenuItem/helpers/inject-helper-into-template.js.map +1 -1
- package/lib/components/MenuItem/index.js.map +1 -1
- package/lib/components/Modal/Modal.js.map +1 -1
- package/lib/components/Modal/index.js.map +1 -1
- package/lib/components/ModalAdapter/ModalAdapter.js +1 -1
- package/lib/components/ModalAdapter/ModalAdapter.js.map +1 -1
- package/lib/components/ModalAdapter/index.js +5 -5
- package/lib/components/ModalAdapter/index.js.map +1 -1
- package/lib/components/SearchContent/SearchContent.js +4 -4
- package/lib/components/SearchContent/SearchContent.js.map +1 -1
- package/lib/components/SearchContent/SearchContentItems.js +1 -0
- package/lib/components/SearchContent/SearchContentItems.js.map +1 -1
- package/lib/components/SearchContent/SearchContentResults.js.map +1 -1
- package/lib/components/SearchContent/SearchContentToggleIcon.js.map +1 -1
- package/lib/components/SearchContent/constants.js.map +1 -1
- package/lib/components/SearchContent/index.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/CloseMobileForm.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/FiltersList.js +5 -5
- package/lib/components/SearchFilter/SearchFilter/FiltersList.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/MobileFormToolbar.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/ResetDesktopForm.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/SearchFilter.js +4 -4
- package/lib/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/index.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilterContainer.js +5 -6
- package/lib/components/SearchFilter/SearchFilterContainer.js.map +1 -1
- package/lib/components/SearchFilter/components/Checkbox.js +8 -8
- package/lib/components/SearchFilter/components/Checkbox.js.map +1 -1
- package/lib/components/SearchFilter/components/Range.js +4 -4
- package/lib/components/SearchFilter/components/Range.js.map +1 -1
- package/lib/components/SearchFilter/components/Select.js +3 -3
- package/lib/components/SearchFilter/components/Select.js.map +1 -1
- package/lib/components/SearchFilter/components/TextSearch.js.map +1 -1
- package/lib/components/SearchFilter/components/index.js.map +1 -1
- package/lib/components/SearchFilter/constants.js.map +1 -1
- package/lib/components/SearchFilter/helpers/build-list-name-query.js +3 -3
- package/lib/components/SearchFilter/helpers/build-list-name-query.js.map +1 -1
- package/lib/components/SearchFilter/helpers/build-new-url.js.map +1 -1
- package/lib/components/SearchFilter/helpers/build-url-query.js +3 -3
- package/lib/components/SearchFilter/helpers/build-url-query.js.map +1 -1
- package/lib/components/SearchFilter/helpers/calculate-min-max.js.map +1 -1
- package/lib/components/SearchFilter/helpers/calculate-step.js.map +1 -1
- package/lib/components/SearchFilter/helpers/check-if-range-updated.js.map +1 -1
- package/lib/components/SearchFilter/helpers/decode-encode.js.map +1 -1
- package/lib/components/SearchFilter/helpers/get-display-value.js +1 -1
- package/lib/components/SearchFilter/helpers/get-display-value.js.map +1 -1
- package/lib/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js +2 -2
- package/lib/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js.map +1 -1
- package/lib/components/SearchFilter/helpers/get-filter-value-from-query.js +1 -0
- package/lib/components/SearchFilter/helpers/get-filter-value-from-query.js.map +1 -1
- package/lib/components/SearchFilter/helpers/get-filter-values.js.map +1 -1
- package/lib/components/SearchFilter/helpers/get-initial-filter-values.js.map +1 -1
- package/lib/components/SearchFilter/helpers/get-intersected-prop.js.map +1 -1
- package/lib/components/SearchFilter/helpers/get-range-value.js.map +1 -1
- package/lib/components/SearchFilter/helpers/get-responsive-filter-classnames.js.map +1 -1
- package/lib/components/SearchFilter/helpers/get-select-options.js +1 -0
- package/lib/components/SearchFilter/helpers/get-select-options.js.map +1 -1
- package/lib/components/SearchFilter/helpers/get-updated-filter-by.js +2 -2
- package/lib/components/SearchFilter/helpers/get-updated-filter-by.js.map +1 -1
- package/lib/components/SearchFilter/helpers/index.js.map +1 -1
- package/lib/components/SearchFilter/helpers/is-device-desktop.js.map +1 -1
- package/lib/components/SearchFilter/helpers/parse-filter-value.js +1 -0
- package/lib/components/SearchFilter/helpers/parse-filter-value.js.map +1 -1
- package/lib/components/SearchFilter/index.js.map +1 -1
- package/lib/components/SearchFilter/searchFilterReducer.js +5 -5
- package/lib/components/SearchFilter/searchFilterReducer.js.map +1 -1
- package/lib/components/SearchFilterSort/SearchFilterSort.js +1 -0
- package/lib/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
- package/lib/components/SearchFilterSort/constants.js.map +1 -1
- package/lib/components/SearchFilterSort/helpers/handle-sort-update.js +2 -2
- package/lib/components/SearchFilterSort/helpers/handle-sort-update.js.map +1 -1
- package/lib/components/SearchFilterSort/helpers/index.js.map +1 -1
- package/lib/components/SearchFilterSort/helpers/update-sort.js +5 -5
- package/lib/components/SearchFilterSort/helpers/update-sort.js.map +1 -1
- package/lib/components/SearchFilterSort/index.js.map +1 -1
- package/lib/components/SocialFollow/SFItem.js.map +1 -1
- package/lib/components/SocialFollow/SocialFollow.js.map +1 -1
- package/lib/components/SocialFollow/SocialFollowRender.js +1 -0
- package/lib/components/SocialFollow/SocialFollowRender.js.map +1 -1
- package/lib/components/SocialFollow/index.js.map +1 -1
- package/lib/components/SocialFollow/sf.config.js.map +1 -1
- package/lib/components/SubMenu/SubMenu.js.map +1 -1
- package/lib/components/SubMenu/index.js.map +1 -1
- package/lib/components/TextBlock/TextBlockRender.js.map +1 -1
- package/lib/components/TextBlock/index.js +5 -5
- package/lib/components/TextBlock/index.js.map +1 -1
- package/lib/components/Video/Video.js +5 -5
- package/lib/components/Video/Video.js.map +1 -1
- package/lib/components/Video/VideoContext.js.map +1 -1
- package/lib/components/Video/VideoModal.js +3 -3
- package/lib/components/Video/VideoModal.js.map +1 -1
- package/lib/components/Video/VideoRender.js +3 -3
- package/lib/components/Video/VideoRender.js.map +1 -1
- package/lib/components/Video/constants.js.map +1 -1
- package/lib/components/Video/helpers/emit-gtm-event.js.map +1 -1
- package/lib/components/Video/index.js.map +1 -1
- package/lib/components/Video/providers/Default.js.map +1 -1
- package/lib/components/Video/providers/JWPlayer/JWPlayerController.js +1 -2
- package/lib/components/Video/providers/JWPlayer/JWPlayerController.js.map +1 -1
- package/lib/components/Video/providers/JWPlayer/JWPlayerProvider.js +7 -7
- package/lib/components/Video/providers/JWPlayer/JWPlayerProvider.js.map +1 -1
- package/lib/components/Video/providers/Vimeo/VimeoProvider.js +4 -4
- package/lib/components/Video/providers/Vimeo/VimeoProvider.js.map +1 -1
- package/lib/components/Video/providers/Vimeo/helpers/add-extra-params-to-url.js +6 -6
- package/lib/components/Video/providers/Vimeo/helpers/add-extra-params-to-url.js.map +1 -1
- package/lib/components/Video/providers/Vimeo/helpers/index.js.map +1 -1
- package/lib/components/Video/providers/YouTube/YouTubeProvider.js.map +1 -1
- package/lib/components/Video/providers/YouTube/YoutubeEmbeded.js +3 -3
- package/lib/components/Video/providers/YouTube/YoutubeEmbeded.js.map +1 -1
- package/lib/components/Video/providers/YouTube/helpers/index.js +1 -1
- package/lib/components/Video/providers/YouTube/helpers/index.js.map +1 -1
- package/lib/components/Video/providers/get-provider.js +9 -9
- package/lib/components/Video/providers/get-provider.js.map +1 -1
- package/lib/components/Video/providers/index.js.map +1 -1
- package/lib/components/Wrapper.js +2 -2
- package/lib/components/Wrapper.js.map +1 -1
- package/lib/components/index.js +34 -34
- package/lib/components/index.js.map +1 -1
- package/lib/constants/componentsDefaultValues.js.map +1 -1
- package/lib/constants/index.js.map +1 -1
- package/lib/helpers/append-images.js +5 -5
- package/lib/helpers/append-images.js.map +1 -1
- package/lib/helpers/build-az-filter.js.map +1 -1
- package/lib/helpers/build-checkbox-filters.js.map +1 -1
- package/lib/helpers/build-filters-query.js +6 -6
- package/lib/helpers/build-filters-query.js.map +1 -1
- package/lib/helpers/build-image-properties.js.map +1 -1
- package/lib/helpers/build-inherited-filters.js +4 -4
- package/lib/helpers/build-inherited-filters.js.map +1 -1
- package/lib/helpers/build-link-extra-props.js.map +1 -1
- package/lib/helpers/build-props-query.js +9 -9
- package/lib/helpers/build-props-query.js.map +1 -1
- package/lib/helpers/build-query-fields.js +2 -1
- package/lib/helpers/build-query-fields.js.map +1 -1
- package/lib/helpers/build-query-key.js.map +1 -1
- package/lib/helpers/build-raw-query-base.js +9 -9
- package/lib/helpers/build-raw-query-base.js.map +1 -1
- package/lib/helpers/build-raw-query-stringified.js +2 -1
- package/lib/helpers/build-raw-query-stringified.js.map +1 -1
- package/lib/helpers/build-raw-query.js +5 -5
- package/lib/helpers/build-raw-query.js.map +1 -1
- package/lib/helpers/build-search-values-checkbox-select.js +8 -8
- package/lib/helpers/build-search-values-checkbox-select.js.map +1 -1
- package/lib/helpers/build-search-values-text.js.map +1 -1
- package/lib/helpers/build-set-filters.js +3 -3
- package/lib/helpers/build-set-filters.js.map +1 -1
- package/lib/helpers/build-sort-values.js +6 -6
- package/lib/helpers/build-sort-values.js.map +1 -1
- package/lib/helpers/check-for-error.js.map +1 -1
- package/lib/helpers/check-props-to-use.js +1 -0
- package/lib/helpers/check-props-to-use.js.map +1 -1
- package/lib/helpers/entities/constants.js.map +1 -1
- package/lib/helpers/filter-query-setup.js +5 -5
- package/lib/helpers/filter-query-setup.js.map +1 -1
- package/lib/helpers/filters-setup.js.map +1 -1
- package/lib/helpers/get-banner-data.js +5 -5
- package/lib/helpers/get-banner-data.js.map +1 -1
- package/lib/helpers/get-checkbox-filters.js.map +1 -1
- package/lib/helpers/get-click-wrapper-options.js +6 -6
- package/lib/helpers/get-click-wrapper-options.js.map +1 -1
- package/lib/helpers/get-current-offset.js +4 -5
- package/lib/helpers/get-current-offset.js.map +1 -1
- package/lib/helpers/get-dictionary-match.js.map +1 -1
- package/lib/helpers/get-display-count-data.js.map +1 -1
- package/lib/helpers/get-elasticsearch-operator.js.map +1 -1
- package/lib/helpers/get-entities-with-banner.js +5 -5
- package/lib/helpers/get-entities-with-banner.js.map +1 -1
- package/lib/helpers/get-entity-data.js.map +1 -1
- package/lib/helpers/get-entity-render-props.js.map +1 -1
- package/lib/helpers/get-extra-az-bits.js.map +1 -1
- package/lib/helpers/get-filter-props.js.map +1 -1
- package/lib/helpers/get-filter-relation-keys.js +1 -1
- package/lib/helpers/get-filter-relation-keys.js.map +1 -1
- package/lib/helpers/get-generic-props.js +5 -5
- package/lib/helpers/get-generic-props.js.map +1 -1
- package/lib/helpers/get-generic-render-variables.js +7 -6
- package/lib/helpers/get-generic-render-variables.js.map +1 -1
- package/lib/helpers/get-image-ids.js +2 -2
- package/lib/helpers/get-image-ids.js.map +1 -1
- package/lib/helpers/get-inherited-filters.js +2 -2
- package/lib/helpers/get-inherited-filters.js.map +1 -1
- package/lib/helpers/get-items-to-display-ids.js +2 -2
- package/lib/helpers/get-items-to-display-ids.js.map +1 -1
- package/lib/helpers/get-modifiers.js +3 -3
- package/lib/helpers/get-modifiers.js.map +1 -1
- package/lib/helpers/get-not-equal-query.js.map +1 -1
- package/lib/helpers/get-pagination-index.js.map +1 -1
- package/lib/helpers/get-parsed-prop-values.js +3 -3
- package/lib/helpers/get-parsed-prop-values.js.map +1 -1
- package/lib/helpers/get-parsed-summary-value.js.map +1 -1
- package/lib/helpers/get-prop-values.js +2 -2
- package/lib/helpers/get-prop-values.js.map +1 -1
- package/lib/helpers/get-query-filters.js.map +1 -1
- package/lib/helpers/get-query-props.js +3 -3
- package/lib/helpers/get-query-props.js.map +1 -1
- package/lib/helpers/get-required-schemas.js +3 -3
- package/lib/helpers/get-required-schemas.js.map +1 -1
- package/lib/helpers/get-sanitized-prop-values.js.map +1 -1
- package/lib/helpers/get-search-filter-type.js.map +1 -1
- package/lib/helpers/get-sort-by-field-name.js +4 -4
- package/lib/helpers/get-sort-by-field-name.js.map +1 -1
- package/lib/helpers/get-unpublished-entity-name.js +1 -1
- package/lib/helpers/get-unpublished-entity-name.js.map +1 -1
- package/lib/helpers/get-updated-filter-by.js.map +1 -1
- package/lib/helpers/get-updated-items-to-display.js +3 -3
- package/lib/helpers/get-updated-items-to-display.js.map +1 -1
- package/lib/helpers/get-updated-sort-properties.js +2 -2
- package/lib/helpers/get-updated-sort-properties.js.map +1 -1
- package/lib/helpers/get-wrapped-value-with-link.js +2 -1
- package/lib/helpers/get-wrapped-value-with-link.js.map +1 -1
- package/lib/helpers/group-entities.js +1 -1
- package/lib/helpers/group-entities.js.map +1 -1
- package/lib/helpers/has-children.js.map +1 -1
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/inject-banner.js.map +1 -1
- package/lib/helpers/inject-banners-to-entities.js.map +1 -1
- package/lib/helpers/inject-multiple-banners/get-banners-for-entities/get-banners-for-entities.js +1 -0
- package/lib/helpers/inject-multiple-banners/get-banners-for-entities/get-banners-for-entities.js.map +1 -1
- package/lib/helpers/inject-multiple-banners/get-banners-for-entities/index.js.map +1 -1
- package/lib/helpers/inject-multiple-banners/get-banners-for-nodes/get-banners-for-nodes.js +6 -6
- package/lib/helpers/inject-multiple-banners/get-banners-for-nodes/get-banners-for-nodes.js.map +1 -1
- package/lib/helpers/inject-multiple-banners/get-banners-for-nodes/helpers/group-node-entities.js +3 -3
- package/lib/helpers/inject-multiple-banners/get-banners-for-nodes/helpers/group-node-entities.js.map +1 -1
- package/lib/helpers/inject-multiple-banners/get-banners-for-nodes/helpers/index.js.map +1 -1
- package/lib/helpers/inject-multiple-banners/get-banners-for-nodes/index.js.map +1 -1
- package/lib/helpers/inject-multiple-banners/index.js.map +1 -1
- package/lib/helpers/inject-multiple-banners/inject-multiple-banners.js.map +1 -1
- package/lib/helpers/is-browser.js.map +1 -1
- package/lib/helpers/is-filter-entitys-id.js +1 -1
- package/lib/helpers/is-filter-entitys-id.js.map +1 -1
- package/lib/helpers/is-object.js.map +1 -1
- package/lib/helpers/is-using-relation-image.js.map +1 -1
- package/lib/helpers/parse-TextBlock.js +3 -3
- package/lib/helpers/parse-TextBlock.js.map +1 -1
- package/lib/helpers/parse-interval.js.map +1 -1
- package/lib/helpers/parse-props-to-display.js +5 -5
- package/lib/helpers/parse-props-to-display.js.map +1 -1
- package/lib/helpers/process-data-summary-value.js +9 -10
- package/lib/helpers/process-data-summary-value.js.map +1 -1
- package/lib/helpers/remove-extra-items.js.map +1 -1
- package/lib/helpers/remove-unwanted-characters.js +6 -6
- package/lib/helpers/remove-unwanted-characters.js.map +1 -1
- package/lib/helpers/render-children.js +8 -8
- package/lib/helpers/render-children.js.map +1 -1
- package/lib/helpers/should-render-waypoint.js.map +1 -1
- package/lib/helpers/should-return.js.map +1 -1
- package/lib/helpers/should-show-property.js.map +1 -1
- package/lib/helpers/should-skip-single-query.js.map +1 -1
- package/lib/helpers/sort-response-data.js +2 -2
- package/lib/helpers/sort-response-data.js.map +1 -1
- package/lib/helpers/split-children.js +5 -5
- package/lib/helpers/split-children.js.map +1 -1
- package/lib/helpers/update-childrens-parent.js +3 -3
- package/lib/helpers/update-childrens-parent.js.map +1 -1
- package/lib/hooks/helpers/RenderComponent.js +1 -1
- package/lib/hooks/helpers/RenderComponent.js.map +1 -1
- package/lib/hooks/helpers/StoreImages.js +5 -6
- package/lib/hooks/helpers/StoreImages.js.map +1 -1
- package/lib/hooks/helpers/append-gtm-classname.js +7 -7
- package/lib/hooks/helpers/append-gtm-classname.js.map +1 -1
- package/lib/hooks/helpers/buildPBComponents.js +7 -7
- package/lib/hooks/helpers/buildPBComponents.js.map +1 -1
- package/lib/hooks/helpers/check-banner-insertion-set.js.map +1 -1
- package/lib/hooks/helpers/check-collisions.js +3 -3
- package/lib/hooks/helpers/check-collisions.js.map +1 -1
- package/lib/hooks/helpers/constants.js.map +1 -1
- package/lib/hooks/helpers/get-banner-index.js.map +1 -1
- package/lib/hooks/helpers/get-components-to-insert-by-type.js.map +1 -1
- package/lib/hooks/helpers/get-lightbox-images.js +14 -14
- package/lib/hooks/helpers/get-lightbox-images.js.map +1 -1
- package/lib/hooks/helpers/getComponent.js.map +1 -1
- package/lib/hooks/helpers/getVariant.js.map +1 -1
- package/lib/hooks/helpers/index.js.map +1 -1
- package/lib/hooks/helpers/inject-element-components.js +4 -4
- package/lib/hooks/helpers/inject-element-components.js.map +1 -1
- package/lib/hooks/helpers/inject-textblock-banners.js +8 -8
- package/lib/hooks/helpers/inject-textblock-banners.js.map +1 -1
- package/lib/hooks/helpers/insert-banners.js +9 -9
- package/lib/hooks/helpers/insert-banners.js.map +1 -1
- package/lib/hooks/helpers/update-targetings.js.map +1 -1
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/use-app-sync-event-hook.js.map +1 -1
- package/lib/hooks/use-banner-insertion.js +1 -1
- package/lib/hooks/use-banner-insertion.js.map +1 -1
- package/lib/hooks/use-check-mobile-screen.js.map +1 -1
- package/lib/hooks/use-filter-aggregation-values.js +5 -5
- package/lib/hooks/use-filter-aggregation-values.js.map +1 -1
- package/lib/hooks/use-get-entity-schema.js.map +1 -1
- package/lib/hooks/use-get-entity-schemas-as-obj.js +1 -1
- package/lib/hooks/use-get-entity-schemas-as-obj.js.map +1 -1
- package/lib/hooks/use-get-image-id-from-relation.js +1 -1
- package/lib/hooks/use-get-image-id-from-relation.js.map +1 -1
- package/lib/hooks/use-get-images.js.map +1 -1
- package/lib/hooks/use-get-single-entity-schema.js.map +1 -1
- package/lib/hooks/use-page-builder.js +2 -2
- package/lib/hooks/use-page-builder.js.map +1 -1
- package/lib/hooks/use-portal.js +3 -3
- package/lib/hooks/use-portal.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/component-map.js +1 -1
- package/lib/utils/component-map.js.map +1 -1
- package/lib/utils/get-class-modifiers.js +7 -7
- package/lib/utils/get-class-modifiers.js.map +1 -1
- package/lib/utils/get-image-data.js.map +1 -1
- package/lib/utils/get-props-to-display-modifiers.js +1 -0
- package/lib/utils/get-props-to-display-modifiers.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/is-object-empty.js.map +1 -1
- package/lib/utils/variant-handler.js +1 -1
- package/lib/utils/variant-handler.js.map +1 -1
- package/lib/variants/FloatingSideButton/index.js +5 -5
- package/lib/variants/FloatingSideButton/index.js.map +1 -1
- package/lib/variants/HeroImage/index.js +5 -5
- package/lib/variants/HeroImage/index.js.map +1 -1
- package/lib/variants/Infographic/Infographic.js.map +1 -1
- package/lib/variants/Infographic/index.js +7 -7
- package/lib/variants/Infographic/index.js.map +1 -1
- package/lib/variants/Infographic/useInfographic.js +5 -5
- package/lib/variants/Infographic/useInfographic.js.map +1 -1
- package/lib/variants/LongformGallery/LongformGallery.js +1 -0
- package/lib/variants/LongformGallery/LongformGallery.js.map +1 -1
- package/lib/variants/LongformGallery/LongformGalleryImage.js.map +1 -1
- package/lib/variants/LongformGallery/constants.js.map +1 -1
- package/lib/variants/LongformGallery/helpers/index.js.map +1 -1
- package/lib/variants/LongformGallery/helpers/parseImageData.js +3 -3
- package/lib/variants/LongformGallery/helpers/parseImageData.js.map +1 -1
- package/lib/variants/LongformGallery/helpers/separateImages.js.map +1 -1
- package/lib/variants/LongformGallery/helpers/shouldSkip.js.map +1 -1
- package/lib/variants/LongformGallery/index.js +8 -8
- package/lib/variants/LongformGallery/index.js.map +1 -1
- package/lib/variants/LongformGallery/useLongformGallery.js.map +1 -1
- package/lib/variants/LongformRow/index.js +5 -5
- package/lib/variants/LongformRow/index.js.map +1 -1
- package/lib/variants/ParallaxImageTextRight/index.js +5 -5
- package/lib/variants/ParallaxImageTextRight/index.js.map +1 -1
- package/lib/variants/SlideSummary/SlideSummary.js.map +1 -1
- package/lib/variants/SlideSummary/index.js +7 -7
- package/lib/variants/SlideSummary/index.js.map +1 -1
- package/lib/variants/ThumbnailCarousel/ThumbnailCarousel.js +1 -0
- package/lib/variants/ThumbnailCarousel/ThumbnailCarousel.js.map +1 -1
- package/lib/variants/ThumbnailCarousel/ThumbnailImage/ThumbnailImage.js.map +1 -1
- package/lib/variants/ThumbnailCarousel/ThumbnailImage/index.js.map +1 -1
- package/lib/variants/ThumbnailCarousel/ThumbnailImage/useThumbnailImage.js.map +1 -1
- package/lib/variants/ThumbnailCarousel/index.js +7 -7
- package/lib/variants/ThumbnailCarousel/index.js.map +1 -1
- package/lib/variants/ThumbnailCarousel/useThumbnailCarousel.js +5 -5
- package/lib/variants/ThumbnailCarousel/useThumbnailCarousel.js.map +1 -1
- package/lib/variants/index.js.map +1 -1
- package/lib-es/BannerContext/helpers/index.js.map +1 -1
- package/lib-es/BannerContext/helpers/set-initial-banner-counters.js.map +1 -1
- package/lib-es/BannerContext/index.js.map +1 -1
- package/lib-es/HOC/index.js.map +1 -1
- package/lib-es/HOC/recreateOnNavigation.js.map +1 -1
- package/lib-es/HOC/withInfiniteScroll.js.map +1 -1
- package/lib-es/HOC/withTitle.js.map +1 -1
- package/lib-es/PBContext/index.js.map +1 -1
- package/lib-es/application/query/index.js.map +1 -1
- package/lib-es/components/BackToTop/BackToTop.js.map +1 -1
- package/lib-es/components/BackToTop/index.js.map +1 -1
- package/lib-es/components/Banner/AdSlotRender.js.map +1 -1
- package/lib-es/components/Banner/Banner.js.map +1 -1
- package/lib-es/components/Banner/BannerRender.js.map +1 -1
- package/lib-es/components/Banner/helpers.js.map +1 -1
- package/lib-es/components/Banner/index.js +1 -1
- package/lib-es/components/Banner/index.js.map +1 -1
- package/lib-es/components/BlazeLink.js.map +1 -1
- package/lib-es/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/lib-es/components/Breadcrumb/index.js.map +1 -1
- package/lib-es/components/Button.js.map +1 -1
- package/lib-es/components/Card/Card.js.map +1 -1
- package/lib-es/components/Card/CardsContainer.js.map +1 -1
- package/lib-es/components/Card/CardsFactory.js.map +1 -1
- package/lib-es/components/Card/CardsRender.js.map +1 -1
- package/lib-es/components/Card/constants.js.map +1 -1
- package/lib-es/components/Card/helpers/get-dynamic-grid-classes.js.map +1 -1
- package/lib-es/components/Card/helpers/get-published-listing-url.js.map +1 -1
- package/lib-es/components/Card/helpers/index.js.map +1 -1
- package/lib-es/components/Card/helpers/use-dynamic-size-key.js.map +1 -1
- package/lib-es/components/Card/index.js.map +1 -1
- package/lib-es/components/Carousel/Carousel.js.map +1 -1
- package/lib-es/components/Carousel/CarouselImage/CarouselImage.js.map +1 -1
- package/lib-es/components/Carousel/CarouselImage/constants.js.map +1 -1
- package/lib-es/components/Carousel/CarouselImage/index.js.map +1 -1
- package/lib-es/components/Carousel/CarouselRender/CarouselRender.js.map +1 -1
- package/lib-es/components/Carousel/CarouselRender/index.js.map +1 -1
- package/lib-es/components/Carousel/hooks/useCarouselNavigation.js.map +1 -1
- package/lib-es/components/Carousel/index.js.map +1 -1
- package/lib-es/components/CarouselWrapper/CarouselWrapper.js.map +1 -1
- package/lib-es/components/CarouselWrapper/DefaultCarousel.js.map +1 -1
- package/lib-es/components/CarouselWrapper/SmoothScrollCarousel.js.map +1 -1
- package/lib-es/components/CarouselWrapper/index.js.map +1 -1
- package/lib-es/components/ClickWrapper.js.map +1 -1
- package/lib-es/components/Code/Code.js.map +1 -1
- package/lib-es/components/Code/ScriptTag.js.map +1 -1
- package/lib-es/components/Code/helpers/index.js.map +1 -1
- package/lib-es/components/Code/helpers/wrap-script-tags.js.map +1 -1
- package/lib-es/components/Code/index.js.map +1 -1
- package/lib-es/components/ContentGroup/ContentGroup.js.map +1 -1
- package/lib-es/components/ContentGroup/ContentGroupTabs.js.map +1 -1
- package/lib-es/components/ContentGroup/constants.js.map +1 -1
- package/lib-es/components/ContentGroup/helpers/get-active-tab.js.map +1 -1
- package/lib-es/components/ContentGroup/helpers/get-sections-data.js.map +1 -1
- package/lib-es/components/ContentGroup/helpers/index.js.map +1 -1
- package/lib-es/components/ContentGroup/index.js.map +1 -1
- package/lib-es/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
- package/lib-es/components/ContentGroupSection/index.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryFactory.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryRender.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummary.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/index.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummary.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/index.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummary.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/LargeSummary/index.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/ListSummary/ListSummary.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/ListSummary/index.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/TextSummary/TextSummary.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/TextSummary/index.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/index.js +5 -5
- package/lib-es/components/DataSummary/DataSummaryTypes/index.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/build-props-to-display-with-content.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/get-data-summary-query.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/get-link-based-on-value.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/get-link-props.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/get-link-to-published-content.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/get-loop-props-limit.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/get-prop-value.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/get-value-from-array.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/index.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/parse-boolean-values.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/strip-summary-props-content.js.map +1 -1
- package/lib-es/components/DataSummary/index.js.map +1 -1
- package/lib-es/components/DateTime/DateTime.js +4 -4
- package/lib-es/components/DateTime/DateTime.js.map +1 -1
- package/lib-es/components/DateTime/index.js.map +1 -1
- package/lib-es/components/EmailConfirm/EmailConfirm.js +4 -4
- package/lib-es/components/EmailConfirm/EmailConfirm.js.map +1 -1
- package/lib-es/components/EmailConfirm/index.js.map +1 -1
- package/lib-es/components/EmailConfirm/mutation.js.map +1 -1
- package/lib-es/components/Iframe/Iframe.js.map +1 -1
- package/lib-es/components/Iframe/constants.js.map +1 -1
- package/lib-es/components/Iframe/index.js.map +1 -1
- package/lib-es/components/Image/GlobalLightbox/GlobalLightbox.js +3 -3
- package/lib-es/components/Image/GlobalLightbox/GlobalLightbox.js.map +1 -1
- package/lib-es/components/Image/GlobalLightbox/NavButton.js.map +1 -1
- package/lib-es/components/Image/GlobalLightbox/index.js +1 -1
- package/lib-es/components/Image/GlobalLightbox/index.js.map +1 -1
- package/lib-es/components/Image/Image.js.map +1 -1
- package/lib-es/components/Image/ImageDetails.js.map +1 -1
- package/lib-es/components/Image/ImageFactory.js.map +1 -1
- package/lib-es/components/Image/ImageRender.js.map +1 -1
- package/lib-es/components/Image/Lightbox/Lightbox.js.map +1 -1
- package/lib-es/components/Image/Lightbox/index.js.map +1 -1
- package/lib-es/components/Image/index.js.map +1 -1
- package/lib-es/components/ItemList/ItemListButton/ItemListButton.js.map +1 -1
- package/lib-es/components/ItemList/ItemListButton/index.js.map +1 -1
- package/lib-es/components/ItemList/ItemListCounter/ItemListCounter.js.map +1 -1
- package/lib-es/components/ItemList/ItemListCounter/index.js.map +1 -1
- package/lib-es/components/ItemList/ItemListNew/ItemListNew.js.map +1 -1
- package/lib-es/components/ItemList/ItemListNew/index.js.map +1 -1
- package/lib-es/components/ItemList/constants.js.map +1 -1
- package/lib-es/components/ItemList/helpers/get-item-list-data.js.map +1 -1
- package/lib-es/components/ItemList/helpers/get-item-list-id.js.map +1 -1
- package/lib-es/components/ItemList/helpers/get-item-list-ids.js.map +1 -1
- package/lib-es/components/ItemList/helpers/index.js.map +1 -1
- package/lib-es/components/ItemList/helpers/set-item-list-id.js.map +1 -1
- package/lib-es/components/ItemList/helpers/set-param-and-redirect.js.map +1 -1
- package/lib-es/components/ItemList/hooks/index.js.map +1 -1
- package/lib-es/components/ItemList/hooks/use-item-list-id.js.map +1 -1
- package/lib-es/components/Layout/Layout.js.map +1 -1
- package/lib-es/components/Layout/LayoutFactory.js +1 -1
- package/lib-es/components/Layout/LayoutFactory.js.map +1 -1
- package/lib-es/components/Layout/LayoutWithStickyTimer.js.map +1 -1
- package/lib-es/components/Layout/constants.js.map +1 -1
- package/lib-es/components/Layout/helpers/check-if-row-has-columns.js.map +1 -1
- package/lib-es/components/Layout/helpers/get-styles-to-update.js.map +1 -1
- package/lib-es/components/Layout/helpers/index.js.map +1 -1
- package/lib-es/components/Layout/index.js.map +1 -1
- package/lib-es/components/LazyImage/LazyImage.js.map +1 -1
- package/lib-es/components/LazyImage/index.js +1 -1
- package/lib-es/components/LazyImage/index.js.map +1 -1
- package/lib-es/components/List/ListBuilder.js.map +1 -1
- package/lib-es/components/List/ListFactory.js.map +1 -1
- package/lib-es/components/List/ListRender.js.map +1 -1
- package/lib-es/components/List/components/Cards/CardRenderWithInfiniteScroll.js.map +1 -1
- package/lib-es/components/List/components/Cards/CardsRender.js.map +1 -1
- package/lib-es/components/List/components/Cards/CardsRenderItem.js.map +1 -1
- package/lib-es/components/List/components/Cards/CardsRenderWrapper.js.map +1 -1
- package/lib-es/components/List/components/Cards/index.js.map +1 -1
- package/lib-es/components/List/components/Full/FullRender.js.map +1 -1
- package/lib-es/components/List/components/Full/FullRenderItem.js.map +1 -1
- package/lib-es/components/List/components/Full/FullRenderWithInfiniteScroll.js.map +1 -1
- package/lib-es/components/List/components/Full/index.js.map +1 -1
- package/lib-es/components/List/components/Header/ListHeader.js.map +1 -1
- package/lib-es/components/List/components/Header/index.js.map +1 -1
- package/lib-es/components/List/components/Pagination/Classic.js.map +1 -1
- package/lib-es/components/List/components/Pagination/ListPagination.js.map +1 -1
- package/lib-es/components/List/components/Pagination/LoadMore.js +2 -2
- package/lib-es/components/List/components/Pagination/LoadMore.js.map +1 -1
- package/lib-es/components/List/components/Pagination/index.js.map +1 -1
- package/lib-es/components/List/components/helpers/check-if-should-render-banner.js.map +1 -1
- package/lib-es/components/List/components/helpers/check-if-should-render-gtm.js.map +1 -1
- package/lib-es/components/List/components/helpers/index.js.map +1 -1
- package/lib-es/components/List/components/index.js.map +1 -1
- package/lib-es/components/List/constants.js.map +1 -1
- package/lib-es/components/List/helpers/build-az-aggregations.js.map +1 -1
- package/lib-es/components/List/helpers/build-az-url.js.map +1 -1
- package/lib-es/components/List/helpers/build-pagination-items.js.map +1 -1
- package/lib-es/components/List/helpers/build-pagination-url.js.map +1 -1
- package/lib-es/components/List/helpers/build-query-booster.js.map +1 -1
- package/lib-es/components/List/helpers/get-az-query-filter.js.map +1 -1
- package/lib-es/components/List/helpers/get-items-per-page-to-use.js.map +1 -1
- package/lib-es/components/List/helpers/get-list-component.js.map +1 -1
- package/lib-es/components/List/helpers/get-list-query.js.map +1 -1
- package/lib-es/components/List/helpers/get-list-specific-search-filter.js.map +1 -1
- package/lib-es/components/List/helpers/get-sort-props.js.map +1 -1
- package/lib-es/components/List/helpers/has-required-item-list-details.js.map +1 -1
- package/lib-es/components/List/helpers/index.js.map +1 -1
- package/lib-es/components/List/helpers/sort-aggs.js.map +1 -1
- package/lib-es/components/List/helpers/strip-query-key.js.map +1 -1
- package/lib-es/components/List/index.js.map +1 -1
- package/lib-es/components/Loading/Loading.js.map +1 -1
- package/lib-es/components/Loading/constants.js.map +1 -1
- package/lib-es/components/Loading/helpers.js.map +1 -1
- package/lib-es/components/Loading/index.js.map +1 -1
- package/lib-es/components/Menu/Menu.js +1 -4
- package/lib-es/components/Menu/Menu.js.map +1 -1
- package/lib-es/components/Menu/MenuContext.js +1 -2
- package/lib-es/components/Menu/MenuContext.js.map +1 -1
- package/lib-es/components/Menu/index.js.map +1 -1
- package/lib-es/components/MenuItem/MenuEntitiesItem.js.map +1 -1
- package/lib-es/components/MenuItem/MenuItem.js.map +1 -1
- package/lib-es/components/MenuItem/MenuItemRender.js +7 -20
- package/lib-es/components/MenuItem/MenuItemRender.js.map +1 -1
- package/lib-es/components/MenuItem/helpers/index.js +1 -3
- package/lib-es/components/MenuItem/helpers/index.js.map +1 -1
- package/lib-es/components/MenuItem/helpers/inject-helper-into-template.js.map +1 -1
- package/lib-es/components/MenuItem/index.js.map +1 -1
- package/lib-es/components/Modal/Modal.js.map +1 -1
- package/lib-es/components/Modal/index.js.map +1 -1
- package/lib-es/components/ModalAdapter/ModalAdapter.js +1 -1
- package/lib-es/components/ModalAdapter/ModalAdapter.js.map +1 -1
- package/lib-es/components/ModalAdapter/index.js +1 -1
- package/lib-es/components/ModalAdapter/index.js.map +1 -1
- package/lib-es/components/SearchContent/SearchContent.js.map +1 -1
- package/lib-es/components/SearchContent/SearchContentItems.js.map +1 -1
- package/lib-es/components/SearchContent/SearchContentResults.js.map +1 -1
- package/lib-es/components/SearchContent/SearchContentToggleIcon.js.map +1 -1
- package/lib-es/components/SearchContent/constants.js.map +1 -1
- package/lib-es/components/SearchContent/index.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/CloseMobileForm.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/FiltersList.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/MobileFormToolbar.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/ResetDesktopForm.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/index.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilterContainer.js.map +1 -1
- package/lib-es/components/SearchFilter/components/Checkbox.js.map +1 -1
- package/lib-es/components/SearchFilter/components/Range.js.map +1 -1
- package/lib-es/components/SearchFilter/components/Select.js.map +1 -1
- package/lib-es/components/SearchFilter/components/TextSearch.js.map +1 -1
- package/lib-es/components/SearchFilter/components/index.js.map +1 -1
- package/lib-es/components/SearchFilter/constants.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/build-list-name-query.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/build-new-url.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/build-url-query.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/calculate-min-max.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/calculate-step.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/check-if-range-updated.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/decode-encode.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/get-display-value.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/get-filter-value-from-query.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/get-filter-values.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/get-initial-filter-values.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/get-intersected-prop.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/get-range-value.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/get-responsive-filter-classnames.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/get-select-options.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/get-updated-filter-by.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/index.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/is-device-desktop.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/parse-filter-value.js.map +1 -1
- package/lib-es/components/SearchFilter/index.js.map +1 -1
- package/lib-es/components/SearchFilter/searchFilterReducer.js.map +1 -1
- package/lib-es/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
- package/lib-es/components/SearchFilterSort/constants.js.map +1 -1
- package/lib-es/components/SearchFilterSort/helpers/handle-sort-update.js.map +1 -1
- package/lib-es/components/SearchFilterSort/helpers/index.js.map +1 -1
- package/lib-es/components/SearchFilterSort/helpers/update-sort.js.map +1 -1
- package/lib-es/components/SearchFilterSort/index.js.map +1 -1
- package/lib-es/components/SocialFollow/SFItem.js.map +1 -1
- package/lib-es/components/SocialFollow/SocialFollow.js.map +1 -1
- package/lib-es/components/SocialFollow/SocialFollowRender.js.map +1 -1
- package/lib-es/components/SocialFollow/index.js.map +1 -1
- package/lib-es/components/SocialFollow/sf.config.js.map +1 -1
- package/lib-es/components/SubMenu/SubMenu.js.map +1 -1
- package/lib-es/components/SubMenu/index.js.map +1 -1
- package/lib-es/components/TextBlock/TextBlockRender.js.map +1 -1
- package/lib-es/components/TextBlock/index.js.map +1 -1
- package/lib-es/components/Video/Video.js.map +1 -1
- package/lib-es/components/Video/VideoContext.js.map +1 -1
- package/lib-es/components/Video/VideoModal.js.map +1 -1
- package/lib-es/components/Video/VideoRender.js.map +1 -1
- package/lib-es/components/Video/constants.js.map +1 -1
- package/lib-es/components/Video/helpers/emit-gtm-event.js.map +1 -1
- package/lib-es/components/Video/index.js.map +1 -1
- package/lib-es/components/Video/providers/Default.js.map +1 -1
- package/lib-es/components/Video/providers/JWPlayer/JWPlayerController.js.map +1 -1
- package/lib-es/components/Video/providers/JWPlayer/JWPlayerProvider.js.map +1 -1
- package/lib-es/components/Video/providers/Vimeo/VimeoProvider.js.map +1 -1
- package/lib-es/components/Video/providers/Vimeo/helpers/add-extra-params-to-url.js.map +1 -1
- package/lib-es/components/Video/providers/Vimeo/helpers/index.js.map +1 -1
- package/lib-es/components/Video/providers/YouTube/YouTubeProvider.js.map +1 -1
- package/lib-es/components/Video/providers/YouTube/YoutubeEmbeded.js.map +1 -1
- package/lib-es/components/Video/providers/YouTube/helpers/index.js.map +1 -1
- package/lib-es/components/Video/providers/get-provider.js +5 -5
- package/lib-es/components/Video/providers/get-provider.js.map +1 -1
- package/lib-es/components/Video/providers/index.js.map +1 -1
- package/lib-es/components/Wrapper.js +2 -2
- package/lib-es/components/Wrapper.js.map +1 -1
- package/lib-es/components/index.js +30 -30
- package/lib-es/components/index.js.map +1 -1
- package/lib-es/constants/componentsDefaultValues.js.map +1 -1
- package/lib-es/constants/index.js.map +1 -1
- package/lib-es/helpers/append-images.js.map +1 -1
- package/lib-es/helpers/build-az-filter.js.map +1 -1
- package/lib-es/helpers/build-checkbox-filters.js.map +1 -1
- package/lib-es/helpers/build-filters-query.js.map +1 -1
- package/lib-es/helpers/build-image-properties.js.map +1 -1
- package/lib-es/helpers/build-inherited-filters.js.map +1 -1
- package/lib-es/helpers/build-link-extra-props.js.map +1 -1
- package/lib-es/helpers/build-props-query.js.map +1 -1
- package/lib-es/helpers/build-query-fields.js.map +1 -1
- package/lib-es/helpers/build-query-key.js.map +1 -1
- package/lib-es/helpers/build-raw-query-base.js.map +1 -1
- package/lib-es/helpers/build-raw-query-stringified.js.map +1 -1
- package/lib-es/helpers/build-raw-query.js.map +1 -1
- package/lib-es/helpers/build-search-values-checkbox-select.js +1 -1
- package/lib-es/helpers/build-search-values-checkbox-select.js.map +1 -1
- package/lib-es/helpers/build-search-values-text.js.map +1 -1
- package/lib-es/helpers/build-set-filters.js.map +1 -1
- package/lib-es/helpers/build-sort-values.js.map +1 -1
- package/lib-es/helpers/check-for-error.js.map +1 -1
- package/lib-es/helpers/check-props-to-use.js.map +1 -1
- package/lib-es/helpers/entities/constants.js.map +1 -1
- package/lib-es/helpers/filter-query-setup.js.map +1 -1
- package/lib-es/helpers/filters-setup.js.map +1 -1
- package/lib-es/helpers/get-banner-data.js.map +1 -1
- package/lib-es/helpers/get-checkbox-filters.js.map +1 -1
- package/lib-es/helpers/get-click-wrapper-options.js.map +1 -1
- package/lib-es/helpers/get-current-offset.js +1 -1
- package/lib-es/helpers/get-current-offset.js.map +1 -1
- package/lib-es/helpers/get-dictionary-match.js.map +1 -1
- package/lib-es/helpers/get-display-count-data.js.map +1 -1
- package/lib-es/helpers/get-elasticsearch-operator.js.map +1 -1
- package/lib-es/helpers/get-entities-with-banner.js.map +1 -1
- package/lib-es/helpers/get-entity-data.js.map +1 -1
- package/lib-es/helpers/get-entity-render-props.js.map +1 -1
- package/lib-es/helpers/get-extra-az-bits.js.map +1 -1
- package/lib-es/helpers/get-filter-props.js.map +1 -1
- package/lib-es/helpers/get-filter-relation-keys.js.map +1 -1
- package/lib-es/helpers/get-generic-props.js.map +1 -1
- package/lib-es/helpers/get-generic-render-variables.js.map +1 -1
- package/lib-es/helpers/get-image-ids.js.map +1 -1
- package/lib-es/helpers/get-inherited-filters.js.map +1 -1
- package/lib-es/helpers/get-items-to-display-ids.js.map +1 -1
- package/lib-es/helpers/get-modifiers.js.map +1 -1
- package/lib-es/helpers/get-not-equal-query.js.map +1 -1
- package/lib-es/helpers/get-pagination-index.js.map +1 -1
- package/lib-es/helpers/get-parsed-prop-values.js.map +1 -1
- package/lib-es/helpers/get-parsed-summary-value.js.map +1 -1
- package/lib-es/helpers/get-prop-values.js.map +1 -1
- package/lib-es/helpers/get-query-filters.js.map +1 -1
- package/lib-es/helpers/get-query-props.js.map +1 -1
- package/lib-es/helpers/get-required-schemas.js.map +1 -1
- package/lib-es/helpers/get-sanitized-prop-values.js.map +1 -1
- package/lib-es/helpers/get-search-filter-type.js.map +1 -1
- package/lib-es/helpers/get-sort-by-field-name.js.map +1 -1
- package/lib-es/helpers/get-unpublished-entity-name.js.map +1 -1
- package/lib-es/helpers/get-updated-filter-by.js.map +1 -1
- package/lib-es/helpers/get-updated-items-to-display.js.map +1 -1
- package/lib-es/helpers/get-updated-sort-properties.js.map +1 -1
- package/lib-es/helpers/get-wrapped-value-with-link.js.map +1 -1
- package/lib-es/helpers/group-entities.js.map +1 -1
- package/lib-es/helpers/has-children.js.map +1 -1
- package/lib-es/helpers/index.js.map +1 -1
- package/lib-es/helpers/inject-banner.js.map +1 -1
- package/lib-es/helpers/inject-banners-to-entities.js.map +1 -1
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-entities/get-banners-for-entities.js.map +1 -1
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-entities/index.js.map +1 -1
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-nodes/get-banners-for-nodes.js.map +1 -1
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-nodes/helpers/group-node-entities.js.map +1 -1
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-nodes/helpers/index.js.map +1 -1
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-nodes/index.js.map +1 -1
- package/lib-es/helpers/inject-multiple-banners/index.js.map +1 -1
- package/lib-es/helpers/inject-multiple-banners/inject-multiple-banners.js.map +1 -1
- package/lib-es/helpers/is-browser.js.map +1 -1
- package/lib-es/helpers/is-filter-entitys-id.js.map +1 -1
- package/lib-es/helpers/is-object.js.map +1 -1
- package/lib-es/helpers/is-using-relation-image.js.map +1 -1
- package/lib-es/helpers/parse-TextBlock.js.map +1 -1
- package/lib-es/helpers/parse-interval.js.map +1 -1
- package/lib-es/helpers/parse-props-to-display.js.map +1 -1
- package/lib-es/helpers/process-data-summary-value.js +1 -1
- package/lib-es/helpers/process-data-summary-value.js.map +1 -1
- package/lib-es/helpers/remove-extra-items.js.map +1 -1
- package/lib-es/helpers/remove-unwanted-characters.js.map +1 -1
- package/lib-es/helpers/render-children.js.map +1 -1
- package/lib-es/helpers/should-render-waypoint.js.map +1 -1
- package/lib-es/helpers/should-return.js.map +1 -1
- package/lib-es/helpers/should-show-property.js.map +1 -1
- package/lib-es/helpers/should-skip-single-query.js.map +1 -1
- package/lib-es/helpers/sort-response-data.js.map +1 -1
- package/lib-es/helpers/split-children.js.map +1 -1
- package/lib-es/helpers/update-childrens-parent.js.map +1 -1
- package/lib-es/hooks/helpers/RenderComponent.js.map +1 -1
- package/lib-es/hooks/helpers/StoreImages.js.map +1 -1
- package/lib-es/hooks/helpers/append-gtm-classname.js.map +1 -1
- package/lib-es/hooks/helpers/buildPBComponents.js.map +1 -1
- package/lib-es/hooks/helpers/check-banner-insertion-set.js.map +1 -1
- package/lib-es/hooks/helpers/check-collisions.js.map +1 -1
- package/lib-es/hooks/helpers/constants.js.map +1 -1
- package/lib-es/hooks/helpers/get-banner-index.js.map +1 -1
- package/lib-es/hooks/helpers/get-components-to-insert-by-type.js.map +1 -1
- package/lib-es/hooks/helpers/get-lightbox-images.js.map +1 -1
- package/lib-es/hooks/helpers/getComponent.js.map +1 -1
- package/lib-es/hooks/helpers/getVariant.js.map +1 -1
- package/lib-es/hooks/helpers/index.js.map +1 -1
- package/lib-es/hooks/helpers/inject-element-components.js.map +1 -1
- package/lib-es/hooks/helpers/inject-textblock-banners.js +1 -1
- package/lib-es/hooks/helpers/inject-textblock-banners.js.map +1 -1
- package/lib-es/hooks/helpers/insert-banners.js.map +1 -1
- package/lib-es/hooks/helpers/update-targetings.js.map +1 -1
- package/lib-es/hooks/index.js.map +1 -1
- package/lib-es/hooks/use-app-sync-event-hook.js.map +1 -1
- package/lib-es/hooks/use-banner-insertion.js.map +1 -1
- package/lib-es/hooks/use-check-mobile-screen.js.map +1 -1
- package/lib-es/hooks/use-filter-aggregation-values.js.map +1 -1
- package/lib-es/hooks/use-get-entity-schema.js.map +1 -1
- package/lib-es/hooks/use-get-entity-schemas-as-obj.js.map +1 -1
- package/lib-es/hooks/use-get-image-id-from-relation.js.map +1 -1
- package/lib-es/hooks/use-get-images.js.map +1 -1
- package/lib-es/hooks/use-get-single-entity-schema.js.map +1 -1
- package/lib-es/hooks/use-page-builder.js +1 -1
- package/lib-es/hooks/use-page-builder.js.map +1 -1
- package/lib-es/hooks/use-portal.js.map +1 -1
- package/lib-es/index.js.map +1 -1
- package/lib-es/utils/component-map.js.map +1 -1
- package/lib-es/utils/get-class-modifiers.js.map +1 -1
- package/lib-es/utils/get-image-data.js.map +1 -1
- package/lib-es/utils/get-props-to-display-modifiers.js.map +1 -1
- package/lib-es/utils/index.js.map +1 -1
- package/lib-es/utils/is-object-empty.js.map +1 -1
- package/lib-es/utils/variant-handler.js.map +1 -1
- package/lib-es/variants/FloatingSideButton/index.js.map +1 -1
- package/lib-es/variants/HeroImage/index.js.map +1 -1
- package/lib-es/variants/Infographic/Infographic.js.map +1 -1
- package/lib-es/variants/Infographic/index.js +1 -1
- package/lib-es/variants/Infographic/index.js.map +1 -1
- package/lib-es/variants/Infographic/useInfographic.js.map +1 -1
- package/lib-es/variants/LongformGallery/LongformGallery.js.map +1 -1
- package/lib-es/variants/LongformGallery/LongformGalleryImage.js.map +1 -1
- package/lib-es/variants/LongformGallery/constants.js.map +1 -1
- package/lib-es/variants/LongformGallery/helpers/index.js.map +1 -1
- package/lib-es/variants/LongformGallery/helpers/parseImageData.js.map +1 -1
- package/lib-es/variants/LongformGallery/helpers/separateImages.js.map +1 -1
- package/lib-es/variants/LongformGallery/helpers/shouldSkip.js.map +1 -1
- package/lib-es/variants/LongformGallery/index.js +1 -1
- package/lib-es/variants/LongformGallery/index.js.map +1 -1
- package/lib-es/variants/LongformGallery/useLongformGallery.js.map +1 -1
- package/lib-es/variants/LongformRow/index.js.map +1 -1
- package/lib-es/variants/ParallaxImageTextRight/index.js.map +1 -1
- package/lib-es/variants/SlideSummary/SlideSummary.js.map +1 -1
- package/lib-es/variants/SlideSummary/index.js +1 -1
- package/lib-es/variants/SlideSummary/index.js.map +1 -1
- package/lib-es/variants/ThumbnailCarousel/ThumbnailCarousel.js.map +1 -1
- package/lib-es/variants/ThumbnailCarousel/ThumbnailImage/ThumbnailImage.js.map +1 -1
- package/lib-es/variants/ThumbnailCarousel/ThumbnailImage/index.js.map +1 -1
- package/lib-es/variants/ThumbnailCarousel/ThumbnailImage/useThumbnailImage.js.map +1 -1
- package/lib-es/variants/ThumbnailCarousel/index.js +1 -1
- package/lib-es/variants/ThumbnailCarousel/index.js.map +1 -1
- package/lib-es/variants/ThumbnailCarousel/useThumbnailCarousel.js.map +1 -1
- package/lib-es/variants/index.js.map +1 -1
- package/package.json +20 -19
- package/src/HOC/recreateOnNavigation.js +3 -3
- package/src/HOC/withTitle.js +3 -3
- package/src/components/BackToTop/BackToTop.js +5 -8
- package/src/components/Banner/BannerRender.js +0 -2
- package/src/components/Breadcrumb/Breadcrumb.js +5 -1
- package/src/components/Button.js +3 -6
- package/src/components/Card/CardsFactory.js +8 -7
- package/src/components/Card/CardsRender.js +5 -3
- package/src/components/CarouselWrapper/DefaultCarousel.js +20 -26
- package/src/components/ContentGroup/ContentGroupTabs.js +4 -7
- package/src/components/DataSummary/DataSummaryTypes/index.js +14 -10
- package/src/components/DateTime/DateTime.js +4 -4
- package/src/components/EmailConfirm/EmailConfirm.js +9 -11
- package/src/components/Image/GlobalLightbox/GlobalLightbox.js +7 -9
- package/src/components/Image/GlobalLightbox/index.js +2 -2
- package/src/components/Image/Image.js +6 -4
- package/src/components/Image/ImageFactory.js +5 -5
- package/src/components/ItemList/hooks/use-item-list-id.js +10 -13
- package/src/components/Layout/LayoutFactory.js +2 -2
- package/src/components/Layout/LayoutWithStickyTimer.js +11 -14
- package/src/components/List/ListFactory.js +10 -11
- package/src/components/List/ListRender.js +6 -1
- package/src/components/List/components/Pagination/ListPagination.js +3 -6
- package/src/components/List/components/Pagination/LoadMore.js +7 -9
- package/src/components/List/helpers/sort-aggs.js +1 -2
- package/src/components/Menu/Menu.js +13 -19
- package/src/components/Menu/MenuContext.js +1 -1
- package/src/components/MenuItem/MenuItemRender.js +10 -30
- package/src/components/MenuItem/helpers/index.js +1 -3
- package/src/components/ModalAdapter/index.js +2 -2
- package/src/components/SearchContent/SearchContent.js +26 -32
- package/src/components/SearchFilter/SearchFilter/SearchFilter.js +15 -19
- package/src/components/Video/providers/Vimeo/VimeoProvider.js +19 -22
- package/src/components/Video/providers/YouTube/YoutubeEmbeded.js +58 -64
- package/src/components/Video/providers/get-provider.js +4 -4
- package/src/components/Wrapper.js +5 -7
- package/src/components/index.js +20 -20
- package/src/constants/index.js +2 -1
- package/src/helpers/build-search-values-checkbox-select.js +1 -1
- package/src/helpers/get-current-offset.js +1 -1
- package/src/helpers/get-wrapped-value-with-link.js +1 -1
- package/src/helpers/remove-unwanted-characters.js +1 -4
- package/src/hooks/helpers/buildPBComponents.js +2 -4
- package/src/hooks/helpers/get-components-to-insert-by-type.js +3 -1
- package/src/hooks/helpers/inject-textblock-banners.js +2 -8
- package/src/hooks/use-check-mobile-screen.js +5 -8
- package/src/hooks/use-get-entity-schema.js +5 -1
- package/src/hooks/use-get-image-id-from-relation.js +5 -1
- package/src/hooks/use-page-builder.js +9 -12
- package/src/variants/Infographic/index.js +2 -2
- package/src/variants/LongformGallery/LongformGallery.js +2 -8
- package/src/variants/LongformGallery/index.js +2 -2
- package/src/variants/SlideSummary/index.js +2 -2
- package/src/variants/ThumbnailCarousel/ThumbnailImage/ThumbnailImage.js +2 -3
- package/src/variants/ThumbnailCarousel/index.js +2 -2
- package/tests/unit/src/HOC/withTitle.test.js +11 -21
- package/tests/unit/src/Layout/Layout.test.js +2 -1
- package/tests/unit/src/Layout/helpers/check-if-row-has-columns.test.js +1 -0
- package/tests/unit/src/components/Banner/AdSlotRender.test.js +4 -1
- package/tests/unit/src/components/Banner/helpers.test.js +34 -7
- package/tests/unit/src/components/BlazeLink.test.js +1 -4
- package/tests/unit/src/components/Breadcrumb/__snapshots__/Breadcrumb.test.js.snap +18 -0
- package/tests/unit/src/components/Card/Card.test.js +17 -4
- package/tests/unit/src/components/Card/CardContainer.test.js +7 -1
- package/tests/unit/src/components/Card/__snapshots__/Card.test.js.snap +15 -0
- package/tests/unit/src/components/Card/__snapshots__/CardContainer.test.js.snap +12 -0
- package/tests/unit/src/components/Card/mockData.js +2 -4
- package/tests/unit/src/components/Carousel/CarouselRender/CarouselRender.test.js +47 -46
- package/tests/unit/src/components/Carousel/CarouselRender/__snapshots__/CarouselRender.test.js.snap +45 -1
- package/tests/unit/src/components/Carousel/CarouselRender/mocks.js +0 -0
- package/tests/unit/src/components/Carousel/__snapshots__/Carousel.test.js.snap +1 -1
- package/tests/unit/src/components/ContentGroup/ContentGroupTabs.test.js +4 -1
- package/tests/unit/src/components/ContentGroup/helpers/get-sections-data.test.js +4 -1
- package/tests/unit/src/components/DataSummary/__snapshots__/DataSummaryRender.test.js.snap +0 -1
- package/tests/unit/src/components/DataSummary/helpers/build-props-to-display-with-content.test.js +5 -1
- package/tests/unit/src/components/DataSummary/helpers/get-value-from-array.test.js +4 -1
- package/tests/unit/src/components/DataSummary/helpers/strip-summary-props-content.test.js +8 -2
- package/tests/unit/src/components/DataSummary/mockData.js +4 -1
- package/tests/unit/src/components/Image/ImageFactory.test.js +4 -3
- package/tests/unit/src/components/ItemList/ItemListCounter.test.js +2 -1
- package/tests/unit/src/components/ItemList/hooks/use-item-list-id.test.js +1 -1
- package/tests/unit/src/components/Layout/LayoutFactory.test.js +0 -4
- package/tests/unit/src/components/List/components/Cards/CardsRender.test.js +8 -1
- package/tests/unit/src/components/List/components/Pagination/Classic.test.js +1 -1
- package/tests/unit/src/components/PlaceholderIcon/index.test.js +2 -2
- package/tests/unit/src/components/SearchFilter/components/Range.test.js +5 -5
- package/tests/unit/src/components/SearchFilter/components/__snapshots__/Range.test.js.snap +175 -190
- package/tests/unit/src/components/SearchFilter/helpers/get-select-options.test.js +8 -2
- package/tests/unit/src/components/TextBlock/TextBlock.test.js +1 -1
- package/tests/unit/src/components/TextBlock/__snapshots__/TextBlock.test.js.snap +12 -0
- package/tests/unit/src/helpers/__snapshots__/parse-textBlock.test.js.snap +3 -0
- package/tests/unit/src/helpers/build-checkbox-filters.test.js +4 -1
- package/tests/unit/src/helpers/get-dictionary-match.test.js +1 -1
- package/tests/unit/src/helpers/parse-textBlock.test.js +3 -1
- package/tests/unit/src/hooks/use-check-mobile-screen.test.js +3 -2
- package/tests/unit/src/hooks/use-get-image-id-from-relation.test.js +3 -3
- package/tests/unit/src/hooks/use-get-images.test.js +16 -14
- package/tests/unit/src/hooks/use-get-single-entity-schema.test.js +6 -4
- package/lib/components/MenuItem/helpers/has-active-child.js +0 -19
- package/lib/components/MenuItem/helpers/has-active-child.js.map +0 -1
- package/lib/components/MenuItem/helpers/isUrlPathMatch.js +0 -18
- package/lib/components/MenuItem/helpers/isUrlPathMatch.js.map +0 -1
- package/lib-es/components/MenuItem/helpers/has-active-child.js +0 -5
- package/lib-es/components/MenuItem/helpers/has-active-child.js.map +0 -1
- package/lib-es/components/MenuItem/helpers/isUrlPathMatch.js +0 -8
- package/lib-es/components/MenuItem/helpers/isUrlPathMatch.js.map +0 -1
- package/src/components/MenuItem/helpers/has-active-child.js +0 -10
- package/src/components/MenuItem/helpers/isUrlPathMatch.js +0 -10
- package/tests/unit/src/components/MenuItem/helpers/constants.js +0 -73
- package/tests/unit/src/components/MenuItem/helpers/has-active-child.test.js +0 -35
- package/tests/unit/src/components/MenuItem/helpers/is-url-path-match.test.js +0 -46
- package/tests/unit/src/hooks/use-page-builder.test.js +0 -48
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetDesktopForm.js","names":["React","PropTypes","FaRedoAlt","RESET","ResetDesktopForm","handleReset","createElement","className","type","title","onClick","role","propTypes","func","isRequired"],"sources":["../../../../src/components/SearchFilter/SearchFilter/ResetDesktopForm.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FaRedoAlt } from 'react-icons/fa';\nimport { RESET } from '../constants';\n\nconst ResetDesktopForm = ({ handleReset }) => (\n <div className=\"filter__reset\">\n <button\n type=\"button\"\n className=\"icon-button icon-button--reset\"\n title=\"reset--button\"\n data-testid=\"reset-icon\"\n onClick={handleReset}\n aria-label=\"Reset search filters\">\n <i>\n <FaRedoAlt />\n </i>\n </button>\n\n <div role=\"button\" onClick={handleReset} data-testid=\"reset-button\">\n {RESET}\n </div>\n </div>\n);\n\nResetDesktopForm.propTypes = {\n handleReset: PropTypes.func.isRequired\n};\n\nexport default ResetDesktopForm;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,SAAS,QAAQ,gBAAgB;AAC1C,SAASC,KAAK,QAAQ,cAAc;AAEpC,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC;AAAY,CAAC,kBACvCL,KAAA,CAAAM,aAAA;EAAKC,SAAS,EAAC;AAAe,gBAC5BP,KAAA,CAAAM,aAAA;EACEE,IAAI,EAAC,QAAQ;EACbD,SAAS,EAAC,gCAAgC;EAC1CE,KAAK,EAAC,eAAe;EACrB,eAAY,YAAY;EACxBC,OAAO,EAAEL,WAAY;EACrB,cAAW;AAAsB,gBACjCL,KAAA,CAAAM,aAAA,yBACEN,KAAA,CAAAM,aAAA,CAACJ,SAAS,MAAE,CACX,CACG,CAAC,eAETF,KAAA,CAAAM,aAAA;EAAKK,IAAI,EAAC,QAAQ;EAACD,OAAO,EAAEL,WAAY;EAAC,eAAY;AAAc,GAChEF,KACE,CACF,CACN;AAEDC,gBAAgB,CAACQ,SAAS,GAAG;EAC3BP,WAAW,EAAEJ,SAAS,CAACY,IAAI,CAACC;AAC9B,CAAC;AAED,eAAeV,gBAAgB"}
|
|
1
|
+
{"version":3,"file":"ResetDesktopForm.js","names":["React","PropTypes","FaRedoAlt","RESET","ResetDesktopForm","handleReset","createElement","className","type","title","onClick","role","propTypes","func","isRequired"],"sources":["../../../../src/components/SearchFilter/SearchFilter/ResetDesktopForm.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FaRedoAlt } from 'react-icons/fa';\nimport { RESET } from '../constants';\n\nconst ResetDesktopForm = ({ handleReset }) => (\n <div className=\"filter__reset\">\n <button\n type=\"button\"\n className=\"icon-button icon-button--reset\"\n title=\"reset--button\"\n data-testid=\"reset-icon\"\n onClick={handleReset}\n aria-label=\"Reset search filters\">\n <i>\n <FaRedoAlt />\n </i>\n </button>\n\n <div role=\"button\" onClick={handleReset} data-testid=\"reset-button\">\n {RESET}\n </div>\n </div>\n);\n\nResetDesktopForm.propTypes = {\n handleReset: PropTypes.func.isRequired\n};\n\nexport default ResetDesktopForm;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,SAAS,QAAQ,gBAAgB;AAC1C,SAASC,KAAK,QAAQ,cAAc;AAEpC,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC;AAAY,CAAC,kBACvCL,KAAA,CAAAM,aAAA;EAAKC,SAAS,EAAC;AAAe,gBAC5BP,KAAA,CAAAM,aAAA;EACEE,IAAI,EAAC,QAAQ;EACbD,SAAS,EAAC,gCAAgC;EAC1CE,KAAK,EAAC,eAAe;EACrB,eAAY,YAAY;EACxBC,OAAO,EAAEL,WAAY;EACrB,cAAW;AAAsB,gBACjCL,KAAA,CAAAM,aAAA,yBACEN,KAAA,CAAAM,aAAA,CAACJ,SAAS,MAAE,CACX,CACG,CAAC,eAETF,KAAA,CAAAM,aAAA;EAAKK,IAAI,EAAC,QAAQ;EAACD,OAAO,EAAEL,WAAY;EAAC,eAAY;AAAc,GAChEF,KACE,CACF,CACN;AAEDC,gBAAgB,CAACQ,SAAS,GAAG;EAC3BP,WAAW,EAAEJ,SAAS,CAACY,IAAI,CAACC;AAC9B,CAAC;AAED,eAAeV,gBAAgB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchFilter.js","names":["React","useState","useEffect","PropTypes","classnames","debounce","FiltersList","CloseMobileForm","ResetDesktopForm","MobileFormToolbar","useFilterAggregationValues","isDeviceDesktop","getResponsiveFilterClassnames","buildUrlQuery","SEARCH","REFINE","MORE_FILTERS_CLASSES","SearchFilter","searchFilterRef","listComponentName","data","filterData","filters","hasUrl","entity","handleSearch","name","isCollapsedOnResponsive","displaySearchFilter","setDisplaySearchFilter","groupAfterDesktop","groupAfterMobile","filterValues","setAppliedFilters","mobileRefineButtonText","query","moreFiltersMobileCollapsed","setMoreFiltersMobileCollapsed","moreFiltersDesktopCollapsed","setMoreFiltersDesktopCollapsed","setStateValues","setSelectProp","doSubmit","newValues","newQuery","handleSubmit","shouldSearch","type","formClass","moreFiltersMobileWrapperClass","moreFiltersMobileTogglerClass","moreFiltersDesktopWrapperClass","moreFiltersDesktopTogglerClass","formId","handleReset","updateFilterValues","shouldSubmit","lastChangedFilter","Object","keys","shouldGroup","createElement","Fragment","ref","className","id","onSubmit","e","preventDefault","handleClose","slice","onClick","MOBILE_CONTENT","DESKTOP_CONTENT","DESKTOP_BUTTONS","MOBILE_BUTTONS","role","propTypes","object","isRequired","array","bool","string","func","number","defaultProps"],"sources":["../../../../src/components/SearchFilter/SearchFilter/SearchFilter.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport debounce from 'lodash.debounce';\nimport FiltersList from './FiltersList';\nimport CloseMobileForm from './CloseMobileForm';\nimport ResetDesktopForm from './ResetDesktopForm';\nimport MobileFormToolbar from './MobileFormToolbar';\nimport { useFilterAggregationValues } from '../../../hooks';\nimport { isDeviceDesktop, getResponsiveFilterClassnames, buildUrlQuery } from '../helpers';\nimport { SEARCH, REFINE, MORE_FILTERS_CLASSES } from '../constants';\n\nconst SearchFilter = ({\n searchFilterRef,\n listComponentName,\n data: filterData,\n filters,\n hasUrl,\n entity,\n handleSearch,\n name,\n isCollapsedOnResponsive,\n displaySearchFilter,\n setDisplaySearchFilter,\n groupAfterDesktop,\n groupAfterMobile,\n filterValues,\n setAppliedFilters,\n mobileRefineButtonText,\n query\n}) => {\n const [moreFiltersMobileCollapsed, setMoreFiltersMobileCollapsed] = useState(true);\n const [moreFiltersDesktopCollapsed, setMoreFiltersDesktopCollapsed] = useState(true);\n\n const [data, setStateValues, setSelectProp] = useFilterAggregationValues({\n data: filterData,\n filterValues\n });\n\n const doSubmit = newValues => {\n const newQuery = filterValues\n ? buildUrlQuery(newValues, filters, listComponentName, query)\n : '';\n handleSearch(newQuery);\n setMoreFiltersDesktopCollapsed(true);\n setMoreFiltersMobileCollapsed(true);\n };\n\n const handleSubmit = debounce(newValues => {\n doSubmit(newValues);\n }, 200);\n\n useEffect(\n () => {\n if (filterValues.shouldSearch) {\n handleSubmit(filterValues);\n setAppliedFilters({ type: 'resetSearch' });\n }\n },\n [filterValues, handleSubmit, setAppliedFilters]\n );\n\n const formClass = classnames('filter__form filter__form--initial', {\n 'filter__form--mobile': isCollapsedOnResponsive && displaySearchFilter,\n 'filter__form--collapsible': isCollapsedOnResponsive\n });\n\n const {\n moreFiltersMobileWrapperClass,\n moreFiltersMobileTogglerClass,\n moreFiltersDesktopWrapperClass,\n moreFiltersDesktopTogglerClass\n } = getResponsiveFilterClassnames(moreFiltersDesktopCollapsed, moreFiltersMobileCollapsed);\n\n const formId = `filter-${name}-form`;\n\n const handleReset = () => {\n setAppliedFilters({ type: 'reset' });\n doSubmit();\n };\n\n const updateFilterValues = (newValues, shouldSubmit) => {\n const [lastChangedFilter] = Object.keys(newValues);\n setSelectProp(lastChangedFilter);\n setAppliedFilters({ newValues, shouldSearch: shouldSubmit, type: 'update' });\n };\n\n const shouldGroup = !!(groupAfterDesktop || groupAfterMobile);\n\n return (\n <>\n <form\n ref={searchFilterRef}\n className={formClass}\n data-testid={formId}\n id={formId}\n onSubmit={e => {\n e.preventDefault();\n doSubmit(filterValues);\n setStateValues(filterData);\n }}>\n {displaySearchFilter && (\n <CloseMobileForm handleClose={() => setDisplaySearchFilter(false)} />\n )}\n\n <div className=\"filter filter--search-refine\">\n <ResetDesktopForm handleReset={handleReset} />\n\n <div className=\"filter__wrapper filter__wrapper--search-refine\">\n {!shouldGroup && (\n <FiltersList\n shouldSearch={!hasUrl}\n data={data}\n filters={filters}\n hasUrl={hasUrl}\n entity={entity}\n filterValues={filterValues}\n updateFilterValues={updateFilterValues}\n />\n )}\n\n {shouldGroup && (\n <>\n <FiltersList\n shouldSearch={!hasUrl}\n data={data}\n filters={filters.slice(0, groupAfterMobile)}\n hasUrl={hasUrl}\n entity={entity}\n filterValues={filterValues}\n updateFilterValues={updateFilterValues}\n />\n\n {!!groupAfterMobile && (\n <button\n data-testId=\"search-filter-mobile-toggler\"\n className={moreFiltersMobileTogglerClass}\n type=\"button\"\n onClick={() => setMoreFiltersMobileCollapsed(!moreFiltersMobileCollapsed)}>\n Filters\n </button>\n )}\n\n <div className={moreFiltersMobileWrapperClass}>\n <div className={MORE_FILTERS_CLASSES.MOBILE_CONTENT}>\n <FiltersList\n shouldSearch={!hasUrl && isDeviceDesktop()}\n data={data}\n filters={filters.slice(\n groupAfterMobile,\n groupAfterDesktop ? groupAfterDesktop - 1 : 0\n )}\n hasUrl={hasUrl}\n entity={entity}\n filterValues={filterValues}\n updateFilterValues={updateFilterValues}\n />\n\n {!!groupAfterDesktop && (\n <button\n data-testId=\"search-filter-desktop-toggler\"\n className={moreFiltersDesktopTogglerClass}\n type=\"button\"\n aria-label={\n moreFiltersDesktopCollapsed\n ? 'Show more search filters'\n : 'Show less search filters'\n }\n onClick={() =>\n setMoreFiltersDesktopCollapsed(!moreFiltersDesktopCollapsed)\n }>\n {moreFiltersDesktopCollapsed ? 'More filters' : 'Less filters'}\n </button>\n )}\n\n <div className={moreFiltersDesktopWrapperClass}>\n <div className={MORE_FILTERS_CLASSES.DESKTOP_CONTENT}>\n <FiltersList\n shouldSearch={false}\n data={data}\n filters={filters.slice(groupAfterDesktop)}\n hasUrl={hasUrl}\n entity={entity}\n filterValues={filterValues}\n updateFilterValues={updateFilterValues}\n />\n </div>\n\n <div className={MORE_FILTERS_CLASSES.DESKTOP_BUTTONS}>\n <ResetDesktopForm handleReset={handleReset} />\n\n <button className=\"button button--full-width\" type=\"submit\">\n {SEARCH}\n </button>\n </div>\n </div>\n </div>\n\n <div className={MORE_FILTERS_CLASSES.MOBILE_BUTTONS}>\n <ResetDesktopForm handleReset={handleReset} />\n\n <button className=\"button button--full-width\" type=\"submit\">\n {SEARCH}\n </button>\n </div>\n </div>\n </>\n )}\n\n {!displaySearchFilter && (\n <button className=\"button button--full-width\" type=\"submit\">\n {SEARCH}\n </button>\n )}\n </div>\n </div>\n\n {displaySearchFilter && <MobileFormToolbar formId={formId} handleReset={handleReset} />}\n </form>\n\n {isCollapsedOnResponsive &&\n !displaySearchFilter && (\n <div\n className=\"filter__refine filter__refine--mobile-close\"\n data-testid=\"refine-mobile\"\n aria-label=\"Toggle Search Filter\">\n <div role=\"button\" onClick={() => setDisplaySearchFilter(true)}>\n {mobileRefineButtonText || REFINE}\n </div>\n </div>\n )}\n </>\n );\n};\n\nSearchFilter.propTypes = {\n data: PropTypes.object.isRequired,\n filters: PropTypes.array.isRequired,\n searchFilterRef: PropTypes.object.isRequired,\n hasUrl: PropTypes.bool.isRequired,\n entity: PropTypes.string.isRequired,\n handleSearch: PropTypes.func.isRequired,\n name: PropTypes.string.isRequired,\n displaySearchFilter: PropTypes.bool.isRequired,\n setDisplaySearchFilter: PropTypes.func.isRequired,\n isCollapsedOnResponsive: PropTypes.bool.isRequired,\n groupAfterDesktop: PropTypes.number.isRequired,\n groupAfterMobile: PropTypes.number.isRequired,\n filterValues: PropTypes.object.isRequired,\n setAppliedFilters: PropTypes.func.isRequired,\n listComponentName: PropTypes.string,\n query: PropTypes.object,\n mobileRefineButtonText: PropTypes.string\n};\n\nSearchFilter.defaultProps = {\n mobileRefineButtonText: '',\n listComponentName: '',\n query: {}\n};\n\nexport default SearchFilter;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAClD,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ,MAAM,iBAAiB;AACtC,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,SAASC,0BAA0B,QAAQ,gBAAgB;AAC3D,SAASC,eAAe,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D,eAAe,EAAEf,SAAS,CAAC2E,MAAM,CAACC,UAAU;EAC5CxD,MAAM,EAAEpB,SAAS,CAAC8E,IAAI,CAACF,UAAU;EACjCvD,MAAM,EAAErB,SAAS,CAAC+E,MAAM,CAACH,UAAU;EACnCtD,YAAY,EAAEtB,SAAS,CAACgF,IAAI,CAACJ,UAAU;EACvCrD,IAAI,EAAEvB,SAAS,CAAC+E,MAAM,CAACH,UAAU;EACjCnD,mBAAmB,EAAEzB,SAAS,CAAC8E,IAAI,CAACF,UAAU;EAC9ClD,sBAAsB,EAAE1B,SAAS,CAACgF,IAAI,CAACJ,UAAU;EACjDpD,uBAAuB,EAAExB,SAAS,CAAC8E,IAAI,CAACF,UAAU;EAClDjD,iBAAiB,EAAE3B,SAAS,CAACiF,MAAM,CAACL,UAAU;EAC9ChD,gBAAgB,EAAE5B,SAAS,CAACiF,MAAM,CAACL,UAAU;EAC7C/C,YAAY,EAAE7B,SAAS,CAAC2E,MAAM,CAACC,UAAU;EACzC9C,iBAAiB,EAAE9B,SAAS,CAACgF,IAAI,CAACJ,UAAU;EAC5C5D,iBAAiB,EAAEhB,SAAS,CAAC+E,MAAM;EACnC/C,KAAK,EAAEhC,SAAS,CAAC2E,MAAM;EACvB5C,sBAAsB,EAAE/B,SAAS,CAAC+E;AACpC,CAAC;AAEDjE,YAAY,CAACoE,YAAY,GAAG;EAC1BnD,sBAAsB,EAAE,EAAE;EAC1Bf,iBAAiB,EAAE,EAAE;EACrBgB,KAAK,EAAE,CAAC;AACV,CAAC;AAED,eAAelB,YAAY"}
|
|
1
|
+
{"version":3,"file":"SearchFilter.js","names":["React","useState","useEffect","PropTypes","classnames","debounce","FiltersList","CloseMobileForm","ResetDesktopForm","MobileFormToolbar","useFilterAggregationValues","isDeviceDesktop","getResponsiveFilterClassnames","buildUrlQuery","SEARCH","REFINE","MORE_FILTERS_CLASSES","SearchFilter","searchFilterRef","listComponentName","data","filterData","filters","hasUrl","entity","handleSearch","name","isCollapsedOnResponsive","displaySearchFilter","setDisplaySearchFilter","groupAfterDesktop","groupAfterMobile","filterValues","setAppliedFilters","mobileRefineButtonText","query","moreFiltersMobileCollapsed","setMoreFiltersMobileCollapsed","moreFiltersDesktopCollapsed","setMoreFiltersDesktopCollapsed","setStateValues","setSelectProp","doSubmit","newValues","newQuery","handleSubmit","shouldSearch","type","formClass","moreFiltersMobileWrapperClass","moreFiltersMobileTogglerClass","moreFiltersDesktopWrapperClass","moreFiltersDesktopTogglerClass","formId","handleReset","updateFilterValues","shouldSubmit","lastChangedFilter","Object","keys","shouldGroup","createElement","Fragment","ref","className","id","onSubmit","e","preventDefault","handleClose","slice","onClick","MOBILE_CONTENT","DESKTOP_CONTENT","DESKTOP_BUTTONS","MOBILE_BUTTONS","role","propTypes","object","isRequired","array","bool","string","func","number","defaultProps"],"sources":["../../../../src/components/SearchFilter/SearchFilter/SearchFilter.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport debounce from 'lodash.debounce';\nimport FiltersList from './FiltersList';\nimport CloseMobileForm from './CloseMobileForm';\nimport ResetDesktopForm from './ResetDesktopForm';\nimport MobileFormToolbar from './MobileFormToolbar';\nimport { useFilterAggregationValues } from '../../../hooks';\nimport { isDeviceDesktop, getResponsiveFilterClassnames, buildUrlQuery } from '../helpers';\nimport { SEARCH, REFINE, MORE_FILTERS_CLASSES } from '../constants';\n\nconst SearchFilter = ({\n searchFilterRef,\n listComponentName,\n data: filterData,\n filters,\n hasUrl,\n entity,\n handleSearch,\n name,\n isCollapsedOnResponsive,\n displaySearchFilter,\n setDisplaySearchFilter,\n groupAfterDesktop,\n groupAfterMobile,\n filterValues,\n setAppliedFilters,\n mobileRefineButtonText,\n query\n}) => {\n const [moreFiltersMobileCollapsed, setMoreFiltersMobileCollapsed] = useState(true);\n const [moreFiltersDesktopCollapsed, setMoreFiltersDesktopCollapsed] = useState(true);\n\n const [data, setStateValues, setSelectProp] = useFilterAggregationValues({\n data: filterData,\n filterValues\n });\n\n const doSubmit = newValues => {\n const newQuery = filterValues\n ? buildUrlQuery(newValues, filters, listComponentName, query)\n : '';\n handleSearch(newQuery);\n setMoreFiltersDesktopCollapsed(true);\n setMoreFiltersMobileCollapsed(true);\n };\n\n const handleSubmit = debounce(newValues => {\n doSubmit(newValues);\n }, 200);\n\n useEffect(() => {\n if (filterValues.shouldSearch) {\n handleSubmit(filterValues);\n setAppliedFilters({ type: 'resetSearch' });\n }\n }, [filterValues, handleSubmit, setAppliedFilters]);\n\n const formClass = classnames('filter__form filter__form--initial', {\n 'filter__form--mobile': isCollapsedOnResponsive && displaySearchFilter,\n 'filter__form--collapsible': isCollapsedOnResponsive\n });\n\n const {\n moreFiltersMobileWrapperClass,\n moreFiltersMobileTogglerClass,\n moreFiltersDesktopWrapperClass,\n moreFiltersDesktopTogglerClass\n } = getResponsiveFilterClassnames(moreFiltersDesktopCollapsed, moreFiltersMobileCollapsed);\n\n const formId = `filter-${name}-form`;\n\n const handleReset = () => {\n setAppliedFilters({ type: 'reset' });\n doSubmit();\n };\n\n const updateFilterValues = (newValues, shouldSubmit) => {\n const [lastChangedFilter] = Object.keys(newValues);\n setSelectProp(lastChangedFilter);\n setAppliedFilters({ newValues, shouldSearch: shouldSubmit, type: 'update' });\n };\n\n const shouldGroup = !!(groupAfterDesktop || groupAfterMobile);\n\n return (\n <>\n <form\n ref={searchFilterRef}\n className={formClass}\n data-testid={formId}\n id={formId}\n onSubmit={e => {\n e.preventDefault();\n doSubmit(filterValues);\n setStateValues(filterData);\n }}>\n {displaySearchFilter && (\n <CloseMobileForm handleClose={() => setDisplaySearchFilter(false)} />\n )}\n\n <div className=\"filter filter--search-refine\">\n <ResetDesktopForm handleReset={handleReset} />\n\n <div className=\"filter__wrapper filter__wrapper--search-refine\">\n {!shouldGroup && (\n <FiltersList\n shouldSearch={!hasUrl}\n data={data}\n filters={filters}\n hasUrl={hasUrl}\n entity={entity}\n filterValues={filterValues}\n updateFilterValues={updateFilterValues}\n />\n )}\n\n {shouldGroup && (\n <>\n <FiltersList\n shouldSearch={!hasUrl}\n data={data}\n filters={filters.slice(0, groupAfterMobile)}\n hasUrl={hasUrl}\n entity={entity}\n filterValues={filterValues}\n updateFilterValues={updateFilterValues}\n />\n\n {!!groupAfterMobile && (\n <button\n data-testId=\"search-filter-mobile-toggler\"\n className={moreFiltersMobileTogglerClass}\n type=\"button\"\n onClick={() => setMoreFiltersMobileCollapsed(!moreFiltersMobileCollapsed)}>\n Filters\n </button>\n )}\n\n <div className={moreFiltersMobileWrapperClass}>\n <div className={MORE_FILTERS_CLASSES.MOBILE_CONTENT}>\n <FiltersList\n shouldSearch={!hasUrl && isDeviceDesktop()}\n data={data}\n filters={filters.slice(\n groupAfterMobile,\n groupAfterDesktop ? groupAfterDesktop - 1 : 0\n )}\n hasUrl={hasUrl}\n entity={entity}\n filterValues={filterValues}\n updateFilterValues={updateFilterValues}\n />\n\n {!!groupAfterDesktop && (\n <button\n data-testId=\"search-filter-desktop-toggler\"\n className={moreFiltersDesktopTogglerClass}\n type=\"button\"\n aria-label={\n moreFiltersDesktopCollapsed\n ? 'Show more search filters'\n : 'Show less search filters'\n }\n onClick={() =>\n setMoreFiltersDesktopCollapsed(!moreFiltersDesktopCollapsed)\n }>\n {moreFiltersDesktopCollapsed ? 'More filters' : 'Less filters'}\n </button>\n )}\n\n <div className={moreFiltersDesktopWrapperClass}>\n <div className={MORE_FILTERS_CLASSES.DESKTOP_CONTENT}>\n <FiltersList\n shouldSearch={false}\n data={data}\n filters={filters.slice(groupAfterDesktop)}\n hasUrl={hasUrl}\n entity={entity}\n filterValues={filterValues}\n updateFilterValues={updateFilterValues}\n />\n </div>\n\n <div className={MORE_FILTERS_CLASSES.DESKTOP_BUTTONS}>\n <ResetDesktopForm handleReset={handleReset} />\n\n <button className=\"button button--full-width\" type=\"submit\">\n {SEARCH}\n </button>\n </div>\n </div>\n </div>\n\n <div className={MORE_FILTERS_CLASSES.MOBILE_BUTTONS}>\n <ResetDesktopForm handleReset={handleReset} />\n\n <button className=\"button button--full-width\" type=\"submit\">\n {SEARCH}\n </button>\n </div>\n </div>\n </>\n )}\n\n {!displaySearchFilter && (\n <button className=\"button button--full-width\" type=\"submit\">\n {SEARCH}\n </button>\n )}\n </div>\n </div>\n\n {displaySearchFilter && <MobileFormToolbar formId={formId} handleReset={handleReset} />}\n </form>\n\n {isCollapsedOnResponsive && !displaySearchFilter && (\n <div\n className=\"filter__refine filter__refine--mobile-close\"\n data-testid=\"refine-mobile\"\n aria-label=\"Toggle Search Filter\">\n <div role=\"button\" onClick={() => setDisplaySearchFilter(true)}>\n {mobileRefineButtonText || REFINE}\n </div>\n </div>\n )}\n </>\n );\n};\n\nSearchFilter.propTypes = {\n data: PropTypes.object.isRequired,\n filters: PropTypes.array.isRequired,\n searchFilterRef: PropTypes.object.isRequired,\n hasUrl: PropTypes.bool.isRequired,\n entity: PropTypes.string.isRequired,\n handleSearch: PropTypes.func.isRequired,\n name: PropTypes.string.isRequired,\n displaySearchFilter: PropTypes.bool.isRequired,\n setDisplaySearchFilter: PropTypes.func.isRequired,\n isCollapsedOnResponsive: PropTypes.bool.isRequired,\n groupAfterDesktop: PropTypes.number.isRequired,\n groupAfterMobile: PropTypes.number.isRequired,\n filterValues: PropTypes.object.isRequired,\n setAppliedFilters: PropTypes.func.isRequired,\n listComponentName: PropTypes.string,\n query: PropTypes.object,\n mobileRefineButtonText: PropTypes.string\n};\n\nSearchFilter.defaultProps = {\n mobileRefineButtonText: '',\n listComponentName: '',\n query: {}\n};\n\nexport default SearchFilter;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAClD,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ,MAAM,iBAAiB;AACtC,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,OAAOC,gBAAgB,MA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,IAAI,EAAEjB,SAAS,CAAC2E,MAAM,CAACC,UAAU;EACjCzD,OAAO,EAAEnB,SAAS,CAAC6E,KAAK,CAACD,UAAU;EACnC7D,eAAe,EAAEf,SAAS,CAAC2E,MAAM,CAACC,UAAU;EAC5CxD,MAAM,EAAEpB,SAAS,CAAC8E,IAAI,CAACF,UAAU;EACjCvD,MAAM,EAAErB,SAAS,CAAC+E,MAAM,CAACH,UAAU;EACnCtD,YAAY,EAAEtB,SAAS,CAACgF,IAAI,CAACJ,UAAU;EACvCrD,IAAI,EAAEvB,SAAS,CAAC+E,MAAM,CAACH,UAAU;EACjCnD,mBAAmB,EAAEzB,SAAS,CAAC8E,IAAI,CAACF,UAAU;EAC9ClD,sBAAsB,EAAE1B,SAAS,CAACgF,IAAI,CAACJ,UAAU;EACjDpD,uBAAuB,EAAExB,SAAS,CAAC8E,IAAI,CAACF,UAAU;EAClDjD,iBAAiB,EAAE3B,SAAS,CAACiF,MAAM,CAACL,UAAU;EAC9ChD,gBAAgB,EAAE5B,SAAS,CAACiF,MAAM,CAACL,UAAU;EAC7C/C,YAAY,EAAE7B,SAAS,CAAC2E,MAAM,CAACC,UAAU;EACzC9C,iBAAiB,EAAE9B,SAAS,CAACgF,IAAI,CAACJ,UAAU;EAC5C5D,iBAAiB,EAAEhB,SAAS,CAAC+E,MAAM;EACnC/C,KAAK,EAAEhC,SAAS,CAAC2E,MAAM;EACvB5C,sBAAsB,EAAE/B,SAAS,CAAC+E;AACpC,CAAC;AAEDjE,YAAY,CAACoE,YAAY,GAAG;EAC1BnD,sBAAsB,EAAE,EAAE;EAC1Bf,iBAAiB,EAAE,EAAE;EACrBgB,KAAK,EAAE,CAAC;AACV,CAAC;AAED,eAAelB,YAAY","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["SearchFilter"],"sources":["../../../../src/components/SearchFilter/SearchFilter/index.js"],"sourcesContent":["import SearchFilter from './SearchFilter';\n\nexport default SearchFilter;\n"],"mappings":"AAAA,OAAOA,YAAY,MAAM,gBAAgB;AAEzC,eAAeA,YAAY"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["SearchFilter"],"sources":["../../../../src/components/SearchFilter/SearchFilter/index.js"],"sourcesContent":["import SearchFilter from './SearchFilter';\n\nexport default SearchFilter;\n"],"mappings":"AAAA,OAAOA,YAAY,MAAM,gBAAgB;AAEzC,eAAeA,YAAY","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchFilterContainer.js","names":["React","useState","useEffect","useRef","useReducer","useContext","MainContext","useRouter","useQuery","PropTypes","parseUrl","SearchFilter","withTitle","getSearchPublishedContent","generateSingleItemQuery","buildNewUrl","getFilterValues","getFilterRangesAndCheckboxesValues","getUpdatedFilterBy","buildListNameQuery","getEntityData","getInheritedFilters","getQueryProps","buildRawQueryStringified","buildFiltersQuery","RAW_RESULTS","SCROLL_OFFSET","searchFilterReducer","useGetEntitySchemasAsObj","SearchFilterContainer","entity","url","filters","name","isCollapsedOnResponsive","groupAfterMobile","groupAfterDesktop","filterBy","filterByProperty","shouldAddFilters","listComponentName","parent","mobileRefineButtonText","isPreview","router","asPath","searchFilterRef","key","setKey","displaySearchFilter","setDisplaySearchFilter","urlPath","setUrlPath","filterValues","dispatch","currentUrl","query","updatedQuery","itemId","parentId","itemEntity","parentEntity","newQuery","updatedNewQuery","newValues","filterData","shouldSearch","type","data","mainSchemas","loading","schemasLoading","parentSchema","filterEntitySchema","actions","getAction","get","getPublished","inheritedFilters","queryProps","entityData","parentData","parentQueryLoading","variables","id","skip","length","updatedFilterBy","updatedFilterByProperty","action","checkboxSelectValues","rangeValues","docType","filtersQuery","queryKeys","Object","keys","rawQueryStringified","error","limit","message","searchPublishedContent","rawResults","aggregations","handleSearch","hashBit","split","parsedHashBit","scrollToFirstList","baseQuery","push","shallow","scroll","then","Date","now","newUrl","list","document","getElementsByClassName","shouldScrollToFirstList","window","scrollTo","left","top","pageYOffset","getBoundingClientRect","createElement","setAppliedFilters","hasUrl","propTypes","string","array","isRequired","bool","number","object","defaultProps"],"sources":["../../../src/components/SearchFilter/SearchFilterContainer.js"],"sourcesContent":["import React, { useState, useEffect, useRef, useReducer, useContext } from 'react';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport { useRouter } from 'next/router';\nimport { useQuery } from '@apollo/client';\nimport PropTypes from 'prop-types';\nimport { parseUrl } from 'query-string';\nimport SearchFilter from './SearchFilter';\nimport { withTitle } from '../../HOC';\nimport { getSearchPublishedContent, generateSingleItemQuery } from '../../application/query';\nimport {\n buildNewUrl,\n getFilterValues,\n getFilterRangesAndCheckboxesValues,\n getUpdatedFilterBy,\n buildListNameQuery\n} from './helpers';\nimport {\n getEntityData,\n getInheritedFilters,\n getQueryProps,\n buildRawQueryStringified,\n buildFiltersQuery\n} from '../../helpers';\nimport { RAW_RESULTS } from './constants';\nimport { SCROLL_OFFSET } from '../../constants';\nimport searchFilterReducer from './searchFilterReducer';\nimport { useGetEntitySchemasAsObj } from '../../hooks';\n\nconst SearchFilterContainer = ({\n entity,\n url,\n filters,\n name,\n isCollapsedOnResponsive,\n groupAfterMobile,\n groupAfterDesktop,\n filterBy,\n filterByProperty,\n shouldAddFilters,\n listComponentName,\n parent,\n mobileRefineButtonText\n}) => {\n const { isPreview } = useContext(MainContext);\n const router = useRouter();\n const { asPath } = router;\n const searchFilterRef = useRef(null);\n const [key, setKey] = useState(`filter-${name}`);\n const [displaySearchFilter, setDisplaySearchFilter] = useState(false);\n const [urlPath, setUrlPath] = useState(asPath); // used as asPath can take too long to update\n const [filterValues, dispatch] = useReducer(searchFilterReducer, null);\n const { url: currentUrl, query } = parseUrl(urlPath);\n const updatedQuery = buildListNameQuery(query, listComponentName);\n const { itemId: parentId, itemEntity: parentEntity } = parent;\n\n useEffect(\n () => {\n if (asPath === urlPath) return;\n\n const { query: newQuery } = parseUrl(asPath);\n const updatedNewQuery = buildListNameQuery(newQuery, listComponentName);\n const newValues = getFilterValues(filterData, filters, updatedNewQuery);\n if (newValues)\n dispatch({\n newValues,\n shouldSearch: false,\n type: 'update'\n });\n setUrlPath(asPath);\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [asPath]\n );\n\n const { data: mainSchemas = {}, loading: schemasLoading } = useGetEntitySchemasAsObj([\n parentEntity,\n entity\n ]);\n const { [parentEntity]: parentSchema = {}, [entity]: filterEntitySchema = {} } = mainSchemas;\n const { actions = {} } = parentSchema || {};\n const getAction = isPreview ? actions.get : actions.getPublished;\n const inheritedFilters = getInheritedFilters(filterBy, filterByProperty);\n const queryProps = getQueryProps(inheritedFilters, parentSchema, filterEntitySchema);\n const { data: { entityData: parentData } = {}, loading: parentQueryLoading } = useQuery(\n generateSingleItemQuery(getAction, queryProps),\n {\n variables: { id: parentId },\n skip: schemasLoading || !inheritedFilters.length\n }\n );\n const { updatedFilterBy, updatedFilterByProperty } = getUpdatedFilterBy(\n filterBy,\n filterByProperty,\n parentData\n );\n\n const action = getSearchPublishedContent(RAW_RESULTS);\n const [checkboxSelectValues, rangeValues] = getFilterRangesAndCheckboxesValues(filters);\n\n const { docType } = getEntityData(entity);\n\n const filtersQuery = buildFiltersQuery({\n shouldAddFilters,\n query: filterValues,\n filterBy: updatedFilterBy,\n filterByProperty: updatedFilterByProperty,\n rangeValues,\n queryKeys: Object.keys(updatedQuery)\n });\n\n const rawQueryStringified = buildRawQueryStringified(\n checkboxSelectValues,\n rangeValues,\n docType,\n filtersQuery\n );\n\n const { data, error, loading } = useQuery(action, {\n variables: { rawQueryStringified, limit: 0 }, // we only want aggs so limit=0 for no search results\n skip: !rawQueryStringified || parentQueryLoading\n });\n\n if (error) return error.message;\n if (!filters.length) return null;\n\n const { searchPublishedContent: { rawResults: { aggregations: filterData } = {} } = {} } =\n data || {};\n\n if (!filterValues && !loading && !parentQueryLoading && (filterData || !rawQueryStringified)) {\n const newValues = getFilterValues(filterData, filters, updatedQuery);\n dispatch({ newValues, shouldSearch: false, type: 'update' });\n return null;\n }\n\n const handleSearch = newQuery => {\n setDisplaySearchFilter(false);\n const hashBit = asPath.split('#')[1] || '';\n const parsedHashBit = hashBit ? `#${hashBit}` : '';\n scrollToFirstList();\n if (!newQuery) {\n const baseQuery = `${currentUrl}${parsedHashBit}`;\n setUrlPath(baseQuery);\n return router.push('/Resolver', baseQuery, { shallow: !url, scroll: false }).then(() => {\n setKey(`filter-${name}:${Date.now()}`); // remove after range component update\n });\n }\n const newUrl = buildNewUrl(url, currentUrl, newQuery, hashBit);\n setUrlPath(newUrl);\n return router.push('/Resolver', newUrl, { shallow: !url, scroll: false });\n };\n\n const scrollToFirstList = () => {\n const [list] = document.getElementsByClassName('list-top');\n const shouldScrollToFirstList = !url && list;\n\n if (shouldScrollToFirstList) {\n window.scrollTo({\n left: 0,\n top: window.pageYOffset - SCROLL_OFFSET + list.getBoundingClientRect().top\n });\n } else {\n window.scrollTo(0, 0);\n }\n };\n\n if (!filterValues) return null;\n\n return (\n <SearchFilter\n key={key}\n setAppliedFilters={dispatch}\n query={updatedQuery}\n listComponentName={listComponentName}\n searchFilterRef={searchFilterRef}\n data={filterData}\n filters={filters}\n hasUrl={!!url}\n entity={entity}\n handleSearch={handleSearch}\n filterValues={filterValues}\n name={name}\n isCollapsedOnResponsive={isCollapsedOnResponsive}\n displaySearchFilter={displaySearchFilter}\n setDisplaySearchFilter={setDisplaySearchFilter}\n groupAfterMobile={groupAfterMobile}\n groupAfterDesktop={groupAfterDesktop}\n mobileRefineButtonText={mobileRefineButtonText}\n />\n );\n};\n\nSearchFilterContainer.propTypes = {\n mobileRefineButtonText: PropTypes.string,\n entity: PropTypes.string,\n url: PropTypes.string,\n filters: PropTypes.array,\n name: PropTypes.string.isRequired,\n isCollapsedOnResponsive: PropTypes.bool,\n groupAfterMobile: PropTypes.number,\n groupAfterDesktop: PropTypes.number,\n filterBy: PropTypes.array,\n filterByProperty: PropTypes.array,\n shouldAddFilters: PropTypes.bool,\n listComponentName: PropTypes.string,\n parent: PropTypes.object\n};\n\nSearchFilterContainer.defaultProps = {\n url: null,\n filters: [],\n entity: '',\n isCollapsedOnResponsive: true,\n groupAfterMobile: 0,\n groupAfterDesktop: 0,\n filterBy: [],\n filterByProperty: [],\n shouldAddFilters: false,\n listComponentName: '',\n parent: {},\n mobileRefineButtonText: ''\n};\n\nexport default withTitle(SearchFilterContainer);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAEC,UAAU,EAAEC,UAAU,QAAQ,OAAO;AAClF,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,QAAQ,QAAQ,cAAc;AACvC,OAAOC,YAAY,MAAM,gBAAgB;AACzC,SAASC,SAAS,QAAQ,WAAW;AACrC,SAASC,yBAAyB,EAAEC,uBAAuB,QAAQ,yBAAyB;AAC5F,SACEC,WAAW,EACXC,eAAe,EACfC,kCAAkC,EAClCC,kBAAkB,EAClBC,kBAAkB,QACb,WAAW;AAClB,SACEC,aAAa,EACbC,mBAAmB,EACnBC,aAAa,EACbC,wBAAwB,EACxBC,iBAAiB,QACZ,eAAe;AACtB,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,SAASC,wBAAwB,QAAQ,aAAa;AAEtD,MAAMC,qBAAqB,GAAGA,CAAC;EAC7BC,MAAM;EACNC,GAAG;EACHC,OAAO;EACPC,IAAI;EACJC,uBAAuB;EACvBC,gBAAgB;EAChBC,iBAAiB;EACjBC,QAAQ;EACRC,gBAAgB;EAChBC,gBAAgB;EAChBC,iBAAiB;EACjBC,MAAM;EACNC;AACF,CAAC,KAAK;EACJ,MAAM;IAAEC;EAAU,CAAC,GAAGtC,UAAU,CAACC,WAAW,CAAC;EAC7C,MAAMsC,MAAM,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;EACzB9F,gBAAgB,EAAE7B,SAAS,CAAC2H,KAAK;EACjC7F,gBAAgB,EAAE9B,SAAS,CAAC6H,IAAI;EAChC9F,iBAAiB,EAAE/B,SAAS,CAAC0H,MAAM;EACnC1F,MAAM,EAAEhC,SAAS,CAAC+H;AACpB,CAAC;AAED3G,qBAAqB,CAAC4G,YAAY,GAAG;EACnC1G,GAAG,EAAE,IAAI;EACTC,OAAO,EAAE,EAAE;EACXF,MAAM,EAAE,EAAE;EACVI,uBAAuB,EAAE,IAAI;EAC7BC,gBAAgB,EAAE,CAAC;EACnBC,iBAAiB,EAAE,CAAC;EACpBC,QAAQ,EAAE,EAAE;EACZC,gBAAgB,EAAE,EAAE;EACpBC,gBAAgB,EAAE,KAAK;EACvBC,iBAAiB,EAAE,EAAE;EACrBC,MAAM,EAAE,CAAC,CAAC;EACVC,sBAAsB,EAAE;AAC1B,CAAC;AAED,eAAe9B,SAAS,CAACiB,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"SearchFilterContainer.js","names":["React","useState","useEffect","useRef","useReducer","useContext","MainContext","useRouter","useQuery","PropTypes","parseUrl","SearchFilter","withTitle","getSearchPublishedContent","generateSingleItemQuery","buildNewUrl","getFilterValues","getFilterRangesAndCheckboxesValues","getUpdatedFilterBy","buildListNameQuery","getEntityData","getInheritedFilters","getQueryProps","buildRawQueryStringified","buildFiltersQuery","RAW_RESULTS","SCROLL_OFFSET","searchFilterReducer","useGetEntitySchemasAsObj","SearchFilterContainer","entity","url","filters","name","isCollapsedOnResponsive","groupAfterMobile","groupAfterDesktop","filterBy","filterByProperty","shouldAddFilters","listComponentName","parent","mobileRefineButtonText","isPreview","router","asPath","searchFilterRef","key","setKey","displaySearchFilter","setDisplaySearchFilter","urlPath","setUrlPath","filterValues","dispatch","currentUrl","query","updatedQuery","itemId","parentId","itemEntity","parentEntity","newQuery","updatedNewQuery","newValues","filterData","shouldSearch","type","data","mainSchemas","loading","schemasLoading","parentSchema","filterEntitySchema","actions","getAction","get","getPublished","inheritedFilters","queryProps","entityData","parentData","parentQueryLoading","variables","id","skip","length","updatedFilterBy","updatedFilterByProperty","action","checkboxSelectValues","rangeValues","docType","filtersQuery","queryKeys","Object","keys","rawQueryStringified","error","limit","message","searchPublishedContent","rawResults","aggregations","handleSearch","hashBit","split","parsedHashBit","scrollToFirstList","baseQuery","push","shallow","scroll","then","Date","now","newUrl","list","document","getElementsByClassName","shouldScrollToFirstList","window","scrollTo","left","top","pageYOffset","getBoundingClientRect","createElement","setAppliedFilters","hasUrl","propTypes","string","array","isRequired","bool","number","object","defaultProps"],"sources":["../../../src/components/SearchFilter/SearchFilterContainer.js"],"sourcesContent":["import React, { useState, useEffect, useRef, useReducer, useContext } from 'react';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport { useRouter } from 'next/router';\nimport { useQuery } from '@apollo/client';\nimport PropTypes from 'prop-types';\nimport { parseUrl } from 'query-string';\nimport SearchFilter from './SearchFilter';\nimport { withTitle } from '../../HOC';\nimport { getSearchPublishedContent, generateSingleItemQuery } from '../../application/query';\nimport {\n buildNewUrl,\n getFilterValues,\n getFilterRangesAndCheckboxesValues,\n getUpdatedFilterBy,\n buildListNameQuery\n} from './helpers';\nimport {\n getEntityData,\n getInheritedFilters,\n getQueryProps,\n buildRawQueryStringified,\n buildFiltersQuery\n} from '../../helpers';\nimport { RAW_RESULTS } from './constants';\nimport { SCROLL_OFFSET } from '../../constants';\nimport searchFilterReducer from './searchFilterReducer';\nimport { useGetEntitySchemasAsObj } from '../../hooks';\n\nconst SearchFilterContainer = ({\n entity,\n url,\n filters,\n name,\n isCollapsedOnResponsive,\n groupAfterMobile,\n groupAfterDesktop,\n filterBy,\n filterByProperty,\n shouldAddFilters,\n listComponentName,\n parent,\n mobileRefineButtonText\n}) => {\n const { isPreview } = useContext(MainContext);\n const router = useRouter();\n const { asPath } = router;\n const searchFilterRef = useRef(null);\n const [key, setKey] = useState(`filter-${name}`);\n const [displaySearchFilter, setDisplaySearchFilter] = useState(false);\n const [urlPath, setUrlPath] = useState(asPath); // used as asPath can take too long to update\n const [filterValues, dispatch] = useReducer(searchFilterReducer, null);\n const { url: currentUrl, query } = parseUrl(urlPath);\n const updatedQuery = buildListNameQuery(query, listComponentName);\n const { itemId: parentId, itemEntity: parentEntity } = parent;\n\n useEffect(\n () => {\n if (asPath === urlPath) return;\n\n const { query: newQuery } = parseUrl(asPath);\n const updatedNewQuery = buildListNameQuery(newQuery, listComponentName);\n const newValues = getFilterValues(filterData, filters, updatedNewQuery);\n if (newValues)\n dispatch({\n newValues,\n shouldSearch: false,\n type: 'update'\n });\n setUrlPath(asPath);\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [asPath]\n );\n\n const { data: mainSchemas = {}, loading: schemasLoading } = useGetEntitySchemasAsObj([\n parentEntity,\n entity\n ]);\n const { [parentEntity]: parentSchema = {}, [entity]: filterEntitySchema = {} } = mainSchemas;\n const { actions = {} } = parentSchema || {};\n const getAction = isPreview ? actions.get : actions.getPublished;\n const inheritedFilters = getInheritedFilters(filterBy, filterByProperty);\n const queryProps = getQueryProps(inheritedFilters, parentSchema, filterEntitySchema);\n const { data: { entityData: parentData } = {}, loading: parentQueryLoading } = useQuery(\n generateSingleItemQuery(getAction, queryProps),\n {\n variables: { id: parentId },\n skip: schemasLoading || !inheritedFilters.length\n }\n );\n const { updatedFilterBy, updatedFilterByProperty } = getUpdatedFilterBy(\n filterBy,\n filterByProperty,\n parentData\n );\n\n const action = getSearchPublishedContent(RAW_RESULTS);\n const [checkboxSelectValues, rangeValues] = getFilterRangesAndCheckboxesValues(filters);\n\n const { docType } = getEntityData(entity);\n\n const filtersQuery = buildFiltersQuery({\n shouldAddFilters,\n query: filterValues,\n filterBy: updatedFilterBy,\n filterByProperty: updatedFilterByProperty,\n rangeValues,\n queryKeys: Object.keys(updatedQuery)\n });\n\n const rawQueryStringified = buildRawQueryStringified(\n checkboxSelectValues,\n rangeValues,\n docType,\n filtersQuery\n );\n\n const { data, error, loading } = useQuery(action, {\n variables: { rawQueryStringified, limit: 0 }, // we only want aggs so limit=0 for no search results\n skip: !rawQueryStringified || parentQueryLoading\n });\n\n if (error) return error.message;\n if (!filters.length) return null;\n\n const { searchPublishedContent: { rawResults: { aggregations: filterData } = {} } = {} } =\n data || {};\n\n if (!filterValues && !loading && !parentQueryLoading && (filterData || !rawQueryStringified)) {\n const newValues = getFilterValues(filterData, filters, updatedQuery);\n dispatch({ newValues, shouldSearch: false, type: 'update' });\n return null;\n }\n\n const handleSearch = newQuery => {\n setDisplaySearchFilter(false);\n const hashBit = asPath.split('#')[1] || '';\n const parsedHashBit = hashBit ? `#${hashBit}` : '';\n scrollToFirstList();\n if (!newQuery) {\n const baseQuery = `${currentUrl}${parsedHashBit}`;\n setUrlPath(baseQuery);\n return router.push('/Resolver', baseQuery, { shallow: !url, scroll: false }).then(() => {\n setKey(`filter-${name}:${Date.now()}`); // remove after range component update\n });\n }\n const newUrl = buildNewUrl(url, currentUrl, newQuery, hashBit);\n setUrlPath(newUrl);\n return router.push('/Resolver', newUrl, { shallow: !url, scroll: false });\n };\n\n const scrollToFirstList = () => {\n const [list] = document.getElementsByClassName('list-top');\n const shouldScrollToFirstList = !url && list;\n\n if (shouldScrollToFirstList) {\n window.scrollTo({\n left: 0,\n top: window.pageYOffset - SCROLL_OFFSET + list.getBoundingClientRect().top\n });\n } else {\n window.scrollTo(0, 0);\n }\n };\n\n if (!filterValues) return null;\n\n return (\n <SearchFilter\n key={key}\n setAppliedFilters={dispatch}\n query={updatedQuery}\n listComponentName={listComponentName}\n searchFilterRef={searchFilterRef}\n data={filterData}\n filters={filters}\n hasUrl={!!url}\n entity={entity}\n handleSearch={handleSearch}\n filterValues={filterValues}\n name={name}\n isCollapsedOnResponsive={isCollapsedOnResponsive}\n displaySearchFilter={displaySearchFilter}\n setDisplaySearchFilter={setDisplaySearchFilter}\n groupAfterMobile={groupAfterMobile}\n groupAfterDesktop={groupAfterDesktop}\n mobileRefineButtonText={mobileRefineButtonText}\n />\n );\n};\n\nSearchFilterContainer.propTypes = {\n mobileRefineButtonText: PropTypes.string,\n entity: PropTypes.string,\n url: PropTypes.string,\n filters: PropTypes.array,\n name: PropTypes.string.isRequired,\n isCollapsedOnResponsive: PropTypes.bool,\n groupAfterMobile: PropTypes.number,\n groupAfterDesktop: PropTypes.number,\n filterBy: PropTypes.array,\n filterByProperty: PropTypes.array,\n shouldAddFilters: PropTypes.bool,\n listComponentName: PropTypes.string,\n parent: PropTypes.object\n};\n\nSearchFilterContainer.defaultProps = {\n url: null,\n filters: [],\n entity: '',\n isCollapsedOnResponsive: true,\n groupAfterMobile: 0,\n groupAfterDesktop: 0,\n filterBy: [],\n filterByProperty: [],\n shouldAddFilters: false,\n listComponentName: '',\n parent: {},\n mobileRefineButtonText: ''\n};\n\nexport default withTitle(SearchFilterContainer);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAEC,UAAU,EAAEC,UAAU,QAAQ,OAAO;AAClF,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,QAAQ,QAAQ,cAAc;AACvC,OAAOC,YAAY,MAAM,gBAAgB;AACzC,SAASC,SAAS,QAAQ,WAAW;AACrC,SAASC,yBAAyB,EAAEC,uBAAuB,QAAQ,yBAAyB;AAC5F,SACEC,WAAW,EACXC,eAAe,EACfC,kCAAkC,EAClCC,kBAAkB,EAClBC,kBAAkB,QACb,WAAW;AAClB,SACEC,aAAa,EACbC,mBAAmB,EACnBC,aAAa,EACbC,wBAAwB,EACxBC,iBAAiB,QACZ,eAAe;AACtB,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,SAASC,wBAAwB,QAAQ,aAAa;AAEtD,MAAMC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EtB,SAAS,CAAC0H,MAAM;EACrBnG,OAAO,EAAEvB,SAAS,CAAC2H,KAAK;EACxBnG,IAAI,EAAExB,SAAS,CAAC0H,MAAM,CAACE,UAAU;EACjCnG,uBAAuB,EAAEzB,SAAS,CAAC6H,IAAI;EACvCnG,gBAAgB,EAAE1B,SAAS,CAAC8H,MAAM;EAClCnG,iBAAiB,EAAE3B,SAAS,CAAC8H,MAAM;EACnClG,QAAQ,EAAE5B,SAAS,CAAC2H,KAAK;EACzB9F,gBAAgB,EAAE7B,SAAS,CAAC2H,KAAK;EACjC7F,gBAAgB,EAAE9B,SAAS,CAAC6H,IAAI;EAChC9F,iBAAiB,EAAE/B,SAAS,CAAC0H,MAAM;EACnC1F,MAAM,EAAEhC,SAAS,CAAC+H;AACpB,CAAC;AAED3G,qBAAqB,CAAC4G,YAAY,GAAG;EACnC1G,GAAG,EAAE,IAAI;EACTC,OAAO,EAAE,EAAE;EACXF,MAAM,EAAE,EAAE;EACVI,uBAAuB,EAAE,IAAI;EAC7BC,gBAAgB,EAAE,CAAC;EACnBC,iBAAiB,EAAE,CAAC;EACpBC,QAAQ,EAAE,EAAE;EACZC,gBAAgB,EAAE,EAAE;EACpBC,gBAAgB,EAAE,KAAK;EACvBC,iBAAiB,EAAE,EAAE;EACrBC,MAAM,EAAE,CAAC,CAAC;EACVC,sBAAsB,EAAE;AAC1B,CAAC;AAED,eAAe9B,SAAS,CAACiB,qBAAqB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","names":["React","useState","PropTypes","upperFirst","Checkboxes","FaChevronDown","FaChevronUp","withTitle","decodeValue","LIMIT_MIN","LIMIT_MAX","MORE","LESS","Checkbox","data","prop","updateFilterValues","filterValues","label","elementTitle","shouldSearch","displayFilterCount","checkboxLimit","setCheckboxLimit","handleCheckboxOptions","checkboxQueryParams","map","val","multiple","sortedValues","buckets","key","doc_count","count","optionLabel","filter","Boolean","sort","forEach","value","i","push","name","checked","includes","id","disabled","shouldDisplayMore","createElement","Fragment","className","options","onChange","eData","newCheckboxValues","length","role","onClick","propTypes","object","isRequired","string","func","bool","defaultProps"],"sources":["../../../../src/components/SearchFilter/components/Checkbox.js"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport upperFirst from 'lodash.upperfirst';\nimport { Checkboxes } from '@blaze-react/checkboxes';\nimport { FaChevronDown, FaChevronUp } from 'react-icons/fa';\nimport { withTitle } from '../../../HOC';\nimport { decodeValue } from '../helpers';\nimport { LIMIT_MIN, LIMIT_MAX, MORE, LESS } from '../constants';\n\nconst Checkbox = ({\n data,\n prop,\n updateFilterValues,\n filterValues,\n label,\n elementTitle,\n shouldSearch,\n displayFilterCount\n}) => {\n const [checkboxLimit, setCheckboxLimit] = useState(null);\n if (!data[prop]) return null;\n\n const handleCheckboxOptions = () => {\n if (checkboxLimit[prop] === LIMIT_MIN) {\n setCheckboxLimit({ [prop]: LIMIT_MAX });\n } else {\n setCheckboxLimit({ [prop]: LIMIT_MIN });\n }\n };\n\n if (!checkboxLimit) {\n setCheckboxLimit({ [prop]: LIMIT_MIN });\n }\n\n if (!checkboxLimit) return null;\n\n let checkboxQueryParams = [];\n\n if (filterValues && filterValues[prop]) {\n checkboxQueryParams =\n typeof filterValues[prop] === 'string'\n ? [decodeValue(filterValues[prop])]\n : filterValues[prop].map(val => decodeValue(val));\n }\n const multiple = [];\n\n const sortedValues = data[prop].buckets\n .map(({ key, doc_count: count }) => {\n const optionLabel = displayFilterCount ? `${key} (${count})` : key;\n return [key, optionLabel, !count];\n })\n .filter(Boolean)\n .sort();\n\n sortedValues.forEach(\n (value, i) =>\n i < checkboxLimit[prop] &&\n multiple.push({\n label: upperFirst(value[1]),\n value: value[0],\n name: prop,\n checked: checkboxQueryParams.includes(value[0]),\n id: value[0],\n disabled: value[2]\n })\n );\n\n const shouldDisplayMore = !checkboxLimit || checkboxLimit[prop] === LIMIT_MIN;\n return (\n <>\n {label ? <p>{label}</p> : ''}\n <Checkboxes\n className=\"form-checkbox\"\n options={multiple}\n onChange={({ data: eData }) => {\n const newCheckboxValues = eData\n .filter(({ checked }) => checked)\n .map(({ value }) => value);\n updateFilterValues({ [prop]: newCheckboxValues }, shouldSearch);\n }}\n />\n {data[prop].buckets.length > LIMIT_MIN && (\n <div\n role=\"button\"\n className=\"see-more\"\n onClick={handleCheckboxOptions}\n aria-label={\n shouldDisplayMore ? `See ${MORE} ${label} options` : `See ${LESS} ${label} options`\n }>\n {shouldDisplayMore ? (\n <>\n <i>\n <FaChevronDown className=\"inline-icon\" />\n </i>\n {` See ${MORE}`}\n </>\n ) : (\n <>\n <i>\n <FaChevronUp className=\"inline-icon\" />\n </i>\n {` See ${LESS}`}\n </>\n )}\n </div>\n )}\n </>\n );\n};\n\nCheckbox.propTypes = {\n data: PropTypes.object.isRequired,\n prop: PropTypes.string.isRequired,\n filterValues: PropTypes.object.isRequired,\n updateFilterValues: PropTypes.func.isRequired,\n shouldSearch: PropTypes.bool,\n label: PropTypes.string,\n elementTitle: PropTypes.string,\n displayFilterCount: PropTypes.bool\n};\n\nCheckbox.defaultProps = {\n shouldSearch: false,\n label: '',\n elementTitle: '',\n displayFilterCount: false\n};\n\nexport default withTitle(Checkbox);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,mBAAmB;AAC1C,SAASC,UAAU,QAAQ,yBAAyB;AACpD,SAASC,aAAa,EAAEC,WAAW,QAAQ,gBAAgB;AAC3D,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,WAAW,QAAQ,YAAY;AACxC,SAASC,SAAS,EAAEC,SAAS,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAE/D,MAAMC,QAAQ,GAAGA,CAAC;EAChBC,IAAI;EACJC,IAAI;EACJC,kBAAkB;EAClBC,YAAY;EACZC,KAAK;EACLC,YAAY;EACZC,YAAY;EACZC;AACF,CAAC,KAAK;EACJ,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGtB,QAAQ,CAAC,IAAI,CAAC;EACxD,IAAI,CAACa,IAAI,CAACC,IAAI,CAAC,EAAE,OAAO,IAAI;EAE5B,MAAMS,qBAAqB,GAAGA,CAAA,KAAM;IAClC,IAAIF,aAAa,CAACP,IAAI,CAAC,KAAKN,SAAS,EAAE;MACrCc,gBAAgB,CAAC;QAAE,CAACR,IAAI,GAAGL;MAAU,CAAC,CAAC;IACzC,CAAC,MAAM;MACLa,gBAAgB,CAAC;QAAE,CAACR,IAAI,GAAGN;MAAU,CAAC,CAAC;IACzC;EACF,CAAC;EAED,IAAI,CAACa,aAAa,EAAE;IAClBC,gBAAgB,CAAC;MAAE,CAACR,IAAI,GAAGN;IAAU,CAAC,CAAC;EACzC;EAEA,IAAI,CAACa,aAAa,EAAE,OAAO,IAAI;EAE/B,IAAIG,mBAAmB,GAAG,EAAE;EAE5B,IAAIR,YAAY,IAAIA,YAAY,CAACF,IAAI,CAAC,EAAE;IACtCU,mBAAmB,GACjB,OAAOR,YAAY,CAACF,IAAI,CAAC,KAAK,QAAQ,GAClC,CAACP,WAAW,CAACS,YAAY,CAACF,IAAI,CAAC,CAAC,CAAC,GACjCE,YAAY,CAACF,IAAI,CAAC,CAACW,GAAG,CAACC,GAAG,IAAInB,WAAW,CAACmB,GAAG,CAAC,CAAC;EACvD;EACA,MAAMC,QAAQ,GAAG,EAAE;EAEnB,MAAMC,YAAY,GAAGf,IAAI,CAACC,IAAI,CAAC,CAACe,OAAO,CACpCJ,GAAG,CAAC,CAAC;IAAEK,GAAG;IAAEC,SAAS,EAAEC;EAAM,CAAC,KAAK;IAClC,MAAMC,WAAW,GAAGb,kBAAkB,
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":["React","useState","PropTypes","upperFirst","Checkboxes","FaChevronDown","FaChevronUp","withTitle","decodeValue","LIMIT_MIN","LIMIT_MAX","MORE","LESS","Checkbox","data","prop","updateFilterValues","filterValues","label","elementTitle","shouldSearch","displayFilterCount","checkboxLimit","setCheckboxLimit","handleCheckboxOptions","checkboxQueryParams","map","val","multiple","sortedValues","buckets","key","doc_count","count","optionLabel","filter","Boolean","sort","forEach","value","i","push","name","checked","includes","id","disabled","shouldDisplayMore","createElement","Fragment","className","options","onChange","eData","newCheckboxValues","length","role","onClick","propTypes","object","isRequired","string","func","bool","defaultProps"],"sources":["../../../../src/components/SearchFilter/components/Checkbox.js"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport upperFirst from 'lodash.upperfirst';\nimport { Checkboxes } from '@blaze-react/checkboxes';\nimport { FaChevronDown, FaChevronUp } from 'react-icons/fa';\nimport { withTitle } from '../../../HOC';\nimport { decodeValue } from '../helpers';\nimport { LIMIT_MIN, LIMIT_MAX, MORE, LESS } from '../constants';\n\nconst Checkbox = ({\n data,\n prop,\n updateFilterValues,\n filterValues,\n label,\n elementTitle,\n shouldSearch,\n displayFilterCount\n}) => {\n const [checkboxLimit, setCheckboxLimit] = useState(null);\n if (!data[prop]) return null;\n\n const handleCheckboxOptions = () => {\n if (checkboxLimit[prop] === LIMIT_MIN) {\n setCheckboxLimit({ [prop]: LIMIT_MAX });\n } else {\n setCheckboxLimit({ [prop]: LIMIT_MIN });\n }\n };\n\n if (!checkboxLimit) {\n setCheckboxLimit({ [prop]: LIMIT_MIN });\n }\n\n if (!checkboxLimit) return null;\n\n let checkboxQueryParams = [];\n\n if (filterValues && filterValues[prop]) {\n checkboxQueryParams =\n typeof filterValues[prop] === 'string'\n ? [decodeValue(filterValues[prop])]\n : filterValues[prop].map(val => decodeValue(val));\n }\n const multiple = [];\n\n const sortedValues = data[prop].buckets\n .map(({ key, doc_count: count }) => {\n const optionLabel = displayFilterCount ? `${key} (${count})` : key;\n return [key, optionLabel, !count];\n })\n .filter(Boolean)\n .sort();\n\n sortedValues.forEach(\n (value, i) =>\n i < checkboxLimit[prop] &&\n multiple.push({\n label: upperFirst(value[1]),\n value: value[0],\n name: prop,\n checked: checkboxQueryParams.includes(value[0]),\n id: value[0],\n disabled: value[2]\n })\n );\n\n const shouldDisplayMore = !checkboxLimit || checkboxLimit[prop] === LIMIT_MIN;\n return (\n <>\n {label ? <p>{label}</p> : ''}\n <Checkboxes\n className=\"form-checkbox\"\n options={multiple}\n onChange={({ data: eData }) => {\n const newCheckboxValues = eData\n .filter(({ checked }) => checked)\n .map(({ value }) => value);\n updateFilterValues({ [prop]: newCheckboxValues }, shouldSearch);\n }}\n />\n {data[prop].buckets.length > LIMIT_MIN && (\n <div\n role=\"button\"\n className=\"see-more\"\n onClick={handleCheckboxOptions}\n aria-label={\n shouldDisplayMore ? `See ${MORE} ${label} options` : `See ${LESS} ${label} options`\n }>\n {shouldDisplayMore ? (\n <>\n <i>\n <FaChevronDown className=\"inline-icon\" />\n </i>\n {` See ${MORE}`}\n </>\n ) : (\n <>\n <i>\n <FaChevronUp className=\"inline-icon\" />\n </i>\n {` See ${LESS}`}\n </>\n )}\n </div>\n )}\n </>\n );\n};\n\nCheckbox.propTypes = {\n data: PropTypes.object.isRequired,\n prop: PropTypes.string.isRequired,\n filterValues: PropTypes.object.isRequired,\n updateFilterValues: PropTypes.func.isRequired,\n shouldSearch: PropTypes.bool,\n label: PropTypes.string,\n elementTitle: PropTypes.string,\n displayFilterCount: PropTypes.bool\n};\n\nCheckbox.defaultProps = {\n shouldSearch: false,\n label: '',\n elementTitle: '',\n displayFilterCount: false\n};\n\nexport default withTitle(Checkbox);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,mBAAmB;AAC1C,SAASC,UAAU,QAAQ,yBAAyB;AACpD,SAASC,aAAa,EAAEC,WAAW,QAAQ,gBAAgB;AAC3D,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,WAAW,QAAQ,YAAY;AACxC,SAASC,SA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C9BxC,kBAAkB,EAAEnB,SAAS,CAAC6D;AAChC,CAAC;AAEDlD,QAAQ,CAACmD,YAAY,GAAG;EACtB5C,YAAY,EAAE,KAAK;EACnBF,KAAK,EAAE,EAAE;EACTC,YAAY,EAAE,EAAE;EAChBE,kBAAkB,EAAE;AACtB,CAAC;AAED,eAAed,SAAS,CAACM,QAAQ,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Range.js","names":["React","PropTypes","debounce","RangeFilter","useRouter","Select","parseUrl","useGetSingleEntitySchema","getSelectOptions","getIntersectedProp","getRangeValue","calculateMinMax","decodeValue","Range","rangeInterval","label","entity","propsToDisplay","dataAggregations","updateFilterValues","filterValues","shouldSearch","elementTitle","router","debounceAmount","query","asPath","hasMultipleOptions","length","initialRangeOption","rangeOption","selectedOption","rangeValue","data","getEntitySchema","loading","options","min","max","minValue","maxValue","valueToUse","_objectSpread","handleChange","option","value","createElement","Fragment","className","id","required","onChange","updatedOptions","forEach","prop","eMin","eMax","initValue","key","name","propTypes","array","isRequired","string","object","func","bool","number","defaultProps"],"sources":["../../../../src/components/SearchFilter/components/Range.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport debounce from 'lodash.debounce';\nimport RangeFilter from '@blaze-react/range-filter';\nimport { useRouter } from 'next/router';\nimport Select from '@blaze-react/select';\nimport { parseUrl } from 'query-string';\nimport { useGetSingleEntitySchema } from '../../../hooks';\nimport { getSelectOptions, getIntersectedProp, getRangeValue, calculateMinMax } from '../helpers';\nimport { decodeValue } from '../helpers/decode-encode';\n\nconst Range = ({\n rangeInterval,\n label,\n entity,\n propsToDisplay,\n dataAggregations,\n updateFilterValues,\n filterValues,\n shouldSearch,\n elementTitle\n}) => {\n const router = useRouter();\n const debounceAmount = shouldSearch ? 1200 : 400;\n const { query } = parseUrl(decodeValue(router.asPath));\n const hasMultipleOptions = propsToDisplay.length > 1;\n const initialRangeOption = getIntersectedProp(query, propsToDisplay) || propsToDisplay[0];\n const rangeOption =\n (filterValues[initialRangeOption] && filterValues[initialRangeOption].selectedOption) ||\n initialRangeOption;\n const rangeValue = filterValues[rangeOption];\n\n const { data: { getEntitySchema = {} } = {}, loading } = useGetSingleEntitySchema(\n entity,\n !hasMultipleOptions\n );\n\n if (loading || !rangeOption || !rangeValue) return '';\n\n const options = getSelectOptions(getEntitySchema, propsToDisplay);\n // get range from aggregations so it updates\n const { min, max } = calculateMinMax(dataAggregations[rangeOption], rangeInterval);\n const minValue = rangeValue.minValue < min ? min : rangeValue.minValue;\n const maxValue = rangeValue.maxValue > max ? max : rangeValue.maxValue;\n const valueToUse = { ...rangeValue, min, max, minValue, maxValue };\n\n const handleChange = debounce((option, value) => {\n updateFilterValues({ [option]: { ...value, selectedOption: rangeOption } }, shouldSearch);\n }, debounceAmount);\n\n return (\n <>\n {elementTitle && <div className=\"heading heading--section\">{elementTitle}</div>}\n {hasMultipleOptions && (\n <>\n <label>{label}</label>\n <Select\n value={rangeOption}\n id={rangeOption}\n options={options}\n required\n onChange={({ value }) => {\n const updatedOptions = {};\n propsToDisplay.forEach(prop => {\n const { min: eMin, max: eMax } = filterValues[prop];\n const initValue = getRangeValue(null, rangeInterval, eMin, eMax);\n updatedOptions[prop] = { ...initValue, selectedOption: value };\n });\n\n updateFilterValues(updatedOptions, false);\n }}\n />\n </>\n )}\n <RangeFilter\n key={`${rangeOption}-${minValue}-${maxValue}`}\n name={rangeOption}\n label={hasMultipleOptions ? '' : label}\n value={valueToUse}\n id={rangeOption}\n onChange={({ value }) => {\n handleChange(rangeOption, value);\n }}\n />\n </>\n );\n};\n\nRange.propTypes = {\n propsToDisplay: PropTypes.array.isRequired,\n entity: PropTypes.string.isRequired,\n filterValues: PropTypes.object.isRequired,\n updateFilterValues: PropTypes.func.isRequired,\n shouldSearch: PropTypes.bool,\n rangeInterval: PropTypes.number,\n label: PropTypes.string,\n elementTitle: PropTypes.string,\n dataAggregations: PropTypes.object.isRequired\n};\n\nRange.defa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KAAK,EAAEf,WAAY;IACnBmB,EAAE,EAAEnB,WAAY;IAChBM,OAAO,EAAEA,OAAQ;IACjBc,QAAQ;IACRC,QAAQ,EAAEA,CAAC;MAAEN;IAAM,CAAC,KAAK;MACvB,MAAMO,cAAc,GAAG,CAAC,CAAC;MACzBnC,cAAc,CAACoC,OAAO,CAACC,IAAI,IAAI;QAC7B,MAAM;UAAEjB,GAAG,EAAEkB,IAAI;UAAEjB,GAAG,EAAEkB;QAAK,CAAC,GAAGpC,YAAY,CAACkC,IAAI,CAAC;QACnD,MAAMG,SAAS,GAAG/C,aAAa,CAAC,IAAI,EAAEI,aAAa,EAAEyC,IAAI,EAAEC,IAAI,CAAC;QAChEJ,cAAc,CAACE,IAAI,CAAC,GAAAZ,aAAA,CAAAA,aAAA,KAAQe,SAAS;UAAE1B,cAAc,EAAEc;QAAK,EAAE;MAChE,CAAC,CAAC;MAEF1B,kBAAkB,CAACiC,cAAc,EAAE,KAAK,CAAC;IAC3C;EAAE,CACH,CACD,CACH,eACDpD,KAAA,CAAA8C,aAAA,CAAC3C,WAAW;IACVuD,GAAG,
|
|
1
|
+
{"version":3,"file":"Range.js","names":["React","PropTypes","debounce","RangeFilter","useRouter","Select","parseUrl","useGetSingleEntitySchema","getSelectOptions","getIntersectedProp","getRangeValue","calculateMinMax","decodeValue","Range","rangeInterval","label","entity","propsToDisplay","dataAggregations","updateFilterValues","filterValues","shouldSearch","elementTitle","router","debounceAmount","query","asPath","hasMultipleOptions","length","initialRangeOption","rangeOption","selectedOption","rangeValue","data","getEntitySchema","loading","options","min","max","minValue","maxValue","valueToUse","_objectSpread","handleChange","option","value","createElement","Fragment","className","id","required","onChange","updatedOptions","forEach","prop","eMin","eMax","initValue","key","name","propTypes","array","isRequired","string","object","func","bool","number","defaultProps"],"sources":["../../../../src/components/SearchFilter/components/Range.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport debounce from 'lodash.debounce';\nimport RangeFilter from '@blaze-react/range-filter';\nimport { useRouter } from 'next/router';\nimport Select from '@blaze-react/select';\nimport { parseUrl } from 'query-string';\nimport { useGetSingleEntitySchema } from '../../../hooks';\nimport { getSelectOptions, getIntersectedProp, getRangeValue, calculateMinMax } from '../helpers';\nimport { decodeValue } from '../helpers/decode-encode';\n\nconst Range = ({\n rangeInterval,\n label,\n entity,\n propsToDisplay,\n dataAggregations,\n updateFilterValues,\n filterValues,\n shouldSearch,\n elementTitle\n}) => {\n const router = useRouter();\n const debounceAmount = shouldSearch ? 1200 : 400;\n const { query } = parseUrl(decodeValue(router.asPath));\n const hasMultipleOptions = propsToDisplay.length > 1;\n const initialRangeOption = getIntersectedProp(query, propsToDisplay) || propsToDisplay[0];\n const rangeOption =\n (filterValues[initialRangeOption] && filterValues[initialRangeOption].selectedOption) ||\n initialRangeOption;\n const rangeValue = filterValues[rangeOption];\n\n const { data: { getEntitySchema = {} } = {}, loading } = useGetSingleEntitySchema(\n entity,\n !hasMultipleOptions\n );\n\n if (loading || !rangeOption || !rangeValue) return '';\n\n const options = getSelectOptions(getEntitySchema, propsToDisplay);\n // get range from aggregations so it updates\n const { min, max } = calculateMinMax(dataAggregations[rangeOption], rangeInterval);\n const minValue = rangeValue.minValue < min ? min : rangeValue.minValue;\n const maxValue = rangeValue.maxValue > max ? max : rangeValue.maxValue;\n const valueToUse = { ...rangeValue, min, max, minValue, maxValue };\n\n const handleChange = debounce((option, value) => {\n updateFilterValues({ [option]: { ...value, selectedOption: rangeOption } }, shouldSearch);\n }, debounceAmount);\n\n return (\n <>\n {elementTitle && <div className=\"heading heading--section\">{elementTitle}</div>}\n {hasMultipleOptions && (\n <>\n <label>{label}</label>\n <Select\n value={rangeOption}\n id={rangeOption}\n options={options}\n required\n onChange={({ value }) => {\n const updatedOptions = {};\n propsToDisplay.forEach(prop => {\n const { min: eMin, max: eMax } = filterValues[prop];\n const initValue = getRangeValue(null, rangeInterval, eMin, eMax);\n updatedOptions[prop] = { ...initValue, selectedOption: value };\n });\n\n updateFilterValues(updatedOptions, false);\n }}\n />\n </>\n )}\n <RangeFilter\n key={`${rangeOption}-${minValue}-${maxValue}`}\n name={rangeOption}\n label={hasMultipleOptions ? '' : label}\n value={valueToUse}\n id={rangeOption}\n onChange={({ value }) => {\n handleChange(rangeOption, value);\n }}\n />\n </>\n );\n};\n\nRange.propTypes = {\n propsToDisplay: PropTypes.array.isRequired,\n entity: PropTypes.string.isRequired,\n filterValues: PropTypes.object.isRequired,\n updateFilterValues: PropTypes.func.isRequired,\n shouldSearch: PropTypes.bool,\n rangeInterval: PropTypes.number,\n label: PropTypes.string,\n elementTitle: PropTypes.string,\n dataAggregations: PropTypes.object.isRequired\n};\n\nRange.defaultProps = {\n shouldSearch: false,\n rangeInterval: 1,\n label: '',\n elementTitle: ''\n};\n\nexport default Range;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,QAAQ,MAAM,iBAAiB;AACtC,OAAOC,WAAW,MAAM,2BAA2B;AACnD,SAASC,SAAS,QAAQ,aAAa;AACvC,OAAOC,MAAM,MAAM,qBAAqB;AACxC,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,wBAAwB,QAAQ,gBAAgB;AACzD,SAASC,gBAAgB,EAAEC,kBAAkB,EAAEC,aAAa,EAAEC,eAAe,QAAQ,YAAY;AACjG,SAASC,WAAW,QAAQ,0BAA0B;AAEtD,MAAMC,KAAK,GAAGA,CAAC;EACbC,aAAa;EACbC,KAAK;EACLC,MAAM;EACNC,cAAc;EACdC,gBAAgB;EAChBC,kBAAkB;EAClBC,YAAY;EACZC,YAAY;EACZC;AACF,CAAC,KAAK;EACJ,MAAMC,MAAM,GAAGnB,SAAS,CAAC,CAAC;EAC1B,MAAMoB,cAAc,GAAGH,YAAY,GAAG,IAAI,GAAG,GAAG;EAChD,MAAM;IAAEI;EAAM,CAAC,GAAGnB,QAAQ,CAACM,WAAW,CAACW,MAAM,CAACG,MAAM,CAAC,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GAAGZ,KAAM;IACvC8B,KAAK,EAAEJ,UAAW;IAClBQ,EAAE,EAAEnB,WAAY;IAChBqB,QAAQ,EAAEA,CAAC;MAAEN;IAAM,CAAC,KAAK;MACvBF,YAAY,CAACb,WAAW,EAAEe,KAAK,CAAC;IAClC;EAAE,CACH,CACD,CAAC;AAEP,CAAC;AAEDhC,KAAK,CAAC+C,SAAS,GAAG;EAChB3C,cAAc,EAAEhB,SAAS,CAAC4D,KAAK,CAACC,UAAU;EAC1C9C,MAAM,EAAEf,SAAS,CAAC8D,MAAM,CAACD,UAAU;EACnC1C,YAAY,EAAEnB,SAAS,CAAC+D,MAAM,CAACF,UAAU;EACzC3C,kBAAkB,EAAElB,SAAS,CAACgE,IAAI,CAACH,UAAU;EAC7CzC,YAAY,EAAEpB,SAAS,CAACiE,IAAI;EAC5BpD,aAAa,EAAEb,SAAS,CAACkE,MAAM;EAC/BpD,KAAK,EAAEd,SAAS,CAAC8D,MAAM;EACvBzC,YAAY,EAAErB,SAAS,CAAC8D,MAAM;EAC9B7C,gBAAgB,EAAEjB,SAAS,CAAC+D,MAAM,CAACF;AACrC,CAAC;AAEDjD,KAAK,CAACuD,YAAY,GAAG;EACnB/C,YAAY,EAAE,KAAK;EACnBP,aAAa,EAAE,CAAC;EAChBC,KAAK,EAAE,EAAE;EACTO,YAAY,EAAE;AAChB,CAAC;AAED,eAAeT,KAAK","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","names":["React","PropTypes","Select","DEFAULT_OPTION","SelectFilter","data","label","prop","updateFilterValues","filterValues","shouldSearch","displayLabelAsPlaceholder","displayFilterCount","elementTitle","filterValue","disabledOptions","buckets","options","map","key","doc_count","count","push","optionLabel","filter","Boolean","sort","labelText","labelToUse","defaultTextValue","createElement","Fragment","className","value","id","name","onChange","valueToUse","disabled","propTypes","object","isRequired","string","func","bool","defaultProps"],"sources":["../../../../src/components/SearchFilter/components/Select.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Select from '@blaze-react/select';\nimport { DEFAULT_OPTION } from '../constants';\n\nconst SelectFilter = ({\n data,\n label,\n prop,\n updateFilterValues,\n filterValues,\n shouldSearch,\n displayLabelAsPlaceholder,\n displayFilterCount,\n elementTitle\n}) => {\n const filterValue = filterValues[prop] || '';\n const disabledOptions = [];\n const { buckets = [] } = data[prop] || {};\n\n const options = buckets\n .map(({ key, doc_count: count }) => {\n if (!count) disabledOptions.push(key);\n const optionLabel = displayFilterCount ? `${key} (${count})` : key;\n return [key, optionLabel];\n })\n .filter(Boolean)\n .sort();\n\n const labelText = label || prop;\n let labelToUse = labelText;\n let defaultTextValue = DEFAULT_OPTION;\n if (displayLabelAsPlaceholder) {\n defaultTextValue = labelToUse;\n labelToUse = null;\n }\n\n return (\n <>\n {elementTitle && <div className=\"heading heading--section\">{elementTitle}</div>}\n <Select\n label={labelToUse}\n value={filterValue}\n id={prop}\n name={`filter-${prop}`}\n data-testid={`filter-${prop}`}\n options={options}\n defaultTextValue={defaultTextValue}\n onChange={({ value }) => {\n let valueToUse = value;\n if (value === defaultTextValue) valueToUse = '';\n\n updateFilterValues({ [prop]: valueToUse }, shouldSearch);\n }}\n disabled={disabledOptions}\n />\n </>\n );\n};\n\nSelectFilter.propTypes = {\n data: PropTypes.object.isRequired,\n prop: PropTypes.string.isRequired,\n filterValues: PropTypes.object,\n updateFilterValues: PropTypes.func.isRequired,\n shouldSearch: PropTypes.bool,\n label: PropTypes.string,\n elementTitle: PropTypes.string,\n\n displayLabelAsPlaceholder: PropTypes.bool,\n displayFilterCount: PropTypes.bool\n};\n\nSelectFilter.defaultProps = {\n filterValues: {},\n shouldSearch: false,\n label: '',\n elementTitle: '',\n displayLabelAsPlaceholder: false,\n displayFilterCount: false\n};\n\nexport default SelectFilter;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,MAAM,MAAM,qBAAqB;AACxC,SAASC,cAAc,QAAQ,cAAc;AAE7C,MAAMC,YAAY,GAAGA,CAAC;EACpBC,IAAI;EACJC,KAAK;EACLC,IAAI;EACJC,kBAAkB;EAClBC,YAAY;EACZC,YAAY;EACZC,yBAAyB;EACzBC,kBAAkB;EAClBC;AACF,CAAC,KAAK;EACJ,MAAMC,WAAW,GAAGL,YAAY,CAACF,IAAI,CAAC,IAAI,EAAE;EAC5C,MAAMQ,eAAe,GAAG,EAAE;EAC1B,MAAM;IAAEC,OAAO,GAAG;EAAG,CAAC,GAAGX,IAAI,CAACE,IAAI,CAAC,IAAI,CAAC,CAAC;EAEzC,MAAMU,OAAO,GAAGD,OAAO,CACpBE,GAAG,CAAC,CAAC;IAAEC,GAAG;IAAEC,SAAS,EAAEC;EAAM,CAAC,KAAK;IAClC,IAAI,CAACA,KAAK,EAAEN,eAAe,CAACO,IAAI,CAACH,GAAG,CAAC;IACrC,MAAMI,WAAW,GAAGX,kBAAkB,
|
|
1
|
+
{"version":3,"file":"Select.js","names":["React","PropTypes","Select","DEFAULT_OPTION","SelectFilter","data","label","prop","updateFilterValues","filterValues","shouldSearch","displayLabelAsPlaceholder","displayFilterCount","elementTitle","filterValue","disabledOptions","buckets","options","map","key","doc_count","count","push","optionLabel","filter","Boolean","sort","labelText","labelToUse","defaultTextValue","createElement","Fragment","className","value","id","name","onChange","valueToUse","disabled","propTypes","object","isRequired","string","func","bool","defaultProps"],"sources":["../../../../src/components/SearchFilter/components/Select.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Select from '@blaze-react/select';\nimport { DEFAULT_OPTION } from '../constants';\n\nconst SelectFilter = ({\n data,\n label,\n prop,\n updateFilterValues,\n filterValues,\n shouldSearch,\n displayLabelAsPlaceholder,\n displayFilterCount,\n elementTitle\n}) => {\n const filterValue = filterValues[prop] || '';\n const disabledOptions = [];\n const { buckets = [] } = data[prop] || {};\n\n const options = buckets\n .map(({ key, doc_count: count }) => {\n if (!count) disabledOptions.push(key);\n const optionLabel = displayFilterCount ? `${key} (${count})` : key;\n return [key, optionLabel];\n })\n .filter(Boolean)\n .sort();\n\n const labelText = label || prop;\n let labelToUse = labelText;\n let defaultTextValue = DEFAULT_OPTION;\n if (displayLabelAsPlaceholder) {\n defaultTextValue = labelToUse;\n labelToUse = null;\n }\n\n return (\n <>\n {elementTitle && <div className=\"heading heading--section\">{elementTitle}</div>}\n <Select\n label={labelToUse}\n value={filterValue}\n id={prop}\n name={`filter-${prop}`}\n data-testid={`filter-${prop}`}\n options={options}\n defaultTextValue={defaultTextValue}\n onChange={({ value }) => {\n let valueToUse = value;\n if (value === defaultTextValue) valueToUse = '';\n\n updateFilterValues({ [prop]: valueToUse }, shouldSearch);\n }}\n disabled={disabledOptions}\n />\n </>\n );\n};\n\nSelectFilter.propTypes = {\n data: PropTypes.object.isRequired,\n prop: PropTypes.string.isRequired,\n filterValues: PropTypes.object,\n updateFilterValues: PropTypes.func.isRequired,\n shouldSearch: PropTypes.bool,\n label: PropTypes.string,\n elementTitle: PropTypes.string,\n\n displayLabelAsPlaceholder: PropTypes.bool,\n displayFilterCount: PropTypes.bool\n};\n\nSelectFilter.defaultProps = {\n filterValues: {},\n shouldSearch: false,\n label: '',\n elementTitle: '',\n displayLabelAsPlaceholder: false,\n displayFilterCount: false\n};\n\nexport default SelectFilter;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,MAAM,MAAM,qBAAqB;AACxC,SAASC,cAAc,QAAQ,cAAc;AAE7C,MAAMC,YAAY,GAAGA,CAAC;EACpBC,IAAI;EACJC,KAAK;EACLC,IAAI;EACJC,kBAAkB;EAClBC,YAAY;EACZC,YAAY;EACZC,yBAAyB;EACzBC,kBAAkB;EAClBC;AACF,CAAC,KAAK;EACJ,MAAMC,WAAW,GAAGL,YAAY,CAACF,IAAI,CAAC,IAAI,EAAE;EAC5C,MAAMQ,eAAe,GAAG,EAAE;EAC1B,MAAM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E;MAE/C7B,kBAAkB,CAAC;QAAE,CAACD,IAAI,GAAG8B;MAAW,CAAC,EAAE3B,YAAY,CAAC;IAC1D,CAAE;IACF4B,QAAQ,EAAEvB;EAAgB,CAC3B,CACD,CAAC;AAEP,CAAC;AAEDX,YAAY,CAACmC,SAAS,GAAG;EACvBlC,IAAI,EAAEJ,SAAS,CAACuC,MAAM,CAACC,UAAU;EACjClC,IAAI,EAAEN,SAAS,CAACyC,MAAM,CAACD,UAAU;EACjChC,YAAY,EAAER,SAAS,CAACuC,MAAM;EAC9BhC,kBAAkB,EAAEP,SAAS,CAAC0C,IAAI,CAACF,UAAU;EAC7C/B,YAAY,EAAET,SAAS,CAAC2C,IAAI;EAC5BtC,KAAK,EAAEL,SAAS,CAACyC,MAAM;EACvB7B,YAAY,EAAEZ,SAAS,CAACyC,MAAM;EAE9B/B,yBAAyB,EAAEV,SAAS,CAAC2C,IAAI;EACzChC,kBAAkB,EAAEX,SAAS,CAAC2C;AAChC,CAAC;AAEDxC,YAAY,CAACyC,YAAY,GAAG;EAC1BpC,YAAY,EAAE,CAAC,CAAC;EAChBC,YAAY,EAAE,KAAK;EACnBJ,KAAK,EAAE,EAAE;EACTO,YAAY,EAAE,EAAE;EAChBF,yBAAyB,EAAE,KAAK;EAChCC,kBAAkB,EAAE;AACtB,CAAC;AAED,eAAeR,YAAY","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextSearch.js","names":["React","PropTypes","Input","MdSearch","SEARCH_TERM","TextSearch","label","searchValue","updateFilterValues","elementTitle","createElement","Fragment","className","id","value","placeholder","onChange","eValue","type","onClick","e","preventDefault","propTypes","string","isRequired","func","defaultProps"],"sources":["../../../../src/components/SearchFilter/components/TextSearch.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Input from '@blaze-react/input';\nimport { MdSearch } from 'react-icons/md';\nimport { SEARCH_TERM } from '../constants';\n\nconst TextSearch = ({ label, searchValue, updateFilterValues, elementTitle }) => (\n <>\n {elementTitle && <div className=\"heading heading--section\">{elementTitle}</div>}\n <div className=\"search\">\n <div className=\"search__wrapper\">\n <div className=\"form-field form-field--input form-field--search\">\n <Input\n id={SEARCH_TERM}\n value={searchValue}\n placeholder={label || 'Search'}\n onChange={({ value: eValue }) => {\n updateFilterValues({ [SEARCH_TERM]: eValue }, false);\n }}\n />\n </div>\n <button\n type=\"button\"\n className=\"icon-button icon-button--search\"\n aria-label=\"Search\"\n onClick={e => {\n e.preventDefault();\n updateFilterValues({ [SEARCH_TERM]: searchValue }, true);\n }}>\n <i>\n <MdSearch />\n </i>\n </button>\n </div>\n </div>\n </>\n);\n\nTextSearch.propTypes = {\n searchValue: PropTypes.string.isRequired,\n updateFilterValues: PropTypes.func.isRequired,\n elementTitle: PropTypes.string,\n label: PropTypes.string\n};\n\nTextSearch.defaultProps = {\n elementTitle: '',\n label: ''\n};\n\nexport default TextSearch;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,oBAAoB;AACtC,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,WAAW,QAAQ,cAAc;AAE1C,MAAMC,UAAU,GAAGA,CAAC;EAAEC,KAAK;EAAEC,WAAW;EAAEC,kBAAkB;EAAEC;AAAa,CAAC,kBAC1ET,KAAA,CAAAU,aAAA,CAAAV,KAAA,CAAAW,QAAA,QACGF,YAAY,iBAAIT,KAAA,CAAAU,aAAA;EAAKE,SAAS,EAAC;AAA0B,GAAEH,YAAkB,CAAC,eAC/ET,KAAA,CAAAU,aAAA;EAAKE,SAAS,EAAC;AAAQ,gBACrBZ,KAAA,CAAAU,aAAA;EAAKE,SAAS,EAAC;AAAiB,gBAC9BZ,KAAA,CAAAU,aAAA;EAAKE,SAAS,EAAC;AAAiD,gBAC9DZ,KAAA,CAAAU,aAAA,CAACR,KAAK;EACJW,EAAE,EAAET,WAAY;EAChBU,KAAK,EAAEP,WAAY;EACnBQ,WAAW,EAAET,KAAK,IAAI,QAAS;EAC/BU,QAAQ,EAAEA,CAAC;IAAEF,KAAK,EAAEG;EAAO,CAAC,KAAK;IAC/BT,kBAAkB,CAAC;MAAE,CAACJ,WAAW,GAAGa;IAAO,CAAC,EAAE,KAAK,CAAC;EACtD;AAAE,CACH,CACE,CAAC,eACNjB,KAAA,CAAAU,aAAA;EACEQ,IAAI,EAAC,QAAQ;EACbN,SAAS,EAAC,iCAAiC;EAC3C,cAAW,QAAQ;EACnBO,OAAO,EAAEC,CAAC,IAAI;IACZA,CAAC,CAACC,cAAc,CAAC,CAAC;IAClBb,kBAAkB,CAAC;MAAE,CAACJ,WAAW,GAAGG;IAAY,CAAC,EAAE,IAAI,CAAC;EAC1D;AAAE,gBACFP,KAAA,CAAAU,aAAA,yBACEV,KAAA,CAAAU,aAAA,CAACP,QAAQ,MAAE,CACV,CACG,CACL,CACF,CACL,CACH;AAEDE,UAAU,CAACiB,SAAS,GAAG;EACrBf,WAAW,EAAEN,SAAS,CAACsB,MAAM,CAACC,UAAU;EACxChB,kBAAkB,EAAEP,SAAS,CAACwB,IAAI,CAACD,UAAU;EAC7Cf,YAAY,EAAER,SAAS,CAACsB,MAAM;EAC9BjB,KAAK,EAAEL,SAAS,CAACsB;AACnB,CAAC;AAEDlB,UAAU,CAACqB,YAAY,GAAG;EACxBjB,YAAY,EAAE,EAAE;EAChBH,KAAK,EAAE;AACT,CAAC;AAED,eAAeD,UAAU"}
|
|
1
|
+
{"version":3,"file":"TextSearch.js","names":["React","PropTypes","Input","MdSearch","SEARCH_TERM","TextSearch","label","searchValue","updateFilterValues","elementTitle","createElement","Fragment","className","id","value","placeholder","onChange","eValue","type","onClick","e","preventDefault","propTypes","string","isRequired","func","defaultProps"],"sources":["../../../../src/components/SearchFilter/components/TextSearch.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Input from '@blaze-react/input';\nimport { MdSearch } from 'react-icons/md';\nimport { SEARCH_TERM } from '../constants';\n\nconst TextSearch = ({ label, searchValue, updateFilterValues, elementTitle }) => (\n <>\n {elementTitle && <div className=\"heading heading--section\">{elementTitle}</div>}\n <div className=\"search\">\n <div className=\"search__wrapper\">\n <div className=\"form-field form-field--input form-field--search\">\n <Input\n id={SEARCH_TERM}\n value={searchValue}\n placeholder={label || 'Search'}\n onChange={({ value: eValue }) => {\n updateFilterValues({ [SEARCH_TERM]: eValue }, false);\n }}\n />\n </div>\n <button\n type=\"button\"\n className=\"icon-button icon-button--search\"\n aria-label=\"Search\"\n onClick={e => {\n e.preventDefault();\n updateFilterValues({ [SEARCH_TERM]: searchValue }, true);\n }}>\n <i>\n <MdSearch />\n </i>\n </button>\n </div>\n </div>\n </>\n);\n\nTextSearch.propTypes = {\n searchValue: PropTypes.string.isRequired,\n updateFilterValues: PropTypes.func.isRequired,\n elementTitle: PropTypes.string,\n label: PropTypes.string\n};\n\nTextSearch.defaultProps = {\n elementTitle: '',\n label: ''\n};\n\nexport default TextSearch;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,oBAAoB;AACtC,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,WAAW,QAAQ,cAAc;AAE1C,MAAMC,UAAU,GAAGA,CAAC;EAAEC,KAAK;EAAEC,WAAW;EAAEC,kBAAkB;EAAEC;AAAa,CAAC,kBAC1ET,KAAA,CAAAU,aAAA,CAAAV,KAAA,CAAAW,QAAA,QACGF,YAAY,iBAAIT,KAAA,CAAAU,aAAA;EAAKE,SAAS,EAAC;AAA0B,GAAEH,YAAkB,CAAC,eAC/ET,KAAA,CAAAU,aAAA;EAAKE,SAAS,EAAC;AAAQ,gBACrBZ,KAAA,CAAAU,aAAA;EAAKE,SAAS,EAAC;AAAiB,gBAC9BZ,KAAA,CAAAU,aAAA;EAAKE,SAAS,EAAC;AAAiD,gBAC9DZ,KAAA,CAAAU,aAAA,CAACR,KAAK;EACJW,EAAE,EAAET,WAAY;EAChBU,KAAK,EAAEP,WAAY;EACnBQ,WAAW,EAAET,KAAK,IAAI,QAAS;EAC/BU,QAAQ,EAAEA,CAAC;IAAEF,KAAK,EAAEG;EAAO,CAAC,KAAK;IAC/BT,kBAAkB,CAAC;MAAE,CAACJ,WAAW,GAAGa;IAAO,CAAC,EAAE,KAAK,CAAC;EACtD;AAAE,CACH,CACE,CAAC,eACNjB,KAAA,CAAAU,aAAA;EACEQ,IAAI,EAAC,QAAQ;EACbN,SAAS,EAAC,iCAAiC;EAC3C,cAAW,QAAQ;EACnBO,OAAO,EAAEC,CAAC,IAAI;IACZA,CAAC,CAACC,cAAc,CAAC,CAAC;IAClBb,kBAAkB,CAAC;MAAE,CAACJ,WAAW,GAAGG;IAAY,CAAC,EAAE,IAAI,CAAC;EAC1D;AAAE,gBACFP,KAAA,CAAAU,aAAA,yBACEV,KAAA,CAAAU,aAAA,CAACP,QAAQ,MAAE,CACV,CACG,CACL,CACF,CACL,CACH;AAEDE,UAAU,CAACiB,SAAS,GAAG;EACrBf,WAAW,EAAEN,SAAS,CAACsB,MAAM,CAACC,UAAU;EACxChB,kBAAkB,EAAEP,SAAS,CAACwB,IAAI,CAACD,UAAU;EAC7Cf,YAAY,EAAER,SAAS,CAACsB,MAAM;EAC9BjB,KAAK,EAAEL,SAAS,CAACsB;AACnB,CAAC;AAEDlB,UAAU,CAACqB,YAAY,GAAG;EACxBjB,YAAY,EAAE,EAAE;EAChBH,KAAK,EAAE;AACT,CAAC;AAED,eAAeD,UAAU","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["TextSearch","Checkbox","SelectFilter","Range"],"sources":["../../../../src/components/SearchFilter/components/index.js"],"sourcesContent":["import TextSearch from './TextSearch';\nimport Checkbox from './Checkbox';\nimport SelectFilter from './Select';\nimport Range from './Range';\n\nexport { TextSearch, Checkbox, SelectFilter, Range };\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,cAAc;AACrC,OAAOC,QAAQ,MAAM,YAAY;AACjC,OAAOC,YAAY,MAAM,UAAU;AACnC,OAAOC,KAAK,MAAM,SAAS;AAE3B,SAASH,UAAU,EAAEC,QAAQ,EAAEC,YAAY,EAAEC,KAAK"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["TextSearch","Checkbox","SelectFilter","Range"],"sources":["../../../../src/components/SearchFilter/components/index.js"],"sourcesContent":["import TextSearch from './TextSearch';\nimport Checkbox from './Checkbox';\nimport SelectFilter from './Select';\nimport Range from './Range';\n\nexport { TextSearch, Checkbox, SelectFilter, Range };\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,cAAc;AACrC,OAAOC,QAAQ,MAAM,YAAY;AACjC,OAAOC,YAAY,MAAM,UAAU;AACnC,OAAOC,KAAK,MAAM,SAAS;AAE3B,SAASH,UAAU,EAAEC,QAAQ,EAAEC,YAAY,EAAEC,KAAK","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","names":["CHECKBOX","SELECT","TEXT_SEARCH","SEARCH_TERM","SIZE","process","env","BLAZE_PB_SEARCH_FILETER_AGG_SIZE","KEYWORD","RAW_RESULTS","DEFAULT_OPTION","DEFAULT_VALUES","RANGE","CHECKBOX_SELECT","LIMIT_MIN","LIMIT_MAX","MORE","LESS","UPDATED_RANGES","MIN_VALUE","MAX_VALUE","TABLET_WIDTH","RESET","SEARCH","REFINE","MOBILE_REFINEMENT_TITLE","MORE_FILTERS_CLASSES_BASE","MORE_FILTERS_CLASSES","MOBILE_WRAPPER","MOBILE_CONTENT","MOBILE_TOGGLER","MOBILE_BUTTONS","DESKTOP_WRAPPER","DESKTOP_CONTENT","DESKTOP_TOGGLER","DESKTOP_BUTTONS"],"sources":["../../../src/components/SearchFilter/constants.js"],"sourcesContent":["const CHECKBOX = 'checkbox';\nconst SELECT = 'select';\nconst TEXT_SEARCH = 'text-search';\nconst SEARCH_TERM = 'search_term';\nconst SIZE = process.env.BLAZE_PB_SEARCH_FILETER_AGG_SIZE || 500;\nconst KEYWORD = 'keyword';\nconst RAW_RESULTS = 'rawResults';\nconst DEFAULT_OPTION = 'Any';\nconst DEFAULT_VALUES = ['Any', 'Please Choose...'];\nconst RANGE = 'range';\nconst CHECKBOX_SELECT = ['checkbox', 'select'];\nconst LIMIT_MIN = 5;\nconst LIMIT_MAX = 1000;\nconst MORE = 'more';\nconst LESS = 'less';\nconst UPDATED_RANGES = 'updated_ranges';\nconst MIN_VALUE = 'min-value';\nconst MAX_VALUE = 'max-value';\nconst TABLET_WIDTH = 768;\nconst RESET = 'Reset all filters';\nconst SEARCH = 'Search';\nconst REFINE = `Refine Search`;\nconst MOBILE_REFINEMENT_TITLE = 'Search refinement';\n\nconst MORE_FILTERS_CLASSES_BASE = 'filter__more-filters';\nconst MORE_FILTERS_CLASSES = {\n MOBILE_WRAPPER: `${MORE_FILTERS_CLASSES_BASE}-mobile-wrapper`,\n MOBILE_CONTENT: `${MORE_FILTERS_CLASSES_BASE}-mobile-content`,\n MOBILE_TOGGLER: `${MORE_FILTERS_CLASSES_BASE}-mobile-toggler`,\n MOBILE_BUTTONS: `${MORE_FILTERS_CLASSES_BASE}-mobile-buttons`,\n DESKTOP_WRAPPER: `${MORE_FILTERS_CLASSES_BASE}-desktop-wrapper`,\n DESKTOP_CONTENT: `${MORE_FILTERS_CLASSES_BASE}-desktop-content`,\n DESKTOP_TOGGLER: `${MORE_FILTERS_CLASSES_BASE}-desktop-toggler`,\n DESKTOP_BUTTONS: `${MORE_FILTERS_CLASSES_BASE}-desktop-buttons`\n};\n\nexport {\n CHECKBOX,\n SELECT,\n TEXT_SEARCH,\n SEARCH_TERM,\n SIZE,\n KEYWORD,\n RAW_RESULTS,\n DEFAULT_OPTION,\n DEFAULT_VALUES,\n RANGE,\n CHECKBOX_SELECT,\n LIMIT_MIN,\n LIMIT_MAX,\n MORE,\n LESS,\n UPDATED_RANGES,\n MIN_VALUE,\n MAX_VALUE,\n TABLET_WIDTH,\n RESET,\n SEARCH,\n REFINE,\n MOBILE_REFINEMENT_TITLE,\n MORE_FILTERS_CLASSES\n};\n"],"mappings":"AAAA,MAAMA,QAAQ,GAAG,UAAU;AAC3B,MAAMC,MAAM,GAAG,QAAQ;AACvB,MAAMC,WAAW,GAAG,aAAa;AACjC,MAAMC,WAAW,GAAG,aAAa;AACjC,MAAMC,IAAI,GAAGC,OAAO,CAACC,GAAG,CAACC,gCAAgC,IAAI,GAAG;AAChE,MAAMC,OAAO,GAAG,SAAS;AACzB,MAAMC,WAAW,GAAG,YAAY;AAChC,MAAMC,cAAc,GAAG,KAAK;AAC5B,MAAMC,cAAc,GAAG,CAAC,KAAK,EAAE,kBAAkB,CAAC;AAClD,MAAMC,KAAK,GAAG,OAAO;AACrB,MAAMC,eAAe,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC;AAC9C,MAAMC,SAAS,GAAG,CAAC;AACnB,MAAMC,SAAS,GAAG,IAAI;AACtB,MAAMC,IAAI,GAAG,MAAM;AACnB,MAAMC,IAAI,GAAG,MAAM;AACnB,MAAMC,cAAc,GAAG,gBAAgB;AACvC,MAAMC,SAAS,GAAG,WAAW;AAC7B,MAAMC,SAAS,GAAG,WAAW;AAC7B,MAAMC,YAAY,GAAG,GAAG;AACxB,MAAMC,KAAK,GAAG,mBAAmB;AACjC,MAAMC,MAAM,GAAG,QAAQ;AACvB,MAAMC,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.js","names":["CHECKBOX","SELECT","TEXT_SEARCH","SEARCH_TERM","SIZE","process","env","BLAZE_PB_SEARCH_FILETER_AGG_SIZE","KEYWORD","RAW_RESULTS","DEFAULT_OPTION","DEFAULT_VALUES","RANGE","CHECKBOX_SELECT","LIMIT_MIN","LIMIT_MAX","MORE","LESS","UPDATED_RANGES","MIN_VALUE","MAX_VALUE","TABLET_WIDTH","RESET","SEARCH","REFINE","MOBILE_REFINEMENT_TITLE","MORE_FILTERS_CLASSES_BASE","MORE_FILTERS_CLASSES","MOBILE_WRAPPER","MOBILE_CONTENT","MOBILE_TOGGLER","MOBILE_BUTTONS","DESKTOP_WRAPPER","DESKTOP_CONTENT","DESKTOP_TOGGLER","DESKTOP_BUTTONS"],"sources":["../../../src/components/SearchFilter/constants.js"],"sourcesContent":["const CHECKBOX = 'checkbox';\nconst SELECT = 'select';\nconst TEXT_SEARCH = 'text-search';\nconst SEARCH_TERM = 'search_term';\nconst SIZE = process.env.BLAZE_PB_SEARCH_FILETER_AGG_SIZE || 500;\nconst KEYWORD = 'keyword';\nconst RAW_RESULTS = 'rawResults';\nconst DEFAULT_OPTION = 'Any';\nconst DEFAULT_VALUES = ['Any', 'Please Choose...'];\nconst RANGE = 'range';\nconst CHECKBOX_SELECT = ['checkbox', 'select'];\nconst LIMIT_MIN = 5;\nconst LIMIT_MAX = 1000;\nconst MORE = 'more';\nconst LESS = 'less';\nconst UPDATED_RANGES = 'updated_ranges';\nconst MIN_VALUE = 'min-value';\nconst MAX_VALUE = 'max-value';\nconst TABLET_WIDTH = 768;\nconst RESET = 'Reset all filters';\nconst SEARCH = 'Search';\nconst REFINE = `Refine Search`;\nconst MOBILE_REFINEMENT_TITLE = 'Search refinement';\n\nconst MORE_FILTERS_CLASSES_BASE = 'filter__more-filters';\nconst MORE_FILTERS_CLASSES = {\n MOBILE_WRAPPER: `${MORE_FILTERS_CLASSES_BASE}-mobile-wrapper`,\n MOBILE_CONTENT: `${MORE_FILTERS_CLASSES_BASE}-mobile-content`,\n MOBILE_TOGGLER: `${MORE_FILTERS_CLASSES_BASE}-mobile-toggler`,\n MOBILE_BUTTONS: `${MORE_FILTERS_CLASSES_BASE}-mobile-buttons`,\n DESKTOP_WRAPPER: `${MORE_FILTERS_CLASSES_BASE}-desktop-wrapper`,\n DESKTOP_CONTENT: `${MORE_FILTERS_CLASSES_BASE}-desktop-content`,\n DESKTOP_TOGGLER: `${MORE_FILTERS_CLASSES_BASE}-desktop-toggler`,\n DESKTOP_BUTTONS: `${MORE_FILTERS_CLASSES_BASE}-desktop-buttons`\n};\n\nexport {\n CHECKBOX,\n SELECT,\n TEXT_SEARCH,\n SEARCH_TERM,\n SIZE,\n KEYWORD,\n RAW_RESULTS,\n DEFAULT_OPTION,\n DEFAULT_VALUES,\n RANGE,\n CHECKBOX_SELECT,\n LIMIT_MIN,\n LIMIT_MAX,\n MORE,\n LESS,\n UPDATED_RANGES,\n MIN_VALUE,\n MAX_VALUE,\n TABLET_WIDTH,\n RESET,\n SEARCH,\n REFINE,\n MOBILE_REFINEMENT_TITLE,\n MORE_FILTERS_CLASSES\n};\n"],"mappings":"AAAA,MAAMA,QAAQ,GAAG,UAAU;AAC3B,MAAMC,MAAM,GAAG,QAAQ;AACvB,MAAMC,WAAW,GAAG,aAAa;AACjC,MAAMC,WAAW,GAAG,aAAa;AACjC,MAAMC,IAAI,GAAGC,OAAO,CAACC,GAAG,CAACC,gCAAgC,IAAI,GAAG;AAChE,MAAMC,OAAO,GAAG,SAAS;AACzB,MAAMC,WAAW,GAAG,YAAY;AAChC,MAAMC,cAAc,GAAG,KAAK;AAC5B,MAAMC,cAAc,GAAG,CAAC,KAAK,EAAE,kBAAkB,CAAC;AAClD,MAAMC,KAAK,GAAG,OAAO;AACrB,MAAMC,eAAe,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC;AAC9C,MAAMC,SAAS,GAAG,CAAC;AACnB,MAAMC,SAAS,GAAG,IAAI;AACtB,MAAMC,IAAI,GAAG,MAAM;AACnB,MAAMC,IAAI,GAAG,MAAM;AACnB,MAAMC,cAAc,GAAG,gBAAgB;AACvC,MAAMC,SAAS,GAAG,WAAW;AAC7B,MAAMC,SAAS,GAAG,WAAW;AAC7B,MAAMC,YAAY,GAAG,GAAG;AACxB,MAAMC,KAAK,GAAG,mBAAmB;AACjC,MAAMC,MAAM,GAAG,QAAQ;AACvB,MAAMC,MAAM,GAAG,eAAe;AAC9B,MAAMC,uBAAuB,GAAG,mBAAmB;AAEnD,MAAMC,yBAAyB,GAAG,sBAAsB;AACxD,MAAMC,oBAAoB,GAAG;EAC3BC,cAAc,EAAE,GAAGF,yBAAyB,iBAAiB;EAC7DG,cAAc,EAAE,GAAGH,yBAAyB,iBAAiB;EAC7DI,cAAc,EAAE,GAAGJ,yBAAyB,iBAAiB;EAC7DK,cAAc,EAAE,GAAGL,yBAAyB,iBAAiB;EAC7DM,eAAe,EAAE,GAAGN,yBAAyB,kBAAkB;EAC/DO,eAAe,EAAE,GAAGP,yBAAyB,kBAAkB;EAC/DQ,eAAe,EAAE,GAAGR,yBAAyB,kBAAkB;EAC/DS,eAAe,EAAE,GAAGT,yBAAyB;AAC/C,CAAC;AAED,SACE1B,QAAQ,EACRC,MAAM,EACNC,WAAW,EACXC,WAAW,EACXC,IAAI,EACJI,OAAO,EACPC,WAAW,EACXC,cAAc,EACdC,cAAc,EACdC,KAAK,EACLC,eAAe,EACfC,SAAS,EACTC,SAAS,EACTC,IAAI,EACJC,IAAI,EACJC,cAAc,EACdC,SAAS,EACTC,SAAS,EACTC,YAAY,EACZC,KAAK,EACLC,MAAM,EACNC,MAAM,EACNC,uBAAuB,EACvBE,oBAAoB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-list-name-query.js","names":["buildListNameQuery","query","listName","updatedQuery","listKey","Object","keys","forEach","queryKey","isListKey","indexOf","decodedQueryValue","Array","isArray","map","value","decodeURIComponent","strippedKey","substring","length"],"sources":["../../../../src/components/SearchFilter/helpers/build-list-name-query.js"],"sourcesContent":["const buildListNameQuery = (query, listName) => {\n if (!listName) return query;\n const updatedQuery = {};\n const listKey = `pb[${listName}]`;\n Object.keys(query).forEach(queryKey => {\n const isListKey = queryKey.indexOf(`${listName}`) !== -1;\n if (!isListKey) return;\n const decodedQueryValue = Array.isArray(query[queryKey])\n ? query[queryKey].map(value => decodeURIComponent(value))\n : decodeURIComponent(query[queryKey]);\n const strippedKey = queryKey.substring(listKey.length + 1, queryKey.length - 1);\n if (isListKey) updatedQuery[strippedKey] = decodedQueryValue;\n });\n\n return updatedQuery;\n};\n\nexport default buildListNameQuery;\n"],"mappings":"AAAA,MAAMA,kBAAkB,GAAGA,CAACC,KAAK,EAAEC,QAAQ,KAAK;EAC9C,IAAI,CAACA,QAAQ,EAAE,OAAOD,KAAK;EAC3B,MAAME,YAAY,GAAG,CAAC,CAAC;EACvB,MAAMC,OAAO,
|
|
1
|
+
{"version":3,"file":"build-list-name-query.js","names":["buildListNameQuery","query","listName","updatedQuery","listKey","Object","keys","forEach","queryKey","isListKey","indexOf","decodedQueryValue","Array","isArray","map","value","decodeURIComponent","strippedKey","substring","length"],"sources":["../../../../src/components/SearchFilter/helpers/build-list-name-query.js"],"sourcesContent":["const buildListNameQuery = (query, listName) => {\n if (!listName) return query;\n const updatedQuery = {};\n const listKey = `pb[${listName}]`;\n Object.keys(query).forEach(queryKey => {\n const isListKey = queryKey.indexOf(`${listName}`) !== -1;\n if (!isListKey) return;\n const decodedQueryValue = Array.isArray(query[queryKey])\n ? query[queryKey].map(value => decodeURIComponent(value))\n : decodeURIComponent(query[queryKey]);\n const strippedKey = queryKey.substring(listKey.length + 1, queryKey.length - 1);\n if (isListKey) updatedQuery[strippedKey] = decodedQueryValue;\n });\n\n return updatedQuery;\n};\n\nexport default buildListNameQuery;\n"],"mappings":"AAAA,MAAMA,kBAAkB,GAAGA,CAACC,KAAK,EAAEC,QAAQ,KAAK;EAC9C,IAAI,CAACA,QAAQ,EAAE,OAAOD,KAAK;EAC3B,MAAME,YAAY,GAAG,CAAC,CAAC;EACvB,MAAMC,OAAO,GAAG,MAAMF,QAAQ,GAAG;EACjCG,MAAM,CAACC,IAAI,CAACL,KAAK,CAAC,CAACM,OAAO,CAACC,QAAQ,IAAI;IACrC,MAAMC,SAAS,GAAGD,QAAQ,CAACE,OAAO,CAAC,GAAGR,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;IACxD,IAAI,CAACO,SAAS,EAAE;IAChB,MAAME,iBAAiB,GAAGC,KAAK,CAACC,OAAO,CAACZ,KAAK,CAACO,QAAQ,CAAC,CAAC,GACpDP,KAAK,CAACO,QAAQ,CAAC,CAACM,GAAG,CAACC,KAAK,IAAIC,kBAAkB,CAACD,KAAK,CAAC,CAAC,GACvDC,kBAAkB,CAACf,KAAK,CAACO,QAAQ,CAAC,CAAC;IACvC,MAAMS,WAAW,GAAGT,QAAQ,CAACU,SAAS,CAACd,OAAO,CAACe,MAAM,GAAG,CAAC,EAAEX,QAAQ,CAACW,MAAM,GAAG,CAAC,CAAC;IAC/E,IAAIV,SAAS,EAAEN,YAAY,CAACc,WAAW,CAAC,GAAGN,iBAAiB;EAC9D,CAAC,CAAC;EAEF,OAAOR,YAAY;AACrB,CAAC;AAED,eAAeH,kBAAkB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-new-url.js","names":["buildNewUrl","url","currentUrl","queryParams","hashBit","encodedQuery","encodeURI","baseUrl","newUrl"],"sources":["../../../../src/components/SearchFilter/helpers/build-new-url.js"],"sourcesContent":["const buildNewUrl = (url, currentUrl, queryParams, hashBit) => {\n const encodedQuery = encodeURI(queryParams);\n const baseUrl = url || currentUrl;\n const newUrl = encodedQuery ? `${baseUrl}?${encodedQuery}` : `${baseUrl}`;\n return hashBit ? `${newUrl}#${hashBit}` : newUrl;\n};\n\nexport default buildNewUrl;\n"],"mappings":"AAAA,MAAMA,WAAW,GAAGA,CAACC,GAAG,EAAEC,UAAU,EAAEC,WAAW,EAAEC,OAAO,KAAK;EAC7D,MAAMC,YAAY,GAAGC,SAAS,CAACH,WAAW,CAAC;EAC3C,MAAMI,OAAO,GAAGN,GAAG,IAAIC,UAAU;EACjC,MAAMM,MAAM,GAAGH,YAAY,
|
|
1
|
+
{"version":3,"file":"build-new-url.js","names":["buildNewUrl","url","currentUrl","queryParams","hashBit","encodedQuery","encodeURI","baseUrl","newUrl"],"sources":["../../../../src/components/SearchFilter/helpers/build-new-url.js"],"sourcesContent":["const buildNewUrl = (url, currentUrl, queryParams, hashBit) => {\n const encodedQuery = encodeURI(queryParams);\n const baseUrl = url || currentUrl;\n const newUrl = encodedQuery ? `${baseUrl}?${encodedQuery}` : `${baseUrl}`;\n return hashBit ? `${newUrl}#${hashBit}` : newUrl;\n};\n\nexport default buildNewUrl;\n"],"mappings":"AAAA,MAAMA,WAAW,GAAGA,CAACC,GAAG,EAAEC,UAAU,EAAEC,WAAW,EAAEC,OAAO,KAAK;EAC7D,MAAMC,YAAY,GAAGC,SAAS,CAACH,WAAW,CAAC;EAC3C,MAAMI,OAAO,GAAGN,GAAG,IAAIC,UAAU;EACjC,MAAMM,MAAM,GAAGH,YAAY,GAAG,GAAGE,OAAO,IAAIF,YAAY,EAAE,GAAG,GAAGE,OAAO,EAAE;EACzE,OAAOH,OAAO,GAAG,GAAGI,MAAM,IAAIJ,OAAO,EAAE,GAAGI,MAAM;AAClD,CAAC;AAED,eAAeR,WAAW","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-url-query.js","names":["SEARCH_TERM","TEXT_SEARCH","parseFilterValue","buildQueryKey","buildUrlQuery","filterValues","filters","listComponentName","query","newQuery","queryKeys","searchValue","searchKey","push","forEach","propsToDisplay","type","prop","value","filterKey","parsedValue","includes","Object","keys","key","indexOf","join"],"sources":["../../../../src/components/SearchFilter/helpers/build-url-query.js"],"sourcesContent":["import { SEARCH_TERM, TEXT_SEARCH } from '../constants';\nimport parseFilterValue from './parse-filter-value';\nimport { buildQueryKey } from '../../../helpers';\n\nconst buildUrlQuery = (filterValues = {}, filters = [], listComponentName = '', query = {}) => {\n const newQuery = [];\n const queryKeys = [];\n const searchValue = filterValues[SEARCH_TERM];\n const searchKey = buildQueryKey(SEARCH_TERM, listComponentName);\n queryKeys.push(searchKey);\n if (searchValue) newQuery.push(`${searchKey}=${searchValue}`);\n\n filters.forEach(({ propsToDisplay, type }) => {\n if (type === TEXT_SEARCH) return;\n propsToDisplay.forEach(prop => {\n const value = filterValues[prop];\n const filterKey = buildQueryKey(prop, listComponentName);\n queryKeys.push(filterKey);\n const parsedValue = parseFilterValue(filterKey, type, value, newQuery);\n if (parsedValue && !newQuery.includes(parsedValue)) newQuery.push(parsedValue);\n });\n });\n\n Object.keys(query).forEach(key => {\n if (queryKeys.indexOf(key) === -1) newQuery.push(`${key}=${query[key]}`);\n });\n\n return newQuery.join('&');\n};\n\nexport default buildUrlQuery;\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,WAAW,QAAQ,cAAc;AACvD,OAAOC,gBAAgB,MAAM,sBAAsB;AACnD,SAASC,aAAa,QAAQ,kBAAkB;AAEhD,MAAMC,aAAa,GAAGA,CAACC,YAAY,GAAG,CAAC,CAAC,EAAEC,OAAO,GAAG,EAAE,EAAEC,iBAAiB,GAAG,EAAE,EAAEC,KAAK,GAAG,CAAC,CAAC,KAAK;EAC7F,MAAMC,QAAQ,GAAG,EAAE;EACnB,MAAMC,SAAS,GAAG,EAAE;EACpB,MAAMC,WAAW,GAAGN,YAAY,CAACL,WAAW,CAAC;EAC7C,MAAMY,SAAS,GAAGT,aAAa,CAACH,WAAW,EAAEO,iBAAiB,CAAC;EAC/DG,SAAS,CAACG,IAAI,CAACD,SAAS,CAAC;EACzB,IAAID,WAAW,EAAEF,QAAQ,CAACI,IAAI,
|
|
1
|
+
{"version":3,"file":"build-url-query.js","names":["SEARCH_TERM","TEXT_SEARCH","parseFilterValue","buildQueryKey","buildUrlQuery","filterValues","filters","listComponentName","query","newQuery","queryKeys","searchValue","searchKey","push","forEach","propsToDisplay","type","prop","value","filterKey","parsedValue","includes","Object","keys","key","indexOf","join"],"sources":["../../../../src/components/SearchFilter/helpers/build-url-query.js"],"sourcesContent":["import { SEARCH_TERM, TEXT_SEARCH } from '../constants';\nimport parseFilterValue from './parse-filter-value';\nimport { buildQueryKey } from '../../../helpers';\n\nconst buildUrlQuery = (filterValues = {}, filters = [], listComponentName = '', query = {}) => {\n const newQuery = [];\n const queryKeys = [];\n const searchValue = filterValues[SEARCH_TERM];\n const searchKey = buildQueryKey(SEARCH_TERM, listComponentName);\n queryKeys.push(searchKey);\n if (searchValue) newQuery.push(`${searchKey}=${searchValue}`);\n\n filters.forEach(({ propsToDisplay, type }) => {\n if (type === TEXT_SEARCH) return;\n propsToDisplay.forEach(prop => {\n const value = filterValues[prop];\n const filterKey = buildQueryKey(prop, listComponentName);\n queryKeys.push(filterKey);\n const parsedValue = parseFilterValue(filterKey, type, value, newQuery);\n if (parsedValue && !newQuery.includes(parsedValue)) newQuery.push(parsedValue);\n });\n });\n\n Object.keys(query).forEach(key => {\n if (queryKeys.indexOf(key) === -1) newQuery.push(`${key}=${query[key]}`);\n });\n\n return newQuery.join('&');\n};\n\nexport default buildUrlQuery;\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,WAAW,QAAQ,cAAc;AACvD,OAAOC,gBAAgB,MAAM,sBAAsB;AACnD,SAASC,aAAa,QAAQ,kBAAkB;AAEhD,MAAMC,aAAa,GAAGA,CAACC,YAAY,GAAG,CAAC,CAAC,EAAEC,OAAO,GAAG,EAAE,EAAEC,iBAAiB,GAAG,EAAE,EAAEC,KAAK,GAAG,CAAC,CAAC,KAAK;EAC7F,MAAMC,QAAQ,GAAG,EAAE;EACnB,MAAMC,SAAS,GAAG,EAAE;EACpB,MAAMC,WAAW,GAAGN,YAAY,CAACL,WAAW,CAAC;EAC7C,MAAMY,SAAS,GAAGT,aAAa,CAACH,WAAW,EAAEO,iBAAiB,CAAC;EAC/DG,SAAS,CAACG,IAAI,CAACD,SAAS,CAAC;EACzB,IAAID,WAAW,EAAEF,QAAQ,CAACI,IAAI,CAAC,GAAGD,SAAS,IAAID,WAAW,EAAE,CAAC;EAE7DL,OAAO,CAACQ,OAAO,CAAC,CAAC;IAAEC,cAAc;IAAEC;EAAK,CAAC,KAAK;IAC5C,IAAIA,IAAI,KAAKf,WAAW,EAAE;IAC1Bc,cAAc,CAACD,OAAO,CAACG,IAAI,IAAI;MAC7B,MAAMC,KAAK,GAAGb,YAAY,CAACY,IAAI,CAAC;MAChC,MAAME,SAAS,GAAGhB,aAAa,CAACc,IAAI,EAAEV,iBAAiB,CAAC;MACxDG,SAAS,CAACG,IAAI,CAACM,SAAS,CAAC;MACzB,MAAMC,WAAW,GAAGlB,gBAAgB,CAACiB,SAAS,EAAEH,IAAI,EAAEE,KAAK,EAAET,QAAQ,CAAC;MACtE,IAAIW,WAAW,IAAI,CAACX,QAAQ,CAACY,QAAQ,CAACD,WAAW,CAAC,EAAEX,QAAQ,CAACI,IAAI,CAACO,WAAW,CAAC;IAChF,CAAC,CAAC;EACJ,CAAC,CAAC;EAEFE,MAAM,CAACC,IAAI,CAACf,KAAK,CAAC,CAACM,OAAO,CAACU,GAAG,IAAI;IAChC,IAAId,SAAS,CAACe,OAAO,CAACD,GAAG,CAAC,KAAK,CAAC,CAAC,EAAEf,QAAQ,CAACI,IAAI,CAAC,GAAGW,GAAG,IAAIhB,KAAK,CAACgB,GAAG,CAAC,EAAE,CAAC;EAC1E,CAAC,CAAC;EAEF,OAAOf,QAAQ,CAACiB,IAAI,CAAC,GAAG,CAAC;AAC3B,CAAC;AAED,eAAetB,aAAa","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculate-min-max.js","names":["calculateStep","calculateMinMax","filterAggregations","rangeInterval","min","max","Math","floor","Number","ceil","step"],"sources":["../../../../src/components/SearchFilter/helpers/calculate-min-max.js"],"sourcesContent":["import calculateStep from './calculate-step';\n\nconst calculateMinMax = (filterAggregations, rangeInterval) => {\n let { min, max } = filterAggregations;\n min = Math.floor(Number(min));\n max = Math.ceil(Number(max));\n min -= min % rangeInterval;\n const step = calculateStep(max, rangeInterval);\n max += step;\n return { min, max };\n};\n\nexport default calculateMinMax;\n"],"mappings":"AAAA,OAAOA,aAAa,MAAM,kBAAkB;AAE5C,MAAMC,eAAe,GAAGA,CAACC,kBAAkB,EAAEC,aAAa,KAAK;EAC7D,IAAI;IAAEC,GAAG;IAAEC;EAAI,CAAC,GAAGH,kBAAkB;EACrCE,GAAG,GAAGE,IAAI,CAACC,KAAK,CAACC,MAAM,CAACJ,GAAG,CAAC,CAAC;EAC7BC,GAAG,GAAGC,IAAI,CAACG,IAAI,CAACD,MAAM,CAACH,GAAG,CAAC,CAAC;EAC5BD,GAAG,IAAIA,GAAG,GAAGD,aAAa;EAC1B,MAAMO,IAAI,GAAGV,aAAa,CAACK,GAAG,EAAEF,aAAa,CAAC;EAC9CE,GAAG,IAAIK,IAAI;EACX,OAAO;IAAEN,GAAG;IAAEC;EAAI,CAAC;AACrB,CAAC;AAED,eAAeJ,eAAe"}
|
|
1
|
+
{"version":3,"file":"calculate-min-max.js","names":["calculateStep","calculateMinMax","filterAggregations","rangeInterval","min","max","Math","floor","Number","ceil","step"],"sources":["../../../../src/components/SearchFilter/helpers/calculate-min-max.js"],"sourcesContent":["import calculateStep from './calculate-step';\n\nconst calculateMinMax = (filterAggregations, rangeInterval) => {\n let { min, max } = filterAggregations;\n min = Math.floor(Number(min));\n max = Math.ceil(Number(max));\n min -= min % rangeInterval;\n const step = calculateStep(max, rangeInterval);\n max += step;\n return { min, max };\n};\n\nexport default calculateMinMax;\n"],"mappings":"AAAA,OAAOA,aAAa,MAAM,kBAAkB;AAE5C,MAAMC,eAAe,GAAGA,CAACC,kBAAkB,EAAEC,aAAa,KAAK;EAC7D,IAAI;IAAEC,GAAG;IAAEC;EAAI,CAAC,GAAGH,kBAAkB;EACrCE,GAAG,GAAGE,IAAI,CAACC,KAAK,CAACC,MAAM,CAACJ,GAAG,CAAC,CAAC;EAC7BC,GAAG,GAAGC,IAAI,CAACG,IAAI,CAACD,MAAM,CAACH,GAAG,CAAC,CAAC;EAC5BD,GAAG,IAAIA,GAAG,GAAGD,aAAa;EAC1B,MAAMO,IAAI,GAAGV,aAAa,CAACK,GAAG,EAAEF,aAAa,CAAC;EAC9CE,GAAG,IAAIK,IAAI;EACX,OAAO;IAAEN,GAAG;IAAEC;EAAI,CAAC;AACrB,CAAC;AAED,eAAeJ,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculate-step.js","names":["calculateStep","max","rangeInterval"],"sources":["../../../../src/components/SearchFilter/helpers/calculate-step.js"],"sourcesContent":["const calculateStep = (max, rangeInterval) =>\n max % rangeInterval === 0 ? 0 : rangeInterval - (max % rangeInterval);\n\nexport default calculateStep;\n"],"mappings":"AAAA,MAAMA,aAAa,GAAGA,CAACC,GAAG,EAAEC,aAAa,KACvCD,GAAG,GAAGC,aAAa,KAAK,CAAC,GAAG,CAAC,GAAGA,aAAa,GAAID,GAAG,GAAGC,aAAc;AAEvE,eAAeF,aAAa"}
|
|
1
|
+
{"version":3,"file":"calculate-step.js","names":["calculateStep","max","rangeInterval"],"sources":["../../../../src/components/SearchFilter/helpers/calculate-step.js"],"sourcesContent":["const calculateStep = (max, rangeInterval) =>\n max % rangeInterval === 0 ? 0 : rangeInterval - (max % rangeInterval);\n\nexport default calculateStep;\n"],"mappings":"AAAA,MAAMA,aAAa,GAAGA,CAACC,GAAG,EAAEC,aAAa,KACvCD,GAAG,GAAGC,aAAa,KAAK,CAAC,GAAG,CAAC,GAAGA,aAAa,GAAID,GAAG,GAAGC,aAAc;AAEvE,eAAeF,aAAa","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-if-range-updated.js","names":["isBrowser","checkIfRangeUpdated","value","min","max","minValue","maxValue"],"sources":["../../../../src/components/SearchFilter/helpers/check-if-range-updated.js"],"sourcesContent":["import { isBrowser } from '../../../helpers';\n\nconst checkIfRangeUpdated = (value, min, max) => {\n const { minValue, maxValue } = value;\n return isBrowser() && (minValue !== min || maxValue !== max);\n};\n\nexport default checkIfRangeUpdated;\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,kBAAkB;AAE5C,MAAMC,mBAAmB,GAAGA,CAACC,KAAK,EAAEC,GAAG,EAAEC,GAAG,KAAK;EAC/C,MAAM;IAAEC,QAAQ;IAAEC;EAAS,CAAC,GAAGJ,KAAK;EACpC,OAAOF,SAAS,CAAC,CAAC,KAAKK,QAAQ,KAAKF,GAAG,IAAIG,QAAQ,KAAKF,GAAG,CAAC;AAC9D,CAAC;AAED,eAAeH,mBAAmB"}
|
|
1
|
+
{"version":3,"file":"check-if-range-updated.js","names":["isBrowser","checkIfRangeUpdated","value","min","max","minValue","maxValue"],"sources":["../../../../src/components/SearchFilter/helpers/check-if-range-updated.js"],"sourcesContent":["import { isBrowser } from '../../../helpers';\n\nconst checkIfRangeUpdated = (value, min, max) => {\n const { minValue, maxValue } = value;\n return isBrowser() && (minValue !== min || maxValue !== max);\n};\n\nexport default checkIfRangeUpdated;\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,kBAAkB;AAE5C,MAAMC,mBAAmB,GAAGA,CAACC,KAAK,EAAEC,GAAG,EAAEC,GAAG,KAAK;EAC/C,MAAM;IAAEC,QAAQ;IAAEC;EAAS,CAAC,GAAGJ,KAAK;EACpC,OAAOF,SAAS,CAAC,CAAC,KAAKK,QAAQ,KAAKF,GAAG,IAAIG,QAAQ,KAAKF,GAAG,CAAC;AAC9D,CAAC;AAED,eAAeH,mBAAmB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decode-encode.js","names":["decodeValue","value","decodeURIComponent","encodeValue","encodeURIComponent"],"sources":["../../../../src/components/SearchFilter/helpers/decode-encode.js"],"sourcesContent":["const decodeValue = value => decodeURIComponent(value);\nconst encodeValue = value => encodeURIComponent(value);\n\nexport { decodeValue, encodeValue };\n"],"mappings":"AAAA,MAAMA,WAAW,GAAGC,KAAK,IAAIC,kBAAkB,CAACD,KAAK,CAAC;AACtD,MAAME,WAAW,GAAGF,KAAK,IAAIG,kBAAkB,CAACH,KAAK,CAAC;AAEtD,SAASD,WAAW,EAAEG,WAAW"}
|
|
1
|
+
{"version":3,"file":"decode-encode.js","names":["decodeValue","value","decodeURIComponent","encodeValue","encodeURIComponent"],"sources":["../../../../src/components/SearchFilter/helpers/decode-encode.js"],"sourcesContent":["const decodeValue = value => decodeURIComponent(value);\nconst encodeValue = value => encodeURIComponent(value);\n\nexport { decodeValue, encodeValue };\n"],"mappings":"AAAA,MAAMA,WAAW,GAAGC,KAAK,IAAIC,kBAAkB,CAACD,KAAK,CAAC;AACtD,MAAME,WAAW,GAAGF,KAAK,IAAIG,kBAAkB,CAACH,KAAK,CAAC;AAEtD,SAASD,WAAW,EAAEG,WAAW","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-display-value.js","names":["getDisplayValue","propToDisplay","properties","matchingProperty","Object","keys","filter","property","unit"],"sources":["../../../../src/components/SearchFilter/helpers/get-display-value.js"],"sourcesContent":["const getDisplayValue = (propToDisplay, properties) => {\n const [matchingProperty] = Object.keys(properties).filter(property => property === propToDisplay);\n return matchingProperty ? properties[matchingProperty].unit : null;\n};\n\nexport default getDisplayValue;\n"],"mappings":"AAAA,MAAMA,eAAe,GAAGA,CAACC,aAAa,EAAEC,UAAU,KAAK;EACrD,MAAM,CAACC,gBAAgB,CAAC,GAAGC,MAAM,CAACC,IAAI,CAACH,UAAU,CAAC,CAACI,MAAM,CAACC,QAAQ,IAAIA,QAAQ,KAAKN,aAAa,CAAC;EACjG,OAAOE,gBAAgB,GAAGD,UAAU,CAACC,gBAAgB,CAAC,CAACK,IAAI,GAAG,IAAI;AACpE,CAAC;AAED,eAAeR,eAAe"}
|
|
1
|
+
{"version":3,"file":"get-display-value.js","names":["getDisplayValue","propToDisplay","properties","matchingProperty","Object","keys","filter","property","unit"],"sources":["../../../../src/components/SearchFilter/helpers/get-display-value.js"],"sourcesContent":["const getDisplayValue = (propToDisplay, properties) => {\n const [matchingProperty] = Object.keys(properties).filter(property => property === propToDisplay);\n return matchingProperty ? properties[matchingProperty].unit : null;\n};\n\nexport default getDisplayValue;\n"],"mappings":"AAAA,MAAMA,eAAe,GAAGA,CAACC,aAAa,EAAEC,UAAU,KAAK;EACrD,MAAM,CAACC,gBAAgB,CAAC,GAAGC,MAAM,CAACC,IAAI,CAACH,UAAU,CAAC,CAACI,MAAM,CAACC,QAAQ,IAAIA,QAAQ,KAAKN,aAAa,CAAC;EACjG,OAAOE,gBAAgB,GAAGD,UAAU,CAACC,gBAAgB,CAAC,CAACK,IAAI,GAAG,IAAI;AACpE,CAAC;AAED,eAAeR,eAAe","ignoreList":[]}
|
package/lib-es/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-filter-ranges-and-checkboxes-values.js","names":["RANGE","CHECKBOX_SELECT","getFilterRangesAndCheckboxesValues","filters","checkboxSelectValues","rangeValues","forEach","type","propsToDisplay","includes","push"],"sources":["../../../../src/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js"],"sourcesContent":["import { RANGE, CHECKBOX_SELECT } from '../constants';\n\nconst getFilterRangesAndCheckboxesValues = filters => {\n const checkboxSelectValues = [];\n const rangeValues = [];\n\n filters.forEach(({ type, propsToDisplay }) => {\n if (CHECKBOX_SELECT.includes(type)) {\n checkboxSelectValues.push(propsToDisplay[0]);\n } else if (type === RANGE) {\n rangeValues.push(...propsToDisplay);\n }\n });\n return [checkboxSelectValues, rangeValues];\n};\n\nexport default getFilterRangesAndCheckboxesValues;\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,eAAe,QAAQ,cAAc;AAErD,MAAMC,kCAAkC,GAAGC,OAAO,IAAI;EACpD,MAAMC,oBAAoB,GAAG,EAAE;EAC/B,MAAMC,WAAW,GAAG,EAAE;EAEtBF,OAAO,CAACG,OAAO,CAAC,CAAC;IAAEC,IAAI;IAAEC;EAAe,CAAC,KAAK;IAC5C,IAAIP,eAAe,CAACQ,QAAQ,CAACF,IAAI,CAAC,EAAE;MAClCH,oBAAoB,CAACM,IAAI,CAACF,cAAc,CAAC,CAAC,CAAC,CAAC;IAC9C,CAAC,MAAM,IAAID,IAAI,KAAKP,KAAK,EAAE;MACzBK,WAAW,CAACK,IAAI,CAAC,GAAGF,cAAc,CAAC;IACrC;EACF,CAAC,CAAC;EACF,OAAO,CAACJ,oBAAoB,EAAEC,WAAW,CAAC;AAC5C,CAAC;AAED,eAAeH,kCAAkC"}
|
|
1
|
+
{"version":3,"file":"get-filter-ranges-and-checkboxes-values.js","names":["RANGE","CHECKBOX_SELECT","getFilterRangesAndCheckboxesValues","filters","checkboxSelectValues","rangeValues","forEach","type","propsToDisplay","includes","push"],"sources":["../../../../src/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js"],"sourcesContent":["import { RANGE, CHECKBOX_SELECT } from '../constants';\n\nconst getFilterRangesAndCheckboxesValues = filters => {\n const checkboxSelectValues = [];\n const rangeValues = [];\n\n filters.forEach(({ type, propsToDisplay }) => {\n if (CHECKBOX_SELECT.includes(type)) {\n checkboxSelectValues.push(propsToDisplay[0]);\n } else if (type === RANGE) {\n rangeValues.push(...propsToDisplay);\n }\n });\n return [checkboxSelectValues, rangeValues];\n};\n\nexport default getFilterRangesAndCheckboxesValues;\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,eAAe,QAAQ,cAAc;AAErD,MAAMC,kCAAkC,GAAGC,OAAO,IAAI;EACpD,MAAMC,oBAAoB,GAAG,EAAE;EAC/B,MAAMC,WAAW,GAAG,EAAE;EAEtBF,OAAO,CAACG,OAAO,CAAC,CAAC;IAAEC,IAAI;IAAEC;EAAe,CAAC,KAAK;IAC5C,IAAIP,eAAe,CAACQ,QAAQ,CAACF,IAAI,CAAC,EAAE;MAClCH,oBAAoB,CAACM,IAAI,CAACF,cAAc,CAAC,CAAC,CAAC,CAAC;IAC9C,CAAC,MAAM,IAAID,IAAI,KAAKP,KAAK,EAAE;MACzBK,WAAW,CAACK,IAAI,CAAC,GAAGF,cAAc,CAAC;IACrC;EACF,CAAC,CAAC;EACF,OAAO,CAACJ,oBAAoB,EAAEC,WAAW,CAAC;AAC5C,CAAC;AAED,eAAeH,kCAAkC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-filter-value-from-query.js","names":["RANGE","CHECKBOX","SELECT","getRangeValue","decodeValue","getFilterValueFromQuery","key","filterProps","filterData","query","min","max","rangeInterval","type","queryValue","map","val"],"sources":["../../../../src/components/SearchFilter/helpers/get-filter-value-from-query.js"],"sourcesContent":["import { RANGE, CHECKBOX, SELECT } from '../constants';\nimport getRangeValue from './get-range-value';\nimport { decodeValue } from './decode-encode';\n\nconst getFilterValueFromQuery = (key, filterProps, filterData, query) => {\n const { min, max } = filterData;\n const { rangeInterval, type } = filterProps;\n const queryValue = query[key];\n if (!queryValue && type !== RANGE) return null;\n\n switch (type) {\n case RANGE:\n return getRangeValue(queryValue, rangeInterval, min, max);\n case CHECKBOX:\n return typeof queryValue === 'string'\n ? [decodeValue(queryValue)]\n : queryValue.map(val => decodeValue(val));\n case SELECT:\n return decodeValue(queryValue);\n\n default:\n return null;\n }\n};\n\nexport default getFilterValueFromQuery;\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,cAAc;AACtD,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,SAASC,WAAW,QAAQ,iBAAiB;AAE7C,MAAMC,uBAAuB,GAAGA,CAACC,GAAG,EAAEC,WAAW,EAAEC,UAAU,EAAEC,KAAK,KAAK;EACvE,MAAM;IAAEC,GAAG;IAAEC;EAAI,CAAC,GAAGH,UAAU;EAC/B,MAAM;IAAEI,aAAa;IAAEC;EAAK,CAAC,GAAGN,WAAW;EAC3C,MAAMO,UAAU,GAAGL,KAAK,CAACH,GAAG,CAAC;EAC7B,IAAI,CAACQ,UAAU,IAAID,IAAI,KAAKb,KAAK,EAAE,OAAO,IAAI;EAE9C,QAAQa,IAAI;IACV,KAAKb,KAAK;MACR,OAAOG,aAAa,CAACW,UAAU,EAAEF,aAAa,EAAEF,GAAG,EAAEC,GAAG,CAAC;IAC3D,KAAKV,QAAQ;MACX,OAAO,OAAOa,UAAU,KAAK,QAAQ,GACjC,CAACV,WAAW,CAACU,UAAU,CAAC,CAAC,GACzBA,UAAU,CAACC,GAAG,CAACC,GAAG,IAAIZ,WAAW,CAACY,GAAG,CAAC,CAAC;IAC7C,KAAKd,MAAM;MACT,OAAOE,WAAW,CAACU,UAAU,CAAC;IAEhC;MACE,OAAO,IAAI;EACf;AACF,CAAC;AAED,eAAeT,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"get-filter-value-from-query.js","names":["RANGE","CHECKBOX","SELECT","getRangeValue","decodeValue","getFilterValueFromQuery","key","filterProps","filterData","query","min","max","rangeInterval","type","queryValue","map","val"],"sources":["../../../../src/components/SearchFilter/helpers/get-filter-value-from-query.js"],"sourcesContent":["import { RANGE, CHECKBOX, SELECT } from '../constants';\nimport getRangeValue from './get-range-value';\nimport { decodeValue } from './decode-encode';\n\nconst getFilterValueFromQuery = (key, filterProps, filterData, query) => {\n const { min, max } = filterData;\n const { rangeInterval, type } = filterProps;\n const queryValue = query[key];\n if (!queryValue && type !== RANGE) return null;\n\n switch (type) {\n case RANGE:\n return getRangeValue(queryValue, rangeInterval, min, max);\n case CHECKBOX:\n return typeof queryValue === 'string'\n ? [decodeValue(queryValue)]\n : queryValue.map(val => decodeValue(val));\n case SELECT:\n return decodeValue(queryValue);\n\n default:\n return null;\n }\n};\n\nexport default getFilterValueFromQuery;\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,cAAc;AACtD,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,SAASC,WAAW,QAAQ,iBAAiB;AAE7C,MAAMC,uBAAuB,GAAGA,CAACC,GAAG,EAAEC,WAAW,EAAEC,UAAU,EAAEC,KAAK,KAAK;EACvE,MAAM;IAAEC,GAAG;IAAEC;EAAI,CAAC,GAAGH,UAAU;EAC/B,MAAM;IAAEI,aAAa;IAAEC;EAAK,CAAC,GAAGN,WAAW;EAC3C,MAAMO,UAAU,GAAGL,KAAK,CAACH,GAAG,CAAC;EAC7B,IAAI,CAACQ,UAAU,IAAID,IAAI,KAAKb,KAAK,EAAE,OAAO,IAAI;EAE9C,QAAQa,IAAI;IACV,KAAKb,KAAK;MACR,OAAOG,aAAa,CAACW,UAAU,EAAEF,aAAa,EAAEF,GAAG,EAAEC,GAAG,CAAC;IAC3D,KAAKV,QAAQ;MACX,OAAO,OAAOa,UAAU,KAAK,QAAQ,GACjC,CAACV,WAAW,CAACU,UAAU,CAAC,CAAC,GACzBA,UAAU,CAACC,GAAG,CAACC,GAAG,IAAIZ,WAAW,CAACY,GAAG,CAAC,CAAC;IAC7C,KAAKd,MAAM;MACT,OAAOE,WAAW,CAACU,UAAU,CAAC;IAEhC;MACE,OAAO,IAAI;EACf;AACF,CAAC;AAED,eAAeT,uBAAuB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-filter-values.js","names":["SEARCH_TERM","TEXT_SEARCH","getFilterValueFromQuery","getFilterValues","filterData","filters","query","filterValues","forEach","filterProps","propsToDisplay","key","type","data","dataNotSet"],"sources":["../../../../src/components/SearchFilter/helpers/get-filter-values.js"],"sourcesContent":["import { SEARCH_TERM, TEXT_SEARCH } from '../constants';\nimport getFilterValueFromQuery from './get-filter-value-from-query';\n\nconst getFilterValues = (filterData, filters, query) => {\n const filterValues = {};\n filterValues[SEARCH_TERM] = query[SEARCH_TERM] || '';\n\n filters.forEach(filterProps => {\n const {\n propsToDisplay: [key],\n type\n } = filterProps;\n if (type === TEXT_SEARCH) return;\n const data = filterData && filterData[key] ? filterData[key] : {};\n filterValues[key] = getFilterValueFromQuery(key, filterProps, data, query);\n });\n filterValues.dataNotSet = !filterData;\n return filterValues;\n};\n\nexport default getFilterValues;\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,WAAW,QAAQ,cAAc;AACvD,OAAOC,uBAAuB,MAAM,+BAA+B;AAEnE,MAAMC,eAAe,GAAGA,CAACC,UAAU,EAAEC,OAAO,EAAEC,KAAK,KAAK;EACtD,MAAMC,YAAY,GAAG,CAAC,CAAC;EACvBA,YAAY,CAACP,WAAW,CAAC,GAAGM,KAAK,CAACN,WAAW,CAAC,IAAI,EAAE;EAEpDK,OAAO,CAACG,OAAO,CAACC,WAAW,IAAI;IAC7B,MAAM;MACJC,cAAc,EAAE,CAACC,GAAG,CAAC;MACrBC;IACF,CAAC,GAAGH,WAAW;IACf,IAAIG,IAAI,KAAKX,WAAW,EAAE;IAC1B,MAAMY,IAAI,GAAGT,UAAU,IAAIA,UAAU,CAACO,GAAG,CAAC,GAAGP,UAAU,CAACO,GAAG,CAAC,GAAG,CAAC,CAAC;IACjEJ,YAAY,CAACI,GAAG,CAAC,GAAGT,uBAAuB,CAACS,GAAG,EAAEF,WAAW,EAAEI,IAAI,EAAEP,KAAK,CAAC;EAC5E,CAAC,CAAC;EACFC,YAAY,CAACO,UAAU,GAAG,CAACV,UAAU;EACrC,OAAOG,YAAY;AACrB,CAAC;AAED,eAAeJ,eAAe"}
|
|
1
|
+
{"version":3,"file":"get-filter-values.js","names":["SEARCH_TERM","TEXT_SEARCH","getFilterValueFromQuery","getFilterValues","filterData","filters","query","filterValues","forEach","filterProps","propsToDisplay","key","type","data","dataNotSet"],"sources":["../../../../src/components/SearchFilter/helpers/get-filter-values.js"],"sourcesContent":["import { SEARCH_TERM, TEXT_SEARCH } from '../constants';\nimport getFilterValueFromQuery from './get-filter-value-from-query';\n\nconst getFilterValues = (filterData, filters, query) => {\n const filterValues = {};\n filterValues[SEARCH_TERM] = query[SEARCH_TERM] || '';\n\n filters.forEach(filterProps => {\n const {\n propsToDisplay: [key],\n type\n } = filterProps;\n if (type === TEXT_SEARCH) return;\n const data = filterData && filterData[key] ? filterData[key] : {};\n filterValues[key] = getFilterValueFromQuery(key, filterProps, data, query);\n });\n filterValues.dataNotSet = !filterData;\n return filterValues;\n};\n\nexport default getFilterValues;\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,WAAW,QAAQ,cAAc;AACvD,OAAOC,uBAAuB,MAAM,+BAA+B;AAEnE,MAAMC,eAAe,GAAGA,CAACC,UAAU,EAAEC,OAAO,EAAEC,KAAK,KAAK;EACtD,MAAMC,YAAY,GAAG,CAAC,CAAC;EACvBA,YAAY,CAACP,WAAW,CAAC,GAAGM,KAAK,CAACN,WAAW,CAAC,IAAI,EAAE;EAEpDK,OAAO,CAACG,OAAO,CAACC,WAAW,IAAI;IAC7B,MAAM;MACJC,cAAc,EAAE,CAACC,GAAG,CAAC;MACrBC;IACF,CAAC,GAAGH,WAAW;IACf,IAAIG,IAAI,KAAKX,WAAW,EAAE;IAC1B,MAAMY,IAAI,GAAGT,UAAU,IAAIA,UAAU,CAACO,GAAG,CAAC,GAAGP,UAAU,CAACO,GAAG,CAAC,GAAG,CAAC,CAAC;IACjEJ,YAAY,CAACI,GAAG,CAAC,GAAGT,uBAAuB,CAACS,GAAG,EAAEF,WAAW,EAAEI,IAAI,EAAEP,KAAK,CAAC;EAC5E,CAAC,CAAC;EACFC,YAAY,CAACO,UAAU,GAAG,CAACV,UAAU;EACrC,OAAOG,YAAY;AACrB,CAAC;AAED,eAAeJ,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-initial-filter-values.js","names":["SEARCH_TERM","TEXT_SEARCH","getFilterValueFromQuery","buildQueryKey","getInitialFilterValues","filterData","filters","query","listComponentName","filterValues","searchQueryKey","forEach","filterProps","propsToDisplay","key","type","data","queryKey"],"sources":["../../../../src/components/SearchFilter/helpers/get-initial-filter-values.js"],"sourcesContent":["import { SEARCH_TERM, TEXT_SEARCH } from '../constants';\nimport getFilterValueFromQuery from './get-filter-value-from-query';\nimport { buildQueryKey } from '../../../helpers';\n\nconst getInitialFilterValues = (filterData, filters, query, listComponentName) => {\n const filterValues = {};\n const searchQueryKey = buildQueryKey(SEARCH_TERM, listComponentName);\n filterValues[SEARCH_TERM] = query[searchQueryKey] || '';\n\n filters.forEach(filterProps => {\n const {\n propsToDisplay: [key],\n type\n } = filterProps;\n if (type === TEXT_SEARCH) return;\n const data = filterData && filterData[key] ? filterData[key] : {};\n const queryKey = buildQueryKey(key, listComponentName);\n filterValues[key] = getFilterValueFromQuery(queryKey, filterProps, data, query);\n });\n\n return filterValues;\n};\n\nexport default getInitialFilterValues;\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,WAAW,QAAQ,cAAc;AACvD,OAAOC,uBAAuB,MAAM,+BAA+B;AACnE,SAASC,aAAa,QAAQ,kBAAkB;AAEhD,MAAMC,sBAAsB,GAAGA,CAACC,UAAU,EAAEC,OAAO,EAAEC,KAAK,EAAEC,iBAAiB,KAAK;EAChF,MAAMC,YAAY,GAAG,CAAC,CAAC;EACvB,MAAMC,cAAc,GAAGP,aAAa,CAACH,WAAW,EAAEQ,iBAAiB,CAAC;EACpEC,YAAY,CAACT,WAAW,CAAC,GAAGO,KAAK,CAACG,cAAc,CAAC,IAAI,EAAE;EAEvDJ,OAAO,CAACK,OAAO,CAACC,WAAW,IAAI;IAC7B,MAAM;MACJC,cAAc,EAAE,CAACC,GAAG,CAAC;MACrBC;IACF,CAAC,GAAGH,WAAW;IACf,IAAIG,IAAI,KAAKd,WAAW,EAAE;IAC1B,MAAMe,IAAI,GAAGX,UAAU,IAAIA,UAAU,CAACS,GAAG,CAAC,GAAGT,UAAU,CAACS,GAAG,CAAC,GAAG,CAAC,CAAC;IACjE,MAAMG,QAAQ,GAAGd,aAAa,CAACW,GAAG,EAAEN,iBAAiB,CAAC;IACtDC,YAAY,CAACK,GAAG,CAAC,GAAGZ,uBAAuB,CAACe,QAAQ,EAAEL,WAAW,EAAEI,IAAI,EAAET,KAAK,CAAC;EACjF,CAAC,CAAC;EAEF,OAAOE,YAAY;AACrB,CAAC;AAED,eAAeL,sBAAsB"}
|
|
1
|
+
{"version":3,"file":"get-initial-filter-values.js","names":["SEARCH_TERM","TEXT_SEARCH","getFilterValueFromQuery","buildQueryKey","getInitialFilterValues","filterData","filters","query","listComponentName","filterValues","searchQueryKey","forEach","filterProps","propsToDisplay","key","type","data","queryKey"],"sources":["../../../../src/components/SearchFilter/helpers/get-initial-filter-values.js"],"sourcesContent":["import { SEARCH_TERM, TEXT_SEARCH } from '../constants';\nimport getFilterValueFromQuery from './get-filter-value-from-query';\nimport { buildQueryKey } from '../../../helpers';\n\nconst getInitialFilterValues = (filterData, filters, query, listComponentName) => {\n const filterValues = {};\n const searchQueryKey = buildQueryKey(SEARCH_TERM, listComponentName);\n filterValues[SEARCH_TERM] = query[searchQueryKey] || '';\n\n filters.forEach(filterProps => {\n const {\n propsToDisplay: [key],\n type\n } = filterProps;\n if (type === TEXT_SEARCH) return;\n const data = filterData && filterData[key] ? filterData[key] : {};\n const queryKey = buildQueryKey(key, listComponentName);\n filterValues[key] = getFilterValueFromQuery(queryKey, filterProps, data, query);\n });\n\n return filterValues;\n};\n\nexport default getInitialFilterValues;\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,WAAW,QAAQ,cAAc;AACvD,OAAOC,uBAAuB,MAAM,+BAA+B;AACnE,SAASC,aAAa,QAAQ,kBAAkB;AAEhD,MAAMC,sBAAsB,GAAGA,CAACC,UAAU,EAAEC,OAAO,EAAEC,KAAK,EAAEC,iBAAiB,KAAK;EAChF,MAAMC,YAAY,GAAG,CAAC,CAAC;EACvB,MAAMC,cAAc,GAAGP,aAAa,CAACH,WAAW,EAAEQ,iBAAiB,CAAC;EACpEC,YAAY,CAACT,WAAW,CAAC,GAAGO,KAAK,CAACG,cAAc,CAAC,IAAI,EAAE;EAEvDJ,OAAO,CAACK,OAAO,CAACC,WAAW,IAAI;IAC7B,MAAM;MACJC,cAAc,EAAE,CAACC,GAAG,CAAC;MACrBC;IACF,CAAC,GAAGH,WAAW;IACf,IAAIG,IAAI,KAAKd,WAAW,EAAE;IAC1B,MAAMe,IAAI,GAAGX,UAAU,IAAIA,UAAU,CAACS,GAAG,CAAC,GAAGT,UAAU,CAACS,GAAG,CAAC,GAAG,CAAC,CAAC;IACjE,MAAMG,QAAQ,GAAGd,aAAa,CAACW,GAAG,EAAEN,iBAAiB,CAAC;IACtDC,YAAY,CAACK,GAAG,CAAC,GAAGZ,uBAAuB,CAACe,QAAQ,EAAEL,WAAW,EAAEI,IAAI,EAAET,KAAK,CAAC;EACjF,CAAC,CAAC;EAEF,OAAOE,YAAY;AACrB,CAAC;AAED,eAAeL,sBAAsB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-intersected-prop.js","names":["intersection","getIntersectedProp","rangeQueryValues","propsToDisplay","Object","keys"],"sources":["../../../../src/components/SearchFilter/helpers/get-intersected-prop.js"],"sourcesContent":["import intersection from 'lodash.intersection';\n\nconst getIntersectedProp = (rangeQueryValues, propsToDisplay) =>\n intersection(Object.keys(rangeQueryValues), propsToDisplay)[0];\n\nexport default getIntersectedProp;\n"],"mappings":"AAAA,OAAOA,YAAY,MAAM,qBAAqB;AAE9C,MAAMC,kBAAkB,GAAGA,CAACC,gBAAgB,EAAEC,cAAc,KAC1DH,YAAY,CAACI,MAAM,CAACC,IAAI,CAACH,gBAAgB,CAAC,EAAEC,cAAc,CAAC,CAAC,CAAC,CAAC;AAEhE,eAAeF,kBAAkB"}
|
|
1
|
+
{"version":3,"file":"get-intersected-prop.js","names":["intersection","getIntersectedProp","rangeQueryValues","propsToDisplay","Object","keys"],"sources":["../../../../src/components/SearchFilter/helpers/get-intersected-prop.js"],"sourcesContent":["import intersection from 'lodash.intersection';\n\nconst getIntersectedProp = (rangeQueryValues, propsToDisplay) =>\n intersection(Object.keys(rangeQueryValues), propsToDisplay)[0];\n\nexport default getIntersectedProp;\n"],"mappings":"AAAA,OAAOA,YAAY,MAAM,qBAAqB;AAE9C,MAAMC,kBAAkB,GAAGA,CAACC,gBAAgB,EAAEC,cAAc,KAC1DH,YAAY,CAACI,MAAM,CAACC,IAAI,CAACH,gBAAgB,CAAC,EAAEC,cAAc,CAAC,CAAC,CAAC,CAAC;AAEhE,eAAeF,kBAAkB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-range-value.js","names":["calculateMinMax","getRangeValue","rawQueryProp","rangeInterval","_min","_max","min","max","defaultValues","step","maxValue","minValue","queryParamMin","queryParamMax","Array","isArray","split","updatedMinValue","Number","updatedMaxValue","isNaN"],"sources":["../../../../src/components/SearchFilter/helpers/get-range-value.js"],"sourcesContent":["import calculateMinMax from './calculate-min-max';\n\nconst getRangeValue = (rawQueryProp, rangeInterval, _min, _max) => {\n const { min, max } = calculateMinMax({ min: _min, max: _max }, rangeInterval);\n const defaultValues = {\n max,\n min,\n step: rangeInterval,\n maxValue: max,\n minValue: min\n };\n if (rawQueryProp) {\n const [queryParamMin, queryParamMax] = Array.isArray(rawQueryProp)\n ? rawQueryProp[0].split('-')\n : rawQueryProp.split('-');\n const updatedMinValue = Number(queryParamMin);\n const updatedMaxValue = Number(queryParamMax);\n\n if (Number.isNaN(updatedMinValue) || Number.isNaN(updatedMaxValue)) return defaultValues;\n\n return {\n min: Number.isNaN(min) ? updatedMinValue : min,\n max: Number.isNaN(max) ? updatedMaxValue : max,\n step: rangeInterval,\n maxValue: updatedMaxValue,\n minValue: updatedMinValue\n };\n }\n\n return defaultValues;\n};\n\nexport default getRangeValue;\n"],"mappings":"AAAA,OAAOA,eAAe,MAAM,qBAAqB;AAEjD,MAAMC,aAAa,GAAGA,CAACC,YAAY,EAAEC,aAAa,EAAEC,IAAI,EAAEC,IAAI,KAAK;EACjE,MAAM;IAAEC,GAAG;IAAEC;EAAI,CAAC,GAAGP,eAAe,CAAC;IAAEM,GAAG,EAAEF,IAAI;IAAEG,GAAG,EAAEF;EAAK,CAAC,EAAEF,aAAa,CAAC;EAC7E,MAAMK,aAAa,GAAG;IACpBD,GAAG;IACHD,GAAG;IACHG,IAAI,EAAEN,aAAa;IACnBO,QAAQ,EAAEH,GAAG;IACbI,QAAQ,EAAEL;EACZ,CAAC;EACD,IAAIJ,YAAY,EAAE;IAChB,MAAM,CAACU,aAAa,EAAEC,aAAa,CAAC,GAAGC,KAAK,CAACC,OAAO,CAACb,YAAY,CAAC,GAC9DA,YAAY,CAAC,CAAC,CAAC,CAACc,KAAK,CAAC,GAAG,CAAC,GAC1Bd,YAAY,CAACc,KAAK,CAAC,GAAG,CAAC;IAC3B,MAAMC,eAAe,GAAGC,MAAM,CAACN,aAAa,CAAC;IAC7C,MAAMO,eAAe,GAAGD,MAAM,CAACL,aAAa,CAAC;IAE7C,IAAIK,MAAM,CAACE,KAAK,CAACH,eAAe,CAAC,IAAIC,MAAM,CAACE,KAAK,CAACD,eAAe,CAAC,EAAE,OAAOX,aAAa;IAExF,OAAO;MACLF,GAAG,EAAEY,MAAM,CAACE,KAAK,CAACd,GAAG,CAAC,GAAGW,eAAe,GAAGX,GAAG;MAC9CC,GAAG,EAAEW,MAAM,CAACE,KAAK,CAACb,GAAG,CAAC,GAAGY,eAAe,GAAGZ,GAAG;MAC9CE,IAAI,EAAEN,aAAa;MACnBO,QAAQ,EAAES,eAAe;MACzBR,QAAQ,EAAEM;IACZ,CAAC;EACH;EAEA,OAAOT,aAAa;AACtB,CAAC;AAED,eAAeP,aAAa"}
|
|
1
|
+
{"version":3,"file":"get-range-value.js","names":["calculateMinMax","getRangeValue","rawQueryProp","rangeInterval","_min","_max","min","max","defaultValues","step","maxValue","minValue","queryParamMin","queryParamMax","Array","isArray","split","updatedMinValue","Number","updatedMaxValue","isNaN"],"sources":["../../../../src/components/SearchFilter/helpers/get-range-value.js"],"sourcesContent":["import calculateMinMax from './calculate-min-max';\n\nconst getRangeValue = (rawQueryProp, rangeInterval, _min, _max) => {\n const { min, max } = calculateMinMax({ min: _min, max: _max }, rangeInterval);\n const defaultValues = {\n max,\n min,\n step: rangeInterval,\n maxValue: max,\n minValue: min\n };\n if (rawQueryProp) {\n const [queryParamMin, queryParamMax] = Array.isArray(rawQueryProp)\n ? rawQueryProp[0].split('-')\n : rawQueryProp.split('-');\n const updatedMinValue = Number(queryParamMin);\n const updatedMaxValue = Number(queryParamMax);\n\n if (Number.isNaN(updatedMinValue) || Number.isNaN(updatedMaxValue)) return defaultValues;\n\n return {\n min: Number.isNaN(min) ? updatedMinValue : min,\n max: Number.isNaN(max) ? updatedMaxValue : max,\n step: rangeInterval,\n maxValue: updatedMaxValue,\n minValue: updatedMinValue\n };\n }\n\n return defaultValues;\n};\n\nexport default getRangeValue;\n"],"mappings":"AAAA,OAAOA,eAAe,MAAM,qBAAqB;AAEjD,MAAMC,aAAa,GAAGA,CAACC,YAAY,EAAEC,aAAa,EAAEC,IAAI,EAAEC,IAAI,KAAK;EACjE,MAAM;IAAEC,GAAG;IAAEC;EAAI,CAAC,GAAGP,eAAe,CAAC;IAAEM,GAAG,EAAEF,IAAI;IAAEG,GAAG,EAAEF;EAAK,CAAC,EAAEF,aAAa,CAAC;EAC7E,MAAMK,aAAa,GAAG;IACpBD,GAAG;IACHD,GAAG;IACHG,IAAI,EAAEN,aAAa;IACnBO,QAAQ,EAAEH,GAAG;IACbI,QAAQ,EAAEL;EACZ,CAAC;EACD,IAAIJ,YAAY,EAAE;IAChB,MAAM,CAACU,aAAa,EAAEC,aAAa,CAAC,GAAGC,KAAK,CAACC,OAAO,CAACb,YAAY,CAAC,GAC9DA,YAAY,CAAC,CAAC,CAAC,CAACc,KAAK,CAAC,GAAG,CAAC,GAC1Bd,YAAY,CAACc,KAAK,CAAC,GAAG,CAAC;IAC3B,MAAMC,eAAe,GAAGC,MAAM,CAACN,aAAa,CAAC;IAC7C,MAAMO,eAAe,GAAGD,MAAM,CAACL,aAAa,CAAC;IAE7C,IAAIK,MAAM,CAACE,KAAK,CAACH,eAAe,CAAC,IAAIC,MAAM,CAACE,KAAK,CAACD,eAAe,CAAC,EAAE,OAAOX,aAAa;IAExF,OAAO;MACLF,GAAG,EAAEY,MAAM,CAACE,KAAK,CAACd,GAAG,CAAC,GAAGW,eAAe,GAAGX,GAAG;MAC9CC,GAAG,EAAEW,MAAM,CAACE,KAAK,CAACb,GAAG,CAAC,GAAGY,eAAe,GAAGZ,GAAG;MAC9CE,IAAI,EAAEN,aAAa;MACnBO,QAAQ,EAAES,eAAe;MACzBR,QAAQ,EAAEM;IACZ,CAAC;EACH;EAEA,OAAOT,aAAa;AACtB,CAAC;AAED,eAAeP,aAAa","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-responsive-filter-classnames.js","names":["classnames","MORE_FILTERS_CLASSES","getResponsiveFilterClassnames","moreFiltersDesktopCollapsed","moreFiltersMobileCollapsed","moreFiltersMobileWrapperClass","MOBILE_WRAPPER","moreFiltersMobileTogglerClass","MOBILE_TOGGLER","moreFiltersDesktopWrapperClass","DESKTOP_WRAPPER","moreFiltersDesktopTogglerClass","DESKTOP_TOGGLER"],"sources":["../../../../src/components/SearchFilter/helpers/get-responsive-filter-classnames.js"],"sourcesContent":["import classnames from 'classnames';\nimport { MORE_FILTERS_CLASSES } from '../constants';\n\nconst getResponsiveFilterClassnames = (\n moreFiltersDesktopCollapsed,\n moreFiltersMobileCollapsed\n) => ({\n moreFiltersMobileWrapperClass: classnames(MORE_FILTERS_CLASSES.MOBILE_WRAPPER, {\n [`${MORE_FILTERS_CLASSES.MOBILE_WRAPPER}--open`]: !moreFiltersMobileCollapsed\n }),\n moreFiltersMobileTogglerClass: classnames(MORE_FILTERS_CLASSES.MOBILE_TOGGLER, {\n [`${MORE_FILTERS_CLASSES.MOBILE_TOGGLER}--open`]: !moreFiltersMobileCollapsed\n }),\n moreFiltersDesktopWrapperClass: classnames(MORE_FILTERS_CLASSES.DESKTOP_WRAPPER, {\n [`${MORE_FILTERS_CLASSES.DESKTOP_WRAPPER}--open`]: !moreFiltersDesktopCollapsed\n }),\n moreFiltersDesktopTogglerClass: classnames(MORE_FILTERS_CLASSES.DESKTOP_TOGGLER, {\n [`${MORE_FILTERS_CLASSES.DESKTOP_TOGGLER}--open`]: !moreFiltersDesktopCollapsed\n })\n});\n\nexport default getResponsiveFilterClassnames;\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,YAAY;AACnC,SAASC,oBAAoB,QAAQ,cAAc;AAEnD,MAAMC,6BAA6B,GAAGA,CACpCC,2BAA2B,EAC3BC,0BAA0B,MACtB;EACJC,6BAA6B,EAAEL,UAAU,CAACC,oBAAoB,CAACK,cAAc,EAAE;IAC7E,
|
|
1
|
+
{"version":3,"file":"get-responsive-filter-classnames.js","names":["classnames","MORE_FILTERS_CLASSES","getResponsiveFilterClassnames","moreFiltersDesktopCollapsed","moreFiltersMobileCollapsed","moreFiltersMobileWrapperClass","MOBILE_WRAPPER","moreFiltersMobileTogglerClass","MOBILE_TOGGLER","moreFiltersDesktopWrapperClass","DESKTOP_WRAPPER","moreFiltersDesktopTogglerClass","DESKTOP_TOGGLER"],"sources":["../../../../src/components/SearchFilter/helpers/get-responsive-filter-classnames.js"],"sourcesContent":["import classnames from 'classnames';\nimport { MORE_FILTERS_CLASSES } from '../constants';\n\nconst getResponsiveFilterClassnames = (\n moreFiltersDesktopCollapsed,\n moreFiltersMobileCollapsed\n) => ({\n moreFiltersMobileWrapperClass: classnames(MORE_FILTERS_CLASSES.MOBILE_WRAPPER, {\n [`${MORE_FILTERS_CLASSES.MOBILE_WRAPPER}--open`]: !moreFiltersMobileCollapsed\n }),\n moreFiltersMobileTogglerClass: classnames(MORE_FILTERS_CLASSES.MOBILE_TOGGLER, {\n [`${MORE_FILTERS_CLASSES.MOBILE_TOGGLER}--open`]: !moreFiltersMobileCollapsed\n }),\n moreFiltersDesktopWrapperClass: classnames(MORE_FILTERS_CLASSES.DESKTOP_WRAPPER, {\n [`${MORE_FILTERS_CLASSES.DESKTOP_WRAPPER}--open`]: !moreFiltersDesktopCollapsed\n }),\n moreFiltersDesktopTogglerClass: classnames(MORE_FILTERS_CLASSES.DESKTOP_TOGGLER, {\n [`${MORE_FILTERS_CLASSES.DESKTOP_TOGGLER}--open`]: !moreFiltersDesktopCollapsed\n })\n});\n\nexport default getResponsiveFilterClassnames;\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,YAAY;AACnC,SAASC,oBAAoB,QAAQ,cAAc;AAEnD,MAAMC,6BAA6B,GAAGA,CACpCC,2BAA2B,EAC3BC,0BAA0B,MACtB;EACJC,6BAA6B,EAAEL,UAAU,CAACC,oBAAoB,CAACK,cAAc,EAAE;IAC7E,CAAC,GAAGL,oBAAoB,CAACK,cAAc,QAAQ,GAAG,CAACF;EACrD,CAAC,CAAC;EACFG,6BAA6B,EAAEP,UAAU,CAACC,oBAAoB,CAACO,cAAc,EAAE;IAC7E,CAAC,GAAGP,oBAAoB,CAACO,cAAc,QAAQ,GAAG,CAACJ;EACrD,CAAC,CAAC;EACFK,8BAA8B,EAAET,UAAU,CAACC,oBAAoB,CAACS,eAAe,EAAE;IAC/E,CAAC,GAAGT,oBAAoB,CAACS,eAAe,QAAQ,GAAG,CAACP;EACtD,CAAC,CAAC;EACFQ,8BAA8B,EAAEX,UAAU,CAACC,oBAAoB,CAACW,eAAe,EAAE;IAC/E,CAAC,GAAGX,oBAAoB,CAACW,eAAe,QAAQ,GAAG,CAACT;EACtD,CAAC;AACH,CAAC,CAAC;AAEF,eAAeD,6BAA6B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-select-options.js","names":["getDisplayValue","getSelectOptions","entitySchema","propsToDisplay","length","properties","dynamicProperties","map","propToDisplay","displayValue"],"sources":["../../../../src/components/SearchFilter/helpers/get-select-options.js"],"sourcesContent":["import getDisplayValue from './get-display-value';\n\nconst getSelectOptions = (entitySchema, propsToDisplay) => {\n if (!propsToDisplay || !propsToDisplay.length) return [];\n\n const { properties = {}, dynamicProperties = {} } = entitySchema;\n\n return propsToDisplay.map(propToDisplay => {\n const displayValue =\n getDisplayValue(propToDisplay, properties) ||\n getDisplayValue(propToDisplay, dynamicProperties) ||\n propToDisplay;\n\n return [propToDisplay, displayValue];\n });\n};\n\nexport default getSelectOptions;\n"],"mappings":"AAAA,OAAOA,eAAe,MAAM,qBAAqB;AAEjD,MAAMC,gBAAgB,GAAGA,CAACC,YAAY,EAAEC,cAAc,KAAK;EACzD,IAAI,CAACA,cAAc,IAAI,CAACA,cAAc,CAACC,MAAM,EAAE,OAAO,EAAE;EAExD,MAAM;IAAEC,UAAU,GAAG,CAAC,CAAC;IAAEC,iBAAiB,GAAG,CAAC;EAAE,CAAC,GAAGJ,YAAY;EAEhE,OAAOC,cAAc,CAACI,GAAG,CAACC,aAAa,IAAI;IACzC,MAAMC,YAAY,GAChBT,eAAe,CAACQ,aAAa,EAAEH,UAAU,CAAC,IAC1CL,eAAe,CAACQ,aAAa,EAAEF,iBAAiB,CAAC,IACjDE,aAAa;IAEf,OAAO,CAACA,aAAa,EAAEC,YAAY,CAAC;EACtC,CAAC,CAAC;AACJ,CAAC;AAED,eAAeR,gBAAgB"}
|
|
1
|
+
{"version":3,"file":"get-select-options.js","names":["getDisplayValue","getSelectOptions","entitySchema","propsToDisplay","length","properties","dynamicProperties","map","propToDisplay","displayValue"],"sources":["../../../../src/components/SearchFilter/helpers/get-select-options.js"],"sourcesContent":["import getDisplayValue from './get-display-value';\n\nconst getSelectOptions = (entitySchema, propsToDisplay) => {\n if (!propsToDisplay || !propsToDisplay.length) return [];\n\n const { properties = {}, dynamicProperties = {} } = entitySchema;\n\n return propsToDisplay.map(propToDisplay => {\n const displayValue =\n getDisplayValue(propToDisplay, properties) ||\n getDisplayValue(propToDisplay, dynamicProperties) ||\n propToDisplay;\n\n return [propToDisplay, displayValue];\n });\n};\n\nexport default getSelectOptions;\n"],"mappings":"AAAA,OAAOA,eAAe,MAAM,qBAAqB;AAEjD,MAAMC,gBAAgB,GAAGA,CAACC,YAAY,EAAEC,cAAc,KAAK;EACzD,IAAI,CAACA,cAAc,IAAI,CAACA,cAAc,CAACC,MAAM,EAAE,OAAO,EAAE;EAExD,MAAM;IAAEC,UAAU,GAAG,CAAC,CAAC;IAAEC,iBAAiB,GAAG,CAAC;EAAE,CAAC,GAAGJ,YAAY;EAEhE,OAAOC,cAAc,CAACI,GAAG,CAACC,aAAa,IAAI;IACzC,MAAMC,YAAY,GAChBT,eAAe,CAACQ,aAAa,EAAEH,UAAU,CAAC,IAC1CL,eAAe,CAACQ,aAAa,EAAEF,iBAAiB,CAAC,IACjDE,aAAa;IAEf,OAAO,CAACA,aAAa,EAAEC,YAAY,CAAC;EACtC,CAAC,CAAC;AACJ,CAAC;AAED,eAAeR,gBAAgB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-updated-filter-by.js","names":["getUpdatedFilterBy","filterBy","filterByProperty","parentData","length","updatedFilterBy","updatedFilterByProperty","forEach","property","key","split","filterData","Array","isArray","dat","push"],"sources":["../../../../src/components/SearchFilter/helpers/get-updated-filter-by.js"],"sourcesContent":["const getUpdatedFilterBy = (filterBy, filterByProperty, parentData) => {\n if (!parentData || (filterBy && filterBy.length))\n return { updatedFilterBy: filterBy, updatedFilterByProperty: filterByProperty };\n\n const updatedFilterBy = [];\n filterByProperty.forEach(property => {\n const [key] = property.split('/');\n const filterData = parentData[key];\n\n if (!filterData) return;\n if (Array.isArray(filterData)) filterData.forEach(dat => updatedFilterBy.push(`${key}/${dat}`));\n else updatedFilterBy.push(`${key}/${filterData}`);\n });\n\n return { updatedFilterBy, updatedFilterByProperty: filterByProperty };\n};\n\nexport default getUpdatedFilterBy;\n"],"mappings":"AAAA,MAAMA,kBAAkB,GAAGA,CAACC,QAAQ,EAAEC,gBAAgB,EAAEC,UAAU,KAAK;EACrE,IAAI,CAACA,UAAU,IAAKF,QAAQ,IAAIA,QAAQ,CAACG,MAAO,EAC9C,OAAO;IAAEC,eAAe,EAAEJ,QAAQ;IAAEK,uBAAuB,EAAEJ;EAAiB,CAAC;EAEjF,MAAMG,eAAe,GAAG,EAAE;EAC1BH,gBAAgB,CAACK,OAAO,CAACC,QAAQ,IAAI;IACnC,MAAM,CAACC,GAAG,CAAC,GAAGD,QAAQ,CAACE,KAAK,CAAC,GAAG,CAAC;IACjC,MAAMC,UAAU,GAAGR,UAAU,CAACM,GAAG,CAAC;IAElC,IAAI,CAACE,UAAU,EAAE;IACjB,IAAIC,KAAK,CAACC,OAAO,CAACF,UAAU,CAAC,EAAEA,UAAU,CAACJ,OAAO,CAACO,GAAG,IAAIT,eAAe,CAACU,IAAI,
|
|
1
|
+
{"version":3,"file":"get-updated-filter-by.js","names":["getUpdatedFilterBy","filterBy","filterByProperty","parentData","length","updatedFilterBy","updatedFilterByProperty","forEach","property","key","split","filterData","Array","isArray","dat","push"],"sources":["../../../../src/components/SearchFilter/helpers/get-updated-filter-by.js"],"sourcesContent":["const getUpdatedFilterBy = (filterBy, filterByProperty, parentData) => {\n if (!parentData || (filterBy && filterBy.length))\n return { updatedFilterBy: filterBy, updatedFilterByProperty: filterByProperty };\n\n const updatedFilterBy = [];\n filterByProperty.forEach(property => {\n const [key] = property.split('/');\n const filterData = parentData[key];\n\n if (!filterData) return;\n if (Array.isArray(filterData)) filterData.forEach(dat => updatedFilterBy.push(`${key}/${dat}`));\n else updatedFilterBy.push(`${key}/${filterData}`);\n });\n\n return { updatedFilterBy, updatedFilterByProperty: filterByProperty };\n};\n\nexport default getUpdatedFilterBy;\n"],"mappings":"AAAA,MAAMA,kBAAkB,GAAGA,CAACC,QAAQ,EAAEC,gBAAgB,EAAEC,UAAU,KAAK;EACrE,IAAI,CAACA,UAAU,IAAKF,QAAQ,IAAIA,QAAQ,CAACG,MAAO,EAC9C,OAAO;IAAEC,eAAe,EAAEJ,QAAQ;IAAEK,uBAAuB,EAAEJ;EAAiB,CAAC;EAEjF,MAAMG,eAAe,GAAG,EAAE;EAC1BH,gBAAgB,CAACK,OAAO,CAACC,QAAQ,IAAI;IACnC,MAAM,CAACC,GAAG,CAAC,GAAGD,QAAQ,CAACE,KAAK,CAAC,GAAG,CAAC;IACjC,MAAMC,UAAU,GAAGR,UAAU,CAACM,GAAG,CAAC;IAElC,IAAI,CAACE,UAAU,EAAE;IACjB,IAAIC,KAAK,CAACC,OAAO,CAACF,UAAU,CAAC,EAAEA,UAAU,CAACJ,OAAO,CAACO,GAAG,IAAIT,eAAe,CAACU,IAAI,CAAC,GAAGN,GAAG,IAAIK,GAAG,EAAE,CAAC,CAAC,CAAC,KAC3FT,eAAe,CAACU,IAAI,CAAC,GAAGN,GAAG,IAAIE,UAAU,EAAE,CAAC;EACnD,CAAC,CAAC;EAEF,OAAO;IAAEN,eAAe;IAAEC,uBAAuB,EAAEJ;EAAiB,CAAC;AACvE,CAAC;AAED,eAAeF,kBAAkB","ignoreList":[]}
|