@blaze-cms/react-page-builder 0.139.0-alpha.3 → 0.139.0-alpha.4

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 (728) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +9 -0
  3. package/lib/BannerContext/helpers/set-initial-banner-counters.js +1 -2
  4. package/lib/BannerContext/helpers/set-initial-banner-counters.js.map +1 -1
  5. package/lib/BannerContext/index.js +4 -6
  6. package/lib/BannerContext/index.js.map +1 -1
  7. package/lib/HOC/recreateOnNavigation.js +1 -2
  8. package/lib/HOC/recreateOnNavigation.js.map +1 -1
  9. package/lib/HOC/withInfiniteScroll.js +3 -4
  10. package/lib/HOC/withInfiniteScroll.js.map +1 -1
  11. package/lib/HOC/withTitle.js +3 -4
  12. package/lib/HOC/withTitle.js.map +1 -1
  13. package/lib/PBContext/index.js +1 -2
  14. package/lib/PBContext/index.js.map +1 -1
  15. package/lib/application/query/index.js +15 -30
  16. package/lib/application/query/index.js.map +1 -1
  17. package/lib/components/BackToTop/BackToTop.js +3 -4
  18. package/lib/components/BackToTop/BackToTop.js.map +1 -1
  19. package/lib/components/BackToTop/index.js +1 -2
  20. package/lib/components/BackToTop/index.js.map +1 -1
  21. package/lib/components/Banner/AdSlotRender.js +3 -4
  22. package/lib/components/Banner/AdSlotRender.js.map +1 -1
  23. package/lib/components/Banner/Banner.js +3 -4
  24. package/lib/components/Banner/Banner.js.map +1 -1
  25. package/lib/components/Banner/BannerRender.js +1 -2
  26. package/lib/components/Banner/BannerRender.js.map +1 -1
  27. package/lib/components/Banner/helpers.js +10 -20
  28. package/lib/components/Banner/helpers.js.map +1 -1
  29. package/lib/components/Banner/index.js +3 -4
  30. package/lib/components/Banner/index.js.map +1 -1
  31. package/lib/components/BlazeLink.js +3 -4
  32. package/lib/components/BlazeLink.js.map +1 -1
  33. package/lib/components/Breadcrumb/Breadcrumb.js +3 -4
  34. package/lib/components/Breadcrumb/Breadcrumb.js.map +1 -1
  35. package/lib/components/Breadcrumb/index.js +1 -2
  36. package/lib/components/Breadcrumb/index.js.map +1 -1
  37. package/lib/components/Button.js +3 -4
  38. package/lib/components/Button.js.map +1 -1
  39. package/lib/components/Card/Card.js +8 -7
  40. package/lib/components/Card/Card.js.map +1 -1
  41. package/lib/components/Card/CardsContainer.js +4 -8
  42. package/lib/components/Card/CardsContainer.js.map +1 -1
  43. package/lib/components/Card/CardsFactory.js +1 -2
  44. package/lib/components/Card/CardsFactory.js.map +1 -1
  45. package/lib/components/Card/CardsRender.js +4 -6
  46. package/lib/components/Card/CardsRender.js.map +1 -1
  47. package/lib/components/Card/constants.js +2 -4
  48. package/lib/components/Card/constants.js.map +1 -1
  49. package/lib/components/Card/helpers/filter-query-setup.js +1 -2
  50. package/lib/components/Card/helpers/filter-query-setup.js.map +1 -1
  51. package/lib/components/Card/helpers/filters-setup.js +1 -2
  52. package/lib/components/Card/helpers/filters-setup.js.map +1 -1
  53. package/lib/components/Card/helpers/get-dynamic-grid-classes.js +1 -2
  54. package/lib/components/Card/helpers/get-dynamic-grid-classes.js.map +1 -1
  55. package/lib/components/Card/helpers/get-published-listing-url.js +1 -2
  56. package/lib/components/Card/helpers/get-published-listing-url.js.map +1 -1
  57. package/lib/components/Card/helpers/get-updated-items-to-display.js +1 -2
  58. package/lib/components/Card/helpers/get-updated-items-to-display.js.map +1 -1
  59. package/lib/components/Card/helpers/get-updated-sort-properties.js +1 -2
  60. package/lib/components/Card/helpers/get-updated-sort-properties.js.map +1 -1
  61. package/lib/components/Card/helpers/should-return.js +1 -2
  62. package/lib/components/Card/helpers/should-return.js.map +1 -1
  63. package/lib/components/Card/helpers/should-skip-single-query.js +1 -2
  64. package/lib/components/Card/helpers/should-skip-single-query.js.map +1 -1
  65. package/lib/components/Card/helpers/use-dynamic-size-key.js +1 -2
  66. package/lib/components/Card/helpers/use-dynamic-size-key.js.map +1 -1
  67. package/lib/components/Card/index.js +1 -2
  68. package/lib/components/Card/index.js.map +1 -1
  69. package/lib/components/Carousel/Carousel.js +27 -19
  70. package/lib/components/Carousel/Carousel.js.map +1 -1
  71. package/lib/components/Carousel/CarouselImage/CarouselImage.js +1 -2
  72. package/lib/components/Carousel/CarouselImage/CarouselImage.js.map +1 -1
  73. package/lib/components/Carousel/CarouselImage/index.js +1 -2
  74. package/lib/components/Carousel/CarouselImage/index.js.map +1 -1
  75. package/lib/components/Carousel/CarouselRender/CarouselRender.js +35 -62
  76. package/lib/components/Carousel/CarouselRender/CarouselRender.js.map +1 -1
  77. package/lib/components/Carousel/CarouselRender/index.js +1 -2
  78. package/lib/components/Carousel/CarouselRender/index.js.map +1 -1
  79. package/lib/components/Carousel/hooks/useCarouselNavigation.js +56 -0
  80. package/lib/components/Carousel/hooks/useCarouselNavigation.js.map +1 -0
  81. package/lib/components/Carousel/index.js +1 -2
  82. package/lib/components/Carousel/index.js.map +1 -1
  83. package/lib/components/CarouselWrapper/CarouselWrapper.js +1 -2
  84. package/lib/components/CarouselWrapper/CarouselWrapper.js.map +1 -1
  85. package/lib/components/CarouselWrapper/DefaultCarousel.js +3 -4
  86. package/lib/components/CarouselWrapper/DefaultCarousel.js.map +1 -1
  87. package/lib/components/CarouselWrapper/SmoothScrollCarousel.js +1 -2
  88. package/lib/components/CarouselWrapper/SmoothScrollCarousel.js.map +1 -1
  89. package/lib/components/CarouselWrapper/index.js +1 -2
  90. package/lib/components/CarouselWrapper/index.js.map +1 -1
  91. package/lib/components/ClickWrapper.js +3 -4
  92. package/lib/components/ClickWrapper.js.map +1 -1
  93. package/lib/components/Code/Code.js +3 -4
  94. package/lib/components/Code/Code.js.map +1 -1
  95. package/lib/components/Code/ScriptTag.js +3 -4
  96. package/lib/components/Code/ScriptTag.js.map +1 -1
  97. package/lib/components/Code/helpers/wrap-script-tags.js +1 -2
  98. package/lib/components/Code/helpers/wrap-script-tags.js.map +1 -1
  99. package/lib/components/Code/index.js +1 -2
  100. package/lib/components/Code/index.js.map +1 -1
  101. package/lib/components/ContentGroup/ContentGroup.js +1 -2
  102. package/lib/components/ContentGroup/ContentGroup.js.map +1 -1
  103. package/lib/components/ContentGroup/ContentGroupTabs.js +3 -4
  104. package/lib/components/ContentGroup/ContentGroupTabs.js.map +1 -1
  105. package/lib/components/ContentGroup/constants.js +5 -10
  106. package/lib/components/ContentGroup/constants.js.map +1 -1
  107. package/lib/components/ContentGroup/helpers/get-active-tab.js +1 -2
  108. package/lib/components/ContentGroup/helpers/get-active-tab.js.map +1 -1
  109. package/lib/components/ContentGroup/helpers/get-sections-data.js +1 -2
  110. package/lib/components/ContentGroup/helpers/get-sections-data.js.map +1 -1
  111. package/lib/components/ContentGroup/index.js +1 -2
  112. package/lib/components/ContentGroup/index.js.map +1 -1
  113. package/lib/components/ContentGroupSection/ContentGroupSection.js +1 -2
  114. package/lib/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
  115. package/lib/components/ContentGroupSection/index.js +1 -2
  116. package/lib/components/ContentGroupSection/index.js.map +1 -1
  117. package/lib/components/DataSummary/DataSummaryFactory.js +3 -4
  118. package/lib/components/DataSummary/DataSummaryFactory.js.map +1 -1
  119. package/lib/components/DataSummary/DataSummaryRender.js +1 -2
  120. package/lib/components/DataSummary/DataSummaryRender.js.map +1 -1
  121. package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummary.js +1 -2
  122. package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummary.js.map +1 -1
  123. package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js +3 -4
  124. package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js.map +1 -1
  125. package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/index.js +1 -2
  126. package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/index.js.map +1 -1
  127. package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummary.js +1 -2
  128. package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummary.js.map +1 -1
  129. package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js +3 -4
  130. package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js.map +1 -1
  131. package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/index.js +1 -2
  132. package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/index.js.map +1 -1
  133. package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummary.js +1 -2
  134. package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummary.js.map +1 -1
  135. package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js +3 -4
  136. package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js.map +1 -1
  137. package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/index.js +1 -2
  138. package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/index.js.map +1 -1
  139. package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummary.js +1 -2
  140. package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummary.js.map +1 -1
  141. package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js +3 -4
  142. package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js.map +1 -1
  143. package/lib/components/DataSummary/DataSummaryTypes/ListSummary/index.js +1 -2
  144. package/lib/components/DataSummary/DataSummaryTypes/ListSummary/index.js.map +1 -1
  145. package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummary.js +1 -2
  146. package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummary.js.map +1 -1
  147. package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js +3 -4
  148. package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js.map +1 -1
  149. package/lib/components/DataSummary/DataSummaryTypes/TextSummary/index.js +1 -2
  150. package/lib/components/DataSummary/DataSummaryTypes/TextSummary/index.js.map +1 -1
  151. package/lib/components/DataSummary/DataSummaryTypes/index.js +3 -4
  152. package/lib/components/DataSummary/DataSummaryTypes/index.js.map +1 -1
  153. package/lib/components/DataSummary/helpers/build-loop-props-content.js +1 -2
  154. package/lib/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
  155. package/lib/components/DataSummary/helpers/build-props-to-display-with-content.js +1 -2
  156. package/lib/components/DataSummary/helpers/build-props-to-display-with-content.js.map +1 -1
  157. package/lib/components/DataSummary/helpers/get-data-summary-query.js +1 -2
  158. package/lib/components/DataSummary/helpers/get-data-summary-query.js.map +1 -1
  159. package/lib/components/DataSummary/helpers/get-link-based-on-value.js +1 -2
  160. package/lib/components/DataSummary/helpers/get-link-based-on-value.js.map +1 -1
  161. package/lib/components/DataSummary/helpers/get-link-props.js +1 -2
  162. package/lib/components/DataSummary/helpers/get-link-props.js.map +1 -1
  163. package/lib/components/DataSummary/helpers/get-link-to-published-content.js +1 -2
  164. package/lib/components/DataSummary/helpers/get-link-to-published-content.js.map +1 -1
  165. package/lib/components/DataSummary/helpers/get-loop-props-limit.js +1 -2
  166. package/lib/components/DataSummary/helpers/get-loop-props-limit.js.map +1 -1
  167. package/lib/components/DataSummary/helpers/get-prop-value.js +1 -2
  168. package/lib/components/DataSummary/helpers/get-prop-value.js.map +1 -1
  169. package/lib/components/DataSummary/helpers/get-value-from-array.js +3 -5
  170. package/lib/components/DataSummary/helpers/get-value-from-array.js.map +1 -1
  171. package/lib/components/DataSummary/helpers/parse-boolean-values.js +1 -2
  172. package/lib/components/DataSummary/helpers/parse-boolean-values.js.map +1 -1
  173. package/lib/components/DataSummary/helpers/strip-summary-props-content.js +1 -2
  174. package/lib/components/DataSummary/helpers/strip-summary-props-content.js.map +1 -1
  175. package/lib/components/DataSummary/index.js +1 -2
  176. package/lib/components/DataSummary/index.js.map +1 -1
  177. package/lib/components/EmailConfirm/EmailConfirm.js +3 -4
  178. package/lib/components/EmailConfirm/EmailConfirm.js.map +1 -1
  179. package/lib/components/EmailConfirm/index.js +1 -2
  180. package/lib/components/EmailConfirm/index.js.map +1 -1
  181. package/lib/components/EmailConfirm/mutation.js +1 -2
  182. package/lib/components/EmailConfirm/mutation.js.map +1 -1
  183. package/lib/components/Iframe/Iframe.js +1 -2
  184. package/lib/components/Iframe/Iframe.js.map +1 -1
  185. package/lib/components/Iframe/constants.js +2 -4
  186. package/lib/components/Iframe/constants.js.map +1 -1
  187. package/lib/components/Iframe/index.js +1 -2
  188. package/lib/components/Iframe/index.js.map +1 -1
  189. package/lib/components/Image/GlobalLightbox/GlobalLightbox.js +3 -4
  190. package/lib/components/Image/GlobalLightbox/GlobalLightbox.js.map +1 -1
  191. package/lib/components/Image/GlobalLightbox/NavButton.js +1 -2
  192. package/lib/components/Image/GlobalLightbox/NavButton.js.map +1 -1
  193. package/lib/components/Image/GlobalLightbox/index.js +3 -4
  194. package/lib/components/Image/GlobalLightbox/index.js.map +1 -1
  195. package/lib/components/Image/Image.js +3 -4
  196. package/lib/components/Image/Image.js.map +1 -1
  197. package/lib/components/Image/ImageDetails.js +1 -2
  198. package/lib/components/Image/ImageDetails.js.map +1 -1
  199. package/lib/components/Image/ImageFactory.js +3 -4
  200. package/lib/components/Image/ImageFactory.js.map +1 -1
  201. package/lib/components/Image/ImageRender.js +1 -2
  202. package/lib/components/Image/ImageRender.js.map +1 -1
  203. package/lib/components/Image/Lightbox/Lightbox.js +3 -4
  204. package/lib/components/Image/Lightbox/Lightbox.js.map +1 -1
  205. package/lib/components/Image/Lightbox/index.js +1 -2
  206. package/lib/components/Image/Lightbox/index.js.map +1 -1
  207. package/lib/components/Image/index.js +1 -2
  208. package/lib/components/Image/index.js.map +1 -1
  209. package/lib/components/ItemList/ItemListButton/ItemListButton.js +3 -4
  210. package/lib/components/ItemList/ItemListButton/ItemListButton.js.map +1 -1
  211. package/lib/components/ItemList/ItemListButton/index.js +1 -2
  212. package/lib/components/ItemList/ItemListButton/index.js.map +1 -1
  213. package/lib/components/ItemList/ItemListCounter/ItemListCounter.js +1 -2
  214. package/lib/components/ItemList/ItemListCounter/ItemListCounter.js.map +1 -1
  215. package/lib/components/ItemList/ItemListCounter/index.js +1 -2
  216. package/lib/components/ItemList/ItemListCounter/index.js.map +1 -1
  217. package/lib/components/ItemList/ItemListNew/ItemListNew.js +1 -2
  218. package/lib/components/ItemList/ItemListNew/ItemListNew.js.map +1 -1
  219. package/lib/components/ItemList/ItemListNew/index.js +1 -2
  220. package/lib/components/ItemList/ItemListNew/index.js.map +1 -1
  221. package/lib/components/ItemList/constants.js +5 -10
  222. package/lib/components/ItemList/constants.js.map +1 -1
  223. package/lib/components/ItemList/helpers/get-item-list-data.js +1 -2
  224. package/lib/components/ItemList/helpers/get-item-list-data.js.map +1 -1
  225. package/lib/components/ItemList/helpers/get-item-list-id.js +1 -2
  226. package/lib/components/ItemList/helpers/get-item-list-id.js.map +1 -1
  227. package/lib/components/ItemList/helpers/get-item-list-ids.js +1 -2
  228. package/lib/components/ItemList/helpers/get-item-list-ids.js.map +1 -1
  229. package/lib/components/ItemList/helpers/set-item-list-id.js +1 -2
  230. package/lib/components/ItemList/helpers/set-item-list-id.js.map +1 -1
  231. package/lib/components/ItemList/helpers/set-param-and-redirect.js +1 -2
  232. package/lib/components/ItemList/helpers/set-param-and-redirect.js.map +1 -1
  233. package/lib/components/ItemList/hooks/use-item-list-id.js +1 -2
  234. package/lib/components/ItemList/hooks/use-item-list-id.js.map +1 -1
  235. package/lib/components/Layout/Layout.js +8 -5
  236. package/lib/components/Layout/Layout.js.map +1 -1
  237. package/lib/components/Layout/LayoutFactory.js +3 -4
  238. package/lib/components/Layout/LayoutFactory.js.map +1 -1
  239. package/lib/components/Layout/LayoutWithStickyTimer.js +3 -4
  240. package/lib/components/Layout/LayoutWithStickyTimer.js.map +1 -1
  241. package/lib/components/Layout/constants.js +3 -6
  242. package/lib/components/Layout/constants.js.map +1 -1
  243. package/lib/components/Layout/helpers/check-if-row-has-columns.js +1 -2
  244. package/lib/components/Layout/helpers/check-if-row-has-columns.js.map +1 -1
  245. package/lib/components/Layout/helpers/get-styles-to-update.js +1 -2
  246. package/lib/components/Layout/helpers/get-styles-to-update.js.map +1 -1
  247. package/lib/components/Layout/index.js +1 -2
  248. package/lib/components/Layout/index.js.map +1 -1
  249. package/lib/components/LazyImage/LazyImage.js +1 -2
  250. package/lib/components/LazyImage/LazyImage.js.map +1 -1
  251. package/lib/components/LazyImage/index.js +3 -4
  252. package/lib/components/LazyImage/index.js.map +1 -1
  253. package/lib/components/List/ListBuilder.js +1 -2
  254. package/lib/components/List/ListBuilder.js.map +1 -1
  255. package/lib/components/List/ListFactory.js +3 -4
  256. package/lib/components/List/ListFactory.js.map +1 -1
  257. package/lib/components/List/ListRender.js +1 -2
  258. package/lib/components/List/ListRender.js.map +1 -1
  259. package/lib/components/List/components/Cards/CardRenderWithInfiniteScroll.js +1 -2
  260. package/lib/components/List/components/Cards/CardRenderWithInfiniteScroll.js.map +1 -1
  261. package/lib/components/List/components/Cards/CardsRender.js +3 -4
  262. package/lib/components/List/components/Cards/CardsRender.js.map +1 -1
  263. package/lib/components/List/components/Cards/CardsRenderItem.js +1 -2
  264. package/lib/components/List/components/Cards/CardsRenderItem.js.map +1 -1
  265. package/lib/components/List/components/Cards/CardsRenderWrapper.js +3 -4
  266. package/lib/components/List/components/Cards/CardsRenderWrapper.js.map +1 -1
  267. package/lib/components/List/components/Cards/index.js +1 -2
  268. package/lib/components/List/components/Cards/index.js.map +1 -1
  269. package/lib/components/List/components/Full/FullRender.js +3 -4
  270. package/lib/components/List/components/Full/FullRender.js.map +1 -1
  271. package/lib/components/List/components/Full/FullRenderItem.js +3 -4
  272. package/lib/components/List/components/Full/FullRenderItem.js.map +1 -1
  273. package/lib/components/List/components/Full/FullRenderWithInfiniteScroll.js +1 -2
  274. package/lib/components/List/components/Full/FullRenderWithInfiniteScroll.js.map +1 -1
  275. package/lib/components/List/components/Full/index.js +1 -2
  276. package/lib/components/List/components/Full/index.js.map +1 -1
  277. package/lib/components/List/components/Header/ListHeader.js +1 -2
  278. package/lib/components/List/components/Header/ListHeader.js.map +1 -1
  279. package/lib/components/List/components/Header/index.js +1 -2
  280. package/lib/components/List/components/Header/index.js.map +1 -1
  281. package/lib/components/List/components/Pagination/Classic.js +1 -2
  282. package/lib/components/List/components/Pagination/Classic.js.map +1 -1
  283. package/lib/components/List/components/Pagination/ListPagination.js +3 -4
  284. package/lib/components/List/components/Pagination/ListPagination.js.map +1 -1
  285. package/lib/components/List/components/Pagination/LoadMore.js +1 -2
  286. package/lib/components/List/components/Pagination/LoadMore.js.map +1 -1
  287. package/lib/components/List/components/Pagination/index.js +1 -2
  288. package/lib/components/List/components/Pagination/index.js.map +1 -1
  289. package/lib/components/List/components/helpers/check-if-should-render-banner.js +2 -4
  290. package/lib/components/List/components/helpers/check-if-should-render-banner.js.map +1 -1
  291. package/lib/components/List/components/helpers/check-if-should-render-gtm.js +1 -2
  292. package/lib/components/List/components/helpers/check-if-should-render-gtm.js.map +1 -1
  293. package/lib/components/List/constants.js +7 -14
  294. package/lib/components/List/constants.js.map +1 -1
  295. package/lib/components/List/helpers/build-az-aggregations.js +1 -2
  296. package/lib/components/List/helpers/build-az-aggregations.js.map +1 -1
  297. package/lib/components/List/helpers/build-az-url.js +2 -4
  298. package/lib/components/List/helpers/build-az-url.js.map +1 -1
  299. package/lib/components/List/helpers/build-pagination-items.js +1 -2
  300. package/lib/components/List/helpers/build-pagination-items.js.map +1 -1
  301. package/lib/components/List/helpers/build-pagination-url.js +1 -2
  302. package/lib/components/List/helpers/build-pagination-url.js.map +1 -1
  303. package/lib/components/List/helpers/get-az-query-filter.js +1 -2
  304. package/lib/components/List/helpers/get-az-query-filter.js.map +1 -1
  305. package/lib/components/List/helpers/get-items-per-page-to-use.js +1 -2
  306. package/lib/components/List/helpers/get-items-per-page-to-use.js.map +1 -1
  307. package/lib/components/List/helpers/get-list-component.js +1 -2
  308. package/lib/components/List/helpers/get-list-component.js.map +1 -1
  309. package/lib/components/List/helpers/get-list-query.js +1 -2
  310. package/lib/components/List/helpers/get-list-query.js.map +1 -1
  311. package/lib/components/List/helpers/get-list-specific-search-filter.js +1 -2
  312. package/lib/components/List/helpers/get-list-specific-search-filter.js.map +1 -1
  313. package/lib/components/List/helpers/get-sort-props.js +1 -2
  314. package/lib/components/List/helpers/get-sort-props.js.map +1 -1
  315. package/lib/components/List/helpers/has-required-item-list-details.js +1 -2
  316. package/lib/components/List/helpers/has-required-item-list-details.js.map +1 -1
  317. package/lib/components/List/helpers/sort-aggs.js +1 -2
  318. package/lib/components/List/helpers/sort-aggs.js.map +1 -1
  319. package/lib/components/List/helpers/strip-query-key.js +1 -2
  320. package/lib/components/List/helpers/strip-query-key.js.map +1 -1
  321. package/lib/components/List/index.js +1 -2
  322. package/lib/components/List/index.js.map +1 -1
  323. package/lib/components/Menu/Menu.js +4 -6
  324. package/lib/components/Menu/Menu.js.map +1 -1
  325. package/lib/components/Menu/MenuContext.js +1 -2
  326. package/lib/components/Menu/MenuContext.js.map +1 -1
  327. package/lib/components/Menu/index.js +1 -2
  328. package/lib/components/Menu/index.js.map +1 -1
  329. package/lib/components/MenuItem/MenuItem.js +3 -4
  330. package/lib/components/MenuItem/MenuItem.js.map +1 -1
  331. package/lib/components/MenuItem/index.js +1 -2
  332. package/lib/components/MenuItem/index.js.map +1 -1
  333. package/lib/components/Modal/Modal.js +1 -2
  334. package/lib/components/Modal/Modal.js.map +1 -1
  335. package/lib/components/Modal/index.js +1 -2
  336. package/lib/components/Modal/index.js.map +1 -1
  337. package/lib/components/SearchContent/SearchContent.js +3 -4
  338. package/lib/components/SearchContent/SearchContent.js.map +1 -1
  339. package/lib/components/SearchContent/SearchContentItems.js +1 -2
  340. package/lib/components/SearchContent/SearchContentItems.js.map +1 -1
  341. package/lib/components/SearchContent/SearchContentResults.js +1 -2
  342. package/lib/components/SearchContent/SearchContentResults.js.map +1 -1
  343. package/lib/components/SearchContent/SearchContentToggleIcon.js +1 -2
  344. package/lib/components/SearchContent/SearchContentToggleIcon.js.map +1 -1
  345. package/lib/components/SearchContent/constants.js +2 -4
  346. package/lib/components/SearchContent/constants.js.map +1 -1
  347. package/lib/components/SearchContent/index.js +1 -2
  348. package/lib/components/SearchContent/index.js.map +1 -1
  349. package/lib/components/SearchFilter/SearchFilter/CloseMobileForm.js +1 -2
  350. package/lib/components/SearchFilter/SearchFilter/CloseMobileForm.js.map +1 -1
  351. package/lib/components/SearchFilter/SearchFilter/FiltersList.js +3 -4
  352. package/lib/components/SearchFilter/SearchFilter/FiltersList.js.map +1 -1
  353. package/lib/components/SearchFilter/SearchFilter/MobileFormToolbar.js +1 -2
  354. package/lib/components/SearchFilter/SearchFilter/MobileFormToolbar.js.map +1 -1
  355. package/lib/components/SearchFilter/SearchFilter/ResetDesktopForm.js +1 -2
  356. package/lib/components/SearchFilter/SearchFilter/ResetDesktopForm.js.map +1 -1
  357. package/lib/components/SearchFilter/SearchFilter/SearchFilter.js +3 -4
  358. package/lib/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
  359. package/lib/components/SearchFilter/SearchFilter/index.js +1 -2
  360. package/lib/components/SearchFilter/SearchFilter/index.js.map +1 -1
  361. package/lib/components/SearchFilter/SearchFilterContainer.js +3 -5
  362. package/lib/components/SearchFilter/SearchFilterContainer.js.map +1 -1
  363. package/lib/components/SearchFilter/components/Checkbox.js +3 -4
  364. package/lib/components/SearchFilter/components/Checkbox.js.map +1 -1
  365. package/lib/components/SearchFilter/components/Range.js +1 -2
  366. package/lib/components/SearchFilter/components/Range.js.map +1 -1
  367. package/lib/components/SearchFilter/components/Select.js +1 -2
  368. package/lib/components/SearchFilter/components/Select.js.map +1 -1
  369. package/lib/components/SearchFilter/components/TextSearch.js +1 -2
  370. package/lib/components/SearchFilter/components/TextSearch.js.map +1 -1
  371. package/lib/components/SearchFilter/constants.js +24 -48
  372. package/lib/components/SearchFilter/constants.js.map +1 -1
  373. package/lib/components/SearchFilter/helpers/build-filters-query.js +1 -2
  374. package/lib/components/SearchFilter/helpers/build-filters-query.js.map +1 -1
  375. package/lib/components/SearchFilter/helpers/build-new-url.js +1 -2
  376. package/lib/components/SearchFilter/helpers/build-new-url.js.map +1 -1
  377. package/lib/components/SearchFilter/helpers/build-raw-query-stringified.js +1 -2
  378. package/lib/components/SearchFilter/helpers/build-raw-query-stringified.js.map +1 -1
  379. package/lib/components/SearchFilter/helpers/build-url-query.js +1 -2
  380. package/lib/components/SearchFilter/helpers/build-url-query.js.map +1 -1
  381. package/lib/components/SearchFilter/helpers/calculate-min-max.js +1 -2
  382. package/lib/components/SearchFilter/helpers/calculate-min-max.js.map +1 -1
  383. package/lib/components/SearchFilter/helpers/calculate-step.js +1 -2
  384. package/lib/components/SearchFilter/helpers/calculate-step.js.map +1 -1
  385. package/lib/components/SearchFilter/helpers/check-if-range-updated.js +1 -2
  386. package/lib/components/SearchFilter/helpers/check-if-range-updated.js.map +1 -1
  387. package/lib/components/SearchFilter/helpers/decode-encode.js +2 -4
  388. package/lib/components/SearchFilter/helpers/decode-encode.js.map +1 -1
  389. package/lib/components/SearchFilter/helpers/get-display-value.js +1 -2
  390. package/lib/components/SearchFilter/helpers/get-display-value.js.map +1 -1
  391. package/lib/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js +1 -2
  392. package/lib/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js.map +1 -1
  393. package/lib/components/SearchFilter/helpers/get-filter-value-from-query.js +1 -2
  394. package/lib/components/SearchFilter/helpers/get-filter-value-from-query.js.map +1 -1
  395. package/lib/components/SearchFilter/helpers/get-filter-values.js +1 -2
  396. package/lib/components/SearchFilter/helpers/get-filter-values.js.map +1 -1
  397. package/lib/components/SearchFilter/helpers/get-initial-filter-values.js +1 -2
  398. package/lib/components/SearchFilter/helpers/get-initial-filter-values.js.map +1 -1
  399. package/lib/components/SearchFilter/helpers/get-intersected-prop.js +1 -2
  400. package/lib/components/SearchFilter/helpers/get-intersected-prop.js.map +1 -1
  401. package/lib/components/SearchFilter/helpers/get-range-value.js +1 -2
  402. package/lib/components/SearchFilter/helpers/get-range-value.js.map +1 -1
  403. package/lib/components/SearchFilter/helpers/get-responsive-filter-classnames.js +1 -2
  404. package/lib/components/SearchFilter/helpers/get-responsive-filter-classnames.js.map +1 -1
  405. package/lib/components/SearchFilter/helpers/get-select-options.js +1 -2
  406. package/lib/components/SearchFilter/helpers/get-select-options.js.map +1 -1
  407. package/lib/components/SearchFilter/helpers/get-updated-filter-by.js +1 -2
  408. package/lib/components/SearchFilter/helpers/get-updated-filter-by.js.map +1 -1
  409. package/lib/components/SearchFilter/helpers/is-device-desktop.js +1 -2
  410. package/lib/components/SearchFilter/helpers/is-device-desktop.js.map +1 -1
  411. package/lib/components/SearchFilter/helpers/parse-filter-value.js +1 -2
  412. package/lib/components/SearchFilter/helpers/parse-filter-value.js.map +1 -1
  413. package/lib/components/SearchFilter/index.js +1 -2
  414. package/lib/components/SearchFilter/index.js.map +1 -1
  415. package/lib/components/SearchFilter/searchFilterReducer.js +1 -2
  416. package/lib/components/SearchFilter/searchFilterReducer.js.map +1 -1
  417. package/lib/components/SearchFilterSort/SearchFilterSort.js +1 -2
  418. package/lib/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
  419. package/lib/components/SearchFilterSort/constants.js +4 -8
  420. package/lib/components/SearchFilterSort/constants.js.map +1 -1
  421. package/lib/components/SearchFilterSort/helpers/handle-sort-update.js +1 -2
  422. package/lib/components/SearchFilterSort/helpers/handle-sort-update.js.map +1 -1
  423. package/lib/components/SearchFilterSort/helpers/update-sort.js +2 -4
  424. package/lib/components/SearchFilterSort/helpers/update-sort.js.map +1 -1
  425. package/lib/components/SearchFilterSort/index.js +1 -2
  426. package/lib/components/SearchFilterSort/index.js.map +1 -1
  427. package/lib/components/SocialFollow/SFItem.js +1 -2
  428. package/lib/components/SocialFollow/SFItem.js.map +1 -1
  429. package/lib/components/SocialFollow/SocialFollow.js +1 -2
  430. package/lib/components/SocialFollow/SocialFollow.js.map +1 -1
  431. package/lib/components/SocialFollow/SocialFollowRender.js +1 -2
  432. package/lib/components/SocialFollow/SocialFollowRender.js.map +1 -1
  433. package/lib/components/SocialFollow/index.js +1 -2
  434. package/lib/components/SocialFollow/index.js.map +1 -1
  435. package/lib/components/SocialFollow/sf.config.js +4 -8
  436. package/lib/components/SocialFollow/sf.config.js.map +1 -1
  437. package/lib/components/SubMenu/SubMenu.js +1 -2
  438. package/lib/components/SubMenu/SubMenu.js.map +1 -1
  439. package/lib/components/SubMenu/index.js +1 -2
  440. package/lib/components/SubMenu/index.js.map +1 -1
  441. package/lib/components/TextBlock/TextBlockRender.js +1 -2
  442. package/lib/components/TextBlock/TextBlockRender.js.map +1 -1
  443. package/lib/components/TextBlock/index.js +1 -2
  444. package/lib/components/TextBlock/index.js.map +1 -1
  445. package/lib/components/Video/Video.js +1 -2
  446. package/lib/components/Video/Video.js.map +1 -1
  447. package/lib/components/Video/VideoModal.js +3 -4
  448. package/lib/components/Video/VideoModal.js.map +1 -1
  449. package/lib/components/Video/VideoRender.js +1 -2
  450. package/lib/components/Video/VideoRender.js.map +1 -1
  451. package/lib/components/Video/index.js +1 -2
  452. package/lib/components/Video/index.js.map +1 -1
  453. package/lib/components/Video/providers/Default.js +1 -2
  454. package/lib/components/Video/providers/Default.js.map +1 -1
  455. package/lib/components/Video/providers/JWPlayer/JWPlayerController.js +1 -2
  456. package/lib/components/Video/providers/JWPlayer/JWPlayerController.js.map +1 -1
  457. package/lib/components/Video/providers/JWPlayer/JWPlayerProvider.js +1 -2
  458. package/lib/components/Video/providers/JWPlayer/JWPlayerProvider.js.map +1 -1
  459. package/lib/components/Video/providers/Vimeo/VimeoProvider.js +3 -4
  460. package/lib/components/Video/providers/Vimeo/VimeoProvider.js.map +1 -1
  461. package/lib/components/Video/providers/Vimeo/helpers/add-extra-params-to-url.js +1 -2
  462. package/lib/components/Video/providers/Vimeo/helpers/add-extra-params-to-url.js.map +1 -1
  463. package/lib/components/Video/providers/YouTube/YouTubeProvider.js +1 -2
  464. package/lib/components/Video/providers/YouTube/YouTubeProvider.js.map +1 -1
  465. package/lib/components/Video/providers/YouTube/YoutubeEmbeded.js +3 -4
  466. package/lib/components/Video/providers/YouTube/YoutubeEmbeded.js.map +1 -1
  467. package/lib/components/Video/providers/YouTube/helpers/index.js +3 -6
  468. package/lib/components/Video/providers/YouTube/helpers/index.js.map +1 -1
  469. package/lib/components/Video/providers/get-provider.js +3 -4
  470. package/lib/components/Video/providers/get-provider.js.map +1 -1
  471. package/lib/components/Video/providers/index.js +1 -2
  472. package/lib/components/Video/providers/index.js.map +1 -1
  473. package/lib/components/Wrapper.js +1 -2
  474. package/lib/components/Wrapper.js.map +1 -1
  475. package/lib/components/index.js +3 -4
  476. package/lib/components/index.js.map +1 -1
  477. package/lib/constants/componentsDefaultValues.js +1 -2
  478. package/lib/constants/componentsDefaultValues.js.map +1 -1
  479. package/lib/constants/index.js +107 -212
  480. package/lib/constants/index.js.map +1 -1
  481. package/lib/helpers/append-images.js +1 -2
  482. package/lib/helpers/append-images.js.map +1 -1
  483. package/lib/helpers/build-az-filter.js +1 -2
  484. package/lib/helpers/build-az-filter.js.map +1 -1
  485. package/lib/helpers/build-checkbox-filters.js +1 -2
  486. package/lib/helpers/build-checkbox-filters.js.map +1 -1
  487. package/lib/helpers/build-image-properties.js +1 -2
  488. package/lib/helpers/build-image-properties.js.map +1 -1
  489. package/lib/helpers/build-inherited-filters.js +1 -2
  490. package/lib/helpers/build-inherited-filters.js.map +1 -1
  491. package/lib/helpers/build-link-extra-props.js +1 -2
  492. package/lib/helpers/build-link-extra-props.js.map +1 -1
  493. package/lib/helpers/build-props-query.js +1 -2
  494. package/lib/helpers/build-props-query.js.map +1 -1
  495. package/lib/helpers/build-query-fields.js +1 -2
  496. package/lib/helpers/build-query-fields.js.map +1 -1
  497. package/lib/helpers/build-query-key.js +1 -2
  498. package/lib/helpers/build-query-key.js.map +1 -1
  499. package/lib/helpers/build-raw-query-base.js +2 -4
  500. package/lib/helpers/build-raw-query-base.js.map +1 -1
  501. package/lib/helpers/build-raw-query.js +1 -2
  502. package/lib/helpers/build-raw-query.js.map +1 -1
  503. package/lib/helpers/build-search-values-checkbox-select.js +1 -2
  504. package/lib/helpers/build-search-values-checkbox-select.js.map +1 -1
  505. package/lib/helpers/build-search-values-text.js +1 -2
  506. package/lib/helpers/build-search-values-text.js.map +1 -1
  507. package/lib/helpers/build-set-filters.js +1 -2
  508. package/lib/helpers/build-set-filters.js.map +1 -1
  509. package/lib/helpers/build-sort-values.js +1 -2
  510. package/lib/helpers/build-sort-values.js.map +1 -1
  511. package/lib/helpers/check-for-error.js +1 -2
  512. package/lib/helpers/check-for-error.js.map +1 -1
  513. package/lib/helpers/check-props-to-use.js +1 -2
  514. package/lib/helpers/check-props-to-use.js.map +1 -1
  515. package/lib/helpers/entities/constants.js +3 -6
  516. package/lib/helpers/entities/constants.js.map +1 -1
  517. package/lib/helpers/get-checkbox-filters.js +1 -2
  518. package/lib/helpers/get-checkbox-filters.js.map +1 -1
  519. package/lib/helpers/get-click-wrapper-options.js +1 -2
  520. package/lib/helpers/get-click-wrapper-options.js.map +1 -1
  521. package/lib/helpers/get-current-offset.js +1 -2
  522. package/lib/helpers/get-current-offset.js.map +1 -1
  523. package/lib/helpers/get-dictionary-match.js +1 -2
  524. package/lib/helpers/get-dictionary-match.js.map +1 -1
  525. package/lib/helpers/get-display-count-data.js +1 -2
  526. package/lib/helpers/get-display-count-data.js.map +1 -1
  527. package/lib/helpers/get-elasticsearch-operator.js +1 -2
  528. package/lib/helpers/get-elasticsearch-operator.js.map +1 -1
  529. package/lib/helpers/get-entity-data.js +1 -2
  530. package/lib/helpers/get-entity-data.js.map +1 -1
  531. package/lib/helpers/get-entity-render-props.js +1 -2
  532. package/lib/helpers/get-entity-render-props.js.map +1 -1
  533. package/lib/helpers/get-extra-az-bits.js +1 -2
  534. package/lib/helpers/get-extra-az-bits.js.map +1 -1
  535. package/lib/helpers/get-filter-props.js +1 -2
  536. package/lib/helpers/get-filter-props.js.map +1 -1
  537. package/lib/helpers/get-filter-relation-keys.js +1 -2
  538. package/lib/helpers/get-filter-relation-keys.js.map +1 -1
  539. package/lib/helpers/get-generic-props.js +1 -2
  540. package/lib/helpers/get-generic-props.js.map +1 -1
  541. package/lib/helpers/get-generic-render-variables.js +1 -2
  542. package/lib/helpers/get-generic-render-variables.js.map +1 -1
  543. package/lib/helpers/get-image-ids.js +1 -2
  544. package/lib/helpers/get-image-ids.js.map +1 -1
  545. package/lib/helpers/get-inherited-filters.js +1 -2
  546. package/lib/helpers/get-inherited-filters.js.map +1 -1
  547. package/lib/helpers/get-items-to-display-ids.js +1 -2
  548. package/lib/helpers/get-items-to-display-ids.js.map +1 -1
  549. package/lib/helpers/get-modifiers.js +1 -2
  550. package/lib/helpers/get-modifiers.js.map +1 -1
  551. package/lib/helpers/get-pagination-index.js +1 -2
  552. package/lib/helpers/get-pagination-index.js.map +1 -1
  553. package/lib/helpers/get-parsed-prop-values.js +1 -2
  554. package/lib/helpers/get-parsed-prop-values.js.map +1 -1
  555. package/lib/helpers/get-parsed-summary-value.js +1 -2
  556. package/lib/helpers/get-parsed-summary-value.js.map +1 -1
  557. package/lib/helpers/get-prop-values.js +1 -2
  558. package/lib/helpers/get-prop-values.js.map +1 -1
  559. package/lib/helpers/get-query-filters.js +1 -2
  560. package/lib/helpers/get-query-filters.js.map +1 -1
  561. package/lib/helpers/get-query-props.js +1 -2
  562. package/lib/helpers/get-query-props.js.map +1 -1
  563. package/lib/helpers/get-required-schemas.js +1 -2
  564. package/lib/helpers/get-required-schemas.js.map +1 -1
  565. package/lib/helpers/get-sanitized-prop-values.js +1 -2
  566. package/lib/helpers/get-sanitized-prop-values.js.map +1 -1
  567. package/lib/helpers/get-search-filter-type.js +1 -2
  568. package/lib/helpers/get-search-filter-type.js.map +1 -1
  569. package/lib/helpers/get-sort-by-field-name.js +1 -2
  570. package/lib/helpers/get-sort-by-field-name.js.map +1 -1
  571. package/lib/helpers/get-unpublished-entity-name.js +1 -2
  572. package/lib/helpers/get-unpublished-entity-name.js.map +1 -1
  573. package/lib/helpers/get-updated-filter-by.js +1 -2
  574. package/lib/helpers/get-updated-filter-by.js.map +1 -1
  575. package/lib/helpers/get-wrapped-value-with-link.js +1 -2
  576. package/lib/helpers/get-wrapped-value-with-link.js.map +1 -1
  577. package/lib/helpers/has-children.js +1 -2
  578. package/lib/helpers/has-children.js.map +1 -1
  579. package/lib/helpers/inject-multiple-banners/get-banners-for-entities/index.js +1 -2
  580. package/lib/helpers/inject-multiple-banners/get-banners-for-entities/index.js.map +1 -1
  581. package/lib/helpers/inject-multiple-banners/get-banners-for-nodes/index.js +1 -2
  582. package/lib/helpers/inject-multiple-banners/get-banners-for-nodes/index.js.map +1 -1
  583. package/lib/helpers/inject-multiple-banners/index.js +1 -2
  584. package/lib/helpers/inject-multiple-banners/index.js.map +1 -1
  585. package/lib/helpers/is-browser.js +1 -2
  586. package/lib/helpers/is-browser.js.map +1 -1
  587. package/lib/helpers/is-filter-entitys-id.js +1 -2
  588. package/lib/helpers/is-filter-entitys-id.js.map +1 -1
  589. package/lib/helpers/is-object.js +1 -2
  590. package/lib/helpers/is-object.js.map +1 -1
  591. package/lib/helpers/is-using-relation-image.js +1 -2
  592. package/lib/helpers/is-using-relation-image.js.map +1 -1
  593. package/lib/helpers/parse-TextBlock.js +3 -4
  594. package/lib/helpers/parse-TextBlock.js.map +1 -1
  595. package/lib/helpers/parse-props-to-display.js +3 -4
  596. package/lib/helpers/parse-props-to-display.js.map +1 -1
  597. package/lib/helpers/process-data-summary-value.js +4 -6
  598. package/lib/helpers/process-data-summary-value.js.map +1 -1
  599. package/lib/helpers/remove-extra-items.js +1 -2
  600. package/lib/helpers/remove-extra-items.js.map +1 -1
  601. package/lib/helpers/remove-unwanted-characters.js +1 -2
  602. package/lib/helpers/remove-unwanted-characters.js.map +1 -1
  603. package/lib/helpers/render-children.js +1 -2
  604. package/lib/helpers/render-children.js.map +1 -1
  605. package/lib/helpers/should-render-waypoint.js +1 -2
  606. package/lib/helpers/should-render-waypoint.js.map +1 -1
  607. package/lib/helpers/should-show-property.js +1 -2
  608. package/lib/helpers/should-show-property.js.map +1 -1
  609. package/lib/helpers/sort-response-data.js +1 -2
  610. package/lib/helpers/sort-response-data.js.map +1 -1
  611. package/lib/helpers/split-children.js +1 -2
  612. package/lib/helpers/split-children.js.map +1 -1
  613. package/lib/helpers/update-childrens-parent.js +1 -2
  614. package/lib/helpers/update-childrens-parent.js.map +1 -1
  615. package/lib/hooks/helpers/RenderComponent.js +10 -4
  616. package/lib/hooks/helpers/RenderComponent.js.map +1 -1
  617. package/lib/hooks/helpers/StoreImages.js +1 -2
  618. package/lib/hooks/helpers/StoreImages.js.map +1 -1
  619. package/lib/hooks/helpers/append-gtm-classname.js +1 -2
  620. package/lib/hooks/helpers/append-gtm-classname.js.map +1 -1
  621. package/lib/hooks/helpers/buildPBComponents.js +1 -2
  622. package/lib/hooks/helpers/buildPBComponents.js.map +1 -1
  623. package/lib/hooks/helpers/check-banner-insertion-set.js +1 -2
  624. package/lib/hooks/helpers/check-banner-insertion-set.js.map +1 -1
  625. package/lib/hooks/helpers/check-collisions.js +2 -4
  626. package/lib/hooks/helpers/check-collisions.js.map +1 -1
  627. package/lib/hooks/helpers/constants.js +4 -8
  628. package/lib/hooks/helpers/constants.js.map +1 -1
  629. package/lib/hooks/helpers/get-banner-index.js +1 -2
  630. package/lib/hooks/helpers/get-banner-index.js.map +1 -1
  631. package/lib/hooks/helpers/get-banners-by-type.js +1 -2
  632. package/lib/hooks/helpers/get-banners-by-type.js.map +1 -1
  633. package/lib/hooks/helpers/get-lightbox-images.js +1 -2
  634. package/lib/hooks/helpers/get-lightbox-images.js.map +1 -1
  635. package/lib/hooks/helpers/getVariant.js +18 -0
  636. package/lib/hooks/helpers/getVariant.js.map +1 -0
  637. package/lib/hooks/helpers/index.js +1 -2
  638. package/lib/hooks/helpers/index.js.map +1 -1
  639. package/lib/hooks/helpers/inject-element-banners.js +1 -2
  640. package/lib/hooks/helpers/inject-element-banners.js.map +1 -1
  641. package/lib/hooks/helpers/inject-textblock-banners.js +1 -2
  642. package/lib/hooks/helpers/inject-textblock-banners.js.map +1 -1
  643. package/lib/hooks/helpers/insert-banners.js +1 -2
  644. package/lib/hooks/helpers/insert-banners.js.map +1 -1
  645. package/lib/hooks/helpers/update-targetings.js +1 -2
  646. package/lib/hooks/helpers/update-targetings.js.map +1 -1
  647. package/lib/hooks/use-banner-insertion.js +1 -2
  648. package/lib/hooks/use-banner-insertion.js.map +1 -1
  649. package/lib/hooks/use-check-mobile-screen.js +1 -2
  650. package/lib/hooks/use-check-mobile-screen.js.map +1 -1
  651. package/lib/hooks/use-get-entity-schema.js +1 -2
  652. package/lib/hooks/use-get-entity-schema.js.map +1 -1
  653. package/lib/hooks/use-get-entity-schemas-as-obj.js +1 -2
  654. package/lib/hooks/use-get-entity-schemas-as-obj.js.map +1 -1
  655. package/lib/hooks/use-get-image-id-from-relation.js +1 -2
  656. package/lib/hooks/use-get-image-id-from-relation.js.map +1 -1
  657. package/lib/hooks/use-get-images.js +1 -2
  658. package/lib/hooks/use-get-images.js.map +1 -1
  659. package/lib/hooks/use-get-single-entity-schema.js +1 -2
  660. package/lib/hooks/use-get-single-entity-schema.js.map +1 -1
  661. package/lib/hooks/use-page-builder.js +1 -2
  662. package/lib/hooks/use-page-builder.js.map +1 -1
  663. package/lib/index.js +13 -0
  664. package/lib/index.js.map +1 -1
  665. package/lib/utils/component-map.js +4 -5
  666. package/lib/utils/component-map.js.map +1 -1
  667. package/lib/utils/get-image-data.js +1 -2
  668. package/lib/utils/get-image-data.js.map +1 -1
  669. package/lib/utils/get-props-to-display-modifiers.js +1 -2
  670. package/lib/utils/get-props-to-display-modifiers.js.map +1 -1
  671. package/lib/utils/index.js +7 -0
  672. package/lib/utils/index.js.map +1 -1
  673. package/lib/utils/variant-handler.js +39 -0
  674. package/lib/utils/variant-handler.js.map +1 -0
  675. package/lib/variants/index.js +9 -0
  676. package/lib/variants/index.js.map +1 -0
  677. package/lib-es/components/Card/Card.js +5 -3
  678. package/lib-es/components/Card/Card.js.map +1 -1
  679. package/lib-es/components/Card/CardsContainer.js +2 -5
  680. package/lib-es/components/Card/CardsContainer.js.map +1 -1
  681. package/lib-es/components/Card/CardsRender.js +1 -2
  682. package/lib-es/components/Card/CardsRender.js.map +1 -1
  683. package/lib-es/components/Carousel/Carousel.js +27 -17
  684. package/lib-es/components/Carousel/Carousel.js.map +1 -1
  685. package/lib-es/components/Carousel/CarouselRender/CarouselRender.js +33 -53
  686. package/lib-es/components/Carousel/CarouselRender/CarouselRender.js.map +1 -1
  687. package/lib-es/components/Carousel/hooks/useCarouselNavigation.js +49 -0
  688. package/lib-es/components/Carousel/hooks/useCarouselNavigation.js.map +1 -0
  689. package/lib-es/components/Layout/Layout.js +8 -4
  690. package/lib-es/components/Layout/Layout.js.map +1 -1
  691. package/lib-es/components/SearchFilter/SearchFilterContainer.js +0 -1
  692. package/lib-es/components/SearchFilter/SearchFilterContainer.js.map +1 -1
  693. package/lib-es/helpers/process-data-summary-value.js +2 -2
  694. package/lib-es/hooks/helpers/RenderComponent.js +5 -2
  695. package/lib-es/hooks/helpers/RenderComponent.js.map +1 -1
  696. package/lib-es/hooks/helpers/getVariant.js +14 -0
  697. package/lib-es/hooks/helpers/getVariant.js.map +1 -0
  698. package/lib-es/index.js +2 -1
  699. package/lib-es/index.js.map +1 -1
  700. package/lib-es/utils/component-map.js +4 -4
  701. package/lib-es/utils/component-map.js.map +1 -1
  702. package/lib-es/utils/index.js +2 -1
  703. package/lib-es/utils/index.js.map +1 -1
  704. package/lib-es/utils/variant-handler.js +26 -0
  705. package/lib-es/utils/variant-handler.js.map +1 -0
  706. package/lib-es/variants/index.js +2 -0
  707. package/lib-es/variants/index.js.map +1 -0
  708. package/package.json +4 -4
  709. package/src/components/Card/Card.js +1 -2
  710. package/src/components/Card/CardsContainer.js +0 -3
  711. package/src/components/Card/CardsRender.js +0 -1
  712. package/src/components/Carousel/Carousel.js +28 -12
  713. package/src/components/Carousel/CarouselRender/CarouselRender.js +36 -56
  714. package/src/components/Carousel/hooks/useCarouselNavigation.js +50 -0
  715. package/src/components/Layout/Layout.js +8 -5
  716. package/src/hooks/helpers/RenderComponent.js +4 -0
  717. package/src/hooks/helpers/getVariant.js +11 -0
  718. package/src/index.js +2 -1
  719. package/src/utils/component-map.js +4 -5
  720. package/src/utils/index.js +9 -1
  721. package/src/utils/variant-handler.js +33 -0
  722. package/src/variants/index.js +1 -0
  723. package/tests/unit/src/components/Carousel/Carousel.test.js +23 -0
  724. package/tests/unit/src/components/Carousel/CarouselRender/CarouselRender.test.js +14 -22
  725. package/tests/unit/src/components/Carousel/__snapshots__/Carousel.test.js.snap +10 -0
  726. package/tests/unit/src/components/Layout/Layout.test.js +11 -0
  727. package/tests/unit/src/components/Menu/__snapshots__/Menu.test.js.snap +1 -1
  728. package/tests/unit/src/utils/variant-handler.test.js +41 -0
@@ -1 +1 @@
1
- {"version":3,"file":"RenderComponent.js","names":["React","PropTypes","ErrorBoundary","getComponent","appendGtmClassName","PB_TYPE_IMAGE","PB_TYPE_BANNER","PB_TYPE_TEXTBLOCK","PB_TYPE_CAROUSEL","BannerContextProvider","RenderComponent","_ref","component","imageProps","childComponents","options","textBlockBanners","hasTextBlockBanners","siblings","nestedComponentsProps","_objectWithoutProperties","_excluded","type","settings","id","name","Component","isImage","includes","imageOptions","updatedSettings","createElement","_extends","key","banners","pbOptions","propTypes","shape","string","object","items","array","isRequired","node","bool","defaultProps"],"sources":["../../../src/hooks/helpers/RenderComponent.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ErrorBoundary from '@blaze-cms/core-errors-ui';\nimport getComponent from './getComponent';\nimport appendGtmClassName from './append-gtm-classname';\nimport { PB_TYPE_IMAGE, PB_TYPE_BANNER, PB_TYPE_TEXTBLOCK, PB_TYPE_CAROUSEL } from './constants';\nimport { BannerContextProvider } from '../../BannerContext';\n\nconst RenderComponent = ({\n component,\n imageProps,\n childComponents,\n options = {},\n textBlockBanners,\n hasTextBlockBanners,\n siblings,\n ...nestedComponentsProps\n}) => {\n const { type, settings, id, name } = component;\n const Component = getComponent(type);\n const isImage = [PB_TYPE_IMAGE, PB_TYPE_BANNER, PB_TYPE_TEXTBLOCK, PB_TYPE_CAROUSEL].includes(\n type\n );\n const imageOptions = isImage ? imageProps : {};\n if (!Component) return null;\n const updatedSettings = appendGtmClassName(settings, childComponents);\n\n return (\n <ErrorBoundary>\n <Component\n key={id}\n type={type}\n {...options}\n {...imageOptions}\n {...nestedComponentsProps}\n {...updatedSettings}\n name={name || settings.name}>\n {hasTextBlockBanners ? (\n <BannerContextProvider siblings={siblings} banners={textBlockBanners} pbOptions={options}>\n {childComponents}\n </BannerContextProvider>\n ) : (\n childComponents\n )}\n </Component>\n </ErrorBoundary>\n );\n};\n\nRenderComponent.propTypes = {\n component: PropTypes.shape({\n type: PropTypes.string,\n id: PropTypes.string,\n name: PropTypes.string,\n settings: PropTypes.object,\n items: PropTypes.array\n }).isRequired,\n imageProps: PropTypes.object.isRequired,\n options: PropTypes.object.isRequired,\n childComponents: PropTypes.node.isRequired,\n textBlockBanners: PropTypes.array,\n hasTextBlockBanners: PropTypes.bool,\n siblings: PropTypes.array\n};\n\nRenderComponent.defaultProps = { textBlockBanners: null, hasTextBlockBanners: false, siblings: [] };\n\nexport default RenderComponent;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,aAAa,MAAM,2BAA2B;AACrD,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,kBAAkB,MAAM,wBAAwB;AACvD,SAASC,aAAa,EAAEC,cAAc,EAAEC,iBAAiB,EAAEC,gBAAgB,QAAQ,aAAa;AAChG,SAASC,qBAAqB,QAAQ,qBAAqB;AAE3D,MAAMC,eAAe,GAAGC,IAAA,IASlB;EAAA,IATmB;MACvBC,SAAS;MACTC,UAAU;MACVC,eAAe;MACfC,OAAO,GAAG,CAAC,CAAC;MACZC,gBAAgB;MAChBC,mBAAmB;MACnBC;IAEF,CAAC,GAAAP,IAAA;IADIQ,qBAAqB,GAAAC,wBAAA,CAAAT,IAAA,EAAAU,SAAA;EAExB,MAAM;IAAEC,IAAI;IAAEC,QAAQ;IAAEC,EAAE;IAAEC;EAAK,CAAC,GAAGb,SAAS;EAC9C,MAAMc,SAAS,GAAGvB,YAAY,CAACmB,IAAI,CAAC;EACpC,MAAMK,OAAO,GAAG,CAACtB,aAAa,EAAEC,cAAc,EAAEC,iBAAiB,EAAEC,gBAAgB,CAAC,CAACoB,QAAQ,CAC3FN,IACF,CAAC;EACD,MAAMO,YAAY,GAAGF,OAAO,GAAGd,UAAU,GAAG,CAAC,CAAC;EAC9C,IAAI,CAACa,SAAS,EAAE,OAAO,IAAI;EAC3B,MAAMI,eAAe,GAAG1B,kBAAkB,CAACmB,QAAQ,EAAET,eAAe,CAAC;EAErE,oBACEd,KAAA,CAAA+B,aAAA,CAAC7B,aAAa,qBACZF,KAAA,CAAA+B,aAAA,CAACL,SAAS,EAAAM,QAAA;IACRC,GAAG,EAAET,EAAG;IACRF,IAAI,EAAEA;EAAK,GACPP,OAAO,EACPc,YAAY,EACZV,qBAAqB,EACrBW,eAAe;IACnBL,IAAI,EAAEA,IAAI,IAAIF,QAAQ,CAACE;EAAK,IAC3BR,mBAAmB,gBAClBjB,KAAA,CAAA+B,aAAA,CAACtB,qBAAqB;IAACS,QAAQ,EAAEA,QAAS;IAACgB,OAAO,EAAElB,gBAAiB;IAACmB,SAAS,EAAEpB;EAAQ,GACtFD,eACoB,CAAC,GAExBA,eAEO,CACE,CAAC;AAEpB,CAAC;AAEDJ,eAAe,CAAC0B,SAAS,GAAG;EAC1BxB,SAAS,EAAEX,SAAS,CAACoC,KAAK,CAAC;IACzBf,IAAI,EAAErB,SAAS,CAACqC,MAAM;IACtBd,EAAE,EAAEvB,SAAS,CAACqC,MAAM;IACpBb,IAAI,EAAExB,SAAS,CAACqC,MAAM;IACtBf,QAAQ,EAAEtB,SAAS,CAACsC,MAAM;IAC1BC,KAAK,EAAEvC,SAAS,CAACwC;EACnB,CAAC,CAAC,CAACC,UAAU;EACb7B,UAAU,EAAEZ,SAAS,CAACsC,MAAM,CAACG,UAAU;EACvC3B,OAAO,EAAEd,SAAS,CAACsC,MAAM,CAACG,UAAU;EACpC5B,eAAe,EAAEb,SAAS,CAAC0C,IAAI,CAACD,UAAU;EAC1C1B,gBAAgB,EAAEf,SAAS,CAACwC,KAAK;EACjCxB,mBAAmB,EAAEhB,SAAS,CAAC2C,IAAI;EACnC1B,QAAQ,EAAEjB,SAAS,CAACwC;AACtB,CAAC;AAED/B,eAAe,CAACmC,YAAY,GAAG;EAAE7B,gBAAgB,EAAE,IAAI;EAAEC,mBAAmB,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAAG,CAAC;AAEnG,eAAeR,eAAe"}
1
+ {"version":3,"file":"RenderComponent.js","names":["React","PropTypes","ErrorBoundary","getComponent","getVariant","appendGtmClassName","PB_TYPE_IMAGE","PB_TYPE_BANNER","PB_TYPE_TEXTBLOCK","PB_TYPE_CAROUSEL","BannerContextProvider","RenderComponent","_ref","component","imageProps","childComponents","options","textBlockBanners","hasTextBlockBanners","siblings","nestedComponentsProps","_objectWithoutProperties","_excluded","type","settings","id","name","Component","isImage","includes","imageOptions","updatedSettings","VariantComponent","variantSettings","createElement","_extends","key","banners","pbOptions","propTypes","shape","string","object","items","array","isRequired","node","bool","defaultProps"],"sources":["../../../src/hooks/helpers/RenderComponent.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ErrorBoundary from '@blaze-cms/core-errors-ui';\nimport getComponent from './getComponent';\nimport getVariant from './getVariant';\nimport appendGtmClassName from './append-gtm-classname';\nimport { PB_TYPE_IMAGE, PB_TYPE_BANNER, PB_TYPE_TEXTBLOCK, PB_TYPE_CAROUSEL } from './constants';\nimport { BannerContextProvider } from '../../BannerContext';\n\nconst RenderComponent = ({\n component,\n imageProps,\n childComponents,\n options = {},\n textBlockBanners,\n hasTextBlockBanners,\n siblings,\n ...nestedComponentsProps\n}) => {\n const { type, settings, id, name } = component;\n const Component = getComponent(type);\n const isImage = [PB_TYPE_IMAGE, PB_TYPE_BANNER, PB_TYPE_TEXTBLOCK, PB_TYPE_CAROUSEL].includes(\n type\n );\n const imageOptions = isImage ? imageProps : {};\n if (!Component) return null;\n const updatedSettings = appendGtmClassName(settings, childComponents);\n const [VariantComponent, variantSettings] = getVariant(settings);\n\n return (\n <ErrorBoundary>\n <Component\n key={id}\n type={type}\n VariantComponent={VariantComponent}\n {...options}\n {...imageOptions}\n {...nestedComponentsProps}\n {...updatedSettings}\n {...variantSettings}\n name={name || settings.name}>\n {hasTextBlockBanners ? (\n <BannerContextProvider siblings={siblings} banners={textBlockBanners} pbOptions={options}>\n {childComponents}\n </BannerContextProvider>\n ) : (\n childComponents\n )}\n </Component>\n </ErrorBoundary>\n );\n};\n\nRenderComponent.propTypes = {\n component: PropTypes.shape({\n type: PropTypes.string,\n id: PropTypes.string,\n name: PropTypes.string,\n settings: PropTypes.object,\n items: PropTypes.array\n }).isRequired,\n imageProps: PropTypes.object.isRequired,\n options: PropTypes.object.isRequired,\n childComponents: PropTypes.node.isRequired,\n textBlockBanners: PropTypes.array,\n hasTextBlockBanners: PropTypes.bool,\n siblings: PropTypes.array\n};\n\nRenderComponent.defaultProps = { textBlockBanners: null, hasTextBlockBanners: false, siblings: [] };\n\nexport default RenderComponent;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,aAAa,MAAM,2BAA2B;AACrD,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,kBAAkB,MAAM,wBAAwB;AACvD,SAASC,aAAa,EAAEC,cAAc,EAAEC,iBAAiB,EAAEC,gBAAgB,QAAQ,aAAa;AAChG,SAASC,qBAAqB,QAAQ,qBAAqB;AAE3D,MAAMC,eAAe,GAAGC,IAAA,IASlB;EAAA,IATmB;MACvBC,SAAS;MACTC,UAAU;MACVC,eAAe;MACfC,OAAO,GAAG,CAAC,CAAC;MACZC,gBAAgB;MAChBC,mBAAmB;MACnBC;IAEF,CAAC,GAAAP,IAAA;IADIQ,qBAAqB,GAAAC,wBAAA,CAAAT,IAAA,EAAAU,SAAA;EAExB,MAAM;IAAEC,IAAI;IAAEC,QAAQ;IAAEC,EAAE;IAAEC;EAAK,CAAC,GAAGb,SAAS;EAC9C,MAAMc,SAAS,GAAGxB,YAAY,CAACoB,IAAI,CAAC;EACpC,MAAMK,OAAO,GAAG,CAACtB,aAAa,EAAEC,cAAc,EAAEC,iBAAiB,EAAEC,gBAAgB,CAAC,CAACoB,QAAQ,CAC3FN,IACF,CAAC;EACD,MAAMO,YAAY,GAAGF,OAAO,GAAGd,UAAU,GAAG,CAAC,CAAC;EAC9C,IAAI,CAACa,SAAS,EAAE,OAAO,IAAI;EAC3B,MAAMI,eAAe,GAAG1B,kBAAkB,CAACmB,QAAQ,EAAET,eAAe,CAAC;EACrE,MAAM,CAACiB,gBAAgB,EAAEC,eAAe,CAAC,GAAG7B,UAAU,CAACoB,QAAQ,CAAC;EAEhE,oBACExB,KAAA,CAAAkC,aAAA,CAAChC,aAAa,qBACZF,KAAA,CAAAkC,aAAA,CAACP,SAAS,EAAAQ,QAAA;IACRC,GAAG,EAAEX,EAAG;IACRF,IAAI,EAAEA,IAAK;IACXS,gBAAgB,EAAEA;EAAiB,GAC/BhB,OAAO,EACPc,YAAY,EACZV,qBAAqB,EACrBW,eAAe,EACfE,eAAe;IACnBP,IAAI,EAAEA,IAAI,IAAIF,QAAQ,CAACE;EAAK,IAC3BR,mBAAmB,gBAClBlB,KAAA,CAAAkC,aAAA,CAACxB,qBAAqB;IAACS,QAAQ,EAAEA,QAAS;IAACkB,OAAO,EAAEpB,gBAAiB;IAACqB,SAAS,EAAEtB;EAAQ,GACtFD,eACoB,CAAC,GAExBA,eAEO,CACE,CAAC;AAEpB,CAAC;AAEDJ,eAAe,CAAC4B,SAAS,GAAG;EAC1B1B,SAAS,EAAEZ,SAAS,CAACuC,KAAK,CAAC;IACzBjB,IAAI,EAAEtB,SAAS,CAACwC,MAAM;IACtBhB,EAAE,EAAExB,SAAS,CAACwC,MAAM;IACpBf,IAAI,EAAEzB,SAAS,CAACwC,MAAM;IACtBjB,QAAQ,EAAEvB,SAAS,CAACyC,MAAM;IAC1BC,KAAK,EAAE1C,SAAS,CAAC2C;EACnB,CAAC,CAAC,CAACC,UAAU;EACb/B,UAAU,EAAEb,SAAS,CAACyC,MAAM,CAACG,UAAU;EACvC7B,OAAO,EAAEf,SAAS,CAACyC,MAAM,CAACG,UAAU;EACpC9B,eAAe,EAAEd,SAAS,CAAC6C,IAAI,CAACD,UAAU;EAC1C5B,gBAAgB,EAAEhB,SAAS,CAAC2C,KAAK;EACjC1B,mBAAmB,EAAEjB,SAAS,CAAC8C,IAAI;EACnC5B,QAAQ,EAAElB,SAAS,CAAC2C;AACtB,CAAC;AAEDjC,eAAe,CAACqC,YAAY,GAAG;EAAE/B,gBAAgB,EAAE,IAAI;EAAEC,mBAAmB,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAAG,CAAC;AAEnG,eAAeR,eAAe"}
@@ -0,0 +1,14 @@
1
+ import { variantHandler } from '../../utils';
2
+ export default function getVariant(settings) {
3
+ const {
4
+ variant
5
+ } = settings;
6
+ if (!variant) return [null, {}];
7
+ const {
8
+ VariantComponent,
9
+ getSettings
10
+ } = variantHandler.get(variant) || {};
11
+ const variantSettings = !!getSettings && typeof getSettings === 'function' ? getSettings(settings) : settings;
12
+ return [VariantComponent, variantSettings];
13
+ }
14
+ //# sourceMappingURL=getVariant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getVariant.js","names":["variantHandler","getVariant","settings","variant","VariantComponent","getSettings","get","variantSettings"],"sources":["../../../src/hooks/helpers/getVariant.js"],"sourcesContent":["import { variantHandler } from '../../utils';\n\nexport default function getVariant(settings) {\n const { variant } = settings;\n if (!variant) return [null, {}];\n const { VariantComponent, getSettings } = variantHandler.get(variant) || {};\n const variantSettings =\n !!getSettings && typeof getSettings === 'function' ? getSettings(settings) : settings;\n\n return [VariantComponent, variantSettings];\n}\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,aAAa;AAE5C,eAAe,SAASC,UAAUA,CAACC,QAAQ,EAAE;EAC3C,MAAM;IAAEC;EAAQ,CAAC,GAAGD,QAAQ;EAC5B,IAAI,CAACC,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;EAC/B,MAAM;IAAEC,gBAAgB;IAAEC;EAAY,CAAC,GAAGL,cAAc,CAACM,GAAG,CAACH,OAAO,CAAC,IAAI,CAAC,CAAC;EAC3E,MAAMI,eAAe,GACnB,CAAC,CAACF,WAAW,IAAI,OAAOA,WAAW,KAAK,UAAU,GAAGA,WAAW,CAACH,QAAQ,CAAC,GAAGA,QAAQ;EAEvF,OAAO,CAACE,gBAAgB,EAAEG,eAAe,CAAC;AAC5C"}
package/lib-es/index.js CHANGED
@@ -1,8 +1,9 @@
1
1
  export { default as buildPBComponents } from './hooks/helpers/buildPBComponents';
2
2
  export { default as getLightboxImages } from './hooks/helpers/get-lightbox-images';
3
3
  export { default as getComponent } from './hooks/helpers/getComponent';
4
- export { componentMap, getClassModifiers } from './utils';
4
+ export { componentMap, variantHandler, getClassModifiers } from './utils';
5
5
  export { default as components } from './components';
6
+ export { default as variants } from './variants';
6
7
  export { getAction, generateSingleItemQuery, generateMultiItemQuery, getEntitySchema, getSingleEntitySchema, getUser } from './application/query';
7
8
  export { buildPropsQuery, getUnpublishedEntityName, renderChildren, hasChildren } from './helpers';
8
9
  export { withTitle } from './HOC';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","buildPBComponents","getLightboxImages","getComponent","componentMap","getClassModifiers","components","getAction","generateSingleItemQuery","generateMultiItemQuery","getEntitySchema","getSingleEntitySchema","getUser","buildPropsQuery","getUnpublishedEntityName","renderChildren","hasChildren","withTitle","useGetEntitySchema","useGetEntitySchemasAsObj","useGetSingleEntitySchema","summaryComponents","buildPropsToDisplayWithContent"],"sources":["../src/index.js"],"sourcesContent":["export { default as buildPBComponents } from './hooks/helpers/buildPBComponents';\nexport { default as getLightboxImages } from './hooks/helpers/get-lightbox-images';\nexport { default as getComponent } from './hooks/helpers/getComponent';\nexport { componentMap, getClassModifiers } from './utils';\nexport { default as components } from './components';\nexport {\n getAction,\n generateSingleItemQuery,\n generateMultiItemQuery,\n getEntitySchema,\n getSingleEntitySchema,\n getUser\n} from './application/query';\nexport { buildPropsQuery, getUnpublishedEntityName, renderChildren, hasChildren } from './helpers';\nexport { withTitle } from './HOC';\nexport { useGetEntitySchema, useGetEntitySchemasAsObj, useGetSingleEntitySchema } from './hooks';\nexport { summaryComponents } from './components/DataSummary/DataSummaryTypes';\nexport { buildPropsToDisplayWithContent } from './components/DataSummary/helpers';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,iBAAiB,QAAQ,mCAAmC;AAChF,SAASD,OAAO,IAAIE,iBAAiB,QAAQ,qCAAqC;AAClF,SAASF,OAAO,IAAIG,YAAY,QAAQ,8BAA8B;AACtE,SAASC,YAAY,EAAEC,iBAAiB,QAAQ,SAAS;AACzD,SAASL,OAAO,IAAIM,UAAU,QAAQ,cAAc;AACpD,SACEC,SAAS,EACTC,uBAAuB,EACvBC,sBAAsB,EACtBC,eAAe,EACfC,qBAAqB,EACrBC,OAAO,QACF,qBAAqB;AAC5B,SAASC,eAAe,EAAEC,wBAAwB,EAAEC,cAAc,EAAEC,WAAW,QAAQ,WAAW;AAClG,SAASC,SAAS,QAAQ,OAAO;AACjC,SAASC,kBAAkB,EAAEC,wBAAwB,EAAEC,wBAAwB,QAAQ,SAAS;AAChG,SAASC,iBAAiB,QAAQ,2CAA2C;AAC7E,SAASC,8BAA8B,QAAQ,kCAAkC"}
1
+ {"version":3,"file":"index.js","names":["default","buildPBComponents","getLightboxImages","getComponent","componentMap","variantHandler","getClassModifiers","components","variants","getAction","generateSingleItemQuery","generateMultiItemQuery","getEntitySchema","getSingleEntitySchema","getUser","buildPropsQuery","getUnpublishedEntityName","renderChildren","hasChildren","withTitle","useGetEntitySchema","useGetEntitySchemasAsObj","useGetSingleEntitySchema","summaryComponents","buildPropsToDisplayWithContent"],"sources":["../src/index.js"],"sourcesContent":["export { default as buildPBComponents } from './hooks/helpers/buildPBComponents';\nexport { default as getLightboxImages } from './hooks/helpers/get-lightbox-images';\nexport { default as getComponent } from './hooks/helpers/getComponent';\nexport { componentMap, variantHandler, getClassModifiers } from './utils';\nexport { default as components } from './components';\nexport { default as variants } from './variants';\nexport {\n getAction,\n generateSingleItemQuery,\n generateMultiItemQuery,\n getEntitySchema,\n getSingleEntitySchema,\n getUser\n} from './application/query';\nexport { buildPropsQuery, getUnpublishedEntityName, renderChildren, hasChildren } from './helpers';\nexport { withTitle } from './HOC';\nexport { useGetEntitySchema, useGetEntitySchemasAsObj, useGetSingleEntitySchema } from './hooks';\nexport { summaryComponents } from './components/DataSummary/DataSummaryTypes';\nexport { buildPropsToDisplayWithContent } from './components/DataSummary/helpers';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,iBAAiB,QAAQ,mCAAmC;AAChF,SAASD,OAAO,IAAIE,iBAAiB,QAAQ,qCAAqC;AAClF,SAASF,OAAO,IAAIG,YAAY,QAAQ,8BAA8B;AACtE,SAASC,YAAY,EAAEC,cAAc,EAAEC,iBAAiB,QAAQ,SAAS;AACzE,SAASN,OAAO,IAAIO,UAAU,QAAQ,cAAc;AACpD,SAASP,OAAO,IAAIQ,QAAQ,QAAQ,YAAY;AAChD,SACEC,SAAS,EACTC,uBAAuB,EACvBC,sBAAsB,EACtBC,eAAe,EACfC,qBAAqB,EACrBC,OAAO,QACF,qBAAqB;AAC5B,SAASC,eAAe,EAAEC,wBAAwB,EAAEC,cAAc,EAAEC,WAAW,QAAQ,WAAW;AAClG,SAASC,SAAS,QAAQ,OAAO;AACjC,SAASC,kBAAkB,EAAEC,wBAAwB,EAAEC,wBAAwB,QAAQ,SAAS;AAChG,SAASC,iBAAiB,QAAQ,2CAA2C;AAC7E,SAASC,8BAA8B,QAAQ,kCAAkC"}
@@ -1,5 +1,5 @@
1
1
  import { BlazeError } from '@blaze-cms/core-errors';
2
- function componentMap() {
2
+ function componentMapHandler() {
3
3
  const components = new Map();
4
4
  function get(key) {
5
5
  return components.get(key);
@@ -16,7 +16,7 @@ function componentMap() {
16
16
  }
17
17
  function validate(key, component) {
18
18
  if (!key || !component) throw new BlazeError('Component requires key and component');
19
- if (components.has(key) && key !== 'array') throw new BlazeError(`Component already exist`);
19
+ if (components.has(key) && key !== 'array') throw new BlazeError(`Component already exists`);
20
20
  }
21
21
  return {
22
22
  id: Math.random(),
@@ -25,6 +25,6 @@ function componentMap() {
25
25
  getAll
26
26
  };
27
27
  }
28
- const test = componentMap();
29
- export default test;
28
+ const componentMap = componentMapHandler();
29
+ export default componentMap;
30
30
  //# sourceMappingURL=component-map.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component-map.js","names":["BlazeError","componentMap","components","Map","get","key","getAll","Array","from","entries","add","component","validate","set","has","id","Math","random","test"],"sources":["../../src/utils/component-map.js"],"sourcesContent":["import { BlazeError } from '@blaze-cms/core-errors';\n\nfunction componentMap() {\n const components = new Map();\n\n function get(key) {\n return components.get(key);\n }\n\n function getAll() {\n return Array.from(components.entries());\n }\n\n function add({ key, component }) {\n validate(key, component);\n components.set(key, component);\n }\n\n function validate(key, component) {\n if (!key || !component) throw new BlazeError('Component requires key and component');\n if (components.has(key) && key !== 'array') throw new BlazeError(`Component already exist`);\n }\n\n return {\n id: Math.random(),\n add,\n get,\n getAll\n };\n}\n\nconst test = componentMap();\n\nexport default test;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,wBAAwB;AAEnD,SAASC,YAAYA,CAAA,EAAG;EACtB,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAAC,CAAC;EAE5B,SAASC,GAAGA,CAACC,GAAG,EAAE;IAChB,OAAOH,UAAU,CAACE,GAAG,CAACC,GAAG,CAAC;EAC5B;EAEA,SAASC,MAAMA,CAAA,EAAG;IAChB,OAAOC,KAAK,CAACC,IAAI,CAACN,UAAU,CAACO,OAAO,CAAC,CAAC,CAAC;EACzC;EAEA,SAASC,GAAGA,CAAC;IAAEL,GAAG;IAAEM;EAAU,CAAC,EAAE;IAC/BC,QAAQ,CAACP,GAAG,EAAEM,SAAS,CAAC;IACxBT,UAAU,CAACW,GAAG,CAACR,GAAG,EAAEM,SAAS,CAAC;EAChC;EAEA,SAASC,QAAQA,CAACP,GAAG,EAAEM,SAAS,EAAE;IAChC,IAAI,CAACN,GAAG,IAAI,CAACM,SAAS,EAAE,MAAM,IAAIX,UAAU,CAAC,sCAAsC,CAAC;IACpF,IAAIE,UAAU,CAACY,GAAG,CAACT,GAAG,CAAC,IAAIA,GAAG,KAAK,OAAO,EAAE,MAAM,IAAIL,UAAU,CAAE,yBAAwB,CAAC;EAC7F;EAEA,OAAO;IACLe,EAAE,EAAEC,IAAI,CAACC,MAAM,CAAC,CAAC;IACjBP,GAAG;IACHN,GAAG;IACHE;EACF,CAAC;AACH;AAEA,MAAMY,IAAI,GAAGjB,YAAY,CAAC,CAAC;AAE3B,eAAeiB,IAAI"}
1
+ {"version":3,"file":"component-map.js","names":["BlazeError","componentMapHandler","components","Map","get","key","getAll","Array","from","entries","add","component","validate","set","has","id","Math","random","componentMap"],"sources":["../../src/utils/component-map.js"],"sourcesContent":["import { BlazeError } from '@blaze-cms/core-errors';\n\nfunction componentMapHandler() {\n const components = new Map();\n function get(key) {\n return components.get(key);\n }\n\n function getAll() {\n return Array.from(components.entries());\n }\n\n function add({ key, component }) {\n validate(key, component);\n components.set(key, component);\n }\n\n function validate(key, component) {\n if (!key || !component) throw new BlazeError('Component requires key and component');\n if (components.has(key) && key !== 'array') throw new BlazeError(`Component already exists`);\n }\n\n return {\n id: Math.random(),\n add,\n get,\n getAll\n };\n}\n\nconst componentMap = componentMapHandler();\n\nexport default componentMap;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,wBAAwB;AAEnD,SAASC,mBAAmBA,CAAA,EAAG;EAC7B,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAAC,CAAC;EAC5B,SAASC,GAAGA,CAACC,GAAG,EAAE;IAChB,OAAOH,UAAU,CAACE,GAAG,CAACC,GAAG,CAAC;EAC5B;EAEA,SAASC,MAAMA,CAAA,EAAG;IAChB,OAAOC,KAAK,CAACC,IAAI,CAACN,UAAU,CAACO,OAAO,CAAC,CAAC,CAAC;EACzC;EAEA,SAASC,GAAGA,CAAC;IAAEL,GAAG;IAAEM;EAAU,CAAC,EAAE;IAC/BC,QAAQ,CAACP,GAAG,EAAEM,SAAS,CAAC;IACxBT,UAAU,CAACW,GAAG,CAACR,GAAG,EAAEM,SAAS,CAAC;EAChC;EAEA,SAASC,QAAQA,CAACP,GAAG,EAAEM,SAAS,EAAE;IAChC,IAAI,CAACN,GAAG,IAAI,CAACM,SAAS,EAAE,MAAM,IAAIX,UAAU,CAAC,sCAAsC,CAAC;IACpF,IAAIE,UAAU,CAACY,GAAG,CAACT,GAAG,CAAC,IAAIA,GAAG,KAAK,OAAO,EAAE,MAAM,IAAIL,UAAU,CAAE,0BAAyB,CAAC;EAC9F;EAEA,OAAO;IACLe,EAAE,EAAEC,IAAI,CAACC,MAAM,CAAC,CAAC;IACjBP,GAAG;IACHN,GAAG;IACHE;EACF,CAAC;AACH;AAEA,MAAMY,YAAY,GAAGjB,mBAAmB,CAAC,CAAC;AAE1C,eAAeiB,YAAY"}
@@ -1,7 +1,8 @@
1
1
  import getClassModifiers from './get-class-modifiers';
2
2
  import componentMap from './component-map';
3
+ import variantHandler from './variant-handler';
3
4
  import isObjectEmpty from './is-object-empty';
4
5
  import getImageData from './get-image-data';
5
6
  import getPropsToDisplayModifiers from './get-props-to-display-modifiers';
6
- export { getClassModifiers, componentMap, isObjectEmpty, getImageData, getPropsToDisplayModifiers };
7
+ export { componentMap, variantHandler, getClassModifiers, isObjectEmpty, getImageData, getPropsToDisplayModifiers };
7
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["getClassModifiers","componentMap","isObjectEmpty","getImageData","getPropsToDisplayModifiers"],"sources":["../../src/utils/index.js"],"sourcesContent":["import getClassModifiers from './get-class-modifiers';\nimport componentMap from './component-map';\nimport isObjectEmpty from './is-object-empty';\nimport getImageData from './get-image-data';\nimport getPropsToDisplayModifiers from './get-props-to-display-modifiers';\n\nexport { getClassModifiers, componentMap, isObjectEmpty, getImageData, getPropsToDisplayModifiers };\n"],"mappings":"AAAA,OAAOA,iBAAiB,MAAM,uBAAuB;AACrD,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,0BAA0B,MAAM,kCAAkC;AAEzE,SAASJ,iBAAiB,EAAEC,YAAY,EAAEC,aAAa,EAAEC,YAAY,EAAEC,0BAA0B"}
1
+ {"version":3,"file":"index.js","names":["getClassModifiers","componentMap","variantHandler","isObjectEmpty","getImageData","getPropsToDisplayModifiers"],"sources":["../../src/utils/index.js"],"sourcesContent":["import getClassModifiers from './get-class-modifiers';\nimport componentMap from './component-map';\nimport variantHandler from './variant-handler';\nimport isObjectEmpty from './is-object-empty';\nimport getImageData from './get-image-data';\nimport getPropsToDisplayModifiers from './get-props-to-display-modifiers';\n\nexport {\n componentMap,\n variantHandler,\n getClassModifiers,\n isObjectEmpty,\n getImageData,\n getPropsToDisplayModifiers\n};\n"],"mappings":"AAAA,OAAOA,iBAAiB,MAAM,uBAAuB;AACrD,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,cAAc,MAAM,mBAAmB;AAC9C,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,0BAA0B,MAAM,kCAAkC;AAEzE,SACEJ,YAAY,EACZC,cAAc,EACdF,iBAAiB,EACjBG,aAAa,EACbC,YAAY,EACZC,0BAA0B"}
@@ -0,0 +1,26 @@
1
+ import { BlazeError } from '@blaze-cms/core-errors';
2
+ function variantMapHandler() {
3
+ const variants = new Map();
4
+ function get(key) {
5
+ return variants.get(key);
6
+ }
7
+ function getAll() {
8
+ return Array.from(variants.entries());
9
+ }
10
+ function add(key, variant) {
11
+ validate(key, variant);
12
+ variants.set(key, variant);
13
+ }
14
+ function validate(key, variant) {
15
+ if (!key || !variant) throw new BlazeError('Variant requires key and component');
16
+ if (variants.has(key) && key !== 'array') throw new BlazeError(`Variant already exists`);
17
+ }
18
+ return {
19
+ add,
20
+ get,
21
+ getAll
22
+ };
23
+ }
24
+ const variantHandler = variantMapHandler();
25
+ export default variantHandler;
26
+ //# sourceMappingURL=variant-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variant-handler.js","names":["BlazeError","variantMapHandler","variants","Map","get","key","getAll","Array","from","entries","add","variant","validate","set","has","variantHandler"],"sources":["../../src/utils/variant-handler.js"],"sourcesContent":["import { BlazeError } from '@blaze-cms/core-errors';\n\nfunction variantMapHandler() {\n const variants = new Map();\n\n function get(key) {\n return variants.get(key);\n }\n\n function getAll() {\n return Array.from(variants.entries());\n }\n\n function add(key, variant) {\n validate(key, variant);\n variants.set(key, variant);\n }\n\n function validate(key, variant) {\n if (!key || !variant) throw new BlazeError('Variant requires key and component');\n if (variants.has(key) && key !== 'array') throw new BlazeError(`Variant already exists`);\n }\n\n return {\n add,\n get,\n getAll\n };\n}\n\nconst variantHandler = variantMapHandler();\n\nexport default variantHandler;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,wBAAwB;AAEnD,SAASC,iBAAiBA,CAAA,EAAG;EAC3B,MAAMC,QAAQ,GAAG,IAAIC,GAAG,CAAC,CAAC;EAE1B,SAASC,GAAGA,CAACC,GAAG,EAAE;IAChB,OAAOH,QAAQ,CAACE,GAAG,CAACC,GAAG,CAAC;EAC1B;EAEA,SAASC,MAAMA,CAAA,EAAG;IAChB,OAAOC,KAAK,CAACC,IAAI,CAACN,QAAQ,CAACO,OAAO,CAAC,CAAC,CAAC;EACvC;EAEA,SAASC,GAAGA,CAACL,GAAG,EAAEM,OAAO,EAAE;IACzBC,QAAQ,CAACP,GAAG,EAAEM,OAAO,CAAC;IACtBT,QAAQ,CAACW,GAAG,CAACR,GAAG,EAAEM,OAAO,CAAC;EAC5B;EAEA,SAASC,QAAQA,CAACP,GAAG,EAAEM,OAAO,EAAE;IAC9B,IAAI,CAACN,GAAG,IAAI,CAACM,OAAO,EAAE,MAAM,IAAIX,UAAU,CAAC,oCAAoC,CAAC;IAChF,IAAIE,QAAQ,CAACY,GAAG,CAACT,GAAG,CAAC,IAAIA,GAAG,KAAK,OAAO,EAAE,MAAM,IAAIL,UAAU,CAAE,wBAAuB,CAAC;EAC1F;EAEA,OAAO;IACLU,GAAG;IACHN,GAAG;IACHE;EACF,CAAC;AACH;AAEA,MAAMS,cAAc,GAAGd,iBAAiB,CAAC,CAAC;AAE1C,eAAec,cAAc"}
@@ -0,0 +1,2 @@
1
+ export default {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/variants/index.js"],"sourcesContent":["export default {};\n"],"mappings":"AAAA,eAAe,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaze-cms/react-page-builder",
3
- "version": "0.139.0-alpha.3",
3
+ "version": "0.139.0-alpha.4",
4
4
  "description": "Blaze react page builder",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-es/index.js",
@@ -27,12 +27,12 @@
27
27
  },
28
28
  "license": "GPL-3.0",
29
29
  "dependencies": {
30
- "@blaze-cms/core-auth-ui": "0.139.0-alpha.3",
30
+ "@blaze-cms/core-auth-ui": "0.139.0-alpha.4",
31
31
  "@blaze-cms/core-errors": "^0.131.0",
32
32
  "@blaze-cms/core-errors-ui": "^0.131.0",
33
33
  "@blaze-cms/image-cdn-react": "0.3.0-alpha.6",
34
34
  "@blaze-cms/nextjs-components": "^0.134.0",
35
- "@blaze-cms/plugin-search-ui": "^0.136.0",
35
+ "@blaze-cms/plugin-search-ui": "0.139.0-alpha.4",
36
36
  "@blaze-cms/setup-ui": "^0.131.0",
37
37
  "@blaze-cms/utils": "^0.131.0",
38
38
  "@blaze-cms/utils-handlebars": "^0.134.0",
@@ -89,5 +89,5 @@
89
89
  "lib/*",
90
90
  "lib-es/*"
91
91
  ],
92
- "gitHead": "00aa8ba6ed9d34f0b2651f8afd810ae8ec136a3c"
92
+ "gitHead": "718fa23556026a90878b25d1ba751052dfdb5494"
93
93
  }
@@ -41,13 +41,13 @@ const Card = ({
41
41
  titleOverlayModifier,
42
42
  overlayModifier,
43
43
  gridModifier,
44
- parent,
45
44
  pageBuilderComponents,
46
45
  __typename: dataEntity,
47
46
  ...otherProps
48
47
  }) => {
49
48
  const entity = graphqlEntityMap[dataEntity];
50
49
  updateChildrensParent(cardChildren, id, entity);
50
+ const parent = { itemId: id, itemEntity: entity };
51
51
  const router = useRouter();
52
52
  const { imageSrc, shouldDisplayThumbnail, altText } = getImageDefinedProps({
53
53
  image,
@@ -181,7 +181,6 @@ const Card = ({
181
181
  };
182
182
 
183
183
  Card.propTypes = {
184
- parent: PropTypes.object.isRequired,
185
184
  id: PropTypes.string.isRequired,
186
185
  image: PropTypes.shape({
187
186
  url: PropTypes.string,
@@ -36,7 +36,6 @@ const CardContainer = ({
36
36
  autoScrollTimer,
37
37
  overlayModifier,
38
38
  titleOverlayModifier,
39
- parent,
40
39
  ...cardProps
41
40
  }) => {
42
41
  const { itemId } = useContext(MainContext);
@@ -70,7 +69,6 @@ const CardContainer = ({
70
69
  if (hasNewBannerSettings && shouldRenderBanner) bannerIndex += 1;
71
70
  if (!hasNewBannerSettings && baseAdunit) bannerIndex += 1;
72
71
  const parsedCardProps = {
73
- parent,
74
72
  key: id,
75
73
  id,
76
74
  enableCarousel,
@@ -133,7 +131,6 @@ const CardContainer = ({
133
131
 
134
132
  CardContainer.propTypes = {
135
133
  pageBuilderComponents: PropTypes.array,
136
- parent: PropTypes.object.isRequired,
137
134
  cardData: PropTypes.array.isRequired,
138
135
  graphqlEntityMap: PropTypes.object.isRequired,
139
136
  name: PropTypes.string,
@@ -203,7 +203,6 @@ const CardsRender = ({
203
203
  gtmChildren={gtmChildren}
204
204
  cardChildren={regularChildren}
205
205
  graphqlEntityMap={graphqlEntityMap}
206
- parent={otherProps.parent}
207
206
  {...variableProps}
208
207
  />
209
208
  </>
@@ -1,32 +1,48 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
+ import CarouselImage from './CarouselImage';
3
4
  import CarouselRender from './CarouselRender';
5
+ import { useCarouselNavigation } from './hooks/useCarouselNavigation';
6
+ import { getDisplayCountData } from '../../helpers';
7
+
8
+ const Carousel = props => {
9
+ const { caption, imageIds, isCaptionDisplayed, VariantComponent, ...otherProps } = props;
10
+
11
+ const navigationProps = useCarouselNavigation(props);
4
12
 
5
- const Carousel = ({ caption, imageIds, isCaptionDisplayed, ...otherProps }) => {
6
13
  if (!imageIds || !imageIds.length) return null;
7
14
  const shouldDisplayCaption = isCaptionDisplayed && caption;
8
15
 
16
+ const { shouldDisplayCount, countMessage } = getDisplayCountData(
17
+ navigationProps.showCount,
18
+ imageIds
19
+ );
20
+
21
+ const ComponentToRender = VariantComponent || CarouselRender;
22
+
9
23
  return (
10
- <div className="carousel">
11
- <div>
12
- <CarouselRender imageIds={imageIds} {...otherProps} />
13
- </div>
14
- {shouldDisplayCaption && (
15
- <div className="carousel__details" data-testid="carousel-details">
16
- <div className="caption">{caption}</div>
17
- </div>
18
- )}
19
- </div>
24
+ <ComponentToRender
25
+ caption={caption}
26
+ imageIds={imageIds}
27
+ CarouselImage={CarouselImage}
28
+ shouldDisplayCaption={shouldDisplayCaption}
29
+ shouldDisplayCount={shouldDisplayCount}
30
+ countMessage={countMessage}
31
+ {...navigationProps}
32
+ {...otherProps}
33
+ />
20
34
  );
21
35
  };
22
36
 
23
37
  Carousel.propTypes = {
24
38
  caption: PropTypes.string,
25
39
  imageIds: PropTypes.array,
26
- isCaptionDisplayed: PropTypes.bool
40
+ isCaptionDisplayed: PropTypes.bool,
41
+ VariantComponent: PropTypes.func
27
42
  };
28
43
 
29
44
  Carousel.defaultProps = {
45
+ VariantComponent: null,
30
46
  caption: '',
31
47
  imageIds: [],
32
48
  isCaptionDisplayed: false
@@ -1,61 +1,26 @@
1
- import React, { useRef, useState } from 'react';
1
+ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import CarouselImage from '../CarouselImage';
4
4
  import { withTitle } from '../../../HOC';
5
- import { getDisplayCountData } from '../../../helpers';
6
5
 
7
- const CarouselRender = ({ imageIds, displayCount, priorityLimit, ...otherProps }) => {
8
- const [showCount, setShowCount] = useState(displayCount);
9
- const listRef = useRef(null);
10
-
11
- const getListElement = () => {
12
- if (!listRef) return null;
13
- const { current } = listRef;
14
- return current;
15
- };
16
-
17
- const moveScroll = (numberOfPixels, isNext) => {
18
- const listElement = getListElement();
19
- if (!listElement) return;
20
-
21
- const totalDistance = listElement.scrollLeft + numberOfPixels;
22
- const { scrollLeft, offsetWidth, scrollWidth } = listElement;
23
- if (isNext && offsetWidth + scrollLeft >= scrollWidth) return;
24
-
25
- const leftPosition = totalDistance < 0 ? 0 : Math.max(-scrollLeft, totalDistance);
26
-
27
- listElement.scrollTo({
28
- top: 0,
29
- left: leftPosition,
30
- behavior: 'smooth'
31
- });
32
- };
33
-
34
- const handleNavigation = direction => {
35
- setShowCount(false);
36
-
37
- const listElement = getListElement();
38
- if (!listElement) return;
39
-
40
- const { scrollWidth } = listElement;
41
- const offset = scrollWidth / imageIds.length;
42
-
43
- direction ? moveScroll(offset, direction) : moveScroll(-offset, direction);
44
- };
45
-
46
- const navigation = {
47
- next: true,
48
- back: false
49
- };
50
-
51
- const { shouldDisplayCount, countMessage } = getDisplayCountData(showCount, imageIds);
52
-
53
- return (
54
- <>
6
+ const CarouselRender = ({
7
+ handleNavigation,
8
+ imageIds,
9
+ listRef,
10
+ shouldDisplayCount,
11
+ shouldDisplayCaption,
12
+ caption,
13
+ countMessage,
14
+ direction,
15
+ priorityLimit,
16
+ ...otherProps
17
+ }) => (
18
+ <div className="carousel">
19
+ <div>
55
20
  <div
56
21
  className="carousel__button carousel__button--previous"
57
22
  role="button"
58
- onClick={() => handleNavigation(navigation.back)}>
23
+ onClick={() => handleNavigation(direction.back)}>
59
24
  <div className="arrow arrow--left" />
60
25
  </div>
61
26
  <div className="carousel__list" ref={listRef}>
@@ -71,23 +36,38 @@ const CarouselRender = ({ imageIds, displayCount, priorityLimit, ...otherProps }
71
36
  <div
72
37
  className="carousel__button carousel__button--next"
73
38
  role="button"
74
- onClick={() => handleNavigation(navigation.next)}>
75
- {shouldDisplayCount && <p>{countMessage}</p>}
39
+ onClick={() => handleNavigation(direction.next)}>
40
+ {shouldDisplayCount && <p data-testid="count">{countMessage}</p>}
76
41
  <div className="arrow arrow--right" />
77
42
  </div>
78
- </>
79
- );
80
- };
43
+ </div>
44
+ {shouldDisplayCaption && (
45
+ <div className="carousel__details" data-testid="carousel-details">
46
+ <div className="caption">{caption}</div>
47
+ </div>
48
+ )}
49
+ </div>
50
+ );
81
51
 
82
52
  CarouselRender.propTypes = {
53
+ caption: PropTypes.string,
54
+ shouldDisplayCaption: PropTypes.bool.isRequired,
83
55
  imageIds: PropTypes.array,
84
56
  displayCount: PropTypes.bool,
57
+ listRef: PropTypes.object,
58
+ countMessage: PropTypes.number,
59
+ direction: PropTypes.object.isRequired,
60
+ handleNavigation: PropTypes.func.isRequired,
61
+ shouldDisplayCount: PropTypes.bool.isRequired,
85
62
  priorityLimit: PropTypes.number
86
63
  };
87
64
 
88
65
  CarouselRender.defaultProps = {
66
+ listRef: null,
89
67
  imageIds: [],
68
+ caption: '',
90
69
  displayCount: false,
70
+ countMessage: null,
91
71
  priorityLimit: 0
92
72
  };
93
73
 
@@ -0,0 +1,50 @@
1
+ import { useState, useRef } from 'react';
2
+
3
+ export function useCarouselNavigation({ imageIds, displayCount }) {
4
+ const [showCount, setShowCount] = useState(displayCount);
5
+ const listRef = useRef(null);
6
+
7
+ const getListElement = () => {
8
+ if (!listRef.current) return null;
9
+ return listRef.current;
10
+ };
11
+
12
+ const moveScroll = (numberOfPixels, isNext) => {
13
+ const listElement = getListElement();
14
+ if (!listElement) return;
15
+
16
+ const totalDistance = listElement.scrollLeft + numberOfPixels;
17
+ const { scrollLeft, offsetWidth, scrollWidth } = listElement;
18
+ if (isNext && offsetWidth + scrollLeft >= scrollWidth) return;
19
+
20
+ const leftPosition = totalDistance < 0 ? 0 : Math.max(-scrollLeft, totalDistance);
21
+
22
+ listElement.scrollTo({
23
+ top: 0,
24
+ left: leftPosition,
25
+ behavior: 'smooth'
26
+ });
27
+ };
28
+
29
+ const handleNavigation = direction => {
30
+ setShowCount(false);
31
+
32
+ const listElement = getListElement();
33
+ if (!listElement) return;
34
+
35
+ const { scrollWidth } = listElement;
36
+ const offset = scrollWidth / imageIds.length;
37
+
38
+ direction ? moveScroll(offset, direction) : moveScroll(-offset, direction);
39
+ };
40
+
41
+ return {
42
+ listRef,
43
+ showCount,
44
+ handleNavigation,
45
+ direction: {
46
+ next: true,
47
+ back: false
48
+ }
49
+ };
50
+ }
@@ -18,6 +18,7 @@ const Layout = React.forwardRef(
18
18
  tagType,
19
19
  dataNoSnippet,
20
20
  sticky,
21
+ VariantComponent,
21
22
  ...otherProps
22
23
  },
23
24
  ref
@@ -25,10 +26,8 @@ const Layout = React.forwardRef(
25
26
  const {
26
27
  data: { getFile: { url = null } = {} }
27
28
  } = useGetImages(backgroundImage);
28
-
29
29
  const style = getStylesToUpdate({ backgroundImage: url });
30
30
  const { title } = settings;
31
-
32
31
  const classModifiers = getClassModifiers(type, { modifier, sticky, ...otherProps });
33
32
  const additionalRowModifier = checkIfRowHasColumns(type, children) ? ' display-row' : '';
34
33
 
@@ -37,8 +36,10 @@ const Layout = React.forwardRef(
37
36
  const otherWrapperProps = {};
38
37
  if (dataNoSnippet) otherWrapperProps['data-nosnippet'] = true;
39
38
 
39
+ const WrapperComponent = VariantComponent || Wrapper;
40
+
40
41
  return (
41
- <Wrapper
42
+ <WrapperComponent
42
43
  ref={ref}
43
44
  tagType={tagType}
44
45
  className={type}
@@ -47,7 +48,7 @@ const Layout = React.forwardRef(
47
48
  {...otherWrapperProps}>
48
49
  {title && <h2 className="heading heading--section">{title}</h2>}
49
50
  {renderChildren(children, otherProps)}
50
- </Wrapper>
51
+ </WrapperComponent>
51
52
  );
52
53
  }
53
54
  );
@@ -62,6 +63,7 @@ Layout.propTypes = {
62
63
  backgroundImage: PropTypes.string,
63
64
  tagType: PropTypes.string,
64
65
  dataNoSnippet: PropTypes.bool,
66
+ VariantComponent: PropTypes.func,
65
67
  children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired
66
68
  };
67
69
 
@@ -73,7 +75,8 @@ Layout.defaultProps = {
73
75
  modifier: '',
74
76
  tagType: '',
75
77
  dataNoSnippet: false,
76
- sticky: false
78
+ sticky: false,
79
+ VariantComponent: null
77
80
  };
78
81
 
79
82
  export default Layout;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import ErrorBoundary from '@blaze-cms/core-errors-ui';
4
4
  import getComponent from './getComponent';
5
+ import getVariant from './getVariant';
5
6
  import appendGtmClassName from './append-gtm-classname';
6
7
  import { PB_TYPE_IMAGE, PB_TYPE_BANNER, PB_TYPE_TEXTBLOCK, PB_TYPE_CAROUSEL } from './constants';
7
8
  import { BannerContextProvider } from '../../BannerContext';
@@ -24,16 +25,19 @@ const RenderComponent = ({
24
25
  const imageOptions = isImage ? imageProps : {};
25
26
  if (!Component) return null;
26
27
  const updatedSettings = appendGtmClassName(settings, childComponents);
28
+ const [VariantComponent, variantSettings] = getVariant(settings);
27
29
 
28
30
  return (
29
31
  <ErrorBoundary>
30
32
  <Component
31
33
  key={id}
32
34
  type={type}
35
+ VariantComponent={VariantComponent}
33
36
  {...options}
34
37
  {...imageOptions}
35
38
  {...nestedComponentsProps}
36
39
  {...updatedSettings}
40
+ {...variantSettings}
37
41
  name={name || settings.name}>
38
42
  {hasTextBlockBanners ? (
39
43
  <BannerContextProvider siblings={siblings} banners={textBlockBanners} pbOptions={options}>
@@ -0,0 +1,11 @@
1
+ import { variantHandler } from '../../utils';
2
+
3
+ export default function getVariant(settings) {
4
+ const { variant } = settings;
5
+ if (!variant) return [null, {}];
6
+ const { VariantComponent, getSettings } = variantHandler.get(variant) || {};
7
+ const variantSettings =
8
+ !!getSettings && typeof getSettings === 'function' ? getSettings(settings) : settings;
9
+
10
+ return [VariantComponent, variantSettings];
11
+ }
package/src/index.js CHANGED
@@ -1,8 +1,9 @@
1
1
  export { default as buildPBComponents } from './hooks/helpers/buildPBComponents';
2
2
  export { default as getLightboxImages } from './hooks/helpers/get-lightbox-images';
3
3
  export { default as getComponent } from './hooks/helpers/getComponent';
4
- export { componentMap, getClassModifiers } from './utils';
4
+ export { componentMap, variantHandler, getClassModifiers } from './utils';
5
5
  export { default as components } from './components';
6
+ export { default as variants } from './variants';
6
7
  export {
7
8
  getAction,
8
9
  generateSingleItemQuery,
@@ -1,8 +1,7 @@
1
1
  import { BlazeError } from '@blaze-cms/core-errors';
2
2
 
3
- function componentMap() {
3
+ function componentMapHandler() {
4
4
  const components = new Map();
5
-
6
5
  function get(key) {
7
6
  return components.get(key);
8
7
  }
@@ -18,7 +17,7 @@ function componentMap() {
18
17
 
19
18
  function validate(key, component) {
20
19
  if (!key || !component) throw new BlazeError('Component requires key and component');
21
- if (components.has(key) && key !== 'array') throw new BlazeError(`Component already exist`);
20
+ if (components.has(key) && key !== 'array') throw new BlazeError(`Component already exists`);
22
21
  }
23
22
 
24
23
  return {
@@ -29,6 +28,6 @@ function componentMap() {
29
28
  };
30
29
  }
31
30
 
32
- const test = componentMap();
31
+ const componentMap = componentMapHandler();
33
32
 
34
- export default test;
33
+ export default componentMap;