@blaze-cms/react-page-builder 0.146.0-node18-core-styles-tooltips.45 → 0.146.0-node18-tooltips.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -105
- package/lib/components/Menu/Menu.js +1 -4
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/Menu/MenuContext.js +1 -2
- package/lib/components/Menu/MenuContext.js.map +1 -1
- package/lib/components/MenuItem/MenuItemRender.js +12 -27
- package/lib/components/MenuItem/MenuItemRender.js.map +1 -1
- package/lib/components/MenuItem/helpers/index.js +0 -14
- package/lib/components/MenuItem/helpers/index.js.map +1 -1
- package/lib-es/BannerContext/helpers/index.js +3 -0
- package/lib-es/BannerContext/helpers/index.js.map +1 -0
- package/lib-es/BannerContext/helpers/set-initial-banner-counters.js +17 -0
- package/lib-es/BannerContext/helpers/set-initial-banner-counters.js.map +1 -0
- package/lib-es/BannerContext/index.js +29 -0
- package/lib-es/BannerContext/index.js.map +1 -0
- package/lib-es/HOC/index.js +3 -0
- package/lib-es/HOC/index.js.map +1 -0
- package/lib-es/HOC/recreateOnNavigation.js +20 -0
- package/lib-es/HOC/recreateOnNavigation.js.map +1 -0
- package/lib-es/HOC/withInfiniteScroll.js +62 -0
- package/lib-es/HOC/withInfiniteScroll.js.map +1 -0
- package/lib-es/HOC/withTitle.js +36 -0
- package/lib-es/HOC/withTitle.js.map +1 -0
- package/lib-es/PBContext/index.js +6 -0
- package/lib-es/PBContext/index.js.map +1 -0
- package/lib-es/application/query/index.js +178 -0
- package/lib-es/application/query/index.js.map +1 -0
- package/lib-es/components/BackToTop/BackToTop.js +38 -0
- package/lib-es/components/BackToTop/BackToTop.js.map +1 -0
- package/lib-es/components/BackToTop/index.js +3 -0
- package/lib-es/components/BackToTop/index.js.map +1 -0
- package/lib-es/components/Banner/AdSlotRender.js +73 -0
- package/lib-es/components/Banner/AdSlotRender.js.map +1 -0
- package/lib-es/components/Banner/Banner.js +94 -0
- package/lib-es/components/Banner/Banner.js.map +1 -0
- package/lib-es/components/Banner/BannerRender.js +125 -0
- package/lib-es/components/Banner/BannerRender.js.map +1 -0
- package/lib-es/components/Banner/helpers.js +155 -0
- package/lib-es/components/Banner/helpers.js.map +1 -0
- package/lib-es/components/Banner/index.js +3 -0
- package/lib-es/components/Banner/index.js.map +1 -0
- package/lib-es/components/BlazeLink.js +68 -0
- package/lib-es/components/BlazeLink.js.map +1 -0
- package/lib-es/components/Breadcrumb/Breadcrumb.js +88 -0
- package/lib-es/components/Breadcrumb/Breadcrumb.js.map +1 -0
- package/lib-es/components/Breadcrumb/index.js +3 -0
- package/lib-es/components/Breadcrumb/index.js.map +1 -0
- package/lib-es/components/Button.js +134 -0
- package/lib-es/components/Button.js.map +1 -0
- package/lib-es/components/Card/Card.js +290 -0
- package/lib-es/components/Card/Card.js.map +1 -0
- package/lib-es/components/Card/CardsContainer.js +186 -0
- package/lib-es/components/Card/CardsContainer.js.map +1 -0
- package/lib-es/components/Card/CardsFactory.js +99 -0
- package/lib-es/components/Card/CardsFactory.js.map +1 -0
- package/lib-es/components/Card/CardsRender.js +194 -0
- package/lib-es/components/Card/CardsRender.js.map +1 -0
- package/lib-es/components/Card/constants.js +4 -0
- package/lib-es/components/Card/constants.js.map +1 -0
- package/lib-es/components/Card/helpers/get-dynamic-grid-classes.js +21 -0
- package/lib-es/components/Card/helpers/get-dynamic-grid-classes.js.map +1 -0
- package/lib-es/components/Card/helpers/get-published-listing-url.js +3 -0
- package/lib-es/components/Card/helpers/get-published-listing-url.js.map +1 -0
- package/lib-es/components/Card/helpers/index.js +10 -0
- package/lib-es/components/Card/helpers/index.js.map +1 -0
- package/lib-es/components/Card/helpers/use-dynamic-size-key.js +6 -0
- package/lib-es/components/Card/helpers/use-dynamic-size-key.js.map +1 -0
- package/lib-es/components/Card/index.js +3 -0
- package/lib-es/components/Card/index.js.map +1 -0
- package/lib-es/components/Carousel/Carousel.js +78 -0
- package/lib-es/components/Carousel/Carousel.js.map +1 -0
- package/lib-es/components/Carousel/CarouselImage/CarouselImage.js +59 -0
- package/lib-es/components/Carousel/CarouselImage/CarouselImage.js.map +1 -0
- package/lib-es/components/Carousel/CarouselImage/constants.js +2 -0
- package/lib-es/components/Carousel/CarouselImage/constants.js.map +1 -0
- package/lib-es/components/Carousel/CarouselImage/index.js +3 -0
- package/lib-es/components/Carousel/CarouselImage/index.js.map +1 -0
- package/lib-es/components/Carousel/CarouselRender/CarouselRender.js +74 -0
- package/lib-es/components/Carousel/CarouselRender/CarouselRender.js.map +1 -0
- package/lib-es/components/Carousel/CarouselRender/index.js +3 -0
- package/lib-es/components/Carousel/CarouselRender/index.js.map +1 -0
- package/lib-es/components/Carousel/hooks/useCarouselNavigation.js +49 -0
- package/lib-es/components/Carousel/hooks/useCarouselNavigation.js.map +1 -0
- package/lib-es/components/Carousel/index.js +3 -0
- package/lib-es/components/Carousel/index.js.map +1 -0
- package/lib-es/components/CarouselWrapper/CarouselWrapper.js +22 -0
- package/lib-es/components/CarouselWrapper/CarouselWrapper.js.map +1 -0
- package/lib-es/components/CarouselWrapper/DefaultCarousel.js +140 -0
- package/lib-es/components/CarouselWrapper/DefaultCarousel.js.map +1 -0
- package/lib-es/components/CarouselWrapper/SmoothScrollCarousel.js +43 -0
- package/lib-es/components/CarouselWrapper/SmoothScrollCarousel.js.map +1 -0
- package/lib-es/components/CarouselWrapper/index.js +3 -0
- package/lib-es/components/CarouselWrapper/index.js.map +1 -0
- package/lib-es/components/ClickWrapper.js +40 -0
- package/lib-es/components/ClickWrapper.js.map +1 -0
- package/lib-es/components/Code/Code.js +43 -0
- package/lib-es/components/Code/Code.js.map +1 -0
- package/lib-es/components/Code/ScriptTag.js +32 -0
- package/lib-es/components/Code/ScriptTag.js.map +1 -0
- package/lib-es/components/Code/helpers/index.js +2 -0
- package/lib-es/components/Code/helpers/index.js.map +1 -0
- package/lib-es/components/Code/helpers/wrap-script-tags.js +36 -0
- package/lib-es/components/Code/helpers/wrap-script-tags.js.map +1 -0
- package/lib-es/components/Code/index.js +3 -0
- package/lib-es/components/Code/index.js.map +1 -0
- package/lib-es/components/ContentGroup/ContentGroup.js +46 -0
- package/lib-es/components/ContentGroup/ContentGroup.js.map +1 -0
- package/lib-es/components/ContentGroup/ContentGroupAccordion.js +138 -0
- package/lib-es/components/ContentGroup/ContentGroupAccordion.js.map +1 -0
- package/lib-es/components/ContentGroup/ContentGroupTabs.js +83 -0
- package/lib-es/components/ContentGroup/ContentGroupTabs.js.map +1 -0
- package/lib-es/components/ContentGroup/constants.js +18 -0
- package/lib-es/components/ContentGroup/constants.js.map +1 -0
- package/lib-es/components/ContentGroup/helpers/get-active-tab.js +9 -0
- package/lib-es/components/ContentGroup/helpers/get-active-tab.js.map +1 -0
- package/lib-es/components/ContentGroup/helpers/get-sections-data.js +15 -0
- package/lib-es/components/ContentGroup/helpers/get-sections-data.js.map +1 -0
- package/lib-es/components/ContentGroup/helpers/get-structured-data-properties.js +33 -0
- package/lib-es/components/ContentGroup/helpers/get-structured-data-properties.js.map +1 -0
- package/lib-es/components/ContentGroup/helpers/index.js +4 -0
- package/lib-es/components/ContentGroup/helpers/index.js.map +1 -0
- package/lib-es/components/ContentGroup/index.js +3 -0
- package/lib-es/components/ContentGroup/index.js.map +1 -0
- package/lib-es/components/ContentGroupSection/ContentGroupSection.js +23 -0
- package/lib-es/components/ContentGroupSection/ContentGroupSection.js.map +1 -0
- package/lib-es/components/ContentGroupSection/index.js +3 -0
- package/lib-es/components/ContentGroupSection/index.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryFactory.js +93 -0
- package/lib-es/components/DataSummary/DataSummaryFactory.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryRender.js +92 -0
- package/lib-es/components/DataSummary/DataSummaryRender.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummary.js +24 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummary.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js +24 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/index.js +3 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/index.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummary.js +23 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummary.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js +28 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/index.js +3 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/index.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummary.js +23 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummary.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js +35 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/LargeSummary/index.js +3 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/LargeSummary/index.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/ListSummary/ListSummary.js +23 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/ListSummary/ListSummary.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js +34 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/ListSummary/index.js +3 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/ListSummary/index.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/TextSummary/TextSummary.js +23 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/TextSummary/TextSummary.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js +29 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/TextSummary/index.js +3 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/TextSummary/index.js.map +1 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/index.js +9 -0
- package/lib-es/components/DataSummary/DataSummaryTypes/index.js.map +1 -0
- package/lib-es/components/DataSummary/helpers/build-loop-props-content.js +61 -0
- package/lib-es/components/DataSummary/helpers/build-loop-props-content.js.map +1 -0
- package/lib-es/components/DataSummary/helpers/build-props-to-display-with-content.js +45 -0
- package/lib-es/components/DataSummary/helpers/build-props-to-display-with-content.js.map +1 -0
- package/lib-es/components/DataSummary/helpers/get-data-summary-query.js +19 -0
- package/lib-es/components/DataSummary/helpers/get-data-summary-query.js.map +1 -0
- package/lib-es/components/DataSummary/helpers/get-link-based-on-value.js +15 -0
- package/lib-es/components/DataSummary/helpers/get-link-based-on-value.js.map +1 -0
- package/lib-es/components/DataSummary/helpers/get-link-props.js +6 -0
- package/lib-es/components/DataSummary/helpers/get-link-props.js.map +1 -0
- package/lib-es/components/DataSummary/helpers/get-link-to-published-content.js +9 -0
- package/lib-es/components/DataSummary/helpers/get-link-to-published-content.js.map +1 -0
- package/lib-es/components/DataSummary/helpers/get-loop-props-limit.js +12 -0
- package/lib-es/components/DataSummary/helpers/get-loop-props-limit.js.map +1 -0
- package/lib-es/components/DataSummary/helpers/get-prop-value.js +20 -0
- package/lib-es/components/DataSummary/helpers/get-prop-value.js.map +1 -0
- package/lib-es/components/DataSummary/helpers/get-record-id.js +14 -0
- package/lib-es/components/DataSummary/helpers/get-record-id.js.map +1 -0
- package/lib-es/components/DataSummary/helpers/get-value-from-array.js +17 -0
- package/lib-es/components/DataSummary/helpers/get-value-from-array.js.map +1 -0
- package/lib-es/components/DataSummary/helpers/index.js +11 -0
- package/lib-es/components/DataSummary/helpers/index.js.map +1 -0
- package/lib-es/components/DataSummary/helpers/parse-boolean-values.js +7 -0
- package/lib-es/components/DataSummary/helpers/parse-boolean-values.js.map +1 -0
- package/lib-es/components/DataSummary/helpers/strip-summary-props-content.js +14 -0
- package/lib-es/components/DataSummary/helpers/strip-summary-props-content.js.map +1 -0
- package/lib-es/components/DataSummary/index.js +3 -0
- package/lib-es/components/DataSummary/index.js.map +1 -0
- package/lib-es/components/DateTime/DateTime.js +36 -0
- package/lib-es/components/DateTime/DateTime.js.map +1 -0
- package/lib-es/components/DateTime/index.js +3 -0
- package/lib-es/components/DateTime/index.js.map +1 -0
- package/lib-es/components/EmailConfirm/EmailConfirm.js +71 -0
- package/lib-es/components/EmailConfirm/EmailConfirm.js.map +1 -0
- package/lib-es/components/EmailConfirm/index.js +3 -0
- package/lib-es/components/EmailConfirm/index.js.map +1 -0
- package/lib-es/components/EmailConfirm/mutation.js +13 -0
- package/lib-es/components/EmailConfirm/mutation.js.map +1 -0
- package/lib-es/components/ErrorMessage/ErrorMessage.js +30 -0
- package/lib-es/components/ErrorMessage/ErrorMessage.js.map +1 -0
- package/lib-es/components/ErrorMessage/index.js +3 -0
- package/lib-es/components/ErrorMessage/index.js.map +1 -0
- package/lib-es/components/Iframe/Iframe.js +42 -0
- package/lib-es/components/Iframe/Iframe.js.map +1 -0
- package/lib-es/components/Iframe/constants.js +7 -0
- package/lib-es/components/Iframe/constants.js.map +1 -0
- package/lib-es/components/Iframe/index.js +3 -0
- package/lib-es/components/Iframe/index.js.map +1 -0
- package/lib-es/components/Image/GlobalLightbox/GlobalLightbox.js +161 -0
- package/lib-es/components/Image/GlobalLightbox/GlobalLightbox.js.map +1 -0
- package/lib-es/components/Image/GlobalLightbox/NavButton.js +24 -0
- package/lib-es/components/Image/GlobalLightbox/NavButton.js.map +1 -0
- package/lib-es/components/Image/GlobalLightbox/index.js +3 -0
- package/lib-es/components/Image/GlobalLightbox/index.js.map +1 -0
- package/lib-es/components/Image/Image.js +173 -0
- package/lib-es/components/Image/Image.js.map +1 -0
- package/lib-es/components/Image/ImageDetails.js +27 -0
- package/lib-es/components/Image/ImageDetails.js.map +1 -0
- package/lib-es/components/Image/ImageFactory.js +86 -0
- package/lib-es/components/Image/ImageFactory.js.map +1 -0
- package/lib-es/components/Image/ImageRender.js +86 -0
- package/lib-es/components/Image/ImageRender.js.map +1 -0
- package/lib-es/components/Image/Lightbox/Lightbox.js +63 -0
- package/lib-es/components/Image/Lightbox/Lightbox.js.map +1 -0
- package/lib-es/components/Image/Lightbox/index.js +3 -0
- package/lib-es/components/Image/Lightbox/index.js.map +1 -0
- package/lib-es/components/Image/index.js +3 -0
- package/lib-es/components/Image/index.js.map +1 -0
- package/lib-es/components/ItemList/ItemListButton/ItemListButton.js +107 -0
- package/lib-es/components/ItemList/ItemListButton/ItemListButton.js.map +1 -0
- package/lib-es/components/ItemList/ItemListButton/index.js +3 -0
- package/lib-es/components/ItemList/ItemListButton/index.js.map +1 -0
- package/lib-es/components/ItemList/ItemListCounter/ItemListCounter.js +57 -0
- package/lib-es/components/ItemList/ItemListCounter/ItemListCounter.js.map +1 -0
- package/lib-es/components/ItemList/ItemListCounter/index.js +3 -0
- package/lib-es/components/ItemList/ItemListCounter/index.js.map +1 -0
- package/lib-es/components/ItemList/ItemListNew/ItemListNew.js +60 -0
- package/lib-es/components/ItemList/ItemListNew/ItemListNew.js.map +1 -0
- package/lib-es/components/ItemList/ItemListNew/index.js +3 -0
- package/lib-es/components/ItemList/ItemListNew/index.js.map +1 -0
- package/lib-es/components/ItemList/constants.js +6 -0
- package/lib-es/components/ItemList/constants.js.map +1 -0
- package/lib-es/components/ItemList/helpers/get-item-list-data.js +6 -0
- package/lib-es/components/ItemList/helpers/get-item-list-data.js.map +1 -0
- package/lib-es/components/ItemList/helpers/get-item-list-id.js +9 -0
- package/lib-es/components/ItemList/helpers/get-item-list-id.js.map +1 -0
- package/lib-es/components/ItemList/helpers/get-item-list-ids.js +11 -0
- package/lib-es/components/ItemList/helpers/get-item-list-ids.js.map +1 -0
- package/lib-es/components/ItemList/helpers/index.js +6 -0
- package/lib-es/components/ItemList/helpers/index.js.map +1 -0
- package/lib-es/components/ItemList/helpers/set-item-list-id.js +8 -0
- package/lib-es/components/ItemList/helpers/set-item-list-id.js.map +1 -0
- package/lib-es/components/ItemList/helpers/set-param-and-redirect.js +17 -0
- package/lib-es/components/ItemList/helpers/set-param-and-redirect.js.map +1 -0
- package/lib-es/components/ItemList/hooks/index.js +2 -0
- package/lib-es/components/ItemList/hooks/index.js.map +1 -0
- package/lib-es/components/ItemList/hooks/use-item-list-id.js +23 -0
- package/lib-es/components/ItemList/hooks/use-item-list-id.js.map +1 -0
- package/lib-es/components/ItemList/icons/AddedBookmark.js +33 -0
- package/lib-es/components/ItemList/icons/AddedBookmark.js.map +1 -0
- package/lib-es/components/ItemList/icons/BaseBookmark.js +37 -0
- package/lib-es/components/ItemList/icons/BaseBookmark.js.map +1 -0
- package/lib-es/components/ItemList/icons/HoverBookmark.js +35 -0
- package/lib-es/components/ItemList/icons/HoverBookmark.js.map +1 -0
- package/lib-es/components/ItemList/icons/RemoveBookmark.js +33 -0
- package/lib-es/components/ItemList/icons/RemoveBookmark.js.map +1 -0
- package/lib-es/components/ItemList/icons/index.js +5 -0
- package/lib-es/components/ItemList/icons/index.js.map +1 -0
- package/lib-es/components/Layout/Layout.js +85 -0
- package/lib-es/components/Layout/Layout.js.map +1 -0
- package/lib-es/components/Layout/LayoutFactory.js +14 -0
- package/lib-es/components/Layout/LayoutFactory.js.map +1 -0
- package/lib-es/components/Layout/LayoutWithStickyTimer.js +42 -0
- package/lib-es/components/Layout/LayoutWithStickyTimer.js.map +1 -0
- package/lib-es/components/Layout/constants.js +6 -0
- package/lib-es/components/Layout/constants.js.map +1 -0
- package/lib-es/components/Layout/helpers/check-if-row-has-columns.js +19 -0
- package/lib-es/components/Layout/helpers/check-if-row-has-columns.js.map +1 -0
- package/lib-es/components/Layout/helpers/get-styles-to-update.js +10 -0
- package/lib-es/components/Layout/helpers/get-styles-to-update.js.map +1 -0
- package/lib-es/components/Layout/helpers/index.js +4 -0
- package/lib-es/components/Layout/helpers/index.js.map +1 -0
- package/lib-es/components/Layout/index.js +3 -0
- package/lib-es/components/Layout/index.js.map +1 -0
- package/lib-es/components/LazyImage/LazyImage.js +41 -0
- package/lib-es/components/LazyImage/LazyImage.js.map +1 -0
- package/lib-es/components/LazyImage/index.js +3 -0
- package/lib-es/components/LazyImage/index.js.map +1 -0
- package/lib-es/components/List/ListBuilder.js +206 -0
- package/lib-es/components/List/ListBuilder.js.map +1 -0
- package/lib-es/components/List/ListFactory.js +213 -0
- package/lib-es/components/List/ListFactory.js.map +1 -0
- package/lib-es/components/List/ListRender.js +134 -0
- package/lib-es/components/List/ListRender.js.map +1 -0
- package/lib-es/components/List/components/Cards/CardRenderWithInfiniteScroll.js +4 -0
- package/lib-es/components/List/components/Cards/CardRenderWithInfiniteScroll.js.map +1 -0
- package/lib-es/components/List/components/Cards/CardsRender.js +106 -0
- package/lib-es/components/List/components/Cards/CardsRender.js.map +1 -0
- package/lib-es/components/List/components/Cards/CardsRenderItem.js +121 -0
- package/lib-es/components/List/components/Cards/CardsRenderItem.js.map +1 -0
- package/lib-es/components/List/components/Cards/CardsRenderWrapper.js +59 -0
- package/lib-es/components/List/components/Cards/CardsRenderWrapper.js.map +1 -0
- package/lib-es/components/List/components/Cards/index.js +3 -0
- package/lib-es/components/List/components/Cards/index.js.map +1 -0
- package/lib-es/components/List/components/Full/FullRender.js +92 -0
- package/lib-es/components/List/components/Full/FullRender.js.map +1 -0
- package/lib-es/components/List/components/Full/FullRenderItem.js +95 -0
- package/lib-es/components/List/components/Full/FullRenderItem.js.map +1 -0
- package/lib-es/components/List/components/Full/FullRenderWithInfiniteScroll.js +4 -0
- package/lib-es/components/List/components/Full/FullRenderWithInfiniteScroll.js.map +1 -0
- package/lib-es/components/List/components/Full/index.js +3 -0
- package/lib-es/components/List/components/Full/index.js.map +1 -0
- package/lib-es/components/List/components/Header/ListHeader.js +64 -0
- package/lib-es/components/List/components/Header/ListHeader.js.map +1 -0
- package/lib-es/components/List/components/Header/index.js +3 -0
- package/lib-es/components/List/components/Header/index.js.map +1 -0
- package/lib-es/components/List/components/Pagination/Classic.js +55 -0
- package/lib-es/components/List/components/Pagination/Classic.js.map +1 -0
- package/lib-es/components/List/components/Pagination/ListPagination.js +63 -0
- package/lib-es/components/List/components/Pagination/ListPagination.js.map +1 -0
- package/lib-es/components/List/components/Pagination/LoadMore.js +37 -0
- package/lib-es/components/List/components/Pagination/LoadMore.js.map +1 -0
- package/lib-es/components/List/components/Pagination/index.js +3 -0
- package/lib-es/components/List/components/Pagination/index.js.map +1 -0
- package/lib-es/components/List/components/helpers/check-if-should-render-banner.js +42 -0
- package/lib-es/components/List/components/helpers/check-if-should-render-banner.js.map +1 -0
- package/lib-es/components/List/components/helpers/check-if-should-render-gtm.js +14 -0
- package/lib-es/components/List/components/helpers/check-if-should-render-gtm.js.map +1 -0
- package/lib-es/components/List/components/helpers/index.js +4 -0
- package/lib-es/components/List/components/helpers/index.js.map +1 -0
- package/lib-es/components/List/components/index.js +5 -0
- package/lib-es/components/List/components/index.js.map +1 -0
- package/lib-es/components/List/constants.js +10 -0
- package/lib-es/components/List/constants.js.map +1 -0
- package/lib-es/components/List/helpers/build-az-aggregations.js +25 -0
- package/lib-es/components/List/helpers/build-az-aggregations.js.map +1 -0
- package/lib-es/components/List/helpers/build-az-url.js +26 -0
- package/lib-es/components/List/helpers/build-az-url.js.map +1 -0
- package/lib-es/components/List/helpers/build-pagination-items.js +39 -0
- package/lib-es/components/List/helpers/build-pagination-items.js.map +1 -0
- package/lib-es/components/List/helpers/build-pagination-url.js +14 -0
- package/lib-es/components/List/helpers/build-pagination-url.js.map +1 -0
- package/lib-es/components/List/helpers/build-query-booster.js +41 -0
- package/lib-es/components/List/helpers/build-query-booster.js.map +1 -0
- package/lib-es/components/List/helpers/get-az-query-filter.js +7 -0
- package/lib-es/components/List/helpers/get-az-query-filter.js.map +1 -0
- package/lib-es/components/List/helpers/get-items-per-page-to-use.js +7 -0
- package/lib-es/components/List/helpers/get-items-per-page-to-use.js.map +1 -0
- package/lib-es/components/List/helpers/get-list-component.js +9 -0
- package/lib-es/components/List/helpers/get-list-component.js.map +1 -0
- package/lib-es/components/List/helpers/get-list-query.js +27 -0
- package/lib-es/components/List/helpers/get-list-query.js.map +1 -0
- package/lib-es/components/List/helpers/get-list-specific-search-filter.js +12 -0
- package/lib-es/components/List/helpers/get-list-specific-search-filter.js.map +1 -0
- package/lib-es/components/List/helpers/get-sort-props.js +32 -0
- package/lib-es/components/List/helpers/get-sort-props.js.map +1 -0
- package/lib-es/components/List/helpers/has-required-item-list-details.js +16 -0
- package/lib-es/components/List/helpers/has-required-item-list-details.js.map +1 -0
- package/lib-es/components/List/helpers/index.js +13 -0
- package/lib-es/components/List/helpers/index.js.map +1 -0
- package/lib-es/components/List/helpers/sort-aggs.js +22 -0
- package/lib-es/components/List/helpers/sort-aggs.js.map +1 -0
- package/lib-es/components/List/helpers/strip-query-key.js +6 -0
- package/lib-es/components/List/helpers/strip-query-key.js.map +1 -0
- package/lib-es/components/List/index.js +3 -0
- package/lib-es/components/List/index.js.map +1 -0
- package/lib-es/components/Loading/Loading.js +27 -0
- package/lib-es/components/Loading/Loading.js.map +1 -0
- package/lib-es/components/Loading/constants.js +5 -0
- package/lib-es/components/Loading/constants.js.map +1 -0
- package/lib-es/components/Loading/helpers.js +8 -0
- package/lib-es/components/Loading/helpers.js.map +1 -0
- package/lib-es/components/Loading/index.js +3 -0
- package/lib-es/components/Loading/index.js.map +1 -0
- package/lib-es/components/Menu/Menu.js +117 -0
- package/lib-es/components/Menu/Menu.js.map +1 -0
- package/lib-es/components/Menu/MenuContext.js +6 -0
- package/lib-es/components/Menu/MenuContext.js.map +1 -0
- package/lib-es/components/Menu/index.js +3 -0
- package/lib-es/components/Menu/index.js.map +1 -0
- package/lib-es/components/MenuItem/MenuEntitiesItem.js +178 -0
- package/lib-es/components/MenuItem/MenuEntitiesItem.js.map +1 -0
- package/lib-es/components/MenuItem/MenuItem.js +41 -0
- package/lib-es/components/MenuItem/MenuItem.js.map +1 -0
- package/lib-es/components/MenuItem/MenuItemRender.js +100 -0
- package/lib-es/components/MenuItem/MenuItemRender.js.map +1 -0
- package/lib-es/components/MenuItem/helpers/index.js +3 -0
- package/lib-es/components/MenuItem/helpers/index.js.map +1 -0
- package/lib-es/components/MenuItem/helpers/inject-helper-into-template.js +20 -0
- package/lib-es/components/MenuItem/helpers/inject-helper-into-template.js.map +1 -0
- package/lib-es/components/MenuItem/index.js +3 -0
- package/lib-es/components/MenuItem/index.js.map +1 -0
- package/lib-es/components/Modal/Modal.js +32 -0
- package/lib-es/components/Modal/Modal.js.map +1 -0
- package/lib-es/components/Modal/index.js +3 -0
- package/lib-es/components/Modal/index.js.map +1 -0
- package/lib-es/components/ModalAdapter/ModalAdapter.js +13 -0
- package/lib-es/components/ModalAdapter/ModalAdapter.js.map +1 -0
- package/lib-es/components/ModalAdapter/index.js +3 -0
- package/lib-es/components/ModalAdapter/index.js.map +1 -0
- package/lib-es/components/SearchContent/SearchContent.js +152 -0
- package/lib-es/components/SearchContent/SearchContent.js.map +1 -0
- package/lib-es/components/SearchContent/SearchContentItems.js +31 -0
- package/lib-es/components/SearchContent/SearchContentItems.js.map +1 -0
- package/lib-es/components/SearchContent/SearchContentResults.js +28 -0
- package/lib-es/components/SearchContent/SearchContentResults.js.map +1 -0
- package/lib-es/components/SearchContent/SearchContentToggleIcon.js +17 -0
- package/lib-es/components/SearchContent/SearchContentToggleIcon.js.map +1 -0
- package/lib-es/components/SearchContent/constants.js +4 -0
- package/lib-es/components/SearchContent/constants.js.map +1 -0
- package/lib-es/components/SearchContent/index.js +3 -0
- package/lib-es/components/SearchContent/index.js.map +1 -0
- package/lib-es/components/SearchFilter/SearchFilter/CloseMobileForm.js +24 -0
- package/lib-es/components/SearchFilter/SearchFilter/CloseMobileForm.js.map +1 -0
- package/lib-es/components/SearchFilter/SearchFilter/FiltersList.js +110 -0
- package/lib-es/components/SearchFilter/SearchFilter/FiltersList.js.map +1 -0
- package/lib-es/components/SearchFilter/SearchFilter/MobileFormToolbar.js +31 -0
- package/lib-es/components/SearchFilter/SearchFilter/MobileFormToolbar.js.map +1 -0
- package/lib-es/components/SearchFilter/SearchFilter/ResetDesktopForm.js +31 -0
- package/lib-es/components/SearchFilter/SearchFilter/ResetDesktopForm.js.map +1 -0
- package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.js +209 -0
- package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -0
- package/lib-es/components/SearchFilter/SearchFilter/index.js +3 -0
- package/lib-es/components/SearchFilter/SearchFilter/index.js.map +1 -0
- package/lib-es/components/SearchFilter/SearchFilterContainer.js +227 -0
- package/lib-es/components/SearchFilter/SearchFilterContainer.js.map +1 -0
- package/lib-es/components/SearchFilter/components/Checkbox.js +102 -0
- package/lib-es/components/SearchFilter/components/Checkbox.js.map +1 -0
- package/lib-es/components/SearchFilter/components/Range.js +130 -0
- package/lib-es/components/SearchFilter/components/Range.js.map +1 -0
- package/lib-es/components/SearchFilter/components/Select.js +78 -0
- package/lib-es/components/SearchFilter/components/Select.js.map +1 -0
- package/lib-es/components/SearchFilter/components/TextSearch.js +52 -0
- package/lib-es/components/SearchFilter/components/TextSearch.js.map +1 -0
- package/lib-es/components/SearchFilter/components/index.js +6 -0
- package/lib-es/components/SearchFilter/components/index.js.map +1 -0
- package/lib-es/components/SearchFilter/constants.js +32 -0
- package/lib-es/components/SearchFilter/constants.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/build-list-name-query.js +15 -0
- package/lib-es/components/SearchFilter/helpers/build-list-name-query.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/build-new-url.js +9 -0
- package/lib-es/components/SearchFilter/helpers/build-new-url.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/build-url-query.js +37 -0
- package/lib-es/components/SearchFilter/helpers/build-url-query.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/calculate-min-max.js +18 -0
- package/lib-es/components/SearchFilter/helpers/calculate-min-max.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/calculate-step.js +3 -0
- package/lib-es/components/SearchFilter/helpers/calculate-step.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/check-if-range-updated.js +10 -0
- package/lib-es/components/SearchFilter/helpers/check-if-range-updated.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/decode-encode.js +4 -0
- package/lib-es/components/SearchFilter/helpers/decode-encode.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/get-display-value.js +6 -0
- package/lib-es/components/SearchFilter/helpers/get-display-value.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js +18 -0
- package/lib-es/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/get-filter-value-from-query.js +27 -0
- package/lib-es/components/SearchFilter/helpers/get-filter-value-from-query.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/get-filter-values.js +19 -0
- package/lib-es/components/SearchFilter/helpers/get-filter-values.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/get-initial-filter-values.js +21 -0
- package/lib-es/components/SearchFilter/helpers/get-initial-filter-values.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/get-intersected-prop.js +4 -0
- package/lib-es/components/SearchFilter/helpers/get-intersected-prop.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/get-range-value.js +33 -0
- package/lib-es/components/SearchFilter/helpers/get-range-value.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/get-responsive-filter-classnames.js +18 -0
- package/lib-es/components/SearchFilter/helpers/get-responsive-filter-classnames.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/get-select-options.js +14 -0
- package/lib-es/components/SearchFilter/helpers/get-select-options.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/get-updated-filter-by.js +19 -0
- package/lib-es/components/SearchFilter/helpers/get-updated-filter-by.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/index.js +19 -0
- package/lib-es/components/SearchFilter/helpers/index.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/is-device-desktop.js +4 -0
- package/lib-es/components/SearchFilter/helpers/is-device-desktop.js.map +1 -0
- package/lib-es/components/SearchFilter/helpers/parse-filter-value.js +21 -0
- package/lib-es/components/SearchFilter/helpers/parse-filter-value.js.map +1 -0
- package/lib-es/components/SearchFilter/index.js +3 -0
- package/lib-es/components/SearchFilter/index.js.map +1 -0
- package/lib-es/components/SearchFilter/searchFilterReducer.js +26 -0
- package/lib-es/components/SearchFilter/searchFilterReducer.js.map +1 -0
- package/lib-es/components/SearchFilterSort/SearchFilterSort.js +79 -0
- package/lib-es/components/SearchFilterSort/SearchFilterSort.js.map +1 -0
- package/lib-es/components/SearchFilterSort/constants.js +6 -0
- package/lib-es/components/SearchFilterSort/constants.js.map +1 -0
- package/lib-es/components/SearchFilterSort/helpers/handle-sort-update.js +39 -0
- package/lib-es/components/SearchFilterSort/helpers/handle-sort-update.js.map +1 -0
- package/lib-es/components/SearchFilterSort/helpers/index.js +3 -0
- package/lib-es/components/SearchFilterSort/helpers/index.js.map +1 -0
- package/lib-es/components/SearchFilterSort/helpers/update-sort.js +19 -0
- package/lib-es/components/SearchFilterSort/helpers/update-sort.js.map +1 -0
- package/lib-es/components/SearchFilterSort/index.js +3 -0
- package/lib-es/components/SearchFilterSort/index.js.map +1 -0
- package/lib-es/components/SocialFollow/SFItem.js +33 -0
- package/lib-es/components/SocialFollow/SFItem.js.map +1 -0
- package/lib-es/components/SocialFollow/SocialFollow.js +38 -0
- package/lib-es/components/SocialFollow/SocialFollow.js.map +1 -0
- package/lib-es/components/SocialFollow/SocialFollowRender.js +33 -0
- package/lib-es/components/SocialFollow/SocialFollowRender.js.map +1 -0
- package/lib-es/components/SocialFollow/index.js +3 -0
- package/lib-es/components/SocialFollow/index.js.map +1 -0
- package/lib-es/components/SocialFollow/sf.config.js +50 -0
- package/lib-es/components/SocialFollow/sf.config.js.map +1 -0
- package/lib-es/components/SubMenu/SubMenu.js +23 -0
- package/lib-es/components/SubMenu/SubMenu.js.map +1 -0
- package/lib-es/components/SubMenu/index.js +3 -0
- package/lib-es/components/SubMenu/index.js.map +1 -0
- package/lib-es/components/TextBlock/TextBlockRender.js +20 -0
- package/lib-es/components/TextBlock/TextBlockRender.js.map +1 -0
- package/lib-es/components/TextBlock/index.js +53 -0
- package/lib-es/components/TextBlock/index.js.map +1 -0
- package/lib-es/components/Video/Video.js +98 -0
- package/lib-es/components/Video/Video.js.map +1 -0
- package/lib-es/components/Video/VideoContext.js +6 -0
- package/lib-es/components/Video/VideoContext.js.map +1 -0
- package/lib-es/components/Video/VideoModal.js +30 -0
- package/lib-es/components/Video/VideoModal.js.map +1 -0
- package/lib-es/components/Video/VideoRender.js +44 -0
- package/lib-es/components/Video/VideoRender.js.map +1 -0
- package/lib-es/components/Video/constants.js +7 -0
- package/lib-es/components/Video/constants.js.map +1 -0
- package/lib-es/components/Video/helpers/emit-gtm-event.js +25 -0
- package/lib-es/components/Video/helpers/emit-gtm-event.js.map +1 -0
- package/lib-es/components/Video/index.js +3 -0
- package/lib-es/components/Video/index.js.map +1 -0
- package/lib-es/components/Video/providers/Default.js +36 -0
- package/lib-es/components/Video/providers/Default.js.map +1 -0
- package/lib-es/components/Video/providers/JWPlayer/JWPlayerController.js +65 -0
- package/lib-es/components/Video/providers/JWPlayer/JWPlayerController.js.map +1 -0
- package/lib-es/components/Video/providers/JWPlayer/JWPlayerProvider.js +87 -0
- package/lib-es/components/Video/providers/JWPlayer/JWPlayerProvider.js.map +1 -0
- package/lib-es/components/Video/providers/Vimeo/VimeoProvider.js +68 -0
- package/lib-es/components/Video/providers/Vimeo/VimeoProvider.js.map +1 -0
- package/lib-es/components/Video/providers/Vimeo/helpers/add-extra-params-to-url.js +14 -0
- package/lib-es/components/Video/providers/Vimeo/helpers/add-extra-params-to-url.js.map +1 -0
- package/lib-es/components/Video/providers/Vimeo/helpers/index.js +3 -0
- package/lib-es/components/Video/providers/Vimeo/helpers/index.js.map +1 -0
- package/lib-es/components/Video/providers/YouTube/YouTubeProvider.js +40 -0
- package/lib-es/components/Video/providers/YouTube/YouTubeProvider.js.map +1 -0
- package/lib-es/components/Video/providers/YouTube/YoutubeEmbeded.js +213 -0
- package/lib-es/components/Video/providers/YouTube/YoutubeEmbeded.js.map +1 -0
- package/lib-es/components/Video/providers/YouTube/helpers/index.js +26 -0
- package/lib-es/components/Video/providers/YouTube/helpers/index.js.map +1 -0
- package/lib-es/components/Video/providers/get-provider.js +13 -0
- package/lib-es/components/Video/providers/get-provider.js.map +1 -0
- package/lib-es/components/Video/providers/index.js +3 -0
- package/lib-es/components/Video/providers/index.js.map +1 -0
- package/lib-es/components/Wrapper.js +36 -0
- package/lib-es/components/Wrapper.js.map +1 -0
- package/lib-es/components/index.js +36 -0
- package/lib-es/components/index.js.map +1 -0
- package/lib-es/constants/componentsDefaultValues.js +20 -0
- package/lib-es/constants/componentsDefaultValues.js.map +1 -0
- package/lib-es/constants/index.js +143 -0
- package/lib-es/constants/index.js.map +1 -0
- package/lib-es/helpers/append-images.js +28 -0
- package/lib-es/helpers/append-images.js.map +1 -0
- package/lib-es/helpers/build-az-filter.js +16 -0
- package/lib-es/helpers/build-az-filter.js.map +1 -0
- package/lib-es/helpers/build-checkbox-filters.js +28 -0
- package/lib-es/helpers/build-checkbox-filters.js.map +1 -0
- package/lib-es/helpers/build-filters-query.js +86 -0
- package/lib-es/helpers/build-filters-query.js.map +1 -0
- package/lib-es/helpers/build-image-properties.js +29 -0
- package/lib-es/helpers/build-image-properties.js.map +1 -0
- package/lib-es/helpers/build-inherited-filters.js +67 -0
- package/lib-es/helpers/build-inherited-filters.js.map +1 -0
- package/lib-es/helpers/build-link-extra-props.js +17 -0
- package/lib-es/helpers/build-link-extra-props.js.map +1 -0
- package/lib-es/helpers/build-props-query.js +98 -0
- package/lib-es/helpers/build-props-query.js.map +1 -0
- package/lib-es/helpers/build-query-fields.js +13 -0
- package/lib-es/helpers/build-query-fields.js.map +1 -0
- package/lib-es/helpers/build-query-key.js +7 -0
- package/lib-es/helpers/build-query-key.js.map +1 -0
- package/lib-es/helpers/build-raw-query-base.js +113 -0
- package/lib-es/helpers/build-raw-query-base.js.map +1 -0
- package/lib-es/helpers/build-raw-query-stringified.js +44 -0
- package/lib-es/helpers/build-raw-query-stringified.js.map +1 -0
- package/lib-es/helpers/build-raw-query.js +132 -0
- package/lib-es/helpers/build-raw-query.js.map +1 -0
- package/lib-es/helpers/build-search-values-checkbox-select.js +64 -0
- package/lib-es/helpers/build-search-values-checkbox-select.js.map +1 -0
- package/lib-es/helpers/build-search-values-text.js +34 -0
- package/lib-es/helpers/build-search-values-text.js.map +1 -0
- package/lib-es/helpers/build-set-filters.js +32 -0
- package/lib-es/helpers/build-set-filters.js.map +1 -0
- package/lib-es/helpers/build-sort-values.js +34 -0
- package/lib-es/helpers/build-sort-values.js.map +1 -0
- package/lib-es/helpers/check-for-error.js +11 -0
- package/lib-es/helpers/check-for-error.js.map +1 -0
- package/lib-es/helpers/check-props-to-use.js +9 -0
- package/lib-es/helpers/check-props-to-use.js.map +1 -0
- package/lib-es/helpers/entities/constants.js +11 -0
- package/lib-es/helpers/entities/constants.js.map +1 -0
- package/lib-es/helpers/filter-query-setup.js +61 -0
- package/lib-es/helpers/filter-query-setup.js.map +1 -0
- package/lib-es/helpers/filters-setup.js +41 -0
- package/lib-es/helpers/filters-setup.js.map +1 -0
- package/lib-es/helpers/get-banner-data.js +17 -0
- package/lib-es/helpers/get-banner-data.js.map +1 -0
- package/lib-es/helpers/get-checkbox-filters.js +7 -0
- package/lib-es/helpers/get-checkbox-filters.js.map +1 -0
- package/lib-es/helpers/get-click-wrapper-options.js +43 -0
- package/lib-es/helpers/get-click-wrapper-options.js.map +1 -0
- package/lib-es/helpers/get-component-id.js +7 -0
- package/lib-es/helpers/get-component-id.js.map +1 -0
- package/lib-es/helpers/get-current-offset.js +7 -0
- package/lib-es/helpers/get-current-offset.js.map +1 -0
- package/lib-es/helpers/get-dictionary-match.js +11 -0
- package/lib-es/helpers/get-dictionary-match.js.map +1 -0
- package/lib-es/helpers/get-display-count-data.js +13 -0
- package/lib-es/helpers/get-display-count-data.js.map +1 -0
- package/lib-es/helpers/get-elasticsearch-operator.js +6 -0
- package/lib-es/helpers/get-elasticsearch-operator.js.map +1 -0
- package/lib-es/helpers/get-entities-with-banner.js +33 -0
- package/lib-es/helpers/get-entities-with-banner.js.map +1 -0
- package/lib-es/helpers/get-entity-data.js +29 -0
- package/lib-es/helpers/get-entity-data.js.map +1 -0
- package/lib-es/helpers/get-entity-render-props.js +21 -0
- package/lib-es/helpers/get-entity-render-props.js.map +1 -0
- package/lib-es/helpers/get-extra-az-bits.js +54 -0
- package/lib-es/helpers/get-extra-az-bits.js.map +1 -0
- package/lib-es/helpers/get-filter-props.js +60 -0
- package/lib-es/helpers/get-filter-props.js.map +1 -0
- package/lib-es/helpers/get-filter-relation-keys.js +8 -0
- package/lib-es/helpers/get-filter-relation-keys.js.map +1 -0
- package/lib-es/helpers/get-generic-props.js +16 -0
- package/lib-es/helpers/get-generic-props.js.map +1 -0
- package/lib-es/helpers/get-generic-render-variables.js +64 -0
- package/lib-es/helpers/get-generic-render-variables.js.map +1 -0
- package/lib-es/helpers/get-image-ids.js +26 -0
- package/lib-es/helpers/get-image-ids.js.map +1 -0
- package/lib-es/helpers/get-inherited-filters.js +12 -0
- package/lib-es/helpers/get-inherited-filters.js.map +1 -0
- package/lib-es/helpers/get-items-to-display-ids.js +12 -0
- package/lib-es/helpers/get-items-to-display-ids.js.map +1 -0
- package/lib-es/helpers/get-modifiers.js +16 -0
- package/lib-es/helpers/get-modifiers.js.map +1 -0
- package/lib-es/helpers/get-not-equal-query.js +9 -0
- package/lib-es/helpers/get-not-equal-query.js.map +1 -0
- package/lib-es/helpers/get-pagination-index.js +8 -0
- package/lib-es/helpers/get-pagination-index.js.map +1 -0
- package/lib-es/helpers/get-parsed-prop-values.js +32 -0
- package/lib-es/helpers/get-parsed-prop-values.js.map +1 -0
- package/lib-es/helpers/get-parsed-summary-value.js +13 -0
- package/lib-es/helpers/get-parsed-summary-value.js.map +1 -0
- package/lib-es/helpers/get-prop-values.js +14 -0
- package/lib-es/helpers/get-prop-values.js.map +1 -0
- package/lib-es/helpers/get-query-filters.js +22 -0
- package/lib-es/helpers/get-query-filters.js.map +1 -0
- package/lib-es/helpers/get-query-props.js +37 -0
- package/lib-es/helpers/get-query-props.js.map +1 -0
- package/lib-es/helpers/get-required-schemas.js +20 -0
- package/lib-es/helpers/get-required-schemas.js.map +1 -0
- package/lib-es/helpers/get-sanitized-prop-values.js +3 -0
- package/lib-es/helpers/get-sanitized-prop-values.js.map +1 -0
- package/lib-es/helpers/get-search-filter-type.js +12 -0
- package/lib-es/helpers/get-search-filter-type.js.map +1 -0
- package/lib-es/helpers/get-sort-by-field-name.js +20 -0
- package/lib-es/helpers/get-sort-by-field-name.js.map +1 -0
- package/lib-es/helpers/get-unpublished-entity-name.js +5 -0
- package/lib-es/helpers/get-unpublished-entity-name.js.map +1 -0
- package/lib-es/helpers/get-updated-filter-by.js +11 -0
- package/lib-es/helpers/get-updated-filter-by.js.map +1 -0
- package/lib-es/helpers/get-updated-items-to-display.js +32 -0
- package/lib-es/helpers/get-updated-items-to-display.js.map +1 -0
- package/lib-es/helpers/get-updated-sort-properties.js +15 -0
- package/lib-es/helpers/get-updated-sort-properties.js.map +1 -0
- package/lib-es/helpers/get-wrapped-value-with-link.js +25 -0
- package/lib-es/helpers/get-wrapped-value-with-link.js.map +1 -0
- package/lib-es/helpers/group-entities.js +10 -0
- package/lib-es/helpers/group-entities.js.map +1 -0
- package/lib-es/helpers/has-children.js +10 -0
- package/lib-es/helpers/has-children.js.map +1 -0
- package/lib-es/helpers/index.js +65 -0
- package/lib-es/helpers/index.js.map +1 -0
- package/lib-es/helpers/inject-banner.js +15 -0
- package/lib-es/helpers/inject-banner.js.map +1 -0
- package/lib-es/helpers/inject-banners-to-entities.js +19 -0
- package/lib-es/helpers/inject-banners-to-entities.js.map +1 -0
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-entities/get-banners-for-entities.js +15 -0
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-entities/get-banners-for-entities.js.map +1 -0
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-entities/index.js +3 -0
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-entities/index.js.map +1 -0
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-nodes/get-banners-for-nodes.js +19 -0
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-nodes/get-banners-for-nodes.js.map +1 -0
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-nodes/helpers/group-node-entities.js +26 -0
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-nodes/helpers/group-node-entities.js.map +1 -0
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-nodes/helpers/index.js +3 -0
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-nodes/helpers/index.js.map +1 -0
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-nodes/index.js +3 -0
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-nodes/index.js.map +1 -0
- package/lib-es/helpers/inject-multiple-banners/index.js +3 -0
- package/lib-es/helpers/inject-multiple-banners/index.js.map +1 -0
- package/lib-es/helpers/inject-multiple-banners/inject-multiple-banners.js +11 -0
- package/lib-es/helpers/inject-multiple-banners/inject-multiple-banners.js.map +1 -0
- package/lib-es/helpers/is-browser.js +3 -0
- package/lib-es/helpers/is-browser.js.map +1 -0
- package/lib-es/helpers/is-filter-entitys-id.js +8 -0
- package/lib-es/helpers/is-filter-entitys-id.js.map +1 -0
- package/lib-es/helpers/is-object.js +3 -0
- package/lib-es/helpers/is-object.js.map +1 -0
- package/lib-es/helpers/is-using-relation-image.js +3 -0
- package/lib-es/helpers/is-using-relation-image.js.map +1 -0
- package/lib-es/helpers/parse-TextBlock.js +30 -0
- package/lib-es/helpers/parse-TextBlock.js.map +1 -0
- package/lib-es/helpers/parse-interval.js +4 -0
- package/lib-es/helpers/parse-interval.js.map +1 -0
- package/lib-es/helpers/parse-props-to-display.js +36 -0
- package/lib-es/helpers/parse-props-to-display.js.map +1 -0
- package/lib-es/helpers/process-data-summary-value.js +36 -0
- package/lib-es/helpers/process-data-summary-value.js.map +1 -0
- package/lib-es/helpers/remove-extra-items.js +13 -0
- package/lib-es/helpers/remove-extra-items.js.map +1 -0
- package/lib-es/helpers/remove-unwanted-characters.js +21 -0
- package/lib-es/helpers/remove-unwanted-characters.js.map +1 -0
- package/lib-es/helpers/render-children.js +21 -0
- package/lib-es/helpers/render-children.js.map +1 -0
- package/lib-es/helpers/should-render-waypoint.js +3 -0
- package/lib-es/helpers/should-render-waypoint.js.map +1 -0
- package/lib-es/helpers/should-return.js +3 -0
- package/lib-es/helpers/should-return.js.map +1 -0
- package/lib-es/helpers/should-show-property.js +6 -0
- package/lib-es/helpers/should-show-property.js.map +1 -0
- package/lib-es/helpers/should-skip-single-query.js +4 -0
- package/lib-es/helpers/should-skip-single-query.js.map +1 -0
- package/lib-es/helpers/sort-response-data.js +10 -0
- package/lib-es/helpers/sort-response-data.js.map +1 -0
- package/lib-es/helpers/split-children.js +69 -0
- package/lib-es/helpers/split-children.js.map +1 -0
- package/lib-es/helpers/update-childrens-parent.js +17 -0
- package/lib-es/helpers/update-childrens-parent.js.map +1 -0
- package/lib-es/hooks/helpers/RenderComponent.js +80 -0
- package/lib-es/hooks/helpers/RenderComponent.js.map +1 -0
- package/lib-es/hooks/helpers/StoreImages.js +56 -0
- package/lib-es/hooks/helpers/StoreImages.js.map +1 -0
- package/lib-es/hooks/helpers/append-gtm-classname.js +38 -0
- package/lib-es/hooks/helpers/append-gtm-classname.js.map +1 -0
- package/lib-es/hooks/helpers/buildPBComponents.js +88 -0
- package/lib-es/hooks/helpers/buildPBComponents.js.map +1 -0
- package/lib-es/hooks/helpers/check-banner-insertion-set.js +17 -0
- package/lib-es/hooks/helpers/check-banner-insertion-set.js.map +1 -0
- package/lib-es/hooks/helpers/check-collisions.js +30 -0
- package/lib-es/hooks/helpers/check-collisions.js.map +1 -0
- package/lib-es/hooks/helpers/constants.js +6 -0
- package/lib-es/hooks/helpers/constants.js.map +1 -0
- package/lib-es/hooks/helpers/get-banner-index.js +3 -0
- package/lib-es/hooks/helpers/get-banner-index.js.map +1 -0
- package/lib-es/hooks/helpers/get-components-to-insert-by-type.js +27 -0
- package/lib-es/hooks/helpers/get-components-to-insert-by-type.js.map +1 -0
- package/lib-es/hooks/helpers/get-lightbox-images.js +40 -0
- package/lib-es/hooks/helpers/get-lightbox-images.js.map +1 -0
- package/lib-es/hooks/helpers/getComponent.js +5 -0
- package/lib-es/hooks/helpers/getComponent.js.map +1 -0
- package/lib-es/hooks/helpers/getVariant.js +14 -0
- package/lib-es/hooks/helpers/getVariant.js.map +1 -0
- package/lib-es/hooks/helpers/index.js +3 -0
- package/lib-es/hooks/helpers/index.js.map +1 -0
- package/lib-es/hooks/helpers/inject-element-components.js +59 -0
- package/lib-es/hooks/helpers/inject-element-components.js.map +1 -0
- package/lib-es/hooks/helpers/inject-textblock-banners.js +95 -0
- package/lib-es/hooks/helpers/inject-textblock-banners.js.map +1 -0
- package/lib-es/hooks/helpers/insert-banners.js +83 -0
- package/lib-es/hooks/helpers/insert-banners.js.map +1 -0
- package/lib-es/hooks/helpers/update-targetings.js +15 -0
- package/lib-es/hooks/helpers/update-targetings.js.map +1 -0
- package/lib-es/hooks/index.js +12 -0
- package/lib-es/hooks/index.js.map +1 -0
- package/lib-es/hooks/use-app-sync-event-hook.js +37 -0
- package/lib-es/hooks/use-app-sync-event-hook.js.map +1 -0
- package/lib-es/hooks/use-banner-insertion.js +22 -0
- package/lib-es/hooks/use-banner-insertion.js.map +1 -0
- package/lib-es/hooks/use-check-mobile-screen.js +29 -0
- package/lib-es/hooks/use-check-mobile-screen.js.map +1 -0
- package/lib-es/hooks/use-filter-aggregation-values.js +31 -0
- package/lib-es/hooks/use-filter-aggregation-values.js.map +1 -0
- package/lib-es/hooks/use-get-entity-schema.js +39 -0
- package/lib-es/hooks/use-get-entity-schema.js.map +1 -0
- package/lib-es/hooks/use-get-entity-schemas-as-obj.js +13 -0
- package/lib-es/hooks/use-get-entity-schemas-as-obj.js.map +1 -0
- package/lib-es/hooks/use-get-image-id-from-relation.js +37 -0
- package/lib-es/hooks/use-get-image-id-from-relation.js.map +1 -0
- package/lib-es/hooks/use-get-images.js +37 -0
- package/lib-es/hooks/use-get-images.js.map +1 -0
- package/lib-es/hooks/use-get-single-entity-schema.js +21 -0
- package/lib-es/hooks/use-get-single-entity-schema.js.map +1 -0
- package/lib-es/hooks/use-page-builder.js +17 -0
- package/lib-es/hooks/use-page-builder.js.map +1 -0
- package/lib-es/hooks/use-portal.js +14 -0
- package/lib-es/hooks/use-portal.js.map +1 -0
- package/lib-es/index.js +17 -0
- package/lib-es/index.js.map +1 -0
- package/lib-es/system-components/EditorMode/BlazeLogo.js +67 -0
- package/lib-es/system-components/EditorMode/BlazeLogo.js.map +1 -0
- package/lib-es/system-components/EditorMode/PbWrapper.js +34 -0
- package/lib-es/system-components/EditorMode/PbWrapper.js.map +1 -0
- package/lib-es/system-components/EditorMode/constants.js +3 -0
- package/lib-es/system-components/EditorMode/constants.js.map +1 -0
- package/lib-es/system-components/EditorMode/helpers/add-editor-mode-event-listeners.js +93 -0
- package/lib-es/system-components/EditorMode/helpers/add-editor-mode-event-listeners.js.map +1 -0
- package/lib-es/system-components/EditorMode/helpers/check-is-over-blaze-icon.js +19 -0
- package/lib-es/system-components/EditorMode/helpers/check-is-over-blaze-icon.js.map +1 -0
- package/lib-es/system-components/index.js +3 -0
- package/lib-es/system-components/index.js.map +1 -0
- package/lib-es/translations.js +37 -0
- package/lib-es/translations.js.map +1 -0
- package/lib-es/utils/component-map.js +30 -0
- package/lib-es/utils/component-map.js.map +1 -0
- package/lib-es/utils/get-class-modifiers.js +81 -0
- package/lib-es/utils/get-class-modifiers.js.map +1 -0
- package/lib-es/utils/get-image-data.js +16 -0
- package/lib-es/utils/get-image-data.js.map +1 -0
- package/lib-es/utils/get-props-to-display-modifiers.js +5 -0
- package/lib-es/utils/get-props-to-display-modifiers.js.map +1 -0
- package/lib-es/utils/index.js +8 -0
- package/lib-es/utils/index.js.map +1 -0
- package/lib-es/utils/is-object-empty.js +4 -0
- package/lib-es/utils/is-object-empty.js.map +1 -0
- package/lib-es/utils/variant-handler.js +27 -0
- package/lib-es/utils/variant-handler.js.map +1 -0
- package/lib-es/variants/FloatingSideButton/index.js +10 -0
- package/lib-es/variants/FloatingSideButton/index.js.map +1 -0
- package/lib-es/variants/HeroImage/index.js +10 -0
- package/lib-es/variants/HeroImage/index.js.map +1 -0
- package/lib-es/variants/Infographic/Infographic.js +16 -0
- package/lib-es/variants/Infographic/Infographic.js.map +1 -0
- package/lib-es/variants/Infographic/index.js +10 -0
- package/lib-es/variants/Infographic/index.js.map +1 -0
- package/lib-es/variants/Infographic/useInfographic.js +23 -0
- package/lib-es/variants/Infographic/useInfographic.js.map +1 -0
- package/lib-es/variants/LiveBlogList/LiveBlogList.js +80 -0
- package/lib-es/variants/LiveBlogList/LiveBlogList.js.map +1 -0
- package/lib-es/variants/LiveBlogList/index.js +12 -0
- package/lib-es/variants/LiveBlogList/index.js.map +1 -0
- package/lib-es/variants/LongformGallery/LongformGallery.js +40 -0
- package/lib-es/variants/LongformGallery/LongformGallery.js.map +1 -0
- package/lib-es/variants/LongformGallery/LongformGalleryImage.js +59 -0
- package/lib-es/variants/LongformGallery/LongformGalleryImage.js.map +1 -0
- package/lib-es/variants/LongformGallery/constants.js +18 -0
- package/lib-es/variants/LongformGallery/constants.js.map +1 -0
- package/lib-es/variants/LongformGallery/helpers/index.js +5 -0
- package/lib-es/variants/LongformGallery/helpers/index.js.map +1 -0
- package/lib-es/variants/LongformGallery/helpers/parseImageData.js +26 -0
- package/lib-es/variants/LongformGallery/helpers/parseImageData.js.map +1 -0
- package/lib-es/variants/LongformGallery/helpers/separateImages.js +25 -0
- package/lib-es/variants/LongformGallery/helpers/separateImages.js.map +1 -0
- package/lib-es/variants/LongformGallery/helpers/shouldSkip.js +3 -0
- package/lib-es/variants/LongformGallery/helpers/shouldSkip.js.map +1 -0
- package/lib-es/variants/LongformGallery/index.js +12 -0
- package/lib-es/variants/LongformGallery/index.js.map +1 -0
- package/lib-es/variants/LongformGallery/useLongformGallery.js +47 -0
- package/lib-es/variants/LongformGallery/useLongformGallery.js.map +1 -0
- package/lib-es/variants/LongformRow/index.js +10 -0
- package/lib-es/variants/LongformRow/index.js.map +1 -0
- package/lib-es/variants/ParallaxImageTextRight/index.js +11 -0
- package/lib-es/variants/ParallaxImageTextRight/index.js.map +1 -0
- package/lib-es/variants/SlideSummary/SlideSummary.js +23 -0
- package/lib-es/variants/SlideSummary/SlideSummary.js.map +1 -0
- package/lib-es/variants/SlideSummary/index.js +10 -0
- package/lib-es/variants/SlideSummary/index.js.map +1 -0
- package/lib-es/variants/ThumbnailCarousel/ThumbnailCarousel.js +49 -0
- package/lib-es/variants/ThumbnailCarousel/ThumbnailCarousel.js.map +1 -0
- package/lib-es/variants/ThumbnailCarousel/ThumbnailImage/ThumbnailImage.js +30 -0
- package/lib-es/variants/ThumbnailCarousel/ThumbnailImage/ThumbnailImage.js.map +1 -0
- package/lib-es/variants/ThumbnailCarousel/ThumbnailImage/index.js +3 -0
- package/lib-es/variants/ThumbnailCarousel/ThumbnailImage/index.js.map +1 -0
- package/lib-es/variants/ThumbnailCarousel/ThumbnailImage/useThumbnailImage.js +62 -0
- package/lib-es/variants/ThumbnailCarousel/ThumbnailImage/useThumbnailImage.js.map +1 -0
- package/lib-es/variants/ThumbnailCarousel/index.js +10 -0
- package/lib-es/variants/ThumbnailCarousel/index.js.map +1 -0
- package/lib-es/variants/ThumbnailCarousel/useThumbnailCarousel.js +47 -0
- package/lib-es/variants/ThumbnailCarousel/useThumbnailCarousel.js.map +1 -0
- package/lib-es/variants/index.js +21 -0
- package/lib-es/variants/index.js.map +1 -0
- package/package.json +11 -10
- package/src/components/Menu/Menu.js +1 -3
- package/src/components/Menu/MenuContext.js +1 -1
- package/src/components/MenuItem/MenuItemRender.js +12 -40
- package/src/components/MenuItem/helpers/index.js +1 -3
- package/tests/unit/src/components/MenuItem/MenuItem.test.js +0 -5
- package/tests/unit/src/components/MenuItem/MenuItemRender.test.js +3 -11
- package/lib/components/MenuItem/helpers/has-active-child.js +0 -19
- package/lib/components/MenuItem/helpers/has-active-child.js.map +0 -1
- package/lib/components/MenuItem/helpers/isUrlPathMatch.js +0 -18
- package/lib/components/MenuItem/helpers/isUrlPathMatch.js.map +0 -1
- package/src/components/MenuItem/helpers/has-active-child.js +0 -10
- package/src/components/MenuItem/helpers/isUrlPathMatch.js +0 -10
- package/tests/unit/src/components/MenuItem/helpers/constants.js +0 -73
- package/tests/unit/src/components/MenuItem/helpers/has-active-child.test.js +0 -35
- package/tests/unit/src/components/MenuItem/helpers/is-url-path-match.test.js +0 -53
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
const _excluded = ["children", "gtmChildren", "id"];
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
import React, { useState } from 'react';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import { renderChildren } from '../helpers';
|
|
9
|
+
const ClickWrapper = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
children,
|
|
12
|
+
gtmChildren,
|
|
13
|
+
id
|
|
14
|
+
} = _ref,
|
|
15
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
+
const [clickState, setClickState] = useState(false);
|
|
17
|
+
const renderedChildren = clickState ? renderChildren(gtmChildren, {
|
|
18
|
+
clickState,
|
|
19
|
+
clickId: id,
|
|
20
|
+
componentProps: _objectSpread({}, props)
|
|
21
|
+
}) : null;
|
|
22
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
role: "button",
|
|
24
|
+
onClick: () => {
|
|
25
|
+
setClickState(true);
|
|
26
|
+
}
|
|
27
|
+
}, renderedChildren, children);
|
|
28
|
+
};
|
|
29
|
+
ClickWrapper.propTypes = {
|
|
30
|
+
id: PropTypes.string,
|
|
31
|
+
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
32
|
+
gtmChildren: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
|
|
33
|
+
};
|
|
34
|
+
ClickWrapper.defaultProps = {
|
|
35
|
+
id: null,
|
|
36
|
+
children: [],
|
|
37
|
+
gtmChildren: []
|
|
38
|
+
};
|
|
39
|
+
export default ClickWrapper;
|
|
40
|
+
//# sourceMappingURL=ClickWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClickWrapper.js","names":["React","useState","PropTypes","renderChildren","ClickWrapper","_ref","children","gtmChildren","id","props","_objectWithoutProperties","_excluded","clickState","setClickState","renderedChildren","clickId","componentProps","_objectSpread","createElement","role","onClick","propTypes","string","oneOfType","arrayOf","node","defaultProps"],"sources":["../../src/components/ClickWrapper.js"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { renderChildren } from '../helpers';\n\nconst ClickWrapper = ({ children, gtmChildren, id, ...props }) => {\n const [clickState, setClickState] = useState(false);\n const renderedChildren = clickState\n ? renderChildren(gtmChildren, {\n clickState,\n clickId: id,\n componentProps: { ...props }\n })\n : null;\n\n return (\n <div\n role=\"button\"\n onClick={() => {\n setClickState(true);\n }}>\n {renderedChildren}\n {children}\n </div>\n );\n};\n\nClickWrapper.propTypes = {\n id: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n gtmChildren: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])\n};\n\nClickWrapper.defaultProps = {\n id: null,\n children: [],\n gtmChildren: []\n};\n\nexport default ClickWrapper;\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,cAAc,QAAQ,YAAY;AAE3C,MAAMC,YAAY,GAAGC,IAAA,IAA6C;EAAA,IAA5C;MAAEC,QAAQ;MAAEC,WAAW;MAAEC;IAAa,CAAC,GAAAH,IAAA;IAAPI,KAAK,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EACzD,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGZ,QAAQ,CAAC,KAAK,CAAC;EACnD,MAAMa,gBAAgB,GAAGF,UAAU,GAC/BT,cAAc,CAACI,WAAW,EAAE;IAC1BK,UAAU;IACVG,OAAO,EAAEP,EAAE;IACXQ,cAAc,EAAAC,aAAA,KAAOR,KAAK;EAC5B,CAAC,CAAC,GACF,IAAI;EAER,oBACET,KAAA,CAAAkB,aAAA;IACEC,IAAI,EAAC,QAAQ;IACbC,OAAO,EAAEA,CAAA,KAAM;MACbP,aAAa,CAAC,IAAI,CAAC;IACrB;EAAE,GACDC,gBAAgB,EAChBR,QACE,CAAC;AAEV,CAAC;AAEDF,YAAY,CAACiB,SAAS,GAAG;EACvBb,EAAE,EAAEN,SAAS,CAACoB,MAAM;EACpBhB,QAAQ,EAAEJ,SAAS,CAACqB,SAAS,CAAC,CAACrB,SAAS,CAACsB,OAAO,CAACtB,SAAS,CAACuB,IAAI,CAAC,EAAEvB,SAAS,CAACuB,IAAI,CAAC,CAAC;EAClFlB,WAAW,EAAEL,SAAS,CAACqB,SAAS,CAAC,CAACrB,SAAS,CAACsB,OAAO,CAACtB,SAAS,CAACuB,IAAI,CAAC,EAAEvB,SAAS,CAACuB,IAAI,CAAC;AACtF,CAAC;AAEDrB,YAAY,CAACsB,YAAY,GAAG;EAC1BlB,EAAE,EAAE,IAAI;EACRF,QAAQ,EAAE,EAAE;EACZC,WAAW,EAAE;AACf,CAAC;AAED,eAAeH,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
const _excluded = ["code", "parserOptions", "disableWrapper"];
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
import React, { memo } from 'react';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import parseHTML from 'html-react-parser';
|
|
9
|
+
import Wrapper from '../Wrapper';
|
|
10
|
+
import { withTitle } from '../../HOC';
|
|
11
|
+
import { getClassModifiers } from '../../utils';
|
|
12
|
+
import { CODE } from '../../constants';
|
|
13
|
+
import { wrapScriptTags } from './helpers';
|
|
14
|
+
const Code = memo(_ref => {
|
|
15
|
+
let {
|
|
16
|
+
code: embedCode,
|
|
17
|
+
parserOptions,
|
|
18
|
+
disableWrapper
|
|
19
|
+
} = _ref,
|
|
20
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
if (!embedCode) return null;
|
|
22
|
+
const parsedCode = parseHTML(embedCode, parserOptions);
|
|
23
|
+
const wrappedCode = wrapScriptTags(parsedCode);
|
|
24
|
+
const modifiers = getClassModifiers(CODE, _objectSpread({}, otherProps));
|
|
25
|
+
if (disableWrapper) return wrappedCode;
|
|
26
|
+
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
27
|
+
modifiers: modifiers
|
|
28
|
+
}, wrappedCode);
|
|
29
|
+
});
|
|
30
|
+
Code.propTypes = {
|
|
31
|
+
code: PropTypes.string,
|
|
32
|
+
modifier: PropTypes.string,
|
|
33
|
+
parserOptions: PropTypes.object,
|
|
34
|
+
disableWrapper: PropTypes.bool
|
|
35
|
+
};
|
|
36
|
+
Code.defaultProps = {
|
|
37
|
+
code: '',
|
|
38
|
+
modifier: '',
|
|
39
|
+
parserOptions: {},
|
|
40
|
+
disableWrapper: false
|
|
41
|
+
};
|
|
42
|
+
export default withTitle(Code);
|
|
43
|
+
//# sourceMappingURL=Code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Code.js","names":["React","memo","PropTypes","parseHTML","Wrapper","withTitle","getClassModifiers","CODE","wrapScriptTags","Code","_ref","code","embedCode","parserOptions","disableWrapper","otherProps","_objectWithoutProperties","_excluded","parsedCode","wrappedCode","modifiers","_objectSpread","createElement","propTypes","string","modifier","object","bool","defaultProps"],"sources":["../../../src/components/Code/Code.js"],"sourcesContent":["import React, { memo } from 'react';\nimport PropTypes from 'prop-types';\nimport parseHTML from 'html-react-parser';\nimport Wrapper from '../Wrapper';\nimport { withTitle } from '../../HOC';\nimport { getClassModifiers } from '../../utils';\nimport { CODE } from '../../constants';\nimport { wrapScriptTags } from './helpers';\n\nconst Code = memo(({ code: embedCode, parserOptions, disableWrapper, ...otherProps }) => {\n if (!embedCode) return null;\n\n const parsedCode = parseHTML(embedCode, parserOptions);\n const wrappedCode = wrapScriptTags(parsedCode);\n const modifiers = getClassModifiers(CODE, { ...otherProps });\n\n if (disableWrapper) return wrappedCode;\n\n return <Wrapper modifiers={modifiers}>{wrappedCode}</Wrapper>;\n});\n\nCode.propTypes = {\n code: PropTypes.string,\n modifier: PropTypes.string,\n parserOptions: PropTypes.object,\n disableWrapper: PropTypes.bool\n};\n\nCode.defaultProps = {\n code: '',\n modifier: '',\n parserOptions: {},\n disableWrapper: false\n};\n\nexport default withTitle(Code);\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,SAAS,MAAM,mBAAmB;AACzC,OAAOC,OAAO,MAAM,YAAY;AAChC,SAASC,SAAS,QAAQ,WAAW;AACrC,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,IAAI,QAAQ,iBAAiB;AACtC,SAASC,cAAc,QAAQ,WAAW;AAE1C,MAAMC,IAAI,GAAGR,IAAI,CAACS,IAAA,IAAuE;EAAA,IAAtE;MAAEC,IAAI,EAAEC,SAAS;MAAEC,aAAa;MAAEC;IAA8B,CAAC,GAAAJ,IAAA;IAAZK,UAAU,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA;EAChF,IAAI,CAACL,SAAS,EAAE,OAAO,IAAI;EAE3B,MAAMM,UAAU,GAAGf,SAAS,CAACS,SAAS,EAAEC,aAAa,CAAC;EACtD,MAAMM,WAAW,GAAGX,cAAc,CAACU,UAAU,CAAC;EAC9C,MAAME,SAAS,GAAGd,iBAAiB,CAACC,IAAI,EAAAc,aAAA,KAAON,UAAU,CAAE,CAAC;EAE5D,IAAID,cAAc,EAAE,OAAOK,WAAW;EAEtC,oBAAOnB,KAAA,CAAAsB,aAAA,CAAClB,OAAO;IAACgB,SAAS,EAAEA;EAAU,GAAED,WAAqB,CAAC;AAC/D,CAAC,CAAC;AAEFV,IAAI,CAACc,SAAS,GAAG;EACfZ,IAAI,EAAET,SAAS,CAACsB,MAAM;EACtBC,QAAQ,EAAEvB,SAAS,CAACsB,MAAM;EAC1BX,aAAa,EAAEX,SAAS,CAACwB,MAAM;EAC/BZ,cAAc,EAAEZ,SAAS,CAACyB;AAC5B,CAAC;AAEDlB,IAAI,CAACmB,YAAY,GAAG;EAClBjB,IAAI,EAAE,EAAE;EACRc,QAAQ,EAAE,EAAE;EACZZ,aAAa,EAAE,CAAC,CAAC;EACjBC,cAAc,EAAE;AAClB,CAAC;AAED,eAAeT,SAAS,CAACI,IAAI,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
+
const _excluded = ["dangerouslySetInnerHTML"];
|
|
3
|
+
import React, { useRef, useEffect } from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
const ScriptTag = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
dangerouslySetInnerHTML: innerHtml
|
|
8
|
+
} = _ref,
|
|
9
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
10
|
+
const wrapperRef = useRef(null);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const script = document.createElement('script');
|
|
13
|
+
Object.entries(otherProps).forEach(([key, value]) => {
|
|
14
|
+
if (key === 'children') return;
|
|
15
|
+
script[key] = value;
|
|
16
|
+
});
|
|
17
|
+
if (!script.type) script.type = 'text/javascript';
|
|
18
|
+
if (innerHtml) script.text = innerHtml.__html;
|
|
19
|
+
wrapperRef.current.appendChild(script);
|
|
20
|
+
});
|
|
21
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
22
|
+
ref: wrapperRef
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
ScriptTag.propTypes = {
|
|
26
|
+
dangerouslySetInnerHTML: PropTypes.object
|
|
27
|
+
};
|
|
28
|
+
ScriptTag.defaultProps = {
|
|
29
|
+
dangerouslySetInnerHTML: null
|
|
30
|
+
};
|
|
31
|
+
export default ScriptTag;
|
|
32
|
+
//# sourceMappingURL=ScriptTag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScriptTag.js","names":["React","useRef","useEffect","PropTypes","ScriptTag","_ref","dangerouslySetInnerHTML","innerHtml","otherProps","_objectWithoutProperties","_excluded","wrapperRef","script","document","createElement","Object","entries","forEach","key","value","type","text","__html","current","appendChild","ref","propTypes","object","defaultProps"],"sources":["../../../src/components/Code/ScriptTag.js"],"sourcesContent":["import React, { useRef, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nconst ScriptTag = ({ dangerouslySetInnerHTML: innerHtml, ...otherProps }) => {\n const wrapperRef = useRef(null);\n\n useEffect(() => {\n const script = document.createElement('script');\n Object.entries(otherProps).forEach(([key, value]) => {\n if (key === 'children') return;\n\n script[key] = value;\n });\n\n if (!script.type) script.type = 'text/javascript';\n if (innerHtml) script.text = innerHtml.__html;\n\n wrapperRef.current.appendChild(script);\n });\n\n return <span ref={wrapperRef} />;\n};\n\nScriptTag.propTypes = {\n dangerouslySetInnerHTML: PropTypes.object\n};\n\nScriptTag.defaultProps = {\n dangerouslySetInnerHTML: null\n};\n\nexport default ScriptTag;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,SAAS,QAAQ,OAAO;AAChD,OAAOC,SAAS,MAAM,YAAY;AAElC,MAAMC,SAAS,GAAGC,IAAA,IAA2D;EAAA,IAA1D;MAAEC,uBAAuB,EAAEC;IAAyB,CAAC,GAAAF,IAAA;IAAZG,UAAU,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EACpE,MAAMC,UAAU,GAAGV,MAAM,CAAC,IAAI,CAAC;EAE/BC,SAAS,CAAC,MAAM;IACd,MAAMU,MAAM,GAAGC,QAAQ,CAACC,aAAa,CAAC,QAAQ,CAAC;IAC/CC,MAAM,CAACC,OAAO,CAACR,UAAU,CAAC,CAACS,OAAO,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;MACnD,IAAID,GAAG,KAAK,UAAU,EAAE;MAExBN,MAAM,CAACM,GAAG,CAAC,GAAGC,KAAK;IACrB,CAAC,CAAC;IAEF,IAAI,CAACP,MAAM,CAACQ,IAAI,EAAER,MAAM,CAACQ,IAAI,GAAG,iBAAiB;IACjD,IAAIb,SAAS,EAAEK,MAAM,CAACS,IAAI,GAAGd,SAAS,CAACe,MAAM;IAE7CX,UAAU,CAACY,OAAO,CAACC,WAAW,CAACZ,MAAM,CAAC;EACxC,CAAC,CAAC;EAEF,oBAAOZ,KAAA,CAAAc,aAAA;IAAMW,GAAG,EAAEd;EAAW,CAAE,CAAC;AAClC,CAAC;AAEDP,SAAS,CAACsB,SAAS,GAAG;EACpBpB,uBAAuB,EAAEH,SAAS,CAACwB;AACrC,CAAC;AAEDvB,SAAS,CAACwB,YAAY,GAAG;EACvBtB,uBAAuB,EAAE;AAC3B,CAAC;AAED,eAAeF,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","wrapScriptTags"],"sources":["../../../../src/components/Code/helpers/index.js"],"sourcesContent":["export { default as wrapScriptTags } from './wrap-script-tags';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,cAAc,QAAQ,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
const _excluded = ["children"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import ScriptTag from '../ScriptTag';
|
|
6
|
+
function getWrappedScriptTag(child) {
|
|
7
|
+
if (!child) return child;
|
|
8
|
+
if (typeof child === 'string') return child;
|
|
9
|
+
const _child$props = child.props,
|
|
10
|
+
{
|
|
11
|
+
children
|
|
12
|
+
} = _child$props,
|
|
13
|
+
scriptProps = _objectWithoutProperties(_child$props, _excluded);
|
|
14
|
+
if (child.type === 'script') return /*#__PURE__*/React.createElement(ScriptTag, _extends({}, scriptProps, {
|
|
15
|
+
key: child.key
|
|
16
|
+
}));
|
|
17
|
+
if (!children) return child;
|
|
18
|
+
return React.cloneElement(child, child.props, wrapScriptTags(children));
|
|
19
|
+
}
|
|
20
|
+
function wrapScriptTags(parsedCode) {
|
|
21
|
+
if (Array.isArray(parsedCode)) {
|
|
22
|
+
parsedCode.forEach((child, index) => {
|
|
23
|
+
try {
|
|
24
|
+
// modify children array as we just want to wrap single components
|
|
25
|
+
// eslint-disable-next-line no-param-reassign
|
|
26
|
+
parsedCode[index] = getWrappedScriptTag(child);
|
|
27
|
+
} catch {
|
|
28
|
+
// catch read-only element errors
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return parsedCode;
|
|
32
|
+
}
|
|
33
|
+
return getWrappedScriptTag(parsedCode);
|
|
34
|
+
}
|
|
35
|
+
export default wrapScriptTags;
|
|
36
|
+
//# sourceMappingURL=wrap-script-tags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrap-script-tags.js","names":["React","ScriptTag","getWrappedScriptTag","child","_child$props","props","children","scriptProps","_objectWithoutProperties","_excluded","type","createElement","_extends","key","cloneElement","wrapScriptTags","parsedCode","Array","isArray","forEach","index"],"sources":["../../../../src/components/Code/helpers/wrap-script-tags.js"],"sourcesContent":["import React from 'react';\nimport ScriptTag from '../ScriptTag';\n\nfunction getWrappedScriptTag(child) {\n if (!child) return child;\n\n if (typeof child === 'string') return child;\n\n const { children, ...scriptProps } = child.props;\n if (child.type === 'script') return <ScriptTag {...scriptProps} key={child.key} />;\n\n if (!children) return child;\n\n return React.cloneElement(child, child.props, wrapScriptTags(children));\n}\n\nfunction wrapScriptTags(parsedCode) {\n if (Array.isArray(parsedCode)) {\n parsedCode.forEach((child, index) => {\n try {\n // modify children array as we just want to wrap single components\n // eslint-disable-next-line no-param-reassign\n parsedCode[index] = getWrappedScriptTag(child);\n } catch {\n // catch read-only element errors\n }\n });\n\n return parsedCode;\n }\n\n return getWrappedScriptTag(parsedCode);\n}\n\nexport default wrapScriptTags;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,cAAc;AAEpC,SAASC,mBAAmBA,CAACC,KAAK,EAAE;EAClC,IAAI,CAACA,KAAK,EAAE,OAAOA,KAAK;EAExB,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE,OAAOA,KAAK;EAE3C,MAAAC,YAAA,GAAqCD,KAAK,CAACE,KAAK;IAA1C;MAAEC;IAAyB,CAAC,GAAAF,YAAA;IAAbG,WAAW,GAAAC,wBAAA,CAAAJ,YAAA,EAAAK,SAAA;EAChC,IAAIN,KAAK,CAACO,IAAI,KAAK,QAAQ,EAAE,oBAAOV,KAAA,CAAAW,aAAA,CAACV,SAAS,EAAAW,QAAA,KAAKL,WAAW;IAAEM,GAAG,EAAEV,KAAK,CAACU;EAAI,EAAE,CAAC;EAElF,IAAI,CAACP,QAAQ,EAAE,OAAOH,KAAK;EAE3B,OAAOH,KAAK,CAACc,YAAY,CAACX,KAAK,EAAEA,KAAK,CAACE,KAAK,EAAEU,cAAc,CAACT,QAAQ,CAAC,CAAC;AACzE;AAEA,SAASS,cAAcA,CAACC,UAAU,EAAE;EAClC,IAAIC,KAAK,CAACC,OAAO,CAACF,UAAU,CAAC,EAAE;IAC7BA,UAAU,CAACG,OAAO,CAAC,CAAChB,KAAK,EAAEiB,KAAK,KAAK;MACnC,IAAI;QACF;QACA;QACAJ,UAAU,CAACI,KAAK,CAAC,GAAGlB,mBAAmB,CAACC,KAAK,CAAC;MAChD,CAAC,CAAC,MAAM;QACN;MAAA;IAEJ,CAAC,CAAC;IAEF,OAAOa,UAAU;EACnB;EAEA,OAAOd,mBAAmB,CAACc,UAAU,CAAC;AACxC;AAEA,eAAeD,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["Code"],"sources":["../../../src/components/Code/index.js"],"sourcesContent":["import Code from './Code';\n\nexport default Code;\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,QAAQ;AAEzB,eAAeA,IAAI","ignoreList":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
const _excluded = ["contentType", "isFaqContent", "children"],
|
|
4
|
+
_excluded2 = ["topWrapperProps"];
|
|
5
|
+
import React, { Fragment, useMemo } from 'react';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import { CONTENT_GROUP_TYPES } from './constants';
|
|
8
|
+
import ContentGroupTabs from './ContentGroupTabs';
|
|
9
|
+
import ContentGroupAccordion from './ContentGroupAccordion';
|
|
10
|
+
import { getSectionsData } from './helpers';
|
|
11
|
+
import getStructuredDataProperties from './helpers/get-structured-data-properties';
|
|
12
|
+
const VALID_TYPES = Object.values(CONTENT_GROUP_TYPES);
|
|
13
|
+
const ContentGroup = _ref => {
|
|
14
|
+
var _children$props, _children$props$child;
|
|
15
|
+
let {
|
|
16
|
+
contentType,
|
|
17
|
+
isFaqContent,
|
|
18
|
+
children
|
|
19
|
+
} = _ref,
|
|
20
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
const groupSections = children === null || children === void 0 ? void 0 : (_children$props = children.props) === null || _children$props === void 0 ? void 0 : (_children$props$child = _children$props.children) === null || _children$props$child === void 0 ? void 0 : _children$props$child[1];
|
|
22
|
+
const GroupComponent = useMemo(() => contentType === CONTENT_GROUP_TYPES.ACCORDION ? ContentGroupAccordion : ContentGroupTabs, [contentType]);
|
|
23
|
+
const WrapperComponent = useMemo(() => !isFaqContent ? Fragment : 'div', [isFaqContent]);
|
|
24
|
+
const _useMemo = useMemo(() => getStructuredDataProperties(isFaqContent), [isFaqContent]),
|
|
25
|
+
{
|
|
26
|
+
topWrapperProps
|
|
27
|
+
} = _useMemo,
|
|
28
|
+
schemaProperties = _objectWithoutProperties(_useMemo, _excluded2);
|
|
29
|
+
if (!groupSections || !groupSections.length || !VALID_TYPES.includes(contentType)) return '';
|
|
30
|
+
const sectionsData = getSectionsData(groupSections);
|
|
31
|
+
return /*#__PURE__*/React.createElement(WrapperComponent, topWrapperProps, /*#__PURE__*/React.createElement(GroupComponent, _extends({
|
|
32
|
+
contentType: contentType,
|
|
33
|
+
groupSections: groupSections,
|
|
34
|
+
sectionsData: sectionsData
|
|
35
|
+
}, props, schemaProperties)));
|
|
36
|
+
};
|
|
37
|
+
ContentGroup.propTypes = {
|
|
38
|
+
children: PropTypes.object.isRequired,
|
|
39
|
+
contentType: PropTypes.oneOf(VALID_TYPES).isRequired,
|
|
40
|
+
isFaqContent: PropTypes.bool
|
|
41
|
+
};
|
|
42
|
+
ContentGroup.defaultProps = {
|
|
43
|
+
isFaqContent: false
|
|
44
|
+
};
|
|
45
|
+
export default ContentGroup;
|
|
46
|
+
//# sourceMappingURL=ContentGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentGroup.js","names":["React","Fragment","useMemo","PropTypes","CONTENT_GROUP_TYPES","ContentGroupTabs","ContentGroupAccordion","getSectionsData","getStructuredDataProperties","VALID_TYPES","Object","values","ContentGroup","_ref","_children$props","_children$props$child","contentType","isFaqContent","children","props","_objectWithoutProperties","_excluded","groupSections","GroupComponent","ACCORDION","WrapperComponent","_useMemo","topWrapperProps","schemaProperties","_excluded2","length","includes","sectionsData","createElement","_extends","propTypes","object","isRequired","oneOf","bool","defaultProps"],"sources":["../../../src/components/ContentGroup/ContentGroup.js"],"sourcesContent":["import React, { Fragment, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { CONTENT_GROUP_TYPES } from './constants';\nimport ContentGroupTabs from './ContentGroupTabs';\nimport ContentGroupAccordion from './ContentGroupAccordion';\nimport { getSectionsData } from './helpers';\nimport getStructuredDataProperties from './helpers/get-structured-data-properties';\n\nconst VALID_TYPES = Object.values(CONTENT_GROUP_TYPES);\n\nconst ContentGroup = ({ contentType, isFaqContent, children, ...props }) => {\n const groupSections = children?.props?.children?.[1];\n\n const GroupComponent = useMemo(\n () =>\n contentType === CONTENT_GROUP_TYPES.ACCORDION ? ContentGroupAccordion : ContentGroupTabs,\n [contentType]\n );\n const WrapperComponent = useMemo(() => (!isFaqContent ? Fragment : 'div'), [isFaqContent]);\n\n const { topWrapperProps, ...schemaProperties } = useMemo(\n () => getStructuredDataProperties(isFaqContent),\n [isFaqContent]\n );\n\n if (!groupSections || !groupSections.length || !VALID_TYPES.includes(contentType)) return '';\n\n const sectionsData = getSectionsData(groupSections);\n\n return (\n <WrapperComponent {...topWrapperProps}>\n <GroupComponent\n contentType={contentType}\n groupSections={groupSections}\n sectionsData={sectionsData}\n {...props}\n {...schemaProperties}\n />\n </WrapperComponent>\n );\n};\n\nContentGroup.propTypes = {\n children: PropTypes.object.isRequired,\n contentType: PropTypes.oneOf(VALID_TYPES).isRequired,\n isFaqContent: PropTypes.bool\n};\n\nContentGroup.defaultProps = {\n isFaqContent: false\n};\n\nexport default ContentGroup;\n"],"mappings":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a,IAAI,CAACA,aAAa,CAACQ,MAAM,IAAI,CAACrB,WAAW,CAACsB,QAAQ,CAACf,WAAW,CAAC,EAAE,OAAO,EAAE;EAE5F,MAAMgB,YAAY,GAAGzB,eAAe,CAACe,aAAa,CAAC;EAEnD,oBACEtB,KAAA,CAAAiC,aAAA,CAACR,gBAAgB,EAAKE,eAAe,eACnC3B,KAAA,CAAAiC,aAAA,CAACV,cAAc,EAAAW,QAAA;IACblB,WAAW,EAAEA,WAAY;IACzBM,aAAa,EAAEA,aAAc;IAC7BU,YAAY,EAAEA;EAAa,GACvBb,KAAK,EACLS,gBAAgB,CACrB,CACe,CAAC;AAEvB,CAAC;AAEDhB,YAAY,CAACuB,SAAS,GAAG;EACvBjB,QAAQ,EAAEf,SAAS,CAACiC,MAAM,CAACC,UAAU;EACrCrB,WAAW,EAAEb,SAAS,CAACmC,KAAK,CAAC7B,WAAW,CAAC,CAAC4B,UAAU;EACpDpB,YAAY,EAAEd,SAAS,CAACoC;AAC1B,CAAC;AAED3B,YAAY,CAAC4B,YAAY,GAAG;EAC1BvB,YAAY,EAAE;AAChB,CAAC;AAED,eAAeL,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
import { useRouter } from 'next/router';
|
|
6
|
+
import { VscChevronUp, VscChevronDown } from 'react-icons/vsc';
|
|
7
|
+
import { CONTENT_GROUP, OPEN_STATES } from './constants';
|
|
8
|
+
const ContentGroupAccordion = ({
|
|
9
|
+
name,
|
|
10
|
+
groupSections,
|
|
11
|
+
sectionsData,
|
|
12
|
+
VariantComponent,
|
|
13
|
+
openState,
|
|
14
|
+
groupSectionProps,
|
|
15
|
+
groupSectionTitleProps,
|
|
16
|
+
groupContentWrapperProps,
|
|
17
|
+
groupContentProps
|
|
18
|
+
}) => {
|
|
19
|
+
const router = useRouter();
|
|
20
|
+
const {
|
|
21
|
+
asPath
|
|
22
|
+
} = router;
|
|
23
|
+
const sectionPairs = useMemo(() => sectionsData.map(([sectionName, sectionLabel]) => ({
|
|
24
|
+
sectionName,
|
|
25
|
+
sectionLabel,
|
|
26
|
+
panelId: `${sectionName}-panel`
|
|
27
|
+
})), [sectionsData]);
|
|
28
|
+
const sectionNames = useMemo(() => sectionPairs.map(p => p.sectionName), [sectionPairs]);
|
|
29
|
+
const baseInitialOpen = useMemo(() => {
|
|
30
|
+
if (openState === OPEN_STATES.ALL_OPEN) return new Set(sectionNames);
|
|
31
|
+
if (openState === OPEN_STATES.ALL_CLOSED && sectionNames.length) return new Set();
|
|
32
|
+
return new Set([sectionNames[0]]);
|
|
33
|
+
}, [openState, sectionNames]);
|
|
34
|
+
const [openSet, setOpenSet] = useState(baseInitialOpen);
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
const rawHash = (asPath.split('#')[1] || '').trim();
|
|
37
|
+
if (rawHash && sectionNames.includes(rawHash) && !openSet.has(rawHash)) {
|
|
38
|
+
setOpenSet(prev => {
|
|
39
|
+
const next = new Set(prev);
|
|
40
|
+
next.add(rawHash);
|
|
41
|
+
return next;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
46
|
+
[asPath, sectionNames]);
|
|
47
|
+
const WrapperComponent = VariantComponent || 'div';
|
|
48
|
+
const baseClass = `${CONTENT_GROUP}-accordion`;
|
|
49
|
+
const itemsClass = `${baseClass}__items`;
|
|
50
|
+
const itemClass = `${baseClass}__item`;
|
|
51
|
+
const headerBtnClass = `${baseClass}__header-btn`;
|
|
52
|
+
const panelClass = `${baseClass}__panel`;
|
|
53
|
+
const headingClass = `${baseClass}__heading`;
|
|
54
|
+
const titleClass = `${baseClass}__title`;
|
|
55
|
+
const chevronClass = `${baseClass}__chevron`;
|
|
56
|
+
const chevronIconClass = `${baseClass}__chevron-icon`;
|
|
57
|
+
const onToggle = sectionName => {
|
|
58
|
+
setOpenSet(prev => {
|
|
59
|
+
const next = new Set(prev);
|
|
60
|
+
const willOpen = !next.has(sectionName);
|
|
61
|
+
if (willOpen) next.add(sectionName);else next.delete(sectionName);
|
|
62
|
+
const baseUrl = asPath.split('#')[0];
|
|
63
|
+
const newUrl = willOpen ? `${baseUrl}#${sectionName}` : baseUrl;
|
|
64
|
+
router.replace(`/Resolver`, newUrl, {
|
|
65
|
+
shallow: true,
|
|
66
|
+
scroll: false
|
|
67
|
+
});
|
|
68
|
+
return next;
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
className: baseClass
|
|
73
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
74
|
+
className: itemsClass,
|
|
75
|
+
"aria-label": name
|
|
76
|
+
}, groupSections.map((groupSection, index) => {
|
|
77
|
+
const {
|
|
78
|
+
sectionName,
|
|
79
|
+
sectionLabel,
|
|
80
|
+
panelId
|
|
81
|
+
} = sectionPairs[index];
|
|
82
|
+
const isOpen = openSet.has(sectionName);
|
|
83
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
84
|
+
key: sectionName,
|
|
85
|
+
className: classnames(itemClass, {
|
|
86
|
+
[`${itemClass}--open`]: isOpen
|
|
87
|
+
})
|
|
88
|
+
}, groupSectionProps), /*#__PURE__*/React.createElement("h3", {
|
|
89
|
+
className: headingClass
|
|
90
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
91
|
+
id: sectionName,
|
|
92
|
+
type: "button",
|
|
93
|
+
className: classnames(headerBtnClass, {
|
|
94
|
+
[`${headerBtnClass}--open`]: isOpen
|
|
95
|
+
}),
|
|
96
|
+
"aria-expanded": isOpen,
|
|
97
|
+
"aria-controls": panelId,
|
|
98
|
+
onClick: () => onToggle(sectionName)
|
|
99
|
+
}, /*#__PURE__*/React.createElement("span", _extends({
|
|
100
|
+
className: titleClass
|
|
101
|
+
}, groupSectionTitleProps), sectionLabel), /*#__PURE__*/React.createElement("span", {
|
|
102
|
+
"aria-hidden": "true",
|
|
103
|
+
className: chevronClass
|
|
104
|
+
}, isOpen ? /*#__PURE__*/React.createElement(VscChevronUp, {
|
|
105
|
+
className: chevronIconClass
|
|
106
|
+
}) : /*#__PURE__*/React.createElement(VscChevronDown, {
|
|
107
|
+
className: chevronIconClass
|
|
108
|
+
})))), /*#__PURE__*/React.createElement(WrapperComponent, _extends({
|
|
109
|
+
id: panelId,
|
|
110
|
+
role: "region",
|
|
111
|
+
"aria-labelledby": sectionName,
|
|
112
|
+
className: panelClass,
|
|
113
|
+
hidden: !isOpen,
|
|
114
|
+
"data-section": sectionName
|
|
115
|
+
}, groupContentWrapperProps), /*#__PURE__*/React.createElement("div", groupContentProps, groupSection)));
|
|
116
|
+
})));
|
|
117
|
+
};
|
|
118
|
+
ContentGroupAccordion.propTypes = {
|
|
119
|
+
name: PropTypes.string.isRequired,
|
|
120
|
+
groupSections: PropTypes.array.isRequired,
|
|
121
|
+
sectionsData: PropTypes.array.isRequired,
|
|
122
|
+
VariantComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.elementType]),
|
|
123
|
+
openState: PropTypes.oneOf(Object.values(OPEN_STATES)),
|
|
124
|
+
groupSectionProps: PropTypes.object,
|
|
125
|
+
groupSectionTitleProps: PropTypes.object,
|
|
126
|
+
groupContentWrapperProps: PropTypes.object,
|
|
127
|
+
groupContentProps: PropTypes.object
|
|
128
|
+
};
|
|
129
|
+
ContentGroupAccordion.defaultProps = {
|
|
130
|
+
VariantComponent: null,
|
|
131
|
+
openState: OPEN_STATES.ALL_CLOSED,
|
|
132
|
+
groupSectionProps: {},
|
|
133
|
+
groupSectionTitleProps: {},
|
|
134
|
+
groupContentWrapperProps: {},
|
|
135
|
+
groupContentProps: {}
|
|
136
|
+
};
|
|
137
|
+
export default ContentGroupAccordion;
|
|
138
|
+
//# sourceMappingURL=ContentGroupAccordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentGroupAccordion.js","names":["React","useEffect","useMemo","useState","PropTypes","classnames","useRouter","VscChevronUp","VscChevronDown","CONTENT_GROUP","OPEN_STATES","ContentGroupAccordion","name","groupSections","sectionsData","VariantComponent","openState","groupSectionProps","groupSectionTitleProps","groupContentWrapperProps","groupContentProps","router","asPath","sectionPairs","map","sectionName","sectionLabel","panelId","sectionNames","p","baseInitialOpen","ALL_OPEN","Set","ALL_CLOSED","length","openSet","setOpenSet","rawHash","split","trim","includes","has","prev","next","add","WrapperComponent","baseClass","itemsClass","itemClass","headerBtnClass","panelClass","headingClass","titleClass","chevronClass","chevronIconClass","onToggle","willOpen","delete","baseUrl","newUrl","replace","shallow","scroll","createElement","className","groupSection","index","isOpen","_extends","key","id","type","onClick","role","hidden","propTypes","string","isRequired","array","oneOfType","func","elementType","oneOf","Object","values","object","defaultProps"],"sources":["../../../src/components/ContentGroup/ContentGroupAccordion.js"],"sourcesContent":["import React, { useEffect, useMemo, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { useRouter } from 'next/router';\nimport { VscChevronUp, VscChevronDown } from 'react-icons/vsc';\nimport { CONTENT_GROUP, OPEN_STATES } from './constants';\n\nconst ContentGroupAccordion = ({\n name,\n groupSections,\n sectionsData,\n VariantComponent,\n openState,\n groupSectionProps,\n groupSectionTitleProps,\n groupContentWrapperProps,\n groupContentProps\n}) => {\n const router = useRouter();\n const { asPath } = router;\n\n const sectionPairs = useMemo(\n () =>\n sectionsData.map(([sectionName, sectionLabel]) => ({\n sectionName,\n sectionLabel,\n panelId: `${sectionName}-panel`\n })),\n [sectionsData]\n );\n\n const sectionNames = useMemo(() => sectionPairs.map(p => p.sectionName), [sectionPairs]);\n\n const baseInitialOpen = useMemo(\n () => {\n if (openState === OPEN_STATES.ALL_OPEN) return new Set(sectionNames);\n if (openState === OPEN_STATES.ALL_CLOSED && sectionNames.length) return new Set();\n\n return new Set([sectionNames[0]]);\n },\n [openState, sectionNames]\n );\n\n const [openSet, setOpenSet] = useState(baseInitialOpen);\n\n useEffect(\n () => {\n const rawHash = (asPath.split('#')[1] || '').trim();\n if (rawHash && sectionNames.includes(rawHash) && !openSet.has(rawHash)) {\n setOpenSet(prev => {\n const next = new Set(prev);\n next.add(rawHash);\n return next;\n });\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [asPath, sectionNames]\n );\n\n const WrapperComponent = VariantComponent || 'div';\n\n const baseClass = `${CONTENT_GROUP}-accordion`;\n const itemsClass = `${baseClass}__items`;\n const itemClass = `${baseClass}__item`;\n const headerBtnClass = `${baseClass}__header-btn`;\n const panelClass = `${baseClass}__panel`;\n const headingClass = `${baseClass}__heading`;\n const titleClass = `${baseClass}__title`;\n const chevronClass = `${baseClass}__chevron`;\n const chevronIconClass = `${baseClass}__chevron-icon`;\n\n const onToggle = sectionName => {\n setOpenSet(prev => {\n const next = new Set(prev);\n const willOpen = !next.has(sectionName);\n\n if (willOpen) next.add(sectionName);\n else next.delete(sectionName);\n\n const baseUrl = asPath.split('#')[0];\n const newUrl = willOpen ? `${baseUrl}#${sectionName}` : baseUrl;\n\n router.replace(`/Resolver`, newUrl, { shallow: true, scroll: false });\n\n return next;\n });\n };\n\n return (\n <div className={baseClass}>\n <div className={itemsClass} aria-label={name}>\n {groupSections.map((groupSection, index) => {\n const { sectionName, sectionLabel, panelId } = sectionPairs[index];\n const isOpen = openSet.has(sectionName);\n\n return (\n <div\n key={sectionName}\n className={classnames(itemClass, { [`${itemClass}--open`]: isOpen })}\n {...groupSectionProps}>\n <h3 className={headingClass}>\n <button\n id={sectionName}\n type=\"button\"\n className={classnames(headerBtnClass, { [`${headerBtnClass}--open`]: isOpen })}\n aria-expanded={isOpen}\n aria-controls={panelId}\n onClick={() => onToggle(sectionName)}>\n <span className={titleClass} {...groupSectionTitleProps}>\n {sectionLabel}\n </span>\n\n <span aria-hidden=\"true\" className={chevronClass}>\n {isOpen ? (\n <VscChevronUp className={chevronIconClass} />\n ) : (\n <VscChevronDown className={chevronIconClass} />\n )}\n </span>\n </button>\n </h3>\n\n <WrapperComponent\n id={panelId}\n role=\"region\"\n aria-labelledby={sectionName}\n className={panelClass}\n hidden={!isOpen}\n data-section={sectionName}\n {...groupContentWrapperProps}>\n <div {...groupContentProps}>{groupSection}</div>\n </WrapperComponent>\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n\nContentGroupAccordion.propTypes = {\n name: PropTypes.string.isRequired,\n groupSections: PropTypes.array.isRequired,\n sectionsData: PropTypes.array.isRequired,\n VariantComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.elementType]),\n openState: PropTypes.oneOf(Object.values(OPEN_STATES)),\n groupSectionProps: PropTypes.object,\n groupSectionTitleProps: PropTypes.object,\n groupContentWrapperProps: PropTypes.object,\n groupContentProps: PropTypes.object\n};\n\nContentGroupAccordion.defaultProps = {\n VariantComponent: null,\n openState: OPEN_STATES.ALL_CLOSED,\n groupSectionProps: {},\n groupSectionTitleProps: {},\n groupContentWrapperProps: {},\n groupContentProps: {}\n};\n\nexport default ContentGroupAccordion;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC3D,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,YAAY,EAAEC,cAAc,QAAQ,iBAAiB;AAC9D,SAASC,aAAa,EAAEC,WAAW,QAAQ,aAAa;AAExD,MAAMC,qBAAqB,GAAGA,CAAC;EAC7BC,IAAI;EACJC,aAAa;EACbC,YAAY;EACZC,gBAAgB;EAChBC,SAAS;EACTC,iBAAiB;EACjBC,sBAAsB;EACtBC,wBAAwB;EACxBC;AACF,CAAC,KAAK;EACJ,MAAMC,MAAM,GAAGf,SAAS,CAAC,CAAC;EAC1B,MAAM;IAAEgB;EAAO,CAAC,G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AAiB,EAAE,CAAC;AACtB,CAAC;AAED,eAAeT,qBAAqB","ignoreList":[]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { useRouter } from 'next/router';
|
|
4
|
+
import { getActiveTab } from './helpers';
|
|
5
|
+
import { TAB, TABS, SIDEPANEL, CONTENT_GROUP, PANEL } from './constants';
|
|
6
|
+
const ContentGroupTabs = ({
|
|
7
|
+
name,
|
|
8
|
+
contentType,
|
|
9
|
+
groupSections,
|
|
10
|
+
sectionsData,
|
|
11
|
+
VariantComponent
|
|
12
|
+
}) => {
|
|
13
|
+
const router = useRouter();
|
|
14
|
+
const [selectedTab, setSelectedTab] = useState(getActiveTab(sectionsData, ''));
|
|
15
|
+
const {
|
|
16
|
+
asPath
|
|
17
|
+
} = router;
|
|
18
|
+
const contentClassame = contentType === TAB ? TABS : SIDEPANEL;
|
|
19
|
+
const mainDivClass = `${CONTENT_GROUP}-${contentClassame}`;
|
|
20
|
+
const contentGroupClass = `${CONTENT_GROUP}-${contentClassame}__buttons-wrapper`;
|
|
21
|
+
const sectionClass = `${CONTENT_GROUP}-${contentClassame}__content-section`;
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
const activeTab = getActiveTab(sectionsData, asPath);
|
|
24
|
+
if (activeTab !== selectedTab) setSelectedTab(activeTab);
|
|
25
|
+
}, [asPath, sectionsData, selectedTab]);
|
|
26
|
+
const WrapperComponent = VariantComponent || 'div';
|
|
27
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: mainDivClass
|
|
29
|
+
}, /*#__PURE__*/React.createElement("ul", {
|
|
30
|
+
className: contentGroupClass,
|
|
31
|
+
role: "tablist",
|
|
32
|
+
"aria-label": name
|
|
33
|
+
}, groupSections.map((_, index) => {
|
|
34
|
+
const [sectionName, sectioLabel] = sectionsData[index];
|
|
35
|
+
const tabId = `${TAB}-${sectionName}`;
|
|
36
|
+
const isSelected = selectedTab === tabId;
|
|
37
|
+
const buttonClassName = `${CONTENT_GROUP}-${contentClassame}__button${isSelected ? '--is-active' : ''}`;
|
|
38
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
39
|
+
id: tabId,
|
|
40
|
+
key: tabId,
|
|
41
|
+
className: buttonClassName,
|
|
42
|
+
type: "button",
|
|
43
|
+
role: "tab",
|
|
44
|
+
"aria-selected": isSelected,
|
|
45
|
+
"aria-controls": sectionName,
|
|
46
|
+
onClick: () => {
|
|
47
|
+
const baseUrl = asPath.split('#')[0];
|
|
48
|
+
const newUrl = `${baseUrl}#${sectionName}`;
|
|
49
|
+
if (asPath === newUrl) return;
|
|
50
|
+
router.push(`/Resolver`, newUrl, {
|
|
51
|
+
shallow: true
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}, sectioLabel);
|
|
55
|
+
})), groupSections.map((groupSection, index) => {
|
|
56
|
+
const [sectionName] = sectionsData[index];
|
|
57
|
+
const tabId = `${TAB}-${sectionName}`;
|
|
58
|
+
const panelId = `${PANEL}-${sectionName}`;
|
|
59
|
+
const isSelected = selectedTab === tabId;
|
|
60
|
+
return /*#__PURE__*/React.createElement(WrapperComponent, {
|
|
61
|
+
key: panelId,
|
|
62
|
+
id: sectionName,
|
|
63
|
+
className: sectionClass,
|
|
64
|
+
role: "tabpanel",
|
|
65
|
+
tabId: tabId,
|
|
66
|
+
"aria-labelledby": tabId,
|
|
67
|
+
"aria-hidden": !isSelected,
|
|
68
|
+
tabIndex: isSelected ? 0 : -1
|
|
69
|
+
}, groupSection);
|
|
70
|
+
}));
|
|
71
|
+
};
|
|
72
|
+
ContentGroupTabs.propTypes = {
|
|
73
|
+
name: PropTypes.string.isRequired,
|
|
74
|
+
contentType: PropTypes.string.isRequired,
|
|
75
|
+
groupSections: PropTypes.array.isRequired,
|
|
76
|
+
sectionsData: PropTypes.array.isRequired,
|
|
77
|
+
VariantComponent: PropTypes.func
|
|
78
|
+
};
|
|
79
|
+
ContentGroupTabs.defaultProps = {
|
|
80
|
+
VariantComponent: null
|
|
81
|
+
};
|
|
82
|
+
export default ContentGroupTabs;
|
|
83
|
+
//# sourceMappingURL=ContentGroupTabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentGroupTabs.js","names":["React","useState","useEffect","PropTypes","useRouter","getActiveTab","TAB","TABS","SIDEPANEL","CONTENT_GROUP","PANEL","ContentGroupTabs","name","contentType","groupSections","sectionsData","VariantComponent","router","selectedTab","setSelectedTab","asPath","contentClassame","mainDivClass","contentGroupClass","sectionClass","activeTab","WrapperComponent","createElement","className","role","map","_","index","sectionName","sectioLabel","tabId","isSelected","buttonClassName","id","key","type","onClick","baseUrl","split","newUrl","push","shallow","groupSection","panelId","tabIndex","propTypes","string","isRequired","array","func","defaultProps"],"sources":["../../../src/components/ContentGroup/ContentGroupTabs.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { useRouter } from 'next/router';\nimport { getActiveTab } from './helpers';\nimport { TAB, TABS, SIDEPANEL, CONTENT_GROUP, PANEL } from './constants';\n\nconst ContentGroupTabs = ({ name, contentType, groupSections, sectionsData, VariantComponent }) => {\n const router = useRouter();\n const [selectedTab, setSelectedTab] = useState(getActiveTab(sectionsData, ''));\n const { asPath } = router;\n\n const contentClassame = contentType === TAB ? TABS : SIDEPANEL;\n const mainDivClass = `${CONTENT_GROUP}-${contentClassame}`;\n const contentGroupClass = `${CONTENT_GROUP}-${contentClassame}__buttons-wrapper`;\n const sectionClass = `${CONTENT_GROUP}-${contentClassame}__content-section`;\n\n useEffect(() => {\n const activeTab = getActiveTab(sectionsData, asPath);\n if (activeTab !== selectedTab) setSelectedTab(activeTab);\n }, [asPath, sectionsData, selectedTab]);\n\n const WrapperComponent = VariantComponent || 'div';\n\n return (\n <div className={mainDivClass}>\n <ul className={contentGroupClass} role=\"tablist\" aria-label={name}>\n {groupSections.map((_, index) => {\n const [sectionName, sectioLabel] = sectionsData[index];\n const tabId = `${TAB}-${sectionName}`;\n const isSelected = selectedTab === tabId;\n const buttonClassName = `${CONTENT_GROUP}-${contentClassame}__button${\n isSelected ? '--is-active' : ''\n }`;\n\n return (\n <button\n id={tabId}\n key={tabId}\n className={buttonClassName}\n type=\"button\"\n role=\"tab\"\n aria-selected={isSelected}\n aria-controls={sectionName}\n onClick={() => {\n const baseUrl = asPath.split('#')[0];\n const newUrl = `${baseUrl}#${sectionName}`;\n if (asPath === newUrl) return;\n router.push(`/Resolver`, newUrl, { shallow: true });\n }}>\n {sectioLabel}\n </button>\n );\n })}\n </ul>\n\n {groupSections.map((groupSection, index) => {\n const [sectionName] = sectionsData[index];\n const tabId = `${TAB}-${sectionName}`;\n const panelId = `${PANEL}-${sectionName}`;\n const isSelected = selectedTab === tabId;\n\n return (\n <WrapperComponent\n key={panelId}\n id={sectionName}\n className={sectionClass}\n role=\"tabpanel\"\n tabId={tabId}\n aria-labelledby={tabId}\n aria-hidden={!isSelected}\n tabIndex={isSelected ? 0 : -1}>\n {groupSection}\n </WrapperComponent>\n );\n })}\n </div>\n );\n};\n\nContentGroupTabs.propTypes = {\n name: PropTypes.string.isRequired,\n contentType: PropTypes.string.isRequired,\n groupSections: PropTypes.array.isRequired,\n sectionsData: PropTypes.array.isRequired,\n VariantComponent: PropTypes.func\n};\n\nContentGroupTabs.defaultProps = {\n VariantComponent: null\n};\n\nexport default ContentGroupTabs;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAClD,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,GAAG,EAAEC,IAAI,EAAEC,SAAS,EAAEC,aAAa,EAAEC,KAAK,QAAQ,aAAa;AAExE,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC,IAAI;EAAEC,WAAW;EAAEC,aAAa;EAAEC,YAAY;EAAEC;A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AC;AAEDpC,gBAAgB,CAACuC,SAAS,GAAG;EAC3BtC,IAAI,EAAET,SAAS,CAACgD,MAAM,CAACC,UAAU;EACjCvC,WAAW,EAAEV,SAAS,CAACgD,MAAM,CAACC,UAAU;EACxCtC,aAAa,EAAEX,SAAS,CAACkD,KAAK,CAACD,UAAU;EACzCrC,YAAY,EAAEZ,SAAS,CAACkD,KAAK,CAACD,UAAU;EACxCpC,gBAAgB,EAAEb,SAAS,CAACmD;AAC9B,CAAC;AAED3C,gBAAgB,CAAC4C,YAAY,GAAG;EAC9BvC,gBAAgB,EAAE;AACpB,CAAC;AAED,eAAeL,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const TAB = 'tab';
|
|
2
|
+
const TABS = 'tabs';
|
|
3
|
+
const SIDEPANEL = 'sidepanel';
|
|
4
|
+
const CONTENT_GROUP = 'content-group';
|
|
5
|
+
const PANEL = 'panel';
|
|
6
|
+
const FAQ_PAGE = 'https://schema.org/FAQPage';
|
|
7
|
+
const CONTENT_GROUP_TYPES = Object.freeze({
|
|
8
|
+
TAB: 'tab',
|
|
9
|
+
SIDEPANEL: 'sidepanel',
|
|
10
|
+
ACCORDION: 'accordion'
|
|
11
|
+
});
|
|
12
|
+
const OPEN_STATES = Object.freeze({
|
|
13
|
+
FIRST_OPEN: 'first_open',
|
|
14
|
+
ALL_CLOSED: 'all_closed',
|
|
15
|
+
ALL_OPEN: 'all_open'
|
|
16
|
+
});
|
|
17
|
+
export { TAB, TABS, SIDEPANEL, CONTENT_GROUP, PANEL, CONTENT_GROUP_TYPES, OPEN_STATES, FAQ_PAGE };
|
|
18
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","names":["TAB","TABS","SIDEPANEL","CONTENT_GROUP","PANEL","FAQ_PAGE","CONTENT_GROUP_TYPES","Object","freeze","ACCORDION","OPEN_STATES","FIRST_OPEN","ALL_CLOSED","ALL_OPEN"],"sources":["../../../src/components/ContentGroup/constants.js"],"sourcesContent":["const TAB = 'tab';\nconst TABS = 'tabs';\nconst SIDEPANEL = 'sidepanel';\nconst CONTENT_GROUP = 'content-group';\nconst PANEL = 'panel';\nconst FAQ_PAGE = 'https://schema.org/FAQPage';\n\nconst CONTENT_GROUP_TYPES = Object.freeze({\n TAB: 'tab',\n SIDEPANEL: 'sidepanel',\n ACCORDION: 'accordion'\n});\n\nconst OPEN_STATES = Object.freeze({\n FIRST_OPEN: 'first_open',\n ALL_CLOSED: 'all_closed',\n ALL_OPEN: 'all_open'\n});\n\nexport { TAB, TABS, SIDEPANEL, CONTENT_GROUP, PANEL, CONTENT_GROUP_TYPES, OPEN_STATES, FAQ_PAGE };\n"],"mappings":"AAAA,MAAMA,GAAG,GAAG,KAAK;AACjB,MAAMC,IAAI,GAAG,MAAM;AACnB,MAAMC,SAAS,GAAG,WAAW;AAC7B,MAAMC,aAAa,GAAG,eAAe;AACrC,MAAMC,KAAK,GAAG,OAAO;AACrB,MAAMC,QAAQ,GAAG,4BAA4B;AAE7C,MAAMC,mBAAmB,GAAGC,MAAM,CAACC,MAAM,CAAC;EACxCR,GAAG,EAAE,KAAK;EACVE,SAAS,EAAE,WAAW;EACtBO,SAAS,EAAE;AACb,CAAC,CAAC;AAEF,MAAMC,WAAW,GAAGH,MAAM,CAACC,MAAM,CAAC;EAChCG,UAAU,EAAE,YAAY;EACxBC,UAAU,EAAE,YAAY;EACxBC,QAAQ,EAAE;AACZ,CAAC,CAAC;AAEF,SAASb,GAAG,EAAEC,IAAI,EAAEC,SAAS,EAAEC,aAAa,EAAEC,KAAK,EAAEE,mBAAmB,EAAEI,WAAW,EAAEL,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TAB } from '../constants';
|
|
2
|
+
const getActiveTab = (sections, url) => {
|
|
3
|
+
const activeTabName = url.split('#')[1];
|
|
4
|
+
const isUrlTabValid = !!sections.find(section => section[0] === activeTabName);
|
|
5
|
+
const tabToUse = isUrlTabValid && activeTabName || sections[0][0];
|
|
6
|
+
return `${TAB}-${tabToUse}`;
|
|
7
|
+
};
|
|
8
|
+
export default getActiveTab;
|
|
9
|
+
//# sourceMappingURL=get-active-tab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-active-tab.js","names":["TAB","getActiveTab","sections","url","activeTabName","split","isUrlTabValid","find","section","tabToUse"],"sources":["../../../../src/components/ContentGroup/helpers/get-active-tab.js"],"sourcesContent":["import { TAB } from '../constants';\n\nconst getActiveTab = (sections, url) => {\n const activeTabName = url.split('#')[1];\n const isUrlTabValid = !!sections.find(section => section[0] === activeTabName);\n const tabToUse = (isUrlTabValid && activeTabName) || sections[0][0];\n return `${TAB}-${tabToUse}`;\n};\n\nexport default getActiveTab;\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,cAAc;AAElC,MAAMC,YAAY,GAAGA,CAACC,QAAQ,EAAEC,GAAG,KAAK;EACtC,MAAMC,aAAa,GAAGD,GAAG,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;EACvC,MAAMC,aAAa,GAAG,CAAC,CAACJ,QAAQ,CAACK,IAAI,CAACC,OAAO,IAAIA,OAAO,CAAC,CAAC,CAAC,KAAKJ,aAAa,CAAC;EAC9E,MAAMK,QAAQ,GAAIH,aAAa,IAAIF,aAAa,IAAKF,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;EACnE,OAAO,GAAGF,GAAG,IAAIS,QAAQ,EAAE;AAC7B,CAAC;AAED,eAAeR,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const getSectionsData = sections => sections.map(section => {
|
|
2
|
+
const {
|
|
3
|
+
props: {
|
|
4
|
+
component: {
|
|
5
|
+
settings: {
|
|
6
|
+
label,
|
|
7
|
+
name
|
|
8
|
+
} = {}
|
|
9
|
+
} = {}
|
|
10
|
+
} = {}
|
|
11
|
+
} = section;
|
|
12
|
+
return [encodeURI(name), label];
|
|
13
|
+
});
|
|
14
|
+
export default getSectionsData;
|
|
15
|
+
//# sourceMappingURL=get-sections-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-sections-data.js","names":["getSectionsData","sections","map","section","props","component","settings","label","name","encodeURI"],"sources":["../../../../src/components/ContentGroup/helpers/get-sections-data.js"],"sourcesContent":["const getSectionsData = sections =>\n sections.map(section => {\n const { props: { component: { settings: { label, name } = {} } = {} } = {} } = section;\n return [encodeURI(name), label];\n });\n\nexport default getSectionsData;\n"],"mappings":"AAAA,MAAMA,eAAe,GAAGC,QAAQ,IAC9BA,QAAQ,CAACC,GAAG,CAACC,OAAO,IAAI;EACtB,MAAM;IAAEC,KAAK,EAAE;MAAEC,SAAS,EAAE;QAAEC,QAAQ,EAAE;UAAEC,KAAK;UAAEC;QAAK,CAAC,GAAG,CAAC;MAAE,CAAC,GAAG,CAAC;IAAE,CAAC,GAAG,CAAC;EAAE,CAAC,GAAGL,OAAO;EACtF,OAAO,CAACM,SAAS,CAACD,IAAI,CAAC,EAAED,KAAK,CAAC;AACjC,CAAC,CAAC;AAEJ,eAAeP,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const getStructuredDataProperties = isFaqContent => {
|
|
2
|
+
const properties = {
|
|
3
|
+
topWrapperProps: {},
|
|
4
|
+
groupSectionProps: {},
|
|
5
|
+
groupSectionTitleProps: {},
|
|
6
|
+
groupContentWrapperProps: {},
|
|
7
|
+
groupContentProps: {}
|
|
8
|
+
};
|
|
9
|
+
if (!isFaqContent) return properties;
|
|
10
|
+
properties.topWrapperProps = {
|
|
11
|
+
itemScope: true,
|
|
12
|
+
itemType: 'https://schema.org/FAQPage'
|
|
13
|
+
};
|
|
14
|
+
properties.groupSectionProps = {
|
|
15
|
+
itemScope: true,
|
|
16
|
+
itemProp: 'mainEntity',
|
|
17
|
+
itemType: 'https://schema.org/Question'
|
|
18
|
+
};
|
|
19
|
+
properties.groupSectionTitleProps = {
|
|
20
|
+
itemProp: 'name'
|
|
21
|
+
};
|
|
22
|
+
properties.groupContentWrapperProps = {
|
|
23
|
+
itemScope: true,
|
|
24
|
+
itemProp: 'acceptedAnswer',
|
|
25
|
+
itemType: 'https://schema.org/Answer'
|
|
26
|
+
};
|
|
27
|
+
properties.groupContentProps = {
|
|
28
|
+
itemProp: 'text'
|
|
29
|
+
};
|
|
30
|
+
return properties;
|
|
31
|
+
};
|
|
32
|
+
export default getStructuredDataProperties;
|
|
33
|
+
//# sourceMappingURL=get-structured-data-properties.js.map
|