@blaze-cms/react-page-builder 0.146.0-node18-core-styles-tooltips.58 → 0.146.0-node18-core-styles-tooltips.60
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 +11 -0
- package/lib/BannerContext/index.js +1 -1
- package/lib/BannerContext/index.js.map +1 -1
- package/lib/HOC/withInfiniteScroll.js +2 -2
- package/lib/HOC/withInfiniteScroll.js.map +1 -1
- package/lib/HOC/withTitle.js +1 -1
- package/lib/HOC/withTitle.js.map +1 -1
- package/lib/application/query/index.js +0 -1
- package/lib/application/query/index.js.map +1 -1
- package/lib/components/BackToTop/BackToTop.js +1 -1
- package/lib/components/BackToTop/BackToTop.js.map +1 -1
- package/lib/components/Banner/AdSlotRender.js +2 -2
- package/lib/components/Banner/AdSlotRender.js.map +1 -1
- package/lib/components/Banner/Banner.js +2 -2
- package/lib/components/Banner/Banner.js.map +1 -1
- package/lib/components/Banner/helpers.js +3 -3
- package/lib/components/Banner/helpers.js.map +1 -1
- package/lib/components/Banner/index.js +2 -2
- package/lib/components/Banner/index.js.map +1 -1
- package/lib/components/BlazeLink.js +1 -1
- package/lib/components/BlazeLink.js.map +1 -1
- package/lib/components/Breadcrumb/Breadcrumb.js +2 -2
- package/lib/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/lib/components/Button.js +3 -3
- package/lib/components/Button.js.map +1 -1
- package/lib/components/Card/Card.js +1 -1
- package/lib/components/Card/Card.js.map +1 -1
- package/lib/components/Card/CardsContainer.js +2 -2
- package/lib/components/Card/CardsContainer.js.map +1 -1
- package/lib/components/Card/CardsRender.js +1 -1
- package/lib/components/Card/CardsRender.js.map +1 -1
- package/lib/components/Carousel/Carousel.js +1 -1
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselRender/CarouselRender.js +0 -1
- package/lib/components/Carousel/CarouselRender/CarouselRender.js.map +1 -1
- package/lib/components/CarouselWrapper/DefaultCarousel.js +1 -1
- package/lib/components/CarouselWrapper/DefaultCarousel.js.map +1 -1
- package/lib/components/ClickWrapper.js +1 -1
- package/lib/components/ClickWrapper.js.map +1 -1
- package/lib/components/Code/Code.js +1 -1
- package/lib/components/Code/Code.js.map +1 -1
- package/lib/components/Code/ScriptTag.js +1 -1
- package/lib/components/Code/ScriptTag.js.map +1 -1
- package/lib/components/ContentGroup/ContentGroup.js +40 -8
- package/lib/components/ContentGroup/ContentGroup.js.map +1 -1
- package/lib/components/ContentGroup/ContentGroupAccordion.js +1 -1
- package/lib/components/ContentGroup/ContentGroupAccordion.js.map +1 -1
- package/lib/components/ContentGroup/ContentGroupDataFetcher.js +94 -0
- package/lib/components/ContentGroup/ContentGroupDataFetcher.js.map +1 -0
- package/lib/components/ContentGroup/ContentGroupTabs.js +2 -2
- package/lib/components/ContentGroup/ContentGroupTabs.js.map +1 -1
- package/lib/components/ContentGroup/helpers/build-data-sections.js +67 -0
- package/lib/components/ContentGroup/helpers/build-data-sections.js.map +1 -0
- package/lib/components/ContentGroup/helpers/get-sections-data.js +0 -1
- package/lib/components/ContentGroup/helpers/get-sections-data.js.map +1 -1
- package/lib/components/ContentGroup/helpers/index.js +7 -0
- package/lib/components/ContentGroup/helpers/index.js.map +1 -1
- package/lib/components/ContentGroupSection/ContentGroupSection.js +3 -2
- package/lib/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryFactory.js +1 -1
- package/lib/components/DataSummary/DataSummaryFactory.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryRender.js +0 -1
- package/lib/components/DataSummary/DataSummaryRender.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js +2 -2
- package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js +2 -2
- package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js +2 -2
- package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js +2 -2
- package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js +2 -2
- package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/index.js +6 -6
- package/lib/components/DataSummary/DataSummaryTypes/index.js.map +1 -1
- package/lib/components/EmailConfirm/EmailConfirm.js +1 -1
- package/lib/components/EmailConfirm/EmailConfirm.js.map +1 -1
- package/lib/components/ErrorMessage/ErrorMessage.js.map +1 -1
- package/lib/components/ErrorMessage/index.js +2 -2
- package/lib/components/ErrorMessage/index.js.map +1 -1
- package/lib/components/Image/GlobalLightbox/GlobalLightbox.js +1 -1
- package/lib/components/Image/GlobalLightbox/GlobalLightbox.js.map +1 -1
- package/lib/components/Image/GlobalLightbox/index.js +2 -2
- package/lib/components/Image/GlobalLightbox/index.js.map +1 -1
- package/lib/components/Image/Image.js +1 -1
- package/lib/components/Image/Image.js.map +1 -1
- package/lib/components/Image/ImageFactory.js +2 -2
- package/lib/components/Image/ImageFactory.js.map +1 -1
- package/lib/components/Image/Lightbox/Lightbox.js +1 -1
- package/lib/components/Image/Lightbox/Lightbox.js.map +1 -1
- package/lib/components/ItemList/ItemListButton/ItemListButton.js +1 -1
- package/lib/components/ItemList/ItemListButton/ItemListButton.js.map +1 -1
- package/lib/components/ItemList/helpers/get-item-list-ids.js +0 -1
- package/lib/components/ItemList/helpers/get-item-list-ids.js.map +1 -1
- package/lib/components/ItemList/helpers/set-param-and-redirect.js +0 -1
- package/lib/components/ItemList/helpers/set-param-and-redirect.js.map +1 -1
- package/lib/components/Layout/LayoutFactory.js +2 -2
- package/lib/components/Layout/LayoutFactory.js.map +1 -1
- package/lib/components/Layout/LayoutWithStickyTimer.js +1 -1
- package/lib/components/Layout/LayoutWithStickyTimer.js.map +1 -1
- package/lib/components/LazyImage/index.js +2 -2
- package/lib/components/LazyImage/index.js.map +1 -1
- package/lib/components/List/ListFactory.js +1 -1
- package/lib/components/List/ListFactory.js.map +1 -1
- package/lib/components/List/ListRender.js +1 -1
- package/lib/components/List/ListRender.js.map +1 -1
- package/lib/components/List/components/Cards/CardsRender.js +1 -1
- package/lib/components/List/components/Cards/CardsRender.js.map +1 -1
- package/lib/components/List/components/Cards/CardsRenderWrapper.js +2 -2
- package/lib/components/List/components/Cards/CardsRenderWrapper.js.map +1 -1
- package/lib/components/List/components/Full/FullRender.js +2 -2
- package/lib/components/List/components/Full/FullRender.js.map +1 -1
- package/lib/components/List/components/Full/FullRenderItem.js +2 -2
- package/lib/components/List/components/Full/FullRenderItem.js.map +1 -1
- package/lib/components/List/components/Header/ListHeader.js +0 -1
- package/lib/components/List/components/Header/ListHeader.js.map +1 -1
- package/lib/components/List/components/Pagination/ListPagination.js +1 -1
- package/lib/components/List/components/Pagination/ListPagination.js.map +1 -1
- package/lib/components/List/components/helpers/check-if-should-render-banner.js +1 -0
- package/lib/components/List/components/helpers/check-if-should-render-banner.js.map +1 -1
- package/lib/components/List/components/helpers/check-if-should-render-gtm.js +1 -0
- package/lib/components/List/components/helpers/check-if-should-render-gtm.js.map +1 -1
- package/lib/components/List/helpers/build-query-booster.js +1 -2
- package/lib/components/List/helpers/build-query-booster.js.map +1 -1
- package/lib/components/Loading/index.js +2 -2
- package/lib/components/Loading/index.js.map +1 -1
- package/lib/components/Menu/Menu.js +1 -1
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/MenuItem/MenuItemRender.js +1 -1
- package/lib/components/MenuItem/MenuItemRender.js.map +1 -1
- package/lib/components/Modal/Modal.js.map +1 -1
- package/lib/components/ModalAdapter/ModalAdapter.js +1 -1
- package/lib/components/ModalAdapter/ModalAdapter.js.map +1 -1
- package/lib/components/ModalAdapter/index.js +2 -2
- package/lib/components/ModalAdapter/index.js.map +1 -1
- package/lib/components/SearchContent/SearchContent.js +1 -1
- package/lib/components/SearchContent/SearchContent.js.map +1 -1
- package/lib/components/SearchContent/SearchContentItems.js +0 -1
- package/lib/components/SearchContent/SearchContentItems.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/FiltersList.js +2 -2
- package/lib/components/SearchFilter/SearchFilter/FiltersList.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/SearchFilter.js +1 -1
- package/lib/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilterContainer.js +2 -1
- package/lib/components/SearchFilter/SearchFilterContainer.js.map +1 -1
- package/lib/components/SearchFilter/components/Checkbox.js +1 -1
- package/lib/components/SearchFilter/components/Checkbox.js.map +1 -1
- package/lib/components/SearchFilter/components/Range.js.map +1 -1
- package/lib/components/SearchFilter/components/Select.js.map +1 -1
- package/lib/components/SearchFilter/components/TextSearch.js.map +1 -1
- package/lib/components/SearchFilter/helpers/get-filter-value-from-query.js +0 -1
- package/lib/components/SearchFilter/helpers/get-filter-value-from-query.js.map +1 -1
- package/lib/components/SearchFilter/helpers/get-select-options.js +0 -1
- package/lib/components/SearchFilter/helpers/get-select-options.js.map +1 -1
- package/lib/components/SearchFilter/helpers/parse-filter-value.js +0 -1
- package/lib/components/SearchFilter/helpers/parse-filter-value.js.map +1 -1
- package/lib/components/SearchFilterSort/SearchFilterSort.js +0 -1
- package/lib/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
- package/lib/components/SocialFollow/SocialFollowRender.js +0 -1
- package/lib/components/SocialFollow/SocialFollowRender.js.map +1 -1
- package/lib/components/Video/VideoModal.js +1 -1
- package/lib/components/Video/VideoModal.js.map +1 -1
- package/lib/components/Video/VideoRender.js +1 -1
- package/lib/components/Video/VideoRender.js.map +1 -1
- package/lib/components/Video/providers/JWPlayer/JWPlayerController.js +2 -1
- package/lib/components/Video/providers/JWPlayer/JWPlayerController.js.map +1 -1
- package/lib/components/Video/providers/JWPlayer/JWPlayerProvider.js +1 -1
- package/lib/components/Video/providers/JWPlayer/JWPlayerProvider.js.map +1 -1
- package/lib/components/Video/providers/Vimeo/VimeoProvider.js +2 -2
- package/lib/components/Video/providers/Vimeo/VimeoProvider.js.map +1 -1
- package/lib/components/Video/providers/YouTube/YoutubeEmbeded.js +1 -1
- package/lib/components/Video/providers/YouTube/YoutubeEmbeded.js.map +1 -1
- package/lib/components/Video/providers/get-provider.js +6 -6
- package/lib/components/Video/providers/get-provider.js.map +1 -1
- package/lib/components/index.js +31 -31
- package/lib/components/index.js.map +1 -1
- package/lib/helpers/build-query-fields.js +0 -1
- package/lib/helpers/build-query-fields.js.map +1 -1
- package/lib/helpers/build-raw-query-stringified.js +0 -1
- package/lib/helpers/build-raw-query-stringified.js.map +1 -1
- package/lib/helpers/check-props-to-use.js +0 -1
- package/lib/helpers/check-props-to-use.js.map +1 -1
- package/lib/helpers/get-component-id.js +7 -1
- package/lib/helpers/get-component-id.js.map +1 -1
- package/lib/helpers/get-entities-with-banner.js +1 -1
- package/lib/helpers/get-generic-render-variables.js +0 -1
- package/lib/helpers/get-generic-render-variables.js.map +1 -1
- package/lib/helpers/get-wrapped-value-with-link.js +0 -1
- package/lib/helpers/get-wrapped-value-with-link.js.map +1 -1
- package/lib/helpers/inject-multiple-banners/get-banners-for-entities/get-banners-for-entities.js +0 -1
- package/lib/helpers/inject-multiple-banners/get-banners-for-entities/get-banners-for-entities.js.map +1 -1
- package/lib/helpers/inject-multiple-banners/get-banners-for-nodes/get-banners-for-nodes.js +1 -1
- package/lib/helpers/parse-TextBlock.js +1 -1
- package/lib/helpers/parse-TextBlock.js.map +1 -1
- package/lib/helpers/parse-props-to-display.js +1 -1
- package/lib/helpers/parse-props-to-display.js.map +1 -1
- package/lib/helpers/process-data-summary-value.js +3 -2
- package/lib/helpers/process-data-summary-value.js.map +1 -1
- package/lib/helpers/remove-unwanted-characters.js +1 -1
- package/lib/helpers/render-children.js +3 -3
- package/lib/helpers/render-children.js.map +1 -1
- package/lib/hooks/helpers/StoreImages.js +4 -3
- package/lib/hooks/helpers/StoreImages.js.map +1 -1
- package/lib/hooks/helpers/get-lightbox-images.js +7 -7
- package/lib/hooks/helpers/get-lightbox-images.js.map +1 -1
- package/lib/hooks/helpers/inject-textblock-banners.js +1 -1
- package/lib/hooks/helpers/inject-textblock-banners.js.map +1 -1
- package/lib/hooks/use-app-event-hook.js +1 -2
- package/lib/hooks/use-app-event-hook.js.map +1 -1
- package/lib/hooks/use-page-builder.js +1 -1
- package/lib/hooks/use-page-builder.js.map +1 -1
- package/lib/hooks/use-portal.js +1 -1
- package/lib/hooks/use-portal.js.map +1 -1
- package/lib/system-components/EditorMode/BlazeLogo.js +1 -1
- package/lib/system-components/EditorMode/BlazeLogo.js.map +1 -1
- package/lib/system-components/EditorMode/PbWrapper.js +2 -2
- package/lib/system-components/EditorMode/PbWrapper.js.map +1 -1
- package/lib/system-components/EditorMode/helpers/add-editor-mode-event-listeners.js +3 -3
- package/lib/system-components/EditorMode/helpers/add-editor-mode-event-listeners.js.map +1 -1
- package/lib/system-components/index.js +1 -1
- package/lib/system-components/index.js.map +1 -1
- package/lib/utils/get-props-to-display-modifiers.js +0 -1
- package/lib/utils/get-props-to-display-modifiers.js.map +1 -1
- package/lib/variants/FloatingSideButton/index.js.map +1 -1
- package/lib/variants/HeroImage/index.js.map +1 -1
- package/lib/variants/Infographic/index.js +2 -2
- package/lib/variants/Infographic/index.js.map +1 -1
- package/lib/variants/LiveBlogList/LiveBlogList.js +1 -1
- package/lib/variants/LiveBlogList/LiveBlogList.js.map +1 -1
- package/lib/variants/LiveBlogList/index.js +2 -2
- package/lib/variants/LiveBlogList/index.js.map +1 -1
- package/lib/variants/LongformGallery/LongformGallery.js +0 -1
- package/lib/variants/LongformGallery/LongformGallery.js.map +1 -1
- package/lib/variants/LongformGallery/LongformGalleryImage.js.map +1 -1
- package/lib/variants/LongformGallery/index.js +2 -2
- package/lib/variants/LongformGallery/index.js.map +1 -1
- package/lib/variants/LongformRow/index.js.map +1 -1
- package/lib/variants/ParallaxImageTextRight/index.js.map +1 -1
- package/lib/variants/SlideSummary/index.js +2 -2
- package/lib/variants/SlideSummary/index.js.map +1 -1
- package/lib/variants/ThumbnailCarousel/ThumbnailCarousel.js +0 -1
- package/lib/variants/ThumbnailCarousel/ThumbnailCarousel.js.map +1 -1
- package/lib/variants/ThumbnailCarousel/index.js +2 -2
- package/lib/variants/ThumbnailCarousel/index.js.map +1 -1
- package/lib-es/HOC/recreateOnNavigation.js.map +1 -1
- package/lib-es/HOC/withTitle.js.map +1 -1
- package/lib-es/application/query/index.js.map +1 -1
- package/lib-es/components/Banner/AdSlotRender.js.map +1 -1
- package/lib-es/components/Banner/Banner.js.map +1 -1
- package/lib-es/components/Banner/BannerRender.js.map +1 -1
- package/lib-es/components/Banner/helpers.js.map +1 -1
- package/lib-es/components/Banner/index.js +1 -1
- package/lib-es/components/Banner/index.js.map +1 -1
- package/lib-es/components/Card/Card.js.map +1 -1
- package/lib-es/components/Card/CardsFactory.js.map +1 -1
- package/lib-es/components/Card/helpers/get-dynamic-grid-classes.js.map +1 -1
- package/lib-es/components/CarouselWrapper/DefaultCarousel.js.map +1 -1
- package/lib-es/components/CarouselWrapper/SmoothScrollCarousel.js.map +1 -1
- package/lib-es/components/ContentGroup/ContentGroup.js +41 -9
- package/lib-es/components/ContentGroup/ContentGroup.js.map +1 -1
- package/lib-es/components/ContentGroup/ContentGroupAccordion.js.map +1 -1
- package/lib-es/components/ContentGroup/ContentGroupDataFetcher.js +88 -0
- package/lib-es/components/ContentGroup/ContentGroupDataFetcher.js.map +1 -0
- package/lib-es/components/ContentGroup/ContentGroupTabs.js.map +1 -1
- package/lib-es/components/ContentGroup/helpers/build-data-sections.js +38 -0
- package/lib-es/components/ContentGroup/helpers/build-data-sections.js.map +1 -0
- package/lib-es/components/ContentGroup/helpers/get-active-tab.js.map +1 -1
- package/lib-es/components/ContentGroup/helpers/index.js +2 -1
- package/lib-es/components/ContentGroup/helpers/index.js.map +1 -1
- package/lib-es/components/ContentGroupSection/ContentGroupSection.js +3 -2
- package/lib-es/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummary.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/index.js +5 -5
- package/lib-es/components/DataSummary/DataSummaryTypes/index.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/get-link-based-on-value.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/get-prop-value.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/get-value-from-array.js.map +1 -1
- package/lib-es/components/EmailConfirm/EmailConfirm.js.map +1 -1
- package/lib-es/components/EmailConfirm/mutation.js.map +1 -1
- package/lib-es/components/ErrorMessage/index.js +1 -1
- package/lib-es/components/ErrorMessage/index.js.map +1 -1
- package/lib-es/components/Iframe/Iframe.js.map +1 -1
- package/lib-es/components/Image/GlobalLightbox/GlobalLightbox.js.map +1 -1
- package/lib-es/components/Image/GlobalLightbox/NavButton.js.map +1 -1
- package/lib-es/components/Image/GlobalLightbox/index.js +1 -1
- package/lib-es/components/Image/GlobalLightbox/index.js.map +1 -1
- package/lib-es/components/ItemList/ItemListCounter/ItemListCounter.js.map +1 -1
- package/lib-es/components/ItemList/ItemListNew/ItemListNew.js.map +1 -1
- package/lib-es/components/ItemList/helpers/get-item-list-id.js.map +1 -1
- package/lib-es/components/ItemList/helpers/set-item-list-id.js.map +1 -1
- package/lib-es/components/Layout/Layout.js.map +1 -1
- package/lib-es/components/Layout/LayoutFactory.js +1 -1
- package/lib-es/components/Layout/LayoutFactory.js.map +1 -1
- package/lib-es/components/Layout/helpers/get-styles-to-update.js.map +1 -1
- package/lib-es/components/LazyImage/index.js +1 -1
- package/lib-es/components/LazyImage/index.js.map +1 -1
- package/lib-es/components/List/components/Header/ListHeader.js.map +1 -1
- package/lib-es/components/List/components/Pagination/Classic.js.map +1 -1
- package/lib-es/components/List/helpers/build-az-url.js.map +1 -1
- package/lib-es/components/List/helpers/build-pagination-items.js.map +1 -1
- package/lib-es/components/List/helpers/build-pagination-url.js.map +1 -1
- package/lib-es/components/List/helpers/get-az-query-filter.js.map +1 -1
- package/lib-es/components/List/helpers/get-list-query.js.map +1 -1
- package/lib-es/components/Loading/Loading.js.map +1 -1
- package/lib-es/components/Loading/index.js +1 -1
- package/lib-es/components/Loading/index.js.map +1 -1
- package/lib-es/components/Menu/Menu.js.map +1 -1
- package/lib-es/components/MenuItem/MenuItemRender.js.map +1 -1
- package/lib-es/components/MenuItem/helpers/inject-helper-into-template.js.map +1 -1
- package/lib-es/components/MenuItem/helpers/isUrlPathMatch.js.map +1 -1
- package/lib-es/components/ModalAdapter/ModalAdapter.js +1 -1
- package/lib-es/components/ModalAdapter/ModalAdapter.js.map +1 -1
- package/lib-es/components/ModalAdapter/index.js +1 -1
- package/lib-es/components/ModalAdapter/index.js.map +1 -1
- package/lib-es/components/SearchContent/SearchContent.js.map +1 -1
- package/lib-es/components/SearchContent/SearchContentResults.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilterContainer.js.map +1 -1
- package/lib-es/components/SearchFilter/components/Checkbox.js.map +1 -1
- package/lib-es/components/SearchFilter/components/Range.js.map +1 -1
- package/lib-es/components/SearchFilter/components/Select.js.map +1 -1
- package/lib-es/components/SearchFilter/constants.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/build-list-name-query.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/build-new-url.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/build-url-query.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/get-responsive-filter-classnames.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/get-updated-filter-by.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/parse-filter-value.js.map +1 -1
- package/lib-es/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
- package/lib-es/components/SearchFilterSort/helpers/handle-sort-update.js.map +1 -1
- package/lib-es/components/SearchFilterSort/helpers/update-sort.js.map +1 -1
- package/lib-es/components/SocialFollow/SFItem.js.map +1 -1
- package/lib-es/components/Video/Video.js.map +1 -1
- package/lib-es/components/Video/providers/Vimeo/VimeoProvider.js.map +1 -1
- package/lib-es/components/Video/providers/Vimeo/helpers/add-extra-params-to-url.js.map +1 -1
- package/lib-es/components/Video/providers/YouTube/YouTubeProvider.js.map +1 -1
- package/lib-es/components/Video/providers/YouTube/YoutubeEmbeded.js.map +1 -1
- package/lib-es/components/Video/providers/YouTube/helpers/index.js.map +1 -1
- package/lib-es/components/Video/providers/get-provider.js +5 -5
- package/lib-es/components/Video/providers/get-provider.js.map +1 -1
- package/lib-es/components/Wrapper.js.map +1 -1
- package/lib-es/components/index.js +30 -30
- package/lib-es/components/index.js.map +1 -1
- package/lib-es/constants/componentsDefaultValues.js.map +1 -1
- package/lib-es/constants/index.js.map +1 -1
- package/lib-es/helpers/build-az-filter.js.map +1 -1
- package/lib-es/helpers/build-filters-query.js.map +1 -1
- package/lib-es/helpers/build-inherited-filters.js.map +1 -1
- package/lib-es/helpers/build-props-query.js.map +1 -1
- package/lib-es/helpers/build-query-fields.js.map +1 -1
- package/lib-es/helpers/build-query-key.js.map +1 -1
- package/lib-es/helpers/build-raw-query-base.js.map +1 -1
- package/lib-es/helpers/build-raw-query-stringified.js.map +1 -1
- package/lib-es/helpers/build-search-values-checkbox-select.js.map +1 -1
- package/lib-es/helpers/build-sort-values.js.map +1 -1
- package/lib-es/helpers/get-component-id.js +9 -3
- package/lib-es/helpers/get-component-id.js.map +1 -1
- package/lib-es/helpers/get-display-count-data.js.map +1 -1
- package/lib-es/helpers/get-entity-data.js.map +1 -1
- package/lib-es/helpers/get-extra-az-bits.js.map +1 -1
- package/lib-es/helpers/get-inherited-filters.js.map +1 -1
- package/lib-es/helpers/get-modifiers.js.map +1 -1
- package/lib-es/helpers/get-pagination-index.js.map +1 -1
- package/lib-es/helpers/get-query-props.js.map +1 -1
- package/lib-es/helpers/get-sort-by-field-name.js.map +1 -1
- package/lib-es/helpers/inject-multiple-banners/get-banners-for-nodes/get-banners-for-nodes.js.map +1 -1
- package/lib-es/helpers/is-filter-entitys-id.js.map +1 -1
- package/lib-es/helpers/process-data-summary-value.js +1 -1
- package/lib-es/hooks/helpers/StoreImages.js +2 -2
- package/lib-es/hooks/helpers/StoreImages.js.map +1 -1
- package/lib-es/hooks/helpers/append-gtm-classname.js.map +1 -1
- package/lib-es/hooks/helpers/buildPBComponents.js.map +1 -1
- package/lib-es/hooks/helpers/inject-textblock-banners.js +1 -1
- package/lib-es/hooks/helpers/inject-textblock-banners.js.map +1 -1
- package/lib-es/hooks/helpers/insert-banners.js.map +1 -1
- package/lib-es/hooks/helpers/update-targetings.js.map +1 -1
- package/lib-es/hooks/use-app-event-hook.js.map +1 -1
- package/lib-es/hooks/use-app-sync-event-hook.js.map +1 -1
- package/lib-es/hooks/use-get-image-id-from-relation.js.map +1 -1
- package/lib-es/system-components/EditorMode/PbWrapper.js +1 -1
- package/lib-es/system-components/EditorMode/PbWrapper.js.map +1 -1
- package/lib-es/system-components/EditorMode/helpers/add-editor-mode-event-listeners.js.map +1 -1
- package/lib-es/utils/component-map.js.map +1 -1
- package/lib-es/utils/get-class-modifiers.js.map +1 -1
- package/lib-es/utils/variant-handler.js.map +1 -1
- package/lib-es/variants/Infographic/index.js +1 -1
- package/lib-es/variants/Infographic/index.js.map +1 -1
- package/lib-es/variants/Infographic/useInfographic.js.map +1 -1
- package/lib-es/variants/LiveBlogList/LiveBlogList.js.map +1 -1
- package/lib-es/variants/LiveBlogList/index.js +1 -1
- package/lib-es/variants/LiveBlogList/index.js.map +1 -1
- package/lib-es/variants/LongformGallery/LongformGalleryImage.js.map +1 -1
- package/lib-es/variants/LongformGallery/constants.js.map +1 -1
- package/lib-es/variants/LongformGallery/index.js +1 -1
- package/lib-es/variants/LongformGallery/index.js.map +1 -1
- package/lib-es/variants/SlideSummary/index.js +1 -1
- package/lib-es/variants/SlideSummary/index.js.map +1 -1
- package/lib-es/variants/ThumbnailCarousel/index.js +1 -1
- package/lib-es/variants/ThumbnailCarousel/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/ContentGroup/ContentGroup.js +54 -8
- package/src/components/ContentGroup/ContentGroupDataFetcher.js +74 -0
- package/src/components/ContentGroup/helpers/build-data-sections.js +35 -0
- package/src/components/ContentGroup/helpers/index.js +2 -1
- package/src/components/ContentGroupSection/ContentGroupSection.js +2 -2
- package/src/helpers/get-component-id.js +7 -4
- package/tests/unit/src/components/ContentGroup/ContentGroup.test.js +195 -40
- package/tests/unit/src/components/ContentGroup/helpers/build-data-sections.test.js +115 -0
- package/tests/unit/src/helpers/get-component-id.test.js +64 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.array.iterator.js");
|
|
4
|
+
require("core-js/modules/es.object.define-property.js");
|
|
5
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
6
|
+
require("core-js/modules/es.object.to-string.js");
|
|
7
|
+
require("core-js/modules/es.string.iterator.js");
|
|
8
|
+
require("core-js/modules/es.weak-map.js");
|
|
9
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
10
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
11
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
12
|
+
Object.defineProperty(exports, "__esModule", {
|
|
13
|
+
value: true
|
|
14
|
+
});
|
|
15
|
+
exports["default"] = void 0;
|
|
16
|
+
require("core-js/modules/es.array.is-array.js");
|
|
17
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
18
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
19
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
20
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
22
|
+
var _client = require("@apollo/client");
|
|
23
|
+
var _nextjsComponents = require("@blaze-cms/nextjs-components");
|
|
24
|
+
var _query = require("../../application/query");
|
|
25
|
+
var _ContentGroupTabs = _interopRequireDefault(require("./ContentGroupTabs"));
|
|
26
|
+
var _ContentGroupAccordion = _interopRequireDefault(require("./ContentGroupAccordion"));
|
|
27
|
+
var _helpers = require("./helpers");
|
|
28
|
+
var _constants = require("./constants");
|
|
29
|
+
var _excluded = ["dataProperty", "parent", "contentType"];
|
|
30
|
+
var _templateObject;
|
|
31
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
32
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
33
|
+
var PLACEHOLDER_QUERY = (0, _client.gql)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n query {\n __typename\n }\n"])));
|
|
34
|
+
var ContentGroupDataFetcher = function ContentGroupDataFetcher(_ref) {
|
|
35
|
+
var dataProperty = _ref.dataProperty,
|
|
36
|
+
parent = _ref.parent,
|
|
37
|
+
contentType = _ref.contentType,
|
|
38
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
39
|
+
var _useContext = (0, _react.useContext)(_nextjsComponents.MainContext),
|
|
40
|
+
isPreview = _useContext.isPreview;
|
|
41
|
+
var dataPropertyName = Array.isArray(dataProperty) ? dataProperty[0] : dataProperty;
|
|
42
|
+
var _useQuery = (0, _client.useQuery)(_query.getSingleEntitySchema, {
|
|
43
|
+
variables: {
|
|
44
|
+
id: parent === null || parent === void 0 ? void 0 : parent.itemEntity
|
|
45
|
+
},
|
|
46
|
+
skip: !(parent === null || parent === void 0 ? void 0 : parent.itemEntity) || !dataPropertyName
|
|
47
|
+
}),
|
|
48
|
+
schemaData = _useQuery.data,
|
|
49
|
+
schemaLoading = _useQuery.loading;
|
|
50
|
+
var dataQuery = (0, _react.useMemo)(function () {
|
|
51
|
+
if (!schemaData) return null;
|
|
52
|
+
var getEntitySchema = schemaData.getEntitySchema;
|
|
53
|
+
var _getEntitySchema$acti = getEntitySchema.actions,
|
|
54
|
+
_getEntitySchema$acti2 = _getEntitySchema$acti === void 0 ? {} : _getEntitySchema$acti,
|
|
55
|
+
getPublished = _getEntitySchema$acti2.getPublished,
|
|
56
|
+
get = _getEntitySchema$acti2.get;
|
|
57
|
+
var actionKey = isPreview ? get : getPublished || get;
|
|
58
|
+
if (!actionKey) return null;
|
|
59
|
+
return (0, _query.generateSingleItemQuery)(actionKey, "".concat(dataPropertyName, " { label text }"));
|
|
60
|
+
}, [schemaData, isPreview, dataPropertyName]);
|
|
61
|
+
var _useQuery2 = (0, _client.useQuery)(dataQuery || PLACEHOLDER_QUERY, {
|
|
62
|
+
variables: {
|
|
63
|
+
id: parent === null || parent === void 0 ? void 0 : parent.itemId
|
|
64
|
+
},
|
|
65
|
+
skip: !dataQuery || !(parent === null || parent === void 0 ? void 0 : parent.itemId)
|
|
66
|
+
}),
|
|
67
|
+
recordData = _useQuery2.data,
|
|
68
|
+
recordLoading = _useQuery2.loading;
|
|
69
|
+
if (schemaLoading || recordLoading) return '';
|
|
70
|
+
if (!(recordData === null || recordData === void 0 ? void 0 : recordData.entityData)) return null;
|
|
71
|
+
var propertyData = recordData.entityData[dataPropertyName];
|
|
72
|
+
if (!propertyData || !propertyData.length) return null;
|
|
73
|
+
var _buildDataSections = (0, _helpers.buildDataSections)(propertyData),
|
|
74
|
+
groupSections = _buildDataSections.groupSections,
|
|
75
|
+
sectionsData = _buildDataSections.sectionsData;
|
|
76
|
+
if (!groupSections.length) return null;
|
|
77
|
+
var GroupComponent = contentType === _constants.CONTENT_GROUP_TYPES.ACCORDION ? _ContentGroupAccordion["default"] : _ContentGroupTabs["default"];
|
|
78
|
+
return /*#__PURE__*/_react["default"].createElement(GroupComponent, (0, _extends2["default"])({
|
|
79
|
+
contentType: contentType,
|
|
80
|
+
groupSections: groupSections,
|
|
81
|
+
sectionsData: sectionsData
|
|
82
|
+
}, props));
|
|
83
|
+
};
|
|
84
|
+
ContentGroupDataFetcher.propTypes = {
|
|
85
|
+
dataProperty: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].arrayOf(_propTypes["default"].string)]),
|
|
86
|
+
parent: _propTypes["default"].object,
|
|
87
|
+
contentType: _propTypes["default"].string.isRequired
|
|
88
|
+
};
|
|
89
|
+
ContentGroupDataFetcher.defaultProps = {
|
|
90
|
+
dataProperty: null,
|
|
91
|
+
parent: null
|
|
92
|
+
};
|
|
93
|
+
var _default = exports["default"] = ContentGroupDataFetcher;
|
|
94
|
+
//# sourceMappingURL=ContentGroupDataFetcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentGroupDataFetcher.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_client","_nextjsComponents","_query","_ContentGroupTabs","_ContentGroupAccordion","_helpers","_constants","_excluded","_templateObject","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","PLACEHOLDER_QUERY","gql","_taggedTemplateLiteral2","ContentGroupDataFetcher","_ref","dataProperty","parent","contentType","props","_objectWithoutProperties2","_useContext","useContext","MainContext","isPreview","dataPropertyName","Array","isArray","_useQuery","useQuery","getSingleEntitySchema","variables","id","itemEntity","skip","schemaData","data","schemaLoading","loading","dataQuery","useMemo","getEntitySchema","_getEntitySchema$acti","actions","_getEntitySchema$acti2","getPublished","actionKey","generateSingleItemQuery","concat","_useQuery2","itemId","recordData","recordLoading","entityData","propertyData","length","_buildDataSections","buildDataSections","groupSections","sectionsData","GroupComponent","CONTENT_GROUP_TYPES","ACCORDION","ContentGroupAccordion","ContentGroupTabs","createElement","_extends2","propTypes","PropTypes","oneOfType","string","arrayOf","object","isRequired","defaultProps","_default","exports"],"sources":["../../../src/components/ContentGroup/ContentGroupDataFetcher.js"],"sourcesContent":["import React, { useContext, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { useQuery, gql } from '@apollo/client';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport { getSingleEntitySchema, generateSingleItemQuery } from '../../application/query';\nimport ContentGroupTabs from './ContentGroupTabs';\nimport ContentGroupAccordion from './ContentGroupAccordion';\nimport { buildDataSections } from './helpers';\nimport { CONTENT_GROUP_TYPES } from './constants';\n\nconst PLACEHOLDER_QUERY = gql`\n query {\n __typename\n }\n`;\n\nconst ContentGroupDataFetcher = ({ dataProperty, parent, contentType, ...props }) => {\n const { isPreview } = useContext(MainContext);\n const dataPropertyName = Array.isArray(dataProperty) ? dataProperty[0] : dataProperty;\n\n const { data: schemaData, loading: schemaLoading } = useQuery(getSingleEntitySchema, {\n variables: { id: parent?.itemEntity },\n skip: !parent?.itemEntity || !dataPropertyName\n });\n\n const dataQuery = useMemo(() => {\n if (!schemaData) return null;\n const { getEntitySchema } = schemaData;\n const { actions: { getPublished, get } = {} } = getEntitySchema;\n const actionKey = isPreview ? get : getPublished || get;\n if (!actionKey) return null;\n return generateSingleItemQuery(actionKey, `${dataPropertyName} { label text }`);\n }, [schemaData, isPreview, dataPropertyName]);\n\n const { data: recordData, loading: recordLoading } = useQuery(dataQuery || PLACEHOLDER_QUERY, {\n variables: { id: parent?.itemId },\n skip: !dataQuery || !parent?.itemId\n });\n\n if (schemaLoading || recordLoading) return '';\n if (!recordData?.entityData) return null;\n\n const propertyData = recordData.entityData[dataPropertyName];\n if (!propertyData || !propertyData.length) return null;\n\n const { groupSections, sectionsData } = buildDataSections(propertyData);\n\n if (!groupSections.length) return null;\n\n const GroupComponent =\n contentType === CONTENT_GROUP_TYPES.ACCORDION ? ContentGroupAccordion : ContentGroupTabs;\n\n return (\n <GroupComponent\n contentType={contentType}\n groupSections={groupSections}\n sectionsData={sectionsData}\n {...props}\n />\n );\n};\n\nContentGroupDataFetcher.propTypes = {\n dataProperty: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n parent: PropTypes.object,\n contentType: PropTypes.string.isRequired\n};\n\nContentGroupDataFetcher.defaultProps = {\n dataProperty: null,\n parent: null\n};\n\nexport default ContentGroupDataFetcher;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,iBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,sBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AAAkD,IAAA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;EAAa,GACvBxC,KAAK,CACV,CAAC;AAEN,CAAC;AAEDL,uBAAuB,CAACqD,SAAS,GAAG;EAClCnD,YAAY,EAAEoD,qBAAS,CAACC,SAAS,CAAC,CAACD,qBAAS,CAACE,MAAM,EAAEF,qBAAS,CAACG,OAAO,CAACH,qBAAS,CAACE,MAAM,CAAC,CAAC,CAAC;EAC1FrD,MAAM,EAAEmD,qBAAS,CAACI,MAAM;EACxBtD,WAAW,EAAEkD,qBAAS,CAACE,MAAM,CAACG;AAChC,CAAC;AAED3D,uBAAuB,CAAC4D,YAAY,GAAG;EACrC1D,YAAY,EAAE,IAAI;EAClBC,MAAM,EAAE;AACV,CAAC;AAAC,IAAA0D,QAAA,GAAAC,OAAA,cAEa9D,uBAAuB","ignoreList":[]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
require("core-js/modules/es.array.iterator.js");
|
|
4
4
|
require("core-js/modules/es.object.define-property.js");
|
|
5
5
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
6
|
+
require("core-js/modules/es.object.to-string.js");
|
|
6
7
|
require("core-js/modules/es.string.iterator.js");
|
|
7
8
|
require("core-js/modules/es.weak-map.js");
|
|
8
9
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
@@ -16,14 +17,13 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
16
17
|
require("core-js/modules/es.array.concat.js");
|
|
17
18
|
require("core-js/modules/es.array.map.js");
|
|
18
19
|
require("core-js/modules/es.function.name.js");
|
|
19
|
-
require("core-js/modules/es.object.to-string.js");
|
|
20
20
|
var _react = _interopRequireWildcard(require("react"));
|
|
21
21
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
22
22
|
var _router = require("next/router");
|
|
23
23
|
var _helpers = require("./helpers");
|
|
24
24
|
var _constants = require("./constants");
|
|
25
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
26
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
26
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
27
27
|
var ContentGroupTabs = function ContentGroupTabs(_ref) {
|
|
28
28
|
var name = _ref.name,
|
|
29
29
|
contentType = _ref.contentType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentGroupTabs.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_router","_helpers","_constants","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ContentGroupTabs","_ref","name","contentType","groupSections","sectionsData","VariantComponent","router","useRouter","_useState","useState","getActiveTab","_useState2","_slicedToArray2","selectedTab","setSelectedTab","asPath","contentClassame","TAB","TABS","SIDEPANEL","mainDivClass","concat","CONTENT_GROUP","contentGroupClass","sectionClass","useEffect","activeTab","WrapperComponent","createElement","className","role","map","_","index","_sectionsData$index","sectionName","sectioLabel","tabId","isSelected","buttonClassName","id","key","type","onClick","baseUrl","split","newUrl","push","shallow","groupSection","_sectionsData$index2","panelId","PANEL","tabIndex","propTypes","PropTypes","string","isRequired","array","func","defaultProps","_default","exports"],"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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAAyE,SAAAM,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,
|
|
1
|
+
{"version":3,"file":"ContentGroupTabs.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_router","_helpers","_constants","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ContentGroupTabs","_ref","name","contentType","groupSections","sectionsData","VariantComponent","router","useRouter","_useState","useState","getActiveTab","_useState2","_slicedToArray2","selectedTab","setSelectedTab","asPath","contentClassame","TAB","TABS","SIDEPANEL","mainDivClass","concat","CONTENT_GROUP","contentGroupClass","sectionClass","useEffect","activeTab","WrapperComponent","createElement","className","role","map","_","index","_sectionsData$index","sectionName","sectioLabel","tabId","isSelected","buttonClassName","id","key","type","onClick","baseUrl","split","newUrl","push","shallow","groupSection","_sectionsData$index2","panelId","PANEL","tabIndex","propTypes","PropTypes","string","isRequired","array","func","defaultProps","_default","exports"],"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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAA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A,CAAMJ,cAAG,OAAAI,MAAA,CAAIc,WAAW,CAAE;IACrC,IAAMgB,OAAO,MAAA9B,MAAA,CAAM+B,gBAAK,OAAA/B,MAAA,CAAIc,WAAW,CAAE;IACzC,IAAMG,UAAU,GAAGzB,WAAW,KAAKwB,KAAK;IAExC,oBACEnE,MAAA,YAAA0D,aAAA,CAACD,gBAAgB;MACfc,GAAG,EAAEU,OAAQ;MACbX,EAAE,EAAEL,WAAY;MAChBN,SAAS,EAAEL,YAAa;MACxBM,IAAI,EAAC,UAAU;MACfO,KAAK,EAAEA,KAAM;MACb,mBAAiBA,KAAM;MACvB,eAAa,CAACC,UAAW;MACzBe,QAAQ,EAAEf,UAAU,GAAG,CAAC,GAAG,CAAC;IAAE,GAC7BW,YACe,CAAC;EAEvB,CAAC,CACE,CAAC;AAEV,CAAC;AAEDlD,gBAAgB,CAACuD,SAAS,GAAG;EAC3BrD,IAAI,EAAEsD,qBAAS,CAACC,MAAM,CAACC,UAAU;EACjCvD,WAAW,EAAEqD,qBAAS,CAACC,MAAM,CAACC,UAAU;EACxCtD,aAAa,EAAEoD,qBAAS,CAACG,KAAK,CAACD,UAAU;EACzCrD,YAAY,EAAEmD,qBAAS,CAACG,KAAK,CAACD,UAAU;EACxCpD,gBAAgB,EAAEkD,qBAAS,CAACI;AAC9B,CAAC;AAED5D,gBAAgB,CAAC6D,YAAY,GAAG;EAC9BvD,gBAAgB,EAAE;AACpB,CAAC;AAAC,IAAAwD,QAAA,GAAAC,OAAA,cAEa/D,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
|
+
require("core-js/modules/es.array.filter.js");
|
|
10
|
+
require("core-js/modules/es.array.iterator.js");
|
|
11
|
+
require("core-js/modules/es.array.map.js");
|
|
12
|
+
require("core-js/modules/es.array.reduce.js");
|
|
13
|
+
require("core-js/modules/es.object.define-property.js");
|
|
14
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
15
|
+
require("core-js/modules/es.object.to-string.js");
|
|
16
|
+
require("core-js/modules/es.promise.js");
|
|
17
|
+
require("core-js/modules/es.string.iterator.js");
|
|
18
|
+
require("core-js/modules/es.weak-map.js");
|
|
19
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
20
|
+
var _react = _interopRequireDefault(require("react"));
|
|
21
|
+
var _dynamic = _interopRequireDefault(require("next/dynamic"));
|
|
22
|
+
var _getComponentId = _interopRequireDefault(require("../../../helpers/get-component-id"));
|
|
23
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
24
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2["default"])(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
25
|
+
var TextBlock = (0, _dynamic["default"])(function () {
|
|
26
|
+
return Promise.resolve().then(function () {
|
|
27
|
+
return _interopRequireWildcard(require('../../TextBlock'));
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
var ContentGroupSection = (0, _dynamic["default"])(function () {
|
|
31
|
+
return Promise.resolve().then(function () {
|
|
32
|
+
return _interopRequireWildcard(require('../../ContentGroupSection'));
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
var buildDataSections = function buildDataSections() {
|
|
36
|
+
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
37
|
+
var itemData = items.map(function (item, i) {
|
|
38
|
+
if (!item || !item.text || !item.label) return null;
|
|
39
|
+
var sectionName = (0, _getComponentId["default"])(item.label || "section-".concat(i), true, true);
|
|
40
|
+
return {
|
|
41
|
+
sectionName: sectionName,
|
|
42
|
+
label: item.label,
|
|
43
|
+
sectionContent: /*#__PURE__*/_react["default"].createElement(ContentGroupSection, {
|
|
44
|
+
key: sectionName,
|
|
45
|
+
name: sectionName,
|
|
46
|
+
disableChildCheck: true
|
|
47
|
+
}, /*#__PURE__*/_react["default"].createElement(TextBlock, {
|
|
48
|
+
html: item.text,
|
|
49
|
+
name: "".concat(sectionName, "-text")
|
|
50
|
+
}))
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
return itemData.filter(Boolean).reduce(function (acc, _ref) {
|
|
54
|
+
var sectionName = _ref.sectionName,
|
|
55
|
+
label = _ref.label,
|
|
56
|
+
sectionContent = _ref.sectionContent;
|
|
57
|
+
if (!sectionName || !sectionContent) return acc;
|
|
58
|
+
acc.groupSections.push(sectionContent);
|
|
59
|
+
acc.sectionsData.push([sectionName, label]);
|
|
60
|
+
return acc;
|
|
61
|
+
}, {
|
|
62
|
+
groupSections: [],
|
|
63
|
+
sectionsData: []
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
var _default = exports["default"] = buildDataSections;
|
|
67
|
+
//# sourceMappingURL=build-data-sections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-data-sections.js","names":["_react","_interopRequireDefault","require","_dynamic","_getComponentId","_getRequireWildcardCache","e","WeakMap","r","t","_interopRequireWildcard","__esModule","_typeof2","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","TextBlock","dynamic","Promise","resolve","then","ContentGroupSection","buildDataSections","items","arguments","length","undefined","itemData","map","item","text","label","sectionName","getComponentId","concat","sectionContent","createElement","key","name","disableChildCheck","html","filter","Boolean","reduce","acc","_ref","groupSections","push","sectionsData","_default","exports"],"sources":["../../../../src/components/ContentGroup/helpers/build-data-sections.js"],"sourcesContent":["import React from 'react';\nimport dynamic from 'next/dynamic';\nimport getComponentId from '../../../helpers/get-component-id';\n\nconst TextBlock = dynamic(() => import('../../TextBlock'));\nconst ContentGroupSection = dynamic(() => import('../../ContentGroupSection'));\n\nconst buildDataSections = (items = []) => {\n const itemData = items.map((item, i) => {\n if (!item || !item.text || !item.label) return null;\n\n const sectionName = getComponentId(item.label || `section-${i}`, true, true);\n return {\n sectionName,\n label: item.label,\n sectionContent: (\n <ContentGroupSection key={sectionName} name={sectionName} disableChildCheck>\n <TextBlock html={item.text} name={`${sectionName}-text`} />\n </ContentGroupSection>\n )\n };\n });\n\n return itemData.filter(Boolean).reduce(\n (acc, { sectionName, label, sectionContent }) => {\n if (!sectionName || !sectionContent) return acc;\n acc.groupSections.push(sectionContent);\n acc.sectionsData.push([sectionName, label]);\n return acc;\n },\n { groupSections: [], sectionsData: [] }\n );\n};\n\nexport default buildDataSections;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AAA+D,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAI,wBAAAJ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,C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,EACD;IAAEE,aAAa,EAAE,EAAE;IAAEE,YAAY,EAAE;EAAG,CACxC,CAAC;AACH,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEa5B,iBAAiB","ignoreList":[]}
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
require("core-js/modules/es.array.map.js");
|
|
9
9
|
require("core-js/modules/es.function.name.js");
|
|
10
|
-
require("core-js/modules/es.object.to-string.js");
|
|
11
10
|
var getSectionsData = function getSectionsData(sections) {
|
|
12
11
|
return sections.map(function (section) {
|
|
13
12
|
var _section$props = section.props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-sections-data.js","names":["getSectionsData","sections","map","section","_section$props","props","_section$props2","_section$props2$compo","component","_section$props2$compo2","_section$props2$compo3","settings","_section$props2$compo4","label","name","encodeURI","_default","exports"],"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":"
|
|
1
|
+
{"version":3,"file":"get-sections-data.js","names":["getSectionsData","sections","map","section","_section$props","props","_section$props2","_section$props2$compo","component","_section$props2$compo2","_section$props2$compo3","settings","_section$props2$compo4","label","name","encodeURI","_default","exports"],"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,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAGC,QAAQ;EAAA,OAC9BA,QAAQ,CAACC,GAAG,CAAC,UAAAC,OAAO,EAAI;IACtB,IAAAC,cAAA,GAA+ED,OAAO,CAA9EE,KAAK;MAAAC,eAAA,GAAAF,cAAA,cAA2D,CAAC,CAAC,GAAAA,cAAA;MAAAG,qBAAA,GAAAD,eAAA,CAAzDE,SAAS;MAAAC,sBAAA,GAAAF,qBAAA,cAAuC,CAAC,CAAC,GAAAA,qBAAA;MAAAG,sBAAA,GAAAD,sBAAA,CAArCE,QAAQ;MAAAC,sBAAA,GAAAF,sBAAA,cAAoB,CAAC,CAAC,GAAAA,sBAAA;MAAlBG,KAAK,GAAAD,sBAAA,CAALC,KAAK;MAAEC,IAAI,GAAAF,sBAAA,CAAJE,IAAI;IACrD,OAAO,CAACC,SAAS,CAACD,IAAI,CAAC,EAAED,KAAK,CAAC;EACjC,CAAC,CAAC;AAAA;AAAC,IAAAG,QAAA,GAAAC,OAAA,cAEUjB,eAAe","ignoreList":[]}
|
|
@@ -5,6 +5,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
+
Object.defineProperty(exports, "buildDataSections", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _buildDataSections["default"];
|
|
12
|
+
}
|
|
13
|
+
});
|
|
8
14
|
Object.defineProperty(exports, "getActiveTab", {
|
|
9
15
|
enumerable: true,
|
|
10
16
|
get: function get() {
|
|
@@ -19,4 +25,5 @@ Object.defineProperty(exports, "getSectionsData", {
|
|
|
19
25
|
});
|
|
20
26
|
var _getSectionsData = _interopRequireDefault(require("./get-sections-data"));
|
|
21
27
|
var _getActiveTab = _interopRequireDefault(require("./get-active-tab"));
|
|
28
|
+
var _buildDataSections = _interopRequireDefault(require("./build-data-sections"));
|
|
22
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_getSectionsData","_interopRequireDefault","require","_getActiveTab"],"sources":["../../../../src/components/ContentGroup/helpers/index.js"],"sourcesContent":["import getSectionsData from './get-sections-data';\nimport getActiveTab from './get-active-tab';\n\nexport { getSectionsData, getActiveTab };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_getSectionsData","_interopRequireDefault","require","_getActiveTab","_buildDataSections"],"sources":["../../../../src/components/ContentGroup/helpers/index.js"],"sourcesContent":["import getSectionsData from './get-sections-data';\nimport getActiveTab from './get-active-tab';\nimport buildDataSections from './build-data-sections';\n\nexport { getSectionsData, getActiveTab, buildDataSections };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,gBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,kBAAA,GAAAH,sBAAA,CAAAC,OAAA","ignoreList":[]}
|
|
@@ -12,8 +12,9 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
12
12
|
var _helpers = require("../../helpers");
|
|
13
13
|
var ContentGroupSection = function ContentGroupSection(_ref) {
|
|
14
14
|
var children = _ref.children,
|
|
15
|
-
name = _ref.name
|
|
16
|
-
|
|
15
|
+
name = _ref.name,
|
|
16
|
+
disableChildCheck = _ref.disableChildCheck;
|
|
17
|
+
if (!disableChildCheck && !(0, _helpers.hasChildren)(children)) return null;
|
|
17
18
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
18
19
|
key: name,
|
|
19
20
|
className: "content-group-section"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentGroupSection.js","names":["_react","_interopRequireDefault","require","_propTypes","_helpers","ContentGroupSection","_ref","children","name","hasChildren","createElement","key","className","propTypes","PropTypes","oneOfType","arrayOf","node","string","defaultProps","_default","exports"],"sources":["../../../src/components/ContentGroupSection/ContentGroupSection.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { hasChildren } from '../../helpers';\n\nconst ContentGroupSection = ({ children, name }) => {\n if (!hasChildren(children)) return null;\n\n return (\n <div key={name} className=\"content-group-section\">\n {children}\n </div>\n );\n};\n\nContentGroupSection.propTypes = {\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n name: PropTypes.string\n};\n\nContentGroupSection.defaultProps = { children: null, name: '' };\n\nexport default ContentGroupSection;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAMG,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,
|
|
1
|
+
{"version":3,"file":"ContentGroupSection.js","names":["_react","_interopRequireDefault","require","_propTypes","_helpers","ContentGroupSection","_ref","children","name","disableChildCheck","hasChildren","createElement","key","className","propTypes","PropTypes","oneOfType","arrayOf","node","string","defaultProps","_default","exports"],"sources":["../../../src/components/ContentGroupSection/ContentGroupSection.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { hasChildren } from '../../helpers';\n\nconst ContentGroupSection = ({ children, name, disableChildCheck }) => {\n if (!disableChildCheck && !hasChildren(children)) return null;\n\n return (\n <div key={name} className=\"content-group-section\">\n {children}\n </div>\n );\n};\n\nContentGroupSection.propTypes = {\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n name: PropTypes.string\n};\n\nContentGroupSection.defaultProps = { children: null, name: '' };\n\nexport default ContentGroupSection;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAMG,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAA8C;EAAA,IAAxCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAEC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAEC,iBAAiB,GAAAH,IAAA,CAAjBG,iBAAiB;EAC9D,IAAI,CAACA,iBAAiB,IAAI,CAAC,IAAAC,oBAAW,EAACH,QAAQ,CAAC,EAAE,OAAO,IAAI;EAE7D,oBACEP,MAAA,YAAAW,aAAA;IAAKC,GAAG,EAAEJ,IAAK;IAACK,SAAS,EAAC;EAAuB,GAC9CN,QACE,CAAC;AAEV,CAAC;AAEDF,mBAAmB,CAACS,SAAS,GAAG;EAC9BP,QAAQ,EAAEQ,qBAAS,CAACC,SAAS,CAAC,CAACD,qBAAS,CAACE,OAAO,CAACF,qBAAS,CAACG,IAAI,CAAC,EAAEH,qBAAS,CAACG,IAAI,CAAC,CAAC;EAClFV,IAAI,EAAEO,qBAAS,CAACI;AAClB,CAAC;AAEDd,mBAAmB,CAACe,YAAY,GAAG;EAAEb,QAAQ,EAAE,IAAI;EAAEC,IAAI,EAAE;AAAG,CAAC;AAAC,IAAAa,QAAA,GAAAC,OAAA,cAEjDjB,mBAAmB","ignoreList":[]}
|
|
@@ -22,7 +22,7 @@ var _helpers = require("../../helpers");
|
|
|
22
22
|
var _helpers2 = require("./helpers");
|
|
23
23
|
var _DataSummaryRender = _interopRequireDefault(require("./DataSummaryRender"));
|
|
24
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
25
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
25
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
26
26
|
var DataSummaryFactory = function DataSummaryFactory(_ref) {
|
|
27
27
|
var entity = _ref.entity,
|
|
28
28
|
dataRecordId = _ref.dataRecordId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSummaryFactory.js","names":["_react","_interopRequireWildcard","require","_client","_propTypes","_interopRequireDefault","_nextjsComponents","_query","_helpers","_helpers2","_DataSummaryRender","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","DataSummaryFactory","_ref","entity","dataRecordId","propsToDisplay","type","useSelectedEntity","elementTitle","modifier","headingStyle","loopProperties","loopLimit","variant","VariantComponent","parent","entityForQuery","itemEntity","_useQuery","useQuery","getSingleEntitySchema","variables","id","data","error","loading","recordId","getRecordId","_useContext","useContext","MainContext","isPreview","message","length","propsToDisplayValues","checkPropsToUse","linkProps","getLinkProps","propsQueryString","buildPropsQuery","dataSummaryQuery","getDataSummaryQuery","isSlider","createElement","query","htmlTag","propTypes","PropTypes","object","isRequired","string","array","bool","number","func","defaultProps","_default","exports"],"sources":["../../../src/components/DataSummary/DataSummaryFactory.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport { useQuery } from '@apollo/client';\nimport PropTypes from 'prop-types';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport { getSingleEntitySchema } from '../../application/query';\nimport { buildPropsQuery, checkPropsToUse } from '../../helpers';\nimport { getDataSummaryQuery, getLinkProps, getRecordId } from './helpers';\nimport DataSummaryRender from './DataSummaryRender';\n\nconst DataSummaryFactory = ({\n entity,\n dataRecordId,\n propsToDisplay,\n type,\n useSelectedEntity,\n elementTitle,\n modifier,\n headingStyle,\n loopProperties,\n loopLimit,\n variant,\n VariantComponent,\n parent\n}) => {\n const entityForQuery = useSelectedEntity ? entity : parent.itemEntity;\n const { data, error, loading } = useQuery(getSingleEntitySchema, {\n variables: { id: entityForQuery }\n });\n\n const recordId = getRecordId(entityForQuery, dataRecordId, parent);\n const { isPreview } = useContext(MainContext);\n\n if (!recordId) return null;\n if (loading) return '';\n if (error) return error.message;\n if (!data) return null;\n if (!propsToDisplay || !propsToDisplay.length) return null;\n const propsToDisplayValues = checkPropsToUse(propsToDisplay);\n const linkProps = getLinkProps(propsToDisplay);\n const propsQueryString = buildPropsQuery(data, propsToDisplayValues, null, linkProps);\n const dataSummaryQuery = getDataSummaryQuery(data, isPreview, propsQueryString);\n const isSlider = variant === 'slideSummary';\n\n return (\n <DataSummaryRender\n recordId={recordId}\n propsToDisplay={propsToDisplay}\n loopProperties={loopProperties}\n loopLimit={loopLimit}\n query={dataSummaryQuery}\n type={type}\n elementTitle={elementTitle}\n modifier={modifier}\n htmlTag={headingStyle}\n variant={variant}\n VariantComponent={VariantComponent}\n isSlider={isSlider}\n />\n );\n};\n\nDataSummaryFactory.propTypes = {\n parent: PropTypes.object.isRequired,\n type: PropTypes.string,\n dataRecordId: PropTypes.array,\n propsToDisplay: PropTypes.array,\n entity: PropTypes.string,\n useSelectedEntity: PropTypes.bool,\n elementTitle: PropTypes.string,\n modifier: PropTypes.string,\n headingStyle: PropTypes.string,\n loopProperties: PropTypes.array,\n loopLimit: PropTypes.number,\n variant: PropTypes.string,\n VariantComponent: PropTypes.func\n};\n\nDataSummaryFactory.defaultProps = {\n type: 'text',\n dataRecordId: [],\n propsToDisplay: [],\n useSelectedEntity: true,\n entity: '',\n elementTitle: '',\n modifier: '',\n headingStyle: 'h2',\n loopProperties: [],\n loopLimit: 0,\n variant: null,\n VariantComponent: null\n};\n\nexport default DataSummaryFactory;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,kBAAA,GAAAL,sBAAA,CAAAH,OAAA;AAAoD,SAAAS,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAX,wBAAAW,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,
|
|
1
|
+
{"version":3,"file":"DataSummaryFactory.js","names":["_react","_interopRequireWildcard","require","_client","_propTypes","_interopRequireDefault","_nextjsComponents","_query","_helpers","_helpers2","_DataSummaryRender","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","DataSummaryFactory","_ref","entity","dataRecordId","propsToDisplay","type","useSelectedEntity","elementTitle","modifier","headingStyle","loopProperties","loopLimit","variant","VariantComponent","parent","entityForQuery","itemEntity","_useQuery","useQuery","getSingleEntitySchema","variables","id","data","error","loading","recordId","getRecordId","_useContext","useContext","MainContext","isPreview","message","length","propsToDisplayValues","checkPropsToUse","linkProps","getLinkProps","propsQueryString","buildPropsQuery","dataSummaryQuery","getDataSummaryQuery","isSlider","createElement","query","htmlTag","propTypes","PropTypes","object","isRequired","string","array","bool","number","func","defaultProps","_default","exports"],"sources":["../../../src/components/DataSummary/DataSummaryFactory.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport { useQuery } from '@apollo/client';\nimport PropTypes from 'prop-types';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport { getSingleEntitySchema } from '../../application/query';\nimport { buildPropsQuery, checkPropsToUse } from '../../helpers';\nimport { getDataSummaryQuery, getLinkProps, getRecordId } from './helpers';\nimport DataSummaryRender from './DataSummaryRender';\n\nconst DataSummaryFactory = ({\n entity,\n dataRecordId,\n propsToDisplay,\n type,\n useSelectedEntity,\n elementTitle,\n modifier,\n headingStyle,\n loopProperties,\n loopLimit,\n variant,\n VariantComponent,\n parent\n}) => {\n const entityForQuery = useSelectedEntity ? entity : parent.itemEntity;\n const { data, error, loading } = useQuery(getSingleEntitySchema, {\n variables: { id: entityForQuery }\n });\n\n const recordId = getRecordId(entityForQuery, dataRecordId, parent);\n const { isPreview } = useContext(MainContext);\n\n if (!recordId) return null;\n if (loading) return '';\n if (error) return error.message;\n if (!data) return null;\n if (!propsToDisplay || !propsToDisplay.length) return null;\n const propsToDisplayValues = checkPropsToUse(propsToDisplay);\n const linkProps = getLinkProps(propsToDisplay);\n const propsQueryString = buildPropsQuery(data, propsToDisplayValues, null, linkProps);\n const dataSummaryQuery = getDataSummaryQuery(data, isPreview, propsQueryString);\n const isSlider = variant === 'slideSummary';\n\n return (\n <DataSummaryRender\n recordId={recordId}\n propsToDisplay={propsToDisplay}\n loopProperties={loopProperties}\n loopLimit={loopLimit}\n query={dataSummaryQuery}\n type={type}\n elementTitle={elementTitle}\n modifier={modifier}\n htmlTag={headingStyle}\n variant={variant}\n VariantComponent={VariantComponent}\n isSlider={isSlider}\n />\n );\n};\n\nDataSummaryFactory.propTypes = {\n parent: PropTypes.object.isRequired,\n type: PropTypes.string,\n dataRecordId: PropTypes.array,\n propsToDisplay: PropTypes.array,\n entity: PropTypes.string,\n useSelectedEntity: PropTypes.bool,\n elementTitle: PropTypes.string,\n modifier: PropTypes.string,\n headingStyle: PropTypes.string,\n loopProperties: PropTypes.array,\n loopLimit: PropTypes.number,\n variant: PropTypes.string,\n VariantComponent: PropTypes.func\n};\n\nDataSummaryFactory.defaultProps = {\n type: 'text',\n dataRecordId: [],\n propsToDisplay: [],\n useSelectedEntity: true,\n entity: '',\n elementTitle: '',\n modifier: '',\n headingStyle: 'h2',\n loopProperties: [],\n loopLimit: 0,\n variant: null,\n VariantComponent: null\n};\n\nexport default DataSummaryFactory;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,kBAAA,GAAAL,sBAAA,CAAAH,OAAA;AAAoD,SAAAS,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAX,wBAAAW,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA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AE;EAChBC,QAAQ,EAAE,EAAE;EACZC,YAAY,EAAE,IAAI;EAClBC,cAAc,EAAE,EAAE;EAClBC,SAAS,EAAE,CAAC;EACZC,OAAO,EAAE,IAAI;EACbC,gBAAgB,EAAE;AACpB,CAAC;AAAC,IAAA0C,QAAA,GAAAC,OAAA,cAEaxD,kBAAkB","ignoreList":[]}
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports["default"] = void 0;
|
|
9
9
|
require("core-js/modules/es.array.map.js");
|
|
10
|
-
require("core-js/modules/es.object.to-string.js");
|
|
11
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
12
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSummaryRender.js","names":["_react","_interopRequireDefault","require","_client","_propTypes","_DataSummaryTypes","_utils","_helpers","_helpers2","_excluded","DataSummaryRender","_ref","type","htmlTag","recordId","query","propsToDisplay","elementTitle","loopProperties","loopLimit","VariantComponent","isSlider","otherProps","_objectWithoutProperties2","SummaryComponent","summaryComponents","_useQuery","useQuery","variables","id","data","error","loading","message","entityData","shouldLoop","length","modifier","getClassModifiers","summaryPropsWithContent","buildLoopPropsContent","buildPropsToDisplayWithContent","summaryPropsWithCleanContent","stripSummaryPropsContent","parsedPropsToDisplay","parsePropsToDisplay","createElement","_extends2","map","summaryProps","propTypes","entities","PropTypes","array","isRequired","mainSchemas","object","bool","string","name","number","func","defaultProps","_default","exports"],"sources":["../../../src/components/DataSummary/DataSummaryRender.js"],"sourcesContent":["import React from 'react';\nimport { useQuery } from '@apollo/client';\nimport PropTypes from 'prop-types';\nimport { summaryComponents } from './DataSummaryTypes';\nimport { getClassModifiers } from '../../utils';\nimport {\n buildPropsToDisplayWithContent,\n stripSummaryPropsContent,\n buildLoopPropsContent\n} from './helpers';\nimport { parsePropsToDisplay } from '../../helpers';\n\nconst DataSummaryRender = ({\n type,\n htmlTag,\n recordId,\n query,\n propsToDisplay,\n elementTitle,\n loopProperties,\n loopLimit,\n VariantComponent,\n isSlider,\n ...otherProps\n}) => {\n const SummaryComponent = summaryComponents[type];\n const { data, error, loading } = useQuery(query, {\n variables: { id: recordId }\n });\n\n if (loading) return '';\n if (error) return error.message;\n if (!data || !data.entityData) return null;\n\n const { entityData } = data;\n const shouldLoop = loopProperties && loopProperties.length;\n const modifier = getClassModifiers('list', otherProps);\n const summaryPropsWithContent = shouldLoop\n ? buildLoopPropsContent(loopProperties, propsToDisplay, loopLimit, entityData, isSlider)\n : buildPropsToDisplayWithContent(entityData, propsToDisplay);\n\n const summaryPropsWithCleanContent = stripSummaryPropsContent(\n propsToDisplay,\n summaryPropsWithContent\n );\n const parsedPropsToDisplay = parsePropsToDisplay(entityData, propsToDisplay);\n if (!summaryPropsWithCleanContent.length) return null;\n if (VariantComponent)\n return (\n <VariantComponent\n {...otherProps}\n propsToDisplay={propsToDisplay}\n summaryPropsWithContent={summaryPropsWithCleanContent}\n parsedPropsToDisplay={parsedPropsToDisplay}>\n {summaryPropsWithContent.map(summaryProps => (\n <SummaryComponent\n modifier={modifier}\n elementTitle={elementTitle}\n summaryPropsWithContent={summaryProps}\n htmlTag={htmlTag}\n />\n ))}\n </VariantComponent>\n );\n\n return (\n <SummaryComponent\n modifier={modifier}\n elementTitle={elementTitle}\n summaryPropsWithContent={summaryPropsWithCleanContent}\n htmlTag={htmlTag}\n />\n );\n};\n\nDataSummaryRender.propTypes = {\n entities: PropTypes.array.isRequired,\n mainSchemas: PropTypes.object.isRequired,\n isSlider: PropTypes.bool.isRequired,\n type: PropTypes.string,\n name: PropTypes.string,\n query: PropTypes.object,\n recordId: PropTypes.string,\n propsToDisplay: PropTypes.array,\n elementTitle: PropTypes.string,\n htmlTag: PropTypes.string,\n loopProperties: PropTypes.array,\n loopLimit: PropTypes.number,\n VariantComponent: PropTypes.func\n};\n\nDataSummaryRender.defaultProps = {\n name: '',\n type: 'text',\n query: {},\n recordId: '',\n propsToDisplay: [],\n elementTitle: '',\n htmlTag: 'h2',\n loopProperties: [],\n loopLimit: 0,\n VariantComponent: null\n};\n\nexport default DataSummaryRender;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataSummaryRender.js","names":["_react","_interopRequireDefault","require","_client","_propTypes","_DataSummaryTypes","_utils","_helpers","_helpers2","_excluded","DataSummaryRender","_ref","type","htmlTag","recordId","query","propsToDisplay","elementTitle","loopProperties","loopLimit","VariantComponent","isSlider","otherProps","_objectWithoutProperties2","SummaryComponent","summaryComponents","_useQuery","useQuery","variables","id","data","error","loading","message","entityData","shouldLoop","length","modifier","getClassModifiers","summaryPropsWithContent","buildLoopPropsContent","buildPropsToDisplayWithContent","summaryPropsWithCleanContent","stripSummaryPropsContent","parsedPropsToDisplay","parsePropsToDisplay","createElement","_extends2","map","summaryProps","propTypes","entities","PropTypes","array","isRequired","mainSchemas","object","bool","string","name","number","func","defaultProps","_default","exports"],"sources":["../../../src/components/DataSummary/DataSummaryRender.js"],"sourcesContent":["import React from 'react';\nimport { useQuery } from '@apollo/client';\nimport PropTypes from 'prop-types';\nimport { summaryComponents } from './DataSummaryTypes';\nimport { getClassModifiers } from '../../utils';\nimport {\n buildPropsToDisplayWithContent,\n stripSummaryPropsContent,\n buildLoopPropsContent\n} from './helpers';\nimport { parsePropsToDisplay } from '../../helpers';\n\nconst DataSummaryRender = ({\n type,\n htmlTag,\n recordId,\n query,\n propsToDisplay,\n elementTitle,\n loopProperties,\n loopLimit,\n VariantComponent,\n isSlider,\n ...otherProps\n}) => {\n const SummaryComponent = summaryComponents[type];\n const { data, error, loading } = useQuery(query, {\n variables: { id: recordId }\n });\n\n if (loading) return '';\n if (error) return error.message;\n if (!data || !data.entityData) return null;\n\n const { entityData } = data;\n const shouldLoop = loopProperties && loopProperties.length;\n const modifier = getClassModifiers('list', otherProps);\n const summaryPropsWithContent = shouldLoop\n ? buildLoopPropsContent(loopProperties, propsToDisplay, loopLimit, entityData, isSlider)\n : buildPropsToDisplayWithContent(entityData, propsToDisplay);\n\n const summaryPropsWithCleanContent = stripSummaryPropsContent(\n propsToDisplay,\n summaryPropsWithContent\n );\n const parsedPropsToDisplay = parsePropsToDisplay(entityData, propsToDisplay);\n if (!summaryPropsWithCleanContent.length) return null;\n if (VariantComponent)\n return (\n <VariantComponent\n {...otherProps}\n propsToDisplay={propsToDisplay}\n summaryPropsWithContent={summaryPropsWithCleanContent}\n parsedPropsToDisplay={parsedPropsToDisplay}>\n {summaryPropsWithContent.map(summaryProps => (\n <SummaryComponent\n modifier={modifier}\n elementTitle={elementTitle}\n summaryPropsWithContent={summaryProps}\n htmlTag={htmlTag}\n />\n ))}\n </VariantComponent>\n );\n\n return (\n <SummaryComponent\n modifier={modifier}\n elementTitle={elementTitle}\n summaryPropsWithContent={summaryPropsWithCleanContent}\n htmlTag={htmlTag}\n />\n );\n};\n\nDataSummaryRender.propTypes = {\n entities: PropTypes.array.isRequired,\n mainSchemas: PropTypes.object.isRequired,\n isSlider: PropTypes.bool.isRequired,\n type: PropTypes.string,\n name: PropTypes.string,\n query: PropTypes.object,\n recordId: PropTypes.string,\n propsToDisplay: PropTypes.array,\n elementTitle: PropTypes.string,\n htmlTag: PropTypes.string,\n loopProperties: PropTypes.array,\n loopLimit: PropTypes.number,\n VariantComponent: PropTypes.func\n};\n\nDataSummaryRender.defaultProps = {\n name: '',\n type: 'text',\n query: {},\n recordId: '',\n propsToDisplay: [],\n elementTitle: '',\n htmlTag: 'h2',\n loopProperties: [],\n loopLimit: 0,\n VariantComponent: null\n};\n\nexport default DataSummaryRender;\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,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MAAM,CAACF,UAAU;EACxCjC,QAAQ,EAAE+B,qBAAS,CAACK,IAAI,CAACH,UAAU;EACnC1C,IAAI,EAAEwC,qBAAS,CAACM,MAAM;EACtBC,IAAI,EAAEP,qBAAS,CAACM,MAAM;EACtB3C,KAAK,EAAEqC,qBAAS,CAACI,MAAM;EACvB1C,QAAQ,EAAEsC,qBAAS,CAACM,MAAM;EAC1B1C,cAAc,EAAEoC,qBAAS,CAACC,KAAK;EAC/BpC,YAAY,EAAEmC,qBAAS,CAACM,MAAM;EAC9B7C,OAAO,EAAEuC,qBAAS,CAACM,MAAM;EACzBxC,cAAc,EAAEkC,qBAAS,CAACC,KAAK;EAC/BlC,SAAS,EAAEiC,qBAAS,CAACQ,MAAM;EAC3BxC,gBAAgB,EAAEgC,qBAAS,CAACS;AAC9B,CAAC;AAEDnD,iBAAiB,CAACoD,YAAY,GAAG;EAC/BH,IAAI,EAAE,EAAE;EACR/C,IAAI,EAAE,MAAM;EACZG,KAAK,EAAE,CAAC,CAAC;EACTD,QAAQ,EAAE,EAAE;EACZE,cAAc,EAAE,EAAE;EAClBC,YAAY,EAAE,EAAE;EAChBJ,OAAO,EAAE,IAAI;EACbK,cAAc,EAAE,EAAE;EAClBC,SAAS,EAAE,CAAC;EACZC,gBAAgB,EAAE;AACpB,CAAC;AAAC,IAAA2C,QAAA,GAAAC,OAAA,cAEatD,iBAAiB","ignoreList":[]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
require("core-js/modules/es.array.iterator.js");
|
|
4
4
|
require("core-js/modules/es.object.define-property.js");
|
|
5
5
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
6
|
+
require("core-js/modules/es.object.to-string.js");
|
|
6
7
|
require("core-js/modules/es.string.iterator.js");
|
|
7
8
|
require("core-js/modules/es.weak-map.js");
|
|
8
9
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
@@ -15,14 +16,13 @@ exports["default"] = void 0;
|
|
|
15
16
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
17
|
require("core-js/modules/es.array.join.js");
|
|
17
18
|
require("core-js/modules/es.array.map.js");
|
|
18
|
-
require("core-js/modules/es.object.to-string.js");
|
|
19
19
|
var _react = _interopRequireWildcard(require("react"));
|
|
20
20
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
21
|
var _nextjsComponents = require("@blaze-cms/nextjs-components");
|
|
22
22
|
var _helpers = require("../../../../helpers");
|
|
23
23
|
var _helpers2 = require("../../helpers");
|
|
24
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
25
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
25
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
26
26
|
var HeadingLargeSummaryContent = function HeadingLargeSummaryContent(_ref) {
|
|
27
27
|
var summaryPropsWithContent = _ref.summaryPropsWithContent;
|
|
28
28
|
var _useContext = (0, _react.useContext)(_nextjsComponents.MainContext),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadingLargeSummaryContent.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_nextjsComponents","_helpers","_helpers2","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","HeadingLargeSummaryContent","_ref","summaryPropsWithContent","_useContext","useContext","MainContext","itemId","map","_ref2","index","_ref3","_slicedToArray2","key","value","dynamicKey","join","wrappedValue","parseBooleanValues","getWrappedValueWithLink","createElement","Fragment","propTypes","PropTypes","array","isRequired","_default","exports"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js"],"sourcesContent":["import React, { Fragment, useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport { getWrappedValueWithLink } from '../../../../helpers';\nimport { parseBooleanValues } from '../../helpers';\n\nconst HeadingLargeSummaryContent = ({ summaryPropsWithContent }) => {\n const { itemId } = useContext(MainContext);\n\n return summaryPropsWithContent.map(([key, value], index) => {\n const dynamicKey = [itemId, index].join('-');\n const wrappedValue = parseBooleanValues(getWrappedValueWithLink(value, null, itemId), key);\n\n return <Fragment key={dynamicKey}>{wrappedValue}</Fragment>;\n });\n};\n\nHeadingLargeSummaryContent.propTypes = {\n summaryPropsWithContent: PropTypes.array.isRequired\n};\n\nexport default HeadingLargeSummaryContent;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAAmD,SAAAM,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,
|
|
1
|
+
{"version":3,"file":"HeadingLargeSummaryContent.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_nextjsComponents","_helpers","_helpers2","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","HeadingLargeSummaryContent","_ref","summaryPropsWithContent","_useContext","useContext","MainContext","itemId","map","_ref2","index","_ref3","_slicedToArray2","key","value","dynamicKey","join","wrappedValue","parseBooleanValues","getWrappedValueWithLink","createElement","Fragment","propTypes","PropTypes","array","isRequired","_default","exports"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js"],"sourcesContent":["import React, { Fragment, useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport { getWrappedValueWithLink } from '../../../../helpers';\nimport { parseBooleanValues } from '../../helpers';\n\nconst HeadingLargeSummaryContent = ({ summaryPropsWithContent }) => {\n const { itemId } = useContext(MainContext);\n\n return summaryPropsWithContent.map(([key, value], index) => {\n const dynamicKey = [itemId, index].join('-');\n const wrappedValue = parseBooleanValues(getWrappedValueWithLink(value, null, itemId), key);\n\n return <Fragment key={dynamicKey}>{wrappedValue}</Fragment>;\n });\n};\n\nHeadingLargeSummaryContent.propTypes = {\n summaryPropsWithContent: PropTypes.array.isRequired\n};\n\nexport default HeadingLargeSummaryContent;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAAmD,SAAAM,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAc,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAI,CAAA,KAAAA,CAAA,CAA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ummaryContent.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
require("core-js/modules/es.array.iterator.js");
|
|
4
4
|
require("core-js/modules/es.object.define-property.js");
|
|
5
5
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
6
|
+
require("core-js/modules/es.object.to-string.js");
|
|
6
7
|
require("core-js/modules/es.string.iterator.js");
|
|
7
8
|
require("core-js/modules/es.weak-map.js");
|
|
8
9
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
@@ -15,7 +16,6 @@ exports["default"] = void 0;
|
|
|
15
16
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
17
|
require("core-js/modules/es.array.join.js");
|
|
17
18
|
require("core-js/modules/es.array.map.js");
|
|
18
|
-
require("core-js/modules/es.object.to-string.js");
|
|
19
19
|
var _react = _interopRequireWildcard(require("react"));
|
|
20
20
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
21
|
var _nextjsComponents = require("@blaze-cms/nextjs-components");
|
|
@@ -23,7 +23,7 @@ var _helpers = require("../../../../helpers");
|
|
|
23
23
|
var _helpers2 = require("../../helpers");
|
|
24
24
|
var _HOC = require("../../../../HOC");
|
|
25
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
26
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
26
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
27
27
|
var ItemDetailsSummaryContent = function ItemDetailsSummaryContent(_ref) {
|
|
28
28
|
var summaryPropsWithContent = _ref.summaryPropsWithContent;
|
|
29
29
|
var _useContext = (0, _react.useContext)(_nextjsComponents.MainContext),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemDetailsSummaryContent.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_nextjsComponents","_helpers","_helpers2","_HOC","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ItemDetailsSummaryContent","_ref","summaryPropsWithContent","_useContext","useContext","MainContext","itemId","map","_ref2","index","_ref3","_slicedToArray2","key","value","link","modifier","dynamicKey","join","wrappedValue","parseBooleanValues","getWrappedValueWithLink","createElement","className","propTypes","PropTypes","array","isRequired","_default","exports","withTitle"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport { getWrappedValueWithLink } from '../../../../helpers';\nimport { parseBooleanValues } from '../../helpers';\nimport { withTitle } from '../../../../HOC';\n\nconst ItemDetailsSummaryContent = ({ summaryPropsWithContent }) => {\n const { itemId } = useContext(MainContext);\n return summaryPropsWithContent.map(([key, value, link, modifier], index) => {\n const dynamicKey = [itemId, index, value].join('-');\n const wrappedValue = parseBooleanValues(getWrappedValueWithLink(value, link, itemId), key);\n\n return (\n <span className={modifier} key={dynamicKey}>\n {key && <span className=\"item-details-summary-label\">{key}</span>} {wrappedValue}\n </span>\n );\n });\n};\n\nItemDetailsSummaryContent.propTypes = {\n summaryPropsWithContent: PropTypes.array.isRequired\n};\n\nexport default withTitle(ItemDetailsSummaryContent);\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AAA4C,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,
|
|
1
|
+
{"version":3,"file":"ItemDetailsSummaryContent.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_nextjsComponents","_helpers","_helpers2","_HOC","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ItemDetailsSummaryContent","_ref","summaryPropsWithContent","_useContext","useContext","MainContext","itemId","map","_ref2","index","_ref3","_slicedToArray2","key","value","link","modifier","dynamicKey","join","wrappedValue","parseBooleanValues","getWrappedValueWithLink","createElement","className","propTypes","PropTypes","array","isRequired","_default","exports","withTitle"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport { getWrappedValueWithLink } from '../../../../helpers';\nimport { parseBooleanValues } from '../../helpers';\nimport { withTitle } from '../../../../HOC';\n\nconst ItemDetailsSummaryContent = ({ summaryPropsWithContent }) => {\n const { itemId } = useContext(MainContext);\n return summaryPropsWithContent.map(([key, value, link, modifier], index) => {\n const dynamicKey = [itemId, index, value].join('-');\n const wrappedValue = parseBooleanValues(getWrappedValueWithLink(value, link, itemId), key);\n\n return (\n <span className={modifier} key={dynamicKey}>\n {key && <span className=\"item-details-summary-label\">{key}</span>} {wrappedValue}\n </span>\n );\n });\n};\n\nItemDetailsSummaryContent.propTypes = {\n summaryPropsWithContent: PropTypes.array.isRequired\n};\n\nexport default withTitle(ItemDetailsSummaryContent);\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AAA4C,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CA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AAA,OAAAC,eAAA,aAAAH,KAAA;MAAvCI,GAAG,GAAAF,KAAA;MAAEG,KAAK,GAAAH,KAAA;MAAEI,IAAI,GAAAJ,KAAA;MAAEK,QAAQ,GAAAL,KAAA;IAC7D,IAAMM,UAAU,GAAG,CAACV,MAAM,EAAEG,KAAK,EAAEI,KAAK,CAAC,CAACI,IAAI,CAAC,GAAG,CAAC;IACnD,IAAMC,YAAY,GAAG,IAAAC,4BAAkB,EAAC,IAAAC,gCAAuB,EAACP,KAAK,EAAEC,IAAI,EAAER,MAAM,CAAC,EAAEM,GAAG,CAAC;IAE1F,oBACE1C,MAAA,YAAAmD,aAAA;MAAMC,SAAS,EAAEP,QAAS;MAACH,GAAG,EAAEI;IAAW,GACxCJ,GAAG,iBAAI1C,MAAA,YAAAmD,aAAA;MAAMC,SAAS,EAAC;IAA4B,GAAEV,GAAU,CAAC,EAAC,GAAC,EAACM,YAChE,CAAC;EAEX,CAAC,CAAC;AACJ,CAAC;AAEDlB,yBAAyB,CAACuB,SAAS,GAAG;EACpCrB,uBAAuB,EAAEsB,qBAAS,CAACC,KAAK,CAACC;AAC3C,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEa,IAAAC,cAAS,EAAC7B,yBAAyB,CAAC","ignoreList":[]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
require("core-js/modules/es.array.iterator.js");
|
|
4
4
|
require("core-js/modules/es.object.define-property.js");
|
|
5
5
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
6
|
+
require("core-js/modules/es.object.to-string.js");
|
|
6
7
|
require("core-js/modules/es.string.iterator.js");
|
|
7
8
|
require("core-js/modules/es.weak-map.js");
|
|
8
9
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
@@ -15,7 +16,6 @@ exports["default"] = void 0;
|
|
|
15
16
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
17
|
require("core-js/modules/es.array.join.js");
|
|
17
18
|
require("core-js/modules/es.array.map.js");
|
|
18
|
-
require("core-js/modules/es.object.to-string.js");
|
|
19
19
|
var _react = _interopRequireWildcard(require("react"));
|
|
20
20
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
21
|
var _lodash = _interopRequireDefault(require("lodash.upperfirst"));
|
|
@@ -24,7 +24,7 @@ var _helpers = require("../../../../helpers");
|
|
|
24
24
|
var _helpers2 = require("../../helpers");
|
|
25
25
|
var _HOC = require("../../../../HOC");
|
|
26
26
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
27
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
27
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
28
28
|
var LargeSummaryContent = function LargeSummaryContent(_ref) {
|
|
29
29
|
var summaryPropsWithContent = _ref.summaryPropsWithContent;
|
|
30
30
|
var _useContext = (0, _react.useContext)(_nextjsComponents.MainContext),
|