@blaze-cms/react-page-builder 0.129.0-admin-updates.3 → 0.129.0-admin-updates.5
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 +19 -0
- package/lib/BannerContext/helpers/set-initial-banner-counters.js.map +1 -1
- package/lib/BannerContext/index.js.map +1 -1
- package/lib/HOC/withInfiniteScroll.js.map +1 -1
- package/lib/HOC/withTitle.js.map +1 -1
- package/lib/application/query/index.js.map +1 -1
- package/lib/components/BackToTop/BackToTop.js.map +1 -1
- package/lib/components/Banner/AdSlotRender.js.map +1 -1
- package/lib/components/Banner/Banner.js.map +1 -1
- package/lib/components/Banner/BannerRender.js.map +1 -1
- package/lib/components/Banner/helpers.js.map +1 -1
- package/lib/components/BlazeLink.js.map +1 -1
- package/lib/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/lib/components/Button.js.map +1 -1
- package/lib/components/Card/Card.js.map +1 -1
- package/lib/components/Card/CardsContainer.js.map +1 -1
- package/lib/components/Card/CardsFactory.js.map +1 -1
- package/lib/components/Card/CardsRender.js.map +1 -1
- package/lib/components/Card/helpers/filter-query-setup.js.map +1 -1
- package/lib/components/Card/helpers/get-updated-sort-properties.js.map +1 -1
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselImage/CarouselImage.js.map +1 -1
- package/lib/components/Carousel/CarouselRender/CarouselRender.js.map +1 -1
- package/lib/components/CarouselWrapper.js.map +1 -1
- package/lib/components/ClickWrapper.js.map +1 -1
- package/lib/components/Code/Code.js.map +1 -1
- package/lib/components/Code/ScriptTag.js.map +1 -1
- package/lib/components/Code/helpers/wrap-script-tags.js.map +1 -1
- package/lib/components/ContentGroup/ContentGroup.js.map +1 -1
- package/lib/components/ContentGroup/ContentGroupTabs.js.map +1 -1
- package/lib/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryFactory.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryRender.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummary.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummary.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummary.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummary.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummary.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js.map +1 -1
- package/lib/components/DataSummary/DataSummaryTypes/index.js.map +1 -1
- package/lib/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
- package/lib/components/DataSummary/helpers/build-props-to-display-with-content.js.map +1 -1
- package/lib/components/DataSummary/helpers/get-link-props.js.map +1 -1
- package/lib/components/DataSummary/helpers/get-prop-value.js.map +1 -1
- package/lib/components/EmailConfirm/EmailConfirm.js.map +1 -1
- package/lib/components/Iframe/Iframe.js.map +1 -1
- package/lib/components/Image/GlobalLightbox/GlobalLightbox.js.map +1 -1
- package/lib/components/Image/GlobalLightbox/NavButton.js.map +1 -1
- package/lib/components/Image/GlobalLightbox/index.js.map +1 -1
- package/lib/components/Image/Image.js.map +1 -1
- package/lib/components/Image/ImageDetails.js.map +1 -1
- package/lib/components/Image/ImageFactory.js.map +1 -1
- package/lib/components/Image/ImageRender.js.map +1 -1
- package/lib/components/Image/Lightbox/Lightbox.js.map +1 -1
- package/lib/components/ItemList/ItemListButton/ItemListButton.js.map +1 -1
- package/lib/components/ItemList/ItemListCounter/ItemListCounter.js.map +1 -1
- package/lib/components/ItemList/ItemListNew/ItemListNew.js.map +1 -1
- package/lib/components/ItemList/helpers/set-param-and-redirect.js.map +1 -1
- package/lib/components/ItemList/hooks/use-item-list-id.js.map +1 -1
- package/lib/components/Layout/Layout.js.map +1 -1
- package/lib/components/LazyImage/LazyImage.js.map +1 -1
- package/lib/components/List/ListBuilder.js +1 -7
- package/lib/components/List/ListBuilder.js.map +1 -1
- package/lib/components/List/ListFactory.js +4 -2
- package/lib/components/List/ListFactory.js.map +1 -1
- package/lib/components/List/ListRender.js.map +1 -1
- package/lib/components/List/components/Cards/CardsRender.js.map +1 -1
- package/lib/components/List/components/Cards/CardsRenderItem.js.map +1 -1
- package/lib/components/List/components/Cards/CardsRenderWrapper.js.map +1 -1
- package/lib/components/List/components/Full/FullRender.js.map +1 -1
- package/lib/components/List/components/Full/FullRenderItem.js.map +1 -1
- package/lib/components/List/components/Header/ListHeader.js.map +1 -1
- package/lib/components/List/components/Pagination/Classic.js.map +1 -1
- package/lib/components/List/components/Pagination/ListPagination.js.map +1 -1
- package/lib/components/List/components/Pagination/LoadMore.js.map +1 -1
- package/lib/components/List/helpers/build-az-url.js.map +1 -1
- package/lib/components/List/helpers/build-pagination-items.js.map +1 -1
- package/lib/components/List/helpers/get-list-component.js +17 -0
- package/lib/components/List/helpers/get-list-component.js.map +1 -0
- package/lib/components/List/helpers/get-sort-props.js.map +1 -1
- package/lib/components/List/helpers/index.js +7 -0
- package/lib/components/List/helpers/index.js.map +1 -1
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.js.map +1 -1
- package/lib/components/Modal/Modal.js.map +1 -1
- package/lib/components/SearchContent/SearchContent.js.map +1 -1
- package/lib/components/SearchContent/SearchContentItems.js.map +1 -1
- package/lib/components/SearchContent/SearchContentResults.js.map +1 -1
- package/lib/components/SearchContent/SearchContentToggleIcon.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/CloseMobileForm.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/FiltersList.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/MobileFormToolbar.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/ResetDesktopForm.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilterContainer.js.map +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/build-query.js.map +1 -1
- package/lib/components/SearchFilter/helpers/check-if-range-updated.js.map +1 -1
- package/lib/components/SearchFilter/helpers/get-filter-value-from-query.js.map +1 -1
- package/lib/components/SearchFilter/helpers/get-responsive-filter-classnames.js.map +1 -1
- package/lib/components/SearchFilter/helpers/parse-filter-value.js.map +1 -1
- package/lib/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
- package/lib/components/SocialFollow/SFItem.js.map +1 -1
- package/lib/components/SocialFollow/SocialFollow.js.map +1 -1
- package/lib/components/SocialFollow/SocialFollowRender.js.map +1 -1
- package/lib/components/SubMenu/SubMenu.js.map +1 -1
- package/lib/components/TextBlock/TextBlockRender.js.map +1 -1
- package/lib/components/TextBlock/index.js.map +1 -1
- package/lib/components/Video/Video.js.map +1 -1
- package/lib/components/Video/VideoModal.js.map +1 -1
- package/lib/components/Video/VideoRender.js.map +1 -1
- package/lib/components/Video/providers/Default.js.map +1 -1
- package/lib/components/Video/providers/JWPlayer/JWPlayerProvider.js.map +1 -1
- package/lib/components/Video/providers/Vimeo/VimeoProvider.js.map +1 -1
- package/lib/components/Video/providers/Vimeo/helpers/add-extra-params-to-url.js.map +1 -1
- package/lib/components/Video/providers/YouTube/YouTubeProvider.js.map +1 -1
- package/lib/components/Video/providers/YouTube/YoutubeEmbeded.js.map +1 -1
- package/lib/components/Video/providers/get-provider.js.map +1 -1
- package/lib/components/Wrapper.js.map +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/helpers/build-inherited-filters.js.map +1 -1
- package/lib/helpers/build-props-query.js.map +1 -1
- package/lib/helpers/build-query-fields.js.map +1 -1
- package/lib/helpers/build-search-values-checkbox-select.js.map +1 -1
- package/lib/helpers/get-filter-relation-keys.js.map +1 -1
- package/lib/helpers/get-generic-render-variables.js.map +1 -1
- package/lib/helpers/get-inherited-filters.js.map +1 -1
- package/lib/helpers/get-items-to-display-ids.js.map +1 -1
- package/lib/helpers/get-parsed-prop-values.js.map +1 -1
- package/lib/helpers/get-query-filters.js.map +1 -1
- package/lib/helpers/get-updated-filter-by.js.map +1 -1
- package/lib/helpers/get-wrapped-value-with-link.js.map +1 -1
- package/lib/helpers/inject-banner.js.map +1 -1
- package/lib/helpers/inject-multiple-banners/get-banners-for-nodes/get-banners-for-nodes.js.map +1 -1
- package/lib/helpers/parse-TextBlock.js.map +1 -1
- package/lib/helpers/parse-props-to-display.js.map +1 -1
- package/lib/helpers/remove-unwanted-characters.js.map +1 -1
- package/lib/helpers/render-children.js.map +1 -1
- package/lib/helpers/split-children.js.map +1 -1
- package/lib/helpers/update-childrens-parent.js.map +1 -1
- package/lib/hooks/helpers/RenderComponent.js.map +1 -1
- package/lib/hooks/helpers/StoreImages.js.map +1 -1
- package/lib/hooks/helpers/append-gtm-classname.js.map +1 -1
- package/lib/hooks/helpers/buildPBComponents.js.map +1 -1
- package/lib/hooks/helpers/check-banner-insertion-set.js.map +1 -1
- package/lib/hooks/helpers/get-banners-by-type.js.map +1 -1
- package/lib/hooks/helpers/inject-element-banners.js.map +1 -1
- package/lib/hooks/helpers/inject-textblock-banners.js.map +1 -1
- package/lib/hooks/helpers/insert-banners.js.map +1 -1
- package/lib/hooks/use-check-mobile-screen.js.map +1 -1
- package/lib/hooks/use-get-entity-schema.js.map +1 -1
- package/lib/hooks/use-page-builder.js.map +1 -1
- package/lib/utils/component-map.js.map +1 -1
- package/lib-es/BannerContext/helpers/set-initial-banner-counters.js.map +1 -1
- package/lib-es/BannerContext/index.js.map +1 -1
- package/lib-es/HOC/withInfiniteScroll.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/BackToTop/BackToTop.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/BlazeLink.js.map +1 -1
- package/lib-es/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/lib-es/components/Button.js.map +1 -1
- package/lib-es/components/Card/Card.js.map +1 -1
- package/lib-es/components/Card/CardsContainer.js.map +1 -1
- package/lib-es/components/Card/CardsFactory.js.map +1 -1
- package/lib-es/components/Card/CardsRender.js.map +1 -1
- package/lib-es/components/Card/helpers/filter-query-setup.js.map +1 -1
- package/lib-es/components/Card/helpers/get-updated-sort-properties.js.map +1 -1
- package/lib-es/components/Carousel/Carousel.js.map +1 -1
- package/lib-es/components/Carousel/CarouselImage/CarouselImage.js.map +1 -1
- package/lib-es/components/Carousel/CarouselRender/CarouselRender.js.map +1 -1
- package/lib-es/components/CarouselWrapper.js.map +1 -1
- package/lib-es/components/ClickWrapper.js.map +1 -1
- package/lib-es/components/Code/Code.js.map +1 -1
- package/lib-es/components/Code/ScriptTag.js.map +1 -1
- package/lib-es/components/Code/helpers/wrap-script-tags.js.map +1 -1
- package/lib-es/components/ContentGroup/ContentGroup.js.map +1 -1
- package/lib-es/components/ContentGroup/ContentGroupTabs.js.map +1 -1
- package/lib-es/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryFactory.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryRender.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummary.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummaryContent.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummary.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummaryContent.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummary.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/ListSummary/ListSummary.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/TextSummary/TextSummary.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/TextSummary/TextSummaryContent.js.map +1 -1
- package/lib-es/components/DataSummary/DataSummaryTypes/index.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/build-props-to-display-with-content.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/get-link-props.js.map +1 -1
- package/lib-es/components/DataSummary/helpers/get-prop-value.js.map +1 -1
- package/lib-es/components/EmailConfirm/EmailConfirm.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.map +1 -1
- package/lib-es/components/Image/Image.js.map +1 -1
- package/lib-es/components/Image/ImageDetails.js.map +1 -1
- package/lib-es/components/Image/ImageFactory.js.map +1 -1
- package/lib-es/components/Image/ImageRender.js.map +1 -1
- package/lib-es/components/Image/Lightbox/Lightbox.js.map +1 -1
- package/lib-es/components/ItemList/ItemListButton/ItemListButton.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/set-param-and-redirect.js.map +1 -1
- package/lib-es/components/ItemList/hooks/use-item-list-id.js.map +1 -1
- package/lib-es/components/Layout/Layout.js.map +1 -1
- package/lib-es/components/LazyImage/LazyImage.js.map +1 -1
- package/lib-es/components/List/ListBuilder.js +2 -8
- package/lib-es/components/List/ListBuilder.js.map +1 -1
- package/lib-es/components/List/ListFactory.js +2 -2
- package/lib-es/components/List/ListFactory.js.map +1 -1
- package/lib-es/components/List/ListRender.js.map +1 -1
- package/lib-es/components/List/components/Cards/CardsRender.js.map +1 -1
- package/lib-es/components/List/components/Cards/CardsRenderItem.js.map +1 -1
- package/lib-es/components/List/components/Cards/CardsRenderWrapper.js.map +1 -1
- package/lib-es/components/List/components/Full/FullRender.js.map +1 -1
- package/lib-es/components/List/components/Full/FullRenderItem.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/components/Pagination/ListPagination.js.map +1 -1
- package/lib-es/components/List/components/Pagination/LoadMore.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/get-list-component.js +9 -0
- package/lib-es/components/List/helpers/get-list-component.js.map +1 -0
- package/lib-es/components/List/helpers/get-sort-props.js.map +1 -1
- package/lib-es/components/List/helpers/index.js +1 -0
- package/lib-es/components/List/helpers/index.js.map +1 -1
- package/lib-es/components/Menu/Menu.js.map +1 -1
- package/lib-es/components/MenuItem/MenuItem.js.map +1 -1
- package/lib-es/components/Modal/Modal.js.map +1 -1
- package/lib-es/components/SearchContent/SearchContent.js.map +1 -1
- package/lib-es/components/SearchContent/SearchContentItems.js.map +1 -1
- package/lib-es/components/SearchContent/SearchContentResults.js.map +1 -1
- package/lib-es/components/SearchContent/SearchContentToggleIcon.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/CloseMobileForm.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/FiltersList.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/MobileFormToolbar.js.map +1 -1
- package/lib-es/components/SearchFilter/SearchFilter/ResetDesktopForm.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/components/TextSearch.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/check-if-range-updated.js.map +1 -1
- package/lib-es/components/SearchFilter/helpers/get-filter-value-from-query.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/SocialFollow/SFItem.js.map +1 -1
- package/lib-es/components/SocialFollow/SocialFollow.js.map +1 -1
- package/lib-es/components/SocialFollow/SocialFollowRender.js.map +1 -1
- package/lib-es/components/SubMenu/SubMenu.js.map +1 -1
- package/lib-es/components/TextBlock/TextBlockRender.js.map +1 -1
- package/lib-es/components/TextBlock/index.js.map +1 -1
- package/lib-es/components/Video/Video.js.map +1 -1
- package/lib-es/components/Video/VideoModal.js.map +1 -1
- package/lib-es/components/Video/VideoRender.js.map +1 -1
- package/lib-es/components/Video/providers/Default.js.map +1 -1
- package/lib-es/components/Video/providers/JWPlayer/JWPlayerProvider.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/get-provider.js.map +1 -1
- package/lib-es/components/Wrapper.js.map +1 -1
- package/lib-es/components/index.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-search-values-checkbox-select.js.map +1 -1
- package/lib-es/helpers/get-filter-relation-keys.js.map +1 -1
- package/lib-es/helpers/get-generic-render-variables.js.map +1 -1
- package/lib-es/helpers/get-parsed-prop-values.js.map +1 -1
- package/lib-es/helpers/get-query-filters.js.map +1 -1
- package/lib-es/helpers/get-updated-filter-by.js.map +1 -1
- package/lib-es/helpers/get-wrapped-value-with-link.js.map +1 -1
- package/lib-es/helpers/inject-banner.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/parse-TextBlock.js.map +1 -1
- package/lib-es/helpers/parse-props-to-display.js.map +1 -1
- package/lib-es/helpers/remove-unwanted-characters.js.map +1 -1
- package/lib-es/helpers/render-children.js.map +1 -1
- package/lib-es/helpers/split-children.js.map +1 -1
- package/lib-es/helpers/update-childrens-parent.js.map +1 -1
- package/lib-es/hooks/helpers/RenderComponent.js.map +1 -1
- 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/check-banner-insertion-set.js.map +1 -1
- package/lib-es/hooks/helpers/get-banners-by-type.js.map +1 -1
- package/lib-es/hooks/helpers/inject-element-banners.js.map +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/use-check-mobile-screen.js.map +1 -1
- package/lib-es/hooks/use-get-entity-schema.js.map +1 -1
- package/lib-es/hooks/use-page-builder.js.map +1 -1
- package/lib-es/utils/component-map.js.map +1 -1
- package/package.json +5 -5
- package/src/components/List/ListBuilder.js +2 -15
- package/src/components/List/ListFactory.js +2 -2
- package/src/components/List/components/Cards/CardsRender.js +0 -1
- package/src/components/List/helpers/get-list-component.js +15 -0
- package/src/components/List/helpers/index.js +1 -0
- package/tests/unit/src/components/List/helpers/get-list-component.test.js +21 -0
- package/tests/unit/src/components/List/components/Cards/CardRenderWithInfiniteScroll.test.js +0 -12
- package/tests/unit/src/components/List/components/Full/FullRenderWithInfiniteScroll.test.js +0 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardsFactory.js","names":["React","useQuery","PropTypes","getSingleEntitySchema","CardsRender","buildPropsQuery","getGenericProps","checkPropsToUse","WITH_BANNER","CardsFactory","_ref","entity","entities","propsToDisplay","itemsToDisplay","itemListName","cardProps","_objectWithoutProperties","_excluded","entityTouse","length","data","error","loading","variables","id","message","propsToDisplayValues","extraProps","_getGenericProps","gridModifier","cardRenderProps","_excluded2","extraModifierForBanner","banner","createElement","_extends","bannerModifier","entityFields","propTypes","string","array","defaultProps"],"sources":["../../../src/components/Card/CardsFactory.js"],"sourcesContent":["import React from 'react';\nimport { useQuery } from '@apollo/client';\nimport PropTypes from 'prop-types';\nimport { getSingleEntitySchema } from '../../application/query';\nimport CardsRender from './CardsRender';\nimport { buildPropsQuery, getGenericProps, checkPropsToUse } from '../../helpers';\nimport { WITH_BANNER } from '../../constants';\n\nconst CardsFactory = ({\n entity,\n entities,\n propsToDisplay,\n itemsToDisplay,\n itemListName,\n ...cardProps\n}) => {\n const entityTouse = entities && entities.length ? entities[0] : entity;\n const { data, error, loading } = useQuery(getSingleEntitySchema, {\n variables: { id: entityTouse }\n });\n\n if (loading) return '';\n if (error) return error.message;\n if (!data) return null;\n\n const propsToDisplayValues = checkPropsToUse(propsToDisplay);\n const extraProps = buildPropsQuery(data, propsToDisplayValues, cardProps) || '';\n const { gridModifier, ...cardRenderProps } = getGenericProps(cardProps);\n const extraModifierForBanner = cardRenderProps.banner ? WITH_BANNER : '';\n\n return (\n <CardsRender\n gridModifier={`${gridModifier}${extraModifierForBanner}`}\n bannerModifier={extraModifierForBanner}\n itemsToDisplay={itemsToDisplay}\n propsToDisplay={propsToDisplay}\n entityFields={extraProps}\n {...cardRenderProps}\n entity={entityTouse}\n entities={entities}\n />\n );\n};\n\nCardsFactory.propTypes = {\n entity: PropTypes.string,\n propsToDisplay: PropTypes.array,\n itemsToDisplay: PropTypes.array,\n itemListName: PropTypes.string,\n entities: PropTypes.array\n};\n\nCardsFactory.defaultProps = {\n propsToDisplay: [],\n itemsToDisplay: [],\n itemListName: '',\n entity: null,\n entities: null\n};\n\nexport default CardsFactory;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,OAAOC,WAAW,MAAM,eAAe;AACvC,SAASC,eAAe,EAAEC,eAAe,EAAEC,eAAe,QAAQ,eAAe;AACjF,SAASC,WAAW,QAAQ,iBAAiB;AAE7C,MAAMC,YAAY,GAAGC,IAAA,IAOf;EAAA,IAPgB;MACpBC,MAAM;MACNC,QAAQ;MACRC,cAAc;MACdC,cAAc;MACdC;IAEF,CAAC,GAAAL,IAAA;IADIM,SAAS,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA;EAEZ,MAAMC,WAAW,GAAGP,QAAQ,IAAIA,QAAQ,CAACQ,MAAM,GAAGR,QAAQ,CAAC,CAAC,CAAC,GAAGD,MAAM;EACtE,MAAM;IAAEU,IAAI;IAAEC,KAAK;IAAEC;EAAQ,CAAC,GAAGtB,QAAQ,CAACE,qBAAqB,EAAE;IAC/DqB,SAAS,EAAE;MAAEC,EAAE,EAAEN;IAAY;EAC/B,CAAC,CAAC;EAEF,IAAII,OAAO,EAAE,OAAO,EAAE;EACtB,IAAID,KAAK,EAAE,OAAOA,KAAK,CAACI,OAAO;EAC/B,IAAI,CAACL,IAAI,EAAE,OAAO,IAAI;EAEtB,MAAMM,oBAAoB,GAAGpB,eAAe,CAACM,cAAc,CAAC;EAC5D,MAAMe,UAAU,GAAGvB,eAAe,CAACgB,IAAI,EAAEM,oBAAoB,EAAEX,SAAS,CAAC,IAAI,EAAE;EAC/E,MAAAa,gBAAA,GAA6CvB,eAAe,CAACU,SAAS,CAAC;IAAjE;MAAEc;IAAiC,CAAC,GAAAD,gBAAA;IAAjBE,eAAe,GAAAd,wBAAA,CAAAY,gBAAA,EAAAG,UAAA;EACxC,MAAMC,sBAAsB,GAAGF,eAAe,CAACG,MAAM,GAAG1B,WAAW,GAAG,EAAE;EAExE,oBACER,KAAA,CAAAmC,aAAA,CAAC/B,WAAW,EAAAgC,QAAA;IACVN,YAAY,EAAG,GAAEA,YAAa,GAAEG,sBAAuB,EAAE;IACzDI,cAAc,EAAEJ,sBAAuB;IACvCnB,cAAc,EAAEA,cAAe;IAC/BD,cAAc,EAAEA,cAAe;IAC/ByB,YAAY,EAAEV;EAAW,GACrBG,eAAe;IACnBpB,MAAM,EAAEQ,WAAY;IACpBP,QAAQ,EAAEA;EAAS,
|
|
1
|
+
{"version":3,"file":"CardsFactory.js","names":["React","useQuery","PropTypes","getSingleEntitySchema","CardsRender","buildPropsQuery","getGenericProps","checkPropsToUse","WITH_BANNER","CardsFactory","_ref","entity","entities","propsToDisplay","itemsToDisplay","itemListName","cardProps","_objectWithoutProperties","_excluded","entityTouse","length","data","error","loading","variables","id","message","propsToDisplayValues","extraProps","_getGenericProps","gridModifier","cardRenderProps","_excluded2","extraModifierForBanner","banner","createElement","_extends","bannerModifier","entityFields","propTypes","string","array","defaultProps"],"sources":["../../../src/components/Card/CardsFactory.js"],"sourcesContent":["import React from 'react';\nimport { useQuery } from '@apollo/client';\nimport PropTypes from 'prop-types';\nimport { getSingleEntitySchema } from '../../application/query';\nimport CardsRender from './CardsRender';\nimport { buildPropsQuery, getGenericProps, checkPropsToUse } from '../../helpers';\nimport { WITH_BANNER } from '../../constants';\n\nconst CardsFactory = ({\n entity,\n entities,\n propsToDisplay,\n itemsToDisplay,\n itemListName,\n ...cardProps\n}) => {\n const entityTouse = entities && entities.length ? entities[0] : entity;\n const { data, error, loading } = useQuery(getSingleEntitySchema, {\n variables: { id: entityTouse }\n });\n\n if (loading) return '';\n if (error) return error.message;\n if (!data) return null;\n\n const propsToDisplayValues = checkPropsToUse(propsToDisplay);\n const extraProps = buildPropsQuery(data, propsToDisplayValues, cardProps) || '';\n const { gridModifier, ...cardRenderProps } = getGenericProps(cardProps);\n const extraModifierForBanner = cardRenderProps.banner ? WITH_BANNER : '';\n\n return (\n <CardsRender\n gridModifier={`${gridModifier}${extraModifierForBanner}`}\n bannerModifier={extraModifierForBanner}\n itemsToDisplay={itemsToDisplay}\n propsToDisplay={propsToDisplay}\n entityFields={extraProps}\n {...cardRenderProps}\n entity={entityTouse}\n entities={entities}\n />\n );\n};\n\nCardsFactory.propTypes = {\n entity: PropTypes.string,\n propsToDisplay: PropTypes.array,\n itemsToDisplay: PropTypes.array,\n itemListName: PropTypes.string,\n entities: PropTypes.array\n};\n\nCardsFactory.defaultProps = {\n propsToDisplay: [],\n itemsToDisplay: [],\n itemListName: '',\n entity: null,\n entities: null\n};\n\nexport default CardsFactory;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,OAAOC,WAAW,MAAM,eAAe;AACvC,SAASC,eAAe,EAAEC,eAAe,EAAEC,eAAe,QAAQ,eAAe;AACjF,SAASC,WAAW,QAAQ,iBAAiB;AAE7C,MAAMC,YAA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,EAAEA;EAAS,EACpB,CAAC;AAEN,CAAC;AAEDH,YAAY,CAAC8B,SAAS,GAAG;EACvB5B,MAAM,EAAET,SAAS,CAACsC,MAAM;EACxB3B,cAAc,EAAEX,SAAS,CAACuC,KAAK;EAC/B3B,cAAc,EAAEZ,SAAS,CAACuC,KAAK;EAC/B1B,YAAY,EAAEb,SAAS,CAACsC,MAAM;EAC9B5B,QAAQ,EAAEV,SAAS,CAACuC;AACtB,CAAC;AAEDhC,YAAY,CAACiC,YAAY,GAAG;EAC1B7B,cAAc,EAAE,EAAE;EAClBC,cAAc,EAAE,EAAE;EAClBC,YAAY,EAAE,EAAE;EAChBJ,MAAM,EAAE,IAAI;EACZC,QAAQ,EAAE;AACZ,CAAC;AAED,eAAeH,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardsRender.js","names":["React","useContext","useQuery","dynamic","PropTypes","MainContext","generateSingleItemQuery","SEARCH_PUBLISHED_CONTENT","AND","useGetEntitySchemasAsObj","useGetImages","getUpdatedFilterBy","getEntityData","getRequiredSchemas","sortResponseData","getUnpublishedEntityName","renderChildren","splitChildren","removeExtraItems","appendImages","filtersSetup","filterQuerySetup","shouldSkipSingleQuery","shouldReturn","getUpdatedSortProperties","CardsContainer","CardsRender","_ref","entity","legacyEntity","entities","entityFields","itemsToDisplay","children","otherProps","_objectWithoutProperties","_excluded","isPreview","parent","itemId","parentId","itemEntity","parentEntity","filterBy","filterByProperty","sortby","sort","sortProperties","operator","filterOperator","useRandomSort","updatedSortProperties","sortbyFilters","variableProps","_objectSpread","entitiesToUse","primaryEntityToUse","unpublishedParentEntityName","allEntityNames","uniqueEntityNames","Set","data","mainSchemas","loading","_loading","error","_error","parentSchema","filterEntitySchema","entitiesTypes","map","ent","graphqlEntityMap","reduce","acc","entityType","docTypes","docType","type","entityTypes","eType","getAction","queryProps","inheritedFilters","entitySameAsCurrentItemEntity","action","filterEntityRelations","currentSchema","itemEntityUpdated","entityData","parentEntityData","_err","_load","variables","id","skip","requiredSchema","schemaLoading","schemaError","updatedFilterBy","limit","getEntitySchemas","Object","values","cardData","cardsError","cardsLoading","fetchPolicy","imageIds","imageId","filter","Boolean","imagesData","imagesLoading","isLoading","hasError","message","results","cardDataResults","length","orderedData","regularChildren","gtmChildren","name","updatedCards","createElement","Fragment","_extends","cardChildren","propTypes","oneOfType","arrayOf","node","string","isRequired","array","defaultProps"],"sources":["../../../src/components/Card/CardsRender.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport { useQuery } from '@apollo/client';\nimport dynamic from 'next/dynamic';\nimport PropTypes from 'prop-types';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport { generateSingleItemQuery } from '../../application/query';\nimport { SEARCH_PUBLISHED_CONTENT, AND } from '../../constants';\nimport { useGetEntitySchemasAsObj, useGetImages } from '../../hooks';\nimport {\n getUpdatedFilterBy,\n getEntityData,\n getRequiredSchemas,\n sortResponseData,\n getUnpublishedEntityName,\n renderChildren,\n splitChildren,\n removeExtraItems,\n appendImages\n} from '../../helpers';\nimport {\n filtersSetup,\n filterQuerySetup,\n shouldSkipSingleQuery,\n shouldReturn,\n getUpdatedSortProperties\n} from './helpers';\n\nconst CardsContainer = dynamic(() => import('./CardsContainer'));\n\nconst CardsRender = ({\n entity: legacyEntity,\n entities,\n entityFields,\n itemsToDisplay,\n children,\n ...otherProps\n}) => {\n const { isPreview } = useContext(MainContext);\n const {\n parent: { itemId: parentId, itemEntity: parentEntity },\n filterBy = [],\n filterByProperty = [],\n sortby,\n sort,\n sortProperties = [],\n operator: filterOperator = AND,\n useRandomSort\n } = otherProps;\n const [updatedSortProperties, sortbyFilters] = getUpdatedSortProperties(\n sort,\n sortby,\n sortProperties\n );\n\n const variableProps = {\n ...otherProps,\n sortProperties: updatedSortProperties,\n sort: null,\n sortby: null\n };\n\n const entitiesToUse = entities || [legacyEntity];\n const primaryEntityToUse = entitiesToUse[0];\n const unpublishedParentEntityName = getUnpublishedEntityName(parentEntity);\n const allEntityNames = [...entitiesToUse, unpublishedParentEntityName];\n const uniqueEntityNames = [...new Set(allEntityNames)];\n const { data: mainSchemas = {}, loading: _loading, error: _error } = useGetEntitySchemasAsObj(\n uniqueEntityNames\n );\n const parentSchema = mainSchemas[unpublishedParentEntityName] || {};\n const filterEntitySchema = mainSchemas[primaryEntityToUse] || {};\n const entitiesTypes = entitiesToUse.map(ent => getEntityData(ent, mainSchemas[ent]));\n const graphqlEntityMap = entitiesTypes.reduce(\n (acc, entityType) => ({ ...acc, [entityType.entityType]: entityType.entity }),\n {}\n );\n const docTypes = entitiesTypes.map(({ docType: type }) => type);\n const entityTypes = entitiesTypes.map(({ entityType: eType }) => eType);\n\n const {\n getAction,\n queryProps,\n inheritedFilters,\n entitySameAsCurrentItemEntity,\n action,\n filterEntityRelations\n } = filtersSetup({\n entityFields,\n entityTypes,\n filterBy,\n filterByProperty,\n entities: entitiesToUse,\n currentSchema: parentSchema,\n filterEntitySchema,\n isPreview,\n itemEntityUpdated: unpublishedParentEntityName\n });\n const {\n data: { entityData: parentEntityData = {} } = {},\n error: _err,\n loading: _load\n } = useQuery(generateSingleItemQuery(getAction, queryProps), {\n variables: { id: parentId },\n skip: shouldSkipSingleQuery(_loading, getAction, queryProps)\n });\n\n const {\n data: requiredSchema = {},\n loading: schemaLoading,\n error: schemaError\n } = useGetEntitySchemasAsObj(\n getRequiredSchemas([...filterByProperty, ...sortbyFilters], filterEntitySchema),\n _loading\n );\n\n const updatedFilterBy = getUpdatedFilterBy(\n inheritedFilters,\n parentEntityData,\n parentSchema,\n filterEntitySchema,\n parentId,\n variableProps\n );\n\n const { limit, variables } = filterQuerySetup({\n getEntitySchemas: Object.values(requiredSchema),\n entity: primaryEntityToUse,\n updatedFilterBy,\n variableProps,\n docType: docTypes,\n filterOperator,\n filterEntityRelations,\n itemsToDisplay,\n entitySameAsCurrentItemEntity,\n useRandomSort\n });\n const { data: cardData, error: cardsError, loading: cardsLoading } = useQuery(action, {\n variables,\n fetchPolicy: useRandomSort ? 'cache-and-network' : 'cache-first',\n skip: shouldReturn(!updatedFilterBy, _loading, _load, schemaLoading, _error, _err, schemaError)\n });\n\n const imageIds = itemsToDisplay.map(({ imageId }) => imageId).filter(Boolean);\n const { data: imagesData, loading: imagesLoading } = useGetImages(imageIds, true);\n const isLoading = shouldReturn(_loading, _load, schemaLoading, cardsLoading, imagesLoading);\n const hasError = shouldReturn(_error, _err, schemaError);\n\n if (!updatedFilterBy) return null;\n if (isLoading) return null;\n if (hasError) return null;\n if (cardsError) return cardsError.message;\n let { results: cardDataResults } = cardData[SEARCH_PUBLISHED_CONTENT];\n\n if (!cardDataResults || !cardDataResults.length) return null;\n\n cardDataResults = entitySameAsCurrentItemEntity\n ? removeExtraItems(cardDataResults, limit, parentId)\n : cardDataResults;\n if (!cardDataResults.length) return null;\n\n const orderedData = useRandomSort\n ? cardDataResults\n : sortResponseData(cardDataResults, itemsToDisplay);\n const { regularChildren, gtmChildren } = splitChildren(\n children,\n cardDataResults,\n graphqlEntityMap,\n {\n name: variableProps.name\n }\n );\n const updatedCards = appendImages(imagesData, orderedData, itemsToDisplay);\n\n return (\n <>\n {gtmChildren && renderChildren(gtmChildren)}\n <CardsContainer\n cardData={updatedCards}\n entity={primaryEntityToUse}\n gtmChildren={gtmChildren}\n cardChildren={regularChildren}\n graphqlEntityMap={graphqlEntityMap}\n {...variableProps}\n />\n </>\n );\n};\n\nCardsRender.propTypes = {\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n entity: PropTypes.string.isRequired,\n entityFields: PropTypes.string.isRequired,\n itemsToDisplay: PropTypes.array,\n entities: PropTypes.array\n};\n\nCardsRender.defaultProps = {\n children: [],\n itemsToDisplay: [],\n entities: []\n};\n\nexport default CardsRender;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,OAAOC,OAAO,MAAM,cAAc;AAClC,OAAOC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,QAAQ,EAAE1B,SAAS,CAACmI;AACtB,CAAC;AAED7G,WAAW,CAAC8G,YAAY,GAAG;EACzBvG,QAAQ,EAAE,EAAE;EACZD,cAAc,EAAE,EAAE;EAClBF,QAAQ,EAAE;AACZ,CAAC;AAED,eAAeJ,WAAW"}
|
|
1
|
+
{"version":3,"file":"CardsRender.js","names":["React","useContext","useQuery","dynamic","PropTypes","MainContext","generateSingleItemQuery","SEARCH_PUBLISHED_CONTENT","AND","useGetEntitySchemasAsObj","useGetImages","getUpdatedFilterBy","getEntityData","getRequiredSchemas","sortResponseData","getUnpublishedEntityName","renderChildren","splitChildren","removeExtraItems","appendImages","filtersSetup","filterQuerySetup","shouldSkipSingleQuery","shouldReturn","getUpdatedSortProperties","CardsContainer","CardsRender","_ref","entity","legacyEntity","entities","entityFields","itemsToDisplay","children","otherProps","_objectWithoutProperties","_excluded","isPreview","parent","itemId","parentId","itemEntity","parentEntity","filterBy","filterByProperty","sortby","sort","sortProperties","operator","filterOperator","useRandomSort","updatedSortProperties","sortbyFilters","variableProps","_objectSpread","entitiesToUse","primaryEntityToUse","unpublishedParentEntityName","allEntityNames","uniqueEntityNames","Set","data","mainSchemas","loading","_loading","error","_error","parentSchema","filterEntitySchema","entitiesTypes","map","ent","graphqlEntityMap","reduce","acc","entityType","docTypes","docType","type","entityTypes","eType","getAction","queryProps","inheritedFilters","entitySameAsCurrentItemEntity","action","filterEntityRelations","currentSchema","itemEntityUpdated","entityData","parentEntityData","_err","_load","variables","id","skip","requiredSchema","schemaLoading","schemaError","updatedFilterBy","limit","getEntitySchemas","Object","values","cardData","cardsError","cardsLoading","fetchPolicy","imageIds","imageId","filter","Boolean","imagesData","imagesLoading","isLoading","hasError","message","results","cardDataResults","length","orderedData","regularChildren","gtmChildren","name","updatedCards","createElement","Fragment","_extends","cardChildren","propTypes","oneOfType","arrayOf","node","string","isRequired","array","defaultProps"],"sources":["../../../src/components/Card/CardsRender.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport { useQuery } from '@apollo/client';\nimport dynamic from 'next/dynamic';\nimport PropTypes from 'prop-types';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport { generateSingleItemQuery } from '../../application/query';\nimport { SEARCH_PUBLISHED_CONTENT, AND } from '../../constants';\nimport { useGetEntitySchemasAsObj, useGetImages } from '../../hooks';\nimport {\n getUpdatedFilterBy,\n getEntityData,\n getRequiredSchemas,\n sortResponseData,\n getUnpublishedEntityName,\n renderChildren,\n splitChildren,\n removeExtraItems,\n appendImages\n} from '../../helpers';\nimport {\n filtersSetup,\n filterQuerySetup,\n shouldSkipSingleQuery,\n shouldReturn,\n getUpdatedSortProperties\n} from './helpers';\n\nconst CardsContainer = dynamic(() => import('./CardsContainer'));\n\nconst CardsRender = ({\n entity: legacyEntity,\n entities,\n entityFields,\n itemsToDisplay,\n children,\n ...otherProps\n}) => {\n const { isPreview } = useContext(MainContext);\n const {\n parent: { itemId: parentId, itemEntity: parentEntity },\n filterBy = [],\n filterByProperty = [],\n sortby,\n sort,\n sortProperties = [],\n operator: filterOperator = AND,\n useRandomSort\n } = otherProps;\n const [updatedSortProperties, sortbyFilters] = getUpdatedSortProperties(\n sort,\n sortby,\n sortProperties\n );\n\n const variableProps = {\n ...otherProps,\n sortProperties: updatedSortProperties,\n sort: null,\n sortby: null\n };\n\n const entitiesToUse = entities || [legacyEntity];\n const primaryEntityToUse = entitiesToUse[0];\n const unpublishedParentEntityName = getUnpublishedEntityName(parentEntity);\n const allEntityNames = [...entitiesToUse, unpublishedParentEntityName];\n const uniqueEntityNames = [...new Set(allEntityNames)];\n const { data: mainSchemas = {}, loading: _loading, error: _error } = useGetEntitySchemasAsObj(\n uniqueEntityNames\n );\n const parentSchema = mainSchemas[unpublishedParentEntityName] || {};\n const filterEntitySchema = mainSchemas[primaryEntityToUse] || {};\n const entitiesTypes = entitiesToUse.map(ent => getEntityData(ent, mainSchemas[ent]));\n const graphqlEntityMap = entitiesTypes.reduce(\n (acc, entityType) => ({ ...acc, [entityType.entityType]: entityType.entity }),\n {}\n );\n const docTypes = entitiesTypes.map(({ docType: type }) => type);\n const entityTypes = entitiesTypes.map(({ entityType: eType }) => eType);\n\n const {\n getAction,\n queryProps,\n inheritedFilters,\n entitySameAsCurrentItemEntity,\n action,\n filterEntityRelations\n } = filtersSetup({\n entityFields,\n entityTypes,\n filterBy,\n filterByProperty,\n entities: entitiesToUse,\n currentSchema: parentSchema,\n filterEntitySchema,\n isPreview,\n itemEntityUpdated: unpublishedParentEntityName\n });\n const {\n data: { entityData: parentEntityData = {} } = {},\n error: _err,\n loading: _load\n } = useQuery(generateSingleItemQuery(getAction, queryProps), {\n variables: { id: parentId },\n skip: shouldSkipSingleQuery(_loading, getAction, queryProps)\n });\n\n const {\n data: requiredSchema = {},\n loading: schemaLoading,\n error: schemaError\n } = useGetEntitySchemasAsObj(\n getRequiredSchemas([...filterByProperty, ...sortbyFilters], filterEntitySchema),\n _loading\n );\n\n const updatedFilterBy = getUpdatedFilterBy(\n inheritedFilters,\n parentEntityData,\n parentSchema,\n filterEntitySchema,\n parentId,\n variableProps\n );\n\n const { limit, variables } = filterQuerySetup({\n getEntitySchemas: Object.values(requiredSchema),\n entity: primaryEntityToUse,\n updatedFilterBy,\n variableProps,\n docType: docTypes,\n filterOperator,\n filterEntityRelations,\n itemsToDisplay,\n entitySameAsCurrentItemEntity,\n useRandomSort\n });\n const { data: cardData, error: cardsError, loading: cardsLoading } = useQuery(action, {\n variables,\n fetchPolicy: useRandomSort ? 'cache-and-network' : 'cache-first',\n skip: shouldReturn(!updatedFilterBy, _loading, _load, schemaLoading, _error, _err, schemaError)\n });\n\n const imageIds = itemsToDisplay.map(({ imageId }) => imageId).filter(Boolean);\n const { data: imagesData, loading: imagesLoading } = useGetImages(imageIds, true);\n const isLoading = shouldReturn(_loading, _load, schemaLoading, cardsLoading, imagesLoading);\n const hasError = shouldReturn(_error, _err, schemaError);\n\n if (!updatedFilterBy) return null;\n if (isLoading) return null;\n if (hasError) return null;\n if (cardsError) return cardsError.message;\n let { results: cardDataResults } = cardData[SEARCH_PUBLISHED_CONTENT];\n\n if (!cardDataResults || !cardDataResults.length) return null;\n\n cardDataResults = entitySameAsCurrentItemEntity\n ? removeExtraItems(cardDataResults, limit, parentId)\n : cardDataResults;\n if (!cardDataResults.length) return null;\n\n const orderedData = useRandomSort\n ? cardDataResults\n : sortResponseData(cardDataResults, itemsToDisplay);\n const { regularChildren, gtmChildren } = splitChildren(\n children,\n cardDataResults,\n graphqlEntityMap,\n {\n name: variableProps.name\n }\n );\n const updatedCards = appendImages(imagesData, orderedData, itemsToDisplay);\n\n return (\n <>\n {gtmChildren && renderChildren(gtmChildren)}\n <CardsContainer\n cardData={updatedCards}\n entity={primaryEntityToUse}\n gtmChildren={gtmChildren}\n cardChildren={regularChildren}\n graphqlEntityMap={graphqlEntityMap}\n {...variableProps}\n />\n </>\n );\n};\n\nCardsRender.propTypes = {\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n entity: PropTypes.string.isRequired,\n entityFields: PropTypes.string.isRequired,\n itemsToDisplay: PropTypes.array,\n entities: PropTypes.array\n};\n\nCardsRender.defaultProps = {\n children: [],\n itemsToDisplay: [],\n entities: []\n};\n\nexport default CardsRender;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,OAAOC,OAAO,MAAM,cAAc;AAClC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,uBAAuB,QAAQ,yBAAyB;AACjE,SAASC,wBAAwB,EAAEC,GAAG,QAAQ,iBAAiB;AAC/D,SAASC,wBAAwB,EAAEC,YAAY,QAAQ,aAAa;AACpE,SACEC,kBAAkB,EAClBC,aAAa,EACbC,kBAAkB,EAClBC,gBAAgB,EAChBC,wBAAwB,EACxBC,cAAc,EACdC,aAAa,EACbC,gBAAgB,EAChBC,YAA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EAAY,CAAC,GAAGzG,aAAa,CACpDgB,QAAQ,EACRqF,eAAe,EACf9C,gBAAgB,EAChB;IACEmD,IAAI,EAAEtE,aAAa,CAACsE;EACtB,CACF,CAAC;EACD,MAAMC,YAAY,GAAGzG,YAAY,CAAC6F,UAAU,EAAEQ,WAAW,EAAExF,cAAc,CAAC;EAE1E,oBACEhC,KAAA,CAAA6H,aAAA,CAAA7H,KAAA,CAAA8H,QAAA,QACGJ,WAAW,IAAI1G,cAAc,CAAC0G,WAAW,CAAC,eAC3C1H,KAAA,CAAA6H,aAAA,CAACpG,cAAc,EAAAsG,QAAA;IACbvB,QAAQ,EAAEoB,YAAa;IACvBhG,MAAM,EAAE4B,kBAAmB;IAC3BkE,WAAW,EAAEA,WAAY;IACzBM,YAAY,EAAEP,eAAgB;IAC9BjD,gBAAgB,EAAEA;EAAiB,GAC/BnB,aAAa,CAClB,CACD,CAAC;AAEP,CAAC;AAED3B,WAAW,CAACuG,SAAS,GAAG;EACtBhG,QAAQ,EAAE7B,SAAS,CAAC8H,SAAS,CAAC,CAAC9H,SAAS,CAAC+H,OAAO,CAAC/H,SAAS,CAACgI,IAAI,CAAC,EAAEhI,SAAS,CAACgI,IAAI,CAAC,CAAC;EAClFxG,MAAM,EAAExB,SAAS,CAACiI,MAAM,CAACC,UAAU;EACnCvG,YAAY,EAAE3B,SAAS,CAACiI,MAAM,CAACC,UAAU;EACzCtG,cAAc,EAAE5B,SAAS,CAACmI,KAAK;EAC/BzG,QAAQ,EAAE1B,SAAS,CAACmI;AACtB,CAAC;AAED7G,WAAW,CAAC8G,YAAY,GAAG;EACzBvG,QAAQ,EAAE,EAAE;EACZD,cAAc,EAAE,EAAE;EAClBF,QAAQ,EAAE;AACZ,CAAC;AAED,eAAeJ,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-query-setup.js","names":["getStringTypeProps","getGenericRenderVariables","buildRawQueryBase","buildSetFilters","DEFAULT_LIMIT","filterQuerySetup","getEntitySchemas","entity","updatedFilterBy","variableProps","docType","filterOperator","filterEntityRelations","itemsToDisplay","entitySameAsCurrentItemEntity","entitySchema","useRandomSort","stringProps","filterValues","length","_objectSpread","filterBy","rawQuery","bool","relations","addListFiltersToQuery","limit","settingsLimit","requestLimit","Number","variables"],"sources":["../../../../src/components/Card/helpers/filter-query-setup.js"],"sourcesContent":["import { getStringTypeProps } from '@blaze-cms/utils/src/helpers';\nimport { getGenericRenderVariables, buildRawQueryBase, buildSetFilters } from '../../../helpers';\nimport { DEFAULT_LIMIT } from '../../../constants';\n\nconst filterQuerySetup = ({\n getEntitySchemas,\n entity,\n updatedFilterBy,\n variableProps,\n docType,\n filterOperator,\n filterEntityRelations,\n itemsToDisplay,\n entitySameAsCurrentItemEntity,\n entitySchema,\n useRandomSort\n}) => {\n const stringProps = getStringTypeProps(entity, filterEntityRelations, getEntitySchemas);\n const filterValues =\n updatedFilterBy && updatedFilterBy.length\n ? buildSetFilters({ ...variableProps, filterBy: updatedFilterBy })\n : buildSetFilters(variableProps);\n\n const rawQuery = {\n bool: buildRawQueryBase({\n docType,\n filterValues,\n filterOperator,\n relations: filterEntityRelations,\n stringProps,\n itemsToDisplay,\n addListFiltersToQuery: true,\n entity,\n entitySchema\n })\n };\n\n // increase limit to get extra item in case results contain current parent\n const { limit: settingsLimit } = variableProps;\n const limit = settingsLimit || DEFAULT_LIMIT; // all falsey should use default\n const requestLimit = entitySameAsCurrentItemEntity ? Number(limit) + 1 : limit;\n const variables = getGenericRenderVariables(\n filterEntityRelations,\n { ...variableProps, limit: requestLimit },\n stringProps,\n rawQuery,\n false,\n useRandomSort\n );\n\n return { variables, limit };\n};\n\nexport default filterQuerySetup;\n"],"mappings":";;;AAAA,SAASA,kBAAkB,QAAQ,8BAA8B;AACjE,SAASC,yBAAyB,EAAEC,iBAAiB,EAAEC,eAAe,QAAQ,kBAAkB;AAChG,SAASC,aAAa,QAAQ,oBAAoB;AAElD,MAAMC,gBAAgB,GAAGA,CAAC;EACxBC,gBAAgB;EAChBC,MAAM;EACNC,eAAe;EACfC,aAAa;EACbC,OAAO;EACPC,cAAc;EACdC,qBAAqB;EACrBC,cAAc;EACdC,6BAA6B;EAC7BC,YAAY;EACZC;AACF,CAAC,KAAK;EACJ,MAAMC,WAAW,GAAGjB,kBAAkB,CAACO,MAAM,EAAEK,qBAAqB,EAAEN,gBAAgB,CAAC;EACvF,MAAMY,YAAY,GAChBV,eAAe,IAAIA,eAAe,CAACW,MAAM,GACrChB,eAAe,CAAAiB,aAAA,CAAAA,aAAA,KAAMX,aAAa;IAAEY,QAAQ,EAAEb;EAAe,
|
|
1
|
+
{"version":3,"file":"filter-query-setup.js","names":["getStringTypeProps","getGenericRenderVariables","buildRawQueryBase","buildSetFilters","DEFAULT_LIMIT","filterQuerySetup","getEntitySchemas","entity","updatedFilterBy","variableProps","docType","filterOperator","filterEntityRelations","itemsToDisplay","entitySameAsCurrentItemEntity","entitySchema","useRandomSort","stringProps","filterValues","length","_objectSpread","filterBy","rawQuery","bool","relations","addListFiltersToQuery","limit","settingsLimit","requestLimit","Number","variables"],"sources":["../../../../src/components/Card/helpers/filter-query-setup.js"],"sourcesContent":["import { getStringTypeProps } from '@blaze-cms/utils/src/helpers';\nimport { getGenericRenderVariables, buildRawQueryBase, buildSetFilters } from '../../../helpers';\nimport { DEFAULT_LIMIT } from '../../../constants';\n\nconst filterQuerySetup = ({\n getEntitySchemas,\n entity,\n updatedFilterBy,\n variableProps,\n docType,\n filterOperator,\n filterEntityRelations,\n itemsToDisplay,\n entitySameAsCurrentItemEntity,\n entitySchema,\n useRandomSort\n}) => {\n const stringProps = getStringTypeProps(entity, filterEntityRelations, getEntitySchemas);\n const filterValues =\n updatedFilterBy && updatedFilterBy.length\n ? buildSetFilters({ ...variableProps, filterBy: updatedFilterBy })\n : buildSetFilters(variableProps);\n\n const rawQuery = {\n bool: buildRawQueryBase({\n docType,\n filterValues,\n filterOperator,\n relations: filterEntityRelations,\n stringProps,\n itemsToDisplay,\n addListFiltersToQuery: true,\n entity,\n entitySchema\n })\n };\n\n // increase limit to get extra item in case results contain current parent\n const { limit: settingsLimit } = variableProps;\n const limit = settingsLimit || DEFAULT_LIMIT; // all falsey should use default\n const requestLimit = entitySameAsCurrentItemEntity ? Number(limit) + 1 : limit;\n const variables = getGenericRenderVariables(\n filterEntityRelations,\n { ...variableProps, limit: requestLimit },\n stringProps,\n rawQuery,\n false,\n useRandomSort\n );\n\n return { variables, limit };\n};\n\nexport default filterQuerySetup;\n"],"mappings":";;;AAAA,SAASA,kBAAkB,QAAQ,8BAA8B;AACjE,SAASC,yBAAyB,EAAEC,iBAAiB,EAAEC,eAAe,QAAQ,kBAAkB;AAChG,SAASC,aAAa,QAAQ,oBAAoB;AAElD,MAAMC,gBAAgB,GAAGA,CAAC;EACxBC,gBAAgB;EAChBC,MAAM;EACNC,eAAe;EACfC,aAAa;EACbC,OAAO;EACPC,cAAc;EACdC,qBAAqB;EACrBC,cAAc;EACdC,6BAA6B;EAC7BC,YAAY;EACZC;AACF,CAAC,KAAK;EACJ,MAAMC,WAAW,GAAGjB,kBAAkB,CAACO,MAAM,EAAEK,qBAAqB,EAAEN,gBAAgB,CAAC;EACvF,MAAMY,YAAY,GAChBV,eAAe,IAAIA,eAAe,CAACW,MAAM,GACrChB,eAAe,CAAAiB,aAAA,CAAAA,aAAA,KAAMX,aAAa;IAAEY,QAAQ,EAAEb;EAAe,EAAE,CAAC,GAChEL,eAAe,CAACM,aAAa,CAAC;EAEpC,MAAMa,QAAQ,GAAG;IACfC,IAAI,EAAErB,iBAAiB,CAAC;MACtBQ,OAAO;MACPQ,YAAY;MACZP,cAAc;MACda,SAAS,EAAEZ,qBAAqB;MAChCK,WAAW;MACXJ,cAAc;MACdY,qBAAqB,EAAE,IAAI;MAC3BlB,MAAM;MACNQ;IACF,CAAC;EACH,CAAC;;EAED;EACA,MAAM;IAAEW,KAAK,EAAEC;EAAc,CAAC,GAAGlB,aAAa;EAC9C,MAAMiB,KAAK,GAAGC,aAAa,IAAIvB,aAAa,CAAC,CAAC;EAC9C,MAAMwB,YAAY,GAAGd,6BAA6B,GAAGe,MAAM,CAACH,KAAK,CAAC,GAAG,CAAC,GAAGA,KAAK;EAC9E,MAAMI,SAAS,GAAG7B,yBAAyB,CACzCW,qBAAqB,EAAAQ,aAAA,CAAAA,aAAA,KAChBX,aAAa;IAAEiB,KAAK,EAAEE;EAAY,IACvCX,WAAW,EACXK,QAAQ,EACR,KAAK,EACLN,aACF,CAAC;EAED,OAAO;IAAEc,SAAS;IAAEJ;EAAM,CAAC;AAC7B,CAAC;AAED,eAAerB,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-updated-sort-properties.js","names":["getUpdatedSortProperties","sort","sortby","sortProperties","updatedSortProperties","length","unshift","propsToDisplay","sortbyFilters","map","filter","Boolean","flat"],"sources":["../../../../src/components/Card/helpers/get-updated-sort-properties.js"],"sourcesContent":["const getUpdatedSortProperties = (sort, sortby, sortProperties = []) => {\n const updatedSortProperties = [...sortProperties];\n if (!updatedSortProperties.length && sort) {\n updatedSortProperties.unshift({ sort, propsToDisplay: sortby });\n }\n\n const sortbyFilters = updatedSortProperties\n .map(({ propsToDisplay }) => propsToDisplay)\n .filter(Boolean)\n .flat();\n return [updatedSortProperties, sortbyFilters];\n};\n\nexport default getUpdatedSortProperties;\n"],"mappings":"AAAA,MAAMA,wBAAwB,GAAGA,CAACC,IAAI,EAAEC,MAAM,EAAEC,cAAc,GAAG,EAAE,KAAK;EACtE,MAAMC,qBAAqB,GAAG,CAAC,GAAGD,cAAc,CAAC;EACjD,IAAI,CAACC,qBAAqB,CAACC,MAAM,IAAIJ,IAAI,EAAE;IACzCG,qBAAqB,CAACE,OAAO,CAAC;MAAEL,IAAI;MAAEM,cAAc,EAAEL;IAAO,CAAC,CAAC;EACjE;EAEA,MAAMM,aAAa,GAAGJ,qBAAqB,CACxCK,GAAG,CAAC,CAAC;IAAEF;EAAe,CAAC,KAAKA,cAAc,CAAC,CAC3CG,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,
|
|
1
|
+
{"version":3,"file":"get-updated-sort-properties.js","names":["getUpdatedSortProperties","sort","sortby","sortProperties","updatedSortProperties","length","unshift","propsToDisplay","sortbyFilters","map","filter","Boolean","flat"],"sources":["../../../../src/components/Card/helpers/get-updated-sort-properties.js"],"sourcesContent":["const getUpdatedSortProperties = (sort, sortby, sortProperties = []) => {\n const updatedSortProperties = [...sortProperties];\n if (!updatedSortProperties.length && sort) {\n updatedSortProperties.unshift({ sort, propsToDisplay: sortby });\n }\n\n const sortbyFilters = updatedSortProperties\n .map(({ propsToDisplay }) => propsToDisplay)\n .filter(Boolean)\n .flat();\n return [updatedSortProperties, sortbyFilters];\n};\n\nexport default getUpdatedSortProperties;\n"],"mappings":"AAAA,MAAMA,wBAAwB,GAAGA,CAACC,IAAI,EAAEC,MAAM,EAAEC,cAAc,GAAG,EAAE,KAAK;EACtE,MAAMC,qBAAqB,GAAG,CAAC,GAAGD,cAAc,CAAC;EACjD,IAAI,CAACC,qBAAqB,CAACC,MAAM,IAAIJ,IAAI,EAAE;IACzCG,qBAAqB,CAACE,OAAO,CAAC;MAAEL,IAAI;MAAEM,cAAc,EAAEL;IAAO,CAAC,CAAC;EACjE;EAEA,MAAMM,aAAa,GAAGJ,qBAAqB,CACxCK,GAAG,CAAC,CAAC;IAAEF;EAAe,CAAC,KAAKA,cAAc,CAAC,CAC3CG,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,CAAC;EACT,OAAO,CAACR,qBAAqB,EAAEI,aAAa,CAAC;AAC/C,CAAC;AAED,eAAeR,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.js","names":["React","PropTypes","CarouselRender","Carousel","_ref","caption","imageIds","isCaptionDisplayed","otherProps","_objectWithoutProperties","_excluded","length","shouldDisplayCaption","createElement","className","_extends","propTypes","string","array","bool","defaultProps"],"sources":["../../../src/components/Carousel/Carousel.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport CarouselRender from './CarouselRender';\n\nconst Carousel = ({ caption, imageIds, isCaptionDisplayed, ...otherProps }) => {\n if (!imageIds || !imageIds.length) return null;\n const shouldDisplayCaption = isCaptionDisplayed && caption;\n\n return (\n <div className=\"carousel\">\n <div>\n <CarouselRender imageIds={imageIds} {...otherProps} />\n </div>\n {shouldDisplayCaption && (\n <div className=\"carousel__details\" data-testid=\"carousel-details\">\n <div className=\"caption\">{caption}</div>\n </div>\n )}\n </div>\n );\n};\n\nCarousel.propTypes = {\n caption: PropTypes.string,\n imageIds: PropTypes.array,\n isCaptionDisplayed: PropTypes.bool\n};\n\nCarousel.defaultProps = {\n caption: '',\n imageIds: [],\n isCaptionDisplayed: false\n};\n\nexport default Carousel;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,cAAc,MAAM,kBAAkB;AAE7C,MAAMC,QAAQ,GAAGC,IAAA,IAA8D;EAAA,IAA7D;MAAEC,OAAO;MAAEC,QAAQ;MAAEC;IAAkC,CAAC,GAAAH,IAAA;IAAZI,UAAU,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EACtE,IAAI,CAACJ,QAAQ,IAAI,CAACA,QAAQ,CAACK,MAAM,EAAE,OAAO,IAAI;EAC9C,MAAMC,oBAAoB,GAAGL,kBAAkB,IAAIF,OAAO;EAE1D,oBACEL,KAAA,CAAAa,aAAA;IAAKC,SAAS,EAAC;EAAU,gBACvBd,KAAA,CAAAa,aAAA,2BACEb,KAAA,CAAAa,aAAA,CAACX,cAAc,EAAAa,QAAA;IAACT,QAAQ,EAAEA;EAAS,GAAKE,UAAU,
|
|
1
|
+
{"version":3,"file":"Carousel.js","names":["React","PropTypes","CarouselRender","Carousel","_ref","caption","imageIds","isCaptionDisplayed","otherProps","_objectWithoutProperties","_excluded","length","shouldDisplayCaption","createElement","className","_extends","propTypes","string","array","bool","defaultProps"],"sources":["../../../src/components/Carousel/Carousel.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport CarouselRender from './CarouselRender';\n\nconst Carousel = ({ caption, imageIds, isCaptionDisplayed, ...otherProps }) => {\n if (!imageIds || !imageIds.length) return null;\n const shouldDisplayCaption = isCaptionDisplayed && caption;\n\n return (\n <div className=\"carousel\">\n <div>\n <CarouselRender imageIds={imageIds} {...otherProps} />\n </div>\n {shouldDisplayCaption && (\n <div className=\"carousel__details\" data-testid=\"carousel-details\">\n <div className=\"caption\">{caption}</div>\n </div>\n )}\n </div>\n );\n};\n\nCarousel.propTypes = {\n caption: PropTypes.string,\n imageIds: PropTypes.array,\n isCaptionDisplayed: PropTypes.bool\n};\n\nCarousel.defaultProps = {\n caption: '',\n imageIds: [],\n isCaptionDisplayed: false\n};\n\nexport default Carousel;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,cAAc,MAAM,kBAAkB;AAE7C,MAAMC,QAAQ,GAAGC,IAAA,IAA8D;EAAA,IAA7D;MAAEC,OAAO;MAAEC,QAAQ;MAAEC;IAAkC,CAAC,GAAAH,IAAA;IAAZI,UAAU,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EACtE,IAAI,CAACJ,QAAQ,IAAI,CAACA,QAAQ,CAACK,MAAM,EAAE,OAAO,IAAI;EAC9C,MAAMC,oBAAoB,GAAGL,kBAAkB,IAAIF,OAAO;EAE1D,oBACEL,KAAA,CAAAa,aAAA;IAAKC,SAAS,EAAC;EAAU,gBACvBd,KAAA,CAAAa,aAAA,2BACEb,KAAA,CAAAa,aAAA,CAACX,cAAc,EAAAa,QAAA;IAACT,QAAQ,EAAEA;EAAS,GAAKE,UAAU,CAAG,CAClD,CAAC,EACLI,oBAAoB,iBACnBZ,KAAA,CAAAa,aAAA;IAAKC,SAAS,EAAC,mBAAmB;IAAC,eAAY;EAAkB,gBAC/Dd,KAAA,CAAAa,aAAA;IAAKC,SAAS,EAAC;EAAS,GAAET,OAAa,CACpC,CAEJ,CAAC;AAEV,CAAC;AAEDF,QAAQ,CAACa,SAAS,GAAG;EACnBX,OAAO,EAAEJ,SAAS,CAACgB,MAAM;EACzBX,QAAQ,EAAEL,SAAS,CAACiB,KAAK;EACzBX,kBAAkB,EAAEN,SAAS,CAACkB;AAChC,CAAC;AAEDhB,QAAQ,CAACiB,YAAY,GAAG;EACtBf,OAAO,EAAE,EAAE;EACXC,QAAQ,EAAE,EAAE;EACZC,kBAAkB,EAAE;AACtB,CAAC;AAED,eAAeJ,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselImage.js","names":["React","PropTypes","useGetImages","getImageData","LazyImage","CarouselImage","imageId","enableLightbox","toggleModal","handleSelectedImage","data","loading","error","message","url","imageUrl","imageData","getFile","altText","handleEnableLightbox","createElement","className","src","alt","sizeKey","onClick","role","propTypes","string","isRequired","bool","func"],"sources":["../../../../src/components/Carousel/CarouselImage/CarouselImage.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { useGetImages } from '../../../hooks';\nimport { getImageData } from '../../../utils';\nimport LazyImage from '../../LazyImage';\n\nconst CarouselImage = ({ imageId, enableLightbox, toggleModal, handleSelectedImage }) => {\n const { data, loading, error } = useGetImages(imageId);\n\n if (error) return error.message;\n\n const { url: imageUrl = '', data: imageData = {} } = data.getFile || {\n getFile: { url: '', data: {} }\n };\n\n const { altText } = getImageData({}, imageData);\n\n const handleEnableLightbox = () => {\n if (!enableLightbox) return;\n toggleModal();\n handleSelectedImage(imageId);\n };\n\n return (\n <div className=\"carousel__slide\">\n {loading ? (\n <div />\n ) : (\n <LazyImage\n src={imageUrl}\n alt={altText}\n sizeKey=\"carousel\"\n onClick={handleEnableLightbox}\n role=\"button\"\n />\n )}\n </div>\n );\n};\n\nCarouselImage.propTypes = {\n imageId: PropTypes.string.isRequired,\n enableLightbox: PropTypes.bool.isRequired,\n toggleModal: PropTypes.func.isRequired,\n handleSelectedImage: PropTypes.func.isRequired\n};\n\nexport default CarouselImage;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,OAAOC,SAAS,MAAM,iBAAiB;AAEvC,MAAMC,aAAa,GAAGA,CAAC;EAAEC,OAAO;EAAEC,cAAc;EAAEC,WAAW;EAAEC;AAAoB,CAAC,KAAK;EACvF,MAAM;IAAEC,IAAI;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGV,YAAY,CAACI,OAAO,CAAC;EAEtD,IAAIM,KAAK,EAAE,OAAOA,KAAK,CAACC,OAAO;EAE/B,MAAM;IAAEC,GAAG,EAAEC,QAAQ,GAAG,EAAE;IAAEL,IAAI,EAAEM,SAAS,GAAG,CAAC;EAAE,CAAC,GAAGN,IAAI,CAACO,OAAO,IAAI;IACnEA,OAAO,EAAE;MAAEH,GAAG,EAAE,EAAE;MAAEJ,IAAI,EAAE,CAAC;IAAE;EAC/B,CAAC;EAED,MAAM;IAAEQ;EAAQ,CAAC,GAAGf,YAAY,CAAC,CAAC,CAAC,EAAEa,SAAS,CAAC;EAE/C,MAAMG,oBAAoB,GAAGA,CAAA,KAAM;IACjC,IAAI,CAACZ,cAAc,EAAE;IACrBC,WAAW,
|
|
1
|
+
{"version":3,"file":"CarouselImage.js","names":["React","PropTypes","useGetImages","getImageData","LazyImage","CarouselImage","imageId","enableLightbox","toggleModal","handleSelectedImage","data","loading","error","message","url","imageUrl","imageData","getFile","altText","handleEnableLightbox","createElement","className","src","alt","sizeKey","onClick","role","propTypes","string","isRequired","bool","func"],"sources":["../../../../src/components/Carousel/CarouselImage/CarouselImage.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { useGetImages } from '../../../hooks';\nimport { getImageData } from '../../../utils';\nimport LazyImage from '../../LazyImage';\n\nconst CarouselImage = ({ imageId, enableLightbox, toggleModal, handleSelectedImage }) => {\n const { data, loading, error } = useGetImages(imageId);\n\n if (error) return error.message;\n\n const { url: imageUrl = '', data: imageData = {} } = data.getFile || {\n getFile: { url: '', data: {} }\n };\n\n const { altText } = getImageData({}, imageData);\n\n const handleEnableLightbox = () => {\n if (!enableLightbox) return;\n toggleModal();\n handleSelectedImage(imageId);\n };\n\n return (\n <div className=\"carousel__slide\">\n {loading ? (\n <div />\n ) : (\n <LazyImage\n src={imageUrl}\n alt={altText}\n sizeKey=\"carousel\"\n onClick={handleEnableLightbox}\n role=\"button\"\n />\n )}\n </div>\n );\n};\n\nCarouselImage.propTypes = {\n imageId: PropTypes.string.isRequired,\n enableLightbox: PropTypes.bool.isRequired,\n toggleModal: PropTypes.func.isRequired,\n handleSelectedImage: PropTypes.func.isRequired\n};\n\nexport default CarouselImage;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,OAAOC,SAAS,MAAM,iBAAiB;AAEvC,MAAMC,aAAa,GAAGA,CAAC;EAAEC,OAAO;EAAEC,cAAc;EAAEC,WAAW;EAAEC;AAAoB,CAAC,KAAK;EACvF,MAAM;IAAEC,IAAI;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGV,YAAY,CAACI,OAAO,CAAC;EAEtD,IAAIM,KAAK,EAAE,OAAOA,KAAK,CAACC,OAAO;EAE/B,MAAM;IAAEC,GAAG,EAAEC,QAAQ,GAAG,EAAE;IAAEL,IAAI,EAAEM,SAAS,GAAG,CAAC;EAAE,CAAC,GAAGN,IAAI,CAACO,OAAO,IAAI;IACnEA,OAAO,EAAE;MAAEH,GAAG,EAAE,EAAE;MAAEJ,IAAI,EAAE,CAAC;IAAE;EAC/B,CAAC;EAED,MAAM;IAAEQ;EAAQ,CAAC,GAAGf,YAAY,CAAC,CAAC,CAAC,EAAEa,SAAS,CAAC;EAE/C,MAAMG,oBAAoB,GAAGA,CAAA,KAAM;IACjC,IAAI,CAACZ,cAAc,EAAE;IACrBC,WAAW,CAAC,CAAC;IACbC,mBAAmB,CAACH,OAAO,CAAC;EAC9B,CAAC;EAED,oBACEN,KAAA,CAAAoB,aAAA;IAAKC,SAAS,EAAC;EAAiB,GAC7BV,OAAO,gBACNX,KAAA,CAAAoB,aAAA,YAAM,CAAC,gBAEPpB,KAAA,CAAAoB,aAAA,CAAChB,SAAS;IACRkB,GAAG,EAAEP,QAAS;IACdQ,GAAG,EAAEL,OAAQ;IACbM,OAAO,EAAC,UAAU;IAClBC,OAAO,EAAEN,oBAAqB;IAC9BO,IAAI,EAAC;EAAQ,CACd,CAEA,CAAC;AAEV,CAAC;AAEDrB,aAAa,CAACsB,SAAS,GAAG;EACxBrB,OAAO,EAAEL,SAAS,CAAC2B,MAAM,CAACC,UAAU;EACpCtB,cAAc,EAAEN,SAAS,CAAC6B,IAAI,CAACD,UAAU;EACzCrB,WAAW,EAAEP,SAAS,CAAC8B,IAAI,CAACF,UAAU;EACtCpB,mBAAmB,EAAER,SAAS,CAAC8B,IAAI,CAACF;AACtC,CAAC;AAED,eAAexB,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselRender.js","names":["React","useRef","useState","PropTypes","CarouselImage","withTitle","getDisplayCountData","CarouselRender","_ref","imageIds","displayCount","otherProps","_objectWithoutProperties","_excluded","showCount","setShowCount","listRef","getListElement","current","moveScroll","numberOfPixels","isNext","listElement","totalDistance","scrollLeft","offsetWidth","scrollWidth","leftPosition","Math","max","scrollTo","top","left","behavior","handleNavigation","direction","offset","length","navigation","next","back","shouldDisplayCount","countMessage","createElement","Fragment","className","role","onClick","ref","map","imageId","_extends","key","propTypes","array","bool","defaultProps"],"sources":["../../../../src/components/Carousel/CarouselRender/CarouselRender.js"],"sourcesContent":["import React, { useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport CarouselImage from '../CarouselImage';\nimport { withTitle } from '../../../HOC';\nimport { getDisplayCountData } from '../../../helpers';\n\nconst CarouselRender = ({ imageIds, displayCount, ...otherProps }) => {\n const [showCount, setShowCount] = useState(displayCount);\n const listRef = useRef(null);\n\n const getListElement = () => {\n if (!listRef) return null;\n const { current } = listRef;\n return current;\n };\n\n const moveScroll = (numberOfPixels, isNext) => {\n const listElement = getListElement();\n if (!listElement) return;\n\n const totalDistance = listElement.scrollLeft + numberOfPixels;\n const { scrollLeft, offsetWidth, scrollWidth } = listElement;\n if (isNext && offsetWidth + scrollLeft >= scrollWidth) return;\n\n const leftPosition = totalDistance < 0 ? 0 : Math.max(-scrollLeft, totalDistance);\n\n listElement.scrollTo({\n top: 0,\n left: leftPosition,\n behavior: 'smooth'\n });\n };\n\n const handleNavigation = direction => {\n setShowCount(false);\n\n const listElement = getListElement();\n if (!listElement) return;\n\n const { scrollWidth } = listElement;\n const offset = scrollWidth / imageIds.length;\n\n direction ? moveScroll(offset, direction) : moveScroll(-offset, direction);\n };\n\n const navigation = {\n next: true,\n back: false\n };\n\n const { shouldDisplayCount, countMessage } = getDisplayCountData(showCount, imageIds);\n\n return (\n <>\n <div\n className=\"carousel__button carousel__button--previous\"\n role=\"button\"\n onClick={() => handleNavigation(navigation.back)}>\n <div className=\"arrow arrow--left\" />\n </div>\n <div className=\"carousel__list\" ref={listRef}>\n {imageIds.map(imageId => <CarouselImage key={imageId} imageId={imageId} {...otherProps} />)}\n </div>\n <div\n className=\"carousel__button carousel__button--next\"\n role=\"button\"\n onClick={() => handleNavigation(navigation.next)}>\n {shouldDisplayCount && <p>{countMessage}</p>}\n <div className=\"arrow arrow--right\" />\n </div>\n </>\n );\n};\n\nCarouselRender.propTypes = {\n imageIds: PropTypes.array,\n displayCount: PropTypes.bool\n};\n\nCarouselRender.defaultProps = {\n imageIds: [],\n displayCount: false\n};\n\nexport default withTitle(CarouselRender);\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC/C,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,mBAAmB,QAAQ,kBAAkB;AAEtD,MAAMC,cAAc,GAAGC,IAAA,IAA+C;EAAA,IAA9C;MAAEC,QAAQ;MAAEC;IAA4B,CAAC,GAAAF,IAAA;IAAZG,UAAU,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EAC7D,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGb,QAAQ,CAACQ,YAAY,CAAC;EACxD,MAAMM,OAAO,GAAGf,MAAM,CAAC,IAAI,CAAC;EAE5B,MAAMgB,cAAc,GAAGA,CAAA,KAAM;IAC3B,IAAI,CAACD,OAAO,EAAE,OAAO,IAAI;IACzB,MAAM;MAAEE;IAAQ,CAAC,GAAGF,OAAO;IAC3B,OAAOE,OAAO;EAChB,CAAC;EAED,MAAMC,UAAU,GAAGA,CAACC,cAAc,EAAEC,MAAM,KAAK;IAC7C,MAAMC,WAAW,GAAGL,cAAc,
|
|
1
|
+
{"version":3,"file":"CarouselRender.js","names":["React","useRef","useState","PropTypes","CarouselImage","withTitle","getDisplayCountData","CarouselRender","_ref","imageIds","displayCount","otherProps","_objectWithoutProperties","_excluded","showCount","setShowCount","listRef","getListElement","current","moveScroll","numberOfPixels","isNext","listElement","totalDistance","scrollLeft","offsetWidth","scrollWidth","leftPosition","Math","max","scrollTo","top","left","behavior","handleNavigation","direction","offset","length","navigation","next","back","shouldDisplayCount","countMessage","createElement","Fragment","className","role","onClick","ref","map","imageId","_extends","key","propTypes","array","bool","defaultProps"],"sources":["../../../../src/components/Carousel/CarouselRender/CarouselRender.js"],"sourcesContent":["import React, { useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport CarouselImage from '../CarouselImage';\nimport { withTitle } from '../../../HOC';\nimport { getDisplayCountData } from '../../../helpers';\n\nconst CarouselRender = ({ imageIds, displayCount, ...otherProps }) => {\n const [showCount, setShowCount] = useState(displayCount);\n const listRef = useRef(null);\n\n const getListElement = () => {\n if (!listRef) return null;\n const { current } = listRef;\n return current;\n };\n\n const moveScroll = (numberOfPixels, isNext) => {\n const listElement = getListElement();\n if (!listElement) return;\n\n const totalDistance = listElement.scrollLeft + numberOfPixels;\n const { scrollLeft, offsetWidth, scrollWidth } = listElement;\n if (isNext && offsetWidth + scrollLeft >= scrollWidth) return;\n\n const leftPosition = totalDistance < 0 ? 0 : Math.max(-scrollLeft, totalDistance);\n\n listElement.scrollTo({\n top: 0,\n left: leftPosition,\n behavior: 'smooth'\n });\n };\n\n const handleNavigation = direction => {\n setShowCount(false);\n\n const listElement = getListElement();\n if (!listElement) return;\n\n const { scrollWidth } = listElement;\n const offset = scrollWidth / imageIds.length;\n\n direction ? moveScroll(offset, direction) : moveScroll(-offset, direction);\n };\n\n const navigation = {\n next: true,\n back: false\n };\n\n const { shouldDisplayCount, countMessage } = getDisplayCountData(showCount, imageIds);\n\n return (\n <>\n <div\n className=\"carousel__button carousel__button--previous\"\n role=\"button\"\n onClick={() => handleNavigation(navigation.back)}>\n <div className=\"arrow arrow--left\" />\n </div>\n <div className=\"carousel__list\" ref={listRef}>\n {imageIds.map(imageId => <CarouselImage key={imageId} imageId={imageId} {...otherProps} />)}\n </div>\n <div\n className=\"carousel__button carousel__button--next\"\n role=\"button\"\n onClick={() => handleNavigation(navigation.next)}>\n {shouldDisplayCount && <p>{countMessage}</p>}\n <div className=\"arrow arrow--right\" />\n </div>\n </>\n );\n};\n\nCarouselRender.propTypes = {\n imageIds: PropTypes.array,\n displayCount: PropTypes.bool\n};\n\nCarouselRender.defaultProps = {\n imageIds: [],\n displayCount: false\n};\n\nexport default withTitle(CarouselRender);\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ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kB,iBAAIzC,KAAA,CAAA2C,aAAA,YAAID,YAAgB,CAAC,eAC5C1C,KAAA,CAAA2C,aAAA;IAAKE,SAAS,EAAC;EAAoB,CAAE,CAClC,CACL,CAAC;AAEP,CAAC;AAEDtC,cAAc,CAAC8C,SAAS,GAAG;EACzB5C,QAAQ,EAAEN,SAAS,CAACmD,KAAK;EACzB5C,YAAY,EAAEP,SAAS,CAACoD;AAC1B,CAAC;AAEDhD,cAAc,CAACiD,YAAY,GAAG;EAC5B/C,QAAQ,EAAE,EAAE;EACZC,YAAY,EAAE;AAChB,CAAC;AAED,eAAeL,SAAS,CAACE,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselWrapper.js","names":["React","useRef","useState","useEffect","PropTypes","CarouselWrapper","children","bannerModifier","itemsPerRow","enableAutoScroll","autoScrollTimer","arrowSize","ref","buttonDisplay","setButtonDisplays","displayLeft","displayRight","shouldAutoScroll","setShouldAutoScroll","autoScrollRef","current","id","setInterval","scrollCheck","clearInterval","handleButtonNavigation","offsetWidth","scrollWidth","handleScroll","scrollLeft","updatedDisplayLeft","updatedDisplayRight","direction","wrapperClassName","contentClassName","createElement","className","type","onClick","onScroll","propTypes","string","number","oneOfType","arrayOf","node","bool","defaultProps"],"sources":["../../src/components/CarouselWrapper.js"],"sourcesContent":["import React, { useRef, useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nconst CarouselWrapper = ({\n children,\n bannerModifier,\n itemsPerRow,\n enableAutoScroll,\n autoScrollTimer,\n arrowSize\n}) => {\n const ref = useRef();\n const [buttonDisplay, setButtonDisplays] = useState({ displayLeft: false, displayRight: true });\n const [shouldAutoScroll, setShouldAutoScroll] = useState(false);\n const autoScrollRef = useRef();\n\n useEffect(\n () => {\n autoScrollRef.current = shouldAutoScroll;\n const id = setInterval(scrollCheck, autoScrollTimer);\n function scrollCheck() {\n if (!autoScrollRef.current) {\n clearInterval(id);\n } else {\n handleButtonNavigation(true);\n }\n }\n\n return () => clearInterval(id);\n },\n [autoScrollTimer, shouldAutoScroll]\n );\n\n useEffect(\n () => {\n const {\n current: { offsetWidth, scrollWidth }\n } = ref;\n if (scrollWidth <= offsetWidth)\n setButtonDisplays({ displayLeft: false, displayRight: false });\n setShouldAutoScroll(enableAutoScroll);\n },\n [enableAutoScroll]\n );\n\n const handleScroll = () => {\n const {\n current: { offsetWidth, scrollLeft, scrollWidth }\n } = ref;\n const updatedDisplayLeft = !!scrollLeft;\n const updatedDisplayRight = scrollLeft + offsetWidth + 1 < scrollWidth;\n setButtonDisplays({ displayLeft: updatedDisplayLeft, displayRight: updatedDisplayRight });\n };\n\n const handleButtonNavigation = direction => {\n if (!ref || !ref.current) return;\n const {\n current: { offsetWidth, scrollLeft, scrollWidth }\n } = ref;\n\n if (autoScrollRef.current && scrollLeft + offsetWidth >= scrollWidth) {\n ref.current.scrollLeft = 0;\n } else {\n ref.current.scrollLeft = direction ? scrollLeft + offsetWidth : scrollLeft - offsetWidth;\n }\n };\n\n const { displayLeft, displayRight } = buttonDisplay;\n const wrapperClassName = `cards-carousel${bannerModifier}`;\n const contentClassName = `cards-carousel--content items-per-row-${itemsPerRow}`;\n\n return (\n <div className={wrapperClassName}>\n <div className=\"cards-carousel--left-button-wrapper\">\n {displayLeft && (\n <button\n type=\"button\"\n className=\"cards-carousel--button-back icon-button icon\"\n onClick={() => {\n setShouldAutoScroll(false);\n handleButtonNavigation();\n }}>\n <i className=\"cards-carousel--arrow cards-carousel--arrow__left\" />\n </button>\n )}\n </div>\n <div className=\"cards-carousel--right-button-wrapper\">\n {displayRight && (\n <button\n type=\"button\"\n className=\"cards-carousel--button-forward icon-button icon\"\n onClick={() => {\n setShouldAutoScroll(false);\n handleButtonNavigation(true);\n }}>\n <i className=\"cards-carousel--arrow cards-carousel--arrow__right\" />\n </button>\n )}\n </div>\n <div className={contentClassName} ref={ref} onScroll={handleScroll}>\n {children}\n </div>\n </div>\n );\n};\n\nCarouselWrapper.propTypes = {\n bannerModifier: PropTypes.string,\n itemsPerRow: PropTypes.number,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n enableAutoScroll: PropTypes.bool,\n autoScrollTimer: PropTypes.number,\n arrowSize: PropTypes.number\n};\n\nCarouselWrapper.defaultProps = {\n itemsPerRow: 0,\n bannerModifier: '',\n children: [],\n enableAutoScroll: false,\n autoScrollTimer: 0,\n arrowSize: 14\n};\n\nexport default CarouselWrapper;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAC1D,OAAOC,SAAS,MAAM,YAAY;AAElC,MAAMC,eAAe,GAAGA,CAAC;EACvBC,QAAQ;EACRC,cAAc;EACdC,WAAW;EACXC,gBAAgB;EAChBC,eAAe;EACfC;AACF,CAAC,KAAK;EACJ,MAAMC,GAAG,GAAGX,MAAM,
|
|
1
|
+
{"version":3,"file":"CarouselWrapper.js","names":["React","useRef","useState","useEffect","PropTypes","CarouselWrapper","children","bannerModifier","itemsPerRow","enableAutoScroll","autoScrollTimer","arrowSize","ref","buttonDisplay","setButtonDisplays","displayLeft","displayRight","shouldAutoScroll","setShouldAutoScroll","autoScrollRef","current","id","setInterval","scrollCheck","clearInterval","handleButtonNavigation","offsetWidth","scrollWidth","handleScroll","scrollLeft","updatedDisplayLeft","updatedDisplayRight","direction","wrapperClassName","contentClassName","createElement","className","type","onClick","onScroll","propTypes","string","number","oneOfType","arrayOf","node","bool","defaultProps"],"sources":["../../src/components/CarouselWrapper.js"],"sourcesContent":["import React, { useRef, useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nconst CarouselWrapper = ({\n children,\n bannerModifier,\n itemsPerRow,\n enableAutoScroll,\n autoScrollTimer,\n arrowSize\n}) => {\n const ref = useRef();\n const [buttonDisplay, setButtonDisplays] = useState({ displayLeft: false, displayRight: true });\n const [shouldAutoScroll, setShouldAutoScroll] = useState(false);\n const autoScrollRef = useRef();\n\n useEffect(\n () => {\n autoScrollRef.current = shouldAutoScroll;\n const id = setInterval(scrollCheck, autoScrollTimer);\n function scrollCheck() {\n if (!autoScrollRef.current) {\n clearInterval(id);\n } else {\n handleButtonNavigation(true);\n }\n }\n\n return () => clearInterval(id);\n },\n [autoScrollTimer, shouldAutoScroll]\n );\n\n useEffect(\n () => {\n const {\n current: { offsetWidth, scrollWidth }\n } = ref;\n if (scrollWidth <= offsetWidth)\n setButtonDisplays({ displayLeft: false, displayRight: false });\n setShouldAutoScroll(enableAutoScroll);\n },\n [enableAutoScroll]\n );\n\n const handleScroll = () => {\n const {\n current: { offsetWidth, scrollLeft, scrollWidth }\n } = ref;\n const updatedDisplayLeft = !!scrollLeft;\n const updatedDisplayRight = scrollLeft + offsetWidth + 1 < scrollWidth;\n setButtonDisplays({ displayLeft: updatedDisplayLeft, displayRight: updatedDisplayRight });\n };\n\n const handleButtonNavigation = direction => {\n if (!ref || !ref.current) return;\n const {\n current: { offsetWidth, scrollLeft, scrollWidth }\n } = ref;\n\n if (autoScrollRef.current && scrollLeft + offsetWidth >= scrollWidth) {\n ref.current.scrollLeft = 0;\n } else {\n ref.current.scrollLeft = direction ? scrollLeft + offsetWidth : scrollLeft - offsetWidth;\n }\n };\n\n const { displayLeft, displayRight } = buttonDisplay;\n const wrapperClassName = `cards-carousel${bannerModifier}`;\n const contentClassName = `cards-carousel--content items-per-row-${itemsPerRow}`;\n\n return (\n <div className={wrapperClassName}>\n <div className=\"cards-carousel--left-button-wrapper\">\n {displayLeft && (\n <button\n type=\"button\"\n className=\"cards-carousel--button-back icon-button icon\"\n onClick={() => {\n setShouldAutoScroll(false);\n handleButtonNavigation();\n }}>\n <i className=\"cards-carousel--arrow cards-carousel--arrow__left\" />\n </button>\n )}\n </div>\n <div className=\"cards-carousel--right-button-wrapper\">\n {displayRight && (\n <button\n type=\"button\"\n className=\"cards-carousel--button-forward icon-button icon\"\n onClick={() => {\n setShouldAutoScroll(false);\n handleButtonNavigation(true);\n }}>\n <i className=\"cards-carousel--arrow cards-carousel--arrow__right\" />\n </button>\n )}\n </div>\n <div className={contentClassName} ref={ref} onScroll={handleScroll}>\n {children}\n </div>\n </div>\n );\n};\n\nCarouselWrapper.propTypes = {\n bannerModifier: PropTypes.string,\n itemsPerRow: PropTypes.number,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n enableAutoScroll: PropTypes.bool,\n autoScrollTimer: PropTypes.number,\n arrowSize: PropTypes.number\n};\n\nCarouselWrapper.defaultProps = {\n itemsPerRow: 0,\n bannerModifier: '',\n children: [],\n enableAutoScroll: false,\n autoScrollTimer: 0,\n arrowSize: 14\n};\n\nexport default CarouselWrapper;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAC1D,OAAOC,SAAS,MAAM,YAAY;AAElC,MAAMC,eAAe,GAAGA,CAAC;EACvBC,QAAQ;EACRC,cAAc;EACdC,WAAW;EACXC,gBAAgB;EAChBC,eAAe;EACfC;AACF,CAAC,KAAK;EACJ,MAAMC,GAAG,GAAGX,MAAM,CAAC,CAAC;EACpB,MAAM,CAACY,aAAa,EAAEC,iBAAiB,CAAC,GAAGZ,QAAQ,CAAC;IAAEa,WAAW,EAAE,KAAK;IAAEC,YAAY,EAAE;EAAK,CAAC,CAAC;EAC/F,MAAM,CAACC,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGhB,QAAQ,CAAC,KAAK,CAAC;EAC/D,MAAMiB,aAAa,GAAGlB,MAAM,CAAC,CAAC;EAE9BE,SAAS,CACP,MAAM;IACJgB,aAAa,CAACC,OAAO,GAAGH,gBAAgB;IACxC,MAAMI,EAAE,GAAGC,WAAW,CAACC,WAAW,EAAEb,eAAe,CAAC;IACpD,SAASa,WAAWA,CAAA,EAAG;MACrB,IAAI,CAACJ,aAAa,CAACC,OAAO,EAAE;QAC1BI,aAAa,CAACH,EAAE,CAAC;MACnB,CAAC,MAAM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AAEF,SAAS,CAACuC,SAAS,CAAC,CAACvC,SAAS,CAACwC,OAAO,CAACxC,SAAS,CAACyC,IAAI,CAAC,EAAEzC,SAAS,CAACyC,IAAI,CAAC,CAAC;EAClFpC,gBAAgB,EAAEL,SAAS,CAAC0C,IAAI;EAChCpC,eAAe,EAAEN,SAAS,CAACsC,MAAM;EACjC/B,SAAS,EAAEP,SAAS,CAACsC;AACvB,CAAC;AAEDrC,eAAe,CAAC0C,YAAY,GAAG;EAC7BvC,WAAW,EAAE,CAAC;EACdD,cAAc,EAAE,EAAE;EAClBD,QAAQ,EAAE,EAAE;EACZG,gBAAgB,EAAE,KAAK;EACvBC,eAAe,EAAE,CAAC;EAClBC,SAAS,EAAE;AACb,CAAC;AAED,eAAeN,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClickWrapper.js","names":["React","useState","PropTypes","renderChildren","ClickWrapper","_ref","children","gtmChildren","id","props","_objectWithoutProperties","_excluded","clickState","setClickState","renderedChildren","clickId","componentProps","_objectSpread","createElement","role","onClick","propTypes","string","oneOfType","arrayOf","node","defaultProps"],"sources":["../../src/components/ClickWrapper.js"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { renderChildren } from '../helpers';\n\nconst ClickWrapper = ({ children, gtmChildren, id, ...props }) => {\n const [clickState, setClickState] = useState(false);\n const renderedChildren = clickState\n ? renderChildren(gtmChildren, {\n clickState,\n clickId: id,\n componentProps: { ...props }\n })\n : null;\n\n return (\n <div\n role=\"button\"\n onClick={() => {\n setClickState(true);\n }}>\n {renderedChildren}\n {children}\n </div>\n );\n};\n\nClickWrapper.propTypes = {\n id: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n gtmChildren: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])\n};\n\nClickWrapper.defaultProps = {\n id: null,\n children: [],\n gtmChildren: []\n};\n\nexport default ClickWrapper;\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,cAAc,QAAQ,YAAY;AAE3C,MAAMC,YAAY,GAAGC,IAAA,IAA6C;EAAA,IAA5C;MAAEC,QAAQ;MAAEC,WAAW;MAAEC;IAAa,CAAC,GAAAH,IAAA;IAAPI,KAAK,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EACzD,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGZ,QAAQ,CAAC,KAAK,CAAC;EACnD,MAAMa,gBAAgB,GAAGF,UAAU,GAC/BT,cAAc,CAACI,WAAW,EAAE;IAC1BK,UAAU;IACVG,OAAO,EAAEP,EAAE;IACXQ,cAAc,EAAAC,aAAA,KAAOR,KAAK;EAC5B,CAAC,CAAC,GACF,IAAI;EAER,oBACET,KAAA,CAAAkB,aAAA;IACEC,IAAI,EAAC,QAAQ;IACbC,OAAO,EAAEA,CAAA,KAAM;MACbP,aAAa,CAAC,IAAI,CAAC;IACrB;EAAE,GACDC,gBAAgB,EAChBR,
|
|
1
|
+
{"version":3,"file":"ClickWrapper.js","names":["React","useState","PropTypes","renderChildren","ClickWrapper","_ref","children","gtmChildren","id","props","_objectWithoutProperties","_excluded","clickState","setClickState","renderedChildren","clickId","componentProps","_objectSpread","createElement","role","onClick","propTypes","string","oneOfType","arrayOf","node","defaultProps"],"sources":["../../src/components/ClickWrapper.js"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { renderChildren } from '../helpers';\n\nconst ClickWrapper = ({ children, gtmChildren, id, ...props }) => {\n const [clickState, setClickState] = useState(false);\n const renderedChildren = clickState\n ? renderChildren(gtmChildren, {\n clickState,\n clickId: id,\n componentProps: { ...props }\n })\n : null;\n\n return (\n <div\n role=\"button\"\n onClick={() => {\n setClickState(true);\n }}>\n {renderedChildren}\n {children}\n </div>\n );\n};\n\nClickWrapper.propTypes = {\n id: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n gtmChildren: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])\n};\n\nClickWrapper.defaultProps = {\n id: null,\n children: [],\n gtmChildren: []\n};\n\nexport default ClickWrapper;\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,cAAc,QAAQ,YAAY;AAE3C,MAAMC,YAAY,GAAGC,IAAA,IAA6C;EAAA,IAA5C;MAAEC,QAAQ;MAAEC,WAAW;MAAEC;IAAa,CAAC,GAAAH,IAAA;IAAPI,KAAK,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EACzD,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGZ,QAAQ,CAAC,KAAK,CAAC;EACnD,MAAMa,gBAAgB,GAAGF,UAAU,GAC/BT,cAAc,CAACI,WAAW,EAAE;IAC1BK,UAAU;IACVG,OAAO,EAAEP,EAAE;IACXQ,cAAc,EAAAC,aAAA,KAAOR,KAAK;EAC5B,CAAC,CAAC,GACF,IAAI;EAER,oBACET,KAAA,CAAAkB,aAAA;IACEC,IAAI,EAAC,QAAQ;IACbC,OAAO,EAAEA,CAAA,KAAM;MACbP,aAAa,CAAC,IAAI,CAAC;IACrB;EAAE,GACDC,gBAAgB,EAChBR,QACE,CAAC;AAEV,CAAC;AAEDF,YAAY,CAACiB,SAAS,GAAG;EACvBb,EAAE,EAAEN,SAAS,CAACoB,MAAM;EACpBhB,QAAQ,EAAEJ,SAAS,CAACqB,SAAS,CAAC,CAACrB,SAAS,CAACsB,OAAO,CAACtB,SAAS,CAACuB,IAAI,CAAC,EAAEvB,SAAS,CAACuB,IAAI,CAAC,CAAC;EAClFlB,WAAW,EAAEL,SAAS,CAACqB,SAAS,CAAC,CAACrB,SAAS,CAACsB,OAAO,CAACtB,SAAS,CAACuB,IAAI,CAAC,EAAEvB,SAAS,CAACuB,IAAI,CAAC;AACtF,CAAC;AAEDrB,YAAY,CAACsB,YAAY,GAAG;EAC1BlB,EAAE,EAAE,IAAI;EACRF,QAAQ,EAAE,EAAE;EACZC,WAAW,EAAE;AACf,CAAC;AAED,eAAeH,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Code.js","names":["React","memo","PropTypes","parseHTML","Wrapper","withTitle","getClassModifiers","CODE","wrapScriptTags","Code","_ref","code","embedCode","parserOptions","otherProps","_objectWithoutProperties","_excluded","parsedCode","wrappedCode","modifiers","_objectSpread","createElement","propTypes","string","modifier","object","defaultProps"],"sources":["../../../src/components/Code/Code.js"],"sourcesContent":["import React, { memo } from 'react';\nimport PropTypes from 'prop-types';\nimport parseHTML from 'html-react-parser';\nimport Wrapper from '../Wrapper';\nimport { withTitle } from '../../HOC';\nimport { getClassModifiers } from '../../utils';\nimport { CODE } from '../../constants';\nimport { wrapScriptTags } from './helpers';\n\nconst Code = memo(({ code: embedCode, parserOptions, ...otherProps }) => {\n if (!embedCode) return null;\n\n const parsedCode = parseHTML(embedCode, parserOptions);\n const wrappedCode = wrapScriptTags(parsedCode);\n const modifiers = getClassModifiers(CODE, { ...otherProps });\n\n return <Wrapper modifiers={modifiers}>{wrappedCode}</Wrapper>;\n});\n\nCode.propTypes = {\n code: PropTypes.string,\n modifier: PropTypes.string,\n parserOptions: PropTypes.object\n};\n\nCode.defaultProps = {\n code: '',\n modifier: '',\n parserOptions: {}\n};\n\nexport default withTitle(Code);\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,SAAS,MAAM,mBAAmB;AACzC,OAAOC,OAAO,MAAM,YAAY;AAChC,SAASC,SAAS,QAAQ,WAAW;AACrC,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,IAAI,QAAQ,iBAAiB;AACtC,SAASC,cAAc,QAAQ,WAAW;AAE1C,MAAMC,IAAI,GAAGR,IAAI,CAACS,IAAA,IAAuD;EAAA,IAAtD;MAAEC,IAAI,EAAEC,SAAS;MAAEC;IAA6B,CAAC,GAAAH,IAAA;IAAZI,UAAU,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EAChE,IAAI,CAACJ,SAAS,EAAE,OAAO,IAAI;EAE3B,MAAMK,UAAU,GAAGd,SAAS,CAACS,SAAS,EAAEC,aAAa,CAAC;EACtD,MAAMK,WAAW,GAAGV,cAAc,CAACS,UAAU,CAAC;EAC9C,MAAME,SAAS,GAAGb,iBAAiB,CAACC,IAAI,EAAAa,aAAA,KAAON,UAAU,
|
|
1
|
+
{"version":3,"file":"Code.js","names":["React","memo","PropTypes","parseHTML","Wrapper","withTitle","getClassModifiers","CODE","wrapScriptTags","Code","_ref","code","embedCode","parserOptions","otherProps","_objectWithoutProperties","_excluded","parsedCode","wrappedCode","modifiers","_objectSpread","createElement","propTypes","string","modifier","object","defaultProps"],"sources":["../../../src/components/Code/Code.js"],"sourcesContent":["import React, { memo } from 'react';\nimport PropTypes from 'prop-types';\nimport parseHTML from 'html-react-parser';\nimport Wrapper from '../Wrapper';\nimport { withTitle } from '../../HOC';\nimport { getClassModifiers } from '../../utils';\nimport { CODE } from '../../constants';\nimport { wrapScriptTags } from './helpers';\n\nconst Code = memo(({ code: embedCode, parserOptions, ...otherProps }) => {\n if (!embedCode) return null;\n\n const parsedCode = parseHTML(embedCode, parserOptions);\n const wrappedCode = wrapScriptTags(parsedCode);\n const modifiers = getClassModifiers(CODE, { ...otherProps });\n\n return <Wrapper modifiers={modifiers}>{wrappedCode}</Wrapper>;\n});\n\nCode.propTypes = {\n code: PropTypes.string,\n modifier: PropTypes.string,\n parserOptions: PropTypes.object\n};\n\nCode.defaultProps = {\n code: '',\n modifier: '',\n parserOptions: {}\n};\n\nexport default withTitle(Code);\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,SAAS,MAAM,mBAAmB;AACzC,OAAOC,OAAO,MAAM,YAAY;AAChC,SAASC,SAAS,QAAQ,WAAW;AACrC,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,IAAI,QAAQ,iBAAiB;AACtC,SAASC,cAAc,QAAQ,WAAW;AAE1C,MAAMC,IAAI,GAAGR,IAAI,CAACS,IAAA,IAAuD;EAAA,IAAtD;MAAEC,IAAI,EAAEC,SAAS;MAAEC;IAA6B,CAAC,GAAAH,IAAA;IAAZI,UAAU,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EAChE,IAAI,CAACJ,SAAS,EAAE,OAAO,IAAI;EAE3B,MAAMK,UAAU,GAAGd,SAAS,CAACS,SAAS,EAAEC,aAAa,CAAC;EACtD,MAAMK,WAAW,GAAGV,cAAc,CAACS,UAAU,CAAC;EAC9C,MAAME,SAAS,GAAGb,iBAAiB,CAACC,IAAI,EAAAa,aAAA,KAAON,UAAU,CAAE,CAAC;EAE5D,oBAAOd,KAAA,CAAAqB,aAAA,CAACjB,OAAO;IAACe,SAAS,EAAEA;EAAU,GAAED,WAAqB,CAAC;AAC/D,CAAC,CAAC;AAEFT,IAAI,CAACa,SAAS,GAAG;EACfX,IAAI,EAAET,SAAS,CAACqB,MAAM;EACtBC,QAAQ,EAAEtB,SAAS,CAACqB,MAAM;EAC1BV,aAAa,EAAEX,SAAS,CAACuB;AAC3B,CAAC;AAEDhB,IAAI,CAACiB,YAAY,GAAG;EAClBf,IAAI,EAAE,EAAE;EACRa,QAAQ,EAAE,EAAE;EACZX,aAAa,EAAE,CAAC;AAClB,CAAC;AAED,eAAeR,SAAS,CAACI,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScriptTag.js","names":["React","useRef","useEffect","PropTypes","ScriptTag","_ref","dangerouslySetInnerHTML","innerHtml","otherProps","_objectWithoutProperties","_excluded","wrapperRef","script","document","createElement","Object","entries","forEach","key","value","type","text","__html","current","appendChild","ref","propTypes","object","defaultProps"],"sources":["../../../src/components/Code/ScriptTag.js"],"sourcesContent":["import React, { useRef, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nconst ScriptTag = ({ dangerouslySetInnerHTML: innerHtml, ...otherProps }) => {\n const wrapperRef = useRef(null);\n\n useEffect(() => {\n const script = document.createElement('script');\n Object.entries(otherProps).forEach(([key, value]) => {\n if (key === 'children') return;\n\n script[key] = value;\n });\n\n if (!script.type) script.type = 'text/javascript';\n if (innerHtml) script.text = innerHtml.__html;\n\n wrapperRef.current.appendChild(script);\n });\n\n return <span ref={wrapperRef} />;\n};\n\nScriptTag.propTypes = {\n dangerouslySetInnerHTML: PropTypes.object\n};\n\nScriptTag.defaultProps = {\n dangerouslySetInnerHTML: null\n};\n\nexport default ScriptTag;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,SAAS,QAAQ,OAAO;AAChD,OAAOC,SAAS,MAAM,YAAY;AAElC,MAAMC,SAAS,GAAGC,IAAA,IAA2D;EAAA,IAA1D;MAAEC,uBAAuB,EAAEC;IAAyB,CAAC,GAAAF,IAAA;IAAZG,UAAU,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EACpE,MAAMC,UAAU,GAAGV,MAAM,CAAC,IAAI,CAAC;EAE/BC,SAAS,CAAC,MAAM;IACd,MAAMU,MAAM,GAAGC,QAAQ,CAACC,aAAa,CAAC,QAAQ,CAAC;IAC/CC,MAAM,CAACC,OAAO,CAACR,UAAU,CAAC,CAACS,OAAO,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;MACnD,IAAID,GAAG,KAAK,UAAU,EAAE;MAExBN,MAAM,CAACM,GAAG,CAAC,GAAGC,KAAK;IACrB,CAAC,CAAC;IAEF,IAAI,CAACP,MAAM,CAACQ,IAAI,EAAER,MAAM,CAACQ,IAAI,GAAG,iBAAiB;IACjD,IAAIb,SAAS,EAAEK,MAAM,CAACS,IAAI,GAAGd,SAAS,CAACe,MAAM;IAE7CX,UAAU,CAACY,OAAO,CAACC,WAAW,CAACZ,MAAM,CAAC;EACxC,CAAC,CAAC;EAEF,oBAAOZ,KAAA,CAAAc,aAAA;IAAMW,GAAG,EAAEd;EAAW,
|
|
1
|
+
{"version":3,"file":"ScriptTag.js","names":["React","useRef","useEffect","PropTypes","ScriptTag","_ref","dangerouslySetInnerHTML","innerHtml","otherProps","_objectWithoutProperties","_excluded","wrapperRef","script","document","createElement","Object","entries","forEach","key","value","type","text","__html","current","appendChild","ref","propTypes","object","defaultProps"],"sources":["../../../src/components/Code/ScriptTag.js"],"sourcesContent":["import React, { useRef, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nconst ScriptTag = ({ dangerouslySetInnerHTML: innerHtml, ...otherProps }) => {\n const wrapperRef = useRef(null);\n\n useEffect(() => {\n const script = document.createElement('script');\n Object.entries(otherProps).forEach(([key, value]) => {\n if (key === 'children') return;\n\n script[key] = value;\n });\n\n if (!script.type) script.type = 'text/javascript';\n if (innerHtml) script.text = innerHtml.__html;\n\n wrapperRef.current.appendChild(script);\n });\n\n return <span ref={wrapperRef} />;\n};\n\nScriptTag.propTypes = {\n dangerouslySetInnerHTML: PropTypes.object\n};\n\nScriptTag.defaultProps = {\n dangerouslySetInnerHTML: null\n};\n\nexport default ScriptTag;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,SAAS,QAAQ,OAAO;AAChD,OAAOC,SAAS,MAAM,YAAY;AAElC,MAAMC,SAAS,GAAGC,IAAA,IAA2D;EAAA,IAA1D;MAAEC,uBAAuB,EAAEC;IAAyB,CAAC,GAAAF,IAAA;IAAZG,UAAU,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EACpE,MAAMC,UAAU,GAAGV,MAAM,CAAC,IAAI,CAAC;EAE/BC,SAAS,CAAC,MAAM;IACd,MAAMU,MAAM,GAAGC,QAAQ,CAACC,aAAa,CAAC,QAAQ,CAAC;IAC/CC,MAAM,CAACC,OAAO,CAACR,UAAU,CAAC,CAACS,OAAO,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;MACnD,IAAID,GAAG,KAAK,UAAU,EAAE;MAExBN,MAAM,CAACM,GAAG,CAAC,GAAGC,KAAK;IACrB,CAAC,CAAC;IAEF,IAAI,CAACP,MAAM,CAACQ,IAAI,EAAER,MAAM,CAACQ,IAAI,GAAG,iBAAiB;IACjD,IAAIb,SAAS,EAAEK,MAAM,CAACS,IAAI,GAAGd,SAAS,CAACe,MAAM;IAE7CX,UAAU,CAACY,OAAO,CAACC,WAAW,CAACZ,MAAM,CAAC;EACxC,CAAC,CAAC;EAEF,oBAAOZ,KAAA,CAAAc,aAAA;IAAMW,GAAG,EAAEd;EAAW,CAAE,CAAC;AAClC,CAAC;AAEDP,SAAS,CAACsB,SAAS,GAAG;EACpBpB,uBAAuB,EAAEH,SAAS,CAACwB;AACrC,CAAC;AAEDvB,SAAS,CAACwB,YAAY,GAAG;EACvBtB,uBAAuB,EAAE;AAC3B,CAAC;AAED,eAAeF,SAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrap-script-tags.js","names":["React","ScriptTag","getWrappedScriptTag","child","_child$props","props","children","scriptProps","_objectWithoutProperties","_excluded","type","createElement","_extends","key","cloneElement","wrapScriptTags","parsedCode","Array","isArray","forEach","index"],"sources":["../../../../src/components/Code/helpers/wrap-script-tags.js"],"sourcesContent":["import React from 'react';\nimport ScriptTag from '../ScriptTag';\n\nfunction getWrappedScriptTag(child) {\n if (!child) return child;\n\n if (typeof child === 'string') return child;\n\n const { children, ...scriptProps } = child.props;\n if (child.type === 'script') return <ScriptTag {...scriptProps} key={child.key} />;\n\n if (!children) return child;\n\n return React.cloneElement(child, child.props, wrapScriptTags(children));\n}\n\nfunction wrapScriptTags(parsedCode) {\n if (Array.isArray(parsedCode)) {\n parsedCode.forEach((child, index) => {\n try {\n // modify children array as we just want to wrap single components\n // eslint-disable-next-line no-param-reassign\n parsedCode[index] = getWrappedScriptTag(child);\n } catch {\n // catch read-only element errors\n }\n });\n\n return parsedCode;\n }\n\n return getWrappedScriptTag(parsedCode);\n}\n\nexport default wrapScriptTags;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,cAAc;AAEpC,SAASC,mBAAmBA,CAACC,KAAK,EAAE;EAClC,IAAI,CAACA,KAAK,EAAE,OAAOA,KAAK;EAExB,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE,OAAOA,KAAK;EAE3C,MAAAC,YAAA,GAAqCD,KAAK,CAACE,KAAK;IAA1C;MAAEC;IAAyB,CAAC,GAAAF,YAAA;IAAbG,WAAW,GAAAC,wBAAA,CAAAJ,YAAA,EAAAK,SAAA;EAChC,IAAIN,KAAK,CAACO,IAAI,KAAK,QAAQ,EAAE,oBAAOV,KAAA,CAAAW,aAAA,CAACV,SAAS,EAAAW,QAAA,KAAKL,WAAW;IAAEM,GAAG,EAAEV,KAAK,CAACU;EAAI,
|
|
1
|
+
{"version":3,"file":"wrap-script-tags.js","names":["React","ScriptTag","getWrappedScriptTag","child","_child$props","props","children","scriptProps","_objectWithoutProperties","_excluded","type","createElement","_extends","key","cloneElement","wrapScriptTags","parsedCode","Array","isArray","forEach","index"],"sources":["../../../../src/components/Code/helpers/wrap-script-tags.js"],"sourcesContent":["import React from 'react';\nimport ScriptTag from '../ScriptTag';\n\nfunction getWrappedScriptTag(child) {\n if (!child) return child;\n\n if (typeof child === 'string') return child;\n\n const { children, ...scriptProps } = child.props;\n if (child.type === 'script') return <ScriptTag {...scriptProps} key={child.key} />;\n\n if (!children) return child;\n\n return React.cloneElement(child, child.props, wrapScriptTags(children));\n}\n\nfunction wrapScriptTags(parsedCode) {\n if (Array.isArray(parsedCode)) {\n parsedCode.forEach((child, index) => {\n try {\n // modify children array as we just want to wrap single components\n // eslint-disable-next-line no-param-reassign\n parsedCode[index] = getWrappedScriptTag(child);\n } catch {\n // catch read-only element errors\n }\n });\n\n return parsedCode;\n }\n\n return getWrappedScriptTag(parsedCode);\n}\n\nexport default wrapScriptTags;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,cAAc;AAEpC,SAASC,mBAAmBA,CAACC,KAAK,EAAE;EAClC,IAAI,CAACA,KAAK,EAAE,OAAOA,KAAK;EAExB,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE,OAAOA,KAAK;EAE3C,MAAAC,YAAA,GAAqCD,KAAK,CAACE,KAAK;IAA1C;MAAEC;IAAyB,CAAC,GAAAF,YAAA;IAAbG,WAAW,GAAAC,wBAAA,CAAAJ,YAAA,EAAAK,SAAA;EAChC,IAAIN,KAAK,CAACO,IAAI,KAAK,QAAQ,EAAE,oBAAOV,KAAA,CAAAW,aAAA,CAACV,SAAS,EAAAW,QAAA,KAAKL,WAAW;IAAEM,GAAG,EAAEV,KAAK,CAACU;EAAI,EAAE,CAAC;EAElF,IAAI,CAACP,QAAQ,EAAE,OAAOH,KAAK;EAE3B,OAAOH,KAAK,CAACc,YAAY,CAACX,KAAK,EAAEA,KAAK,CAACE,KAAK,EAAEU,cAAc,CAACT,QAAQ,CAAC,CAAC;AACzE;AAEA,SAASS,cAAcA,CAACC,UAAU,EAAE;EAClC,IAAIC,KAAK,CAACC,OAAO,CAACF,UAAU,CAAC,EAAE;IAC7BA,UAAU,CAACG,OAAO,CAAC,CAAChB,KAAK,EAAEiB,KAAK,KAAK;MACnC,IAAI;QACF;QACA;QACAJ,UAAU,CAACI,KAAK,CAAC,GAAGlB,mBAAmB,CAACC,KAAK,CAAC;MAChD,CAAC,CAAC,MAAM;QACN;MAAA;IAEJ,CAAC,CAAC;IAEF,OAAOa,UAAU;EACnB;EAEA,OAAOd,mBAAmB,CAACc,UAAU,CAAC;AACxC;AAEA,eAAeD,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentGroup.js","names":["React","PropTypes","ContentGroupTabs","getSectionsData","ContentGroup","_ref","_children$props","contentType","children","props","_objectWithoutProperties","_excluded","groupSections","length","sectionsData","createElement","_extends","propTypes","object","isRequired","string","defaultProps"],"sources":["../../../src/components/ContentGroup/ContentGroup.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ContentGroupTabs from './ContentGroupTabs';\nimport { getSectionsData } from './helpers';\n\nconst ContentGroup = ({ contentType, children, ...props }) => {\n const groupSections = children?.props?.children[1];\n if (!groupSections || !groupSections.length) return '';\n if (contentType !== 'tab' && contentType !== 'sidepanel') return '';\n const sectionsData = getSectionsData(groupSections);\n\n return (\n <ContentGroupTabs\n contentType={contentType}\n groupSections={groupSections}\n sectionsData={sectionsData}\n {...props}\n />\n );\n};\n\nContentGroup.propTypes = {\n children: PropTypes.object.isRequired,\n contentType: PropTypes.string.isRequired\n};\n\nContentGroup.defaultProps = {};\n\nexport default ContentGroup;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,eAAe,QAAQ,WAAW;AAE3C,MAAMC,YAAY,GAAGC,IAAA,IAAyC;EAAA,IAAAC,eAAA;EAAA,IAAxC;MAAEC,WAAW;MAAEC;IAAmB,CAAC,GAAAH,IAAA;IAAPI,KAAK,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EACrD,MAAMC,aAAa,GAAGJ,QAAQ,aAARA,QAAQ,wBAAAF,eAAA,GAARE,QAAQ,CAAEC,KAAK,cAAAH,eAAA,uBAAfA,eAAA,CAAiBE,QAAQ,CAAC,CAAC,CAAC;EAClD,IAAI,CAACI,aAAa,IAAI,CAACA,aAAa,CAACC,MAAM,EAAE,OAAO,EAAE;EACtD,IAAIN,WAAW,KAAK,KAAK,IAAIA,WAAW,KAAK,WAAW,EAAE,OAAO,EAAE;EACnE,MAAMO,YAAY,GAAGX,eAAe,CAACS,aAAa,CAAC;EAEnD,oBACEZ,KAAA,CAAAe,aAAA,CAACb,gBAAgB,EAAAc,QAAA;IACfT,WAAW,EAAEA,WAAY;IACzBK,aAAa,EAAEA,aAAc;IAC7BE,YAAY,EAAEA;EAAa,GACvBL,KAAK,
|
|
1
|
+
{"version":3,"file":"ContentGroup.js","names":["React","PropTypes","ContentGroupTabs","getSectionsData","ContentGroup","_ref","_children$props","contentType","children","props","_objectWithoutProperties","_excluded","groupSections","length","sectionsData","createElement","_extends","propTypes","object","isRequired","string","defaultProps"],"sources":["../../../src/components/ContentGroup/ContentGroup.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ContentGroupTabs from './ContentGroupTabs';\nimport { getSectionsData } from './helpers';\n\nconst ContentGroup = ({ contentType, children, ...props }) => {\n const groupSections = children?.props?.children[1];\n if (!groupSections || !groupSections.length) return '';\n if (contentType !== 'tab' && contentType !== 'sidepanel') return '';\n const sectionsData = getSectionsData(groupSections);\n\n return (\n <ContentGroupTabs\n contentType={contentType}\n groupSections={groupSections}\n sectionsData={sectionsData}\n {...props}\n />\n );\n};\n\nContentGroup.propTypes = {\n children: PropTypes.object.isRequired,\n contentType: PropTypes.string.isRequired\n};\n\nContentGroup.defaultProps = {};\n\nexport default ContentGroup;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,eAAe,QAAQ,WAAW;AAE3C,MAAMC,YAAY,GAAGC,IAAA,IAAyC;EAAA,IAAAC,eAAA;EAAA,IAAxC;MAAEC,WAAW;MAAEC;IAAmB,CAAC,GAAAH,IAAA;IAAPI,KAAK,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EACrD,MAAMC,aAAa,GAAGJ,QAAQ,aAARA,QAAQ,wBAAAF,eAAA,GAARE,QAAQ,CAAEC,KAAK,cAAAH,eAAA,uBAAfA,eAAA,CAAiBE,QAAQ,CAAC,CAAC,CAAC;EAClD,IAAI,CAACI,aAAa,IAAI,CAACA,aAAa,CAACC,MAAM,EAAE,OAAO,EAAE;EACtD,IAAIN,WAAW,KAAK,KAAK,IAAIA,WAAW,KAAK,WAAW,EAAE,OAAO,EAAE;EACnE,MAAMO,YAAY,GAAGX,eAAe,CAACS,aAAa,CAAC;EAEnD,oBACEZ,KAAA,CAAAe,aAAA,CAACb,gBAAgB,EAAAc,QAAA;IACfT,WAAW,EAAEA,WAAY;IACzBK,aAAa,EAAEA,aAAc;IAC7BE,YAAY,EAAEA;EAAa,GACvBL,KAAK,CACV,CAAC;AAEN,CAAC;AAEDL,YAAY,CAACa,SAAS,GAAG;EACvBT,QAAQ,EAAEP,SAAS,CAACiB,MAAM,CAACC,UAAU;EACrCZ,WAAW,EAAEN,SAAS,CAACmB,MAAM,CAACD;AAChC,CAAC;AAEDf,YAAY,CAACiB,YAAY,GAAG,CAAC,CAAC;AAE9B,eAAejB,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentGroupTabs.js","names":["React","useState","useEffect","PropTypes","useRouter","getActiveTab","TAB","TABS","SIDEPANEL","CONTENT_GROUP","PANEL","ContentGroupTabs","name","contentType","modifier","groupSections","sectionsData","router","selectedTab","setSelectedTab","asPath","contentClassame","mainDivClass","contentGroupClass","sectionClass","activeTab","createElement","className","role","map","groupSection","index","sectionName","sectioLabel","tabId","panelId","isSelected","buttonClassName","id","key","type","onClick","baseUrl","split","newUrl","push","shallow","propTypes","string","isRequired","array","defaultProps"],"sources":["../../../src/components/ContentGroup/ContentGroupTabs.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { useRouter } from 'next/router';\nimport { getActiveTab } from './helpers';\nimport { TAB, TABS, SIDEPANEL, CONTENT_GROUP, PANEL } from './constants';\n\nconst ContentGroupTabs = ({ name, contentType, modifier, groupSections, sectionsData }) => {\n const router = useRouter();\n const [selectedTab, setSelectedTab] = useState(getActiveTab(sectionsData, ''));\n const { asPath } = router;\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 () => {\n const activeTab = getActiveTab(sectionsData, asPath);\n if (activeTab !== selectedTab) setSelectedTab(activeTab);\n },\n [asPath, sectionsData, selectedTab]\n );\n\n return (\n <div className={mainDivClass}>\n <ul className={contentGroupClass} role=\"tablist\" aria-label={name}>\n {groupSections.map((groupSection, index) => {\n const [sectionName, sectioLabel] = sectionsData[index];\n const tabId = `${TAB}-${sectionName}`;\n const panelId = `${PANEL}-${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={panelId}\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 setSelectedTab(tabId);\n }}>\n {sectioLabel}\n </button>\n );\n })}\n </ul>\n {groupSections.map((groupSection, index) => {\n const [sectionName] = sectionsData[index];\n const tabId = `${TAB}-${sectionName}`;\n const panelId = `${PANEL}-${sectionName}`;\n if (selectedTab !== tabId) return null;\n\n return (\n <div\n id={sectionName}\n key={panelId}\n className={sectionClass}\n role=\"tabpanel\"\n aria-labelledby={tabId}>\n {groupSection}\n </div>\n );\n })}\n </div>\n );\n};\n\nContentGroupTabs.propTypes = {\n name: PropTypes.string.isRequired,\n contentType: PropTypes.string.isRequired,\n modifier: PropTypes.string,\n groupSections: PropTypes.array.isRequired,\n sectionsData: PropTypes.array.isRequired\n};\n\nContentGroupTabs.defaultProps = {\n modifier: ''\n};\n\nexport default ContentGroupTabs;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAClD,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,GAAG,EAAEC,IAAI,EAAEC,SAAS,EAAEC,aAAa,EAAEC,KAAK,QAAQ,aAAa;AAExE,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC,IAAI;EAAEC,WAAW;EAAEC,QAAQ;EAAEC,aAAa;EAAEC;AAAa,CAAC,KAAK;EACzF,MAAMC,MAAM,GAAGb,SAAS,
|
|
1
|
+
{"version":3,"file":"ContentGroupTabs.js","names":["React","useState","useEffect","PropTypes","useRouter","getActiveTab","TAB","TABS","SIDEPANEL","CONTENT_GROUP","PANEL","ContentGroupTabs","name","contentType","modifier","groupSections","sectionsData","router","selectedTab","setSelectedTab","asPath","contentClassame","mainDivClass","contentGroupClass","sectionClass","activeTab","createElement","className","role","map","groupSection","index","sectionName","sectioLabel","tabId","panelId","isSelected","buttonClassName","id","key","type","onClick","baseUrl","split","newUrl","push","shallow","propTypes","string","isRequired","array","defaultProps"],"sources":["../../../src/components/ContentGroup/ContentGroupTabs.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { useRouter } from 'next/router';\nimport { getActiveTab } from './helpers';\nimport { TAB, TABS, SIDEPANEL, CONTENT_GROUP, PANEL } from './constants';\n\nconst ContentGroupTabs = ({ name, contentType, modifier, groupSections, sectionsData }) => {\n const router = useRouter();\n const [selectedTab, setSelectedTab] = useState(getActiveTab(sectionsData, ''));\n const { asPath } = router;\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 () => {\n const activeTab = getActiveTab(sectionsData, asPath);\n if (activeTab !== selectedTab) setSelectedTab(activeTab);\n },\n [asPath, sectionsData, selectedTab]\n );\n\n return (\n <div className={mainDivClass}>\n <ul className={contentGroupClass} role=\"tablist\" aria-label={name}>\n {groupSections.map((groupSection, index) => {\n const [sectionName, sectioLabel] = sectionsData[index];\n const tabId = `${TAB}-${sectionName}`;\n const panelId = `${PANEL}-${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={panelId}\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 setSelectedTab(tabId);\n }}>\n {sectioLabel}\n </button>\n );\n })}\n </ul>\n {groupSections.map((groupSection, index) => {\n const [sectionName] = sectionsData[index];\n const tabId = `${TAB}-${sectionName}`;\n const panelId = `${PANEL}-${sectionName}`;\n if (selectedTab !== tabId) return null;\n\n return (\n <div\n id={sectionName}\n key={panelId}\n className={sectionClass}\n role=\"tabpanel\"\n aria-labelledby={tabId}>\n {groupSection}\n </div>\n );\n })}\n </div>\n );\n};\n\nContentGroupTabs.propTypes = {\n name: PropTypes.string.isRequired,\n contentType: PropTypes.string.isRequired,\n modifier: PropTypes.string,\n groupSections: PropTypes.array.isRequired,\n sectionsData: PropTypes.array.isRequired\n};\n\nContentGroupTabs.defaultProps = {\n modifier: ''\n};\n\nexport default ContentGroupTabs;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,QAA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C,oBACElC,KAAA,CAAA0B,aAAA;MACEY,EAAE,EAAEN,WAAY;MAChBO,GAAG,EAAEJ,OAAQ;MACbR,SAAS,EAAEH,YAAa;MACxBI,IAAI,EAAC,UAAU;MACf,mBAAiBM;IAAM,GACtBJ,YACE,CAAC;EAEV,CAAC,CACE,CAAC;AAEV,CAAC;AAEDnB,gBAAgB,CAACoC,SAAS,GAAG;EAC3BnC,IAAI,EAAET,SAAS,CAAC6C,MAAM,CAACC,UAAU;EACjCpC,WAAW,EAAEV,SAAS,CAAC6C,MAAM,CAACC,UAAU;EACxCnC,QAAQ,EAAEX,SAAS,CAAC6C,MAAM;EAC1BjC,aAAa,EAAEZ,SAAS,CAAC+C,KAAK,CAACD,UAAU;EACzCjC,YAAY,EAAEb,SAAS,CAAC+C,KAAK,CAACD;AAChC,CAAC;AAEDtC,gBAAgB,CAACwC,YAAY,GAAG;EAC9BrC,QAAQ,EAAE;AACZ,CAAC;AAED,eAAeH,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentGroupSection.js","names":["React","PropTypes","hasChildren","ContentGroupSection","_ref","children","name","props","_objectWithoutProperties","_excluded","createElement","key","className","propTypes","oneOfType","arrayOf","node","string","defaultProps"],"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, ...props }) => {\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,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,WAAW,QAAQ,eAAe;AAE3C,MAAMC,mBAAmB,GAAGC,IAAA,IAAkC;EAAA,IAAjC;MAAEC,QAAQ;MAAEC;IAAe,CAAC,GAAAF,IAAA;IAAPG,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EACrD,IAAI,CAACP,WAAW,CAACG,QAAQ,CAAC,EAAE,OAAO,IAAI;EAEvC,oBACEL,KAAA,CAAAU,aAAA;IAAKC,GAAG,EAAEL,IAAK;IAACM,SAAS,EAAC;EAAuB,GAC9CP,
|
|
1
|
+
{"version":3,"file":"ContentGroupSection.js","names":["React","PropTypes","hasChildren","ContentGroupSection","_ref","children","name","props","_objectWithoutProperties","_excluded","createElement","key","className","propTypes","oneOfType","arrayOf","node","string","defaultProps"],"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, ...props }) => {\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,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,WAAW,QAAQ,eAAe;AAE3C,MAAMC,mBAAmB,GAAGC,IAAA,IAAkC;EAAA,IAAjC;MAAEC,QAAQ;MAAEC;IAAe,CAAC,GAAAF,IAAA;IAAPG,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EACrD,IAAI,CAACP,WAAW,CAACG,QAAQ,CAAC,EAAE,OAAO,IAAI;EAEvC,oBACEL,KAAA,CAAAU,aAAA;IAAKC,GAAG,EAAEL,IAAK;IAACM,SAAS,EAAC;EAAuB,GAC9CP,QACE,CAAC;AAEV,CAAC;AAEDF,mBAAmB,CAACU,SAAS,GAAG;EAC9BR,QAAQ,EAAEJ,SAAS,CAACa,SAAS,CAAC,CAACb,SAAS,CAACc,OAAO,CAACd,SAAS,CAACe,IAAI,CAAC,EAAEf,SAAS,CAACe,IAAI,CAAC,CAAC;EAClFV,IAAI,EAAEL,SAAS,CAACgB;AAClB,CAAC;AAEDd,mBAAmB,CAACe,YAAY,GAAG;EAAEb,QAAQ,EAAE,IAAI;EAAEC,IAAI,EAAE;AAAG,CAAC;AAE/D,eAAeH,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSummaryFactory.js","names":["React","useContext","useQuery","PropTypes","MainContext","getSingleEntitySchema","buildPropsQuery","checkPropsToUse","getDataSummaryQuery","getLinkProps","DataSummaryRender","DataSummaryFactory","_ref","entity","dataRecordId","propsToDisplay","type","useSelectedEntity","elementTitle","modifier","headingStyle","loopProperties","loopLimit","dataSummaryProps","_objectWithoutProperties","_excluded","entityForQuery","parent","itemEntity","data","error","loading","variables","id","isPreview","message","length","propsToDisplayValues","linkProps","propsQueryString","dataSummaryQuery","recordId","itemId","createElement","query","htmlTag","propTypes","string","array","bool","number","defaultProps"],"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 } 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 ...dataSummaryProps\n}) => {\n const entityForQuery = useSelectedEntity ? entity : dataSummaryProps.parent.itemEntity;\n const { data, error, loading } = useQuery(getSingleEntitySchema, {\n variables: { id: entityForQuery }\n });\n const { isPreview } = useContext(MainContext);\n\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 recordId = dataRecordId[0] || dataSummaryProps.parent.itemId;\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 />\n );\n};\n\nDataSummaryFactory.propTypes = {\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};\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};\n\nexport default DataSummaryFactory;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,eAAe,EAAEC,eAAe,QAAQ,eAAe;AAChE,SAASC,mBAAmB,EAAEC,YAAY,QAAQ,WAAW;AAC7D,OAAOC,iBAAiB,MAAM,qBAAqB;AAEnD,MAAMC,kB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IACnB1B,cAAc,EAAEA,cAAe;IAC/BM,cAAc,EAAEA,cAAe;IAC/BC,SAAS,EAAEA,SAAU;IACrBsB,KAAK,EAAEJ,gBAAiB;IACxBxB,IAAI,EAAEA,IAAK;IACXE,YAAY,EAAEA,YAAa;IAC3BC,QAAQ,EAAEA,QAAS;IACnB0B,OAAO,EAAEzB;EAAa,
|
|
1
|
+
{"version":3,"file":"DataSummaryFactory.js","names":["React","useContext","useQuery","PropTypes","MainContext","getSingleEntitySchema","buildPropsQuery","checkPropsToUse","getDataSummaryQuery","getLinkProps","DataSummaryRender","DataSummaryFactory","_ref","entity","dataRecordId","propsToDisplay","type","useSelectedEntity","elementTitle","modifier","headingStyle","loopProperties","loopLimit","dataSummaryProps","_objectWithoutProperties","_excluded","entityForQuery","parent","itemEntity","data","error","loading","variables","id","isPreview","message","length","propsToDisplayValues","linkProps","propsQueryString","dataSummaryQuery","recordId","itemId","createElement","query","htmlTag","propTypes","string","array","bool","number","defaultProps"],"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 } 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 ...dataSummaryProps\n}) => {\n const entityForQuery = useSelectedEntity ? entity : dataSummaryProps.parent.itemEntity;\n const { data, error, loading } = useQuery(getSingleEntitySchema, {\n variables: { id: entityForQuery }\n });\n const { isPreview } = useContext(MainContext);\n\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 recordId = dataRecordId[0] || dataSummaryProps.parent.itemId;\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 />\n );\n};\n\nDataSummaryFactory.propTypes = {\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};\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};\n\nexport default DataSummaryFactory;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,eAAe,EAAEC,eAAe,QAAQ,eAAe;AAChE,SAASC,mBAAmB,EAAEC,YAAY,QAAQ,WAAW;AAC7D,OAAOC,iBAAiB,MAAM,qBAAqB;AAEnD,MAAMC,kBAAkB,GAAGC,IAAA,IAYrB;EAAA,IAZsB;MAC1BC,MAAM;MACNC,YAAY;MACZC,cAAc;MACdC,IAAI;MACJC,iBAAiB;MACjBC,YAAY;MACZC,QAAQ;MACRC,YAAY;MACZC,cAAc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EAAEA,YAAa;IAC3BC,QAAQ,EAAEA,QAAS;IACnB0B,OAAO,EAAEzB;EAAa,CACvB,CAAC;AAEN,CAAC;AAEDT,kBAAkB,CAACmC,SAAS,GAAG;EAC7B9B,IAAI,EAAEb,SAAS,CAAC4C,MAAM;EACtBjC,YAAY,EAAEX,SAAS,CAAC6C,KAAK;EAC7BjC,cAAc,EAAEZ,SAAS,CAAC6C,KAAK;EAC/BnC,MAAM,EAAEV,SAAS,CAAC4C,MAAM;EACxB9B,iBAAiB,EAAEd,SAAS,CAAC8C,IAAI;EACjC/B,YAAY,EAAEf,SAAS,CAAC4C,MAAM;EAC9B5B,QAAQ,EAAEhB,SAAS,CAAC4C,MAAM;EAC1B3B,YAAY,EAAEjB,SAAS,CAAC4C,MAAM;EAC9B1B,cAAc,EAAElB,SAAS,CAAC6C,KAAK;EAC/B1B,SAAS,EAAEnB,SAAS,CAAC+C;AACvB,CAAC;AAEDvC,kBAAkB,CAACwC,YAAY,GAAG;EAChCnC,IAAI,EAAE,MAAM;EACZF,YAAY,EAAE,EAAE;EAChBC,cAAc,EAAE,EAAE;EAClBE,iBAAiB,EAAE,IAAI;EACvBJ,MAAM,EAAE,EAAE;EACVK,YAAY,EAAE,EAAE;EAChBC,QAAQ,EAAE,EAAE;EACZC,YAAY,EAAE,IAAI;EAClBC,cAAc,EAAE,EAAE;EAClBC,SAAS,EAAE;AACb,CAAC;AAED,eAAeX,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataSummaryRender.js","names":["React","useQuery","PropTypes","summaryComponents","getClassModifiers","buildPropsToDisplayWithContent","stripSummaryPropsContent","buildLoopPropsContent","DataSummaryRender","_ref","type","htmlTag","recordId","query","propsToDisplay","elementTitle","loopProperties","loopLimit","otherProps","_objectWithoutProperties","_excluded","data","error","loading","variables","id","message","entityData","shouldLoop","length","modifier","summaryPropsWithContent","summaryPropsWithCleanContent","SummaryComponent","createElement","propTypes","string","object","array","number","defaultProps"],"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';\n\nconst DataSummaryRender = ({\n type,\n htmlTag,\n recordId,\n query,\n propsToDisplay,\n elementTitle,\n loopProperties,\n loopLimit,\n ...otherProps\n}) => {\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)\n : buildPropsToDisplayWithContent(entityData, propsToDisplay);\n\n const summaryPropsWithCleanContent = stripSummaryPropsContent(\n propsToDisplay,\n summaryPropsWithContent\n );\n const SummaryComponent = summaryComponents[type];\n if (!summaryPropsWithCleanContent.length) return null;\n\n return (\n <SummaryComponent\n modifier={modifier}\n elementTitle={elementTitle}\n summaryPropsWithContent={summaryPropsWithCleanContent}\n htmlTag={htmlTag}\n />\n );\n};\n\nDataSummaryRender.propTypes = {\n type: 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};\n\nDataSummaryRender.defaultProps = {\n type: 'text',\n query: {},\n recordId: '',\n propsToDisplay: [],\n elementTitle: '',\n htmlTag: 'h2',\n loopProperties: [],\n loopLimit: 0\n};\n\nexport default DataSummaryRender;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SACEC,8BAA8B,EAC9BC,wBAAwB,EACxBC,qBAAqB,QAChB,WAAW;AAElB,MAAMC,iBAAiB,GAAGC,IAAA,IAUpB;EAAA,IAVqB;MACzBC,IAAI;MACJC,OAAO;MACPC,QAAQ;MACRC,KAAK;MACLC,cAAc;MACdC,YAAY;MACZC,cAAc;MACdC;IAEF,CAAC,GAAAR,IAAA;IADIS,UAAU,GAAAC,wBAAA,CAAAV,IAAA,EAAAW,SAAA;EAEb,MAAM;IAAEC,IAAI;IAAEC,KAAK;IAAEC;EAAQ,CAAC,GAAGtB,QAAQ,CAACY,KAAK,EAAE;IAC/CW,SAAS,EAAE;MAAEC,EAAE,EAAEb;IAAS;EAC5B,CAAC,CAAC;EAEF,IAAIW,OAAO,EAAE,OAAO,EAAE;EACtB,IAAID,KAAK,EAAE,OAAOA,KAAK,CAACI,OAAO;EAC/B,IAAI,CAACL,IAAI,IAAI,CAACA,IAAI,CAACM,UAAU,EAAE,OAAO,IAAI;EAE1C,MAAM;IAAEA;EAAW,CAAC,GAAGN,IAAI;EAC3B,MAAMO,UAAU,GAAGZ,cAAc,IAAIA,cAAc,CAACa,MAAM;EAC1D,MAAMC,QAAQ,GAAG1B,iBAAiB,CAAC,MAAM,EAAEc,UAAU,CAAC;EACtD,MAAMa,uBAAuB,GAAGH,UAAU,GACtCrB,qBAAqB,CAACS,cAAc,EAAEF,cAAc,EAAEG,SAAS,EAAEU,UAAU,CAAC,GAC5EtB,8BAA8B,CAACsB,UAAU,EAAEb,cAAc,CAAC;EAE9D,MAAMkB,4BAA4B,GAAG1B,wBAAwB,CAC3DQ,cAAc,EACdiB,
|
|
1
|
+
{"version":3,"file":"DataSummaryRender.js","names":["React","useQuery","PropTypes","summaryComponents","getClassModifiers","buildPropsToDisplayWithContent","stripSummaryPropsContent","buildLoopPropsContent","DataSummaryRender","_ref","type","htmlTag","recordId","query","propsToDisplay","elementTitle","loopProperties","loopLimit","otherProps","_objectWithoutProperties","_excluded","data","error","loading","variables","id","message","entityData","shouldLoop","length","modifier","summaryPropsWithContent","summaryPropsWithCleanContent","SummaryComponent","createElement","propTypes","string","object","array","number","defaultProps"],"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';\n\nconst DataSummaryRender = ({\n type,\n htmlTag,\n recordId,\n query,\n propsToDisplay,\n elementTitle,\n loopProperties,\n loopLimit,\n ...otherProps\n}) => {\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)\n : buildPropsToDisplayWithContent(entityData, propsToDisplay);\n\n const summaryPropsWithCleanContent = stripSummaryPropsContent(\n propsToDisplay,\n summaryPropsWithContent\n );\n const SummaryComponent = summaryComponents[type];\n if (!summaryPropsWithCleanContent.length) return null;\n\n return (\n <SummaryComponent\n modifier={modifier}\n elementTitle={elementTitle}\n summaryPropsWithContent={summaryPropsWithCleanContent}\n htmlTag={htmlTag}\n />\n );\n};\n\nDataSummaryRender.propTypes = {\n type: 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};\n\nDataSummaryRender.defaultProps = {\n type: 'text',\n query: {},\n recordId: '',\n propsToDisplay: [],\n el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BAAwB,CAC3DQ,cAAc,EACdiB,uBACF,CAAC;EACD,MAAME,gBAAgB,GAAG9B,iBAAiB,CAACO,IAAI,CAAC;EAChD,IAAI,CAACsB,4BAA4B,CAACH,MAAM,EAAE,OAAO,IAAI;EAErD,oBACE7B,KAAA,CAAAkC,aAAA,CAACD,gBAAgB;IACfH,QAAQ,EAAEA,QAAS;IACnBf,YAAY,EAAEA,YAAa;IAC3BgB,uBAAuB,EAAEC,4BAA6B;IACtDrB,OAAO,EAAEA;EAAQ,CAClB,CAAC;AAEN,CAAC;AAEDH,iBAAiB,CAAC2B,SAAS,GAAG;EAC5BzB,IAAI,EAAER,SAAS,CAACkC,MAAM;EACtBvB,KAAK,EAAEX,SAAS,CAACmC,MAAM;EACvBzB,QAAQ,EAAEV,SAAS,CAACkC,MAAM;EAC1BtB,cAAc,EAAEZ,SAAS,CAACoC,KAAK;EAC/BvB,YAAY,EAAEb,SAAS,CAACkC,MAAM;EAC9BzB,OAAO,EAAET,SAAS,CAACkC,MAAM;EACzBpB,cAAc,EAAEd,SAAS,CAACoC,KAAK;EAC/BrB,SAAS,EAAEf,SAAS,CAACqC;AACvB,CAAC;AAED/B,iBAAiB,CAACgC,YAAY,GAAG;EAC/B9B,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;AACb,CAAC;AAED,eAAeT,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadingLargeSummary.js","names":["React","PropTypes","getModifiers","HeadingLargeSummaryContent","HeadingLargeSummary","htmlTag","HtmlTag","summaryPropsWithContent","modifier","createElement","className","propTypes","array","isRequired","string","defaultProps"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummary.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { getModifiers } from '../../../../helpers';\nimport HeadingLargeSummaryContent from './HeadingLargeSummaryContent';\n\nconst HeadingLargeSummary = ({ htmlTag: HtmlTag, summaryPropsWithContent, modifier }) => (\n <HtmlTag className={`${getModifiers('heading', modifier)} heading--large`}>\n <HeadingLargeSummaryContent summaryPropsWithContent={summaryPropsWithContent} />\n </HtmlTag>\n);\n\nHeadingLargeSummary.propTypes = {\n summaryPropsWithContent: PropTypes.array.isRequired,\n modifier: PropTypes.string,\n htmlTag: PropTypes.string\n};\n\nHeadingLargeSummary.defaultProps = {\n modifier: '',\n htmlTag: 'h2'\n};\n\nexport default HeadingLargeSummary;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,qBAAqB;AAClD,OAAOC,0BAA0B,MAAM,8BAA8B;AAErE,MAAMC,mBAAmB,GAAGA,CAAC;EAAEC,OAAO,EAAEC,OAAO;EAAEC,uBAAuB;EAAEC;AAAS,CAAC,kBAClFR,KAAA,CAAAS,aAAA,CAACH,OAAO;EAACI,SAAS,EAAG,GAAER,YAAY,CAAC,SAAS,EAAEM,QAAQ,CAAE;AAAiB,gBACxER,KAAA,CAAAS,aAAA,CAACN,0BAA0B;EAACI,uBAAuB,EAAEA;AAAwB,
|
|
1
|
+
{"version":3,"file":"HeadingLargeSummary.js","names":["React","PropTypes","getModifiers","HeadingLargeSummaryContent","HeadingLargeSummary","htmlTag","HtmlTag","summaryPropsWithContent","modifier","createElement","className","propTypes","array","isRequired","string","defaultProps"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/HeadingLargeSummary/HeadingLargeSummary.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { getModifiers } from '../../../../helpers';\nimport HeadingLargeSummaryContent from './HeadingLargeSummaryContent';\n\nconst HeadingLargeSummary = ({ htmlTag: HtmlTag, summaryPropsWithContent, modifier }) => (\n <HtmlTag className={`${getModifiers('heading', modifier)} heading--large`}>\n <HeadingLargeSummaryContent summaryPropsWithContent={summaryPropsWithContent} />\n </HtmlTag>\n);\n\nHeadingLargeSummary.propTypes = {\n summaryPropsWithContent: PropTypes.array.isRequired,\n modifier: PropTypes.string,\n htmlTag: PropTypes.string\n};\n\nHeadingLargeSummary.defaultProps = {\n modifier: '',\n htmlTag: 'h2'\n};\n\nexport default HeadingLargeSummary;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,qBAAqB;AAClD,OAAOC,0BAA0B,MAAM,8BAA8B;AAErE,MAAMC,mBAAmB,GAAGA,CAAC;EAAEC,OAAO,EAAEC,OAAO;EAAEC,uBAAuB;EAAEC;AAAS,CAAC,kBAClFR,KAAA,CAAAS,aAAA,CAACH,OAAO;EAACI,SAAS,EAAG,GAAER,YAAY,CAAC,SAAS,EAAEM,QAAQ,CAAE;AAAiB,gBACxER,KAAA,CAAAS,aAAA,CAACN,0BAA0B;EAACI,uBAAuB,EAAEA;AAAwB,CAAE,CACxE,CACV;AAEDH,mBAAmB,CAACO,SAAS,GAAG;EAC9BJ,uBAAuB,EAAEN,SAAS,CAACW,KAAK,CAACC,UAAU;EACnDL,QAAQ,EAAEP,SAAS,CAACa,MAAM;EAC1BT,OAAO,EAAEJ,SAAS,CAACa;AACrB,CAAC;AAEDV,mBAAmB,CAACW,YAAY,GAAG;EACjCP,QAAQ,EAAE,EAAE;EACZH,OAAO,EAAE;AACX,CAAC;AAED,eAAeD,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadingLargeSummaryContent.js","names":["React","Fragment","useContext","PropTypes","MainContext","getWrappedValueWithLink","parseBooleanValues","HeadingLargeSummaryContent","summaryPropsWithContent","itemId","map","key","value","index","dynamicKey","join","wrappedValue","createElement","propTypes","array","isRequired"],"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,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,UAAU,QAAQ,OAAO;AACnD,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,uBAAuB,QAAQ,qBAAqB;AAC7D,SAASC,kBAAkB,QAAQ,eAAe;AAElD,MAAMC,0BAA0B,GAAGA,CAAC;EAAEC;AAAwB,CAAC,KAAK;EAClE,MAAM;IAAEC;EAAO,CAAC,GAAGP,UAAU,CAACE,WAAW,CAAC;EAE1C,OAAOI,uBAAuB,CAACE,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,EAAEC,KAAK,KAAK;IAC1D,MAAMC,UAAU,GAAG,CAACL,MAAM,EAAEI,KAAK,CAAC,CAACE,IAAI,CAAC,GAAG,CAAC;IAC5C,MAAMC,YAAY,GAAGV,kBAAkB,CAACD,uBAAuB,CAACO,KAAK,EAAE,IAAI,EAAEH,MAAM,CAAC,EAAEE,GAAG,CAAC;IAE1F,oBAAOX,KAAA,CAAAiB,aAAA,CAAChB,QAAQ;MAACU,GAAG,EAAEG;IAAW,GAAEE,
|
|
1
|
+
{"version":3,"file":"HeadingLargeSummaryContent.js","names":["React","Fragment","useContext","PropTypes","MainContext","getWrappedValueWithLink","parseBooleanValues","HeadingLargeSummaryContent","summaryPropsWithContent","itemId","map","key","value","index","dynamicKey","join","wrappedValue","createElement","propTypes","array","isRequired"],"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,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,UAAU,QAAQ,OAAO;AACnD,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,uBAAuB,QAAQ,qBAAqB;AAC7D,SAASC,kBAAkB,QAAQ,eAAe;AAElD,MAAMC,0BAA0B,GAAGA,CAAC;EAAEC;AAAwB,CAAC,KAAK;EAClE,MAAM;IAAEC;EAAO,CAAC,GAAGP,UAAU,CAACE,WAAW,CAAC;EAE1C,OAAOI,uBAAuB,CAACE,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,EAAEC,KAAK,KAAK;IAC1D,MAAMC,UAAU,GAAG,CAACL,MAAM,EAAEI,KAAK,CAAC,CAACE,IAAI,CAAC,GAAG,CAAC;IAC5C,MAAMC,YAAY,GAAGV,kBAAkB,CAACD,uBAAuB,CAACO,KAAK,EAAE,IAAI,EAAEH,MAAM,CAAC,EAAEE,GAAG,CAAC;IAE1F,oBAAOX,KAAA,CAAAiB,aAAA,CAAChB,QAAQ;MAACU,GAAG,EAAEG;IAAW,GAAEE,YAAuB,CAAC;EAC7D,CAAC,CAAC;AACJ,CAAC;AAEDT,0BAA0B,CAACW,SAAS,GAAG;EACrCV,uBAAuB,EAAEL,SAAS,CAACgB,KAAK,CAACC;AAC3C,CAAC;AAED,eAAeb,0BAA0B"}
|
package/lib-es/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummary.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemDetailsSummary.js","names":["React","PropTypes","getModifiers","ItemDetailsSummaryContent","ItemDetailsSummary","_ref","modifier","otherProps","_objectWithoutProperties","_excluded","createElement","className","propTypes","string","defaultProps"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummary.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { getModifiers } from '../../../../helpers';\nimport ItemDetailsSummaryContent from './ItemDetailsSummaryContent';\n\nconst ItemDetailsSummary = ({ modifier, ...otherProps }) => (\n <div className={getModifiers('details', modifier)}>\n <ItemDetailsSummaryContent {...otherProps} />\n </div>\n);\n\nItemDetailsSummary.propTypes = {\n modifier: PropTypes.string\n};\n\nItemDetailsSummary.defaultProps = {\n modifier: ''\n};\n\nexport default ItemDetailsSummary;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,qBAAqB;AAClD,OAAOC,yBAAyB,MAAM,6BAA6B;AAEnE,MAAMC,kBAAkB,GAAGC,IAAA;EAAA,IAAC;MAAEC;IAAwB,CAAC,GAAAD,IAAA;IAAZE,UAAU,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA;EAAA,oBACnDT,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAET,YAAY,CAAC,SAAS,EAAEI,QAAQ;EAAE,gBAChDN,KAAA,CAAAU,aAAA,CAACP,yBAAyB,EAAKI,
|
|
1
|
+
{"version":3,"file":"ItemDetailsSummary.js","names":["React","PropTypes","getModifiers","ItemDetailsSummaryContent","ItemDetailsSummary","_ref","modifier","otherProps","_objectWithoutProperties","_excluded","createElement","className","propTypes","string","defaultProps"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/ItemDetailsSummary/ItemDetailsSummary.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { getModifiers } from '../../../../helpers';\nimport ItemDetailsSummaryContent from './ItemDetailsSummaryContent';\n\nconst ItemDetailsSummary = ({ modifier, ...otherProps }) => (\n <div className={getModifiers('details', modifier)}>\n <ItemDetailsSummaryContent {...otherProps} />\n </div>\n);\n\nItemDetailsSummary.propTypes = {\n modifier: PropTypes.string\n};\n\nItemDetailsSummary.defaultProps = {\n modifier: ''\n};\n\nexport default ItemDetailsSummary;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,qBAAqB;AAClD,OAAOC,yBAAyB,MAAM,6BAA6B;AAEnE,MAAMC,kBAAkB,GAAGC,IAAA;EAAA,IAAC;MAAEC;IAAwB,CAAC,GAAAD,IAAA;IAAZE,UAAU,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA;EAAA,oBACnDT,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAET,YAAY,CAAC,SAAS,EAAEI,QAAQ;EAAE,gBAChDN,KAAA,CAAAU,aAAA,CAACP,yBAAyB,EAAKI,UAAa,CACzC,CAAC;AAAA,CACP;AAEDH,kBAAkB,CAACQ,SAAS,GAAG;EAC7BN,QAAQ,EAAEL,SAAS,CAACY;AACtB,CAAC;AAEDT,kBAAkB,CAACU,YAAY,GAAG;EAChCR,QAAQ,EAAE;AACZ,CAAC;AAED,eAAeF,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemDetailsSummaryContent.js","names":["React","useContext","PropTypes","MainContext","getWrappedValueWithLink","parseBooleanValues","withTitle","ItemDetailsSummaryContent","summaryPropsWithContent","itemId","map","key","value","link","modifier","index","dynamicKey","join","wrappedValue","createElement","className","propTypes","array","isRequired"],"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,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,uBAAuB,QAAQ,qBAAqB;AAC7D,SAASC,kBAAkB,QAAQ,eAAe;AAClD,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,MAAMC,yBAAyB,GAAGA,CAAC;EAAEC;AAAwB,CAAC,KAAK;EACjE,MAAM;IAAEC;EAAO,CAAC,GAAGR,UAAU,CAACE,WAAW,CAAC;EAC1C,OAAOK,uBAAuB,CAACE,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,CAAC,EAAEC,KAAK,KAAK;IAC1E,MAAMC,UAAU,GAAG,CAACP,MAAM,EAAEM,KAAK,EAAEH,KAAK,CAAC,CAACK,IAAI,CAAC,GAAG,CAAC;IACnD,MAAMC,YAAY,GAAGb,kBAAkB,CAACD,uBAAuB,CAACQ,KAAK,EAAEC,IAAI,EAAEJ,MAAM,CAAC,EAAEE,GAAG,CAAC;IAE1F,oBACEX,KAAA,CAAAmB,aAAA;MAAMC,SAAS,EAAEN,QAAS;MAACH,GAAG,EAAEK;IAAW,GACxCL,GAAG,iBAAIX,KAAA,CAAAmB,aAAA;MAAMC,SAAS,EAAC;IAA4B,GAAET,
|
|
1
|
+
{"version":3,"file":"ItemDetailsSummaryContent.js","names":["React","useContext","PropTypes","MainContext","getWrappedValueWithLink","parseBooleanValues","withTitle","ItemDetailsSummaryContent","summaryPropsWithContent","itemId","map","key","value","link","modifier","index","dynamicKey","join","wrappedValue","createElement","className","propTypes","array","isRequired"],"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,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,uBAAuB,QAAQ,qBAAqB;AAC7D,SAASC,kBAAkB,QAAQ,eAAe;AAClD,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,MAAMC,yBAAyB,GAAGA,CAAC;EAAEC;AAAwB,CAAC,KAAK;EACjE,MAAM;IAAEC;EAAO,CAAC,GAAGR,UAAU,CAACE,WAAW,CAAC;EAC1C,OAAOK,uBAAuB,CAACE,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,CAAC,EAAEC,KAAK,KAAK;IAC1E,MAAMC,UAAU,GAAG,CAACP,MAAM,EAAEM,KAAK,EAAEH,KAAK,CAAC,CAACK,IAAI,CAAC,GAAG,CAAC;IACnD,MAAMC,YAAY,GAAGb,kBAAkB,CAACD,uBAAuB,CAACQ,KAAK,EAAEC,IAAI,EAAEJ,MAAM,CAAC,EAAEE,GAAG,CAAC;IAE1F,oBACEX,KAAA,CAAAmB,aAAA;MAAMC,SAAS,EAAEN,QAAS;MAACH,GAAG,EAAEK;IAAW,GACxCL,GAAG,iBAAIX,KAAA,CAAAmB,aAAA;MAAMC,SAAS,EAAC;IAA4B,GAAET,GAAU,CAAC,EAAC,GAAC,EAACO,YAChE,CAAC;EAEX,CAAC,CAAC;AACJ,CAAC;AAEDX,yBAAyB,CAACc,SAAS,GAAG;EACpCb,uBAAuB,EAAEN,SAAS,CAACoB,KAAK,CAACC;AAC3C,CAAC;AAED,eAAejB,SAAS,CAACC,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LargeSummary.js","names":["React","PropTypes","getModifiers","LargeSummaryContent","LargeSummary","_ref","modifier","otherProps","_objectWithoutProperties","_excluded","createElement","className","propTypes","string","defaultProps"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummary.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { getModifiers } from '../../../../helpers';\nimport LargeSummaryContent from './LargeSummaryContent';\n\nconst LargeSummary = ({ modifier, ...otherProps }) => (\n <div className={getModifiers('stats', modifier)}>\n <LargeSummaryContent {...otherProps} />\n </div>\n);\n\nLargeSummary.propTypes = {\n modifier: PropTypes.string\n};\n\nLargeSummary.defaultProps = {\n modifier: ''\n};\n\nexport default LargeSummary;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,qBAAqB;AAClD,OAAOC,mBAAmB,MAAM,uBAAuB;AAEvD,MAAMC,YAAY,GAAGC,IAAA;EAAA,IAAC;MAAEC;IAAwB,CAAC,GAAAD,IAAA;IAAZE,UAAU,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA;EAAA,oBAC7CT,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAET,YAAY,CAAC,OAAO,EAAEI,QAAQ;EAAE,gBAC9CN,KAAA,CAAAU,aAAA,CAACP,mBAAmB,EAAKI,
|
|
1
|
+
{"version":3,"file":"LargeSummary.js","names":["React","PropTypes","getModifiers","LargeSummaryContent","LargeSummary","_ref","modifier","otherProps","_objectWithoutProperties","_excluded","createElement","className","propTypes","string","defaultProps"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummary.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { getModifiers } from '../../../../helpers';\nimport LargeSummaryContent from './LargeSummaryContent';\n\nconst LargeSummary = ({ modifier, ...otherProps }) => (\n <div className={getModifiers('stats', modifier)}>\n <LargeSummaryContent {...otherProps} />\n </div>\n);\n\nLargeSummary.propTypes = {\n modifier: PropTypes.string\n};\n\nLargeSummary.defaultProps = {\n modifier: ''\n};\n\nexport default LargeSummary;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,qBAAqB;AAClD,OAAOC,mBAAmB,MAAM,uBAAuB;AAEvD,MAAMC,YAAY,GAAGC,IAAA;EAAA,IAAC;MAAEC;IAAwB,CAAC,GAAAD,IAAA;IAAZE,UAAU,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA;EAAA,oBAC7CT,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAET,YAAY,CAAC,OAAO,EAAEI,QAAQ;EAAE,gBAC9CN,KAAA,CAAAU,aAAA,CAACP,mBAAmB,EAAKI,UAAa,CACnC,CAAC;AAAA,CACP;AAEDH,YAAY,CAACQ,SAAS,GAAG;EACvBN,QAAQ,EAAEL,SAAS,CAACY;AACtB,CAAC;AAEDT,YAAY,CAACU,YAAY,GAAG;EAC1BR,QAAQ,EAAE;AACZ,CAAC;AAED,eAAeF,YAAY"}
|
package/lib-es/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LargeSummaryContent.js","names":["React","useContext","PropTypes","upperFirst","MainContext","getWrappedValueWithLink","parseBooleanValues","withTitle","LargeSummaryContent","summaryPropsWithContent","itemId","createElement","className","map","key","value","link","modifier","index","dynamicKey","join","wrappedValue","propTypes","array","isRequired"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport upperFirst from 'lodash.upperfirst';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport { getWrappedValueWithLink } from '../../../../helpers';\nimport { parseBooleanValues } from '../../helpers';\nimport { withTitle } from '../../../../HOC';\n\nconst LargeSummaryContent = ({ summaryPropsWithContent }) => {\n const { itemId } = useContext(MainContext);\n\n return (\n <div className=\"stats__wrapper\">\n {summaryPropsWithContent.map(([key, value, link, modifier], index) => {\n const dynamicKey = [itemId, index].join('-');\n const wrappedValue = parseBooleanValues(\n getWrappedValueWithLink(value, link, itemId),\n upperFirst(key)\n );\n\n return (\n <div key={dynamicKey} className=\"stats__block\">\n <div className=\"stats__text\">\n <div className={`stats__title ${modifier}`}>{upperFirst(key)}</div>\n {wrappedValue && <div className={`stats__value ${modifier}`}>{wrappedValue}</div>}\n </div>\n </div>\n );\n })}\n </div>\n );\n};\n\nLargeSummaryContent.propTypes = {\n summaryPropsWithContent: PropTypes.array.isRequired\n};\n\nexport default withTitle(LargeSummaryContent);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,mBAAmB;AAC1C,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,uBAAuB,QAAQ,qBAAqB;AAC7D,SAASC,kBAAkB,QAAQ,eAAe;AAClD,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,MAAMC,mBAAmB,GAAGA,CAAC;EAAEC;AAAwB,CAAC,KAAK;EAC3D,MAAM;IAAEC;EAAO,CAAC,GAAGT,UAAU,CAACG,WAAW,CAAC;EAE1C,oBACEJ,KAAA,CAAAW,aAAA;IAAKC,SAAS,EAAC;EAAgB,GAC5BH,uBAAuB,CAACI,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,CAAC,EAAEC,KAAK,KAAK;IACpE,MAAMC,UAAU,GAAG,CAACT,MAAM,EAAEQ,KAAK,CAAC,CAACE,IAAI,CAAC,GAAG,CAAC;IAC5C,MAAMC,YAAY,GAAGf,kBAAkB,CACrCD,uBAAuB,CAACU,KAAK,EAAEC,IAAI,EAAEN,MAAM,CAAC,EAC5CP,UAAU,CAACW,GAAG,CAAC
|
|
1
|
+
{"version":3,"file":"LargeSummaryContent.js","names":["React","useContext","PropTypes","upperFirst","MainContext","getWrappedValueWithLink","parseBooleanValues","withTitle","LargeSummaryContent","summaryPropsWithContent","itemId","createElement","className","map","key","value","link","modifier","index","dynamicKey","join","wrappedValue","propTypes","array","isRequired"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummaryContent.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport upperFirst from 'lodash.upperfirst';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport { getWrappedValueWithLink } from '../../../../helpers';\nimport { parseBooleanValues } from '../../helpers';\nimport { withTitle } from '../../../../HOC';\n\nconst LargeSummaryContent = ({ summaryPropsWithContent }) => {\n const { itemId } = useContext(MainContext);\n\n return (\n <div className=\"stats__wrapper\">\n {summaryPropsWithContent.map(([key, value, link, modifier], index) => {\n const dynamicKey = [itemId, index].join('-');\n const wrappedValue = parseBooleanValues(\n getWrappedValueWithLink(value, link, itemId),\n upperFirst(key)\n );\n\n return (\n <div key={dynamicKey} className=\"stats__block\">\n <div className=\"stats__text\">\n <div className={`stats__title ${modifier}`}>{upperFirst(key)}</div>\n {wrappedValue && <div className={`stats__value ${modifier}`}>{wrappedValue}</div>}\n </div>\n </div>\n );\n })}\n </div>\n );\n};\n\nLargeSummaryContent.propTypes = {\n summaryPropsWithContent: PropTypes.array.isRequired\n};\n\nexport default withTitle(LargeSummaryContent);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,mBAAmB;AAC1C,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,uBAAuB,QAAQ,qBAAqB;AAC7D,SAASC,kBAAkB,QAAQ,eAAe;AAClD,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,MAAMC,mBAAmB,GAAGA,CAAC;EAAEC;AAAwB,CAAC,KAAK;EAC3D,MAAM;IAAEC;EAAO,CAAC,GAAGT,UAAU,CAACG,WAAW,CAAC;EAE1C,oBACEJ,KAAA,CAAAW,aAAA;IAAKC,SAAS,EAAC;EAAgB,GAC5BH,uBAAuB,CAACI,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,CAAC,EAAEC,KAAK,KAAK;IACpE,MAAMC,UAAU,GAAG,CAACT,MAAM,EAAEQ,KAAK,CAAC,CAACE,IAAI,CAAC,GAAG,CAAC;IAC5C,MAAMC,YAAY,GAAGf,kBAAkB,CACrCD,uBAAuB,CAACU,KAAK,EAAEC,IAAI,EAAEN,MAAM,CAAC,EAC5CP,UAAU,CAACW,GAAG,CAChB,CAAC;IAED,oBACEd,KAAA,CAAAW,aAAA;MAAKG,GAAG,EAAEK,UAAW;MAACP,SAAS,EAAC;IAAc,gBAC5CZ,KAAA,CAAAW,aAAA;MAAKC,SAAS,EAAC;IAAa,gBAC1BZ,KAAA,CAAAW,aAAA;MAAKC,SAAS,EAAG,gBAAeK,QAAS;IAAE,GAAEd,UAAU,CAACW,GAAG,CAAO,CAAC,EAClEO,YAAY,iBAAIrB,KAAA,CAAAW,aAAA;MAAKC,SAAS,EAAG,gBAAeK,QAAS;IAAE,GAAEI,YAAkB,CAC7E,CACF,CAAC;EAEV,CAAC,CACE,CAAC;AAEV,CAAC;AAEDb,mBAAmB,CAACc,SAAS,GAAG;EAC9Bb,uBAAuB,EAAEP,SAAS,CAACqB,KAAK,CAACC;AAC3C,CAAC;AAED,eAAejB,SAAS,CAACC,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListSummary.js","names":["React","PropTypes","getModifiers","ListSummaryContent","ListSummary","_ref","modifier","otherProps","_objectWithoutProperties","_excluded","createElement","className","propTypes","string","defaultProps"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/ListSummary/ListSummary.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { getModifiers } from '../../../../helpers';\nimport ListSummaryContent from './ListSummaryContent';\n\nconst ListSummary = ({ modifier, ...otherProps }) => (\n <div className={getModifiers('spec-block', modifier)}>\n <ListSummaryContent {...otherProps} />\n </div>\n);\n\nListSummary.propTypes = {\n modifier: PropTypes.string\n};\n\nListSummary.defaultProps = {\n modifier: ''\n};\n\nexport default ListSummary;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,qBAAqB;AAClD,OAAOC,kBAAkB,MAAM,sBAAsB;AAErD,MAAMC,WAAW,GAAGC,IAAA;EAAA,IAAC;MAAEC;IAAwB,CAAC,GAAAD,IAAA;IAAZE,UAAU,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA;EAAA,oBAC5CT,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAET,YAAY,CAAC,YAAY,EAAEI,QAAQ;EAAE,gBACnDN,KAAA,CAAAU,aAAA,CAACP,kBAAkB,EAAKI,
|
|
1
|
+
{"version":3,"file":"ListSummary.js","names":["React","PropTypes","getModifiers","ListSummaryContent","ListSummary","_ref","modifier","otherProps","_objectWithoutProperties","_excluded","createElement","className","propTypes","string","defaultProps"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/ListSummary/ListSummary.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { getModifiers } from '../../../../helpers';\nimport ListSummaryContent from './ListSummaryContent';\n\nconst ListSummary = ({ modifier, ...otherProps }) => (\n <div className={getModifiers('spec-block', modifier)}>\n <ListSummaryContent {...otherProps} />\n </div>\n);\n\nListSummary.propTypes = {\n modifier: PropTypes.string\n};\n\nListSummary.defaultProps = {\n modifier: ''\n};\n\nexport default ListSummary;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,qBAAqB;AAClD,OAAOC,kBAAkB,MAAM,sBAAsB;AAErD,MAAMC,WAAW,GAAGC,IAAA;EAAA,IAAC;MAAEC;IAAwB,CAAC,GAAAD,IAAA;IAAZE,UAAU,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA;EAAA,oBAC5CT,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAET,YAAY,CAAC,YAAY,EAAEI,QAAQ;EAAE,gBACnDN,KAAA,CAAAU,aAAA,CAACP,kBAAkB,EAAKI,UAAa,CAClC,CAAC;AAAA,CACP;AAEDH,WAAW,CAACQ,SAAS,GAAG;EACtBN,QAAQ,EAAEL,SAAS,CAACY;AACtB,CAAC;AAEDT,WAAW,CAACU,YAAY,GAAG;EACzBR,QAAQ,EAAE;AACZ,CAAC;AAED,eAAeF,WAAW"}
|
package/lib-es/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListSummaryContent.js","names":["React","useContext","PropTypes","MainContext","getWrappedValueWithLink","parseBooleanValues","withTitle","ListSummaryContent","summaryPropsWithContent","itemId","createElement","className","map","key","value","link","modifier","index","wrappedValue","dynamicKey","join","propTypes","array","isRequired"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.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 ListSummaryContent = ({ summaryPropsWithContent }) => {\n const { itemId } = useContext(MainContext);\n\n return (\n <div className=\"spec-block__column\">\n <ul className=\"spec-block__list\">\n {summaryPropsWithContent.map(([key, value, link, modifier], index) => {\n const wrappedValue = parseBooleanValues(\n getWrappedValueWithLink(value, link, itemId),\n key\n );\n const dynamicKey = [itemId, index].join('-');\n\n return (\n <li key={dynamicKey} className=\"spec-block__list-item\">\n <span className={`spec-block__title ${modifier}`}>{key}</span>\n {wrappedValue && (\n <span className={`spec-block__data ${modifier}`}>{wrappedValue}</span>\n )}\n </li>\n );\n })}\n </ul>\n </div>\n );\n};\n\nListSummaryContent.propTypes = {\n summaryPropsWithContent: PropTypes.array.isRequired\n};\n\nexport default withTitle(ListSummaryContent);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,uBAAuB,QAAQ,qBAAqB;AAC7D,SAASC,kBAAkB,QAAQ,eAAe;AAClD,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,MAAMC,kBAAkB,GAAGA,CAAC;EAAEC;AAAwB,CAAC,KAAK;EAC1D,MAAM;IAAEC;EAAO,CAAC,GAAGR,UAAU,CAACE,WAAW,CAAC;EAE1C,oBACEH,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAC;EAAoB,gBACjCX,KAAA,CAAAU,aAAA;IAAIC,SAAS,EAAC;EAAkB,GAC7BH,uBAAuB,CAACI,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,CAAC,EAAEC,KAAK,KAAK;IACpE,MAAMC,YAAY,GAAGb,kBAAkB,CACrCD,uBAAuB,CAACU,KAAK,EAAEC,IAAI,EAAEN,MAAM,CAAC,EAC5CI,
|
|
1
|
+
{"version":3,"file":"ListSummaryContent.js","names":["React","useContext","PropTypes","MainContext","getWrappedValueWithLink","parseBooleanValues","withTitle","ListSummaryContent","summaryPropsWithContent","itemId","createElement","className","map","key","value","link","modifier","index","wrappedValue","dynamicKey","join","propTypes","array","isRequired"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/ListSummary/ListSummaryContent.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 ListSummaryContent = ({ summaryPropsWithContent }) => {\n const { itemId } = useContext(MainContext);\n\n return (\n <div className=\"spec-block__column\">\n <ul className=\"spec-block__list\">\n {summaryPropsWithContent.map(([key, value, link, modifier], index) => {\n const wrappedValue = parseBooleanValues(\n getWrappedValueWithLink(value, link, itemId),\n key\n );\n const dynamicKey = [itemId, index].join('-');\n\n return (\n <li key={dynamicKey} className=\"spec-block__list-item\">\n <span className={`spec-block__title ${modifier}`}>{key}</span>\n {wrappedValue && (\n <span className={`spec-block__data ${modifier}`}>{wrappedValue}</span>\n )}\n </li>\n );\n })}\n </ul>\n </div>\n );\n};\n\nListSummaryContent.propTypes = {\n summaryPropsWithContent: PropTypes.array.isRequired\n};\n\nexport default withTitle(ListSummaryContent);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,uBAAuB,QAAQ,qBAAqB;AAC7D,SAASC,kBAAkB,QAAQ,eAAe;AAClD,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,MAAMC,kBAAkB,GAAGA,CAAC;EAAEC;AAAwB,CAAC,KAAK;EAC1D,MAAM;IAAEC;EAAO,CAAC,GAAGR,UAAU,CAACE,WAAW,CAAC;EAE1C,oBACEH,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAC;EAAoB,gBACjCX,KAAA,CAAAU,aAAA;IAAIC,SAAS,EAAC;EAAkB,GAC7BH,uBAAuB,CAACI,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,CAAC,EAAEC,KAAK,KAAK;IACpE,MAAMC,YAAY,GAAGb,kBAAkB,CACrCD,uBAAuB,CAACU,KAAK,EAAEC,IAAI,EAAEN,MAAM,CAAC,EAC5CI,GACF,CAAC;IACD,MAAMM,UAAU,GAAG,CAACV,MAAM,EAAEQ,KAAK,CAAC,CAACG,IAAI,CAAC,GAAG,CAAC;IAE5C,oBACEpB,KAAA,CAAAU,aAAA;MAAIG,GAAG,EAAEM,UAAW;MAACR,SAAS,EAAC;IAAuB,gBACpDX,KAAA,CAAAU,aAAA;MAAMC,SAAS,EAAG,qBAAoBK,QAAS;IAAE,GAAEH,GAAU,CAAC,EAC7DK,YAAY,iBACXlB,KAAA,CAAAU,aAAA;MAAMC,SAAS,EAAG,oBAAmBK,QAAS;IAAE,GAAEE,YAAmB,CAErE,CAAC;EAET,CAAC,CACC,CACD,CAAC;AAEV,CAAC;AAEDX,kBAAkB,CAACc,SAAS,GAAG;EAC7Bb,uBAAuB,EAAEN,SAAS,CAACoB,KAAK,CAACC;AAC3C,CAAC;AAED,eAAejB,SAAS,CAACC,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextSummary.js","names":["React","PropTypes","getModifiers","TextSummaryContent","TextSummary","_ref","modifier","otherProps","_objectWithoutProperties","_excluded","createElement","className","propTypes","string","defaultProps"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/TextSummary/TextSummary.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { getModifiers } from '../../../../helpers';\nimport TextSummaryContent from './TextSummaryContent';\n\nconst TextSummary = ({ modifier, ...otherProps }) => (\n <div className={getModifiers('stats', modifier)}>\n <TextSummaryContent {...otherProps} />\n </div>\n);\n\nTextSummary.propTypes = {\n modifier: PropTypes.string\n};\n\nTextSummary.defaultProps = {\n modifier: ''\n};\n\nexport default TextSummary;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,qBAAqB;AAClD,OAAOC,kBAAkB,MAAM,sBAAsB;AAErD,MAAMC,WAAW,GAAGC,IAAA;EAAA,IAAC;MAAEC;IAAwB,CAAC,GAAAD,IAAA;IAAZE,UAAU,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA;EAAA,oBAC5CT,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAET,YAAY,CAAC,OAAO,EAAEI,QAAQ;EAAE,gBAC9CN,KAAA,CAAAU,aAAA,CAACP,kBAAkB,EAAKI,
|
|
1
|
+
{"version":3,"file":"TextSummary.js","names":["React","PropTypes","getModifiers","TextSummaryContent","TextSummary","_ref","modifier","otherProps","_objectWithoutProperties","_excluded","createElement","className","propTypes","string","defaultProps"],"sources":["../../../../../src/components/DataSummary/DataSummaryTypes/TextSummary/TextSummary.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { getModifiers } from '../../../../helpers';\nimport TextSummaryContent from './TextSummaryContent';\n\nconst TextSummary = ({ modifier, ...otherProps }) => (\n <div className={getModifiers('stats', modifier)}>\n <TextSummaryContent {...otherProps} />\n </div>\n);\n\nTextSummary.propTypes = {\n modifier: PropTypes.string\n};\n\nTextSummary.defaultProps = {\n modifier: ''\n};\n\nexport default TextSummary;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,YAAY,QAAQ,qBAAqB;AAClD,OAAOC,kBAAkB,MAAM,sBAAsB;AAErD,MAAMC,WAAW,GAAGC,IAAA;EAAA,IAAC;MAAEC;IAAwB,CAAC,GAAAD,IAAA;IAAZE,UAAU,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA;EAAA,oBAC5CT,KAAA,CAAAU,aAAA;IAAKC,SAAS,EAAET,YAAY,CAAC,OAAO,EAAEI,QAAQ;EAAE,gBAC9CN,KAAA,CAAAU,aAAA,CAACP,kBAAkB,EAAKI,UAAa,CAClC,CAAC;AAAA,CACP;AAEDH,WAAW,CAACQ,SAAS,GAAG;EACtBN,QAAQ,EAAEL,SAAS,CAACY;AACtB,CAAC;AAEDT,WAAW,CAACU,YAAY,GAAG;EACzBR,QAAQ,EAAE;AACZ,CAAC;AAED,eAAeF,WAAW"}
|