@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
|
@@ -6,6 +6,7 @@ exports[`Image component should render image 1`] = `
|
|
|
6
6
|
class="image "
|
|
7
7
|
>
|
|
8
8
|
<a
|
|
9
|
+
aria-label="Open www.url-test-prop.com"
|
|
9
10
|
class="image__wrapper"
|
|
10
11
|
href="http://www.url-test-prop.com"
|
|
11
12
|
rel="noopener nofollow"
|
|
@@ -27,6 +28,7 @@ exports[`Image component should render image with parallax setting 1`] = `
|
|
|
27
28
|
class="image image--parallax"
|
|
28
29
|
>
|
|
29
30
|
<a
|
|
31
|
+
aria-label="Open www.url-test-prop.com"
|
|
30
32
|
class="image__wrapper"
|
|
31
33
|
href="http://www.url-test-prop.com"
|
|
32
34
|
rel="noopener nofollow"
|
|
@@ -48,6 +50,7 @@ exports[`Image component should renderimage with children 1`] = `
|
|
|
48
50
|
class="image "
|
|
49
51
|
>
|
|
50
52
|
<a
|
|
53
|
+
aria-label="Open www.url-test-prop.com"
|
|
51
54
|
class="image__wrapper"
|
|
52
55
|
href="http://www.url-test-prop.com"
|
|
53
56
|
rel="noopener nofollow"
|
|
@@ -9,6 +9,7 @@ exports[`ImageFactory component should render image 1`] = `
|
|
|
9
9
|
parent="[object Object]"
|
|
10
10
|
>
|
|
11
11
|
<a
|
|
12
|
+
aria-label="Open www.url-test-prop.com"
|
|
12
13
|
class="image__wrapper"
|
|
13
14
|
href="http://www.url-test-prop.com"
|
|
14
15
|
rel="noopener nofollow"
|
|
@@ -32,6 +33,7 @@ exports[`ImageFactory component should render image fetching data from relation
|
|
|
32
33
|
parent="[object Object]"
|
|
33
34
|
>
|
|
34
35
|
<a
|
|
36
|
+
aria-label="Open www.url-test-prop.com"
|
|
35
37
|
class="image__wrapper"
|
|
36
38
|
href="http://www.url-test-prop.com"
|
|
37
39
|
rel="noopener nofollow"
|
|
@@ -50,6 +52,7 @@ exports[`ImageFactory component should render image fetching data from relation
|
|
|
50
52
|
parent="[object Object]"
|
|
51
53
|
>
|
|
52
54
|
<a
|
|
55
|
+
aria-label="Open www.url-test-prop.com"
|
|
53
56
|
class="image__wrapper"
|
|
54
57
|
href="http://www.url-test-prop.com"
|
|
55
58
|
rel="noopener nofollow"
|
|
@@ -74,6 +77,7 @@ exports[`ImageFactory component should render image with handlebar compiled valu
|
|
|
74
77
|
parent="[object Object]"
|
|
75
78
|
>
|
|
76
79
|
<a
|
|
80
|
+
aria-label="Open www.url-test-prop.com"
|
|
77
81
|
class="image__wrapper"
|
|
78
82
|
href="http://www.url-test-prop.com"
|
|
79
83
|
rel="noopener nofollow"
|
|
@@ -14,8 +14,17 @@ jest.mock('../../../../../src/components/List/components/Pagination/ListPaginati
|
|
|
14
14
|
jest.fn().mockImplementation(() => <div>Pagination Mock</div>)
|
|
15
15
|
);
|
|
16
16
|
|
|
17
|
+
jest.mock('../../../../../src/hooks/use-app-sync-event-hook', () =>
|
|
18
|
+
jest.fn().mockImplementation(({ data }) => ({ data }))
|
|
19
|
+
);
|
|
20
|
+
|
|
17
21
|
const mockedOptions = {
|
|
18
22
|
variables: { variable: 1 },
|
|
23
|
+
blazeApp: {
|
|
24
|
+
events: {
|
|
25
|
+
emit: () => {}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
19
28
|
actionKey: 'actionKey',
|
|
20
29
|
action: {
|
|
21
30
|
data: { actionKey: { results: [{ id: 1 }, { id: 2 }] } },
|
package/tests/unit/src/components/List/components/Header/__snapshots__/ListHeader.test.js.snap
CHANGED
|
@@ -6,30 +6,35 @@ exports[`ListHeader pagination component should render based on props passed 1`]
|
|
|
6
6
|
class="az_list_filter flex"
|
|
7
7
|
>
|
|
8
8
|
<a
|
|
9
|
+
aria-label="Show all"
|
|
9
10
|
class="az_list_filter_option flex-grow"
|
|
10
11
|
href="/test-url"
|
|
11
12
|
>
|
|
12
13
|
ALL
|
|
13
14
|
</a>
|
|
14
15
|
<a
|
|
16
|
+
aria-label="Filter by A"
|
|
15
17
|
class="az_list_filter_option flex-grow"
|
|
16
18
|
href="/test-url?pb%5Baz-list%5D%5BaZ%5D=a&pb%5Baz-list%5D%5Bpage%5D=1"
|
|
17
19
|
>
|
|
18
20
|
A
|
|
19
21
|
</a>
|
|
20
22
|
<a
|
|
23
|
+
aria-label="Filter by D"
|
|
21
24
|
class="az_list_filter_option selected flex-grow"
|
|
22
25
|
href="/test-url?pb%5Baz-list%5D%5BaZ%5D=d&pb%5Baz-list%5D%5Bpage%5D=1"
|
|
23
26
|
>
|
|
24
27
|
D
|
|
25
28
|
</a>
|
|
26
29
|
<a
|
|
30
|
+
aria-label="Filter by 0"
|
|
27
31
|
class="az_list_filter_option flex-grow"
|
|
28
32
|
href="/test-url?pb%5Baz-list%5D%5BaZ%5D=0&pb%5Baz-list%5D%5Bpage%5D=1"
|
|
29
33
|
>
|
|
30
34
|
0
|
|
31
35
|
</a>
|
|
32
36
|
<a
|
|
37
|
+
aria-label="Filter by X"
|
|
33
38
|
class="az_list_filter_option flex-grow"
|
|
34
39
|
href="/test-url?pb%5Baz-list%5D%5BaZ%5D=x&pb%5Baz-list%5D%5Bpage%5D=1"
|
|
35
40
|
>
|
package/tests/unit/src/components/List/components/Pagination/__snapshots__/Classic.test.js.snap
CHANGED
|
@@ -3,18 +3,21 @@
|
|
|
3
3
|
exports[`Classic pagination component should render based on props passed 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<a
|
|
6
|
+
aria-label="Previous page"
|
|
6
7
|
class="pagination_page-previous"
|
|
7
8
|
href="some-page?pb%5Blist-1%5D%5Bpage%5D=2"
|
|
8
9
|
>
|
|
9
|
-
Previous
|
|
10
|
+
Previous page
|
|
10
11
|
</a>
|
|
11
12
|
<a
|
|
13
|
+
aria-label="Page 1"
|
|
12
14
|
class="pagination_page-item"
|
|
13
15
|
href="some-page?pb%5Blist-1%5D%5Bpage%5D=1"
|
|
14
16
|
>
|
|
15
17
|
1
|
|
16
18
|
</a>
|
|
17
19
|
<a
|
|
20
|
+
aria-label="Page 2"
|
|
18
21
|
class="pagination_page-item"
|
|
19
22
|
href="some-page?pb%5Blist-1%5D%5Bpage%5D=2"
|
|
20
23
|
>
|
|
@@ -26,22 +29,25 @@ exports[`Classic pagination component should render based on props passed 1`] =
|
|
|
26
29
|
3
|
|
27
30
|
</span>
|
|
28
31
|
<a
|
|
32
|
+
aria-label="Page 4"
|
|
29
33
|
class="pagination_page-item"
|
|
30
34
|
href="some-page?pb%5Blist-1%5D%5Bpage%5D=4"
|
|
31
35
|
>
|
|
32
36
|
4
|
|
33
37
|
</a>
|
|
34
38
|
<a
|
|
39
|
+
aria-label="Page 5"
|
|
35
40
|
class="pagination_page-item"
|
|
36
41
|
href="some-page?pb%5Blist-1%5D%5Bpage%5D=5"
|
|
37
42
|
>
|
|
38
43
|
5
|
|
39
44
|
</a>
|
|
40
45
|
<a
|
|
46
|
+
aria-label="Next page"
|
|
41
47
|
class="pagination_page-next"
|
|
42
48
|
href="some-page?pb%5Blist-1%5D%5Bpage%5D=4"
|
|
43
49
|
>
|
|
44
|
-
Next
|
|
50
|
+
Next page
|
|
45
51
|
</a>
|
|
46
52
|
</DocumentFragment>
|
|
47
53
|
`;
|
|
@@ -12,24 +12,28 @@ exports[`ListPagination component should render pagination items based on curren
|
|
|
12
12
|
class="pagination"
|
|
13
13
|
>
|
|
14
14
|
<a
|
|
15
|
+
aria-label="Previous page"
|
|
15
16
|
class="pagination_page-previous"
|
|
16
17
|
href="?pb%5Blist%5D%5Bpage%5D=3"
|
|
17
18
|
>
|
|
18
|
-
Previous
|
|
19
|
+
Previous page
|
|
19
20
|
</a>
|
|
20
21
|
<a
|
|
22
|
+
aria-label="Page 1"
|
|
21
23
|
class="pagination_page-item"
|
|
22
24
|
href="?pb%5Blist%5D%5Bpage%5D=1"
|
|
23
25
|
>
|
|
24
26
|
1
|
|
25
27
|
</a>
|
|
26
28
|
<a
|
|
29
|
+
aria-label="Page 2"
|
|
27
30
|
class="pagination_page-item"
|
|
28
31
|
href="?pb%5Blist%5D%5Bpage%5D=2"
|
|
29
32
|
>
|
|
30
33
|
2
|
|
31
34
|
</a>
|
|
32
35
|
<a
|
|
36
|
+
aria-label="Page 3"
|
|
33
37
|
class="pagination_page-item"
|
|
34
38
|
href="?pb%5Blist%5D%5Bpage%5D=3"
|
|
35
39
|
>
|
package/tests/unit/src/components/List/helpers/__snapshots__/build-pagination-items.test.js.snap
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
exports[`buildPaginationItems helper function should render four pages second selected with onclick passed 1`] = `
|
|
4
4
|
Array [
|
|
5
5
|
<BlazeLink
|
|
6
|
+
ariaLabel="Page 1"
|
|
6
7
|
as=""
|
|
7
8
|
className="pagination_page-item"
|
|
8
9
|
gtmId=""
|
|
@@ -21,6 +22,7 @@ Array [
|
|
|
21
22
|
2
|
|
22
23
|
</span>,
|
|
23
24
|
<BlazeLink
|
|
25
|
+
ariaLabel="Page 3"
|
|
24
26
|
as=""
|
|
25
27
|
className="pagination_page-item"
|
|
26
28
|
gtmId=""
|
|
@@ -34,6 +36,7 @@ Array [
|
|
|
34
36
|
3
|
|
35
37
|
</BlazeLink>,
|
|
36
38
|
<BlazeLink
|
|
39
|
+
ariaLabel="Page 4"
|
|
37
40
|
as=""
|
|
38
41
|
className="pagination_page-item"
|
|
39
42
|
gtmId=""
|
|
@@ -52,6 +55,7 @@ Array [
|
|
|
52
55
|
exports[`buildPaginationItems helper function should render ten page fith selected 1`] = `
|
|
53
56
|
Array [
|
|
54
57
|
<BlazeLink
|
|
58
|
+
ariaLabel="Page 1"
|
|
55
59
|
as=""
|
|
56
60
|
className="pagination_page-item"
|
|
57
61
|
gtmId=""
|
|
@@ -65,6 +69,7 @@ Array [
|
|
|
65
69
|
1
|
|
66
70
|
</BlazeLink>,
|
|
67
71
|
<BlazeLink
|
|
72
|
+
ariaLabel="Page 2"
|
|
68
73
|
as=""
|
|
69
74
|
className="pagination_page-item"
|
|
70
75
|
gtmId=""
|
|
@@ -78,6 +83,7 @@ Array [
|
|
|
78
83
|
2
|
|
79
84
|
</BlazeLink>,
|
|
80
85
|
<BlazeLink
|
|
86
|
+
ariaLabel="Page 3"
|
|
81
87
|
as=""
|
|
82
88
|
className="pagination_page-item"
|
|
83
89
|
gtmId=""
|
|
@@ -91,6 +97,7 @@ Array [
|
|
|
91
97
|
3
|
|
92
98
|
</BlazeLink>,
|
|
93
99
|
<BlazeLink
|
|
100
|
+
ariaLabel="Page 4"
|
|
94
101
|
as=""
|
|
95
102
|
className="pagination_page-item"
|
|
96
103
|
gtmId=""
|
|
@@ -109,6 +116,7 @@ Array [
|
|
|
109
116
|
5
|
|
110
117
|
</span>,
|
|
111
118
|
<BlazeLink
|
|
119
|
+
ariaLabel="Page 6"
|
|
112
120
|
as=""
|
|
113
121
|
className="pagination_page-item"
|
|
114
122
|
gtmId=""
|
|
@@ -122,6 +130,7 @@ Array [
|
|
|
122
130
|
6
|
|
123
131
|
</BlazeLink>,
|
|
124
132
|
<BlazeLink
|
|
133
|
+
ariaLabel="Page 7"
|
|
125
134
|
as=""
|
|
126
135
|
className="pagination_page-item"
|
|
127
136
|
gtmId=""
|
|
@@ -135,6 +144,7 @@ Array [
|
|
|
135
144
|
7
|
|
136
145
|
</BlazeLink>,
|
|
137
146
|
<BlazeLink
|
|
147
|
+
ariaLabel="Page 8"
|
|
138
148
|
as=""
|
|
139
149
|
className="pagination_page-item"
|
|
140
150
|
gtmId=""
|
|
@@ -148,6 +158,7 @@ Array [
|
|
|
148
158
|
8
|
|
149
159
|
</BlazeLink>,
|
|
150
160
|
<BlazeLink
|
|
161
|
+
ariaLabel="Page 9"
|
|
151
162
|
as=""
|
|
152
163
|
className="pagination_page-item"
|
|
153
164
|
gtmId=""
|
|
@@ -161,6 +172,7 @@ Array [
|
|
|
161
172
|
9
|
|
162
173
|
</BlazeLink>,
|
|
163
174
|
<BlazeLink
|
|
175
|
+
ariaLabel="Page 10"
|
|
164
176
|
as=""
|
|
165
177
|
className="pagination_page-item"
|
|
166
178
|
gtmId=""
|
|
@@ -179,6 +191,7 @@ Array [
|
|
|
179
191
|
exports[`buildPaginationItems helper function should rrender twenty pages either selected 1`] = `
|
|
180
192
|
Array [
|
|
181
193
|
<BlazeLink
|
|
194
|
+
ariaLabel="Page 4"
|
|
182
195
|
as=""
|
|
183
196
|
className="pagination_page-item"
|
|
184
197
|
gtmId=""
|
|
@@ -192,6 +205,7 @@ Array [
|
|
|
192
205
|
4
|
|
193
206
|
</BlazeLink>,
|
|
194
207
|
<BlazeLink
|
|
208
|
+
ariaLabel="Page 5"
|
|
195
209
|
as=""
|
|
196
210
|
className="pagination_page-item"
|
|
197
211
|
gtmId=""
|
|
@@ -205,6 +219,7 @@ Array [
|
|
|
205
219
|
5
|
|
206
220
|
</BlazeLink>,
|
|
207
221
|
<BlazeLink
|
|
222
|
+
ariaLabel="Page 6"
|
|
208
223
|
as=""
|
|
209
224
|
className="pagination_page-item"
|
|
210
225
|
gtmId=""
|
|
@@ -218,6 +233,7 @@ Array [
|
|
|
218
233
|
6
|
|
219
234
|
</BlazeLink>,
|
|
220
235
|
<BlazeLink
|
|
236
|
+
ariaLabel="Page 7"
|
|
221
237
|
as=""
|
|
222
238
|
className="pagination_page-item"
|
|
223
239
|
gtmId=""
|
|
@@ -236,6 +252,7 @@ Array [
|
|
|
236
252
|
8
|
|
237
253
|
</span>,
|
|
238
254
|
<BlazeLink
|
|
255
|
+
ariaLabel="Page 9"
|
|
239
256
|
as=""
|
|
240
257
|
className="pagination_page-item"
|
|
241
258
|
gtmId=""
|
|
@@ -249,6 +266,7 @@ Array [
|
|
|
249
266
|
9
|
|
250
267
|
</BlazeLink>,
|
|
251
268
|
<BlazeLink
|
|
269
|
+
ariaLabel="Page 10"
|
|
252
270
|
as=""
|
|
253
271
|
className="pagination_page-item"
|
|
254
272
|
gtmId=""
|
|
@@ -262,6 +280,7 @@ Array [
|
|
|
262
280
|
10
|
|
263
281
|
</BlazeLink>,
|
|
264
282
|
<BlazeLink
|
|
283
|
+
ariaLabel="Page 11"
|
|
265
284
|
as=""
|
|
266
285
|
className="pagination_page-item"
|
|
267
286
|
gtmId=""
|
|
@@ -275,6 +294,7 @@ Array [
|
|
|
275
294
|
11
|
|
276
295
|
</BlazeLink>,
|
|
277
296
|
<BlazeLink
|
|
297
|
+
ariaLabel="Page 12"
|
|
278
298
|
as=""
|
|
279
299
|
className="pagination_page-item"
|
|
280
300
|
gtmId=""
|
|
@@ -288,6 +308,7 @@ Array [
|
|
|
288
308
|
12
|
|
289
309
|
</BlazeLink>,
|
|
290
310
|
<BlazeLink
|
|
311
|
+
ariaLabel="Page 13"
|
|
291
312
|
as=""
|
|
292
313
|
className="pagination_page-item"
|
|
293
314
|
gtmId=""
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import buildQueryBooster from '../../../../../../src/components/List/helpers/build-query-booster';
|
|
2
|
+
|
|
3
|
+
describe('buildQueryBooster helper function', () => {
|
|
4
|
+
it('should return unmodified variables if no recencyBoostProperty is present in props', () => {
|
|
5
|
+
const noRecencyBoostProperty = buildQueryBooster({}, { rawQueryStringified: `{"test":"t"}` });
|
|
6
|
+
expect(noRecencyBoostProperty).toEqual({ rawQueryStringified: '{"test":"t"}' });
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
it('should return update rawQueryStringified with recency boosted props', () => {
|
|
10
|
+
const noRecencyBoostProperty = buildQueryBooster(
|
|
11
|
+
{ recencyBoostProperty: ['date'] },
|
|
12
|
+
{ rawQueryStringified: `{"test":"t"}` }
|
|
13
|
+
);
|
|
14
|
+
expect(noRecencyBoostProperty).toEqual({
|
|
15
|
+
rawQueryStringified:
|
|
16
|
+
'{"function_score":{"query":{"test":"t"},"functions":[{"gauss":{"date":{"origin":"now","scale":"30d","offset":"7d","decay":0.5}}}],"boost_mode":"multiply"}}'
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should return update rawQueryStringified with recency boosted props and existing functions if present', () => {
|
|
21
|
+
const noRecencyBoostProperty = buildQueryBooster(
|
|
22
|
+
{ recencyBoostProperty: ['date'] },
|
|
23
|
+
{
|
|
24
|
+
rawQueryStringified:
|
|
25
|
+
'{"function_score":{"query":{"test":"t"},"functions":[{"gauss":{"test":{"origin":"now","scale":"30d","offset":"7d","decay":0.5}}}],"boost_mode":"multiply"}}'
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
expect(noRecencyBoostProperty).toEqual({
|
|
29
|
+
rawQueryStringified:
|
|
30
|
+
'{"function_score":{"query":{"test":"t"},"functions":[{"gauss":{"test":{"origin":"now","scale":"30d","offset":"7d","decay":0.5}}},{"gauss":{"date":{"origin":"now","scale":"30d","offset":"7d","decay":0.5}}}],"boost_mode":"multiply"}}'
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
exports[`MenuItem component should render link if url is passed 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<li
|
|
6
|
+
aria-label="Item 1"
|
|
6
7
|
class="menu-item-mod"
|
|
7
8
|
>
|
|
8
9
|
<div
|
|
9
10
|
class="menu--item--link"
|
|
10
11
|
>
|
|
11
12
|
<a
|
|
13
|
+
aria-label="Item 1"
|
|
12
14
|
href="/somewhere"
|
|
13
15
|
>
|
|
14
16
|
Item 1
|
|
@@ -49,6 +51,7 @@ exports[`MenuItem component should render link if url is passed 1`] = `
|
|
|
49
51
|
exports[`MenuItem component should render without throwing an error and match snapshot 1`] = `
|
|
50
52
|
<DocumentFragment>
|
|
51
53
|
<li
|
|
54
|
+
aria-label="Item 1"
|
|
52
55
|
class="menu-item-mod"
|
|
53
56
|
>
|
|
54
57
|
<div
|
|
@@ -7,8 +7,10 @@ exports[`Placeholder component should render PlaceholderIcon 1`] = `
|
|
|
7
7
|
data-testid="placeholder-icon"
|
|
8
8
|
>
|
|
9
9
|
<svg
|
|
10
|
+
height="25px"
|
|
10
11
|
version="1.1"
|
|
11
12
|
viewBox="0 0 20 20"
|
|
13
|
+
width="25px"
|
|
12
14
|
xmlns="http://www.w3.org/2000/svg"
|
|
13
15
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
14
16
|
>
|
|
@@ -37,7 +39,7 @@ exports[`Placeholder component should render PlaceholderIcon 1`] = `
|
|
|
37
39
|
d="M1.07,10 C3.04212623,8.18723771 4.14171262,7.28085657 4.36875916,7.28085657 C4.79707626,7.28085657 7,9 7.5,9 C8.40867615,9 12.0764465,4.56171314 12.9,4.56171314 C13.4490356,4.56171314 14.8390356,5.81447543 17.07,8.32"
|
|
38
40
|
fill-rule="nonzero"
|
|
39
41
|
id="Path-3"
|
|
40
|
-
stroke="
|
|
42
|
+
stroke="#899BBC"
|
|
41
43
|
stroke-width="1.3"
|
|
42
44
|
/>
|
|
43
45
|
<path
|
|
@@ -7,7 +7,8 @@ exports[`Select component should display label as placeholder with no label tag
|
|
|
7
7
|
>
|
|
8
8
|
<select
|
|
9
9
|
data-testid="filter-name"
|
|
10
|
-
id="name"
|
|
10
|
+
id="select-filter-name"
|
|
11
|
+
name="filter-name"
|
|
11
12
|
>
|
|
12
13
|
<option>
|
|
13
14
|
Placeholder label
|
|
@@ -36,13 +37,14 @@ exports[`Select component should render witout throwing an error and match snaps
|
|
|
36
37
|
>
|
|
37
38
|
<label
|
|
38
39
|
class=""
|
|
39
|
-
for="name"
|
|
40
|
+
for="select-filter-name"
|
|
40
41
|
>
|
|
41
42
|
name
|
|
42
43
|
</label>
|
|
43
44
|
<select
|
|
44
45
|
data-testid="filter-name"
|
|
45
|
-
id="name"
|
|
46
|
+
id="select-filter-name"
|
|
47
|
+
name="filter-name"
|
|
46
48
|
>
|
|
47
49
|
<option>
|
|
48
50
|
Any
|
|
@@ -6,11 +6,11 @@ exports[`SFItem component should match snapshot and render without throwing an e
|
|
|
6
6
|
class="social__list-item social__list-item--follow"
|
|
7
7
|
>
|
|
8
8
|
<a
|
|
9
|
+
aria-label="Facebook"
|
|
9
10
|
class="facebook"
|
|
10
|
-
href="www.facebook.com"
|
|
11
|
+
href="http://www.facebook.com"
|
|
11
12
|
rel="noopener nofollow"
|
|
12
13
|
target="_blank"
|
|
13
|
-
title="Facebook"
|
|
14
14
|
>
|
|
15
15
|
<i>
|
|
16
16
|
<svg
|
|
@@ -12,11 +12,9 @@ exports[`SocialFollow component should render without throwing an error and matc
|
|
|
12
12
|
class="social__list-item social__list-item--follow"
|
|
13
13
|
>
|
|
14
14
|
<a
|
|
15
|
+
aria-label="Facebook"
|
|
15
16
|
class="facebook"
|
|
16
17
|
href="facebook value"
|
|
17
|
-
rel="noopener nofollow"
|
|
18
|
-
target="_blank"
|
|
19
|
-
title="Facebook"
|
|
20
18
|
>
|
|
21
19
|
<i>
|
|
22
20
|
<svg
|
|
@@ -44,11 +42,9 @@ exports[`SocialFollow component should render without throwing an error and matc
|
|
|
44
42
|
class="social__list-item social__list-item--follow"
|
|
45
43
|
>
|
|
46
44
|
<a
|
|
45
|
+
aria-label="Twitter"
|
|
47
46
|
class="twitter"
|
|
48
47
|
href="twitter value"
|
|
49
|
-
rel="noopener nofollow"
|
|
50
|
-
target="_blank"
|
|
51
|
-
title="Twitter"
|
|
52
48
|
>
|
|
53
49
|
<i>
|
|
54
50
|
<svg
|
|
@@ -12,6 +12,7 @@ exports[`TextBlock component With wrapper flag should render with wrapper and le
|
|
|
12
12
|
</h1>
|
|
13
13
|
|
|
14
14
|
<a
|
|
15
|
+
aria-label="link"
|
|
15
16
|
href="/"
|
|
16
17
|
>
|
|
17
18
|
link
|
|
@@ -34,6 +35,7 @@ exports[`TextBlock component With wrapper flag should render with wrapper and le
|
|
|
34
35
|
</h1>
|
|
35
36
|
|
|
36
37
|
<a
|
|
38
|
+
aria-label="link"
|
|
37
39
|
href="/"
|
|
38
40
|
>
|
|
39
41
|
link
|
|
@@ -56,6 +58,7 @@ exports[`TextBlock component should match snapshot 1`] = `
|
|
|
56
58
|
</h1>
|
|
57
59
|
|
|
58
60
|
<a
|
|
61
|
+
aria-label="link"
|
|
59
62
|
href="/"
|
|
60
63
|
>
|
|
61
64
|
link
|
|
@@ -75,6 +78,7 @@ exports[`TextBlock component should not render wrapper if no modifier 1`] = `
|
|
|
75
78
|
</h1>
|
|
76
79
|
|
|
77
80
|
<a
|
|
81
|
+
aria-label="link"
|
|
78
82
|
href="/"
|
|
79
83
|
>
|
|
80
84
|
link
|