@blaze-cms/react-page-builder 0.140.3 → 0.141.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/README.md +23 -0
- package/lib/components/BlazeLink.js +6 -2
- package/lib/components/BlazeLink.js.map +1 -1
- package/lib/components/Card/Card.js.map +1 -1
- package/lib/components/ContentGroup/ContentGroupTabs.js +10 -8
- package/lib/components/ContentGroup/ContentGroupTabs.js.map +1 -1
- package/lib/components/Image/ImageRender.js +4 -2
- package/lib/components/Image/ImageRender.js.map +1 -1
- package/lib/components/List/ListRender.js +10 -1
- package/lib/components/List/ListRender.js.map +1 -1
- package/lib/components/List/components/Header/ListHeader.js +5 -2
- package/lib/components/List/components/Header/ListHeader.js.map +1 -1
- package/lib/components/List/components/Pagination/Classic.js +2 -2
- package/lib/components/List/components/Pagination/Classic.js.map +1 -1
- package/lib/components/List/components/Pagination/LoadMore.js +2 -1
- package/lib/components/List/components/Pagination/LoadMore.js.map +1 -1
- package/lib/components/List/helpers/build-pagination-items.js +2 -1
- package/lib/components/List/helpers/build-pagination-items.js.map +1 -1
- package/lib/components/List/helpers/build-query-booster.js +57 -0
- package/lib/components/List/helpers/build-query-booster.js.map +1 -0
- package/lib/components/List/helpers/index.js +7 -0
- package/lib/components/List/helpers/index.js.map +1 -1
- package/lib/components/Menu/Menu.js +6 -6
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.js +2 -1
- package/lib/components/MenuItem/MenuItem.js.map +1 -1
- package/lib/components/SearchFilter/components/Select.js +1 -0
- package/lib/components/SearchFilter/components/Select.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/SFItem.js +4 -3
- package/lib/components/SocialFollow/SFItem.js.map +1 -1
- package/lib/components/Video/providers/Default.js +13 -7
- package/lib/components/Video/providers/Default.js.map +1 -1
- package/lib/components/Video/providers/get-provider.js +5 -0
- package/lib/components/Video/providers/get-provider.js.map +1 -1
- package/lib/hooks/helpers/getVariant.js.map +1 -1
- package/lib/hooks/index.js +7 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/use-app-sync-event-hook.js +31 -0
- package/lib/hooks/use-app-sync-event-hook.js.map +1 -0
- package/lib/utils/variant-handler.js +2 -1
- package/lib/utils/variant-handler.js.map +1 -1
- package/lib/variants/HeroImage/index.js +29 -0
- package/lib/variants/HeroImage/index.js.map +1 -0
- package/lib/variants/Infographic/Infographic.js +27 -0
- package/lib/variants/Infographic/Infographic.js.map +1 -0
- package/lib/variants/Infographic/index.js +41 -0
- package/lib/variants/Infographic/index.js.map +1 -0
- package/lib/variants/Infographic/useInfographic.js +43 -0
- package/lib/variants/Infographic/useInfographic.js.map +1 -0
- package/lib/variants/LongformGallery/LongformGallery.js +53 -0
- package/lib/variants/LongformGallery/LongformGallery.js.map +1 -0
- package/lib/variants/LongformGallery/LongformGalleryImage.js +71 -0
- package/lib/variants/LongformGallery/LongformGalleryImage.js.map +1 -0
- package/lib/variants/LongformGallery/constants.js +19 -0
- package/lib/variants/LongformGallery/constants.js.map +1 -0
- package/lib/variants/LongformGallery/helpers/index.js +29 -0
- package/lib/variants/LongformGallery/helpers/index.js.map +1 -0
- package/lib/variants/LongformGallery/helpers/parseImageData.js +42 -0
- package/lib/variants/LongformGallery/helpers/parseImageData.js.map +1 -0
- package/lib/variants/LongformGallery/helpers/separateImages.js +36 -0
- package/lib/variants/LongformGallery/helpers/separateImages.js.map +1 -0
- package/lib/variants/LongformGallery/helpers/shouldSkip.js +13 -0
- package/lib/variants/LongformGallery/helpers/shouldSkip.js.map +1 -0
- package/lib/variants/LongformGallery/index.js +43 -0
- package/lib/variants/LongformGallery/index.js.map +1 -0
- package/lib/variants/LongformGallery/useLongformGallery.js +58 -0
- package/lib/variants/LongformGallery/useLongformGallery.js.map +1 -0
- package/lib/variants/LongformRow/index.js +29 -0
- package/lib/variants/LongformRow/index.js.map +1 -0
- package/lib/variants/ParallaxImageTextRight/index.js +30 -0
- package/lib/variants/ParallaxImageTextRight/index.js.map +1 -0
- package/lib/variants/ThumbnailCarousel/ThumbnailCarousel.js +63 -0
- package/lib/variants/ThumbnailCarousel/ThumbnailCarousel.js.map +1 -0
- package/lib/variants/ThumbnailCarousel/ThumbnailImage/ThumbnailImage.js +37 -0
- package/lib/variants/ThumbnailCarousel/ThumbnailImage/ThumbnailImage.js.map +1 -0
- package/lib/variants/ThumbnailCarousel/ThumbnailImage/index.js +11 -0
- package/lib/variants/ThumbnailCarousel/ThumbnailImage/index.js.map +1 -0
- package/lib/variants/ThumbnailCarousel/ThumbnailImage/useThumbnailImage.js +69 -0
- package/lib/variants/ThumbnailCarousel/ThumbnailImage/useThumbnailImage.js.map +1 -0
- package/lib/variants/ThumbnailCarousel/index.js +41 -0
- package/lib/variants/ThumbnailCarousel/index.js.map +1 -0
- package/lib/variants/ThumbnailCarousel/useThumbnailCarousel.js +66 -0
- package/lib/variants/ThumbnailCarousel/useThumbnailCarousel.js.map +1 -0
- package/lib/variants/index.js +15 -1
- package/lib/variants/index.js.map +1 -1
- package/lib-es/components/BlazeLink.js +6 -2
- package/lib-es/components/BlazeLink.js.map +1 -1
- package/lib-es/components/Card/Card.js.map +1 -1
- package/lib-es/components/ContentGroup/ContentGroupTabs.js +10 -8
- package/lib-es/components/ContentGroup/ContentGroupTabs.js.map +1 -1
- package/lib-es/components/Image/ImageRender.js +4 -2
- package/lib-es/components/Image/ImageRender.js.map +1 -1
- package/lib-es/components/List/ListRender.js +11 -1
- package/lib-es/components/List/ListRender.js.map +1 -1
- package/lib-es/components/List/components/Header/ListHeader.js +5 -2
- package/lib-es/components/List/components/Header/ListHeader.js.map +1 -1
- package/lib-es/components/List/components/Pagination/Classic.js +2 -2
- package/lib-es/components/List/components/Pagination/Classic.js.map +1 -1
- package/lib-es/components/List/components/Pagination/LoadMore.js +2 -1
- package/lib-es/components/List/components/Pagination/LoadMore.js.map +1 -1
- package/lib-es/components/List/helpers/build-pagination-items.js +2 -1
- package/lib-es/components/List/helpers/build-pagination-items.js.map +1 -1
- package/lib-es/components/List/helpers/build-query-booster.js +41 -0
- package/lib-es/components/List/helpers/build-query-booster.js.map +1 -0
- package/lib-es/components/List/helpers/index.js +1 -0
- package/lib-es/components/List/helpers/index.js.map +1 -1
- package/lib-es/components/Menu/Menu.js +6 -6
- package/lib-es/components/Menu/Menu.js.map +1 -1
- package/lib-es/components/MenuItem/MenuItem.js +2 -1
- package/lib-es/components/MenuItem/MenuItem.js.map +1 -1
- package/lib-es/components/SearchFilter/components/Select.js +1 -0
- package/lib-es/components/SearchFilter/components/Select.js.map +1 -1
- package/lib-es/components/SearchFilterSort/SearchFilterSort.js +1 -0
- package/lib-es/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
- package/lib-es/components/SocialFollow/SFItem.js +4 -3
- package/lib-es/components/SocialFollow/SFItem.js.map +1 -1
- package/lib-es/components/Video/providers/Default.js +14 -7
- package/lib-es/components/Video/providers/Default.js.map +1 -1
- package/lib-es/components/Video/providers/get-provider.js +2 -1
- package/lib-es/components/Video/providers/get-provider.js.map +1 -1
- package/lib-es/hooks/helpers/getVariant.js.map +1 -1
- package/lib-es/hooks/index.js +1 -0
- package/lib-es/hooks/index.js.map +1 -1
- package/lib-es/hooks/use-app-sync-event-hook.js +25 -0
- package/lib-es/hooks/use-app-sync-event-hook.js.map +1 -0
- package/lib-es/utils/variant-handler.js +2 -1
- package/lib-es/utils/variant-handler.js.map +1 -1
- package/lib-es/variants/HeroImage/index.js +10 -0
- package/lib-es/variants/HeroImage/index.js.map +1 -0
- package/lib-es/variants/Infographic/Infographic.js +20 -0
- package/lib-es/variants/Infographic/Infographic.js.map +1 -0
- package/lib-es/variants/Infographic/index.js +10 -0
- package/lib-es/variants/Infographic/index.js.map +1 -0
- package/lib-es/variants/Infographic/useInfographic.js +23 -0
- package/lib-es/variants/Infographic/useInfographic.js.map +1 -0
- package/lib-es/variants/LongformGallery/LongformGallery.js +40 -0
- package/lib-es/variants/LongformGallery/LongformGallery.js.map +1 -0
- package/lib-es/variants/LongformGallery/LongformGalleryImage.js +59 -0
- package/lib-es/variants/LongformGallery/LongformGalleryImage.js.map +1 -0
- package/lib-es/variants/LongformGallery/constants.js +18 -0
- package/lib-es/variants/LongformGallery/constants.js.map +1 -0
- package/lib-es/variants/LongformGallery/helpers/index.js +5 -0
- package/lib-es/variants/LongformGallery/helpers/index.js.map +1 -0
- package/lib-es/variants/LongformGallery/helpers/parseImageData.js +26 -0
- package/lib-es/variants/LongformGallery/helpers/parseImageData.js.map +1 -0
- package/lib-es/variants/LongformGallery/helpers/separateImages.js +25 -0
- package/lib-es/variants/LongformGallery/helpers/separateImages.js.map +1 -0
- package/lib-es/variants/LongformGallery/helpers/shouldSkip.js +3 -0
- package/lib-es/variants/LongformGallery/helpers/shouldSkip.js.map +1 -0
- package/lib-es/variants/LongformGallery/index.js +12 -0
- package/lib-es/variants/LongformGallery/index.js.map +1 -0
- package/lib-es/variants/LongformGallery/useLongformGallery.js +47 -0
- package/lib-es/variants/LongformGallery/useLongformGallery.js.map +1 -0
- package/lib-es/variants/LongformRow/index.js +10 -0
- package/lib-es/variants/LongformRow/index.js.map +1 -0
- package/lib-es/variants/ParallaxImageTextRight/index.js +11 -0
- package/lib-es/variants/ParallaxImageTextRight/index.js.map +1 -0
- package/lib-es/variants/ThumbnailCarousel/ThumbnailCarousel.js +49 -0
- package/lib-es/variants/ThumbnailCarousel/ThumbnailCarousel.js.map +1 -0
- package/lib-es/variants/ThumbnailCarousel/ThumbnailImage/ThumbnailImage.js +30 -0
- package/lib-es/variants/ThumbnailCarousel/ThumbnailImage/ThumbnailImage.js.map +1 -0
- package/lib-es/variants/ThumbnailCarousel/ThumbnailImage/index.js +3 -0
- package/lib-es/variants/ThumbnailCarousel/ThumbnailImage/index.js.map +1 -0
- package/lib-es/variants/ThumbnailCarousel/ThumbnailImage/useThumbnailImage.js +62 -0
- package/lib-es/variants/ThumbnailCarousel/ThumbnailImage/useThumbnailImage.js.map +1 -0
- package/lib-es/variants/ThumbnailCarousel/index.js +10 -0
- package/lib-es/variants/ThumbnailCarousel/index.js.map +1 -0
- package/lib-es/variants/ThumbnailCarousel/useThumbnailCarousel.js +47 -0
- package/lib-es/variants/ThumbnailCarousel/useThumbnailCarousel.js.map +1 -0
- package/lib-es/variants/index.js +14 -1
- package/lib-es/variants/index.js.map +1 -1
- package/package.json +7 -7
- package/src/components/BlazeLink.js +23 -4
- package/src/components/Card/Card.js +0 -1
- package/src/components/ContentGroup/ContentGroupTabs.js +11 -8
- package/src/components/Image/ImageRender.js +4 -2
- package/src/components/List/ListRender.js +11 -1
- package/src/components/List/components/Header/ListHeader.js +7 -4
- package/src/components/List/components/Pagination/Classic.js +2 -2
- package/src/components/List/components/Pagination/LoadMore.js +7 -2
- package/src/components/List/helpers/build-pagination-items.js +2 -1
- package/src/components/List/helpers/build-query-booster.js +35 -0
- package/src/components/List/helpers/index.js +1 -0
- package/src/components/Menu/Menu.js +6 -7
- package/src/components/MenuItem/MenuItem.js +5 -2
- package/src/components/SearchFilter/components/Select.js +1 -0
- package/src/components/SearchFilterSort/SearchFilterSort.js +1 -0
- package/src/components/SocialFollow/SFItem.js +8 -2
- package/src/components/Video/providers/Default.js +12 -6
- package/src/components/Video/providers/get-provider.js +2 -1
- package/src/hooks/helpers/getVariant.js +1 -0
- package/src/hooks/index.js +1 -0
- package/src/hooks/use-app-sync-event-hook.js +19 -0
- package/src/utils/variant-handler.js +2 -1
- package/src/variants/HeroImage/index.js +8 -0
- package/src/variants/Infographic/Infographic.js +14 -0
- package/src/variants/Infographic/index.js +12 -0
- package/src/variants/Infographic/useInfographic.js +18 -0
- package/src/variants/LongformGallery/LongformGallery.js +47 -0
- package/src/variants/LongformGallery/LongformGalleryImage.js +65 -0
- package/src/variants/LongformGallery/constants.js +21 -0
- package/src/variants/LongformGallery/helpers/index.js +5 -0
- package/src/variants/LongformGallery/helpers/parseImageData.js +25 -0
- package/src/variants/LongformGallery/helpers/separateImages.js +38 -0
- package/src/variants/LongformGallery/helpers/shouldSkip.js +3 -0
- package/src/variants/LongformGallery/index.js +13 -0
- package/src/variants/LongformGallery/useLongformGallery.js +41 -0
- package/src/variants/LongformRow/index.js +8 -0
- package/src/variants/ParallaxImageTextRight/index.js +9 -0
- package/src/variants/ThumbnailCarousel/ThumbnailCarousel.js +51 -0
- package/src/variants/ThumbnailCarousel/ThumbnailImage/ThumbnailImage.js +26 -0
- package/src/variants/ThumbnailCarousel/ThumbnailImage/index.js +3 -0
- package/src/variants/ThumbnailCarousel/ThumbnailImage/useThumbnailImage.js +61 -0
- package/src/variants/ThumbnailCarousel/index.js +12 -0
- package/src/variants/ThumbnailCarousel/useThumbnailCarousel.js +42 -0
- package/src/variants/index.js +15 -1
- package/tests/unit/src/components/Breadcrumb/__snapshots__/Breadcrumb.test.js.snap +3 -0
- package/tests/unit/src/components/Button.test.js +2 -2
- package/tests/unit/src/components/Card/__snapshots__/Card.test.js.snap +13 -0
- package/tests/unit/src/components/Card/__snapshots__/CardContainer.test.js.snap +8 -0
- package/tests/unit/src/components/ContentGroup/__snapshots__/ContentGroupTabs.test.js.snap +2 -0
- package/tests/unit/src/components/Image/GlobalLightbox/__snapshots__/GlobalLightbox.test.js.snap +1 -0
- package/tests/unit/src/components/Image/__snapshots__/Image.test.js.snap +3 -0
- package/tests/unit/src/components/Image/__snapshots__/ImageFactory.test.js.snap +4 -0
- package/tests/unit/src/components/List/ListRender.test.js +9 -0
- package/tests/unit/src/components/List/components/Header/__snapshots__/ListHeader.test.js.snap +5 -0
- package/tests/unit/src/components/List/components/Pagination/__snapshots__/Classic.test.js.snap +8 -2
- package/tests/unit/src/components/List/components/Pagination/__snapshots__/ListPagination.test.js.snap +5 -1
- package/tests/unit/src/components/List/components/Pagination/__snapshots__/LoadMore.test.js.snap +1 -1
- package/tests/unit/src/components/List/helpers/__snapshots__/build-pagination-items.test.js.snap +21 -0
- package/tests/unit/src/components/List/helpers/build-query-booster.test.js +33 -0
- package/tests/unit/src/components/MenuItem/__snapshots__/MenuItem.test.js.snap +3 -0
- package/tests/unit/src/components/PlaceholderIcon/__snapshots__/index.test.js.snap +3 -1
- package/tests/unit/src/components/SearchFilter/components/__snapshots__/Select.test.js.snap +5 -3
- package/tests/unit/src/components/SearchFilterSort/__snapshots__/SearchFilterSort.test.js.snap +2 -1
- package/tests/unit/src/components/SocialFollow/__snapshots__/SFItem.test.js.snap +2 -2
- package/tests/unit/src/components/SocialFollow/__snapshots__/SocialFollow.test.js.snap +2 -6
- package/tests/unit/src/components/TextBlock/__snapshots__/TextBlock.test.js.snap +4 -0
- package/tests/unit/src/components/Video/providers/__snapshots__/Default.test.js.snap +111 -108
- package/tests/unit/src/components/__snapshots__/BlazeLink.test.js.snap +1 -1
- package/tests/unit/src/components/__snapshots__/Button.test.js.snap +1 -0
- package/tests/unit/src/helpers/__snapshots__/parse-textBlock.test.js.snap +1 -0
- package/tests/unit/src/helpers/parse-textBlock.test.js +3 -1
- package/tests/unit/src/hooks/use-app-sync-evet-hook.test.js +50 -0
- package/tests/unit/src/utils/variant-handler.test.js +9 -4
- package/tests/unit/src/variants/LongFormGallery/LongformGallery.test.js +42 -0
- package/tests/unit/src/variants/LongFormGallery/LongformGalleryImage.test.js +44 -0
- package/tests/unit/src/variants/LongFormGallery/__snapshots__/LongformGallery.test.js.snap +99 -0
- package/tests/unit/src/variants/LongFormGallery/__snapshots__/LongformGalleryImage.test.js.snap +51 -0
- package/tests/unit/src/variants/LongFormGallery/constants.js +37 -0
- package/tests/unit/src/variants/LongFormGallery/helpers/parseImageData.test.js +53 -0
- package/tests/unit/src/variants/LongFormGallery/helpers/separateImages.test.js +52 -0
- package/tests/unit/src/variants/LongFormGallery/helpers/shouldSkip.test.js +23 -0
- package/tests/unit/src/variants/LongFormGallery/useLongformGallery.test.js +36 -0
- package/tests/unit/src/variants/ThumbnailCarousel/ThumbnailCarousel.test.js +29 -0
- package/tests/unit/src/variants/ThumbnailCarousel/ThumbnailImage.test.js +45 -0
- package/tests/unit/src/variants/ThumbnailCarousel/__snapshots__/ThumbnailCarousel.test.js.snap +71 -0
- package/tests/unit/src/variants/ThumbnailCarousel/__snapshots__/ThumbnailImage.test.js.snap +19 -0
- package/tests/unit/src/variants/ThumbnailCarousel/mocks.js +64 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import Head from 'next/head';
|
|
4
|
+
import { useInView } from '@blaze-react/utils/lib/customHooks';
|
|
5
|
+
import { ResponsiveImage } from '@blaze-cms/image-cdn-react';
|
|
6
|
+
import { IN_VIEW_CONFIG } from './constants';
|
|
7
|
+
|
|
8
|
+
const LongformGalleryImage = ({
|
|
9
|
+
id,
|
|
10
|
+
url,
|
|
11
|
+
caption,
|
|
12
|
+
altText,
|
|
13
|
+
priority,
|
|
14
|
+
className,
|
|
15
|
+
numberOfImages,
|
|
16
|
+
handleImageOnClick,
|
|
17
|
+
...props
|
|
18
|
+
}) => {
|
|
19
|
+
const [isIntersecting, outerRef] = useInView(IN_VIEW_CONFIG);
|
|
20
|
+
const shouldRender = priority || isIntersecting;
|
|
21
|
+
const HeadComponent = priority ? Head : null;
|
|
22
|
+
const sizeKey = `carousel:longform:${numberOfImages}`;
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<div ref={outerRef} className={`${className}`}>
|
|
26
|
+
<div
|
|
27
|
+
role="button"
|
|
28
|
+
className="longform-gallery__images__image__container"
|
|
29
|
+
data-testid="longform-gallery__images__image__container"
|
|
30
|
+
onClick={() => handleImageOnClick(id)}>
|
|
31
|
+
{shouldRender && (
|
|
32
|
+
<ResponsiveImage
|
|
33
|
+
sizeKey={sizeKey}
|
|
34
|
+
role="button"
|
|
35
|
+
src={url}
|
|
36
|
+
alt={altText}
|
|
37
|
+
priority={priority}
|
|
38
|
+
HeadComponent={HeadComponent}
|
|
39
|
+
{...props}
|
|
40
|
+
/>
|
|
41
|
+
)}
|
|
42
|
+
</div>
|
|
43
|
+
{!!caption && (
|
|
44
|
+
<div
|
|
45
|
+
className="longform-gallery__images__image__details"
|
|
46
|
+
data-testid="longform-gallery__images__image__details">
|
|
47
|
+
<div className="longform-gallery__images__image__details__caption">{caption}</div>
|
|
48
|
+
</div>
|
|
49
|
+
)}
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
LongformGalleryImage.propTypes = {
|
|
55
|
+
id: PropTypes.string.isRequired,
|
|
56
|
+
url: PropTypes.string.isRequired,
|
|
57
|
+
caption: PropTypes.string.isRequired,
|
|
58
|
+
numberOfImages: PropTypes.number.isRequired,
|
|
59
|
+
altText: PropTypes.string.isRequired,
|
|
60
|
+
priority: PropTypes.bool.isRequired,
|
|
61
|
+
className: PropTypes.string.isRequired,
|
|
62
|
+
handleImageOnClick: PropTypes.func.isRequired
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export default LongformGalleryImage;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
|
|
3
|
+
const GET_IMAGES_QUERY = gql`
|
|
4
|
+
query getImages($where: JSON!) {
|
|
5
|
+
getImages: getFiles(where: $where) {
|
|
6
|
+
id
|
|
7
|
+
url
|
|
8
|
+
data
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
const PROPS_TO_CHECK = ['altText', 'caption', 'hrefUrl', 'credits'];
|
|
14
|
+
|
|
15
|
+
const IN_VIEW_CONFIG = {
|
|
16
|
+
once: true,
|
|
17
|
+
offset: '200px',
|
|
18
|
+
bottomOffset: '-200px'
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { GET_IMAGES_QUERY, IN_VIEW_CONFIG, PROPS_TO_CHECK };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import parseHTML from 'html-react-parser';
|
|
2
|
+
import { PROPS_TO_CHECK } from '../constants';
|
|
3
|
+
|
|
4
|
+
const parseImageData = (image, index, priorityLimit, shouldDisplayCaption) => {
|
|
5
|
+
const { data = {} } = image;
|
|
6
|
+
const parsedData = {};
|
|
7
|
+
|
|
8
|
+
PROPS_TO_CHECK.forEach(dataKey => {
|
|
9
|
+
const value = data && data[dataKey];
|
|
10
|
+
if (dataKey === 'caption') {
|
|
11
|
+
parsedData[dataKey] = shouldDisplayCaption && !!value ? parseHTML(value) : '';
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
parsedData[dataKey] = value || '';
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
...parsedData,
|
|
19
|
+
id: image.id,
|
|
20
|
+
url: image.url,
|
|
21
|
+
priority: index < priorityLimit
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default parseImageData;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import parseImageData from './parseImageData';
|
|
2
|
+
|
|
3
|
+
const buildImageGroups = (images, priorityLimit, shouldDisplayCaption) => {
|
|
4
|
+
const imageGroups = [];
|
|
5
|
+
let imageGroupIndex = 0;
|
|
6
|
+
const isDivisible = images.length % 3 === 0;
|
|
7
|
+
|
|
8
|
+
images.forEach((image, index) => {
|
|
9
|
+
if (!imageGroups[imageGroupIndex])
|
|
10
|
+
imageGroups[imageGroupIndex] = [
|
|
11
|
+
parseImageData(image, index, priorityLimit, shouldDisplayCaption)
|
|
12
|
+
];
|
|
13
|
+
else
|
|
14
|
+
imageGroups[imageGroupIndex].push(
|
|
15
|
+
parseImageData(image, index, priorityLimit, shouldDisplayCaption)
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
if (isDivisible) {
|
|
19
|
+
if (imageGroups[imageGroupIndex].length >= 3) imageGroupIndex += 1;
|
|
20
|
+
} else {
|
|
21
|
+
if (imageGroupIndex === 0 && imageGroups[imageGroupIndex].length >= 2) {
|
|
22
|
+
imageGroupIndex += 1;
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (imageGroups[imageGroupIndex].length >= 3) imageGroupIndex += 1;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
return imageGroups;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const separateImages = (images, priorityLimit, shouldDisplayCaption) => {
|
|
33
|
+
if (!images || !images.length) return [];
|
|
34
|
+
|
|
35
|
+
return buildImageGroups(images, priorityLimit, shouldDisplayCaption);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default separateImages;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import dynamic from 'next/dynamic';
|
|
2
|
+
|
|
3
|
+
const LongformGallery = {
|
|
4
|
+
VariantComponent: dynamic(() =>
|
|
5
|
+
import(/* webpackChunkName: "blazePbVariantLongformGallery" */ './LongformGallery')
|
|
6
|
+
),
|
|
7
|
+
getSettings: componentSettings => ({
|
|
8
|
+
...componentSettings,
|
|
9
|
+
modifier: 'longformGallery'
|
|
10
|
+
})
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default LongformGallery;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useQuery } from '@apollo/client';
|
|
2
|
+
import { GET_IMAGES_QUERY } from './constants';
|
|
3
|
+
import { separateImages, shouldSkip } from './helpers';
|
|
4
|
+
|
|
5
|
+
const useLongformGallery = ({
|
|
6
|
+
imageIds = [],
|
|
7
|
+
priorityLimit = 0,
|
|
8
|
+
caption = '',
|
|
9
|
+
shouldDisplayCaption = false,
|
|
10
|
+
enableLightbox = false,
|
|
11
|
+
toggleModal = () => {},
|
|
12
|
+
handleSelectedImage = () => {}
|
|
13
|
+
}) => {
|
|
14
|
+
const skip = shouldSkip(imageIds);
|
|
15
|
+
|
|
16
|
+
const { data, loading, error } = useQuery(GET_IMAGES_QUERY, {
|
|
17
|
+
variables: { where: { id: { _in: imageIds } } },
|
|
18
|
+
skip
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const { getImages } = data || {};
|
|
22
|
+
|
|
23
|
+
const groupedImages = separateImages(getImages, priorityLimit, shouldDisplayCaption);
|
|
24
|
+
|
|
25
|
+
const handleImageOnClick = clickedImageId => {
|
|
26
|
+
if (!enableLightbox) return;
|
|
27
|
+
toggleModal();
|
|
28
|
+
handleSelectedImage(clickedImageId);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
loading,
|
|
33
|
+
error,
|
|
34
|
+
shouldDisplayCaption,
|
|
35
|
+
caption,
|
|
36
|
+
groupedImages,
|
|
37
|
+
handleImageOnClick
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default useLongformGallery;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import useThumbnailCarousel from './useThumbnailCarousel';
|
|
3
|
+
import ThumbnailImage from './ThumbnailImage';
|
|
4
|
+
|
|
5
|
+
const ThumbnailCarousel = props => {
|
|
6
|
+
const {
|
|
7
|
+
thumbnailsListRef,
|
|
8
|
+
imageIds,
|
|
9
|
+
selectedImageId,
|
|
10
|
+
priorityLimit,
|
|
11
|
+
scrollToImage,
|
|
12
|
+
mainImageButtonClick
|
|
13
|
+
} = useThumbnailCarousel(props);
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<div className="thumbnail-carousel" data-testid="thumbnail-carousel">
|
|
17
|
+
<div className="thumbnail-carousel__main_image_container">
|
|
18
|
+
<div
|
|
19
|
+
id="previous-button"
|
|
20
|
+
className="thumbnail-carousel__main_image_container__button"
|
|
21
|
+
role="button"
|
|
22
|
+
onClick={() => mainImageButtonClick()}>
|
|
23
|
+
<div className="arrow arrow--left" />
|
|
24
|
+
</div>
|
|
25
|
+
<ThumbnailImage {...props} priority imageId={selectedImageId} />
|
|
26
|
+
<div
|
|
27
|
+
id="next-button"
|
|
28
|
+
className="thumbnail-carousel__main_image_container__button next"
|
|
29
|
+
role="button"
|
|
30
|
+
onClick={() => mainImageButtonClick(true)}>
|
|
31
|
+
<div className="arrow arrow--right" />
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div className="thumbnail-carousel__list" ref={thumbnailsListRef}>
|
|
35
|
+
{imageIds.map((imageId, index) => (
|
|
36
|
+
<ThumbnailImage
|
|
37
|
+
{...props}
|
|
38
|
+
key={imageId}
|
|
39
|
+
imageIndex={index}
|
|
40
|
+
priority={index < priorityLimit}
|
|
41
|
+
imageId={imageId}
|
|
42
|
+
selectedImageId={selectedImageId}
|
|
43
|
+
scrollToImage={scrollToImage}
|
|
44
|
+
/>
|
|
45
|
+
))}
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default ThumbnailCarousel;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import LazyImage from '../../../components/LazyImage';
|
|
3
|
+
import useThumbnailImage from './useThumbnailImage';
|
|
4
|
+
|
|
5
|
+
const ThumbnailImage = props => {
|
|
6
|
+
const { loading, error, className, imageUrl, altText, priority, handleClick } = useThumbnailImage(
|
|
7
|
+
props
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
if (error) return error.message;
|
|
11
|
+
if (loading) return null;
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div className={className} onClick={handleClick} role="button" data-testid="thumbnail-image">
|
|
15
|
+
<LazyImage
|
|
16
|
+
src={imageUrl}
|
|
17
|
+
alt={altText}
|
|
18
|
+
sizeKey="carousel"
|
|
19
|
+
role="button"
|
|
20
|
+
priority={priority}
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default ThumbnailImage;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import { useGetImages } from '../../../hooks';
|
|
3
|
+
import { getImageData } from '../../../utils';
|
|
4
|
+
|
|
5
|
+
const useThumbnailImage = ({
|
|
6
|
+
imageId,
|
|
7
|
+
imageIndex,
|
|
8
|
+
enableLightbox,
|
|
9
|
+
toggleModal,
|
|
10
|
+
handleSelectedImage,
|
|
11
|
+
priority,
|
|
12
|
+
selectedImageId,
|
|
13
|
+
scrollToImage
|
|
14
|
+
}) => {
|
|
15
|
+
const { data = {}, loading, error } = useGetImages(imageId);
|
|
16
|
+
|
|
17
|
+
const handleClick = () => {
|
|
18
|
+
if (scrollToImage) scrollToImage(imageIndex);
|
|
19
|
+
else if (enableLightbox) {
|
|
20
|
+
toggleModal();
|
|
21
|
+
handleSelectedImage(imageId);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const { url: imageUrl = '', data: imageData = {} } = data.getFile || {
|
|
26
|
+
getFile: { url: '', data: {} }
|
|
27
|
+
};
|
|
28
|
+
const { altText } = getImageData({}, imageData);
|
|
29
|
+
|
|
30
|
+
const className =
|
|
31
|
+
selectedImageId === imageId
|
|
32
|
+
? 'thumbnail-carousel-image thumbnail-carousel-image--selected'
|
|
33
|
+
: 'thumbnail-carousel-image';
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
loading,
|
|
37
|
+
error,
|
|
38
|
+
className,
|
|
39
|
+
imageId,
|
|
40
|
+
imageUrl,
|
|
41
|
+
altText,
|
|
42
|
+
priority,
|
|
43
|
+
handleClick
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
useThumbnailImage.propTypes = {
|
|
48
|
+
imageId: PropTypes.string.isRequired,
|
|
49
|
+
selectedImageId: PropTypes.string.isRequired,
|
|
50
|
+
enableLightbox: PropTypes.bool.isRequired,
|
|
51
|
+
toggleModal: PropTypes.func.isRequired,
|
|
52
|
+
handleSelectedImage: PropTypes.func.isRequired,
|
|
53
|
+
priority: PropTypes.bool.isRequired,
|
|
54
|
+
scrollToImage: PropTypes.func
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
useThumbnailImage.defaultProps = {
|
|
58
|
+
scrollToImage: null
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export default useThumbnailImage;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import dynamic from 'next/dynamic';
|
|
2
|
+
|
|
3
|
+
const ThumbnailCarousel = {
|
|
4
|
+
getSettings: componentSettings => ({
|
|
5
|
+
...componentSettings
|
|
6
|
+
}),
|
|
7
|
+
VariantComponent: dynamic(() =>
|
|
8
|
+
import(/* webpackChunkName: "blazePbVariantThumbnailCarousel" */ './ThumbnailCarousel')
|
|
9
|
+
)
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default ThumbnailCarousel;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { useState, useRef } from 'react';
|
|
2
|
+
|
|
3
|
+
const useThumbnailCarousel = ({ imageIds, priorityLimit, ...props }) => {
|
|
4
|
+
const [selectedImageIndex, setSelectedImageIndex] = useState(0);
|
|
5
|
+
const thumbnailsListRef = useRef(null);
|
|
6
|
+
const selectedImageId = imageIds[selectedImageIndex];
|
|
7
|
+
|
|
8
|
+
const mainImageButtonClick = next => {
|
|
9
|
+
let newIndex;
|
|
10
|
+
if (next) {
|
|
11
|
+
const isLast = imageIds.length - 1 === selectedImageIndex;
|
|
12
|
+
newIndex = isLast ? 0 : selectedImageIndex + 1;
|
|
13
|
+
} else {
|
|
14
|
+
const isFirst = selectedImageIndex === 0;
|
|
15
|
+
newIndex = isFirst ? imageIds.length - 1 : selectedImageIndex - 1;
|
|
16
|
+
}
|
|
17
|
+
scrollToImage(newIndex);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const scrollToImage = newIndex => {
|
|
21
|
+
if (thumbnailsListRef.current && selectedImageIndex !== newIndex) {
|
|
22
|
+
thumbnailsListRef.current.scrollTo({
|
|
23
|
+
left: 150 * newIndex,
|
|
24
|
+
behavior: 'smooth'
|
|
25
|
+
});
|
|
26
|
+
setSelectedImageIndex(newIndex);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
...props,
|
|
32
|
+
imageIds,
|
|
33
|
+
selectedImageId,
|
|
34
|
+
selectedImageIndex,
|
|
35
|
+
thumbnailsListRef,
|
|
36
|
+
priorityLimit,
|
|
37
|
+
scrollToImage,
|
|
38
|
+
mainImageButtonClick
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default useThumbnailCarousel;
|
package/src/variants/index.js
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import heroImage from './HeroImage';
|
|
2
|
+
import infographic from './Infographic';
|
|
3
|
+
import longformGallery from './LongformGallery';
|
|
4
|
+
import longformRow from './LongformRow';
|
|
5
|
+
import parallaxImageTextRight from './ParallaxImageTextRight';
|
|
6
|
+
import thumbnailCarousel from './ThumbnailCarousel';
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
heroImage,
|
|
10
|
+
infographic,
|
|
11
|
+
longformGallery,
|
|
12
|
+
longformRow,
|
|
13
|
+
parallaxImageTextRight,
|
|
14
|
+
thumbnailCarousel
|
|
15
|
+
};
|
|
@@ -12,6 +12,7 @@ exports[`Breadcrumb component should match snapshot 1`] = `
|
|
|
12
12
|
class="breadcrumb__item"
|
|
13
13
|
>
|
|
14
14
|
<a
|
|
15
|
+
aria-label="Home"
|
|
15
16
|
href="/"
|
|
16
17
|
>
|
|
17
18
|
Home
|
|
@@ -39,6 +40,7 @@ exports[`Breadcrumb component should not render if loading, err or no data exist
|
|
|
39
40
|
class="breadcrumb__item"
|
|
40
41
|
>
|
|
41
42
|
<a
|
|
43
|
+
aria-label="Home"
|
|
42
44
|
href="/"
|
|
43
45
|
>
|
|
44
46
|
Home
|
|
@@ -66,6 +68,7 @@ exports[`Breadcrumb component should render 1`] = `
|
|
|
66
68
|
class="breadcrumb__item"
|
|
67
69
|
>
|
|
68
70
|
<a
|
|
71
|
+
aria-label="Home"
|
|
69
72
|
href="/"
|
|
70
73
|
>
|
|
71
74
|
Home
|
|
@@ -74,7 +74,7 @@ describe('Button component', () => {
|
|
|
74
74
|
const propsWithoutText = { ...componentProps, text: '' };
|
|
75
75
|
const { container } = await renderComponent(propsWithoutText);
|
|
76
76
|
expect(container.innerHTML).toBe(
|
|
77
|
-
'<a href="http://google.com" rel="noopener nofollow" target="_blank" class="icon-button"><i class="fas fas-trash"></i></a>'
|
|
77
|
+
'<a aria-label="Open http://google.com" href="http://google.com" rel="noopener nofollow" target="_blank" class="icon-button"><i class="fas fas-trash"></i></a>'
|
|
78
78
|
);
|
|
79
79
|
});
|
|
80
80
|
|
|
@@ -87,7 +87,7 @@ describe('Button component', () => {
|
|
|
87
87
|
const propsWithIcon = { ...componentProps, text: '', icon: 'test-icon' };
|
|
88
88
|
const { container } = await renderComponent(propsWithIcon);
|
|
89
89
|
expect(container.innerHTML).toBe(
|
|
90
|
-
'<a href="http://google.com" rel="noopener nofollow" target="_blank" class="icon-button"><i class="test-icon"></i></a>'
|
|
90
|
+
'<a aria-label="Open http://google.com" href="http://google.com" rel="noopener nofollow" target="_blank" class="icon-button"><i class="test-icon"></i></a>'
|
|
91
91
|
);
|
|
92
92
|
});
|
|
93
93
|
|
|
@@ -9,6 +9,7 @@ exports[`Card component should not render alternative headline if alternativePre
|
|
|
9
9
|
class="card__image card__image--portrait"
|
|
10
10
|
>
|
|
11
11
|
<a
|
|
12
|
+
aria-label="Open /mockurl"
|
|
12
13
|
class="card__image-link"
|
|
13
14
|
href="/mockurl"
|
|
14
15
|
>
|
|
@@ -25,6 +26,7 @@ exports[`Card component should not render alternative headline if alternativePre
|
|
|
25
26
|
class="card__content card__content--portrait"
|
|
26
27
|
>
|
|
27
28
|
<a
|
|
29
|
+
aria-label="category-name"
|
|
28
30
|
class="badge badge--label"
|
|
29
31
|
href="published-url"
|
|
30
32
|
>
|
|
@@ -34,6 +36,7 @@ exports[`Card component should not render alternative headline if alternativePre
|
|
|
34
36
|
class="card__title card__title--portrait "
|
|
35
37
|
>
|
|
36
38
|
<a
|
|
39
|
+
aria-label="mock name"
|
|
37
40
|
href="/mockurl"
|
|
38
41
|
>
|
|
39
42
|
mock name
|
|
@@ -84,6 +87,7 @@ exports[`Card component should not render alternative headline if displayCategor
|
|
|
84
87
|
class="card__image card__image--portrait"
|
|
85
88
|
>
|
|
86
89
|
<a
|
|
90
|
+
aria-label="Open /mockurl"
|
|
87
91
|
class="card__image-link"
|
|
88
92
|
href="/mockurl"
|
|
89
93
|
>
|
|
@@ -103,6 +107,7 @@ exports[`Card component should not render alternative headline if displayCategor
|
|
|
103
107
|
class="card__title card__title--portrait "
|
|
104
108
|
>
|
|
105
109
|
<a
|
|
110
|
+
aria-label="mock name"
|
|
106
111
|
href="/mockurl"
|
|
107
112
|
>
|
|
108
113
|
mock name
|
|
@@ -153,6 +158,7 @@ exports[`Card component should not render preHeader if alternativeHeadline is no
|
|
|
153
158
|
class="card__image card__image--portrait"
|
|
154
159
|
>
|
|
155
160
|
<a
|
|
161
|
+
aria-label="Open /mockurl"
|
|
156
162
|
class="card__image-link"
|
|
157
163
|
href="/mockurl"
|
|
158
164
|
>
|
|
@@ -169,6 +175,7 @@ exports[`Card component should not render preHeader if alternativeHeadline is no
|
|
|
169
175
|
class="card__content card__content--portrait"
|
|
170
176
|
>
|
|
171
177
|
<a
|
|
178
|
+
aria-label="category-name"
|
|
172
179
|
class="badge badge--label"
|
|
173
180
|
href="published-url"
|
|
174
181
|
>
|
|
@@ -178,6 +185,7 @@ exports[`Card component should not render preHeader if alternativeHeadline is no
|
|
|
178
185
|
class="card__title card__title--portrait "
|
|
179
186
|
>
|
|
180
187
|
<a
|
|
188
|
+
aria-label="mock name"
|
|
181
189
|
href="/mockurl"
|
|
182
190
|
>
|
|
183
191
|
mock name
|
|
@@ -228,6 +236,7 @@ exports[`Card component should render customPreheader and alternativeHeadline in
|
|
|
228
236
|
class="card__image card__image--portrait"
|
|
229
237
|
>
|
|
230
238
|
<a
|
|
239
|
+
aria-label="Open /mockurl"
|
|
231
240
|
class="card__image-link"
|
|
232
241
|
href="/mockurl"
|
|
233
242
|
>
|
|
@@ -252,6 +261,7 @@ exports[`Card component should render customPreheader and alternativeHeadline in
|
|
|
252
261
|
class="card__title card__title--portrait "
|
|
253
262
|
>
|
|
254
263
|
<a
|
|
264
|
+
aria-label="Alternative headline"
|
|
255
265
|
href="/mockurl"
|
|
256
266
|
>
|
|
257
267
|
Alternative headline
|
|
@@ -302,6 +312,7 @@ exports[`Card component should render without throwing an error and match snapsh
|
|
|
302
312
|
class="card__image card__image--portrait"
|
|
303
313
|
>
|
|
304
314
|
<a
|
|
315
|
+
aria-label="Open /mockurl"
|
|
305
316
|
class="card__image-link"
|
|
306
317
|
href="/mockurl"
|
|
307
318
|
>
|
|
@@ -318,6 +329,7 @@ exports[`Card component should render without throwing an error and match snapsh
|
|
|
318
329
|
class="card__content card__content--portrait"
|
|
319
330
|
>
|
|
320
331
|
<a
|
|
332
|
+
aria-label="category-name"
|
|
321
333
|
class="badge badge--label"
|
|
322
334
|
href="published-url"
|
|
323
335
|
>
|
|
@@ -327,6 +339,7 @@ exports[`Card component should render without throwing an error and match snapsh
|
|
|
327
339
|
class="card__title card__title--portrait "
|
|
328
340
|
>
|
|
329
341
|
<a
|
|
342
|
+
aria-label="mock name"
|
|
330
343
|
href="/mockurl"
|
|
331
344
|
>
|
|
332
345
|
mock name
|
|
@@ -21,6 +21,7 @@ exports[`CardsContainer component should render with carousel if option is enabl
|
|
|
21
21
|
class="card__image card__image--portrait"
|
|
22
22
|
>
|
|
23
23
|
<a
|
|
24
|
+
aria-label="Open /nautors-swan/swan-78"
|
|
24
25
|
class="card__image-link"
|
|
25
26
|
href="/nautors-swan/swan-78"
|
|
26
27
|
/>
|
|
@@ -40,6 +41,7 @@ exports[`CardsContainer component should render with carousel if option is enabl
|
|
|
40
41
|
class="card__title card__title--portrait "
|
|
41
42
|
>
|
|
42
43
|
<a
|
|
44
|
+
aria-label="Swan 78"
|
|
43
45
|
href="/nautors-swan/swan-78"
|
|
44
46
|
>
|
|
45
47
|
Swan 78
|
|
@@ -58,6 +60,7 @@ exports[`CardsContainer component should render with carousel if option is enabl
|
|
|
58
60
|
class="card__image card__image--portrait"
|
|
59
61
|
>
|
|
60
62
|
<a
|
|
63
|
+
aria-label="Open /nautors-swan/swan-98"
|
|
61
64
|
class="card__image-link"
|
|
62
65
|
href="/nautors-swan/swan-98"
|
|
63
66
|
/>
|
|
@@ -77,6 +80,7 @@ exports[`CardsContainer component should render with carousel if option is enabl
|
|
|
77
80
|
class="card__title card__title--portrait "
|
|
78
81
|
>
|
|
79
82
|
<a
|
|
83
|
+
aria-label="Swan 98"
|
|
80
84
|
href="/nautors-swan/swan-98"
|
|
81
85
|
>
|
|
82
86
|
Swan 98
|
|
@@ -109,6 +113,7 @@ exports[`CardsContainer component should render without throwing error and match
|
|
|
109
113
|
class="card__image card__image--portrait"
|
|
110
114
|
>
|
|
111
115
|
<a
|
|
116
|
+
aria-label="Open /nautors-swan/swan-78"
|
|
112
117
|
class="card__image-link"
|
|
113
118
|
href="/nautors-swan/swan-78"
|
|
114
119
|
/>
|
|
@@ -128,6 +133,7 @@ exports[`CardsContainer component should render without throwing error and match
|
|
|
128
133
|
class="card__title card__title--portrait "
|
|
129
134
|
>
|
|
130
135
|
<a
|
|
136
|
+
aria-label="Swan 78"
|
|
131
137
|
href="/nautors-swan/swan-78"
|
|
132
138
|
>
|
|
133
139
|
Swan 78
|
|
@@ -146,6 +152,7 @@ exports[`CardsContainer component should render without throwing error and match
|
|
|
146
152
|
class="card__image card__image--portrait"
|
|
147
153
|
>
|
|
148
154
|
<a
|
|
155
|
+
aria-label="Open /nautors-swan/swan-98"
|
|
149
156
|
class="card__image-link"
|
|
150
157
|
href="/nautors-swan/swan-98"
|
|
151
158
|
/>
|
|
@@ -165,6 +172,7 @@ exports[`CardsContainer component should render without throwing error and match
|
|
|
165
172
|
class="card__title card__title--portrait "
|
|
166
173
|
>
|
|
167
174
|
<a
|
|
175
|
+
aria-label="Swan 98"
|
|
168
176
|
href="/nautors-swan/swan-98"
|
|
169
177
|
>
|
|
170
178
|
Swan 98
|
|
@@ -36,6 +36,7 @@ exports[`ContentGroupTabs component should match snapshot and render sidepanel c
|
|
|
36
36
|
class="content-group-sidepanel__content-section"
|
|
37
37
|
id="section-one"
|
|
38
38
|
role="tabpanel"
|
|
39
|
+
tabid="tab-section-one"
|
|
39
40
|
>
|
|
40
41
|
<div>
|
|
41
42
|
section one
|
|
@@ -81,6 +82,7 @@ exports[`ContentGroupTabs component should match snapshot and render tabs conten
|
|
|
81
82
|
class="content-group-tabs__content-section"
|
|
82
83
|
id="section-one"
|
|
83
84
|
role="tabpanel"
|
|
85
|
+
tabid="tab-section-one"
|
|
84
86
|
>
|
|
85
87
|
<div>
|
|
86
88
|
section one
|