@blaze-cms/react-page-builder 0.146.0-node18-core-styles-tooltips.54 → 0.146.0-node18-tooltips.42
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 +49 -124
- package/lib/BannerContext/index.js +1 -1
- package/lib/BannerContext/index.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 +0 -1
- 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/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 +3 -3
- 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/CardsRender.js +1 -1
- package/lib/components/Card/CardsRender.js.map +1 -1
- package/lib/components/Carousel/Carousel.js +1 -1
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselRender/CarouselRender.js +0 -1
- 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/ContentGroup.js +28 -6
- package/lib/components/ContentGroup/ContentGroup.js.map +1 -1
- package/lib/components/ContentGroup/ContentGroupAccordion.js +1 -1
- package/lib/components/ContentGroup/ContentGroupAccordion.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 +0 -1
- 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 +0 -1
- 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/EmailConfirm/EmailConfirm.js +1 -1
- package/lib/components/EmailConfirm/EmailConfirm.js.map +1 -1
- package/lib/components/ErrorMessage/ErrorMessage.js.map +1 -1
- package/lib/components/ErrorMessage/index.js +2 -2
- package/lib/components/ErrorMessage/index.js.map +1 -1
- package/lib/components/Image/GlobalLightbox/GlobalLightbox.js +1 -1
- 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 +0 -1
- package/lib/components/ItemList/helpers/get-item-list-ids.js.map +1 -1
- package/lib/components/ItemList/helpers/set-param-and-redirect.js +0 -1
- package/lib/components/ItemList/helpers/set-param-and-redirect.js.map +1 -1
- package/lib/components/Layout/Layout.js +13 -3
- package/lib/components/Layout/Layout.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 +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 +0 -1
- 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/helpers/check-if-should-render-banner.js +1 -0
- 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 -0
- package/lib/components/List/components/helpers/check-if-should-render-gtm.js.map +1 -1
- package/lib/components/List/helpers/build-query-booster.js +1 -2
- package/lib/components/List/helpers/build-query-booster.js.map +1 -1
- package/lib/components/Loading/index.js +2 -2
- package/lib/components/Loading/index.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 +13 -28
- 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 +0 -1
- 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 +2 -1
- 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 +0 -1
- package/lib/components/SearchFilter/helpers/get-filter-value-from-query.js.map +1 -1
- package/lib/components/SearchFilter/helpers/get-select-options.js +0 -1
- package/lib/components/SearchFilter/helpers/get-select-options.js.map +1 -1
- package/lib/components/SearchFilter/helpers/parse-filter-value.js +0 -1
- package/lib/components/SearchFilter/helpers/parse-filter-value.js.map +1 -1
- package/lib/components/SearchFilterSort/SearchFilterSort.js +0 -1
- package/lib/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
- package/lib/components/SocialFollow/SocialFollowRender.js +0 -1
- 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 +2 -1
- 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/index.js +31 -31
- package/lib/components/index.js.map +1 -1
- package/lib/helpers/build-query-fields.js +0 -1
- package/lib/helpers/build-query-fields.js.map +1 -1
- package/lib/helpers/build-raw-query-stringified.js +0 -1
- package/lib/helpers/build-raw-query-stringified.js.map +1 -1
- package/lib/helpers/check-props-to-use.js +0 -1
- package/lib/helpers/check-props-to-use.js.map +1 -1
- package/lib/helpers/get-custom-html-properties.js +24 -0
- package/lib/helpers/get-custom-html-properties.js.map +1 -0
- package/lib/helpers/get-entities-with-banner.js +1 -1
- package/lib/helpers/get-generic-render-variables.js +0 -1
- package/lib/helpers/get-generic-render-variables.js.map +1 -1
- package/lib/helpers/get-wrapped-value-with-link.js +0 -1
- package/lib/helpers/get-wrapped-value-with-link.js.map +1 -1
- package/lib/helpers/index.js +7 -0
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/inject-multiple-banners/get-banners-for-entities/get-banners-for-entities.js +0 -1
- 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 +3 -2
- package/lib/helpers/process-data-summary-value.js.map +1 -1
- package/lib/helpers/remove-unwanted-characters.js +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 +4 -3
- package/lib/hooks/helpers/StoreImages.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-app-event-hook.js +1 -2
- package/lib/hooks/use-app-event-hook.js.map +1 -1
- package/lib/hooks/use-page-builder.js +1 -1
- 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/system-components/EditorMode/BlazeLogo.js +1 -1
- package/lib/system-components/EditorMode/BlazeLogo.js.map +1 -1
- package/lib/system-components/EditorMode/PbWrapper.js +2 -2
- package/lib/system-components/EditorMode/PbWrapper.js.map +1 -1
- package/lib/system-components/EditorMode/helpers/add-editor-mode-event-listeners.js +3 -3
- package/lib/system-components/EditorMode/helpers/add-editor-mode-event-listeners.js.map +1 -1
- package/lib/system-components/index.js +1 -1
- package/lib/system-components/index.js.map +1 -1
- package/lib/utils/get-props-to-display-modifiers.js +0 -1
- 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/LiveBlogList/LiveBlogList.js +1 -1
- package/lib/variants/LiveBlogList/LiveBlogList.js.map +1 -1
- package/lib/variants/LiveBlogList/index.js +2 -2
- package/lib/variants/LiveBlogList/index.js.map +1 -1
- package/lib/variants/LongformGallery/LongformGallery.js +0 -1
- 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 +0 -1
- package/lib/variants/ThumbnailCarousel/ThumbnailCarousel.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/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/Card/Card.js.map +1 -1
- package/lib-es/components/Card/CardsFactory.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/ContentGroup.js +22 -5
- package/lib-es/components/ContentGroup/ContentGroup.js.map +1 -1
- package/lib-es/components/ContentGroup/ContentGroupAccordion.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/EmailConfirm/EmailConfirm.js.map +1 -1
- package/lib-es/components/EmailConfirm/mutation.js.map +1 -1
- package/lib-es/components/ErrorMessage/index.js +1 -1
- package/lib-es/components/ErrorMessage/index.js.map +1 -1
- package/lib-es/components/Iframe/Iframe.js.map +1 -1
- 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/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/Layout/Layout.js +14 -5
- 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/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/components/Header/ListHeader.js.map +1 -1
- package/lib-es/components/List/components/Pagination/Classic.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/Loading/Loading.js.map +1 -1
- package/lib-es/components/Loading/index.js +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/MenuItem/MenuItemRender.js +11 -25
- 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.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.map +1 -1
- package/lib-es/helpers/build-sort-values.js.map +1 -1
- package/lib-es/helpers/get-component-id.js.map +1 -1
- package/lib-es/helpers/get-custom-html-properties.js +13 -0
- package/lib-es/helpers/get-custom-html-properties.js.map +1 -0
- 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/index.js +1 -0
- package/lib-es/helpers/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/is-filter-entitys-id.js.map +1 -1
- package/lib-es/helpers/process-data-summary-value.js +1 -1
- package/lib-es/hooks/helpers/StoreImages.js +2 -2
- 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/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-event-hook.js.map +1 -1
- package/lib-es/hooks/use-app-sync-event-hook.js.map +1 -1
- package/lib-es/hooks/use-get-image-id-from-relation.js.map +1 -1
- package/lib-es/system-components/EditorMode/PbWrapper.js +1 -1
- package/lib-es/system-components/EditorMode/PbWrapper.js.map +1 -1
- package/lib-es/system-components/EditorMode/helpers/add-editor-mode-event-listeners.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/LiveBlogList/LiveBlogList.js.map +1 -1
- package/lib-es/variants/LiveBlogList/index.js +1 -1
- package/lib-es/variants/LiveBlogList/index.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/index.js +1 -1
- package/lib-es/variants/ThumbnailCarousel/index.js.map +1 -1
- package/package.json +10 -10
- package/src/components/ContentGroup/ContentGroup.js +22 -5
- package/src/components/Layout/Layout.js +14 -3
- package/src/components/Menu/Menu.js +1 -3
- package/src/components/Menu/MenuContext.js +1 -1
- package/src/components/MenuItem/MenuItemRender.js +12 -40
- package/src/components/MenuItem/helpers/index.js +1 -3
- package/src/helpers/get-custom-html-properties.js +11 -0
- package/src/helpers/index.js +1 -0
- package/tests/unit/src/Layout/Layout.test.js +47 -0
- package/tests/unit/src/components/ContentGroup/ContentGroup.test.js +43 -0
- package/tests/unit/src/components/MenuItem/MenuItem.test.js +0 -5
- package/tests/unit/src/components/MenuItem/MenuItemRender.test.js +3 -11
- package/tests/unit/src/helpers/get-custom-html-properties.test.js +48 -0
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["dynamic","liveBlogList","VariantComponent","getSettings","componentSettings","_objectSpread","modifier"],"sources":["../../../src/variants/LiveBlogList/index.js"],"sourcesContent":["import dynamic from 'next/dynamic';\n\nconst liveBlogList = {\n VariantComponent: dynamic(\n () => import(/* webpackChunkName: \"blazePbliveBlogList\" */ './LiveBlogList')\n ),\n getSettings: componentSettings => ({\n ...componentSettings,\n modifier: 'liveBlogList'\n })\n};\n\nexport default liveBlogList;\n"],"mappings":";;;AAAA,OAAOA,OAAO,MAAM,cAAc;AAElC,MAAMC,YAAY,GAAG;EACnBC,gBAAgB,EAAEF,OAAO,CACvB,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","names":["dynamic","liveBlogList","VariantComponent","getSettings","componentSettings","_objectSpread","modifier"],"sources":["../../../src/variants/LiveBlogList/index.js"],"sourcesContent":["import dynamic from 'next/dynamic';\n\nconst liveBlogList = {\n VariantComponent: dynamic(\n () => import(/* webpackChunkName: \"blazePbliveBlogList\" */ './LiveBlogList')\n ),\n getSettings: componentSettings => ({\n ...componentSettings,\n modifier: 'liveBlogList'\n })\n};\n\nexport default liveBlogList;\n"],"mappings":";;;AAAA,OAAOA,OAAO,MAAM,cAAc;AAElC,MAAMC,YAAY,GAAG;EACnBC,gBAAgB,EAAEF,OAAO,CACvB,MAAM,MAAM,EAAC,6CAA8C,gBAAgB,CAC7E,CAAC;EACDG,WAAW,EAAEC,iBAAiB,IAAAC,aAAA,CAAAA,aAAA,KACzBD,iBAAiB;IACpBE,QAAQ,EAAE;EAAc;AAE5B,CAAC;AAED,eAAeL,YAAY","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LongformGalleryImage.js","names":["React","PropTypes","Head","useInView","ResponsiveImage","IN_VIEW_CONFIG","LongformGalleryImage","_ref","id","url","caption","altText","priority","className","numberOfImages","handleImageOnClick","props","_objectWithoutProperties","_excluded","isIntersecting","outerRef","shouldRender","HeadComponent","sizeKey","createElement","ref","role","onClick","_extends","src","alt","propTypes","string","isRequired","number","bool","func"],"sources":["../../../src/variants/LongformGallery/LongformGalleryImage.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Head from 'next/head';\nimport { useInView } from '@blaze-react/utils/lib/customHooks';\nimport { ResponsiveImage } from '@blaze-cms/image-cdn-react';\nimport { IN_VIEW_CONFIG } from './constants';\n\nconst LongformGalleryImage = ({\n id,\n url,\n caption,\n altText,\n priority,\n className,\n numberOfImages,\n handleImageOnClick,\n ...props\n}) => {\n const [isIntersecting, outerRef] = useInView(IN_VIEW_CONFIG);\n const shouldRender = priority || isIntersecting;\n const HeadComponent = priority ? Head : null;\n const sizeKey = `carousel:longform:${numberOfImages}`;\n\n return (\n <div ref={outerRef} className={`${className}`}>\n <div\n role=\"button\"\n className=\"longform-gallery__images__image__container\"\n data-testid=\"longform-gallery__images__image__container\"\n onClick={() => handleImageOnClick(id)}>\n {shouldRender && (\n <ResponsiveImage\n sizeKey={sizeKey}\n role=\"button\"\n src={url}\n alt={altText}\n priority={priority}\n HeadComponent={HeadComponent}\n {...props}\n />\n )}\n </div>\n {!!caption && (\n <div\n className=\"longform-gallery__images__image__details\"\n data-testid=\"longform-gallery__images__image__details\">\n <div className=\"longform-gallery__images__image__details__caption\">{caption}</div>\n </div>\n )}\n </div>\n );\n};\n\nLongformGalleryImage.propTypes = {\n id: PropTypes.string.isRequired,\n url: PropTypes.string.isRequired,\n caption: PropTypes.string.isRequired,\n numberOfImages: PropTypes.number.isRequired,\n altText: PropTypes.string.isRequired,\n priority: PropTypes.bool.isRequired,\n className: PropTypes.string.isRequired,\n handleImageOnClick: PropTypes.func.isRequired\n};\n\nexport default LongformGalleryImage;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,IAAI,MAAM,WAAW;AAC5B,SAASC,SAAS,QAAQ,oCAAoC;AAC9D,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,cAAc,QAAQ,aAAa;AAE5C,MAAMC,oBAAoB,GAAGC,IAAA,IAUvB;EAAA,IAVwB;MAC5BC,EAAE;MACFC,GAAG;MACHC,OAAO;MACPC,OAAO;MACPC,QAAQ;MACRC,SAAS;MACTC,cAAc;MACdC;IAEF,CAAC,GAAAR,IAAA;IADIS,KAAK,GAAAC,wBAAA,CAAAV,IAAA,EAAAW,SAAA;EAER,MAAM,CAACC,cAAc,EAAEC,QAAQ,CAAC,GAAGjB,SAAS,CAACE,cAAc,CAAC;EAC5D,MAAMgB,YAAY,GAAGT,QAAQ,IAAIO,cAAc;EAC/C,MAAMG,aAAa,GAAGV,QAAQ,GAAGV,IAAI,GAAG,IAAI;EAC5C,MAAMqB,OAAO,
|
|
1
|
+
{"version":3,"file":"LongformGalleryImage.js","names":["React","PropTypes","Head","useInView","ResponsiveImage","IN_VIEW_CONFIG","LongformGalleryImage","_ref","id","url","caption","altText","priority","className","numberOfImages","handleImageOnClick","props","_objectWithoutProperties","_excluded","isIntersecting","outerRef","shouldRender","HeadComponent","sizeKey","createElement","ref","role","onClick","_extends","src","alt","propTypes","string","isRequired","number","bool","func"],"sources":["../../../src/variants/LongformGallery/LongformGalleryImage.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Head from 'next/head';\nimport { useInView } from '@blaze-react/utils/lib/customHooks';\nimport { ResponsiveImage } from '@blaze-cms/image-cdn-react';\nimport { IN_VIEW_CONFIG } from './constants';\n\nconst LongformGalleryImage = ({\n id,\n url,\n caption,\n altText,\n priority,\n className,\n numberOfImages,\n handleImageOnClick,\n ...props\n}) => {\n const [isIntersecting, outerRef] = useInView(IN_VIEW_CONFIG);\n const shouldRender = priority || isIntersecting;\n const HeadComponent = priority ? Head : null;\n const sizeKey = `carousel:longform:${numberOfImages}`;\n\n return (\n <div ref={outerRef} className={`${className}`}>\n <div\n role=\"button\"\n className=\"longform-gallery__images__image__container\"\n data-testid=\"longform-gallery__images__image__container\"\n onClick={() => handleImageOnClick(id)}>\n {shouldRender && (\n <ResponsiveImage\n sizeKey={sizeKey}\n role=\"button\"\n src={url}\n alt={altText}\n priority={priority}\n HeadComponent={HeadComponent}\n {...props}\n />\n )}\n </div>\n {!!caption && (\n <div\n className=\"longform-gallery__images__image__details\"\n data-testid=\"longform-gallery__images__image__details\">\n <div className=\"longform-gallery__images__image__details__caption\">{caption}</div>\n </div>\n )}\n </div>\n );\n};\n\nLongformGalleryImage.propTypes = {\n id: PropTypes.string.isRequired,\n url: PropTypes.string.isRequired,\n caption: PropTypes.string.isRequired,\n numberOfImages: PropTypes.number.isRequired,\n altText: PropTypes.string.isRequired,\n priority: PropTypes.bool.isRequired,\n className: PropTypes.string.isRequired,\n handleImageOnClick: PropTypes.func.isRequired\n};\n\nexport default LongformGalleryImage;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,IAAI,MAAM,WAAW;AAC5B,SAASC,SAAS,QAAQ,oCAAoC;AAC9D,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,cAAc,QAAQ,aAAa;AAE5C,MAAMC,oBAAoB,GAAGC,IAAA,IAUvB;EAAA,IAVwB;MAC5BC,EAAE;MACFC,GAAG;MACHC,OAAO;MACPC,OAAO;MACPC,QAAQ;MACRC,SAAS;MACTC,cAAc;MACdC;IAEF,CAAC,GAAAR,IAAA;IADIS,KAAK,GAAAC,wBAAA,CAAAV,IAAA,EAAAW,SAAA;EAER,MAAM,CAACC,cAAc,EAAEC,QAAQ,CAAC,GAAGjB,SAAS,CAACE,cAAc,CAAC;EAC5D,MAAMgB,YAAY,GAAGT,QAAQ,IAAIO,cAAc;EAC/C,MAAMG,aAAa,GAAGV,QAAQ,GAAGV,IAAI,GAAG,IAAI;EAC5C,MAAMqB,OAAO,GAAI,qBAAoBT,cAAe,EAAC;EAErD,oBACEd,KAAA,CAAAwB,aAAA;IAAKC,GAAG,EAAEL,QAAS;IAACP,SAAS,EAAG,GAAEA,SAAU;EAAE,gBAC5Cb,KAAA,CAAAwB,aAAA;IACEE,IAAI,EAAC,QAAQ;IACbb,SAAS,EAAC,4CAA4C;IACtD,eAAY,4CAA4C;IACxDc,OAAO,EAAEA,CAAA,KAAMZ,kBAAkB,CAACP,EAAE;EAAE,GACrCa,YAAY,iBACXrB,KAAA,CAAAwB,aAAA,CAACpB,eAAe,EAAAwB,QAAA;IACdL,OAAO,EAAEA,OAAQ;IACjBG,IAAI,EAAC,QAAQ;IACbG,GAAG,EAAEpB,GAAI;IACTqB,GAAG,EAAEnB,OAAQ;IACbC,QAAQ,EAAEA,QAAS;IACnBU,aAAa,EAAEA;EAAc,GACzBN,KAAK,CACV,CAEA,CAAC,EACL,CAAC,CAACN,OAAO,iBACRV,KAAA,CAAAwB,aAAA;IACEX,SAAS,EAAC,0CAA0C;IACpD,eAAY;EAA0C,gBACtDb,KAAA,CAAAwB,aAAA;IAAKX,SAAS,EAAC;EAAmD,GAAEH,OAAa,CAC9E,CAEJ,CAAC;AAEV,CAAC;AAEDJ,oBAAoB,CAACyB,SAAS,GAAG;EAC/BvB,EAAE,EAAEP,SAAS,CAAC+B,MAAM,CAACC,UAAU;EAC/BxB,GAAG,EAAER,SAAS,CAAC+B,MAAM,CAACC,UAAU;EAChCvB,OAAO,EAAET,SAAS,CAAC+B,MAAM,CAACC,UAAU;EACpCnB,cAAc,EAAEb,SAAS,CAACiC,MAAM,CAACD,UAAU;EAC3CtB,OAAO,EAAEV,SAAS,CAAC+B,MAAM,CAACC,UAAU;EACpCrB,QAAQ,EAAEX,SAAS,CAACkC,IAAI,CAACF,UAAU;EACnCpB,SAAS,EAAEZ,SAAS,CAAC+B,MAAM,CAACC,UAAU;EACtClB,kBAAkB,EAAEd,SAAS,CAACmC,IAAI,CAACH;AACrC,CAAC;AAED,eAAe3B,oBAAoB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","names":["gql","GET_IMAGES_QUERY","PROPS_TO_CHECK","IN_VIEW_CONFIG","once","offset","bottomOffset"],"sources":["../../../src/variants/LongformGallery/constants.js"],"sourcesContent":["import { gql } from '@apollo/client';\n\nconst GET_IMAGES_QUERY = gql`\n query getImages($where: JSON!) {\n getImages: getFiles(where: $where) {\n id\n url\n data\n }\n }\n`;\n\nconst PROPS_TO_CHECK = ['altText', 'caption', 'hrefUrl', 'credits'];\n\nconst IN_VIEW_CONFIG = {\n once: true,\n offset: '200px',\n bottomOffset: '-200px'\n};\n\nexport { GET_IMAGES_QUERY, IN_VIEW_CONFIG, PROPS_TO_CHECK };\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,MAAMC,gBAAgB,GAAGD,
|
|
1
|
+
{"version":3,"file":"constants.js","names":["gql","GET_IMAGES_QUERY","PROPS_TO_CHECK","IN_VIEW_CONFIG","once","offset","bottomOffset"],"sources":["../../../src/variants/LongformGallery/constants.js"],"sourcesContent":["import { gql } from '@apollo/client';\n\nconst GET_IMAGES_QUERY = gql`\n query getImages($where: JSON!) {\n getImages: getFiles(where: $where) {\n id\n url\n data\n }\n }\n`;\n\nconst PROPS_TO_CHECK = ['altText', 'caption', 'hrefUrl', 'credits'];\n\nconst IN_VIEW_CONFIG = {\n once: true,\n offset: '200px',\n bottomOffset: '-200px'\n};\n\nexport { GET_IMAGES_QUERY, IN_VIEW_CONFIG, PROPS_TO_CHECK };\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,MAAMC,gBAAgB,GAAGD,GAAI;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAME,cAAc,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;AAEnE,MAAMC,cAAc,GAAG;EACrBC,IAAI,EAAE,IAAI;EACVC,MAAM,EAAE,OAAO;EACfC,YAAY,EAAE;AAChB,CAAC;AAED,SAASL,gBAAgB,EAAEE,cAAc,EAAED,cAAc","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import dynamic from 'next/dynamic';
|
|
5
5
|
const LongformGallery = {
|
|
6
|
-
VariantComponent: dynamic(() => import(/* webpackChunkName: "blazePbVariantLongformGallery" */'./LongformGallery')),
|
|
6
|
+
VariantComponent: dynamic(() => import( /* webpackChunkName: "blazePbVariantLongformGallery" */'./LongformGallery')),
|
|
7
7
|
getSettings: componentSettings => _objectSpread(_objectSpread({}, componentSettings), {}, {
|
|
8
8
|
modifier: 'longformGallery'
|
|
9
9
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["dynamic","LongformGallery","VariantComponent","getSettings","componentSettings","_objectSpread","modifier"],"sources":["../../../src/variants/LongformGallery/index.js"],"sourcesContent":["import dynamic from 'next/dynamic';\n\nconst LongformGallery = {\n VariantComponent: dynamic(\n () => import(/* webpackChunkName: \"blazePbVariantLongformGallery\" */ './LongformGallery')\n ),\n getSettings: componentSettings => ({\n ...componentSettings,\n modifier: 'longformGallery'\n })\n};\n\nexport default LongformGallery;\n"],"mappings":";;;AAAA,OAAOA,OAAO,MAAM,cAAc;AAElC,MAAMC,eAAe,GAAG;EACtBC,gBAAgB,EAAEF,OAAO,CACvB,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","names":["dynamic","LongformGallery","VariantComponent","getSettings","componentSettings","_objectSpread","modifier"],"sources":["../../../src/variants/LongformGallery/index.js"],"sourcesContent":["import dynamic from 'next/dynamic';\n\nconst LongformGallery = {\n VariantComponent: dynamic(\n () => import(/* webpackChunkName: \"blazePbVariantLongformGallery\" */ './LongformGallery')\n ),\n getSettings: componentSettings => ({\n ...componentSettings,\n modifier: 'longformGallery'\n })\n};\n\nexport default LongformGallery;\n"],"mappings":";;;AAAA,OAAOA,OAAO,MAAM,cAAc;AAElC,MAAMC,eAAe,GAAG;EACtBC,gBAAgB,EAAEF,OAAO,CACvB,MAAM,MAAM,EAAC,uDAAwD,mBAAmB,CAC1F,CAAC;EACDG,WAAW,EAAEC,iBAAiB,IAAAC,aAAA,CAAAA,aAAA,KACzBD,iBAAiB;IACpBE,QAAQ,EAAE;EAAiB;AAE/B,CAAC;AAED,eAAeL,eAAe","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import dynamic from 'next/dynamic';
|
|
5
5
|
const SlideSummary = {
|
|
6
6
|
getSettings: componentSettings => _objectSpread({}, componentSettings),
|
|
7
|
-
VariantComponent: dynamic(() => import(/* webpackChunkName: "blazePbVariantSlideSummary" */'./SlideSummary'))
|
|
7
|
+
VariantComponent: dynamic(() => import( /* webpackChunkName: "blazePbVariantSlideSummary" */'./SlideSummary'))
|
|
8
8
|
};
|
|
9
9
|
export default SlideSummary;
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["dynamic","SlideSummary","getSettings","componentSettings","_objectSpread","VariantComponent"],"sources":["../../../src/variants/SlideSummary/index.js"],"sourcesContent":["import dynamic from 'next/dynamic';\n\nconst SlideSummary = {\n getSettings: componentSettings => ({\n ...componentSettings\n }),\n VariantComponent: dynamic(\n () => import(/* webpackChunkName: \"blazePbVariantSlideSummary\" */ './SlideSummary')\n )\n};\nexport default SlideSummary;\n"],"mappings":";;;AAAA,OAAOA,OAAO,MAAM,cAAc;AAElC,MAAMC,YAAY,GAAG;EACnBC,WAAW,EAAEC,iBAAiB,IAAAC,aAAA,KACzBD,iBAAiB,CACpB;EACFE,gBAAgB,EAAEL,OAAO,CACvB,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","names":["dynamic","SlideSummary","getSettings","componentSettings","_objectSpread","VariantComponent"],"sources":["../../../src/variants/SlideSummary/index.js"],"sourcesContent":["import dynamic from 'next/dynamic';\n\nconst SlideSummary = {\n getSettings: componentSettings => ({\n ...componentSettings\n }),\n VariantComponent: dynamic(\n () => import(/* webpackChunkName: \"blazePbVariantSlideSummary\" */ './SlideSummary')\n )\n};\nexport default SlideSummary;\n"],"mappings":";;;AAAA,OAAOA,OAAO,MAAM,cAAc;AAElC,MAAMC,YAAY,GAAG;EACnBC,WAAW,EAAEC,iBAAiB,IAAAC,aAAA,KACzBD,iBAAiB,CACpB;EACFE,gBAAgB,EAAEL,OAAO,CACvB,MAAM,MAAM,EAAC,oDAAqD,gBAAgB,CACpF;AACF,CAAC;AACD,eAAeC,YAAY","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import dynamic from 'next/dynamic';
|
|
5
5
|
const ThumbnailCarousel = {
|
|
6
6
|
getSettings: componentSettings => _objectSpread({}, componentSettings),
|
|
7
|
-
VariantComponent: dynamic(() => import(/* webpackChunkName: "blazePbVariantThumbnailCarousel" */'./ThumbnailCarousel'))
|
|
7
|
+
VariantComponent: dynamic(() => import( /* webpackChunkName: "blazePbVariantThumbnailCarousel" */'./ThumbnailCarousel'))
|
|
8
8
|
};
|
|
9
9
|
export default ThumbnailCarousel;
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["dynamic","ThumbnailCarousel","getSettings","componentSettings","_objectSpread","VariantComponent"],"sources":["../../../src/variants/ThumbnailCarousel/index.js"],"sourcesContent":["import dynamic from 'next/dynamic';\n\nconst ThumbnailCarousel = {\n getSettings: componentSettings => ({\n ...componentSettings\n }),\n VariantComponent: dynamic(\n () => import(/* webpackChunkName: \"blazePbVariantThumbnailCarousel\" */ './ThumbnailCarousel')\n )\n};\n\nexport default ThumbnailCarousel;\n"],"mappings":";;;AAAA,OAAOA,OAAO,MAAM,cAAc;AAElC,MAAMC,iBAAiB,GAAG;EACxBC,WAAW,EAAEC,iBAAiB,IAAAC,aAAA,KACzBD,iBAAiB,CACpB;EACFE,gBAAgB,EAAEL,OAAO,CACvB,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","names":["dynamic","ThumbnailCarousel","getSettings","componentSettings","_objectSpread","VariantComponent"],"sources":["../../../src/variants/ThumbnailCarousel/index.js"],"sourcesContent":["import dynamic from 'next/dynamic';\n\nconst ThumbnailCarousel = {\n getSettings: componentSettings => ({\n ...componentSettings\n }),\n VariantComponent: dynamic(\n () => import(/* webpackChunkName: \"blazePbVariantThumbnailCarousel\" */ './ThumbnailCarousel')\n )\n};\n\nexport default ThumbnailCarousel;\n"],"mappings":";;;AAAA,OAAOA,OAAO,MAAM,cAAc;AAElC,MAAMC,iBAAiB,GAAG;EACxBC,WAAW,EAAEC,iBAAiB,IAAAC,aAAA,KACzBD,iBAAiB,CACpB;EACFE,gBAAgB,EAAEL,OAAO,CACvB,MAAM,MAAM,EAAC,yDAA0D,qBAAqB,CAC9F;AACF,CAAC;AAED,eAAeC,iBAAiB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blaze-cms/react-page-builder",
|
|
3
|
-
"version": "0.146.0-node18-
|
|
3
|
+
"version": "0.146.0-node18-tooltips.42",
|
|
4
4
|
"description": "Blaze react page builder",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-es/index.js",
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
},
|
|
28
28
|
"license": "GPL-3.0",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@blaze-cms/core-auth-ui": "0.146.0-node18-
|
|
31
|
-
"@blaze-cms/core-errors": "0.146.0-node18-
|
|
32
|
-
"@blaze-cms/core-errors-ui": "0.146.0-node18-
|
|
30
|
+
"@blaze-cms/core-auth-ui": "0.146.0-node18-tooltips.32",
|
|
31
|
+
"@blaze-cms/core-errors": "0.146.0-node18-tooltips.0",
|
|
32
|
+
"@blaze-cms/core-errors-ui": "0.146.0-node18-tooltips.0",
|
|
33
33
|
"@blaze-cms/image-cdn-react": "0.3.0-alpha.7",
|
|
34
|
-
"@blaze-cms/nextjs-components": "0.146.0-node18-
|
|
35
|
-
"@blaze-cms/plugin-search-ui": "0.146.0-node18-
|
|
36
|
-
"@blaze-cms/setup-ui": "0.146.0-node18-
|
|
37
|
-
"@blaze-cms/utils": "0.146.0-node18-
|
|
38
|
-
"@blaze-cms/utils-handlebars": "0.146.0-node18-
|
|
34
|
+
"@blaze-cms/nextjs-components": "0.146.0-node18-tooltips.38",
|
|
35
|
+
"@blaze-cms/plugin-search-ui": "0.146.0-node18-tooltips.41",
|
|
36
|
+
"@blaze-cms/setup-ui": "0.146.0-node18-tooltips.0",
|
|
37
|
+
"@blaze-cms/utils": "0.146.0-node18-tooltips.32",
|
|
38
|
+
"@blaze-cms/utils-handlebars": "0.146.0-node18-tooltips.38",
|
|
39
39
|
"@blaze-react/badge": "^0.7.0",
|
|
40
40
|
"@blaze-react/breadcrumb": "0.8.0-alpha.60",
|
|
41
41
|
"@blaze-react/button": "0.8.0-alpha.82",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"lib/*",
|
|
93
93
|
"lib-es/*"
|
|
94
94
|
],
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "f90ca068ebbcd3736d2f944e087d7e91082917da"
|
|
96
96
|
}
|
|
@@ -5,10 +5,11 @@ import ContentGroupTabs from './ContentGroupTabs';
|
|
|
5
5
|
import ContentGroupAccordion from './ContentGroupAccordion';
|
|
6
6
|
import { getSectionsData } from './helpers';
|
|
7
7
|
import getStructuredDataProperties from './helpers/get-structured-data-properties';
|
|
8
|
+
import { getCustomHtmlProperties } from '../../helpers';
|
|
8
9
|
|
|
9
10
|
const VALID_TYPES = Object.values(CONTENT_GROUP_TYPES);
|
|
10
11
|
|
|
11
|
-
const ContentGroup = ({ contentType, isFaqContent, children, ...props }) => {
|
|
12
|
+
const ContentGroup = ({ contentType, isFaqContent, children, customHtmlProps, ...props }) => {
|
|
12
13
|
const groupSections = children?.props?.children?.[1];
|
|
13
14
|
|
|
14
15
|
const GroupComponent = useMemo(
|
|
@@ -19,8 +20,17 @@ const ContentGroup = ({ contentType, isFaqContent, children, ...props }) => {
|
|
|
19
20
|
const WrapperComponent = useMemo(() => (!isFaqContent ? Fragment : 'div'), [isFaqContent]);
|
|
20
21
|
|
|
21
22
|
const { topWrapperProps, ...schemaProperties } = useMemo(
|
|
22
|
-
() =>
|
|
23
|
-
|
|
23
|
+
() => {
|
|
24
|
+
const structuredDataProperties = getStructuredDataProperties(isFaqContent);
|
|
25
|
+
return {
|
|
26
|
+
...structuredDataProperties,
|
|
27
|
+
topWrapperProps: {
|
|
28
|
+
...structuredDataProperties.topWrapperProps,
|
|
29
|
+
...getCustomHtmlProperties({ customHtmlProps })
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
[isFaqContent, customHtmlProps]
|
|
24
34
|
);
|
|
25
35
|
|
|
26
36
|
if (!groupSections || !groupSections.length || !VALID_TYPES.includes(contentType)) return '';
|
|
@@ -43,11 +53,18 @@ const ContentGroup = ({ contentType, isFaqContent, children, ...props }) => {
|
|
|
43
53
|
ContentGroup.propTypes = {
|
|
44
54
|
children: PropTypes.object.isRequired,
|
|
45
55
|
contentType: PropTypes.oneOf(VALID_TYPES).isRequired,
|
|
46
|
-
isFaqContent: PropTypes.bool
|
|
56
|
+
isFaqContent: PropTypes.bool,
|
|
57
|
+
customHtmlProps: PropTypes.arrayOf(
|
|
58
|
+
PropTypes.shape({
|
|
59
|
+
name: PropTypes.string,
|
|
60
|
+
value: PropTypes.string
|
|
61
|
+
})
|
|
62
|
+
)
|
|
47
63
|
};
|
|
48
64
|
|
|
49
65
|
ContentGroup.defaultProps = {
|
|
50
|
-
isFaqContent: false
|
|
66
|
+
isFaqContent: false,
|
|
67
|
+
customHtmlProps: []
|
|
51
68
|
};
|
|
52
69
|
|
|
53
70
|
export default ContentGroup;
|
|
@@ -4,7 +4,7 @@ import Wrapper from '../Wrapper';
|
|
|
4
4
|
import { getClassModifiers } from '../../utils';
|
|
5
5
|
import { useGetImages } from '../../hooks';
|
|
6
6
|
import { getStylesToUpdate, checkIfRowHasColumns } from './helpers';
|
|
7
|
-
import { renderChildren, hasChildren } from '../../helpers';
|
|
7
|
+
import { renderChildren, hasChildren, getCustomHtmlProperties } from '../../helpers';
|
|
8
8
|
import { COLUMN } from '../../constants';
|
|
9
9
|
|
|
10
10
|
const Layout = React.forwardRef(
|
|
@@ -19,6 +19,7 @@ const Layout = React.forwardRef(
|
|
|
19
19
|
dataNoSnippet,
|
|
20
20
|
sticky,
|
|
21
21
|
VariantComponent,
|
|
22
|
+
customHtmlProps = [],
|
|
22
23
|
...otherProps
|
|
23
24
|
},
|
|
24
25
|
ref
|
|
@@ -36,6 +37,8 @@ const Layout = React.forwardRef(
|
|
|
36
37
|
const otherWrapperProps = {};
|
|
37
38
|
if (dataNoSnippet) otherWrapperProps['data-nosnippet'] = true;
|
|
38
39
|
|
|
40
|
+
const customHtmlProperties = getCustomHtmlProperties({ customHtmlProps });
|
|
41
|
+
|
|
39
42
|
const WrapperComponent = VariantComponent || Wrapper;
|
|
40
43
|
|
|
41
44
|
return (
|
|
@@ -45,7 +48,8 @@ const Layout = React.forwardRef(
|
|
|
45
48
|
className={type}
|
|
46
49
|
modifiers={`${classModifiers}${additionalRowModifier}`}
|
|
47
50
|
style={style}
|
|
48
|
-
{...otherWrapperProps}
|
|
51
|
+
{...otherWrapperProps}
|
|
52
|
+
{...customHtmlProperties}>
|
|
49
53
|
{title && <h2 className="heading heading--section">{title}</h2>}
|
|
50
54
|
{renderChildren(children, otherProps)}
|
|
51
55
|
</WrapperComponent>
|
|
@@ -64,6 +68,12 @@ Layout.propTypes = {
|
|
|
64
68
|
tagType: PropTypes.string,
|
|
65
69
|
dataNoSnippet: PropTypes.bool,
|
|
66
70
|
VariantComponent: PropTypes.func,
|
|
71
|
+
customHtmlProps: PropTypes.arrayOf(
|
|
72
|
+
PropTypes.shape({
|
|
73
|
+
name: PropTypes.string,
|
|
74
|
+
value: PropTypes.string
|
|
75
|
+
})
|
|
76
|
+
),
|
|
67
77
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired
|
|
68
78
|
};
|
|
69
79
|
|
|
@@ -76,7 +86,8 @@ Layout.defaultProps = {
|
|
|
76
86
|
tagType: '',
|
|
77
87
|
dataNoSnippet: false,
|
|
78
88
|
sticky: false,
|
|
79
|
-
VariantComponent: null
|
|
89
|
+
VariantComponent: null,
|
|
90
|
+
customHtmlProps: []
|
|
80
91
|
};
|
|
81
92
|
|
|
82
93
|
export default Layout;
|
|
@@ -11,7 +11,6 @@ import BlazeLink from '../BlazeLink';
|
|
|
11
11
|
const Menu = ({
|
|
12
12
|
children,
|
|
13
13
|
collapse,
|
|
14
|
-
openActiveSubmenus,
|
|
15
14
|
modifier,
|
|
16
15
|
mobileMenuModifier,
|
|
17
16
|
mobileMenuChildrenModifier,
|
|
@@ -52,7 +51,7 @@ const Menu = ({
|
|
|
52
51
|
});
|
|
53
52
|
|
|
54
53
|
return (
|
|
55
|
-
<MenuContext.Provider value={{ showMobileMenu
|
|
54
|
+
<MenuContext.Provider value={{ showMobileMenu }}>
|
|
56
55
|
<div className={menuWrapperClasses}>
|
|
57
56
|
{collapse && (
|
|
58
57
|
<div className="menu--mobile-wrapper">
|
|
@@ -100,7 +99,6 @@ const Menu = ({
|
|
|
100
99
|
|
|
101
100
|
Menu.propTypes = {
|
|
102
101
|
collapse: PropTypes.bool.isRequired,
|
|
103
|
-
openActiveSubmenus: PropTypes.bool.isRequired,
|
|
104
102
|
logoOnMobile: PropTypes.bool.isRequired,
|
|
105
103
|
logoOnDesktop: PropTypes.bool,
|
|
106
104
|
logoOnMobileUrl: PropTypes.string,
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
2
1
|
import React, { useState, useContext, useEffect } from 'react';
|
|
3
2
|
import PropTypes from 'prop-types';
|
|
4
3
|
import { FaChevronDown, FaChevronUp } from 'react-icons/fa';
|
|
5
|
-
import classnames from 'classnames';
|
|
6
4
|
import { useRouter } from 'next/router';
|
|
7
5
|
import { useStringTemplate } from '@blaze-cms/utils-handlebars';
|
|
8
|
-
import { HOVER, MOUSE_ENTER, MOUSE_LEAVE, HIDDEN
|
|
6
|
+
import { HOVER, MOUSE_ENTER, MOUSE_LEAVE, HIDDEN } from '../../constants';
|
|
9
7
|
import { hasChildren } from '../../helpers';
|
|
10
8
|
import BlazeLink from '../BlazeLink';
|
|
11
9
|
import MenuContext from '../Menu/MenuContext';
|
|
12
|
-
import { injectHelperIntoTemplate
|
|
10
|
+
import { injectHelperIntoTemplate } from './helpers';
|
|
13
11
|
|
|
14
12
|
const MenuItemRender = ({ children, eventType, text, modifier, url, parent }) => {
|
|
15
|
-
const
|
|
16
|
-
const { showMobileMenu
|
|
17
|
-
|
|
18
|
-
const isHoverEvent = eventType === HOVER;
|
|
19
|
-
const isClickEvent = eventType === CLICK;
|
|
20
|
-
|
|
13
|
+
const [displayChildren, setDisplayChildren] = useState(false);
|
|
14
|
+
const { showMobileMenu } = useContext(MenuContext);
|
|
21
15
|
const {
|
|
22
16
|
loading: loadingText,
|
|
23
17
|
data: [textToUse]
|
|
@@ -27,24 +21,14 @@ const MenuItemRender = ({ children, eventType, text, modifier, url, parent }) =>
|
|
|
27
21
|
data: [urlToUse]
|
|
28
22
|
} = useStringTemplate(parent, [injectHelperIntoTemplate(url, 'url_encode')]);
|
|
29
23
|
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
24
|
+
const router = useRouter();
|
|
25
|
+
const isHoverEvent = eventType === HOVER;
|
|
26
|
+
const childrenDisplayClass = displayChildren ? '' : HIDDEN;
|
|
33
27
|
const hasValidChildren = hasChildren(children);
|
|
34
28
|
|
|
35
|
-
const [displayChildren, setDisplayChildren] = useState(shouldPreOpen);
|
|
36
|
-
|
|
37
29
|
useEffect(() => {
|
|
38
|
-
if (!showMobileMenu
|
|
39
|
-
}, [
|
|
40
|
-
children,
|
|
41
|
-
isClickEvent,
|
|
42
|
-
loadingUrl,
|
|
43
|
-
openActiveSubmenus,
|
|
44
|
-
router,
|
|
45
|
-
shouldPreOpen,
|
|
46
|
-
showMobileMenu
|
|
47
|
-
]);
|
|
30
|
+
if (!showMobileMenu) setDisplayChildren(false);
|
|
31
|
+
}, [showMobileMenu]);
|
|
48
32
|
|
|
49
33
|
useEffect(() => {
|
|
50
34
|
if (isHoverEvent) {
|
|
@@ -54,8 +38,6 @@ const MenuItemRender = ({ children, eventType, text, modifier, url, parent }) =>
|
|
|
54
38
|
|
|
55
39
|
if (loadingUrl || loadingText) return '';
|
|
56
40
|
|
|
57
|
-
const childrenDisplayClass = displayChildren ? '' : HIDDEN;
|
|
58
|
-
|
|
59
41
|
const handleItemEvent = ({ type }) => {
|
|
60
42
|
if (isHoverEvent) {
|
|
61
43
|
if (type === MOUSE_ENTER) {
|
|
@@ -73,25 +55,15 @@ const MenuItemRender = ({ children, eventType, text, modifier, url, parent }) =>
|
|
|
73
55
|
}
|
|
74
56
|
};
|
|
75
57
|
|
|
76
|
-
const menuItemLinkClassname = classnames('menu--item--link', {
|
|
77
|
-
'menu--item--link--active': isActive,
|
|
78
|
-
'menu--item--link--active-parent': isActiveParent
|
|
79
|
-
});
|
|
80
|
-
|
|
81
58
|
return (
|
|
82
59
|
<li className={modifier} onMouseEnter={handleItemEvent} onMouseLeave={handleItemEvent}>
|
|
83
60
|
<div
|
|
84
|
-
className=
|
|
61
|
+
className="menu--item--link"
|
|
85
62
|
onClick={handleMobileClick}
|
|
86
63
|
role={!urlToUse && hasValidChildren ? 'button' : undefined}
|
|
87
64
|
tabIndex={!urlToUse && hasValidChildren ? 0 : undefined}>
|
|
88
|
-
{urlToUse ?
|
|
89
|
-
|
|
90
|
-
) : (
|
|
91
|
-
<span role="button" onClick={handleItemEvent}>
|
|
92
|
-
{textToUse}
|
|
93
|
-
</span>
|
|
94
|
-
)}
|
|
65
|
+
{urlToUse ? <BlazeLink href={urlToUse}>{textToUse}</BlazeLink> : <span>{textToUse}</span>}
|
|
66
|
+
|
|
95
67
|
{hasValidChildren && (
|
|
96
68
|
<i
|
|
97
69
|
role="button"
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import injectHelperIntoTemplate from './inject-helper-into-template';
|
|
2
|
-
import isUrlPathMatch from './isUrlPathMatch';
|
|
3
|
-
import hasActiveChild from './has-active-child';
|
|
4
2
|
|
|
5
|
-
export { injectHelperIntoTemplate
|
|
3
|
+
export { injectHelperIntoTemplate };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const getCustomHtmlProperties = ({ customHtmlProps = [] }) =>
|
|
2
|
+
customHtmlProps
|
|
3
|
+
? customHtmlProps.reduce((acc, { name, value }) => {
|
|
4
|
+
if (name) {
|
|
5
|
+
acc[name] = value !== 'null' ? value : undefined;
|
|
6
|
+
}
|
|
7
|
+
return acc;
|
|
8
|
+
}, {})
|
|
9
|
+
: {};
|
|
10
|
+
|
|
11
|
+
export default getCustomHtmlProperties;
|
package/src/helpers/index.js
CHANGED
|
@@ -62,3 +62,4 @@ export { default as shouldSkipSingleQuery } from './should-skip-single-query';
|
|
|
62
62
|
export { default as buildRawQueryStringified } from './build-raw-query-stringified';
|
|
63
63
|
export { default as buildFiltersQuery } from './build-filters-query';
|
|
64
64
|
export { default as getComponentId } from './get-component-id';
|
|
65
|
+
export { default as getCustomHtmlProperties } from './get-custom-html-properties';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jest-environment jsdom
|
|
3
3
|
*/
|
|
4
|
+
import React from 'react';
|
|
4
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
5
6
|
import {
|
|
6
7
|
getMockedProvider,
|
|
@@ -117,4 +118,50 @@ describe('Layout component', () => {
|
|
|
117
118
|
});
|
|
118
119
|
expect(columnNoChildren.toJSON()).toEqual(null);
|
|
119
120
|
});
|
|
121
|
+
|
|
122
|
+
it('should add data-nosnippet attribute when dataNoSnippet prop is true', async () => {
|
|
123
|
+
const componentWithSnippet = await getMockedProvider(Layout, {
|
|
124
|
+
props: getMockedProps({ dataNoSnippet: true })
|
|
125
|
+
});
|
|
126
|
+
const element = componentWithSnippet.root.findByProps({ className: 'row' });
|
|
127
|
+
expect(element.props['data-nosnippet']).toBe(true);
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
it('should not add data-nosnippet attribute when dataNoSnippet prop is false', () => {
|
|
131
|
+
const element = testInstance.findByProps({ className: 'row' });
|
|
132
|
+
expect(element.props['data-nosnippet']).toBeUndefined();
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
it('should render VariantComponent instead of Wrapper when provided', async () => {
|
|
136
|
+
const MockVariant = React.forwardRef((props, ref) => <div ref={ref} {...props} />);
|
|
137
|
+
const componentWithVariant = await getMockedProvider(Layout, {
|
|
138
|
+
props: getMockedProps({ VariantComponent: MockVariant })
|
|
139
|
+
});
|
|
140
|
+
const element = componentWithVariant.root.findByType(MockVariant);
|
|
141
|
+
expect(element).toBeDefined();
|
|
142
|
+
const wrapperElements = shouldThrowError(componentWithVariant, 'findByType', Wrapper);
|
|
143
|
+
expect(wrapperElements).toBeTruthy();
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
it('should spread customHtmlProps onto the wrapper element', async () => {
|
|
147
|
+
const customHtmlProps = [
|
|
148
|
+
{ name: 'data-testid', value: 'custom-layout' },
|
|
149
|
+
{ name: 'aria-label', value: 'My layout' }
|
|
150
|
+
];
|
|
151
|
+
const componentWithCustomProps = await getMockedProvider(Layout, {
|
|
152
|
+
props: getMockedProps({ customHtmlProps })
|
|
153
|
+
});
|
|
154
|
+
const element = componentWithCustomProps.root.findByProps({ className: 'row' });
|
|
155
|
+
expect(element.props['data-testid']).toBe('custom-layout');
|
|
156
|
+
expect(element.props['aria-label']).toBe('My layout');
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
it('should not spread customHtmlProps entries with value "null"', async () => {
|
|
160
|
+
const customHtmlProps = [{ name: 'data-skip', value: 'null' }];
|
|
161
|
+
const componentWithNullProp = await getMockedProvider(Layout, {
|
|
162
|
+
props: getMockedProps({ customHtmlProps })
|
|
163
|
+
});
|
|
164
|
+
const element = componentWithNullProp.root.findByProps({ className: 'row' });
|
|
165
|
+
expect(element.props['data-skip']).toBeUndefined();
|
|
166
|
+
});
|
|
120
167
|
});
|
|
@@ -43,4 +43,47 @@ describe('ContentGroup component', () => {
|
|
|
43
43
|
const faqWrapper = container.querySelector('div[itemtype="https://schema.org/FAQPage"]');
|
|
44
44
|
expect(faqWrapper).toBeTruthy();
|
|
45
45
|
});
|
|
46
|
+
|
|
47
|
+
it('spreads customHtmlProps onto the wrapper element', () => {
|
|
48
|
+
const customHtmlProps = [
|
|
49
|
+
{ name: 'data-testid', value: 'content-group-wrapper' },
|
|
50
|
+
{ name: 'aria-label', value: 'My group' }
|
|
51
|
+
];
|
|
52
|
+
const { container } = render(ContentGroup, {
|
|
53
|
+
contentType: 'tab',
|
|
54
|
+
isFaqContent: true,
|
|
55
|
+
customHtmlProps,
|
|
56
|
+
children: buildChildren()
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const wrapper = container.querySelector('div[data-testid="content-group-wrapper"]');
|
|
60
|
+
expect(wrapper).toBeTruthy();
|
|
61
|
+
expect(wrapper.getAttribute('aria-label')).toBe('My group');
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it('excludes customHtmlProps entries with value "null" from the wrapper', () => {
|
|
65
|
+
const customHtmlProps = [{ name: 'data-skip', value: 'null' }];
|
|
66
|
+
const { container } = render(ContentGroup, {
|
|
67
|
+
contentType: 'tab',
|
|
68
|
+
isFaqContent: true,
|
|
69
|
+
customHtmlProps,
|
|
70
|
+
children: buildChildren()
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
const wrapper = container.querySelector('div[itemtype="https://schema.org/FAQPage"]');
|
|
74
|
+
expect(wrapper).toBeTruthy();
|
|
75
|
+
expect(wrapper.getAttribute('data-skip')).toBeNull();
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it('renders correctly with an empty customHtmlProps array', () => {
|
|
79
|
+
const { container } = render(ContentGroup, {
|
|
80
|
+
contentType: 'tab',
|
|
81
|
+
isFaqContent: true,
|
|
82
|
+
customHtmlProps: [],
|
|
83
|
+
children: buildChildren()
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
const faqWrapper = container.querySelector('div[itemtype="https://schema.org/FAQPage"]');
|
|
87
|
+
expect(faqWrapper).toBeTruthy();
|
|
88
|
+
});
|
|
46
89
|
});
|
|
@@ -19,11 +19,6 @@ jest.mock('next/router', () => ({
|
|
|
19
19
|
useRouter: () => ({ asPath: '/' })
|
|
20
20
|
}));
|
|
21
21
|
|
|
22
|
-
// todo: add extra tests to support this util
|
|
23
|
-
jest.mock('../../../../../src/components/MenuItem/helpers/has-active-child', () =>
|
|
24
|
-
jest.fn(() => false)
|
|
25
|
-
);
|
|
26
|
-
|
|
27
22
|
const componentProps = {
|
|
28
23
|
id: 'id',
|
|
29
24
|
name: 'mock name',
|
|
@@ -11,22 +11,14 @@ const MENU_ITEM_CHILDREN_CLASS = 'menu--item-children';
|
|
|
11
11
|
|
|
12
12
|
let mockAsPathValue = '/';
|
|
13
13
|
|
|
14
|
-
jest.mock('next/router', () => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
useRouter: () => router
|
|
18
|
-
};
|
|
19
|
-
});
|
|
14
|
+
jest.mock('next/router', () => ({
|
|
15
|
+
useRouter: () => ({ asPath: mockAsPathValue })
|
|
16
|
+
}));
|
|
20
17
|
|
|
21
18
|
jest.mock('@blaze-cms/utils-handlebars', () => ({
|
|
22
19
|
useStringTemplate: jest.fn((parent, [title]) => ({ loading: false, data: [title] }))
|
|
23
20
|
}));
|
|
24
21
|
|
|
25
|
-
// todo: add extra tests to support this util
|
|
26
|
-
jest.mock('../../../../../src/components/MenuItem/helpers/has-active-child', () =>
|
|
27
|
-
jest.fn(() => false)
|
|
28
|
-
);
|
|
29
|
-
|
|
30
22
|
describe('MenuRender component', () => {
|
|
31
23
|
it('renders menu item with link when URL is provided', () => {
|
|
32
24
|
const { getByText } = render(<MenuRender eventType="click" text="Home" url="/home" />);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import getCustomHtmlProperties from '../../../../src/helpers/get-custom-html-properties';
|
|
2
|
+
|
|
3
|
+
describe('getCustomHtmlProperties function', () => {
|
|
4
|
+
it('should return an empty object when customHtmlProps is an empty array', () => {
|
|
5
|
+
expect(getCustomHtmlProperties({ customHtmlProps: [] })).toEqual({});
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
it('should return an empty object when customHtmlProps is not provided', () => {
|
|
9
|
+
expect(getCustomHtmlProperties({})).toEqual({});
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('should return an empty object when customHtmlProps is null', () => {
|
|
13
|
+
expect(getCustomHtmlProperties({ customHtmlProps: null })).toEqual({});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('should convert an array of name/value pairs into an object', () => {
|
|
17
|
+
const customHtmlProps = [
|
|
18
|
+
{ name: 'data-id', value: '123' },
|
|
19
|
+
{ name: 'aria-label', value: 'My label' }
|
|
20
|
+
];
|
|
21
|
+
expect(getCustomHtmlProperties({ customHtmlProps })).toEqual({
|
|
22
|
+
'data-id': '123',
|
|
23
|
+
'aria-label': 'My label'
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('should exclude entries where value is the string "null"', () => {
|
|
28
|
+
const customHtmlProps = [
|
|
29
|
+
{ name: 'data-id', value: '123' },
|
|
30
|
+
{ name: 'data-skip', value: 'null' }
|
|
31
|
+
];
|
|
32
|
+
expect(getCustomHtmlProperties({ customHtmlProps })).toEqual({ 'data-id': '123' });
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('should exclude entries where name is falsy', () => {
|
|
36
|
+
const customHtmlProps = [
|
|
37
|
+
{ name: 'data-id', value: '123' },
|
|
38
|
+
{ name: '', value: 'ignored' },
|
|
39
|
+
{ name: null, value: 'also-ignored' }
|
|
40
|
+
];
|
|
41
|
+
expect(getCustomHtmlProperties({ customHtmlProps })).toEqual({ 'data-id': '123' });
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('should return an empty object when all entries are invalid', () => {
|
|
45
|
+
const customHtmlProps = [{ name: '', value: 'foo' }, { name: 'bar', value: 'null' }];
|
|
46
|
+
expect(getCustomHtmlProperties({ customHtmlProps })).toEqual({});
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
require("core-js/modules/es.array.find.js");
|
|
10
|
-
require("core-js/modules/es.object.to-string.js");
|
|
11
|
-
var _isUrlPathMatch = _interopRequireDefault(require("./isUrlPathMatch"));
|
|
12
|
-
var _helpers = require("../../../helpers");
|
|
13
|
-
var hasActiveChild = function hasActiveChild(path, children) {
|
|
14
|
-
return (0, _helpers.hasChildren)(children) && children.props.children[1][0].props.component.items.find(function (menuItem) {
|
|
15
|
-
return (0, _isUrlPathMatch["default"])(path, menuItem.settings.url);
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
var _default = exports["default"] = hasActiveChild;
|
|
19
|
-
//# sourceMappingURL=has-active-child.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"has-active-child.js","names":["_isUrlPathMatch","_interopRequireDefault","require","_helpers","hasActiveChild","path","children","hasChildren","props","component","items","find","menuItem","isUrlPathMatch","settings","url","_default","exports"],"sources":["../../../../src/components/MenuItem/helpers/has-active-child.js"],"sourcesContent":["import isUrlPathMatch from './isUrlPathMatch';\nimport { hasChildren } from '../../../helpers';\n\nconst hasActiveChild = (path, children) =>\n hasChildren(children) &&\n children.props.children[1][0].props.component.items.find(menuItem =>\n isUrlPathMatch(path, menuItem.settings.url)\n );\n\nexport default hasActiveChild;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAME,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,IAAI,EAAEC,QAAQ;EAAA,OACpC,IAAAC,oBAAW,EAACD,QAAQ,CAAC,IACrBA,QAAQ,CAACE,KAAK,CAACF,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACE,KAAK,CAACC,SAAS,CAACC,KAAK,CAACC,IAAI,CAAC,UAAAC,QAAQ;IAAA,OAC/D,IAAAC,0BAAc,EAACR,IAAI,EAAEO,QAAQ,CAACE,QAAQ,CAACC,GAAG,CAAC;EAAA,CAC7C,CAAC;AAAA;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEWb,cAAc","ignoreList":[]}
|