@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.
Files changed (278) hide show
  1. package/CHANGELOG.md +31 -197
  2. package/lib/HOC/recreateOnNavigation.js.map +1 -1
  3. package/lib/HOC/withTitle.js.map +1 -1
  4. package/lib/application/query/index.js +1 -0
  5. package/lib/application/query/index.js.map +1 -1
  6. package/lib/components/BackToTop/BackToTop.js.map +1 -1
  7. package/lib/components/Banner/AdSlotRender.js +1 -1
  8. package/lib/components/Banner/Banner.js +1 -1
  9. package/lib/components/Banner/BannerRender.js.map +1 -1
  10. package/lib/components/Breadcrumb/Breadcrumb.js +1 -1
  11. package/lib/components/Breadcrumb/Breadcrumb.js.map +1 -1
  12. package/lib/components/Button.js.map +1 -1
  13. package/lib/components/Card/CardsContainer.js +1 -1
  14. package/lib/components/Card/CardsFactory.js.map +1 -1
  15. package/lib/components/Card/CardsRender.js.map +1 -1
  16. package/lib/components/Carousel/CarouselRender/CarouselRender.js +1 -0
  17. package/lib/components/Carousel/CarouselRender/CarouselRender.js.map +1 -1
  18. package/lib/components/CarouselWrapper/DefaultCarousel.js.map +1 -1
  19. package/lib/components/ContentGroup/ContentGroupTabs.js +1 -1
  20. package/lib/components/ContentGroup/ContentGroupTabs.js.map +1 -1
  21. package/lib/components/ContentGroup/helpers/get-sections-data.js +1 -0
  22. package/lib/components/ContentGroup/helpers/get-sections-data.js.map +1 -1
  23. package/lib/components/DataSummary/DataSummaryRender.js +1 -0
  24. package/lib/components/DataSummary/DataSummaryRender.js.map +1 -1
  25. package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js +1 -1
  26. package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js +1 -1
  27. package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js +1 -1
  28. package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js +1 -1
  29. package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js +1 -1
  30. package/lib/components/DataSummary/DataSummaryTypes/index.js.map +1 -1
  31. package/lib/components/DateTime/DateTime.js +4 -4
  32. package/lib/components/DateTime/DateTime.js.map +1 -1
  33. package/lib/components/EmailConfirm/EmailConfirm.js +3 -3
  34. package/lib/components/EmailConfirm/EmailConfirm.js.map +1 -1
  35. package/lib/components/Image/GlobalLightbox/GlobalLightbox.js +2 -2
  36. package/lib/components/Image/GlobalLightbox/GlobalLightbox.js.map +1 -1
  37. package/lib/components/Image/GlobalLightbox/index.js.map +1 -1
  38. package/lib/components/Image/Image.js.map +1 -1
  39. package/lib/components/Image/ImageFactory.js +1 -1
  40. package/lib/components/Image/ImageFactory.js.map +1 -1
  41. package/lib/components/ItemList/helpers/get-item-list-ids.js +1 -0
  42. package/lib/components/ItemList/helpers/get-item-list-ids.js.map +1 -1
  43. package/lib/components/ItemList/hooks/use-item-list-id.js.map +1 -1
  44. package/lib/components/Layout/LayoutFactory.js.map +1 -1
  45. package/lib/components/Layout/LayoutWithStickyTimer.js.map +1 -1
  46. package/lib/components/List/ListFactory.js.map +1 -1
  47. package/lib/components/List/ListRender.js.map +1 -1
  48. package/lib/components/List/components/Cards/CardsRenderWrapper.js +1 -1
  49. package/lib/components/List/components/Full/FullRender.js +1 -1
  50. package/lib/components/List/components/Full/FullRenderItem.js +1 -1
  51. package/lib/components/List/components/Header/ListHeader.js +1 -0
  52. package/lib/components/List/components/Header/ListHeader.js.map +1 -1
  53. package/lib/components/List/components/Pagination/ListPagination.js.map +1 -1
  54. package/lib/components/List/components/Pagination/LoadMore.js +2 -2
  55. package/lib/components/List/components/Pagination/LoadMore.js.map +1 -1
  56. package/lib/components/List/helpers/build-query-booster.js +1 -1
  57. package/lib/components/List/helpers/sort-aggs.js.map +1 -1
  58. package/lib/components/Menu/Menu.js.map +1 -1
  59. package/lib/components/MenuItem/MenuItemRender.js.map +1 -1
  60. package/lib/components/ModalAdapter/index.js.map +1 -1
  61. package/lib/components/SearchContent/SearchContent.js.map +1 -1
  62. package/lib/components/SearchContent/SearchContentItems.js +1 -0
  63. package/lib/components/SearchContent/SearchContentItems.js.map +1 -1
  64. package/lib/components/SearchFilter/SearchFilter/FiltersList.js +1 -1
  65. package/lib/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
  66. package/lib/components/SearchFilter/helpers/get-filter-value-from-query.js +1 -0
  67. package/lib/components/SearchFilter/helpers/get-filter-value-from-query.js.map +1 -1
  68. package/lib/components/SearchFilter/helpers/get-select-options.js +1 -0
  69. package/lib/components/SearchFilter/helpers/get-select-options.js.map +1 -1
  70. package/lib/components/SearchFilter/helpers/parse-filter-value.js +1 -0
  71. package/lib/components/SearchFilter/helpers/parse-filter-value.js.map +1 -1
  72. package/lib/components/SearchFilterSort/SearchFilterSort.js +1 -0
  73. package/lib/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
  74. package/lib/components/SocialFollow/SocialFollowRender.js +1 -0
  75. package/lib/components/SocialFollow/SocialFollowRender.js.map +1 -1
  76. package/lib/components/Video/providers/Vimeo/VimeoProvider.js.map +1 -1
  77. package/lib/components/Video/providers/YouTube/YoutubeEmbeded.js.map +1 -1
  78. package/lib/components/Video/providers/get-provider.js.map +1 -1
  79. package/lib/components/Wrapper.js +2 -2
  80. package/lib/components/Wrapper.js.map +1 -1
  81. package/lib/components/index.js.map +1 -1
  82. package/lib/constants/index.js.map +1 -1
  83. package/lib/helpers/build-query-fields.js +1 -0
  84. package/lib/helpers/build-query-fields.js.map +1 -1
  85. package/lib/helpers/build-search-values-checkbox-select.js +1 -1
  86. package/lib/helpers/build-search-values-checkbox-select.js.map +1 -1
  87. package/lib/helpers/check-props-to-use.js +1 -0
  88. package/lib/helpers/check-props-to-use.js.map +1 -1
  89. package/lib/helpers/get-current-offset.js +4 -5
  90. package/lib/helpers/get-current-offset.js.map +1 -1
  91. package/lib/helpers/get-entities-with-banner.js +1 -1
  92. package/lib/helpers/get-wrapped-value-with-link.js +1 -0
  93. package/lib/helpers/get-wrapped-value-with-link.js.map +1 -1
  94. package/lib/helpers/inject-multiple-banners/get-banners-for-entities/get-banners-for-entities.js +1 -0
  95. package/lib/helpers/inject-multiple-banners/get-banners-for-entities/get-banners-for-entities.js.map +1 -1
  96. package/lib/helpers/inject-multiple-banners/get-banners-for-nodes/get-banners-for-nodes.js +1 -1
  97. package/lib/helpers/process-data-summary-value.js +1 -1
  98. package/lib/helpers/remove-unwanted-characters.js +1 -1
  99. package/lib/helpers/remove-unwanted-characters.js.map +1 -1
  100. package/lib/hooks/helpers/buildPBComponents.js.map +1 -1
  101. package/lib/hooks/helpers/get-components-to-insert-by-type.js.map +1 -1
  102. package/lib/hooks/helpers/get-lightbox-images.js +1 -1
  103. package/lib/hooks/helpers/inject-textblock-banners.js.map +1 -1
  104. package/lib/hooks/use-check-mobile-screen.js.map +1 -1
  105. package/lib/hooks/use-get-entity-schema.js.map +1 -1
  106. package/lib/hooks/use-get-image-id-from-relation.js.map +1 -1
  107. package/lib/hooks/use-page-builder.js +1 -1
  108. package/lib/hooks/use-page-builder.js.map +1 -1
  109. package/lib/utils/get-props-to-display-modifiers.js +1 -0
  110. package/lib/utils/get-props-to-display-modifiers.js.map +1 -1
  111. package/lib/variants/Infographic/index.js.map +1 -1
  112. package/lib/variants/LongformGallery/LongformGallery.js +1 -0
  113. package/lib/variants/LongformGallery/LongformGallery.js.map +1 -1
  114. package/lib/variants/LongformGallery/index.js.map +1 -1
  115. package/lib/variants/SlideSummary/index.js.map +1 -1
  116. package/lib/variants/ThumbnailCarousel/ThumbnailCarousel.js +1 -0
  117. package/lib/variants/ThumbnailCarousel/ThumbnailCarousel.js.map +1 -1
  118. package/lib/variants/ThumbnailCarousel/ThumbnailImage/ThumbnailImage.js.map +1 -1
  119. package/lib/variants/ThumbnailCarousel/index.js.map +1 -1
  120. package/lib-es/HOC/recreateOnNavigation.js.map +1 -1
  121. package/lib-es/HOC/withTitle.js.map +1 -1
  122. package/lib-es/components/BackToTop/BackToTop.js.map +1 -1
  123. package/lib-es/components/Banner/BannerRender.js.map +1 -1
  124. package/lib-es/components/Breadcrumb/Breadcrumb.js.map +1 -1
  125. package/lib-es/components/Button.js.map +1 -1
  126. package/lib-es/components/Card/CardsFactory.js.map +1 -1
  127. package/lib-es/components/Card/CardsRender.js.map +1 -1
  128. package/lib-es/components/CarouselWrapper/DefaultCarousel.js.map +1 -1
  129. package/lib-es/components/ContentGroup/ContentGroupTabs.js.map +1 -1
  130. package/lib-es/components/DataSummary/DataSummaryTypes/index.js.map +1 -1
  131. package/lib-es/components/DateTime/DateTime.js +4 -4
  132. package/lib-es/components/DateTime/DateTime.js.map +1 -1
  133. package/lib-es/components/EmailConfirm/EmailConfirm.js +4 -4
  134. package/lib-es/components/EmailConfirm/EmailConfirm.js.map +1 -1
  135. package/lib-es/components/Image/GlobalLightbox/GlobalLightbox.js +3 -3
  136. package/lib-es/components/Image/GlobalLightbox/GlobalLightbox.js.map +1 -1
  137. package/lib-es/components/Image/GlobalLightbox/index.js.map +1 -1
  138. package/lib-es/components/Image/Image.js.map +1 -1
  139. package/lib-es/components/Image/ImageFactory.js.map +1 -1
  140. package/lib-es/components/ItemList/hooks/use-item-list-id.js.map +1 -1
  141. package/lib-es/components/Layout/LayoutFactory.js.map +1 -1
  142. package/lib-es/components/Layout/LayoutWithStickyTimer.js.map +1 -1
  143. package/lib-es/components/List/ListFactory.js.map +1 -1
  144. package/lib-es/components/List/ListRender.js.map +1 -1
  145. package/lib-es/components/List/components/Pagination/ListPagination.js.map +1 -1
  146. package/lib-es/components/List/components/Pagination/LoadMore.js +2 -2
  147. package/lib-es/components/List/components/Pagination/LoadMore.js.map +1 -1
  148. package/lib-es/components/List/helpers/sort-aggs.js.map +1 -1
  149. package/lib-es/components/Menu/Menu.js.map +1 -1
  150. package/lib-es/components/MenuItem/MenuItemRender.js.map +1 -1
  151. package/lib-es/components/ModalAdapter/index.js.map +1 -1
  152. package/lib-es/components/SearchContent/SearchContent.js.map +1 -1
  153. package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
  154. package/lib-es/components/Video/providers/Vimeo/VimeoProvider.js.map +1 -1
  155. package/lib-es/components/Video/providers/YouTube/YoutubeEmbeded.js.map +1 -1
  156. package/lib-es/components/Video/providers/get-provider.js.map +1 -1
  157. package/lib-es/components/Wrapper.js +2 -2
  158. package/lib-es/components/Wrapper.js.map +1 -1
  159. package/lib-es/components/index.js.map +1 -1
  160. package/lib-es/constants/index.js.map +1 -1
  161. package/lib-es/helpers/build-search-values-checkbox-select.js +1 -1
  162. package/lib-es/helpers/build-search-values-checkbox-select.js.map +1 -1
  163. package/lib-es/helpers/get-current-offset.js +1 -1
  164. package/lib-es/helpers/get-current-offset.js.map +1 -1
  165. package/lib-es/helpers/get-wrapped-value-with-link.js.map +1 -1
  166. package/lib-es/helpers/remove-unwanted-characters.js.map +1 -1
  167. package/lib-es/hooks/helpers/buildPBComponents.js.map +1 -1
  168. package/lib-es/hooks/helpers/get-components-to-insert-by-type.js.map +1 -1
  169. package/lib-es/hooks/helpers/inject-textblock-banners.js.map +1 -1
  170. package/lib-es/hooks/use-check-mobile-screen.js.map +1 -1
  171. package/lib-es/hooks/use-get-entity-schema.js.map +1 -1
  172. package/lib-es/hooks/use-get-image-id-from-relation.js.map +1 -1
  173. package/lib-es/hooks/use-page-builder.js +1 -1
  174. package/lib-es/hooks/use-page-builder.js.map +1 -1
  175. package/lib-es/variants/Infographic/index.js.map +1 -1
  176. package/lib-es/variants/LongformGallery/LongformGallery.js.map +1 -1
  177. package/lib-es/variants/LongformGallery/index.js.map +1 -1
  178. package/lib-es/variants/SlideSummary/index.js.map +1 -1
  179. package/lib-es/variants/ThumbnailCarousel/ThumbnailImage/ThumbnailImage.js.map +1 -1
  180. package/lib-es/variants/ThumbnailCarousel/index.js.map +1 -1
  181. package/package.json +20 -19
  182. package/src/HOC/recreateOnNavigation.js +3 -3
  183. package/src/HOC/withTitle.js +3 -3
  184. package/src/components/BackToTop/BackToTop.js +5 -8
  185. package/src/components/Banner/BannerRender.js +0 -2
  186. package/src/components/Breadcrumb/Breadcrumb.js +5 -1
  187. package/src/components/Button.js +3 -6
  188. package/src/components/Card/CardsFactory.js +8 -7
  189. package/src/components/Card/CardsRender.js +5 -3
  190. package/src/components/CarouselWrapper/DefaultCarousel.js +20 -26
  191. package/src/components/ContentGroup/ContentGroupTabs.js +4 -7
  192. package/src/components/DataSummary/DataSummaryTypes/index.js +14 -10
  193. package/src/components/DateTime/DateTime.js +4 -4
  194. package/src/components/EmailConfirm/EmailConfirm.js +9 -11
  195. package/src/components/Image/GlobalLightbox/GlobalLightbox.js +7 -9
  196. package/src/components/Image/GlobalLightbox/index.js +2 -2
  197. package/src/components/Image/Image.js +6 -4
  198. package/src/components/Image/ImageFactory.js +5 -5
  199. package/src/components/ItemList/hooks/use-item-list-id.js +10 -13
  200. package/src/components/Layout/LayoutFactory.js +2 -2
  201. package/src/components/Layout/LayoutWithStickyTimer.js +11 -14
  202. package/src/components/List/ListFactory.js +10 -11
  203. package/src/components/List/ListRender.js +6 -1
  204. package/src/components/List/components/Pagination/ListPagination.js +3 -6
  205. package/src/components/List/components/Pagination/LoadMore.js +7 -9
  206. package/src/components/List/helpers/sort-aggs.js +1 -2
  207. package/src/components/Menu/Menu.js +12 -16
  208. package/src/components/MenuItem/MenuItemRender.js +3 -6
  209. package/src/components/ModalAdapter/index.js +2 -2
  210. package/src/components/SearchContent/SearchContent.js +26 -32
  211. package/src/components/SearchFilter/SearchFilter/SearchFilter.js +15 -19
  212. package/src/components/Video/providers/Vimeo/VimeoProvider.js +19 -22
  213. package/src/components/Video/providers/YouTube/YoutubeEmbeded.js +58 -64
  214. package/src/components/Video/providers/get-provider.js +4 -4
  215. package/src/components/Wrapper.js +5 -7
  216. package/src/components/index.js +20 -20
  217. package/src/constants/index.js +2 -1
  218. package/src/helpers/build-search-values-checkbox-select.js +1 -1
  219. package/src/helpers/get-current-offset.js +1 -1
  220. package/src/helpers/get-wrapped-value-with-link.js +1 -1
  221. package/src/helpers/remove-unwanted-characters.js +1 -4
  222. package/src/hooks/helpers/buildPBComponents.js +2 -4
  223. package/src/hooks/helpers/get-components-to-insert-by-type.js +3 -1
  224. package/src/hooks/helpers/inject-textblock-banners.js +2 -8
  225. package/src/hooks/use-check-mobile-screen.js +5 -8
  226. package/src/hooks/use-get-entity-schema.js +5 -1
  227. package/src/hooks/use-get-image-id-from-relation.js +5 -1
  228. package/src/hooks/use-page-builder.js +9 -12
  229. package/src/variants/Infographic/index.js +2 -2
  230. package/src/variants/LongformGallery/LongformGallery.js +2 -8
  231. package/src/variants/LongformGallery/index.js +2 -2
  232. package/src/variants/SlideSummary/index.js +2 -2
  233. package/src/variants/ThumbnailCarousel/ThumbnailImage/ThumbnailImage.js +2 -3
  234. package/src/variants/ThumbnailCarousel/index.js +2 -2
  235. package/tests/unit/src/HOC/withTitle.test.js +11 -21
  236. package/tests/unit/src/Layout/Layout.test.js +2 -1
  237. package/tests/unit/src/Layout/helpers/check-if-row-has-columns.test.js +1 -0
  238. package/tests/unit/src/components/Banner/AdSlotRender.test.js +4 -1
  239. package/tests/unit/src/components/Banner/helpers.test.js +34 -7
  240. package/tests/unit/src/components/BlazeLink.test.js +1 -4
  241. package/tests/unit/src/components/Breadcrumb/__snapshots__/Breadcrumb.test.js.snap +18 -0
  242. package/tests/unit/src/components/Card/Card.test.js +17 -4
  243. package/tests/unit/src/components/Card/CardContainer.test.js +7 -1
  244. package/tests/unit/src/components/Card/__snapshots__/Card.test.js.snap +15 -0
  245. package/tests/unit/src/components/Card/__snapshots__/CardContainer.test.js.snap +12 -0
  246. package/tests/unit/src/components/Card/mockData.js +2 -4
  247. package/tests/unit/src/components/Carousel/CarouselRender/CarouselRender.test.js +47 -46
  248. package/tests/unit/src/components/Carousel/CarouselRender/__snapshots__/CarouselRender.test.js.snap +45 -1
  249. package/tests/unit/src/components/Carousel/CarouselRender/mocks.js +0 -0
  250. package/tests/unit/src/components/Carousel/__snapshots__/Carousel.test.js.snap +1 -1
  251. package/tests/unit/src/components/ContentGroup/ContentGroupTabs.test.js +4 -1
  252. package/tests/unit/src/components/ContentGroup/helpers/get-sections-data.test.js +4 -1
  253. package/tests/unit/src/components/DataSummary/__snapshots__/DataSummaryRender.test.js.snap +0 -1
  254. package/tests/unit/src/components/DataSummary/helpers/build-props-to-display-with-content.test.js +5 -1
  255. package/tests/unit/src/components/DataSummary/helpers/get-value-from-array.test.js +4 -1
  256. package/tests/unit/src/components/DataSummary/helpers/strip-summary-props-content.test.js +8 -2
  257. package/tests/unit/src/components/DataSummary/mockData.js +4 -1
  258. package/tests/unit/src/components/Image/ImageFactory.test.js +4 -3
  259. package/tests/unit/src/components/ItemList/ItemListCounter.test.js +2 -1
  260. package/tests/unit/src/components/ItemList/hooks/use-item-list-id.test.js +1 -1
  261. package/tests/unit/src/components/Layout/LayoutFactory.test.js +0 -4
  262. package/tests/unit/src/components/List/components/Cards/CardsRender.test.js +8 -1
  263. package/tests/unit/src/components/List/components/Pagination/Classic.test.js +1 -1
  264. package/tests/unit/src/components/PlaceholderIcon/index.test.js +2 -2
  265. package/tests/unit/src/components/SearchFilter/components/Range.test.js +5 -5
  266. package/tests/unit/src/components/SearchFilter/components/__snapshots__/Range.test.js.snap +175 -190
  267. package/tests/unit/src/components/SearchFilter/helpers/get-select-options.test.js +8 -2
  268. package/tests/unit/src/components/TextBlock/TextBlock.test.js +1 -1
  269. package/tests/unit/src/components/TextBlock/__snapshots__/TextBlock.test.js.snap +12 -0
  270. package/tests/unit/src/helpers/__snapshots__/parse-textBlock.test.js.snap +3 -0
  271. package/tests/unit/src/helpers/build-checkbox-filters.test.js +4 -1
  272. package/tests/unit/src/helpers/get-dictionary-match.test.js +1 -1
  273. package/tests/unit/src/helpers/parse-textBlock.test.js +3 -1
  274. package/tests/unit/src/hooks/use-check-mobile-screen.test.js +3 -2
  275. package/tests/unit/src/hooks/use-get-image-id-from-relation.test.js +3 -3
  276. package/tests/unit/src/hooks/use-get-images.test.js +16 -14
  277. package/tests/unit/src/hooks/use-get-single-entity-schema.test.js +6 -4
  278. package/tests/unit/src/hooks/use-page-builder.test.js +0 -48
@@ -24,9 +24,9 @@ const withTitle = Component => {
24
24
 
25
25
  InnerComponent.WrappedComponent = Component;
26
26
 
27
- InnerComponent.displayName = `WithTitle(${Component.displayName ||
28
- Component.name ||
29
- 'Component'})`;
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
- const handleOnScroll = () => setGoToTop(window.scrollY >= showAfterPixels);
11
- document.addEventListener('scroll', handleOnScroll);
12
- return () => document.removeEventListener('scroll', handleOnScroll);
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();
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
-
4
3
  import { useQuery } from '@apollo/client';
5
-
6
4
  import { generateSingleItemQuery, getCount } from '../../application/query';
7
5
  import {
8
6
  buildBannerSizes,
@@ -12,7 +12,11 @@ const Breadcrumb = ({ type, ...otherProps }) => {
12
12
  const { parent } = otherProps;
13
13
  const { itemEntity, itemId } = parent;
14
14
 
15
- const { data = {}, error, loading } = useQuery(getSingleEntitySchema, {
15
+ const {
16
+ data = {},
17
+ error,
18
+ loading
19
+ } = useQuery(getSingleEntitySchema, {
16
20
  variables: { id: itemEntity }
17
21
  });
18
22
 
@@ -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
- setShowChildren(false);
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 { data: itemListData = {}, loading: itemListLoading, error: itemListError } = useQuery(
35
- getItemList,
36
- {
37
- variables: { id: itemListId },
38
- skip: !itemListId
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 { data: mainSchemas = {}, loading: _loading, error: _error } = useGetEntitySchemasAsObj(
70
- uniqueEntityNames
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
- autoScrollRef.current = shouldAutoScroll;
21
- const id = setInterval(scrollCheck, autoScrollTimer);
22
- function scrollCheck() {
23
- if (!autoScrollRef.current) {
24
- clearInterval(id);
25
- } else {
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
- return () => clearInterval(id);
31
- },
32
- [autoScrollTimer, shouldAutoScroll]
33
- );
29
+ return () => clearInterval(id);
30
+ }, [autoScrollTimer, shouldAutoScroll]);
34
31
 
35
- useEffect(
36
- () => {
37
- const {
38
- current: { offsetWidth, scrollWidth }
39
- } = ref;
40
- if (scrollWidth <= offsetWidth) {
41
- setButtonDisplays({ displayLeft: false, displayRight: false });
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
- setShouldAutoScroll(enableAutoScroll);
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
- const activeTab = getActiveTab(sectionsData, asPath);
19
- if (activeTab !== selectedTab) setSelectedTab(activeTab);
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
- import(/* webpackChunkName: "blazePbDataSummaryHeadingLargeSummary" */ './HeadingLargeSummary')
13
+ heading_large: dynamic(
14
+ () =>
15
+ import(
16
+ /* webpackChunkName: "blazePbDataSummaryHeadingLargeSummary" */ './HeadingLargeSummary'
17
+ )
15
18
  ),
16
- item_details: dynamic(() =>
17
- import(/* webpackChunkName: "blazePbDataSummaryItemDetailsSummary" */ './ItemDetailsSummary')
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 formattedDate = dayjs().format(dateFormat);
14
+ const formatedDate = dayjs().format(dateFormat);
15
15
 
16
16
  return (
17
17
  <Wrapper className="date" modifiers={modifier}>
18
- {formattedDate}
18
+ {formatedDate}
19
19
  </Wrapper>
20
20
  );
21
21
  };
@@ -27,8 +27,8 @@ DateTime.propTypes = {
27
27
  };
28
28
 
29
29
  DateTime.defaultProps = {
30
- customFormat: '',
31
- modifier: null
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
- const EmailConfirm = ({ modifier, errorMessage, children }) => {
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
- if (token) emailConfirmMutation({ variables: { token } });
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 <>{displayError ? <span className={modifier}>{errorMessage}</span> : renderedChildren}</>;
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, Fragment } from 'react';
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
- <Fragment>
127
- <ResponsiveImage
128
- src={imageUrl}
129
- alt={altText}
130
- sizeKey="globalLightbox"
131
- data-testid="globalLightboxImage"
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>
@@ -1,5 +1,5 @@
1
1
  import dynamic from 'next/dynamic';
2
2
 
3
- export default dynamic(() =>
4
- import(/* webpackChunkName: "blazePbGlobalLightbox" */ './GlobalLightbox')
3
+ export default dynamic(
4
+ () => import(/* webpackChunkName: "blazePbGlobalLightbox" */ './GlobalLightbox')
5
5
  );
@@ -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 { caption, altText, hrefUrl, credits: imageDataCredits } = getImageData(
40
- otherProps,
41
- imageData
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 { data: { getFile, getFiles = [] } = {}, loading, error } = useGetImages(
45
- imageIds,
46
- updatedImageIds && updatedImageIds.length > 1,
47
- !!imgSrcToUse
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 storageEventHandler = () => {
11
- const newId = getItemListId(listName);
12
- setListId(newId);
13
- };
8
+ useEffect(() => {
9
+ const storageEventHandler = () => {
10
+ const newId = getItemListId(listName);
11
+ setListId(newId);
12
+ };
14
13
 
15
- window.addEventListener('storage', storageEventHandler);
14
+ window.addEventListener('storage', storageEventHandler);
16
15
 
17
- return () => {
18
- window.removeEventListener('storage', storageEventHandler);
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
- if (isIntersecting && sticky && !!stickyTimer) {
14
- setIsSticky(true);
15
- const timer = setTimeout(() => {
16
- setIsSticky(false);
17
- }, stickyTimer);
11
+ useEffect(() => {
12
+ if (isIntersecting && sticky && !!stickyTimer) {
13
+ setIsSticky(true);
14
+ const timer = setTimeout(() => {
15
+ setIsSticky(false);
16
+ }, stickyTimer);
18
17
 
19
- return () => {
20
- clearTimeout(timer);
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
- [updatedParentEntity]: currentSchema = {},
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 { data: itemListData = {}, error: itemListError, loading: itemListLoading } = useQuery(
120
- getItemList,
121
- {
122
- variables: { id: itemListId },
123
- skip: !itemListId
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 { data = {}, error, loading, fetchMore } = useQuery(action, {
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
- if (isInfinite) setShowPagination(false);
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
- <BlazeLink
20
- className="pagination_load-more"
21
- role="button"
22
- href={nextPageLink}
23
- onClick={loadMoreItems}>
24
- {LOAD_MORE_STRING}
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
- const handleRouteChange = () => setShowMobileMenu(false);
34
- router.events.on('routeChangeStart', handleRouteChange);
31
+ useEffect(() => {
32
+ const handleRouteChange = () => setShowMobileMenu(false);
33
+ router.events.on('routeChangeStart', handleRouteChange);
35
34
 
36
- return () => {
37
- router.events.off('routeChangeStart', handleRouteChange);
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
- !showMobileMenu && (
80
- <Link href="/" name="mobile menu">
81
- <img src={logoOnMobileUrl} alt={logoOnMobileAlt} className={logoOnMobileModifier} />
82
- </Link>
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
- if (!showMobileMenu) setDisplayChildren(false);
27
- },
28
- [showMobileMenu]
29
- );
24
+ useEffect(() => {
25
+ if (!showMobileMenu) setDisplayChildren(false);
26
+ }, [showMobileMenu]);
30
27
 
31
28
  if (loadingUrl || loadingText) return '';
32
29
 
@@ -1,5 +1,5 @@
1
1
  import dynamic from 'next/dynamic';
2
2
 
3
- export default dynamic(() =>
4
- import(/* webpackChunkName: "blazePbModalAdaptor" */ './ModalAdapter')
3
+ export default dynamic(
4
+ () => import(/* webpackChunkName: "blazePbModalAdaptor" */ './ModalAdapter')
5
5
  );