@blaze-cms/react-page-builder 0.146.0-core-styles.44 → 0.146.0-node18.1
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 +33 -219
- package/lib/BannerContext/index.js +1 -1
- package/lib/BannerContext/index.js.map +1 -1
- package/lib/HOC/recreateOnNavigation.js.map +1 -1
- package/lib/HOC/withInfiniteScroll.js +2 -2
- package/lib/HOC/withInfiniteScroll.js.map +1 -1
- package/lib/HOC/withTitle.js +1 -1
- package/lib/HOC/withTitle.js.map +1 -1
- package/lib/application/query/index.js +1 -0
- package/lib/application/query/index.js.map +1 -1
- package/lib/components/BackToTop/BackToTop.js +1 -1
- package/lib/components/BackToTop/BackToTop.js.map +1 -1
- package/lib/components/Banner/AdSlotRender.js +2 -2
- package/lib/components/Banner/AdSlotRender.js.map +1 -1
- package/lib/components/Banner/Banner.js +2 -2
- package/lib/components/Banner/Banner.js.map +1 -1
- package/lib/components/Banner/BannerRender.js.map +1 -1
- package/lib/components/Banner/helpers.js +3 -3
- package/lib/components/Banner/helpers.js.map +1 -1
- package/lib/components/Banner/index.js +2 -2
- package/lib/components/Banner/index.js.map +1 -1
- package/lib/components/BlazeLink.js +1 -1
- package/lib/components/BlazeLink.js.map +1 -1
- package/lib/components/Breadcrumb/Breadcrumb.js +2 -2
- package/lib/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/lib/components/Button.js +1 -1
- package/lib/components/Button.js.map +1 -1
- package/lib/components/Card/Card.js +1 -1
- package/lib/components/Card/Card.js.map +1 -1
- package/lib/components/Card/CardsContainer.js +2 -2
- package/lib/components/Card/CardsContainer.js.map +1 -1
- package/lib/components/Card/CardsFactory.js.map +1 -1
- package/lib/components/Card/CardsRender.js +1 -1
- package/lib/components/Card/CardsRender.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/CarouselWrapper/DefaultCarousel.js +1 -1
- package/lib/components/CarouselWrapper/DefaultCarousel.js.map +1 -1
- package/lib/components/ClickWrapper.js +1 -1
- package/lib/components/ClickWrapper.js.map +1 -1
- package/lib/components/Code/Code.js +1 -1
- package/lib/components/Code/Code.js.map +1 -1
- package/lib/components/Code/ScriptTag.js +1 -1
- package/lib/components/Code/ScriptTag.js.map +1 -1
- package/lib/components/ContentGroup/ContentGroupTabs.js +2 -2
- package/lib/components/ContentGroup/ContentGroupTabs.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/DataSummary/DataSummaryFactory.js +1 -1
- 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/HeadingLargeSummaryContent.js +2 -2
- package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js +2 -2
- package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js +2 -2
- package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js +2 -2
- package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js +2 -2
- package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/index.js +6 -6
- package/lib/components/DataSummary/DataSummaryTypes/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/EmailConfirm/EmailConfirm.js +4 -4
- package/lib/components/EmailConfirm/EmailConfirm.js.map +1 -1
- package/lib/components/Image/GlobalLightbox/GlobalLightbox.js +3 -3
- package/lib/components/Image/GlobalLightbox/GlobalLightbox.js.map +1 -1
- package/lib/components/Image/GlobalLightbox/index.js +2 -2
- package/lib/components/Image/GlobalLightbox/index.js.map +1 -1
- package/lib/components/Image/Image.js +1 -1
- package/lib/components/Image/Image.js.map +1 -1
- package/lib/components/Image/ImageFactory.js +2 -2
- package/lib/components/Image/ImageFactory.js.map +1 -1
- package/lib/components/Image/Lightbox/Lightbox.js +1 -1
- package/lib/components/Image/Lightbox/Lightbox.js.map +1 -1
- package/lib/components/ItemList/ItemListButton/ItemListButton.js +1 -1
- package/lib/components/ItemList/ItemListButton/ItemListButton.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/set-param-and-redirect.js +1 -0
- package/lib/components/ItemList/helpers/set-param-and-redirect.js.map +1 -1
- package/lib/components/ItemList/hooks/use-item-list-id.js.map +1 -1
- package/lib/components/Layout/LayoutFactory.js +2 -2
- package/lib/components/Layout/LayoutFactory.js.map +1 -1
- package/lib/components/Layout/LayoutWithStickyTimer.js +1 -1
- package/lib/components/Layout/LayoutWithStickyTimer.js.map +1 -1
- package/lib/components/LazyImage/index.js +2 -2
- package/lib/components/LazyImage/index.js.map +1 -1
- package/lib/components/List/ListFactory.js +1 -1
- package/lib/components/List/ListFactory.js.map +1 -1
- package/lib/components/List/ListRender.js.map +1 -1
- package/lib/components/List/components/Cards/CardsRender.js +1 -1
- package/lib/components/List/components/Cards/CardsRender.js.map +1 -1
- package/lib/components/List/components/Cards/CardsRenderWrapper.js +2 -2
- package/lib/components/List/components/Cards/CardsRenderWrapper.js.map +1 -1
- package/lib/components/List/components/Full/FullRender.js +2 -2
- package/lib/components/List/components/Full/FullRender.js.map +1 -1
- package/lib/components/List/components/Full/FullRenderItem.js +2 -2
- package/lib/components/List/components/Full/FullRenderItem.js.map +1 -1
- package/lib/components/List/components/Header/ListHeader.js +1 -0
- package/lib/components/List/components/Header/ListHeader.js.map +1 -1
- package/lib/components/List/components/Pagination/ListPagination.js +1 -1
- 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/helpers/check-if-should-render-banner.js +0 -1
- 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 +0 -1
- package/lib/components/List/components/helpers/check-if-should-render-gtm.js.map +1 -1
- package/lib/components/List/helpers/build-query-booster.js +2 -1
- package/lib/components/List/helpers/build-query-booster.js.map +1 -1
- package/lib/components/List/helpers/sort-aggs.js.map +1 -1
- package/lib/components/Menu/Menu.js +2 -5
- 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/MenuItem/MenuItemRender.js +10 -24
- 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/Modal/Modal.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 +2 -2
- package/lib/components/ModalAdapter/index.js.map +1 -1
- package/lib/components/SearchContent/SearchContent.js +1 -1
- 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/SearchFilter/SearchFilter/FiltersList.js +2 -2
- package/lib/components/SearchFilter/SearchFilter/FiltersList.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/SearchFilter.js +1 -1
- package/lib/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilterContainer.js +1 -2
- package/lib/components/SearchFilter/SearchFilterContainer.js.map +1 -1
- package/lib/components/SearchFilter/components/Checkbox.js +1 -1
- package/lib/components/SearchFilter/components/Checkbox.js.map +1 -1
- package/lib/components/SearchFilter/components/Range.js.map +1 -1
- package/lib/components/SearchFilter/components/Select.js.map +1 -1
- package/lib/components/SearchFilter/components/TextSearch.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-select-options.js +1 -0
- package/lib/components/SearchFilter/helpers/get-select-options.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/SearchFilterSort/SearchFilterSort.js +1 -0
- package/lib/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
- package/lib/components/SocialFollow/SocialFollowRender.js +1 -0
- package/lib/components/SocialFollow/SocialFollowRender.js.map +1 -1
- package/lib/components/Video/VideoModal.js +1 -1
- package/lib/components/Video/VideoModal.js.map +1 -1
- package/lib/components/Video/VideoRender.js +1 -1
- package/lib/components/Video/VideoRender.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 +1 -1
- package/lib/components/Video/providers/JWPlayer/JWPlayerProvider.js.map +1 -1
- package/lib/components/Video/providers/Vimeo/VimeoProvider.js +2 -2
- package/lib/components/Video/providers/Vimeo/VimeoProvider.js.map +1 -1
- package/lib/components/Video/providers/YouTube/YoutubeEmbeded.js +1 -1
- package/lib/components/Video/providers/YouTube/YoutubeEmbeded.js.map +1 -1
- package/lib/components/Video/providers/get-provider.js +6 -6
- package/lib/components/Video/providers/get-provider.js.map +1 -1
- package/lib/components/Wrapper.js +2 -2
- package/lib/components/Wrapper.js.map +1 -1
- package/lib/components/index.js +31 -31
- package/lib/components/index.js.map +1 -1
- package/lib/constants/index.js.map +1 -1
- package/lib/helpers/build-query-fields.js +1 -0
- package/lib/helpers/build-query-fields.js.map +1 -1
- package/lib/helpers/build-raw-query-stringified.js +1 -0
- package/lib/helpers/build-raw-query-stringified.js.map +1 -1
- package/lib/helpers/build-search-values-checkbox-select.js +1 -1
- package/lib/helpers/build-search-values-checkbox-select.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/get-current-offset.js +4 -5
- package/lib/helpers/get-current-offset.js.map +1 -1
- package/lib/helpers/get-entities-with-banner.js +1 -1
- package/lib/helpers/get-generic-render-variables.js +1 -0
- package/lib/helpers/get-generic-render-variables.js.map +1 -1
- package/lib/helpers/get-wrapped-value-with-link.js +1 -0
- package/lib/helpers/get-wrapped-value-with-link.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-nodes/get-banners-for-nodes.js +1 -1
- package/lib/helpers/parse-TextBlock.js +1 -1
- package/lib/helpers/parse-TextBlock.js.map +1 -1
- package/lib/helpers/parse-props-to-display.js +1 -1
- package/lib/helpers/parse-props-to-display.js.map +1 -1
- package/lib/helpers/process-data-summary-value.js +2 -3
- package/lib/helpers/process-data-summary-value.js.map +1 -1
- package/lib/helpers/remove-unwanted-characters.js +1 -1
- package/lib/helpers/remove-unwanted-characters.js.map +1 -1
- package/lib/helpers/render-children.js +3 -3
- package/lib/helpers/render-children.js.map +1 -1
- package/lib/hooks/helpers/StoreImages.js +1 -2
- package/lib/hooks/helpers/StoreImages.js.map +1 -1
- package/lib/hooks/helpers/buildPBComponents.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 +7 -7
- package/lib/hooks/helpers/get-lightbox-images.js.map +1 -1
- package/lib/hooks/helpers/inject-textblock-banners.js +1 -1
- package/lib/hooks/helpers/inject-textblock-banners.js.map +1 -1
- package/lib/hooks/use-check-mobile-screen.js.map +1 -1
- package/lib/hooks/use-get-entity-schema.js.map +1 -1
- package/lib/hooks/use-get-image-id-from-relation.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 +1 -1
- package/lib/hooks/use-portal.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/variants/FloatingSideButton/index.js.map +1 -1
- package/lib/variants/HeroImage/index.js.map +1 -1
- package/lib/variants/Infographic/index.js +2 -2
- package/lib/variants/Infographic/index.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/index.js +2 -2
- package/lib/variants/LongformGallery/index.js.map +1 -1
- package/lib/variants/LongformRow/index.js.map +1 -1
- package/lib/variants/ParallaxImageTextRight/index.js.map +1 -1
- package/lib/variants/SlideSummary/index.js +2 -2
- 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/index.js +2 -2
- package/lib/variants/ThumbnailCarousel/index.js.map +1 -1
- package/lib-es/HOC/recreateOnNavigation.js.map +1 -1
- package/lib-es/HOC/withTitle.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/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/Breadcrumb/Breadcrumb.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/CardsFactory.js.map +1 -1
- package/lib-es/components/Card/CardsRender.js.map +1 -1
- package/lib-es/components/Card/helpers/get-dynamic-grid-classes.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/ContentGroup/ContentGroupTabs.js.map +1 -1
- package/lib-es/components/ContentGroup/helpers/get-active-tab.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummary.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.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/get-link-based-on-value.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/DateTime/DateTime.js +4 -4
- package/lib-es/components/DateTime/DateTime.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/mutation.js.map +1 -1
- package/lib-es/components/Iframe/Iframe.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/ImageFactory.js.map +1 -1
- package/lib-es/components/ItemList/ItemListButton/ItemListButton.js.map +1 -1
- package/lib-es/components/ItemList/ItemListCounter/ItemListCounter.js.map +1 -1
- package/lib-es/components/ItemList/ItemListNew/ItemListNew.js.map +1 -1
- package/lib-es/components/ItemList/helpers/get-item-list-id.js.map +1 -1
- package/lib-es/components/ItemList/helpers/set-item-list-id.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/helpers/get-styles-to-update.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/ListFactory.js.map +1 -1
- package/lib-es/components/List/ListRender.js.map +1 -1
- package/lib-es/components/List/components/Header/ListHeader.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/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/get-az-query-filter.js.map +1 -1
- package/lib-es/components/List/helpers/get-list-query.js.map +1 -1
- package/lib-es/components/List/helpers/sort-aggs.js.map +1 -1
- package/lib-es/components/Loading/Loading.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/MenuItem/MenuItemRender.js +8 -21
- 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/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/SearchContentResults.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.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/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/get-responsive-filter-classnames.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/get-updated-filter-by.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/parse-filter-value.js.map +1 -1
- package/lib-es/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
- package/lib-es/components/SearchFilterSort/helpers/handle-sort-update.js.map +1 -1
- package/lib-es/components/SearchFilterSort/helpers/update-sort.js.map +1 -1
- package/lib-es/components/SocialFollow/SFItem.js.map +1 -1
- package/lib-es/components/Video/Video.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/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/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/build-az-filter.js.map +1 -1
- package/lib-es/helpers/build-filters-query.js.map +1 -1
- package/lib-es/helpers/build-inherited-filters.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-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-sort-values.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-display-count-data.js.map +1 -1
- package/lib-es/helpers/get-entity-data.js.map +1 -1
- package/lib-es/helpers/get-extra-az-bits.js.map +1 -1
- package/lib-es/helpers/get-inherited-filters.js.map +1 -1
- package/lib-es/helpers/get-modifiers.js.map +1 -1
- package/lib-es/helpers/get-pagination-index.js.map +1 -1
- package/lib-es/helpers/get-query-props.js.map +1 -1
- package/lib-es/helpers/get-sort-by-field-name.js.map +1 -1
- package/lib-es/helpers/get-wrapped-value-with-link.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/is-filter-entitys-id.js.map +1 -1
- package/lib-es/helpers/process-data-summary-value.js +1 -1
- package/lib-es/helpers/remove-unwanted-characters.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/get-components-to-insert-by-type.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/use-app-sync-event-hook.js.map +1 -1
- package/lib-es/hooks/use-check-mobile-screen.js.map +1 -1
- package/lib-es/hooks/use-get-entity-schema.js.map +1 -1
- package/lib-es/hooks/use-get-image-id-from-relation.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/utils/component-map.js.map +1 -1
- package/lib-es/utils/get-class-modifiers.js.map +1 -1
- package/lib-es/utils/variant-handler.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/index.js +1 -1
- package/lib-es/variants/LongformGallery/index.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/ThumbnailImage/ThumbnailImage.js.map +1 -1
- package/lib-es/variants/ThumbnailCarousel/index.js +1 -1
- package/lib-es/variants/ThumbnailCarousel/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 +9 -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 +1 -13
- 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 +4 -2
- 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 -53
- package/tests/unit/src/hooks/use-page-builder.test.js +0 -48
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { render, act, waitFor } from '@testing-library/react';
|
|
6
|
-
|
|
6
|
+
import { useRouter } from 'next/router';
|
|
7
7
|
import '@testing-library/jest-dom/extend-expect';
|
|
8
8
|
import CardsContainer from '../../../../../src/components/Card/CardsContainer';
|
|
9
9
|
import { cardDataMockedOptions } from './mockData';
|
|
@@ -12,6 +12,11 @@ jest.mock('@blaze-cms/utils-handlebars', () => ({
|
|
|
12
12
|
useStringTemplate: jest.fn((parent, [title]) => ({ loadig: false, data: [title] }))
|
|
13
13
|
}));
|
|
14
14
|
|
|
15
|
+
jest.mock('react', () => ({
|
|
16
|
+
...jest.requireActual('react'),
|
|
17
|
+
useContext: () => ({ itemId: 'contextItemId', isPreview: false })
|
|
18
|
+
}));
|
|
19
|
+
|
|
15
20
|
// eslint-disable-next-line react/prop-types
|
|
16
21
|
jest.mock('../../../../../src/components/LazyImage', () => () => null);
|
|
17
22
|
|
|
@@ -30,6 +35,7 @@ const renderComponent = async props => {
|
|
|
30
35
|
};
|
|
31
36
|
|
|
32
37
|
describe('CardsContainer component', () => {
|
|
38
|
+
useRouter();
|
|
33
39
|
it('should render without throwing error and match snapshot', async () => {
|
|
34
40
|
const { asFragment } = await renderComponent({
|
|
35
41
|
...cardDataMockedOptions,
|
|
@@ -38,6 +38,9 @@ exports[`Card component should not render alternative headline if alternativePre
|
|
|
38
38
|
<a
|
|
39
39
|
aria-label="mock name"
|
|
40
40
|
href="/mockurl"
|
|
41
|
+
/>
|
|
42
|
+
<a
|
|
43
|
+
href="/mockurl"
|
|
41
44
|
>
|
|
42
45
|
mock name
|
|
43
46
|
</a>
|
|
@@ -109,6 +112,9 @@ exports[`Card component should not render alternative headline if displayCategor
|
|
|
109
112
|
<a
|
|
110
113
|
aria-label="mock name"
|
|
111
114
|
href="/mockurl"
|
|
115
|
+
/>
|
|
116
|
+
<a
|
|
117
|
+
href="/mockurl"
|
|
112
118
|
>
|
|
113
119
|
mock name
|
|
114
120
|
</a>
|
|
@@ -187,6 +193,9 @@ exports[`Card component should not render preHeader if alternativeHeadline is no
|
|
|
187
193
|
<a
|
|
188
194
|
aria-label="mock name"
|
|
189
195
|
href="/mockurl"
|
|
196
|
+
/>
|
|
197
|
+
<a
|
|
198
|
+
href="/mockurl"
|
|
190
199
|
>
|
|
191
200
|
mock name
|
|
192
201
|
</a>
|
|
@@ -263,6 +272,9 @@ exports[`Card component should render customPreheader and alternativeHeadline in
|
|
|
263
272
|
<a
|
|
264
273
|
aria-label="Alternative headline"
|
|
265
274
|
href="/mockurl"
|
|
275
|
+
/>
|
|
276
|
+
<a
|
|
277
|
+
href="/mockurl"
|
|
266
278
|
>
|
|
267
279
|
Alternative headline
|
|
268
280
|
</a>
|
|
@@ -424,6 +436,9 @@ exports[`Card component should render without throwing an error and match snapsh
|
|
|
424
436
|
<a
|
|
425
437
|
aria-label="mock name"
|
|
426
438
|
href="/mockurl"
|
|
439
|
+
/>
|
|
440
|
+
<a
|
|
441
|
+
href="/mockurl"
|
|
427
442
|
>
|
|
428
443
|
mock name
|
|
429
444
|
</a>
|
|
@@ -43,6 +43,9 @@ exports[`CardsContainer component should render with carousel if option is enabl
|
|
|
43
43
|
<a
|
|
44
44
|
aria-label="Swan 78"
|
|
45
45
|
href="/nautors-swan/swan-78"
|
|
46
|
+
/>
|
|
47
|
+
<a
|
|
48
|
+
href="/nautors-swan/swan-78"
|
|
46
49
|
>
|
|
47
50
|
Swan 78
|
|
48
51
|
</a>
|
|
@@ -82,6 +85,9 @@ exports[`CardsContainer component should render with carousel if option is enabl
|
|
|
82
85
|
<a
|
|
83
86
|
aria-label="Swan 98"
|
|
84
87
|
href="/nautors-swan/swan-98"
|
|
88
|
+
/>
|
|
89
|
+
<a
|
|
90
|
+
href="/nautors-swan/swan-98"
|
|
85
91
|
>
|
|
86
92
|
Swan 98
|
|
87
93
|
</a>
|
|
@@ -135,6 +141,9 @@ exports[`CardsContainer component should render without throwing error and match
|
|
|
135
141
|
<a
|
|
136
142
|
aria-label="Swan 78"
|
|
137
143
|
href="/nautors-swan/swan-78"
|
|
144
|
+
/>
|
|
145
|
+
<a
|
|
146
|
+
href="/nautors-swan/swan-78"
|
|
138
147
|
>
|
|
139
148
|
Swan 78
|
|
140
149
|
</a>
|
|
@@ -174,6 +183,9 @@ exports[`CardsContainer component should render without throwing error and match
|
|
|
174
183
|
<a
|
|
175
184
|
aria-label="Swan 98"
|
|
176
185
|
href="/nautors-swan/swan-98"
|
|
186
|
+
/>
|
|
187
|
+
<a
|
|
188
|
+
href="/nautors-swan/swan-98"
|
|
177
189
|
>
|
|
178
190
|
Swan 98
|
|
179
191
|
</a>
|
|
@@ -4,8 +4,7 @@ const cardDataMockedOptions = {
|
|
|
4
4
|
name: 'Swan 78',
|
|
5
5
|
url: '/nautors-swan/swan-78',
|
|
6
6
|
image: {
|
|
7
|
-
url:
|
|
8
|
-
'https://cdn-events.boatinternational.com/files/2020/04/2506afd0-879a-11ea-aab3-6d01477a82d7-180807_esk_0267.jpg',
|
|
7
|
+
url: 'https://cdn-events.boatinternational.com/files/2020/04/2506afd0-879a-11ea-aab3-6d01477a82d7-180807_esk_0267.jpg',
|
|
9
8
|
data: {
|
|
10
9
|
altText: 'Swan 78 | Exterior',
|
|
11
10
|
caption: ''
|
|
@@ -25,8 +24,7 @@ const cardDataMockedOptions = {
|
|
|
25
24
|
url: '/nautors-swan/swan-98',
|
|
26
25
|
arrowSize: 14,
|
|
27
26
|
image: {
|
|
28
|
-
url:
|
|
29
|
-
'https://cdn-events.boatinternational.com/files/2020/04/2f8c4030-879c-11ea-aab3-6d01477a82d7-Swan 98 - 1.jpg',
|
|
27
|
+
url: 'https://cdn-events.boatinternational.com/files/2020/04/2f8c4030-879c-11ea-aab3-6d01477a82d7-Swan 98 - 1.jpg',
|
|
30
28
|
data: {
|
|
31
29
|
altText: 'Swan 98 | Exterior',
|
|
32
30
|
caption: ''
|
|
@@ -3,71 +3,72 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
6
|
+
import { useRouter } from 'next/router';
|
|
7
|
+
import { render, waitFor } from '@testing-library/react';
|
|
8
|
+
import { MockedRoot } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
9
|
+
import { MOCK_BASIC, MOCK_RELATION } from '../../Image/mocks';
|
|
8
10
|
import CarouselRender from '../../../../../../src/components/Carousel/CarouselRender';
|
|
9
|
-
|
|
11
|
+
// TODO fix test breaking
|
|
10
12
|
jest.mock('@blaze-cms/utils-handlebars', () => ({
|
|
11
|
-
useStringTemplate: jest.fn((
|
|
13
|
+
useStringTemplate: jest.fn((_, [title]) => ({ loadig: false, data: [title] }))
|
|
14
|
+
}));
|
|
15
|
+
|
|
16
|
+
jest.mock('react', () => ({
|
|
17
|
+
...jest.requireActual('react'),
|
|
18
|
+
useContext: () => ({ isPreview: false })
|
|
12
19
|
}));
|
|
13
20
|
|
|
14
|
-
const
|
|
21
|
+
const getMockedProps = overrides => ({
|
|
15
22
|
imageIds: ['test-id', 'test-altText', 'test-caption'],
|
|
16
23
|
displayCount: true,
|
|
17
24
|
enableLightbox: true,
|
|
18
25
|
toggleModal: jest.fn(),
|
|
19
26
|
handleSelectedImage: jest.fn(),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
direction: {
|
|
23
|
-
next: true,
|
|
24
|
-
back: false
|
|
25
|
-
},
|
|
26
|
-
handleNavigation: jest.fn()
|
|
27
|
-
};
|
|
27
|
+
...overrides
|
|
28
|
+
});
|
|
28
29
|
|
|
29
30
|
describe('CarouselRender component', () => {
|
|
30
|
-
|
|
31
|
+
const router = useRouter();
|
|
32
|
+
const mockedProps = getMockedProps();
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
});
|
|
34
|
+
it('should render one image button if there is one image to display', async () => {
|
|
35
|
+
const overrides = { imageIds: ['test1'] };
|
|
36
|
+
const { getByText } = render(
|
|
37
|
+
<MockedRoot mocks={MOCK_BASIC}>
|
|
38
|
+
<CarouselRender {...mockedProps} {...overrides} />
|
|
39
|
+
</MockedRoot>
|
|
40
|
+
);
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
await waitFor(() => {
|
|
43
|
+
expect(getByText('1 image')).toBeInTheDocument();
|
|
44
|
+
});
|
|
44
45
|
});
|
|
45
46
|
|
|
46
|
-
it('should render
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
it('should render n images button if there is more than one image to display', async () => {
|
|
48
|
+
const overrides = { imageIds: ['test-id', 'test-id-2'] };
|
|
49
|
+
const { getByText } = render(
|
|
50
|
+
<MockedRoot mocks={MOCK_RELATION}>
|
|
51
|
+
<CarouselRender {...mockedProps} {...overrides} />
|
|
52
|
+
</MockedRoot>
|
|
53
|
+
);
|
|
49
54
|
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
await waitFor(() => {
|
|
56
|
+
expect(getByText('2 images')).toBeInTheDocument();
|
|
57
|
+
});
|
|
52
58
|
});
|
|
53
59
|
|
|
54
|
-
it('should not render number count if display count is disabled', () => {
|
|
55
|
-
const overrides = {
|
|
56
|
-
const
|
|
57
|
-
<
|
|
60
|
+
it('should not render number count if display count is disabled', async () => {
|
|
61
|
+
const overrides = { displayCount: false };
|
|
62
|
+
const { asFragment, container } = render(
|
|
63
|
+
<MockedRoot mocks={MOCK_BASIC}>
|
|
64
|
+
<CarouselRender {...mockedProps} {...overrides} />
|
|
65
|
+
</MockedRoot>
|
|
58
66
|
);
|
|
59
|
-
expect(wrapperCountDisabled.find('p').length).toEqual(0);
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
it('should not display number count after clicking previous image', () => {
|
|
63
|
-
const wrapperPrevClick = shallow(<CarouselRender.WrappedComponent {...mockedProps} />);
|
|
64
|
-
wrapperPrevClick.find('div.carousel__button--previous').simulate('click');
|
|
65
|
-
expect(mockedProps.handleNavigation).toHaveBeenCalledWith(mockedProps.direction.back);
|
|
66
|
-
});
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
await waitFor(() => {
|
|
69
|
+
const countDisplay = container.querySelector('p');
|
|
70
|
+
expect(countDisplay).toBe(null);
|
|
71
|
+
expect(asFragment()).toMatchSnapshot();
|
|
72
|
+
});
|
|
72
73
|
});
|
|
73
74
|
});
|
package/tests/unit/src/components/Carousel/CarouselRender/__snapshots__/CarouselRender.test.js.snap
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`CarouselRender component should
|
|
3
|
+
exports[`CarouselRender component should not render number count if display count is disabled 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="carousel"
|
|
7
|
+
>
|
|
8
|
+
<div>
|
|
9
|
+
<div
|
|
10
|
+
class="carousel__button carousel__button--previous"
|
|
11
|
+
role="button"
|
|
12
|
+
>
|
|
13
|
+
<div
|
|
14
|
+
class="arrow arrow--left"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
<div
|
|
18
|
+
class="carousel__list"
|
|
19
|
+
>
|
|
20
|
+
<div
|
|
21
|
+
class="carousel__slide"
|
|
22
|
+
>
|
|
23
|
+
<div />
|
|
24
|
+
</div>
|
|
25
|
+
<div
|
|
26
|
+
class="carousel__slide"
|
|
27
|
+
>
|
|
28
|
+
<div />
|
|
29
|
+
</div>
|
|
30
|
+
<div
|
|
31
|
+
class="carousel__slide"
|
|
32
|
+
>
|
|
33
|
+
<div />
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div
|
|
37
|
+
class="carousel__button carousel__button--next"
|
|
38
|
+
role="button"
|
|
39
|
+
>
|
|
40
|
+
<div
|
|
41
|
+
class="arrow arrow--right"
|
|
42
|
+
/>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</DocumentFragment>
|
|
47
|
+
`;
|
|
File without changes
|
|
@@ -13,7 +13,10 @@ const mockedProps = {
|
|
|
13
13
|
name: 'testTabs',
|
|
14
14
|
contentType: 'tab',
|
|
15
15
|
groupSections: [<div>section one</div>, <div>section two</div>],
|
|
16
|
-
sectionsData: [
|
|
16
|
+
sectionsData: [
|
|
17
|
+
['section-one', 'sectionOne'],
|
|
18
|
+
['section-two', 'sectionTwo']
|
|
19
|
+
]
|
|
17
20
|
};
|
|
18
21
|
|
|
19
22
|
describe('ContentGroupTabs component', () => {
|
|
@@ -15,7 +15,10 @@ describe('getSectionsData helper', () => {
|
|
|
15
15
|
it('should return section name and label', () => {
|
|
16
16
|
const match = getSectionsData(mockedSections);
|
|
17
17
|
|
|
18
|
-
expect(match).toEqual([
|
|
18
|
+
expect(match).toEqual([
|
|
19
|
+
['nameone', 'labelonne'],
|
|
20
|
+
['nameTwo', 'labelTwo']
|
|
21
|
+
]);
|
|
19
22
|
});
|
|
20
23
|
|
|
21
24
|
it('should return section name and label propertly formated when spaces are present', () => {
|
package/tests/unit/src/components/DataSummary/helpers/build-props-to-display-with-content.test.js
CHANGED
|
@@ -7,7 +7,11 @@ const mockerPropsObj = {
|
|
|
7
7
|
id: 'f6a84af0-d956-11e9-b283-ffc6056b4ee9',
|
|
8
8
|
metaDescription: '',
|
|
9
9
|
name: 'Page2',
|
|
10
|
-
tags: [
|
|
10
|
+
tags: [
|
|
11
|
+
{ name: 'name1', id: '1' },
|
|
12
|
+
{ name: 'name2', id: '2' },
|
|
13
|
+
{ name: 'name3', id: '3' }
|
|
14
|
+
],
|
|
11
15
|
url: '/test2'
|
|
12
16
|
};
|
|
13
17
|
|
|
@@ -19,7 +19,10 @@ describe('build props to display func', () => {
|
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
it('should return object with correct data', () => {
|
|
22
|
-
const arrMultiple = [
|
|
22
|
+
const arrMultiple = [
|
|
23
|
+
{ id: 'id1', url: 'url1' },
|
|
24
|
+
{ id: 'id2', url: 'url2' }
|
|
25
|
+
];
|
|
23
26
|
const resultMultiple = getValueFromArray(key, arrMultiple, prefix, suffix);
|
|
24
27
|
|
|
25
28
|
expect(resultMultiple).toHaveLength(2);
|
|
@@ -4,8 +4,14 @@ import stripSummaryPropsContent from '../../../../../../src/components/DataSumma
|
|
|
4
4
|
describe('strip summary props content', () => {
|
|
5
5
|
const stripTrue = [{ shouldStrip: true }];
|
|
6
6
|
const stripFalse = [{ shouldStrip: false }];
|
|
7
|
-
const mockedData = [
|
|
8
|
-
|
|
7
|
+
const mockedData = [
|
|
8
|
+
['Props', '| meta | description |', ''],
|
|
9
|
+
['Props', 'meta', '']
|
|
10
|
+
];
|
|
11
|
+
const expectedResult = [
|
|
12
|
+
['Props', 'meta | description', ''],
|
|
13
|
+
['Props', 'meta', '']
|
|
14
|
+
];
|
|
9
15
|
|
|
10
16
|
const result = stripSummaryPropsContent(stripTrue, mockedData);
|
|
11
17
|
|
|
@@ -3,7 +3,10 @@ import { generateSingleItemQuery } from '../../../../../src/application/query';
|
|
|
3
3
|
const propsDataSummary = {
|
|
4
4
|
elementTitle: 'test-title',
|
|
5
5
|
modifier: 'mod',
|
|
6
|
-
summaryPropsWithContent: [
|
|
6
|
+
summaryPropsWithContent: [
|
|
7
|
+
['first', 'something', '', ''],
|
|
8
|
+
['second', 'other thing', '', '']
|
|
9
|
+
],
|
|
7
10
|
propsToDisplayModifiers: []
|
|
8
11
|
};
|
|
9
12
|
|
|
@@ -73,9 +73,10 @@ describe('ImageFactory component', () => {
|
|
|
73
73
|
});
|
|
74
74
|
|
|
75
75
|
it('should render image', async () => {
|
|
76
|
-
const { asFragment } = await setupTest({}, MOCK_BASIC);
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
const { asFragment, container } = await setupTest({ imageId: 'test-id' }, MOCK_BASIC);
|
|
77
|
+
await waitFor(() => {
|
|
78
|
+
expect(container.childNodes.length).toBe(1);
|
|
79
|
+
});
|
|
79
80
|
expect(asFragment()).toMatchSnapshot();
|
|
80
81
|
});
|
|
81
82
|
|
|
@@ -44,7 +44,6 @@ const mocks = [
|
|
|
44
44
|
];
|
|
45
45
|
|
|
46
46
|
const buttonRole = 'button';
|
|
47
|
-
const router = useRouter();
|
|
48
47
|
|
|
49
48
|
describe('ItemListCounter component', () => {
|
|
50
49
|
beforeEach(() => {
|
|
@@ -52,6 +51,8 @@ describe('ItemListCounter component', () => {
|
|
|
52
51
|
});
|
|
53
52
|
|
|
54
53
|
it('should display listItem count and route to url', async () => {
|
|
54
|
+
const router = useRouter(); // Move the useRouter call here
|
|
55
|
+
|
|
55
56
|
const { asFragment, getByRole, getByText } = render(
|
|
56
57
|
<MockedProvider mocks={mocks}>
|
|
57
58
|
<ItemListCounter {...props} />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jest-environment jsdom
|
|
3
3
|
*/
|
|
4
|
-
import { renderHook, act } from '@testing-library/react
|
|
4
|
+
import { renderHook, act } from '@testing-library/react';
|
|
5
5
|
import useItemListId from '../../../../../../src/components/ItemList/hooks/use-item-list-id';
|
|
6
6
|
import getItemListId from '../../../../../../src/components/ItemList/helpers/get-item-list-id';
|
|
7
7
|
|
|
@@ -23,10 +23,6 @@ const testId = 'child-test-id';
|
|
|
23
23
|
describe('LayoutFactoriy component', () => {
|
|
24
24
|
const props = { someProps: true, children: <div data-testid={testId} /> };
|
|
25
25
|
|
|
26
|
-
it('should be defined', () => {
|
|
27
|
-
expect(Layout).toBeDefined();
|
|
28
|
-
});
|
|
29
|
-
|
|
30
26
|
it('should render Layout component', () => {
|
|
31
27
|
const { getByTestId } = render(<Layout {...props} />);
|
|
32
28
|
expect(getByTestId(defaultComponentTestId)).toBeDefined();
|
|
@@ -2,19 +2,26 @@
|
|
|
2
2
|
* @jest-environment jsdom
|
|
3
3
|
*/
|
|
4
4
|
import '@testing-library/jest-dom/extend-expect';
|
|
5
|
+
import { useRouter } from 'next/router';
|
|
5
6
|
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
6
7
|
import CardsRender from '../../../../../../../src/components/List/components/Cards';
|
|
7
8
|
import { MOCKED_LIST_OPTIONS } from '../mocks';
|
|
8
9
|
|
|
9
10
|
jest.mock('@blaze-cms/utils-handlebars', () => ({
|
|
10
|
-
useStringTemplate: jest.fn((
|
|
11
|
+
useStringTemplate: jest.fn((_, [title]) => ({ loadig: false, data: [title] }))
|
|
11
12
|
}));
|
|
12
13
|
|
|
13
14
|
jest.mock('../../../../../../../src/hooks', () => ({
|
|
14
15
|
useGetImages: jest.fn(() => ({ data: {}, loading: false }))
|
|
15
16
|
}));
|
|
16
17
|
|
|
18
|
+
jest.mock('react', () => ({
|
|
19
|
+
...jest.requireActual('react'),
|
|
20
|
+
useContext: () => ({ itemId: 'contextItemId', isPreview: false })
|
|
21
|
+
}));
|
|
22
|
+
|
|
17
23
|
describe('CardsRender component', () => {
|
|
24
|
+
useRouter();
|
|
18
25
|
it('should render based on listData received', async () => {
|
|
19
26
|
const { asFragment } = await render(CardsRender, MOCKED_LIST_OPTIONS);
|
|
20
27
|
expect(asFragment()).toMatchSnapshot();
|
|
@@ -15,7 +15,7 @@ const mockedOptions = {
|
|
|
15
15
|
|
|
16
16
|
describe('Classic pagination component', () => {
|
|
17
17
|
it('should render based on props passed', async () => {
|
|
18
|
-
const { asFragment } =
|
|
18
|
+
const { asFragment } = render(Classic, { ...mockedOptions, isInfinite: true });
|
|
19
19
|
expect(asFragment()).toMatchSnapshot();
|
|
20
20
|
});
|
|
21
21
|
});
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import { CardIcon } from '@blaze-cms/plugin-page-builder-ui/src/Icons';
|
|
7
|
+
import PlaceholderIcon from '@blaze-cms/plugin-page-builder-ui/src/components/EditorView/PlaceholderIcon';
|
|
8
8
|
|
|
9
9
|
const mockedProps = {
|
|
10
10
|
type: 'card',
|
|
@@ -38,14 +38,14 @@ describe('Range component', () => {
|
|
|
38
38
|
const component = await getMockedProvider(Range, {
|
|
39
39
|
props: { ...getMockedProps() }
|
|
40
40
|
});
|
|
41
|
-
expect(component
|
|
41
|
+
expect(component).toMatchSnapshot();
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
it('should match snapshot with interval', async () => {
|
|
45
45
|
const component = await getMockedProvider(Range, {
|
|
46
46
|
props: { ...getMockedProps({ rangeInterval: 5 }) }
|
|
47
47
|
});
|
|
48
|
-
expect(component
|
|
48
|
+
expect(component).toMatchSnapshot();
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
it('should match snapshot large values formatted correctly', async () => {
|
|
@@ -69,7 +69,7 @@ describe('Range component', () => {
|
|
|
69
69
|
const component = await getMockedProvider(Range, {
|
|
70
70
|
props: { ...mockedProps }
|
|
71
71
|
});
|
|
72
|
-
expect(component
|
|
72
|
+
expect(component).toMatchSnapshot();
|
|
73
73
|
});
|
|
74
74
|
|
|
75
75
|
it('should match snapshot with interval and rounded min & max values', async () => {
|
|
@@ -93,7 +93,7 @@ describe('Range component', () => {
|
|
|
93
93
|
const component = await getMockedProvider(Range, {
|
|
94
94
|
props: { ...mockedProps }
|
|
95
95
|
});
|
|
96
|
-
expect(component
|
|
96
|
+
expect(component).toMatchSnapshot();
|
|
97
97
|
});
|
|
98
98
|
|
|
99
99
|
it('should match snapshot with adjusted min & max values based on interval', async () => {
|
|
@@ -117,6 +117,6 @@ describe('Range component', () => {
|
|
|
117
117
|
const component = await getMockedProvider(Range, {
|
|
118
118
|
props: { ...mockedProps }
|
|
119
119
|
});
|
|
120
|
-
expect(component
|
|
120
|
+
expect(component).toMatchSnapshot();
|
|
121
121
|
});
|
|
122
122
|
});
|