@blaze-cms/react-page-builder 0.146.0-core-styles.42 → 0.146.0-node18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -197
- package/lib/HOC/recreateOnNavigation.js.map +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.map +1 -1
- package/lib/components/Banner/AdSlotRender.js +1 -1
- package/lib/components/Banner/Banner.js +1 -1
- package/lib/components/Banner/BannerRender.js.map +1 -1
- package/lib/components/Breadcrumb/Breadcrumb.js +1 -1
- package/lib/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/lib/components/Button.js.map +1 -1
- package/lib/components/Card/CardsContainer.js +1 -1
- package/lib/components/Card/CardsFactory.js.map +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.map +1 -1
- package/lib/components/ContentGroup/ContentGroupTabs.js +1 -1
- 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/DataSummaryRender.js +1 -0
- package/lib/components/DataSummary/DataSummaryRender.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js +1 -1
- 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 +3 -3
- package/lib/components/EmailConfirm/EmailConfirm.js.map +1 -1
- package/lib/components/Image/GlobalLightbox/GlobalLightbox.js +2 -2
- package/lib/components/Image/GlobalLightbox/GlobalLightbox.js.map +1 -1
- package/lib/components/Image/GlobalLightbox/index.js.map +1 -1
- package/lib/components/Image/Image.js.map +1 -1
- package/lib/components/Image/ImageFactory.js +1 -1
- package/lib/components/Image/ImageFactory.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/hooks/use-item-list-id.js.map +1 -1
- package/lib/components/Layout/LayoutFactory.js.map +1 -1
- package/lib/components/Layout/LayoutWithStickyTimer.js.map +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/CardsRenderWrapper.js +1 -1
- package/lib/components/List/components/Full/FullRender.js +1 -1
- package/lib/components/List/components/Full/FullRenderItem.js +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.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/helpers/build-query-booster.js +1 -1
- package/lib/components/List/helpers/sort-aggs.js.map +1 -1
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/MenuItem/MenuItemRender.js.map +1 -1
- package/lib/components/ModalAdapter/index.js.map +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 +1 -1
- package/lib/components/SearchFilter/SearchFilter/SearchFilter.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/providers/Vimeo/VimeoProvider.js.map +1 -1
- package/lib/components/Video/providers/YouTube/YoutubeEmbeded.js.map +1 -1
- 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.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-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-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/process-data-summary-value.js +1 -1
- package/lib/helpers/remove-unwanted-characters.js +1 -1
- package/lib/helpers/remove-unwanted-characters.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 +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 +1 -1
- package/lib/hooks/use-page-builder.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/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/index.js.map +1 -1
- 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.map +1 -1
- package/lib-es/HOC/recreateOnNavigation.js.map +1 -1
- package/lib-es/HOC/withTitle.js.map +1 -1
- package/lib-es/components/BackToTop/BackToTop.js.map +1 -1
- package/lib-es/components/Banner/BannerRender.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/CardsFactory.js.map +1 -1
- package/lib-es/components/Card/CardsRender.js.map +1 -1
- package/lib-es/components/CarouselWrapper/DefaultCarousel.js.map +1 -1
- package/lib-es/components/ContentGroup/ContentGroupTabs.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/index.js.map +1 -1
- package/lib-es/components/DateTime/DateTime.js +4 -4
- package/lib-es/components/DateTime/DateTime.js.map +1 -1
- package/lib-es/components/EmailConfirm/EmailConfirm.js +4 -4
- package/lib-es/components/EmailConfirm/EmailConfirm.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/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/hooks/use-item-list-id.js.map +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/List/ListFactory.js.map +1 -1
- package/lib-es/components/List/ListRender.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/sort-aggs.js.map +1 -1
- package/lib-es/components/Menu/Menu.js.map +1 -1
- package/lib-es/components/MenuItem/MenuItemRender.js.map +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/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
- package/lib-es/components/Video/providers/Vimeo/VimeoProvider.js.map +1 -1
- package/lib-es/components/Video/providers/YouTube/YoutubeEmbeded.js.map +1 -1
- 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.map +1 -1
- package/lib-es/constants/index.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/get-current-offset.js +1 -1
- package/lib-es/helpers/get-current-offset.js.map +1 -1
- package/lib-es/helpers/get-wrapped-value-with-link.js.map +1 -1
- package/lib-es/helpers/remove-unwanted-characters.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.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/variants/Infographic/index.js.map +1 -1
- package/lib-es/variants/LongformGallery/LongformGallery.js.map +1 -1
- package/lib-es/variants/LongformGallery/index.js.map +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.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 +12 -16
- package/src/components/MenuItem/MenuItemRender.js +3 -6
- package/src/components/ModalAdapter/index.js +2 -2
- package/src/components/SearchContent/SearchContent.js +26 -32
- package/src/components/SearchFilter/SearchFilter/SearchFilter.js +15 -19
- package/src/components/Video/providers/Vimeo/VimeoProvider.js +19 -22
- package/src/components/Video/providers/YouTube/YoutubeEmbeded.js +58 -64
- package/src/components/Video/providers/get-provider.js +4 -4
- package/src/components/Wrapper.js +5 -7
- package/src/components/index.js +20 -20
- package/src/constants/index.js +2 -1
- package/src/helpers/build-search-values-checkbox-select.js +1 -1
- package/src/helpers/get-current-offset.js +1 -1
- package/src/helpers/get-wrapped-value-with-link.js +1 -1
- package/src/helpers/remove-unwanted-characters.js +1 -4
- package/src/hooks/helpers/buildPBComponents.js +2 -4
- package/src/hooks/helpers/get-components-to-insert-by-type.js +3 -1
- package/src/hooks/helpers/inject-textblock-banners.js +2 -8
- package/src/hooks/use-check-mobile-screen.js +5 -8
- package/src/hooks/use-get-entity-schema.js +5 -1
- package/src/hooks/use-get-image-id-from-relation.js +5 -1
- package/src/hooks/use-page-builder.js +9 -12
- package/src/variants/Infographic/index.js +2 -2
- package/src/variants/LongformGallery/LongformGallery.js +2 -8
- package/src/variants/LongformGallery/index.js +2 -2
- package/src/variants/SlideSummary/index.js +2 -2
- package/src/variants/ThumbnailCarousel/ThumbnailImage/ThumbnailImage.js +2 -3
- package/src/variants/ThumbnailCarousel/index.js +2 -2
- package/tests/unit/src/HOC/withTitle.test.js +11 -21
- package/tests/unit/src/Layout/Layout.test.js +2 -1
- package/tests/unit/src/Layout/helpers/check-if-row-has-columns.test.js +1 -0
- package/tests/unit/src/components/Banner/AdSlotRender.test.js +4 -1
- package/tests/unit/src/components/Banner/helpers.test.js +34 -7
- package/tests/unit/src/components/BlazeLink.test.js +1 -4
- package/tests/unit/src/components/Breadcrumb/__snapshots__/Breadcrumb.test.js.snap +18 -0
- package/tests/unit/src/components/Card/Card.test.js +17 -4
- package/tests/unit/src/components/Card/CardContainer.test.js +7 -1
- package/tests/unit/src/components/Card/__snapshots__/Card.test.js.snap +15 -0
- package/tests/unit/src/components/Card/__snapshots__/CardContainer.test.js.snap +12 -0
- package/tests/unit/src/components/Card/mockData.js +2 -4
- package/tests/unit/src/components/Carousel/CarouselRender/CarouselRender.test.js +47 -46
- package/tests/unit/src/components/Carousel/CarouselRender/__snapshots__/CarouselRender.test.js.snap +45 -1
- package/tests/unit/src/components/Carousel/CarouselRender/mocks.js +0 -0
- package/tests/unit/src/components/Carousel/__snapshots__/Carousel.test.js.snap +1 -1
- package/tests/unit/src/components/ContentGroup/ContentGroupTabs.test.js +4 -1
- package/tests/unit/src/components/ContentGroup/helpers/get-sections-data.test.js +4 -1
- package/tests/unit/src/components/DataSummary/__snapshots__/DataSummaryRender.test.js.snap +0 -1
- package/tests/unit/src/components/DataSummary/helpers/build-props-to-display-with-content.test.js +5 -1
- package/tests/unit/src/components/DataSummary/helpers/get-value-from-array.test.js +4 -1
- package/tests/unit/src/components/DataSummary/helpers/strip-summary-props-content.test.js +8 -2
- package/tests/unit/src/components/DataSummary/mockData.js +4 -1
- package/tests/unit/src/components/Image/ImageFactory.test.js +4 -3
- package/tests/unit/src/components/ItemList/ItemListCounter.test.js +2 -1
- package/tests/unit/src/components/ItemList/hooks/use-item-list-id.test.js +1 -1
- package/tests/unit/src/components/Layout/LayoutFactory.test.js +0 -4
- package/tests/unit/src/components/List/components/Cards/CardsRender.test.js +8 -1
- package/tests/unit/src/components/List/components/Pagination/Classic.test.js +1 -1
- package/tests/unit/src/components/PlaceholderIcon/index.test.js +2 -2
- package/tests/unit/src/components/SearchFilter/components/Range.test.js +5 -5
- package/tests/unit/src/components/SearchFilter/components/__snapshots__/Range.test.js.snap +175 -190
- package/tests/unit/src/components/SearchFilter/helpers/get-select-options.test.js +8 -2
- package/tests/unit/src/components/TextBlock/TextBlock.test.js +1 -1
- package/tests/unit/src/components/TextBlock/__snapshots__/TextBlock.test.js.snap +12 -0
- package/tests/unit/src/helpers/__snapshots__/parse-textBlock.test.js.snap +3 -0
- package/tests/unit/src/helpers/build-checkbox-filters.test.js +4 -1
- package/tests/unit/src/helpers/get-dictionary-match.test.js +1 -1
- package/tests/unit/src/helpers/parse-textBlock.test.js +3 -1
- package/tests/unit/src/hooks/use-check-mobile-screen.test.js +3 -2
- package/tests/unit/src/hooks/use-get-image-id-from-relation.test.js +3 -3
- package/tests/unit/src/hooks/use-get-images.test.js +16 -14
- package/tests/unit/src/hooks/use-get-single-entity-schema.test.js +6 -4
- package/tests/unit/src/hooks/use-page-builder.test.js +0 -48
package/src/HOC/withTitle.js
CHANGED
|
@@ -24,9 +24,9 @@ const withTitle = Component => {
|
|
|
24
24
|
|
|
25
25
|
InnerComponent.WrappedComponent = Component;
|
|
26
26
|
|
|
27
|
-
InnerComponent.displayName = `WithTitle(${
|
|
28
|
-
Component.name ||
|
|
29
|
-
|
|
27
|
+
InnerComponent.displayName = `WithTitle(${
|
|
28
|
+
Component.displayName || Component.name || 'Component'
|
|
29
|
+
})`;
|
|
30
30
|
|
|
31
31
|
InnerComponent.propTypes = {
|
|
32
32
|
parent: PropTypes.object,
|
|
@@ -5,14 +5,11 @@ import { FaArrowUp } from 'react-icons/fa';
|
|
|
5
5
|
const BackToTop = ({ type, showAfterPixels }) => {
|
|
6
6
|
const [goToTop, setGoToTop] = useState(false);
|
|
7
7
|
|
|
8
|
-
useEffect(
|
|
9
|
-
() =>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
[showAfterPixels]
|
|
15
|
-
);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
const handleOnScroll = () => setGoToTop(window.scrollY >= showAfterPixels);
|
|
10
|
+
document.addEventListener('scroll', handleOnScroll);
|
|
11
|
+
return () => document.removeEventListener('scroll', handleOnScroll);
|
|
12
|
+
}, [showAfterPixels]);
|
|
16
13
|
|
|
17
14
|
const handleBackToTop = event => {
|
|
18
15
|
event.preventDefault();
|
|
@@ -12,7 +12,11 @@ const Breadcrumb = ({ type, ...otherProps }) => {
|
|
|
12
12
|
const { parent } = otherProps;
|
|
13
13
|
const { itemEntity, itemId } = parent;
|
|
14
14
|
|
|
15
|
-
const {
|
|
15
|
+
const {
|
|
16
|
+
data = {},
|
|
17
|
+
error,
|
|
18
|
+
loading
|
|
19
|
+
} = useQuery(getSingleEntitySchema, {
|
|
16
20
|
variables: { id: itemEntity }
|
|
17
21
|
});
|
|
18
22
|
|
package/src/components/Button.js
CHANGED
|
@@ -44,12 +44,9 @@ const Button = props => {
|
|
|
44
44
|
data: [textToUse, afterClickTextToUse, urlToUse]
|
|
45
45
|
} = useStringTemplate(parent, [text, afterClickText, url]);
|
|
46
46
|
|
|
47
|
-
useEffect(
|
|
48
|
-
()
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
[router.asPath]
|
|
52
|
-
);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
setShowChildren(false);
|
|
49
|
+
}, [router.asPath]);
|
|
53
50
|
|
|
54
51
|
const checkIfButtonShouldRender = () => {
|
|
55
52
|
if (isLogoutButton) return !!blazeCookie;
|
|
@@ -31,13 +31,14 @@ const CardsFactory = ({
|
|
|
31
31
|
|
|
32
32
|
const itemListId = getItemListId(itemListName, queryItemListId);
|
|
33
33
|
|
|
34
|
-
const {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
34
|
+
const {
|
|
35
|
+
data: itemListData = {},
|
|
36
|
+
loading: itemListLoading,
|
|
37
|
+
error: itemListError
|
|
38
|
+
} = useQuery(getItemList, {
|
|
39
|
+
variables: { id: itemListId },
|
|
40
|
+
skip: !itemListId
|
|
41
|
+
});
|
|
41
42
|
|
|
42
43
|
if (loading || itemListLoading) return '';
|
|
43
44
|
if (error || itemListError) return error.message || itemListError.message;
|
|
@@ -66,9 +66,11 @@ const CardsRender = ({
|
|
|
66
66
|
const unpublishedParentEntityName = getUnpublishedEntityName(parentEntity);
|
|
67
67
|
const allEntityNames = [...entitiesToUse, unpublishedParentEntityName];
|
|
68
68
|
const uniqueEntityNames = [...new Set(allEntityNames)];
|
|
69
|
-
const {
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
const {
|
|
70
|
+
data: mainSchemas = {},
|
|
71
|
+
loading: _loading,
|
|
72
|
+
error: _error
|
|
73
|
+
} = useGetEntitySchemasAsObj(uniqueEntityNames);
|
|
72
74
|
const parentSchema = mainSchemas[unpublishedParentEntityName] || {};
|
|
73
75
|
const filterEntitySchema = mainSchemas[primaryEntityToUse] || {};
|
|
74
76
|
const entitiesTypes = entitiesToUse.map(ent => getEntityData(ent, mainSchemas[ent]));
|
|
@@ -15,36 +15,30 @@ const DefaultCarousel = ({
|
|
|
15
15
|
const [shouldAutoScroll, setShouldAutoScroll] = useState(false);
|
|
16
16
|
const autoScrollRef = useRef();
|
|
17
17
|
|
|
18
|
-
useEffect(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
handleButtonNavigation(true);
|
|
27
|
-
}
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
autoScrollRef.current = shouldAutoScroll;
|
|
20
|
+
const id = setInterval(scrollCheck, autoScrollTimer);
|
|
21
|
+
function scrollCheck() {
|
|
22
|
+
if (!autoScrollRef.current) {
|
|
23
|
+
clearInterval(id);
|
|
24
|
+
} else {
|
|
25
|
+
handleButtonNavigation(true);
|
|
28
26
|
}
|
|
27
|
+
}
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
[autoScrollTimer, shouldAutoScroll]
|
|
33
|
-
);
|
|
29
|
+
return () => clearInterval(id);
|
|
30
|
+
}, [autoScrollTimer, shouldAutoScroll]);
|
|
34
31
|
|
|
35
|
-
useEffect(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
const {
|
|
34
|
+
current: { offsetWidth, scrollWidth }
|
|
35
|
+
} = ref;
|
|
36
|
+
if (scrollWidth <= offsetWidth) {
|
|
37
|
+
setButtonDisplays({ displayLeft: false, displayRight: false });
|
|
38
|
+
}
|
|
43
39
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
[enableAutoScroll]
|
|
47
|
-
);
|
|
40
|
+
setShouldAutoScroll(enableAutoScroll);
|
|
41
|
+
}, [enableAutoScroll]);
|
|
48
42
|
|
|
49
43
|
const handleScroll = () => {
|
|
50
44
|
const {
|
|
@@ -13,13 +13,10 @@ const ContentGroupTabs = ({ name, contentType, groupSections, sectionsData, Vari
|
|
|
13
13
|
const contentGroupClass = `${CONTENT_GROUP}-${contentClassame}__buttons-wrapper`;
|
|
14
14
|
const sectionClass = `${CONTENT_GROUP}-${contentClassame}__content-section`;
|
|
15
15
|
|
|
16
|
-
useEffect(
|
|
17
|
-
()
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
[asPath, sectionsData, selectedTab]
|
|
22
|
-
);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
const activeTab = getActiveTab(sectionsData, asPath);
|
|
18
|
+
if (activeTab !== selectedTab) setSelectedTab(activeTab);
|
|
19
|
+
}, [asPath, sectionsData, selectedTab]);
|
|
23
20
|
|
|
24
21
|
const WrapperComponent = VariantComponent || 'div';
|
|
25
22
|
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import dynamic from 'next/dynamic';
|
|
2
2
|
|
|
3
3
|
export const summaryComponents = {
|
|
4
|
-
list: dynamic(
|
|
5
|
-
import(/* webpackChunkName: "blazePbDataSummaryListSummary" */ './ListSummary')
|
|
4
|
+
list: dynamic(
|
|
5
|
+
() => import(/* webpackChunkName: "blazePbDataSummaryListSummary" */ './ListSummary')
|
|
6
6
|
),
|
|
7
|
-
large: dynamic(
|
|
8
|
-
import(/* webpackChunkName: "blazePbDataSummaryLargeSummary" */ './LargeSummary')
|
|
7
|
+
large: dynamic(
|
|
8
|
+
() => import(/* webpackChunkName: "blazePbDataSummaryLargeSummary" */ './LargeSummary')
|
|
9
9
|
),
|
|
10
|
-
text: dynamic(
|
|
11
|
-
import(/* webpackChunkName: "blazePbDataSummaryTextSummary" */ './TextSummary')
|
|
10
|
+
text: dynamic(
|
|
11
|
+
() => import(/* webpackChunkName: "blazePbDataSummaryTextSummary" */ './TextSummary')
|
|
12
12
|
),
|
|
13
|
-
heading_large: dynamic(
|
|
14
|
-
|
|
13
|
+
heading_large: dynamic(
|
|
14
|
+
() =>
|
|
15
|
+
import(
|
|
16
|
+
/* webpackChunkName: "blazePbDataSummaryHeadingLargeSummary" */ './HeadingLargeSummary'
|
|
17
|
+
)
|
|
15
18
|
),
|
|
16
|
-
item_details: dynamic(
|
|
17
|
-
|
|
19
|
+
item_details: dynamic(
|
|
20
|
+
() =>
|
|
21
|
+
import(/* webpackChunkName: "blazePbDataSummaryItemDetailsSummary" */ './ItemDetailsSummary')
|
|
18
22
|
)
|
|
19
23
|
};
|
|
@@ -11,11 +11,11 @@ const DateTime = ({ format, customFormat, modifier }) => {
|
|
|
11
11
|
|
|
12
12
|
if (!dateFormat) return null;
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const formatedDate = dayjs().format(dateFormat);
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<Wrapper className="date" modifiers={modifier}>
|
|
18
|
-
{
|
|
18
|
+
{formatedDate}
|
|
19
19
|
</Wrapper>
|
|
20
20
|
);
|
|
21
21
|
};
|
|
@@ -27,8 +27,8 @@ DateTime.propTypes = {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
DateTime.defaultProps = {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
modifier: null,
|
|
31
|
+
customFormat: ''
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export default DateTime;
|
|
@@ -6,7 +6,7 @@ import { parseUrl } from 'query-string';
|
|
|
6
6
|
import EMAIL_CONFIRM_MUTATION from './mutation';
|
|
7
7
|
import { renderChildren } from '../../helpers';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
function EmailConfirm({ modifier, errorMessage, children }) {
|
|
10
10
|
const router = useRouter();
|
|
11
11
|
const { asPath } = router;
|
|
12
12
|
|
|
@@ -16,8 +16,7 @@ const EmailConfirm = ({ modifier, errorMessage, children }) => {
|
|
|
16
16
|
onCompleted: ({ confirmUserEmail }) => {
|
|
17
17
|
const {
|
|
18
18
|
result: { extras }
|
|
19
|
-
} =
|
|
20
|
-
confirmUserEmail || {};
|
|
19
|
+
} = confirmUserEmail || {};
|
|
21
20
|
const { redirectUrl } = extras || {};
|
|
22
21
|
setDisplayError(false);
|
|
23
22
|
if (redirectUrl && !setRedirectUrl) {
|
|
@@ -26,18 +25,17 @@ const EmailConfirm = ({ modifier, errorMessage, children }) => {
|
|
|
26
25
|
}
|
|
27
26
|
});
|
|
28
27
|
|
|
29
|
-
useEffect(
|
|
30
|
-
()
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
[emailConfirmMutation, token]
|
|
34
|
-
);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (token) emailConfirmMutation({ variables: { token } });
|
|
30
|
+
}, [emailConfirmMutation, token]);
|
|
35
31
|
|
|
36
32
|
if ((token && !called) || loading) return null;
|
|
37
33
|
const renderedChildren = renderChildren(children);
|
|
38
34
|
|
|
39
|
-
return
|
|
40
|
-
}
|
|
35
|
+
return (
|
|
36
|
+
<div>{displayError ? <span className={modifier}>{errorMessage}</span> : renderedChildren}</div>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
41
39
|
|
|
42
40
|
EmailConfirm.propTypes = {
|
|
43
41
|
modifier: PropTypes.string,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { ResponsiveImage } from '@blaze-cms/image-cdn-react';
|
|
4
4
|
import { FaTimes } from 'react-icons/fa';
|
|
@@ -123,14 +123,12 @@ const GlobalLightbox = ({ images, onClose, selectedImage, metaTitle, parentName
|
|
|
123
123
|
/>
|
|
124
124
|
</BlazeLink>
|
|
125
125
|
) : (
|
|
126
|
-
<
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
/>
|
|
133
|
-
</Fragment>
|
|
126
|
+
<ResponsiveImage
|
|
127
|
+
src={imageUrl}
|
|
128
|
+
alt={altText}
|
|
129
|
+
sizeKey="globalLightbox"
|
|
130
|
+
data-testid="globalLightboxImage"
|
|
131
|
+
/>
|
|
134
132
|
)}
|
|
135
133
|
</div>
|
|
136
134
|
</div>
|
|
@@ -36,10 +36,12 @@ const Image = ({
|
|
|
36
36
|
const [displayLightbox, setDisplayLightbox] = useState(false);
|
|
37
37
|
const [isIntersecting, outerRef] = useInView(IN_VIEW_CONFIG);
|
|
38
38
|
|
|
39
|
-
const {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
const {
|
|
40
|
+
caption,
|
|
41
|
+
altText,
|
|
42
|
+
hrefUrl,
|
|
43
|
+
credits: imageDataCredits
|
|
44
|
+
} = getImageData(otherProps, imageData);
|
|
43
45
|
|
|
44
46
|
const href = url || hrefUrl;
|
|
45
47
|
|
|
@@ -41,11 +41,11 @@ const ImageFactory = props => {
|
|
|
41
41
|
: getImageIds(imageRelation, relationData, imageId);
|
|
42
42
|
const imageIds =
|
|
43
43
|
updatedImageIds && updatedImageIds.length === 1 ? updatedImageIds[0] : updatedImageIds;
|
|
44
|
-
const {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
);
|
|
44
|
+
const {
|
|
45
|
+
data: { getFile, getFiles = [] } = {},
|
|
46
|
+
loading,
|
|
47
|
+
error
|
|
48
|
+
} = useGetImages(imageIds, updatedImageIds && updatedImageIds.length > 1, !!imgSrcToUse);
|
|
49
49
|
if (error) return error.message;
|
|
50
50
|
if (loading) return '';
|
|
51
51
|
|
|
@@ -5,21 +5,18 @@ const useItemListId = ({ listName }) => {
|
|
|
5
5
|
const idFromStorage = getItemListId(listName);
|
|
6
6
|
const [listId, setListId] = useState(idFromStorage);
|
|
7
7
|
|
|
8
|
-
useEffect(
|
|
9
|
-
() => {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
const storageEventHandler = () => {
|
|
10
|
+
const newId = getItemListId(listName);
|
|
11
|
+
setListId(newId);
|
|
12
|
+
};
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
window.addEventListener('storage', storageEventHandler);
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
[listName]
|
|
22
|
-
);
|
|
16
|
+
return () => {
|
|
17
|
+
window.removeEventListener('storage', storageEventHandler);
|
|
18
|
+
};
|
|
19
|
+
}, [listName]);
|
|
23
20
|
|
|
24
21
|
return { listId };
|
|
25
22
|
};
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import dynamic from 'next/dynamic';
|
|
3
3
|
import Layout from './Layout';
|
|
4
4
|
|
|
5
|
-
const LayoutWithStickyTimer = dynamic(
|
|
6
|
-
import(/* webpackChunkName: "blazePbLayoutWithStickyTimer" */ './LayoutWithStickyTimer')
|
|
5
|
+
const LayoutWithStickyTimer = dynamic(
|
|
6
|
+
() => import(/* webpackChunkName: "blazePbLayoutWithStickyTimer" */ './LayoutWithStickyTimer')
|
|
7
7
|
);
|
|
8
8
|
|
|
9
9
|
const LayoutFactory = props => {
|
|
@@ -8,21 +8,18 @@ const LayoutWithStickyTimer = ({ sticky, stickyTimer, ...otherProps }) => {
|
|
|
8
8
|
const [isIntersecting, outerRef] = useInView({});
|
|
9
9
|
const [isSticky, setIsSticky] = useState(sticky);
|
|
10
10
|
|
|
11
|
-
useEffect(
|
|
12
|
-
()
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}, stickyTimer);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
if (isIntersecting && sticky && !!stickyTimer) {
|
|
13
|
+
setIsSticky(true);
|
|
14
|
+
const timer = setTimeout(() => {
|
|
15
|
+
setIsSticky(false);
|
|
16
|
+
}, stickyTimer);
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
[isIntersecting, stickyTimer, sticky]
|
|
25
|
-
);
|
|
18
|
+
return () => {
|
|
19
|
+
clearTimeout(timer);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}, [isIntersecting, stickyTimer, sticky]);
|
|
26
23
|
|
|
27
24
|
return <Layout {...otherProps} sticky={isSticky} ref={sticky ? outerRef : null} />;
|
|
28
25
|
};
|
|
@@ -89,10 +89,8 @@ const ListFactory = props => {
|
|
|
89
89
|
error: schemasError
|
|
90
90
|
} = useGetEntitySchemasAsObj([updatedParentEntity, ...entitiesToUse]);
|
|
91
91
|
|
|
92
|
-
const {
|
|
93
|
-
|
|
94
|
-
[filterEntity]: filterEntitySchema = {}
|
|
95
|
-
} = mainSchemas;
|
|
92
|
+
const { [updatedParentEntity]: currentSchema = {}, [filterEntity]: filterEntitySchema = {} } =
|
|
93
|
+
mainSchemas;
|
|
96
94
|
|
|
97
95
|
const {
|
|
98
96
|
data: requiredSchema = {},
|
|
@@ -116,13 +114,14 @@ const ListFactory = props => {
|
|
|
116
114
|
skip: schemasLoading || (!inheritedFilters.length && queryProps === ID)
|
|
117
115
|
});
|
|
118
116
|
|
|
119
|
-
const {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
117
|
+
const {
|
|
118
|
+
data: itemListData = {},
|
|
119
|
+
error: itemListError,
|
|
120
|
+
loading: itemListLoading
|
|
121
|
+
} = useQuery(getItemList, {
|
|
122
|
+
variables: { id: itemListId },
|
|
123
|
+
skip: !itemListId
|
|
124
|
+
});
|
|
126
125
|
|
|
127
126
|
if (!hasRequiredItemListDetails({ itemListName, router, itemListId, queryItemListId })) return '';
|
|
128
127
|
|
|
@@ -34,7 +34,12 @@ const ListRender = props => {
|
|
|
34
34
|
props
|
|
35
35
|
});
|
|
36
36
|
const boostedVariables = buildQueryBooster(props, updatedVariables);
|
|
37
|
-
const {
|
|
37
|
+
const {
|
|
38
|
+
data = {},
|
|
39
|
+
error,
|
|
40
|
+
loading,
|
|
41
|
+
fetchMore
|
|
42
|
+
} = useQuery(action, {
|
|
38
43
|
variables: boostedVariables
|
|
39
44
|
});
|
|
40
45
|
|
|
@@ -30,12 +30,9 @@ const ListPagination = ({
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
useEffect(
|
|
34
|
-
()
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
[isInfinite]
|
|
38
|
-
);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (isInfinite) setShowPagination(false);
|
|
35
|
+
}, [isInfinite]);
|
|
39
36
|
|
|
40
37
|
if (!showPagination) return null;
|
|
41
38
|
const totalRecordsToFetch = limitToUse || listTotal;
|
|
@@ -15,15 +15,13 @@ const LoadMore = ({ name, currentPage, query, url, triggerInfiniteScroll, isLast
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</BlazeLink>
|
|
26
|
-
</>
|
|
18
|
+
<BlazeLink
|
|
19
|
+
className="pagination_load-more"
|
|
20
|
+
role="button"
|
|
21
|
+
href={nextPageLink}
|
|
22
|
+
onClick={loadMoreItems}>
|
|
23
|
+
{LOAD_MORE_STRING}
|
|
24
|
+
</BlazeLink>
|
|
27
25
|
);
|
|
28
26
|
};
|
|
29
27
|
|
|
@@ -5,8 +5,7 @@ const sortAggs = data => {
|
|
|
5
5
|
searchPublishedContent: {
|
|
6
6
|
rawResults: { aggregations: { azCount: { buckets = [] } = {} } = {} } = {}
|
|
7
7
|
} = {}
|
|
8
|
-
} =
|
|
9
|
-
data || {};
|
|
8
|
+
} = data || {};
|
|
10
9
|
|
|
11
10
|
return [...buckets].sort((a, b) => {
|
|
12
11
|
if (Number(a.key) || specialCheck.test(a.key)) return 1;
|
|
@@ -28,17 +28,14 @@ const Menu = ({
|
|
|
28
28
|
const router = useRouter();
|
|
29
29
|
const [showMobileMenu, setShowMobileMenu] = useState(false);
|
|
30
30
|
|
|
31
|
-
useEffect(
|
|
32
|
-
() =>
|
|
33
|
-
|
|
34
|
-
router.events.on('routeChangeStart', handleRouteChange);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
const handleRouteChange = () => setShowMobileMenu(false);
|
|
33
|
+
router.events.on('routeChangeStart', handleRouteChange);
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
[router.events]
|
|
41
|
-
);
|
|
35
|
+
return () => {
|
|
36
|
+
router.events.off('routeChangeStart', handleRouteChange);
|
|
37
|
+
};
|
|
38
|
+
}, [router.events]);
|
|
42
39
|
|
|
43
40
|
const shouldDisplayChildren = collapse ? showMobileMenu : true;
|
|
44
41
|
|
|
@@ -75,12 +72,11 @@ const Menu = ({
|
|
|
75
72
|
</div>
|
|
76
73
|
</div>
|
|
77
74
|
)}
|
|
78
|
-
{logoOnMobile &&
|
|
79
|
-
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
)}
|
|
75
|
+
{logoOnMobile && !showMobileMenu && (
|
|
76
|
+
<Link href="/" name="mobile menu">
|
|
77
|
+
<img src={logoOnMobileUrl} alt={logoOnMobileAlt} className={logoOnMobileModifier} />
|
|
78
|
+
</Link>
|
|
79
|
+
)}
|
|
84
80
|
|
|
85
81
|
<div className="menu--desktop-wrapper">
|
|
86
82
|
<ul className={childModifiers}>
|
|
@@ -21,12 +21,9 @@ const MenuItemRender = ({ children, eventType, text, modifier, url, parent }) =>
|
|
|
21
21
|
data: [urlToUse]
|
|
22
22
|
} = useStringTemplate(parent, [injectHelperIntoTemplate(url, 'url_encode')]);
|
|
23
23
|
|
|
24
|
-
useEffect(
|
|
25
|
-
()
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
[showMobileMenu]
|
|
29
|
-
);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (!showMobileMenu) setDisplayChildren(false);
|
|
26
|
+
}, [showMobileMenu]);
|
|
30
27
|
|
|
31
28
|
if (loadingUrl || loadingText) return '';
|
|
32
29
|
|