@blaze-cms/react-page-builder 0.146.0-core-styles.45 → 0.146.0-core-styles.52

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 (261) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/lib/BannerContext/index.js +1 -2
  3. package/lib/BannerContext/index.js.map +1 -1
  4. package/lib/HOC/withInfiniteScroll.js +1 -2
  5. package/lib/HOC/withInfiniteScroll.js.map +1 -1
  6. package/lib/HOC/withTitle.js +1 -2
  7. package/lib/HOC/withTitle.js.map +1 -1
  8. package/lib/application/query/index.js +19 -15
  9. package/lib/application/query/index.js.map +1 -1
  10. package/lib/components/BackToTop/BackToTop.js +1 -2
  11. package/lib/components/BackToTop/BackToTop.js.map +1 -1
  12. package/lib/components/Banner/AdSlotRender.js +2 -3
  13. package/lib/components/Banner/AdSlotRender.js.map +1 -1
  14. package/lib/components/Banner/Banner.js +2 -3
  15. package/lib/components/Banner/Banner.js.map +1 -1
  16. package/lib/components/Banner/index.js +1 -2
  17. package/lib/components/Banner/index.js.map +1 -1
  18. package/lib/components/BlazeLink.js +1 -2
  19. package/lib/components/BlazeLink.js.map +1 -1
  20. package/lib/components/Breadcrumb/Breadcrumb.js +2 -3
  21. package/lib/components/Breadcrumb/Breadcrumb.js.map +1 -1
  22. package/lib/components/Button.js +1 -2
  23. package/lib/components/Button.js.map +1 -1
  24. package/lib/components/Card/Card.js +4 -3
  25. package/lib/components/Card/Card.js.map +1 -1
  26. package/lib/components/Card/CardsContainer.js +2 -3
  27. package/lib/components/Card/CardsContainer.js.map +1 -1
  28. package/lib/components/Card/CardsRender.js +1 -2
  29. package/lib/components/Card/CardsRender.js.map +1 -1
  30. package/lib/components/Carousel/CarouselRender/CarouselRender.js +1 -0
  31. package/lib/components/Carousel/CarouselRender/CarouselRender.js.map +1 -1
  32. package/lib/components/CarouselWrapper/DefaultCarousel.js +1 -2
  33. package/lib/components/CarouselWrapper/DefaultCarousel.js.map +1 -1
  34. package/lib/components/ClickWrapper.js +1 -2
  35. package/lib/components/ClickWrapper.js.map +1 -1
  36. package/lib/components/Code/Code.js +1 -2
  37. package/lib/components/Code/Code.js.map +1 -1
  38. package/lib/components/Code/ScriptTag.js +1 -2
  39. package/lib/components/Code/ScriptTag.js.map +1 -1
  40. package/lib/components/ContentGroup/ContentGroupTabs.js +2 -3
  41. package/lib/components/ContentGroup/ContentGroupTabs.js.map +1 -1
  42. package/lib/components/ContentGroup/helpers/get-sections-data.js +1 -0
  43. package/lib/components/ContentGroup/helpers/get-sections-data.js.map +1 -1
  44. package/lib/components/DataSummary/DataSummaryFactory.js +1 -2
  45. package/lib/components/DataSummary/DataSummaryFactory.js.map +1 -1
  46. package/lib/components/DataSummary/DataSummaryRender.js +1 -0
  47. package/lib/components/DataSummary/DataSummaryRender.js.map +1 -1
  48. package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js +2 -3
  49. package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js.map +1 -1
  50. package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js +2 -3
  51. package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js.map +1 -1
  52. package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js +2 -3
  53. package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js.map +1 -1
  54. package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js +2 -3
  55. package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js.map +1 -1
  56. package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js +2 -3
  57. package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js.map +1 -1
  58. package/lib/components/DataSummary/DataSummaryTypes/index.js +1 -2
  59. package/lib/components/DataSummary/DataSummaryTypes/index.js.map +1 -1
  60. package/lib/components/EmailConfirm/EmailConfirm.js +1 -2
  61. package/lib/components/EmailConfirm/EmailConfirm.js.map +1 -1
  62. package/lib/components/ErrorMessage/index.js +1 -2
  63. package/lib/components/ErrorMessage/index.js.map +1 -1
  64. package/lib/components/Image/GlobalLightbox/GlobalLightbox.js +1 -2
  65. package/lib/components/Image/GlobalLightbox/GlobalLightbox.js.map +1 -1
  66. package/lib/components/Image/GlobalLightbox/index.js +1 -2
  67. package/lib/components/Image/GlobalLightbox/index.js.map +1 -1
  68. package/lib/components/Image/Image.js +1 -2
  69. package/lib/components/Image/Image.js.map +1 -1
  70. package/lib/components/Image/ImageFactory.js +2 -3
  71. package/lib/components/Image/ImageFactory.js.map +1 -1
  72. package/lib/components/Image/Lightbox/Lightbox.js +1 -2
  73. package/lib/components/Image/Lightbox/Lightbox.js.map +1 -1
  74. package/lib/components/ItemList/ItemListButton/ItemListButton.js +23 -8
  75. package/lib/components/ItemList/ItemListButton/ItemListButton.js.map +1 -1
  76. package/lib/components/ItemList/ItemListCounter/ItemListCounter.js +2 -2
  77. package/lib/components/ItemList/ItemListCounter/ItemListCounter.js.map +1 -1
  78. package/lib/components/ItemList/helpers/get-item-list-ids.js +1 -0
  79. package/lib/components/ItemList/helpers/get-item-list-ids.js.map +1 -1
  80. package/lib/components/ItemList/icons/AddedBookmark.js +45 -0
  81. package/lib/components/ItemList/icons/AddedBookmark.js.map +1 -0
  82. package/lib/components/ItemList/icons/BaseBookmark.js +50 -0
  83. package/lib/components/ItemList/icons/BaseBookmark.js.map +1 -0
  84. package/lib/components/ItemList/icons/FocusedBookmark.js +45 -0
  85. package/lib/components/ItemList/icons/FocusedBookmark.js.map +1 -0
  86. package/lib/components/ItemList/icons/HoverBookmark.js +45 -0
  87. package/lib/components/ItemList/icons/HoverBookmark.js.map +1 -0
  88. package/lib/components/ItemList/icons/RemoveBookmark.js +45 -0
  89. package/lib/components/ItemList/icons/RemoveBookmark.js.map +1 -0
  90. package/lib/components/ItemList/icons/index.js +43 -0
  91. package/lib/components/ItemList/icons/index.js.map +1 -0
  92. package/lib/components/Layout/LayoutFactory.js +1 -2
  93. package/lib/components/Layout/LayoutFactory.js.map +1 -1
  94. package/lib/components/Layout/LayoutWithStickyTimer.js +1 -2
  95. package/lib/components/Layout/LayoutWithStickyTimer.js.map +1 -1
  96. package/lib/components/LazyImage/index.js +1 -2
  97. package/lib/components/LazyImage/index.js.map +1 -1
  98. package/lib/components/List/ListFactory.js +12 -7
  99. package/lib/components/List/ListFactory.js.map +1 -1
  100. package/lib/components/List/components/Cards/CardsRender.js +1 -2
  101. package/lib/components/List/components/Cards/CardsRender.js.map +1 -1
  102. package/lib/components/List/components/Cards/CardsRenderWrapper.js +2 -3
  103. package/lib/components/List/components/Cards/CardsRenderWrapper.js.map +1 -1
  104. package/lib/components/List/components/Full/FullRender.js +2 -3
  105. package/lib/components/List/components/Full/FullRender.js.map +1 -1
  106. package/lib/components/List/components/Full/FullRenderItem.js +34 -32
  107. package/lib/components/List/components/Full/FullRenderItem.js.map +1 -1
  108. package/lib/components/List/components/Header/ListHeader.js +1 -0
  109. package/lib/components/List/components/Header/ListHeader.js.map +1 -1
  110. package/lib/components/List/components/Pagination/ListPagination.js +1 -2
  111. package/lib/components/List/components/Pagination/ListPagination.js.map +1 -1
  112. package/lib/components/List/helpers/build-query-booster.js +1 -1
  113. package/lib/components/Menu/Menu.js +1 -2
  114. package/lib/components/Menu/Menu.js.map +1 -1
  115. package/lib/components/MenuItem/MenuItemRender.js +1 -2
  116. package/lib/components/MenuItem/MenuItemRender.js.map +1 -1
  117. package/lib/components/ModalAdapter/index.js +1 -2
  118. package/lib/components/ModalAdapter/index.js.map +1 -1
  119. package/lib/components/SearchContent/SearchContent.js +1 -2
  120. package/lib/components/SearchContent/SearchContent.js.map +1 -1
  121. package/lib/components/SearchContent/SearchContentItems.js +1 -0
  122. package/lib/components/SearchContent/SearchContentItems.js.map +1 -1
  123. package/lib/components/SearchFilter/SearchFilter/FiltersList.js +2 -3
  124. package/lib/components/SearchFilter/SearchFilter/FiltersList.js.map +1 -1
  125. package/lib/components/SearchFilter/SearchFilter/SearchFilter.js +1 -2
  126. package/lib/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
  127. package/lib/components/SearchFilter/SearchFilterContainer.js +1 -2
  128. package/lib/components/SearchFilter/SearchFilterContainer.js.map +1 -1
  129. package/lib/components/SearchFilter/components/Checkbox.js +1 -2
  130. package/lib/components/SearchFilter/components/Checkbox.js.map +1 -1
  131. package/lib/components/SearchFilter/helpers/get-filter-value-from-query.js +1 -0
  132. package/lib/components/SearchFilter/helpers/get-filter-value-from-query.js.map +1 -1
  133. package/lib/components/SearchFilter/helpers/get-select-options.js +1 -0
  134. package/lib/components/SearchFilter/helpers/get-select-options.js.map +1 -1
  135. package/lib/components/SearchFilter/helpers/parse-filter-value.js +1 -0
  136. package/lib/components/SearchFilter/helpers/parse-filter-value.js.map +1 -1
  137. package/lib/components/SearchFilterSort/SearchFilterSort.js +1 -0
  138. package/lib/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
  139. package/lib/components/SocialFollow/SocialFollowRender.js +1 -0
  140. package/lib/components/SocialFollow/SocialFollowRender.js.map +1 -1
  141. package/lib/components/Video/VideoModal.js +1 -2
  142. package/lib/components/Video/VideoModal.js.map +1 -1
  143. package/lib/components/Video/VideoRender.js +1 -2
  144. package/lib/components/Video/VideoRender.js.map +1 -1
  145. package/lib/components/Video/providers/JWPlayer/JWPlayerProvider.js +1 -2
  146. package/lib/components/Video/providers/JWPlayer/JWPlayerProvider.js.map +1 -1
  147. package/lib/components/Video/providers/Vimeo/VimeoProvider.js +1 -2
  148. package/lib/components/Video/providers/Vimeo/VimeoProvider.js.map +1 -1
  149. package/lib/components/Video/providers/YouTube/YoutubeEmbeded.js +1 -2
  150. package/lib/components/Video/providers/YouTube/YoutubeEmbeded.js.map +1 -1
  151. package/lib/components/Video/providers/get-provider.js +1 -2
  152. package/lib/components/Video/providers/get-provider.js.map +1 -1
  153. package/lib/components/index.js +1 -2
  154. package/lib/components/index.js.map +1 -1
  155. package/lib/helpers/build-props-query.js +4 -2
  156. package/lib/helpers/build-props-query.js.map +1 -1
  157. package/lib/helpers/build-query-fields.js +1 -0
  158. package/lib/helpers/build-query-fields.js.map +1 -1
  159. package/lib/helpers/check-props-to-use.js +1 -0
  160. package/lib/helpers/check-props-to-use.js.map +1 -1
  161. package/lib/helpers/get-entities-with-banner.js +1 -1
  162. package/lib/helpers/get-wrapped-value-with-link.js +1 -0
  163. package/lib/helpers/get-wrapped-value-with-link.js.map +1 -1
  164. package/lib/helpers/inject-multiple-banners/get-banners-for-entities/get-banners-for-entities.js +1 -0
  165. package/lib/helpers/inject-multiple-banners/get-banners-for-entities/get-banners-for-entities.js.map +1 -1
  166. package/lib/helpers/inject-multiple-banners/get-banners-for-nodes/get-banners-for-nodes.js +1 -1
  167. package/lib/helpers/is-filter-entitys-id.js +0 -1
  168. package/lib/helpers/is-filter-entitys-id.js.map +1 -1
  169. package/lib/helpers/parse-TextBlock.js +1 -2
  170. package/lib/helpers/parse-TextBlock.js.map +1 -1
  171. package/lib/helpers/parse-props-to-display.js +1 -2
  172. package/lib/helpers/parse-props-to-display.js.map +1 -1
  173. package/lib/helpers/process-data-summary-value.js +1 -1
  174. package/lib/helpers/remove-unwanted-characters.js +1 -1
  175. package/lib/hooks/helpers/RenderComponent.js +0 -1
  176. package/lib/hooks/helpers/RenderComponent.js.map +1 -1
  177. package/lib/hooks/helpers/check-collisions.js +0 -1
  178. package/lib/hooks/helpers/check-collisions.js.map +1 -1
  179. package/lib/hooks/helpers/get-lightbox-images.js +1 -2
  180. package/lib/hooks/helpers/get-lightbox-images.js.map +1 -1
  181. package/lib/hooks/use-portal.js +1 -2
  182. package/lib/hooks/use-portal.js.map +1 -1
  183. package/lib/index.js +6 -0
  184. package/lib/index.js.map +1 -1
  185. package/lib/utils/get-class-modifiers.js +0 -1
  186. package/lib/utils/get-class-modifiers.js.map +1 -1
  187. package/lib/utils/get-props-to-display-modifiers.js +1 -0
  188. package/lib/utils/get-props-to-display-modifiers.js.map +1 -1
  189. package/lib/variants/Infographic/index.js +1 -2
  190. package/lib/variants/Infographic/index.js.map +1 -1
  191. package/lib/variants/LiveBlogList/LiveBlogList.js +115 -0
  192. package/lib/variants/LiveBlogList/LiveBlogList.js.map +1 -0
  193. package/lib/variants/LiveBlogList/index.js +42 -0
  194. package/lib/variants/LiveBlogList/index.js.map +1 -0
  195. package/lib/variants/LongformGallery/LongformGallery.js +1 -0
  196. package/lib/variants/LongformGallery/LongformGallery.js.map +1 -1
  197. package/lib/variants/LongformGallery/index.js +1 -2
  198. package/lib/variants/LongformGallery/index.js.map +1 -1
  199. package/lib/variants/SlideSummary/index.js +1 -2
  200. package/lib/variants/SlideSummary/index.js.map +1 -1
  201. package/lib/variants/ThumbnailCarousel/ThumbnailCarousel.js +1 -0
  202. package/lib/variants/ThumbnailCarousel/ThumbnailCarousel.js.map +1 -1
  203. package/lib/variants/ThumbnailCarousel/index.js +1 -2
  204. package/lib/variants/ThumbnailCarousel/index.js.map +1 -1
  205. package/lib/variants/index.js +3 -1
  206. package/lib/variants/index.js.map +1 -1
  207. package/lib-es/application/query/index.js +9 -1
  208. package/lib-es/application/query/index.js.map +1 -1
  209. package/lib-es/components/Card/Card.js +3 -1
  210. package/lib-es/components/Card/Card.js.map +1 -1
  211. package/lib-es/components/ItemList/ItemListButton/ItemListButton.js +15 -6
  212. package/lib-es/components/ItemList/ItemListButton/ItemListButton.js.map +1 -1
  213. package/lib-es/components/ItemList/ItemListCounter/ItemListCounter.js +2 -2
  214. package/lib-es/components/ItemList/ItemListCounter/ItemListCounter.js.map +1 -1
  215. package/lib-es/components/ItemList/icons/AddedBookmark.js +36 -0
  216. package/lib-es/components/ItemList/icons/AddedBookmark.js.map +1 -0
  217. package/lib-es/components/ItemList/icons/BaseBookmark.js +41 -0
  218. package/lib-es/components/ItemList/icons/BaseBookmark.js.map +1 -0
  219. package/lib-es/components/ItemList/icons/FocusedBookmark.js +36 -0
  220. package/lib-es/components/ItemList/icons/FocusedBookmark.js.map +1 -0
  221. package/lib-es/components/ItemList/icons/HoverBookmark.js +36 -0
  222. package/lib-es/components/ItemList/icons/HoverBookmark.js.map +1 -0
  223. package/lib-es/components/ItemList/icons/RemoveBookmark.js +36 -0
  224. package/lib-es/components/ItemList/icons/RemoveBookmark.js.map +1 -0
  225. package/lib-es/components/ItemList/icons/index.js +6 -0
  226. package/lib-es/components/ItemList/icons/index.js.map +1 -0
  227. package/lib-es/components/List/ListFactory.js +10 -4
  228. package/lib-es/components/List/ListFactory.js.map +1 -1
  229. package/lib-es/components/List/components/Full/FullRenderItem.js +34 -30
  230. package/lib-es/components/List/components/Full/FullRenderItem.js.map +1 -1
  231. package/lib-es/helpers/build-props-query.js +4 -2
  232. package/lib-es/helpers/build-props-query.js.map +1 -1
  233. package/lib-es/index.js +1 -1
  234. package/lib-es/index.js.map +1 -1
  235. package/lib-es/variants/LiveBlogList/LiveBlogList.js +90 -0
  236. package/lib-es/variants/LiveBlogList/LiveBlogList.js.map +1 -0
  237. package/lib-es/variants/LiveBlogList/index.js +12 -0
  238. package/lib-es/variants/LiveBlogList/index.js.map +1 -0
  239. package/lib-es/variants/index.js +3 -1
  240. package/lib-es/variants/index.js.map +1 -1
  241. package/package.json +6 -6
  242. package/src/application/query/index.js +11 -1
  243. package/src/components/Card/Card.js +2 -1
  244. package/src/components/ItemList/ItemListButton/ItemListButton.js +23 -12
  245. package/src/components/ItemList/ItemListCounter/ItemListCounter.js +2 -2
  246. package/src/components/ItemList/icons/AddedBookmark.js +33 -0
  247. package/src/components/ItemList/icons/BaseBookmark.js +39 -0
  248. package/src/components/ItemList/icons/FocusedBookmark.js +33 -0
  249. package/src/components/ItemList/icons/HoverBookmark.js +33 -0
  250. package/src/components/ItemList/icons/RemoveBookmark.js +33 -0
  251. package/src/components/ItemList/icons/index.js +5 -0
  252. package/src/components/List/ListFactory.js +13 -4
  253. package/src/components/List/components/Full/FullRenderItem.js +45 -28
  254. package/src/helpers/build-props-query.js +3 -2
  255. package/src/index.js +2 -1
  256. package/src/variants/LiveBlogList/LiveBlogList.js +109 -0
  257. package/src/variants/LiveBlogList/index.js +13 -0
  258. package/src/variants/index.js +3 -1
  259. package/tests/unit/src/components/ItemList/__snapshots__/ItemListButton.test.js.snap +151 -43
  260. package/tests/unit/src/components/ItemList/__snapshots__/ItemListCounter.test.js.snap +35 -9
  261. package/tests/unit/src/helpers/build-props-query.test.js +13 -11
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+
3
+ function BaseBookmark({ width = '24px', height = '32px' }) {
4
+ return (
5
+ <svg
6
+ width={width}
7
+ height={height}
8
+ viewBox="0 0 24 32"
9
+ version="1.1"
10
+ xmlns="http://www.w3.org/2000/svg">
11
+ <title>wishlist-button/base</title>
12
+ <g id="Wishlist" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
13
+ <g id="components" transform="translate(-417, -237)">
14
+ <g id="Group" transform="translate(417, 237)">
15
+ <path
16
+ d="M0,4.00006438 C0,1.79088983 1.79088983,0 4.00006438,0 L20.0003219,0 C22.2094965,0 24.0003863,1.79088983 24.0003863,4.00006438 L24.0003863,31.000499 C24.0003863,31.3690566 23.7972987,31.707635 23.4723789,31.8815946 C23.1474592,32.0555542 22.7531917,32.0366934 22.4463613,31.8325124 L12.0001931,26.2024217 L1.55402501,31.8325124 C1.24719462,32.0366934 0.852927098,32.0555542 0.528007369,31.8815946 C0.203087639,31.707635 0,31.3690566 0,31.000499 L0,4.00006438 Z"
17
+ id="Path"
18
+ fill="#FFFFFF"
19
+ />
20
+ <path
21
+ d="M11.4884365,6.3199776 C11.5838756,6.12420508 11.7826038,6 12.0004007,6 C12.2181976,6 12.4169257,6.12420508 12.5123648,6.3199776 L14.5410228,10.4316897 C14.623468,10.6005456 14.7838925,10.717871 14.9697928,10.7452678 L19.5134747,11.4044216 C19.9774422,11.4716169 20.166229,12.0443768 19.8270528,12.3739538 L16.5440826,15.5769295 C16.4096115,15.7082089 16.3485531,15.8973704 16.380894,16.0824941 L17.1552398,20.6069774 C17.1907134,20.8200705 17.1025787,21.0348915 16.927666,21.1616693 C16.7527533,21.2884471 16.5211722,21.3053581 16.3296976,21.2053355 L12.2659821,19.0678851 C12.1006216,18.9813923 11.9033796,18.9813923 11.7380191,19.0678851 L7.67430355,21.2053355 C7.48306696,21.3035559 7.2528198,21.2857277 7.07898266,21.1592392 C6.90514552,21.0327507 6.81734235,20.8191571 6.85196113,20.6069774 L7.62630692,16.0824941 C7.6594628,15.8979103 7.5996286,15.7088342 7.46631812,15.5769295 L4.17054885,12.3739538 C4.01657399,12.222779 3.96125182,11.9975718 4.027656,11.7922609 C4.09406017,11.58695 4.2707867,11.4367948 4.48412689,11.4044216 L9.0278088,10.7452678 C9.21370906,10.717871 9.3741336,10.6005456 9.45657878,10.4316897 L11.4884365,6.3199776 Z"
22
+ id="Path"
23
+ fill="#C31629"
24
+ fillRule="nonzero"
25
+ />
26
+ <path
27
+ d="M0,4.00006438 C0,1.79088983 1.79088983,0 4.00006438,0 L20.0003219,0 C22.2094965,0 24.0003863,1.79088983 24.0003863,4.00006438 L24.0003863,31.000499 C24.0003863,31.3690566 23.7972987,31.707635 23.4723789,31.8815946 C23.1474592,32.0555542 22.7531917,32.0366934 22.4463613,31.8325124 L12.0001931,26.2024217 L1.55402501,31.8325124 C1.24719462,32.0366934 0.852927098,32.0555542 0.528007369,31.8815946 C0.203087639,31.707635 0,31.3690566 0,31.000499 L0,4.00006438 Z M4.00006438,2.00003219 C2.8954771,2.00003219 2.00003219,2.8954771 2.00003219,4.00006438 L2.00003219,29.1324689 L11.4461842,24.168389 C11.7817677,23.9450743 12.2186186,23.9450743 12.5542021,24.168389 L22.0003541,29.1324689 L22.0003541,4.00006438 C22.0003541,2.8954771 21.1049092,2.00003219 20.0003219,2.00003219 L4.00006438,2.00003219 Z"
28
+ id="Shape"
29
+ fill="#C31629"
30
+ fillRule="nonzero"
31
+ />
32
+ </g>
33
+ </g>
34
+ </g>
35
+ </svg>
36
+ );
37
+ }
38
+
39
+ export default BaseBookmark;
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+
3
+ function FocusedBookmark({ width = '24px', height = '33px' }) {
4
+ return (
5
+ <svg
6
+ width={width}
7
+ height={height}
8
+ viewBox="0 0 24 33"
9
+ version="1.1"
10
+ xmlns="http://www.w3.org/2000/svg">
11
+ <title>wishlist-button/focused</title>
12
+ <g id="Wishlist" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
13
+ <g id="components" transform="translate(-719, -236)">
14
+ <g id="Group" transform="translate(719, 236.7059)">
15
+ <path
16
+ d="M2.68249844e-07,30.9992911 L2.68249844e-07,3.99990852 C2.68249844e-07,1.79082005 1.79082058,0 3.99990906,0 L19.9995432,0 C22.2086316,0 23.9994519,1.79082005 23.9994519,3.99990852 L23.9994519,30.9992911 C23.9997102,31.3525836 23.8135276,31.6797933 23.5096796,31.860049 C23.2058317,32.0403048 22.829418,32.0468515 22.5194855,31.877271 L11.9997261,26.1374022 L1.47996669,31.877271 C1.17003424,32.0468515 0.79362051,32.0403048 0.489772584,31.860049 C0.185924659,31.6797933 -0.000257952496,31.3525836 2.68249844e-07,30.9992911 Z"
17
+ id="Shape"
18
+ fill="#7E111D"
19
+ fillRule="nonzero"
20
+ />
21
+ <path
22
+ d="M12.5121433,6.02597195 C12.4166708,5.83013091 12.2178732,5.70588235 12,5.70588235 C11.7821268,5.70588235 11.5833292,5.83013091 11.4878567,6.02597195 L9.45848863,10.1391232 C9.37601459,10.3080381 9.2155339,10.4254046 9.02956857,10.452811 L4.48429634,11.1121956 C4.27088147,11.1445801 4.09409309,11.2947879 4.02766568,11.5001706 C3.96123826,11.7055533 4.01657979,11.9308394 4.17060854,12.0820671 L7.45472777,15.2861639 C7.5891654,15.4174006 7.64998242,15.6062535 7.61797346,15.7919054 L6.84655754,20.3179723 C6.81107151,20.53114 6.89923709,20.7460362 7.07421101,20.8728583 C7.24918493,20.9996805 7.48084704,21.0165975 7.6723887,20.9165398 L11.7375265,18.7783414 C11.9029449,18.6918182 12.100256,18.6918182 12.2656744,18.7783414 L16.3308122,20.9165398 C16.5221157,21.0147947 16.7524435,20.9969601 16.9263415,20.8704274 C17.1002394,20.7438946 17.1880734,20.5302263 17.1534425,20.3179723 L16.3788256,15.7887046 C16.3456582,15.6040561 16.4055133,15.4149138 16.5388704,15.282963 L19.8293915,12.0788662 C19.9834202,11.9276385 20.0387617,11.7023524 19.9723343,11.4969697 C19.9059069,11.291587 19.7291185,11.1413792 19.5157037,11.1089947 L14.9704314,10.4496101 C14.7844661,10.4222037 14.6239854,10.3048372 14.5415114,10.1359223 L12.5121433,6.02597195 Z"
23
+ id="Path"
24
+ fill="#FFFFFF"
25
+ />
26
+ </g>
27
+ </g>
28
+ </g>
29
+ </svg>
30
+ );
31
+ }
32
+
33
+ export default FocusedBookmark;
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+
3
+ function HoverBookmark({ width = '24px', height = '33px' }) {
4
+ return (
5
+ <svg
6
+ width={width}
7
+ height={height}
8
+ viewBox="0 0 24 33"
9
+ version="1.1"
10
+ xmlns="http://www.w3.org/2000/svg">
11
+ <title>wishlist-button/hover</title>
12
+ <g id="Wishlist" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
13
+ <g id="components" transform="translate(-566, -237)">
14
+ <g id="Group" transform="translate(566, 237.3529)">
15
+ <path
16
+ d="M2.68249844e-07,30.9992911 L2.68249844e-07,3.99990852 C2.68249844e-07,1.79082005 1.79082058,0 3.99990906,0 L19.9995432,0 C22.2086316,0 23.9994519,1.79082005 23.9994519,3.99990852 L23.9994519,30.9992911 C23.9997102,31.3525836 23.8135276,31.6797933 23.5096796,31.860049 C23.2058317,32.0403048 22.829418,32.0468515 22.5194855,31.877271 L11.9997261,26.1374022 L1.47996669,31.877271 C1.17003424,32.0468515 0.79362051,32.0403048 0.489772584,31.860049 C0.185924659,31.6797933 -0.000257952496,31.3525836 2.68249844e-07,30.9992911 Z"
17
+ id="Shape"
18
+ fill="#C31629"
19
+ fillRule="nonzero"
20
+ />
21
+ <path
22
+ d="M12.5121433,6.32008959 C12.4166708,6.12424855 12.2178732,6 12,6 C11.7821268,6 11.5833292,6.12424855 11.4878567,6.32008959 L9.45848863,10.4332409 C9.37601459,10.6021558 9.2155339,10.7195223 9.02956857,10.7469287 L4.48429634,11.4063132 C4.27088147,11.4386977 4.09409309,11.5889055 4.02766568,11.7942882 C3.96123826,11.999671 4.01657979,12.224957 4.17060854,12.3761847 L7.45472777,15.5802815 C7.5891654,15.7115183 7.64998242,15.9003711 7.61797346,16.0860231 L6.84655754,20.6120899 C6.81107151,20.8252577 6.89923709,21.0401538 7.07421101,21.166976 C7.24918493,21.2937982 7.48084704,21.3107151 7.6723887,21.2106575 L11.7375265,19.072459 C11.9029449,18.9859359 12.100256,18.9859359 12.2656744,19.072459 L16.3308122,21.2106575 C16.5221157,21.3089123 16.7524435,21.2910778 16.9263415,21.164545 C17.1002394,21.0380122 17.1880734,20.8243439 17.1534425,20.6120899 L16.3788256,16.0828222 C16.3456582,15.8981737 16.4055133,15.7090315 16.5388704,15.5770806 L19.8293915,12.3729838 C19.9834202,12.2217561 20.0387617,11.9964701 19.9723343,11.7910873 C19.9059069,11.5857046 19.7291185,11.4354969 19.5157037,11.4031123 L14.9704314,10.7437278 C14.7844661,10.7163214 14.6239854,10.5989549 14.5415114,10.43004 L12.5121433,6.32008959 Z"
23
+ id="Path"
24
+ fill="#FFFFFF"
25
+ />
26
+ </g>
27
+ </g>
28
+ </g>
29
+ </svg>
30
+ );
31
+ }
32
+
33
+ export default HoverBookmark;
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+
3
+ function RemoveBookmark({ width = '24px', height = '33px' }) {
4
+ return (
5
+ <svg
6
+ width={width}
7
+ height={height}
8
+ viewBox="0 0 24 33"
9
+ version="1.1"
10
+ xmlns="http://www.w3.org/2000/svg">
11
+ <title>wishlist-button/remove</title>
12
+ <g id="Wishlist" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
13
+ <g id="components" transform="translate(-566, -433)">
14
+ <g id="Group" transform="translate(566, 433.4118)">
15
+ <path
16
+ d="M2.68249844e-07,30.9992911 L2.68249844e-07,3.99990852 C2.68249844e-07,1.79082005 1.79082058,0 3.99990906,0 L19.9995432,0 C22.2086316,0 23.9994519,1.79082005 23.9994519,3.99990852 L23.9994519,30.9992911 C23.9997102,31.3525836 23.8135276,31.6797933 23.5096796,31.860049 C23.2058317,32.0403048 22.829418,32.0468515 22.5194855,31.877271 L11.9997261,26.1374022 L1.47996669,31.877271 C1.17003424,32.0468515 0.79362051,32.0403048 0.489772584,31.860049 C0.185924659,31.6797933 -0.000257952496,31.3525836 2.68249844e-07,30.9992911 Z"
17
+ id="Shape"
18
+ fill="#C31629"
19
+ fillRule="nonzero"
20
+ />
21
+ <path
22
+ d="M7.99029767,7.51308704 C7.54778661,7.07057597 6.90281268,6.89775572 6.29833133,7.059726 C5.69384998,7.22169629 5.22169629,7.69384998 5.059726,8.29833133 C4.89775572,8.90281268 5.07057597,9.54778661 5.51308704,9.99029767 L9.52630821,14.00002 L5.51308704,18.0097422 C5.07057597,18.4522533 4.89775572,19.0972272 5.059726,19.7017086 C5.22169629,20.3061899 5.69384998,20.7783436 6.29833133,20.9403139 C6.90281268,21.1022842 7.54778661,20.9294639 7.99029767,20.4869529 L12.00002,16.4737317 L16.0097422,20.4869529 C16.6938051,21.1710157 17.8028901,21.1710157 18.4869529,20.4869529 C19.1710157,19.8028901 19.1710157,18.6938051 18.4869529,18.0097422 L14.4737317,14.00002 L18.4869529,9.99029767 C19.1710157,9.30623484 19.1710157,8.19714986 18.4869529,7.51308704 C17.8028901,6.82902421 16.6938051,6.82902421 16.0097422,7.51308704 L12.00002,11.5263082 L7.99029767,7.51308704 Z"
23
+ id="Path"
24
+ fill="#FFFFFF"
25
+ />
26
+ </g>
27
+ </g>
28
+ </g>
29
+ </svg>
30
+ );
31
+ }
32
+
33
+ export default RemoveBookmark;
@@ -0,0 +1,5 @@
1
+ export { default as AddedBookmark } from './AddedBookmark';
2
+ export { default as BaseBookmark } from './BaseBookmark';
3
+ export { default as FocusedBookmark } from './FocusedBookmark';
4
+ export { default as HoverBookmark } from './HoverBookmark';
5
+ export { default as RemoveBookmark } from './RemoveBookmark';
@@ -31,6 +31,8 @@ import { getItemListId, getItemListIds } from '../ItemList/helpers';
31
31
  import { useGetEntitySchemasAsObj } from '../../hooks';
32
32
  import { AND_OPERATOR, TEXT_SEARCH, ID, AND, FULL } from '../../constants';
33
33
 
34
+ export const VariantContext = React.createContext(null);
35
+
34
36
  const ListFactory = props => {
35
37
  const {
36
38
  entity: legacyEntity,
@@ -46,7 +48,8 @@ const ListFactory = props => {
46
48
  allSearchFilters,
47
49
  operator: filterOperator,
48
50
  sortProperties,
49
- itemListName
51
+ itemListName,
52
+ VariantComponent // extracted from props
50
53
  } = props;
51
54
  const { isPreview } = useContext(MainContext);
52
55
  const router = useRouter();
@@ -176,7 +179,11 @@ const ListFactory = props => {
176
179
  mainSchemas
177
180
  };
178
181
 
179
- return <ListBuilder {...listProps} />;
182
+ return (
183
+ <VariantContext.Provider value={VariantComponent}>
184
+ <ListBuilder {...listProps} />
185
+ </VariantContext.Provider>
186
+ );
180
187
  };
181
188
 
182
189
  ListFactory.propTypes = {
@@ -193,7 +200,8 @@ ListFactory.propTypes = {
193
200
  sort: PropTypes.string,
194
201
  allSearchFilters: PropTypes.array,
195
202
  sortProperties: PropTypes.array,
196
- itemListName: PropTypes.string
203
+ itemListName: PropTypes.string,
204
+ VariantComponent: PropTypes.func
197
205
  };
198
206
 
199
207
  ListFactory.defaultProps = {
@@ -208,7 +216,8 @@ ListFactory.defaultProps = {
208
216
  sort: '',
209
217
  operator: AND,
210
218
  allSearchFilters: [],
211
- itemListName: ''
219
+ itemListName: '',
220
+ VariantComponent: null
212
221
  };
213
222
 
214
223
  export default ListFactory;
@@ -2,35 +2,56 @@ import React, { useContext } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { Waypoint } from 'react-waypoint';
4
4
  import { MainContext } from '@blaze-cms/nextjs-components';
5
+ import { VariantContext } from '../../ListFactory';
5
6
  import BuildPBComponents from '../../../../hooks/helpers/buildPBComponents';
6
7
  import Banner from '../../../Banner';
7
8
  import { parsePropsToDisplay, shouldRenderWaypoint } from '../../../../helpers';
8
9
 
9
- const FullRenderItem = ({
10
- isInfinite,
11
- pageBuilderComponents,
12
- entityProps,
13
- propsToDisplay,
14
- entity,
15
- index,
16
- itemId,
17
- listTotal,
18
- initialOffset,
19
- currentListLength,
20
- triggerInfiniteScroll,
21
- parent,
22
- pageBuilderID,
23
- displayCount,
24
- shouldRenderBanner,
25
- bannerProps,
26
- bannerIndex
27
- }) => {
10
+ const FullRenderItem = props => {
11
+ const {
12
+ isInfinite,
13
+ pageBuilderComponents,
14
+ entityProps,
15
+ propsToDisplay,
16
+ entity,
17
+ index,
18
+ itemId,
19
+ listTotal,
20
+ initialOffset,
21
+ currentListLength,
22
+ triggerInfiniteScroll,
23
+ parent,
24
+ pageBuilderID,
25
+ displayCount,
26
+ shouldRenderBanner,
27
+ bannerProps,
28
+ bannerIndex
29
+ } = props;
28
30
  const { hasGTM } = useContext(MainContext);
31
+ const VariantComponent = useContext(VariantContext);
32
+
29
33
  if (!pageBuilderComponents) return null;
30
34
  const parsedPropsToDisplay = parsePropsToDisplay(entityProps, propsToDisplay);
31
35
  const currentItemIndex = initialOffset + index;
32
36
  const renderWaypoint =
33
37
  isInfinite && shouldRenderWaypoint(index, currentListLength, currentItemIndex, listTotal);
38
+
39
+ const defaultContent = (
40
+ <>
41
+ <div className="list__item list__item--full">
42
+ {BuildPBComponents(pageBuilderComponents, {
43
+ parent: { ...parent, itemId, itemEntity: entity },
44
+ hasGTM,
45
+ pageBuilderID
46
+ })}
47
+ </div>
48
+ {!VariantComponent &&
49
+ !!parsedPropsToDisplay.length && (
50
+ <>{parsedPropsToDisplay.map(prop => (prop ? <span key={prop}>{prop}</span> : null))}</>
51
+ )}
52
+ </>
53
+ );
54
+
34
55
  return (
35
56
  <>
36
57
  {renderWaypoint && <Waypoint onEnter={triggerInfiniteScroll} />}
@@ -40,16 +61,12 @@ const FullRenderItem = ({
40
61
  <span className="section-total">/{listTotal}</span>
41
62
  </div>
42
63
  )}
43
- <div className="list__item list__item--full">
44
- {BuildPBComponents(pageBuilderComponents, {
45
- parent: { ...parent, itemId, itemEntity: entity },
46
- hasGTM,
47
- pageBuilderID
48
- })}
49
- </div>
50
- {!!parsedPropsToDisplay.length && (
51
- <>{parsedPropsToDisplay.map(prop => (prop ? <span key={prop}>{prop}</span> : null))}</>
64
+ {VariantComponent ? (
65
+ <VariantComponent {...props}>{defaultContent}</VariantComponent>
66
+ ) : (
67
+ defaultContent
52
68
  )}
69
+
53
70
  {shouldRenderBanner && <Banner {...bannerProps} renderCounter={bannerIndex} />}
54
71
  </>
55
72
  );
@@ -79,7 +79,7 @@ const getTypeBaseProps = (entitySchema, cardOptions, extraPropsHaveCategory) =>
79
79
 
80
80
  const { interfaces, properties, dynamicProperties, relations } = entitySchema;
81
81
 
82
- const isContent = !!interfaces.includes('content/content');
82
+ const isContent = !!interfaces.includes('content/content-base');
83
83
  const hasCategory = checkProps(properties) || checkProps(dynamicProperties);
84
84
  const hasPreheader = properties[PREHEADER_PROP];
85
85
 
@@ -97,7 +97,8 @@ const getTypeBaseProps = (entitySchema, cardOptions, extraPropsHaveCategory) =>
97
97
  return { typeBasedProps, shouldAddCategoryProps };
98
98
  };
99
99
 
100
- const getContentProps = isContent => (isContent ? ['url', 'sponsored', 'featured'] : []);
100
+ // make sure all props are supported by content/content-base interface
101
+ const getContentProps = isContent => (isContent ? ['url', 'sponsored', 'featured', 'live'] : []);
101
102
 
102
103
  const getCategoyProps = (shouldAddCategoryProps, hasCategory, hasPreheader) => {
103
104
  if (!shouldAddCategoryProps) return [];
package/src/index.js CHANGED
@@ -13,7 +13,8 @@ export {
13
13
  generateMultiItemQuery,
14
14
  getEntitySchema,
15
15
  getSingleEntitySchema,
16
- getUser
16
+ getUser,
17
+ getCurrentUser
17
18
  } from './application/query';
18
19
  export {
19
20
  getInheritedFilters,
@@ -0,0 +1,109 @@
1
+ import React, { useRef, useState, useEffect } from 'react';
2
+ import dayjs from 'dayjs';
3
+ import relativeTime from 'dayjs/plugin/relativeTime';
4
+ import Button from '@blaze-react/button';
5
+ import { FaPlus, FaMinus } from 'react-icons/fa';
6
+ import { BsPinAngleFill } from 'react-icons/bs';
7
+
8
+ dayjs.extend(relativeTime);
9
+
10
+ const LiveBlogList = props => {
11
+ const { children, date, published, featured } = props;
12
+ const [isExpanded, setIsExpanded] = useState(false);
13
+ const [shouldShowButton, setShouldShowButton] = useState(false);
14
+ const [{ displayedDate, displayedTime }, setDisplayedDate] = useState({
15
+ displayedDate: '&nbsp;',
16
+ displayTime: ''
17
+ });
18
+ const usedDate = date || published;
19
+
20
+ const contentRef = useRef(null);
21
+
22
+ useEffect(
23
+ () => {
24
+ const timeout = setTimeout(() => {
25
+ if (contentRef.current) {
26
+ const contentHeight = contentRef.current.scrollHeight;
27
+ if (contentHeight > 380) {
28
+ setShouldShowButton(true);
29
+ }
30
+ }
31
+ }, 500); // delay to wait for content load
32
+ // todo: change to use mutation observer
33
+
34
+ return () => {
35
+ clearTimeout(timeout);
36
+ };
37
+ },
38
+ [children]
39
+ );
40
+
41
+ useEffect(
42
+ () => {
43
+ // delay setting time so no SSR issues based on timezone
44
+ let newDate = '';
45
+ if (usedDate) {
46
+ const diffInDays = dayjs().diff(dayjs(usedDate), 'day');
47
+ if (diffInDays < 1) {
48
+ newDate = dayjs(usedDate).fromNow();
49
+ } else if (diffInDays < 365) {
50
+ newDate = dayjs(usedDate).format('DD MMM');
51
+ } else {
52
+ newDate = dayjs(usedDate).format('DD MMM YYYY');
53
+ }
54
+ setDisplayedDate({
55
+ displayedDate: newDate,
56
+ displayedTime: dayjs(usedDate).format('HH:mm')
57
+ });
58
+ }
59
+ },
60
+ [date, published, usedDate]
61
+ );
62
+
63
+ const toggleExpanded = () => {
64
+ setIsExpanded(!isExpanded);
65
+ };
66
+
67
+ const isCollapsed = !isExpanded;
68
+ const baseClass = 'live-blog-container';
69
+ const modifier = featured ? ` ${baseClass}--featured` : '';
70
+ const className = `${baseClass}${modifier}`;
71
+
72
+ return (
73
+ <div className={className}>
74
+ {usedDate && (
75
+ <div className="live-blog-date">
76
+ {featured && <BsPinAngleFill />}
77
+ <span className="live-blog-date--date">{displayedDate}</span>
78
+ <span className="live-blog-date--time">{displayedTime}</span>
79
+ </div>
80
+ )}
81
+
82
+ <div
83
+ ref={contentRef}
84
+ className={`live-blog-content ${
85
+ isCollapsed ? 'live-blog-content--collapsed' : 'live-blog-content--opened'
86
+ }`}>
87
+ {children}
88
+ </div>
89
+
90
+ {shouldShowButton && (
91
+ <div className="live-blog-button-wrapper">
92
+ <Button className="live-blog-toggle" onClick={toggleExpanded} type="button">
93
+ {isExpanded ? (
94
+ <>
95
+ <FaMinus className="toggle-icon" /> Show Less
96
+ </>
97
+ ) : (
98
+ <>
99
+ <FaPlus className="toggle-icon" /> Show More
100
+ </>
101
+ )}
102
+ </Button>
103
+ </div>
104
+ )}
105
+ </div>
106
+ );
107
+ };
108
+
109
+ export default LiveBlogList;
@@ -0,0 +1,13 @@
1
+ import dynamic from 'next/dynamic';
2
+
3
+ const liveBlogList = {
4
+ VariantComponent: dynamic(() =>
5
+ import(/* webpackChunkName: "blazePbliveBlogList" */ './LiveBlogList')
6
+ ),
7
+ getSettings: componentSettings => ({
8
+ ...componentSettings,
9
+ modifier: 'liveBlogList'
10
+ })
11
+ };
12
+
13
+ export default liveBlogList;
@@ -6,6 +6,7 @@ import parallaxImageTextRight from './ParallaxImageTextRight';
6
6
  import thumbnailCarousel from './ThumbnailCarousel';
7
7
  import slideSummary from './SlideSummary';
8
8
  import floatingSideButton from './FloatingSideButton';
9
+ import liveBlogList from './LiveBlogList';
9
10
 
10
11
  export default {
11
12
  heroImage,
@@ -15,5 +16,6 @@ export default {
15
16
  parallaxImageTextRight,
16
17
  thumbnailCarousel,
17
18
  slideSummary,
18
- floatingSideButton
19
+ floatingSideButton,
20
+ liveBlogList
19
21
  };