@blaze-cms/react-page-builder 0.127.0-project-admin-customisations.3 → 0.128.0-admin-updates.0
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 +6 -8
- package/README.md +13 -0
- package/lib/components/Banner/BannerRender.js +5 -5
- package/lib/components/Banner/BannerRender.js.map +1 -1
- package/lib/components/Banner/helpers.js +2 -2
- package/lib/components/Banner/helpers.js.map +1 -1
- package/lib/components/Card/CardContainer.js +3 -3
- package/lib/components/Card/CardContainer.js.map +1 -1
- package/lib/components/Code/Code.js +7 -4
- package/lib/components/Code/Code.js.map +1 -1
- package/lib/components/Code/helpers/wrap-script-tags.js +7 -3
- package/lib/components/Code/helpers/wrap-script-tags.js.map +1 -1
- package/lib/components/ContentGroupSection/ContentGroupSection.js +7 -3
- package/lib/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
- package/lib/components/Iframe/Iframe.js +51 -0
- package/lib/components/Iframe/Iframe.js.map +1 -0
- package/lib/components/Iframe/constants.js +15 -0
- package/lib/components/Iframe/constants.js.map +1 -0
- package/lib/components/Iframe/index.js +12 -0
- package/lib/components/Iframe/index.js.map +1 -0
- package/lib/components/List/components/Cards/CardsRenderItem.js +1 -1
- package/lib/components/List/components/Cards/CardsRenderItem.js.map +1 -1
- package/lib/components/List/components/Full/FullRenderItem.js +1 -1
- package/lib/components/List/components/Full/FullRenderItem.js.map +1 -1
- package/lib/components/index.js +5 -0
- package/lib/components/index.js.map +1 -1
- package/lib-es/components/Banner/BannerRender.js +5 -5
- package/lib-es/components/Banner/BannerRender.js.map +1 -1
- package/lib-es/components/Banner/helpers.js +2 -2
- package/lib-es/components/Banner/helpers.js.map +1 -1
- package/lib-es/components/Card/CardContainer.js +3 -3
- package/lib-es/components/Card/CardContainer.js.map +1 -1
- package/lib-es/components/Code/Code.js +8 -5
- package/lib-es/components/Code/Code.js.map +1 -1
- package/lib-es/components/Code/helpers/wrap-script-tags.js +7 -3
- package/lib-es/components/Code/helpers/wrap-script-tags.js.map +1 -1
- package/lib-es/components/ContentGroupSection/ContentGroupSection.js +11 -6
- package/lib-es/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
- package/lib-es/components/Iframe/Iframe.js +42 -0
- package/lib-es/components/Iframe/Iframe.js.map +1 -0
- package/lib-es/components/Iframe/constants.js +7 -0
- package/lib-es/components/Iframe/constants.js.map +1 -0
- package/lib-es/components/Iframe/index.js +3 -0
- package/lib-es/components/Iframe/index.js.map +1 -0
- package/lib-es/components/List/components/Cards/CardsRenderItem.js +1 -1
- package/lib-es/components/List/components/Cards/CardsRenderItem.js.map +1 -1
- package/lib-es/components/List/components/Full/FullRenderItem.js +1 -1
- package/lib-es/components/List/components/Full/FullRenderItem.js.map +1 -1
- package/lib-es/components/index.js +2 -1
- package/lib-es/components/index.js.map +1 -1
- package/package.json +11 -10
- package/src/components/Banner/BannerRender.js +4 -4
- package/src/components/Banner/helpers.js +3 -3
- package/src/components/Card/CardContainer.js +3 -3
- package/src/components/Code/Code.js +6 -4
- package/src/components/Code/helpers/wrap-script-tags.js +7 -3
- package/src/components/ContentGroupSection/ContentGroupSection.js +3 -5
- package/src/components/Iframe/Iframe.js +36 -0
- package/src/components/Iframe/constants.js +4 -0
- package/src/components/Iframe/index.js +3 -0
- package/src/components/List/components/Cards/CardsRenderItem.js +1 -1
- package/src/components/List/components/Full/FullRenderItem.js +1 -1
- package/src/components/index.js +2 -1
- package/tests/unit/src/HOC/withInfiniteScroll.test.js +3 -0
- package/tests/unit/src/HOC/withTitle.test.js +5 -2
- package/tests/unit/src/Layout/Layout.test.js +4 -2
- package/tests/unit/src/Layout/getMockedProps.js +3 -0
- package/tests/unit/src/Layout/helpers/check-if-row-has-columns.test.js +4 -1
- package/tests/unit/src/Layout/helpers/get-styles-to-update.test.js +1 -1
- package/tests/unit/src/Layout/helpers/has-children.test.js +4 -1
- package/tests/unit/src/components/BackToTop/BackToTop.test.js +3 -0
- package/tests/unit/src/components/Banner/AdSlotRender.test.js +3 -0
- package/tests/unit/src/components/Banner/Banner.test.js +3 -0
- package/tests/unit/src/components/Banner/BannerRender.test.js +4 -1
- package/tests/unit/src/components/BlazeLink.test.js +3 -0
- package/tests/unit/src/components/Breadcrumb/Breadcrumb.test.js +3 -0
- package/tests/unit/src/components/Button.test.js +3 -0
- package/tests/unit/src/components/Card/Card.test.js +3 -0
- package/tests/unit/src/components/Card/CardContainer.test.js +5 -1
- package/tests/unit/src/components/Card/CardRender.test.js +3 -0
- package/tests/unit/src/components/Card/helpers/append-images.test.js +1 -1
- package/tests/unit/src/components/Card/helpers/get-dynamic-grid-classes.test.js +1 -1
- package/tests/unit/src/components/Card/helpers/getPublishedListingUrl.test.js +1 -1
- package/tests/unit/src/components/Card/helpers/useDynamicSizeKey.test.js +1 -1
- package/tests/unit/src/components/Carousel/Carousel.test.js +3 -0
- package/tests/unit/src/components/Carousel/CarouselImage/CarouselImage.test.js +4 -2
- package/tests/unit/src/components/Carousel/CarouselRender/CarouselRender.test.js +3 -0
- package/tests/unit/src/components/CarouselWrapper.test.js +3 -0
- package/tests/unit/src/components/ClickWrapper.test.js +3 -0
- package/tests/unit/src/components/Code/Code.test.js +3 -0
- package/tests/unit/src/components/Code/ScriptTag.test.js +3 -0
- package/tests/unit/src/components/Code/helpers/wrap-script-tags.test.js +1 -1
- package/tests/unit/src/components/Code.test.js +3 -0
- package/tests/unit/src/components/ContentGroup/ContentGroup.test.js +3 -0
- package/tests/unit/src/components/ContentGroup/ContentGroupTabs.test.js +3 -0
- package/tests/unit/src/components/ContentGroupSection/ContentGroupSection.test.js +3 -0
- package/tests/unit/src/components/DataSummary/DataSummaryFactory.test.js +3 -0
- package/tests/unit/src/components/DataSummary/DataSummaryRender.test.js +3 -0
- package/tests/unit/src/components/DataSummary/DataSummaryTypes/HeadingLargeSummary.test.js +3 -0
- package/tests/unit/src/components/DataSummary/DataSummaryTypes/ItemDetailsSummary.test.js +3 -0
- package/tests/unit/src/components/DataSummary/DataSummaryTypes/LargeSummary.test.js +3 -0
- package/tests/unit/src/components/DataSummary/DataSummaryTypes/ListSummary.test.js +3 -0
- package/tests/unit/src/components/DataSummary/DataSummaryTypes/TextSummary.test.js +3 -0
- package/tests/unit/src/components/DataSummary/helpers/build-loop-props-content.test.js +1 -1
- package/tests/unit/src/components/DataSummary/helpers/build-props-to-display-with-content.test.js +1 -1
- package/tests/unit/src/components/DataSummary/helpers/get-data-summary-query.test.js +1 -1
- package/tests/unit/src/components/DataSummary/helpers/get-link-based-on-value.test.js +2 -2
- package/tests/unit/src/components/DataSummary/helpers/get-link-to-published-content.test.js +1 -1
- package/tests/unit/src/components/DataSummary/helpers/parse-boolean-values.test.js +1 -1
- package/tests/unit/src/components/EmailConfirm/EmailConfirm.test.js +3 -0
- package/tests/unit/src/components/Iframe/Iframe.test.js +21 -0
- package/tests/unit/src/components/Iframe/__snapshots__/Iframe.test.js.snap +21 -0
- package/tests/unit/src/components/Image/GlobalLightbox/GlobalLightbox.test.js +5 -1
- package/tests/unit/src/components/Image/GlobalLightbox/NavButton.test.js +3 -0
- package/tests/unit/src/components/Image/Image.test.js +3 -0
- package/tests/unit/src/components/Image/ImageDetails.test.js +3 -0
- package/tests/unit/src/components/Image/ImageFactory.test.js +3 -0
- package/tests/unit/src/components/Image/ImageRender.test.js +3 -0
- package/tests/unit/src/components/Image/Lightbox/Lightbox.test.js +3 -0
- package/tests/unit/src/components/ItemList/ItemListButton.test.js +3 -0
- package/tests/unit/src/components/ItemList/ItemListCounter.test.js +3 -0
- package/tests/unit/src/components/ItemList/ItemListNew.test.js +3 -0
- package/tests/unit/src/components/ItemList/helpers/set-item-list-id.test.js +3 -0
- package/tests/unit/src/components/ItemList/hooks/use-item-list-id.test.js +3 -0
- package/tests/unit/src/components/Layout/Layout.test.js +3 -0
- package/tests/unit/src/components/LazyImage/LazyImage.test.js +3 -0
- package/tests/unit/src/components/List/ListRender.test.js +3 -0
- package/tests/unit/src/components/List/components/Cards/CardsRender.test.js +3 -0
- package/tests/unit/src/components/List/components/Cards/CardsRenderItem.test.js +3 -0
- package/tests/unit/src/components/List/components/Cards/CardsRenderWrapper.test.js +3 -0
- package/tests/unit/src/components/List/components/Cards/helpers/check-if-should-render-gtm.test.js +1 -1
- package/tests/unit/src/components/List/components/Full/FullRender.test.js +3 -0
- package/tests/unit/src/components/List/components/Full/FullRenderItem.test.js +3 -0
- package/tests/unit/src/components/List/components/Header/ListHeader.test.js +3 -0
- package/tests/unit/src/components/List/components/Pagination/Classic.test.js +3 -0
- package/tests/unit/src/components/List/components/Pagination/ListPagination.test.js +3 -0
- package/tests/unit/src/components/List/components/Pagination/LoadMore.test.js +3 -0
- package/tests/unit/src/components/Menu/Menu.test.js +3 -0
- package/tests/unit/src/components/MenuItem/MenuItem.test.js +3 -0
- package/tests/unit/src/components/MenuItem/SubMenu.test.js +3 -0
- package/tests/unit/src/components/Modal/Modal.test.js +3 -0
- package/tests/unit/src/components/SearchContent/SearchContent.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/SearchFilter/CloseMobileForm.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/SearchFilter/MobileFormToolbar.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/SearchFilter/ResetDesktopForm.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/SearchFilter/SearchFilter.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/SearchFilterContainer.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/components/Checkbox.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/components/Range.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/components/Select.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/components/TextSearch.test.js +3 -0
- package/tests/unit/src/components/SearchFilter/helpers/build-new-query.test.js +1 -1
- package/tests/unit/src/components/SearchFilter/helpers/build-raw-query-stringified.test.js +1 -1
- package/tests/unit/src/components/SearchFilter/helpers/calculate-min-max.test.js +1 -1
- package/tests/unit/src/components/SearchFilter/helpers/calculate-step.test.js +1 -1
- package/tests/unit/src/components/SearchFilter/helpers/check-if-range-updated.test.js +4 -1
- package/tests/unit/src/components/SearchFilter/helpers/get-display-value.test.js +1 -1
- package/tests/unit/src/components/SearchFilter/helpers/get-intersected-prop.test.js +1 -1
- package/tests/unit/src/components/SearchFilter/helpers/get-range-value.test.js +1 -1
- package/tests/unit/src/components/SearchFilter/helpers/get-select-options.test.js +1 -1
- package/tests/unit/src/components/SearchFilter/helpers/is-device-desktop.test.js +4 -2
- package/tests/unit/src/components/SearchFilterSort/SearchFilterSort.test.js +3 -0
- package/tests/unit/src/components/SocialFollow/SFItem.test.js +3 -0
- package/tests/unit/src/components/SocialFollow/SocialFollow.test.js +3 -0
- package/tests/unit/src/components/TextBlock/TextBlock.test.js +3 -0
- package/tests/unit/src/components/Video/Video.test.js +3 -0
- package/tests/unit/src/components/Video/VideoModal.test.js +3 -0
- package/tests/unit/src/components/Video/providers/Default.test.js +3 -0
- package/tests/unit/src/components/Video/providers/JWPlayer/JWPlayerProvider.test.js +3 -0
- package/tests/unit/src/components/Video/providers/Vimeo/Vimeo.test.js +3 -0
- package/tests/unit/src/components/Video/providers/Vimeo/helpers/add-extra-params-to-url.test.js +1 -1
- package/tests/unit/src/components/Video/providers/YouTube/YouTubeProvider.test.js +3 -0
- package/tests/unit/src/components/Wrapper.test.js +3 -0
- package/tests/unit/src/components/__snapshots__/index.test.js.snap +4 -0
- package/tests/unit/src/helpers/build-image-properties.test.js +1 -1
- package/tests/unit/src/helpers/build-inherited-filters.test.js +1 -1
- package/tests/unit/src/helpers/build-link-extra-props.test.js +1 -1
- package/tests/unit/src/helpers/build-props-query.test.js +1 -1
- package/tests/unit/src/helpers/build-query-fields.test.js +1 -1
- package/tests/unit/src/helpers/build-raw-query-base.test.js +1 -1
- package/tests/unit/src/helpers/build-raw-query.test.js +1 -1
- package/tests/unit/src/helpers/build-search-values-checkbox-select.test.js +1 -1
- package/tests/unit/src/helpers/build-search-values-text.test.js +1 -1
- package/tests/unit/src/helpers/build-set-filters.test.js +1 -1
- package/tests/unit/src/helpers/check-for-error.test.js +1 -1
- package/tests/unit/src/helpers/check-props-to-use.test.js +1 -1
- package/tests/unit/src/helpers/get-click-wrapper-options.test.js +1 -1
- package/tests/unit/src/helpers/get-current-offset.test.js +1 -1
- package/tests/unit/src/helpers/get-display-count-data.test.js +1 -1
- package/tests/unit/src/helpers/get-elasticsearch-operator.test.js +1 -1
- package/tests/unit/src/helpers/get-entity-data.test.js +1 -1
- package/tests/unit/src/helpers/get-entity-render-props.test.js +1 -1
- package/tests/unit/src/helpers/get-generic-props.test.js +1 -1
- package/tests/unit/src/helpers/get-generic-render-variables.test.js +1 -1
- package/tests/unit/src/helpers/get-image-ids.test.js +1 -1
- package/tests/unit/src/helpers/get-inherited-filters.test.js +1 -1
- package/tests/unit/src/helpers/get-not-equal-query.test.js +1 -1
- package/tests/unit/src/helpers/get-pagination-index.test.js +1 -1
- package/tests/unit/src/helpers/get-parsed-prop-values.test.js +3 -0
- package/tests/unit/src/helpers/get-parsed-summary-value.test.js +1 -1
- package/tests/unit/src/helpers/get-query-filters.test.js +1 -1
- package/tests/unit/src/helpers/get-query-props.test.js +1 -1
- package/tests/unit/src/helpers/get-required-schemas.test.js +1 -1
- package/tests/unit/src/helpers/get-search-filter-type.test.js +1 -1
- package/tests/unit/src/helpers/get-unpublished-entity-name.test.js +1 -1
- package/tests/unit/src/helpers/get-updated-filter-by.test.js +1 -1
- package/tests/unit/src/helpers/get-wrapped-value-with-link.test.js +1 -1
- package/tests/unit/src/helpers/inject-banner.test.js +3 -0
- package/tests/unit/src/helpers/is-filter-entitys-id.test.js +1 -1
- package/tests/unit/src/helpers/is-object.test.js +1 -1
- package/tests/unit/src/helpers/is-using-relation-image.test.js +1 -1
- package/tests/unit/src/helpers/parse-props-to-display.test.js +1 -1
- package/tests/unit/src/helpers/parse-textBlock.test.js +4 -1
- package/tests/unit/src/helpers/remove-extra-items.test.js +1 -1
- package/tests/unit/src/helpers/remove-unwanted-characters.test.js +1 -1
- package/tests/unit/src/helpers/render-children.test.js +4 -1
- package/tests/unit/src/helpers/should-render-waypoint.test.js +1 -1
- package/tests/unit/src/helpers/should-show-property.test.js +1 -1
- package/tests/unit/src/helpers/sort-response-data.test.js +1 -1
- package/tests/unit/src/helpers/update-childrens-parent.test.js +1 -1
- package/tests/unit/src/hooks/helpers/StoreImages.test.js +1 -1
- package/tests/unit/src/hooks/helpers/getComponent.test.js +3 -0
- package/tests/unit/src/hooks/helpers/inject-textblock-banners.test.js +1 -1
- package/tests/unit/src/hooks/use-check-mobile-screen.test.js +3 -0
- package/tests/unit/src/hooks/use-get-image-id-from-relation.test.js +5 -1
- package/tests/unit/src/hooks/use-get-images.test.js +3 -0
- package/tests/unit/src/hooks/use-get-single-entity-schema.test.js +4 -1
- package/tests/unit/src/hooks/use-page-builder.test.js +3 -0
- package/tests/unit/src/utils/component-map.test.js +3 -0
- package/tests/unit/src/utils/get-image-data.test.js +0 -1
- package/tests/unit/src/utils/get-props-to-display-modifiers.test.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardsRenderItem.js","names":["React","PropTypes","Waypoint","Card","shouldRenderWaypoint","renderChildren","parsePropsToDisplay","checkIfShouldRenderGtm","Banner","CardsRenderItem","cardProps","listProps","bannerProps","index","entity","currentListLength","cardChildren","gtmChildren","modifier","gridModifier","propsToDisplayModifiers","propsToDisplay","shouldRenderBanner","bannerIndex","priority","enableOverlay","autoScrollTimer","arrowSize","overlayModifier","titleOverlayModifier","initialOffset","isInfinite","style","name","id","triggerInfiniteScroll","displayCount","displayCategory","displayThumbnail","displayTitle","listTotal","itemsPerPage","currentItemIndex","renderWaypoint","shouldRenderGtm","parsedPropsToDisplay","propTypes","object","isRequired","number","array","bool","string","oneOfType","arrayOf","node","defaultProps"],"sources":["../../../../../src/components/List/components/Cards/CardsRenderItem.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Waypoint } from 'react-waypoint';\nimport Card from '../../../Card/Card';\nimport { shouldRenderWaypoint, renderChildren, parsePropsToDisplay } from '../../../../helpers';\nimport { checkIfShouldRenderGtm } from '../helpers';\nimport Banner from '../../../Banner';\n\nconst CardsRenderItem = ({\n cardProps,\n listProps,\n bannerProps,\n index,\n entity,\n currentListLength,\n cardChildren,\n gtmChildren,\n modifier,\n gridModifier,\n propsToDisplayModifiers,\n propsToDisplay,\n shouldRenderBanner,\n bannerIndex,\n priority,\n enableOverlay,\n autoScrollTimer,\n arrowSize,\n overlayModifier,\n titleOverlayModifier\n}) => {\n const {\n initialOffset,\n isInfinite,\n style,\n name,\n id,\n triggerInfiniteScroll,\n displayCount,\n displayCategory = true,\n displayThumbnail = true,\n displayTitle = true,\n listTotal,\n itemsPerPage\n } = listProps;\n\n const currentItemIndex = initialOffset + index;\n const renderWaypoint =\n isInfinite && shouldRenderWaypoint(index, currentListLength, currentItemIndex, listTotal);\n const shouldRenderGtm =\n gtmChildren && checkIfShouldRenderGtm(itemsPerPage, currentListLength, index);\n\n const parsedPropsToDisplay = parsePropsToDisplay(cardProps, propsToDisplay);\n\n return (\n <>\n {shouldRenderGtm && renderChildren(gtmChildren)}\n {displayCount && (\n <div className=\"heading heading--section heading--section--count\">\n <span className=\"section-number\">{currentItemIndex + 1}</span>\n <span className=\"section-total\">/{listTotal}</span>\n </div>\n )}\n <div className=\"list__item list__item--compact\">\n {renderWaypoint && <Waypoint onEnter={triggerInfiniteScroll} />}\n <Card\n id={id}\n entity={entity}\n gridModifier={gridModifier}\n propsToDisplay={propsToDisplay}\n parsedPropsToDisplay={parsedPropsToDisplay}\n propsToDisplayModifiers={propsToDisplayModifiers}\n modifier={modifier}\n style={style}\n cardChildren={cardChildren}\n displayCategory={displayCategory}\n displayThumbnail={displayThumbnail}\n displayTitle={displayTitle}\n cardProps={cardProps}\n gtmId={name}\n gtmChildren={gtmChildren}\n priority={priority}\n arrowSize={arrowSize}\n enableOverlay={enableOverlay}\n overlayModifier={overlayModifier}\n titleOverlayModifier={titleOverlayModifier}\n {...cardProps}\n />\n </div>\n {shouldRenderBanner && <Banner {...bannerProps}
|
|
1
|
+
{"version":3,"file":"CardsRenderItem.js","names":["React","PropTypes","Waypoint","Card","shouldRenderWaypoint","renderChildren","parsePropsToDisplay","checkIfShouldRenderGtm","Banner","CardsRenderItem","cardProps","listProps","bannerProps","index","entity","currentListLength","cardChildren","gtmChildren","modifier","gridModifier","propsToDisplayModifiers","propsToDisplay","shouldRenderBanner","bannerIndex","priority","enableOverlay","autoScrollTimer","arrowSize","overlayModifier","titleOverlayModifier","initialOffset","isInfinite","style","name","id","triggerInfiniteScroll","displayCount","displayCategory","displayThumbnail","displayTitle","listTotal","itemsPerPage","currentItemIndex","renderWaypoint","shouldRenderGtm","parsedPropsToDisplay","propTypes","object","isRequired","number","array","bool","string","oneOfType","arrayOf","node","defaultProps"],"sources":["../../../../../src/components/List/components/Cards/CardsRenderItem.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Waypoint } from 'react-waypoint';\nimport Card from '../../../Card/Card';\nimport { shouldRenderWaypoint, renderChildren, parsePropsToDisplay } from '../../../../helpers';\nimport { checkIfShouldRenderGtm } from '../helpers';\nimport Banner from '../../../Banner';\n\nconst CardsRenderItem = ({\n cardProps,\n listProps,\n bannerProps,\n index,\n entity,\n currentListLength,\n cardChildren,\n gtmChildren,\n modifier,\n gridModifier,\n propsToDisplayModifiers,\n propsToDisplay,\n shouldRenderBanner,\n bannerIndex,\n priority,\n enableOverlay,\n autoScrollTimer,\n arrowSize,\n overlayModifier,\n titleOverlayModifier\n}) => {\n const {\n initialOffset,\n isInfinite,\n style,\n name,\n id,\n triggerInfiniteScroll,\n displayCount,\n displayCategory = true,\n displayThumbnail = true,\n displayTitle = true,\n listTotal,\n itemsPerPage\n } = listProps;\n\n const currentItemIndex = initialOffset + index;\n const renderWaypoint =\n isInfinite && shouldRenderWaypoint(index, currentListLength, currentItemIndex, listTotal);\n const shouldRenderGtm =\n gtmChildren && checkIfShouldRenderGtm(itemsPerPage, currentListLength, index);\n\n const parsedPropsToDisplay = parsePropsToDisplay(cardProps, propsToDisplay);\n\n return (\n <>\n {shouldRenderGtm && renderChildren(gtmChildren)}\n {displayCount && (\n <div className=\"heading heading--section heading--section--count\">\n <span className=\"section-number\">{currentItemIndex + 1}</span>\n <span className=\"section-total\">/{listTotal}</span>\n </div>\n )}\n <div className=\"list__item list__item--compact\">\n {renderWaypoint && <Waypoint onEnter={triggerInfiniteScroll} />}\n <Card\n id={id}\n entity={entity}\n gridModifier={gridModifier}\n propsToDisplay={propsToDisplay}\n parsedPropsToDisplay={parsedPropsToDisplay}\n propsToDisplayModifiers={propsToDisplayModifiers}\n modifier={modifier}\n style={style}\n cardChildren={cardChildren}\n displayCategory={displayCategory}\n displayThumbnail={displayThumbnail}\n displayTitle={displayTitle}\n cardProps={cardProps}\n gtmId={name}\n gtmChildren={gtmChildren}\n priority={priority}\n arrowSize={arrowSize}\n enableOverlay={enableOverlay}\n overlayModifier={overlayModifier}\n titleOverlayModifier={titleOverlayModifier}\n {...cardProps}\n />\n </div>\n {shouldRenderBanner && <Banner {...bannerProps} renderCounter={bannerIndex} />}\n </>\n );\n};\n\nCardsRenderItem.propTypes = {\n cardProps: PropTypes.object.isRequired,\n listProps: PropTypes.object.isRequired,\n index: PropTypes.number.isRequired,\n currentListLength: PropTypes.number.isRequired,\n propsToDisplayModifiers: PropTypes.array.isRequired,\n shouldRenderBanner: PropTypes.bool.isRequired,\n bannerIndex: PropTypes.number.isRequired,\n bannerProps: PropTypes.object,\n gridModifier: PropTypes.string,\n propsToDisplay: PropTypes.array,\n entity: PropTypes.string.isRequired,\n modifier: PropTypes.string,\n cardChildren: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n gtmChildren: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n priority: PropTypes.bool,\n enableOverlay: PropTypes.bool,\n overlayModifier: PropTypes.string,\n titleOverlayModifier: PropTypes.string,\n autoScrollTimer: PropTypes.number,\n arrowSize: PropTypes.string\n};\n\nCardsRenderItem.defaultProps = {\n priority: false,\n bannerProps: null,\n gridModifier: '',\n propsToDisplay: [],\n modifier: '',\n cardChildren: [],\n gtmChildren: [],\n enableOverlay: false,\n autoScrollTimer: 0,\n overlayModifier: '',\n titleOverlayModifier: '',\n arrowSize: ''\n};\n\nexport default CardsRenderItem;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,OAAOC,IAAI,MAAM,oBAAoB;AACrC,SAASC,oBAAoB,EAAEC,cAAc,EAAEC,mBAAmB,QAAQ,qBAAqB;AAC/F,SAASC,sBAAsB,QAAQ,YAAY;AACnD,OAAOC,MAAM,MAAM,iBAAiB;AAEpC,MAAMC,eAAe,GAAG,CAAC;EACvBC,SAAS;EACTC,SAAS;EACTC,WAAW;EACXC,KAAK;EACLC,MAAM;EACNC,iBAAiB;EACjBC,YAAY;EACZC,WAAW;EACXC,QAAQ;EACRC,YAAY;EACZC,uBAAuB;EACvBC,cAAc;EACdC,kBAAkB;EAClBC,WAAW;EACXC,QAAQ;EACRC,aAAa;EACbC,eAAe;EACfC,SAAS;EACTC,eAAe;EACfC;AACF,CAAC,KAAK;EACJ,MAAM;IACJC,aAAa;IACbC,UAAU;IACVC,KAAK;IACLC,IAAI;IACJC,EAAE;IACFC,qBAAqB;IACrBC,YAAY;IACZC,eAAe,GAAG,IAAI;IACtBC,gBAAgB,GAAG,IAAI;IACvBC,YAAY,GAAG,IAAI;IACnBC,SAAS;IACTC;EACF,CAAC,GAAG9B,SAAS;EAEb,MAAM+B,gBAAgB,GAAGZ,aAAa,GAAGjB,KAAK;EAC9C,MAAM8B,cAAc,GAClBZ,UAAU,IAAI3B,oBAAoB,CAACS,KAAK,EAAEE,iBAAiB,EAAE2B,gBAAgB,EAAEF,SAAS,CAAC;EAC3F,M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,EAAE,IAAI;EACjBO,YAAY,EAAE,EAAE;EAChBE,cAAc,EAAE,EAAE;EAClBH,QAAQ,EAAE,EAAE;EACZF,YAAY,EAAE,EAAE;EAChBC,WAAW,EAAE,EAAE;EACfQ,aAAa,EAAE,KAAK;EACpBC,eAAe,EAAE,CAAC;EAClBE,eAAe,EAAE,EAAE;EACnBC,oBAAoB,EAAE,EAAE;EACxBF,SAAS,EAAE;AACb,CAAC;AAED,eAAelB,eAAe"}
|
|
@@ -55,7 +55,7 @@ const FullRenderItem = ({
|
|
|
55
55
|
})), !!parsedPropsToDisplay.length && /*#__PURE__*/React.createElement(React.Fragment, null, parsedPropsToDisplay.map(prop => prop ? /*#__PURE__*/React.createElement("span", {
|
|
56
56
|
key: prop
|
|
57
57
|
}, prop) : null)), shouldRenderBanner && /*#__PURE__*/React.createElement(Banner, _extends({}, bannerProps, {
|
|
58
|
-
|
|
58
|
+
renderCounter: bannerIndex
|
|
59
59
|
})));
|
|
60
60
|
};
|
|
61
61
|
FullRenderItem.propTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FullRenderItem.js","names":["React","useContext","PropTypes","Waypoint","MainContext","BuildPBComponents","Banner","parsePropsToDisplay","shouldRenderWaypoint","FullRenderItem","isInfinite","pageBuilderComponents","entityProps","propsToDisplay","entity","index","itemId","listTotal","initialOffset","currentListLength","triggerInfiniteScroll","parent","pageBuilderID","displayCount","shouldRenderBanner","bannerProps","bannerIndex","hasGTM","parsedPropsToDisplay","currentItemIndex","renderWaypoint","itemEntity","length","map","prop","propTypes","array","object","isRequired","number","bool","func","string","data","itemsToDisplay","defaultProps"],"sources":["../../../../../src/components/List/components/Full/FullRenderItem.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { Waypoint } from 'react-waypoint';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport BuildPBComponents from '../../../../hooks/helpers/buildPBComponents';\nimport Banner from '../../../Banner';\nimport { parsePropsToDisplay, shouldRenderWaypoint } from '../../../../helpers';\n\nconst FullRenderItem = ({\n isInfinite,\n pageBuilderComponents,\n entityProps,\n propsToDisplay,\n entity,\n index,\n itemId,\n listTotal,\n initialOffset,\n currentListLength,\n triggerInfiniteScroll,\n parent,\n pageBuilderID,\n displayCount,\n shouldRenderBanner,\n bannerProps,\n bannerIndex\n}) => {\n const { hasGTM } = useContext(MainContext);\n if (!pageBuilderComponents) return null;\n const parsedPropsToDisplay = parsePropsToDisplay(entityProps, propsToDisplay);\n const currentItemIndex = initialOffset + index;\n const renderWaypoint =\n isInfinite && shouldRenderWaypoint(index, currentListLength, currentItemIndex, listTotal);\n return (\n <>\n {renderWaypoint && <Waypoint onEnter={triggerInfiniteScroll} />}\n {displayCount && (\n <div className=\"heading heading--section heading--section--count\">\n <span className=\"section-number\">{currentItemIndex + 1}</span>\n <span className=\"section-total\">/{listTotal}</span>\n </div>\n )}\n <div className=\"list__item list__item--full\">\n {BuildPBComponents(pageBuilderComponents, {\n parent: { ...parent, itemId, itemEntity: entity },\n hasGTM,\n pageBuilderID\n })}\n </div>\n {!!parsedPropsToDisplay.length && (\n <>{parsedPropsToDisplay.map(prop => (prop ? <span key={prop}>{prop}</span> : null))}</>\n )}\n {shouldRenderBanner && <Banner {...bannerProps}
|
|
1
|
+
{"version":3,"file":"FullRenderItem.js","names":["React","useContext","PropTypes","Waypoint","MainContext","BuildPBComponents","Banner","parsePropsToDisplay","shouldRenderWaypoint","FullRenderItem","isInfinite","pageBuilderComponents","entityProps","propsToDisplay","entity","index","itemId","listTotal","initialOffset","currentListLength","triggerInfiniteScroll","parent","pageBuilderID","displayCount","shouldRenderBanner","bannerProps","bannerIndex","hasGTM","parsedPropsToDisplay","currentItemIndex","renderWaypoint","itemEntity","length","map","prop","propTypes","array","object","isRequired","number","bool","func","string","data","itemsToDisplay","defaultProps"],"sources":["../../../../../src/components/List/components/Full/FullRenderItem.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { Waypoint } from 'react-waypoint';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport BuildPBComponents from '../../../../hooks/helpers/buildPBComponents';\nimport Banner from '../../../Banner';\nimport { parsePropsToDisplay, shouldRenderWaypoint } from '../../../../helpers';\n\nconst FullRenderItem = ({\n isInfinite,\n pageBuilderComponents,\n entityProps,\n propsToDisplay,\n entity,\n index,\n itemId,\n listTotal,\n initialOffset,\n currentListLength,\n triggerInfiniteScroll,\n parent,\n pageBuilderID,\n displayCount,\n shouldRenderBanner,\n bannerProps,\n bannerIndex\n}) => {\n const { hasGTM } = useContext(MainContext);\n if (!pageBuilderComponents) return null;\n const parsedPropsToDisplay = parsePropsToDisplay(entityProps, propsToDisplay);\n const currentItemIndex = initialOffset + index;\n const renderWaypoint =\n isInfinite && shouldRenderWaypoint(index, currentListLength, currentItemIndex, listTotal);\n return (\n <>\n {renderWaypoint && <Waypoint onEnter={triggerInfiniteScroll} />}\n {displayCount && (\n <div className=\"heading heading--section heading--section--count\">\n <span className=\"section-number\">{currentItemIndex + 1}</span>\n <span className=\"section-total\">/{listTotal}</span>\n </div>\n )}\n <div className=\"list__item list__item--full\">\n {BuildPBComponents(pageBuilderComponents, {\n parent: { ...parent, itemId, itemEntity: entity },\n hasGTM,\n pageBuilderID\n })}\n </div>\n {!!parsedPropsToDisplay.length && (\n <>{parsedPropsToDisplay.map(prop => (prop ? <span key={prop}>{prop}</span> : null))}</>\n )}\n {shouldRenderBanner && <Banner {...bannerProps} renderCounter={bannerIndex} />}\n </>\n );\n};\n\nFullRenderItem.propTypes = {\n pageBuilderComponents: PropTypes.array,\n entityProps: PropTypes.object.isRequired,\n parent: PropTypes.object.isRequired,\n currentListLength: PropTypes.number.isRequired,\n listTotal: PropTypes.number.isRequired,\n initialOffset: PropTypes.number.isRequired,\n displayCount: PropTypes.bool.isRequired,\n triggerInfiniteScroll: PropTypes.func,\n entity: PropTypes.string.isRequired,\n pageBuilderID: PropTypes.string.isRequired,\n itemId: PropTypes.string.isRequired,\n index: PropTypes.number.isRequired,\n isInfinite: PropTypes.bool.isRequired,\n shouldRenderBanner: PropTypes.bool.isRequired,\n bannerIndex: PropTypes.number.isRequired,\n propsToDisplay: PropTypes.array,\n data: PropTypes.array,\n itemsToDisplay: PropTypes.array,\n bannerProps: PropTypes.object\n};\n\nFullRenderItem.defaultProps = {\n pageBuilderComponents: null,\n data: [],\n propsToDisplay: [],\n itemsToDisplay: [],\n triggerInfiniteScroll: null,\n bannerProps: null\n};\n\nexport default FullRenderItem;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,OAAOC,iBAAiB,MAAM,6CAA6C;AAC3E,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,mBAAmB,EAAEC,oBAAoB,QAAQ,qBAAqB;AAE/E,MAAMC,cAAc,GAAG,CAAC;EACtBC,UAAU;EACVC,qBAAqB;EACrBC,WAAW;EACXC,cAAc;EACdC,MAAM;EACNC,KAAK;EACLC,MAAM;EACNC,SAAS;EACTC,aAAa;EACbC,iBAAiB;EACjBC,qBAAqB;EACrBC,MAAM;EACNC,aAAa;EACbC,YAAY;EACZC,kBAAkB;EAClBC,WAAW;EACXC;AACF,CAAC,KAAK;EACJ,MAAM;IAAEC;EAAO,CAAC,GAAG1B,UAAU,CAACG,WAAW,CAAC;EAC1C,IAAI,CAACO,qBAAqB,EAAE,OAAO,IAAI;EACvC,MAAMiB,oBAAoB,GAAGrB,mBAAmB,CAACK,WAAW,EAAEC,cAAc,CAAC;EAC7E,MAAMgB,gBAAgB,GAAGX,aAAa,GAAGH,KAAK;EAC9C,MAAMe,cAAc,GAClBpB,UAAU,IAAIF,oBAAoB,CAACO,KAAK,EAAEI,iBAAiB,EAAEU,gBAAgB,EAAEZ,SAAS,CAAC;EAC3F,oB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AEpB,SAAS,CAACwC,MAAM,CAACJ,UAAU;EAC1CtB,MAAM,EAAEd,SAAS,CAACwC,MAAM,CAACJ,UAAU;EACnCvB,KAAK,EAAEb,SAAS,CAACqC,MAAM,CAACD,UAAU;EAClC5B,UAAU,EAAER,SAAS,CAACsC,IAAI,CAACF,UAAU;EACrCd,kBAAkB,EAAEtB,SAAS,CAACsC,IAAI,CAACF,UAAU;EAC7CZ,WAAW,EAAExB,SAAS,CAACqC,MAAM,CAACD,UAAU;EACxCzB,cAAc,EAAEX,SAAS,CAACkC,KAAK;EAC/BO,IAAI,EAAEzC,SAAS,CAACkC,KAAK;EACrBQ,cAAc,EAAE1C,SAAS,CAACkC,KAAK;EAC/BX,WAAW,EAAEvB,SAAS,CAACmC;AACzB,CAAC;AAED5B,cAAc,CAACoC,YAAY,GAAG;EAC5BlC,qBAAqB,EAAE,IAAI;EAC3BgC,IAAI,EAAE,EAAE;EACR9B,cAAc,EAAE,EAAE;EAClB+B,cAAc,EAAE,EAAE;EAClBxB,qBAAqB,EAAE,IAAI;EAC3BK,WAAW,EAAE;AACf,CAAC;AAED,eAAehB,cAAc"}
|
|
@@ -29,6 +29,7 @@ export default {
|
|
|
29
29
|
itemlistnew: dynamic(() => import( /* webpackChunkName: "blazePbItemListNew" */'./ItemList/ItemListNew')),
|
|
30
30
|
backtotop: dynamic(() => import( /* webpackChunkName: "blazePbBackToTop" */'./BackToTop')),
|
|
31
31
|
contentgroup: dynamic(() => import( /* webpackChunkName: "blazePbContentGroup" */'./ContentGroup')),
|
|
32
|
-
contentgroupsection: dynamic(() => import( /* webpackChunkName: "blazePbContentGroupSection" */'./ContentGroupSection'))
|
|
32
|
+
contentgroupsection: dynamic(() => import( /* webpackChunkName: "blazePbContentGroupSection" */'./ContentGroupSection')),
|
|
33
|
+
iframe: dynamic(() => import( /* webpackChunkName: "blazePbIframe" */'./Iframe'))
|
|
33
34
|
};
|
|
34
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["dynamic","Banner","banner","button","card","carousel","column","datasummary","image","row","list","socialfollow","textblock","video","wrapper","searchcontent","searchfilter","searchfiltersort","modal","code","menu","menuitem","submenu","emailconfirm","breadcrumb","itemlistbutton","itemlistcounter","itemlistnew","backtotop","contentgroup","contentgroupsection"],"sources":["../../src/components/index.js"],"sourcesContent":["import dynamic from 'next/dynamic';\nimport Banner from './Banner';\n\nexport default {\n banner: Banner,\n button: dynamic(() => import(/* webpackChunkName: \"blazePbButton\" */ './Button')),\n card: dynamic(() => import(/* webpackChunkName: \"blazePbCard\" */ './Card')),\n carousel: dynamic(() => import(/* webpackChunkName: \"blazePbCarousel\" */ './Carousel')),\n column: dynamic(() => import(/* webpackChunkName: \"blazePbLayout\" */ './Layout')),\n datasummary: dynamic(() => import(/* webpackChunkName: \"blazePbDataSummary\" */ './DataSummary')),\n image: dynamic(() => import(/* webpackChunkName: \"blazePbImage\" */ './Image')),\n row: dynamic(() => import(/* webpackChunkName: \"blazePbLayout\" */ './Layout')),\n list: dynamic(() => import(/* webpackChunkName: \"blazePbList\" */ './List')),\n socialfollow: dynamic(() =>\n import(/* webpackChunkName: \"blazePbSocialFollow\" */ './SocialFollow')\n ),\n textblock: dynamic(() => import(/* webpackChunkName: \"blazePbTextBlock\" */ './TextBlock')),\n video: dynamic(() => import(/* webpackChunkName: \"blazePbVideo\" */ './Video')),\n wrapper: dynamic(() => import(/* webpackChunkName: \"blazePbWrapper\" */ './Wrapper')),\n searchcontent: dynamic(() =>\n import(/* webpackChunkName: \"blazePbSearchFilter\" */ './SearchContent/SearchContent')\n ),\n searchfilter: dynamic(() =>\n import(/* webpackChunkName: \"blazePbSearchFilter\" */ './SearchFilter')\n ),\n searchfiltersort: dynamic(() =>\n import(/* webpackChunkName: \"blazePbSearchFilteSort\" */ './SearchFilterSort')\n ),\n modal: dynamic(() => import(/* webpackChunkName: \"blazePbModal\" */ './Modal')),\n code: dynamic(() => import(/* webpackChunkName: \"blazePbCode\" */ './Code')),\n menu: dynamic(() => import(/* webpackChunkName: \"blazePbMenu\" */ './Menu')),\n menuitem: dynamic(() => import(/* webpackChunkName: \"blazePbMenuItem\" */ './MenuItem')),\n submenu: dynamic(() => import(/* webpackChunkName: \"blazePbSubMenu\" */ './SubMenu')),\n emailconfirm: dynamic(() =>\n import(/* webpackChunkName: \"blazePbEmailConfirm\" */ './EmailConfirm')\n ),\n\n breadcrumb: dynamic(() => import(/* webpackChunkName: \"blazePbBreadcrumb\" */ './Breadcrumb')),\n itemlistbutton: dynamic(() =>\n import(/* webpackChunkName: \"blazePbItemListButton\" */ './ItemList/ItemListButton')\n ),\n itemlistcounter: dynamic(() =>\n import(/* webpackChunkName: \"blazePbItemListCounter\" */ './ItemList/ItemListCounter')\n ),\n itemlistnew: dynamic(() =>\n import(/* webpackChunkName: \"blazePbItemListNew\" */ './ItemList/ItemListNew')\n ),\n backtotop: dynamic(() => import(/* webpackChunkName: \"blazePbBackToTop\" */ './BackToTop')),\n contentgroup: dynamic(() =>\n import(/* webpackChunkName: \"blazePbContentGroup\" */ './ContentGroup')\n ),\n contentgroupsection: dynamic(() =>\n import(/* webpackChunkName: \"blazePbContentGroupSection\" */ './ContentGroupSection')\n )\n};\n"],"mappings":"AAAA,OAAOA,OAAO,MAAM,cAAc;AAClC,OAAOC,MAAM,MAAM,UAAU;AAE7B,eAAe;EACbC,MAAM,EAAED,MAAM;EACdE,MAAM,EAAEH,OAAO,CAAC,MAAM,MAAM,EAAC,uCAAwC,UAAU,CAAC,CAAC;EACjFI,IAAI,EAAEJ,OAAO,CAAC,MAAM,MAAM,EAAC,qCAAsC,QAAQ,CAAC,CAAC;EAC3EK,QAAQ,EAAEL,OAAO,CAAC,MAAM,MAAM,EAAC,yCAA0C,YAAY,CAAC,CAAC;EACvFM,MAAM,EAAEN,OAAO,CAAC,MAAM,MAAM,EAAC,uCAAwC,UAAU,CAAC,CAAC;EACjFO,WAAW,EAAEP,OAAO,CAAC,MAAM,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;EACpFuB,YAAY,EAAEvB,OAAO,CAAC,MACpB,MAAM,EAAC,6CAA8C,gBAAgB,CAAC,CACvE;EAEDwB,UAAU,EAAExB,OAAO,CAAC,MAAM,MAAM,EAAC,2CAA4C,cAAc,CAAC,CAAC;EAC7FyB,cAAc,EAAEzB,OAAO,CAAC,MACtB,MAAM,EAAC,+CAAgD,2BAA2B,CAAC,CACpF;EACD0B,eAAe,EAAE1B,OAAO,CAAC,MACvB,MAAM,EAAC,gDAAiD,4BAA4B,CAAC,CACtF;EACD2B,WAAW,EAAE3B,OAAO,CAAC,MACnB,MAAM,EAAC,4CAA6C,wBAAwB,CAAC,CAC9E;EACD4B,SAAS,EAAE5B,OAAO,CAAC,MAAM,MAAM,EAAC,0CAA2C,aAAa,CAAC,CAAC;EAC1F6B,YAAY,EAAE7B,OAAO,CAAC,MACpB,MAAM,EAAC,6CAA8C,gBAAgB,CAAC,CACvE;EACD8B,mBAAmB,EAAE9B,OAAO,CAAC,MAC3B,MAAM,EAAC,oDAAqD,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","names":["dynamic","Banner","banner","button","card","carousel","column","datasummary","image","row","list","socialfollow","textblock","video","wrapper","searchcontent","searchfilter","searchfiltersort","modal","code","menu","menuitem","submenu","emailconfirm","breadcrumb","itemlistbutton","itemlistcounter","itemlistnew","backtotop","contentgroup","contentgroupsection","iframe"],"sources":["../../src/components/index.js"],"sourcesContent":["import dynamic from 'next/dynamic';\nimport Banner from './Banner';\n\nexport default {\n banner: Banner,\n button: dynamic(() => import(/* webpackChunkName: \"blazePbButton\" */ './Button')),\n card: dynamic(() => import(/* webpackChunkName: \"blazePbCard\" */ './Card')),\n carousel: dynamic(() => import(/* webpackChunkName: \"blazePbCarousel\" */ './Carousel')),\n column: dynamic(() => import(/* webpackChunkName: \"blazePbLayout\" */ './Layout')),\n datasummary: dynamic(() => import(/* webpackChunkName: \"blazePbDataSummary\" */ './DataSummary')),\n image: dynamic(() => import(/* webpackChunkName: \"blazePbImage\" */ './Image')),\n row: dynamic(() => import(/* webpackChunkName: \"blazePbLayout\" */ './Layout')),\n list: dynamic(() => import(/* webpackChunkName: \"blazePbList\" */ './List')),\n socialfollow: dynamic(() =>\n import(/* webpackChunkName: \"blazePbSocialFollow\" */ './SocialFollow')\n ),\n textblock: dynamic(() => import(/* webpackChunkName: \"blazePbTextBlock\" */ './TextBlock')),\n video: dynamic(() => import(/* webpackChunkName: \"blazePbVideo\" */ './Video')),\n wrapper: dynamic(() => import(/* webpackChunkName: \"blazePbWrapper\" */ './Wrapper')),\n searchcontent: dynamic(() =>\n import(/* webpackChunkName: \"blazePbSearchFilter\" */ './SearchContent/SearchContent')\n ),\n searchfilter: dynamic(() =>\n import(/* webpackChunkName: \"blazePbSearchFilter\" */ './SearchFilter')\n ),\n searchfiltersort: dynamic(() =>\n import(/* webpackChunkName: \"blazePbSearchFilteSort\" */ './SearchFilterSort')\n ),\n modal: dynamic(() => import(/* webpackChunkName: \"blazePbModal\" */ './Modal')),\n code: dynamic(() => import(/* webpackChunkName: \"blazePbCode\" */ './Code')),\n menu: dynamic(() => import(/* webpackChunkName: \"blazePbMenu\" */ './Menu')),\n menuitem: dynamic(() => import(/* webpackChunkName: \"blazePbMenuItem\" */ './MenuItem')),\n submenu: dynamic(() => import(/* webpackChunkName: \"blazePbSubMenu\" */ './SubMenu')),\n emailconfirm: dynamic(() =>\n import(/* webpackChunkName: \"blazePbEmailConfirm\" */ './EmailConfirm')\n ),\n\n breadcrumb: dynamic(() => import(/* webpackChunkName: \"blazePbBreadcrumb\" */ './Breadcrumb')),\n itemlistbutton: dynamic(() =>\n import(/* webpackChunkName: \"blazePbItemListButton\" */ './ItemList/ItemListButton')\n ),\n itemlistcounter: dynamic(() =>\n import(/* webpackChunkName: \"blazePbItemListCounter\" */ './ItemList/ItemListCounter')\n ),\n itemlistnew: dynamic(() =>\n import(/* webpackChunkName: \"blazePbItemListNew\" */ './ItemList/ItemListNew')\n ),\n backtotop: dynamic(() => import(/* webpackChunkName: \"blazePbBackToTop\" */ './BackToTop')),\n contentgroup: dynamic(() =>\n import(/* webpackChunkName: \"blazePbContentGroup\" */ './ContentGroup')\n ),\n contentgroupsection: dynamic(() =>\n import(/* webpackChunkName: \"blazePbContentGroupSection\" */ './ContentGroupSection')\n ),\n iframe: dynamic(() => import(/* webpackChunkName: \"blazePbIframe\" */ './Iframe'))\n};\n"],"mappings":"AAAA,OAAOA,OAAO,MAAM,cAAc;AAClC,OAAOC,MAAM,MAAM,UAAU;AAE7B,eAAe;EACbC,MAAM,EAAED,MAAM;EACdE,MAAM,EAAEH,OAAO,CAAC,MAAM,MAAM,EAAC,uCAAwC,UAAU,CAAC,CAAC;EACjFI,IAAI,EAAEJ,OAAO,CAAC,MAAM,MAAM,EAAC,qCAAsC,QAAQ,CAAC,CAAC;EAC3EK,QAAQ,EAAEL,OAAO,CAAC,MAAM,MAAM,EAAC,yCAA0C,YAAY,CAAC,CAAC;EACvFM,MAAM,EAAEN,OAAO,CAAC,MAAM,MAAM,EAAC,uCAAwC,UAAU,CAAC,CAAC;EACjFO,WAAW,EAAEP,OAAO,CAAC,MAAM,MAAM,EAAC,4CAA6C,eAAe,CAAC,CAAC;EAChGQ,KAAK,EAAER,OAAO,CAAC,MAAM,MAAM,EAAC,sCAAuC,SAAS,CAAC,CAAC;EAC9ES,GAAG,EAAET,OAAO,CAAC,MAAM,MAAM,EAAC,uCAAwC,UAAU,CAAC,CAAC;EAC9EU,IAAI,EAAEV,OAAO,CAAC,MAAM,MAAM,EAAC,qCAAsC,QAAQ,CAAC,CAAC;EAC3EW,YAAY,EAAEX,OAAO,CAAC,MACpB,MAAM,EAAC,6CAA8C,gBAAgB,CAAC,CACvE;EACDY,SAAS,EAAEZ,OAAO,CAAC,MAAM,MAAM,EAAC,0CAA2C,aAAa,CAAC,CAAC;EAC1Fa,KAAK,EAAEb,OAAO,CAAC,MAAM,MAAM,EAAC,sCAAuC,SAAS,CAAC,CAAC;EAC9Ec,OAAO,EA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MAAM,EAAC,6CAA8C,gBAAgB,CAAC,CACvE;EACD8B,mBAAmB,EAAE9B,OAAO,CAAC,MAC3B,MAAM,EAAC,oDAAqD,uBAAuB,CAAC,CACrF;EACD+B,MAAM,EAAE/B,OAAO,CAAC,MAAM,MAAM,EAAC,uCAAwC,UAAU,CAAC;AAClF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blaze-cms/react-page-builder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.128.0-admin-updates.0",
|
|
4
4
|
"description": "Blaze react page builder",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-es/index.js",
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
},
|
|
28
28
|
"license": "GPL-3.0",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@blaze-cms/core-auth-ui": "
|
|
31
|
-
"@blaze-cms/core-errors": "
|
|
30
|
+
"@blaze-cms/core-auth-ui": "0.128.0-admin-updates.0",
|
|
31
|
+
"@blaze-cms/core-errors": "0.128.0-admin-updates.0",
|
|
32
32
|
"@blaze-cms/image-cdn-react": "0.3.0-alpha.3",
|
|
33
|
-
"@blaze-cms/nextjs-components": "
|
|
34
|
-
"@blaze-cms/plugin-search-ui": "0.
|
|
35
|
-
"@blaze-cms/setup-ui": "
|
|
36
|
-
"@blaze-cms/utils": "
|
|
37
|
-
"@blaze-cms/utils-handlebars": "
|
|
33
|
+
"@blaze-cms/nextjs-components": "0.128.0-admin-updates.0",
|
|
34
|
+
"@blaze-cms/plugin-search-ui": "0.128.0-admin-updates.0",
|
|
35
|
+
"@blaze-cms/setup-ui": "0.128.0-admin-updates.0",
|
|
36
|
+
"@blaze-cms/utils": "0.128.0-admin-updates.0",
|
|
37
|
+
"@blaze-cms/utils-handlebars": "0.128.0-admin-updates.0",
|
|
38
38
|
"@blaze-react/breadcrumb": "0.8.0-alpha.60",
|
|
39
39
|
"@blaze-react/button": "0.5.19",
|
|
40
40
|
"@blaze-react/checkboxes": "0.5.31",
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
"@blaze-react/utils": "0.5.15",
|
|
46
46
|
"core-js": "^3.2.1",
|
|
47
47
|
"entities": "^2.0.0",
|
|
48
|
-
"html-react-parser": "^0.
|
|
48
|
+
"html-react-parser": "^3.0.4",
|
|
49
|
+
"iframe-resizer-react": "^1.1.0",
|
|
49
50
|
"lodash.at": "^4.6.0",
|
|
50
51
|
"lodash.camelcase": "^4.3.0",
|
|
51
52
|
"lodash.clonedeep": "^4.5.0",
|
|
@@ -87,5 +88,5 @@
|
|
|
87
88
|
"lib/*",
|
|
88
89
|
"lib-es/*"
|
|
89
90
|
],
|
|
90
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "ad3389e954fe463366655311efb1198191dbb625"
|
|
91
92
|
}
|
|
@@ -32,7 +32,7 @@ const BannerRender = ({
|
|
|
32
32
|
asPath,
|
|
33
33
|
action,
|
|
34
34
|
actionKey,
|
|
35
|
-
|
|
35
|
+
renderCounter,
|
|
36
36
|
userPropsData,
|
|
37
37
|
...otherProps
|
|
38
38
|
}) => {
|
|
@@ -79,7 +79,7 @@ const BannerRender = ({
|
|
|
79
79
|
const shouldShowBanner =
|
|
80
80
|
parsedAdunit && parsedSizes && !!parsedSizes.length && isContextualTargetingReady;
|
|
81
81
|
|
|
82
|
-
const customTargetings = setCustomTargetings(targetings,
|
|
82
|
+
const customTargetings = setCustomTargetings(targetings, renderCounter);
|
|
83
83
|
|
|
84
84
|
const targetingArguments = { ...parsedTargetings, ...customTargetings, ...userPropsData };
|
|
85
85
|
|
|
@@ -107,7 +107,7 @@ BannerRender.propTypes = {
|
|
|
107
107
|
entity: PropTypes.string,
|
|
108
108
|
targetings: PropTypes.string,
|
|
109
109
|
sizes: PropTypes.string,
|
|
110
|
-
|
|
110
|
+
renderCounter: PropTypes.number,
|
|
111
111
|
userPropsData: PropTypes.object
|
|
112
112
|
};
|
|
113
113
|
|
|
@@ -119,7 +119,7 @@ BannerRender.defaultProps = {
|
|
|
119
119
|
entity: '',
|
|
120
120
|
targetings: '',
|
|
121
121
|
sizes: '',
|
|
122
|
-
|
|
122
|
+
renderCounter: null,
|
|
123
123
|
userPropsData: {}
|
|
124
124
|
};
|
|
125
125
|
|
|
@@ -20,11 +20,11 @@ const buildTargetingValue = valueTargeting =>
|
|
|
20
20
|
? valueTargeting.replace(/\;|\[|\]/gm, char => (char === ';' ? ',' : '')).split(',')
|
|
21
21
|
: valueTargeting;
|
|
22
22
|
|
|
23
|
-
const setCustomTargetings = (targetings,
|
|
23
|
+
const setCustomTargetings = (targetings, renderCounter) => {
|
|
24
24
|
let bannerTargetings = {};
|
|
25
25
|
|
|
26
|
-
const updatedTargetings =
|
|
27
|
-
? addPosnToTargetings(targetings,
|
|
26
|
+
const updatedTargetings = renderCounter
|
|
27
|
+
? addPosnToTargetings(targetings, renderCounter)
|
|
28
28
|
: targetings;
|
|
29
29
|
|
|
30
30
|
const isValidTargeting = updatedTargetings && typeof updatedTargetings === 'string';
|
|
@@ -41,7 +41,7 @@ const CardContainer = ({
|
|
|
41
41
|
const dynamicWrapperSizes = enableCarousel
|
|
42
42
|
? ''
|
|
43
43
|
: getDynamicGridClasses('grid', itemsPerRow, designConfig);
|
|
44
|
-
let
|
|
44
|
+
let renderCounter = 0;
|
|
45
45
|
const CardWrapper = enableCarousel ? CarouselWrapper : Wrapper;
|
|
46
46
|
|
|
47
47
|
return (
|
|
@@ -55,7 +55,7 @@ const CardContainer = ({
|
|
|
55
55
|
{entities.map(({ baseAdunit, id, ...entityProps }, index) => {
|
|
56
56
|
const extraProps = parsePropsToDisplay(entityProps, propsToDisplay);
|
|
57
57
|
const dynamicKey = [itemId, index].join('-');
|
|
58
|
-
if (baseAdunit)
|
|
58
|
+
if (baseAdunit) renderCounter += 1;
|
|
59
59
|
|
|
60
60
|
const priority = priorityLimit > 0 && index + 1 <= priorityLimit;
|
|
61
61
|
|
|
@@ -66,7 +66,7 @@ const CardContainer = ({
|
|
|
66
66
|
baseAdunit={baseAdunit}
|
|
67
67
|
{...entityProps}
|
|
68
68
|
modifier={modifier}
|
|
69
|
-
|
|
69
|
+
renderCounter={renderCounter}
|
|
70
70
|
/>
|
|
71
71
|
) : (
|
|
72
72
|
<Card
|
|
@@ -7,10 +7,10 @@ import { getClassModifiers } from '../../utils';
|
|
|
7
7
|
import { CODE } from '../../constants';
|
|
8
8
|
import { wrapScriptTags } from './helpers';
|
|
9
9
|
|
|
10
|
-
const Code = memo(({ code: embedCode, ...otherProps }) => {
|
|
10
|
+
const Code = memo(({ code: embedCode, parserOptions, ...otherProps }) => {
|
|
11
11
|
if (!embedCode) return null;
|
|
12
12
|
|
|
13
|
-
const parsedCode = parseHTML(embedCode);
|
|
13
|
+
const parsedCode = parseHTML(embedCode, parserOptions);
|
|
14
14
|
const wrappedCode = wrapScriptTags(parsedCode);
|
|
15
15
|
const modifiers = getClassModifiers(CODE, { ...otherProps });
|
|
16
16
|
|
|
@@ -19,12 +19,14 @@ const Code = memo(({ code: embedCode, ...otherProps }) => {
|
|
|
19
19
|
|
|
20
20
|
Code.propTypes = {
|
|
21
21
|
code: PropTypes.string,
|
|
22
|
-
modifier: PropTypes.string
|
|
22
|
+
modifier: PropTypes.string,
|
|
23
|
+
parserOptions: PropTypes.object
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
Code.defaultProps = {
|
|
26
27
|
code: '',
|
|
27
|
-
modifier: ''
|
|
28
|
+
modifier: '',
|
|
29
|
+
parserOptions: {}
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
export default withTitle(Code);
|
|
@@ -17,9 +17,13 @@ function getWrappedScriptTag(child) {
|
|
|
17
17
|
function wrapScriptTags(parsedCode) {
|
|
18
18
|
if (Array.isArray(parsedCode)) {
|
|
19
19
|
parsedCode.forEach((child, index) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
try {
|
|
21
|
+
// modify children array as we just want to wrap single components
|
|
22
|
+
// eslint-disable-next-line no-param-reassign
|
|
23
|
+
parsedCode[index] = getWrappedScriptTag(child);
|
|
24
|
+
} catch {
|
|
25
|
+
// catch read-only element errors
|
|
26
|
+
}
|
|
23
27
|
});
|
|
24
28
|
|
|
25
29
|
return parsedCode;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { hasChildren } from '../../helpers';
|
|
4
4
|
|
|
5
|
-
const ContentGroupSection = ({ children, name }) => {
|
|
5
|
+
const ContentGroupSection = ({ children, name, ...props }) => {
|
|
6
6
|
if (!hasChildren(children)) return null;
|
|
7
7
|
|
|
8
8
|
return (
|
|
@@ -14,11 +14,9 @@ const ContentGroupSection = ({ children, name }) => {
|
|
|
14
14
|
|
|
15
15
|
ContentGroupSection.propTypes = {
|
|
16
16
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
17
|
-
name: PropTypes.string
|
|
17
|
+
name: PropTypes.string
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
ContentGroupSection.defaultProps = {
|
|
21
|
-
children: null
|
|
22
|
-
};
|
|
20
|
+
ContentGroupSection.defaultProps = { children: null, name: '' };
|
|
23
21
|
|
|
24
22
|
export default ContentGroupSection;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import IframeResizer from 'iframe-resizer-react';
|
|
4
|
+
import { IFRAME_CLASS, DEFAULT_WIDTH } from './constants';
|
|
5
|
+
|
|
6
|
+
const Iframe = ({ src, modifier, width, height, enableScrolling }) => {
|
|
7
|
+
if (!src) return null;
|
|
8
|
+
const modifierString = modifier ? ` ${modifier}` : '';
|
|
9
|
+
const iframeClassName = `${IFRAME_CLASS}${modifierString}`;
|
|
10
|
+
const defaultWidth = !width ? DEFAULT_WIDTH : {};
|
|
11
|
+
return (
|
|
12
|
+
<div className={iframeClassName}>
|
|
13
|
+
<IframeResizer
|
|
14
|
+
scrolling={enableScrolling}
|
|
15
|
+
autoResize
|
|
16
|
+
src={src}
|
|
17
|
+
sizeHeight={!height}
|
|
18
|
+
height={height}
|
|
19
|
+
width={width}
|
|
20
|
+
style={defaultWidth}
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
Iframe.propTypes = {
|
|
27
|
+
src: PropTypes.string.isRequired,
|
|
28
|
+
enableScrolling: PropTypes.bool,
|
|
29
|
+
modifier: PropTypes.string,
|
|
30
|
+
width: PropTypes.string,
|
|
31
|
+
height: PropTypes.string
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
Iframe.defaultProps = { enableScrolling: false, modifier: '', width: '', height: '' };
|
|
35
|
+
|
|
36
|
+
export default Iframe;
|
|
@@ -50,7 +50,7 @@ const FullRenderItem = ({
|
|
|
50
50
|
{!!parsedPropsToDisplay.length && (
|
|
51
51
|
<>{parsedPropsToDisplay.map(prop => (prop ? <span key={prop}>{prop}</span> : null))}</>
|
|
52
52
|
)}
|
|
53
|
-
{shouldRenderBanner && <Banner {...bannerProps}
|
|
53
|
+
{shouldRenderBanner && <Banner {...bannerProps} renderCounter={bannerIndex} />}
|
|
54
54
|
</>
|
|
55
55
|
);
|
|
56
56
|
};
|
package/src/components/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import React from 'react';
|
|
2
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
3
6
|
import { shallow } from 'enzyme';
|
|
@@ -20,14 +23,14 @@ describe('withTitle HOC', () => {
|
|
|
20
23
|
const [firstChild, secondChild] = children;
|
|
21
24
|
|
|
22
25
|
expect(firstChild).toBe('');
|
|
23
|
-
expect(secondChild).
|
|
26
|
+
expect(secondChild.type).toBe(MockComponent);
|
|
24
27
|
|
|
25
28
|
const titleProp = 'test title';
|
|
26
29
|
const wrapperWithTitle = shallow(<WrappedComponent elementTitle={titleProp} />);
|
|
27
30
|
const [, secondChildWithTitle] = wrapperWithTitle.prop('children');
|
|
28
31
|
|
|
29
32
|
expect(wrapperWithTitle.text()).toContain(titleProp);
|
|
30
|
-
expect(secondChildWithTitle).
|
|
33
|
+
expect(secondChildWithTitle.type).toBe(MockComponent);
|
|
31
34
|
});
|
|
32
35
|
|
|
33
36
|
it('should not display h2 if elementTitle is empty', () => {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
5
|
import {
|
|
3
6
|
getMockedProvider,
|
|
@@ -24,12 +27,11 @@ describe('Layout component', () => {
|
|
|
24
27
|
data: {}
|
|
25
28
|
})));
|
|
26
29
|
|
|
27
|
-
beforeEach(async
|
|
30
|
+
beforeEach(async () => {
|
|
28
31
|
component = await getMockedProvider(Layout, {
|
|
29
32
|
props: mockedProps
|
|
30
33
|
});
|
|
31
34
|
testInstance = component.root;
|
|
32
|
-
done();
|
|
33
35
|
});
|
|
34
36
|
|
|
35
37
|
afterEach(() => component.unmount());
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import React from 'react';
|
|
2
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
3
|
-
import
|
|
6
|
+
import checkIfRowHasColumns from '../../../../../src/components/Layout/helpers/check-if-row-has-columns';
|
|
4
7
|
import { ROW, COLUMN } from '../../../../../src/components/Layout/constants';
|
|
5
8
|
|
|
6
9
|
describe('checkIfRowHasColumns function', () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getStylesToUpdate from '../../../../../src/components/Layout/helpers/get-styles-to-update';
|
|
3
3
|
|
|
4
4
|
describe('getStylesToUpdate function', () => {
|
|
5
5
|
it('should be defined', () => {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import React from 'react';
|
|
2
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
3
|
-
import
|
|
6
|
+
import hasChildren from '../../../../../src/helpers/has-children';
|
|
4
7
|
|
|
5
8
|
describe('hasChildren function', () => {
|
|
6
9
|
it('should be defined', () => {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import React from 'react';
|
|
2
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
3
6
|
import { MockedProvider } from '@apollo/client/testing';
|
|
@@ -99,7 +102,7 @@ const defaultProps = {
|
|
|
99
102
|
entity: '',
|
|
100
103
|
targetings: '',
|
|
101
104
|
sizes: '',
|
|
102
|
-
|
|
105
|
+
renderCounter: null,
|
|
103
106
|
...otherProps
|
|
104
107
|
};
|
|
105
108
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
1
5
|
import { render, act, waitFor } from '@testing-library/react';
|
|
6
|
+
|
|
2
7
|
import '@testing-library/jest-dom/extend-expect';
|
|
3
|
-
import React from 'react';
|
|
4
8
|
import CardContainer from '../../../../../src/components/Card/CardContainer';
|
|
5
9
|
import { cardDataMockedOptions } from './mockData';
|
|
6
10
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import appendImages from '../../../../../../src/helpers/append-images';
|
|
3
3
|
|
|
4
4
|
const cardIds = ['card-1', 'card-2', 'card-3'];
|
|
5
5
|
const imageIds = ['image-1', 'image-2', 'image-3'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getDynamicGridClasses from '../../../../../../src/components/Card/helpers/get-dynamic-grid-classes';
|
|
3
3
|
|
|
4
4
|
const mockedProps = {
|
|
5
5
|
global: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getPublishedListingUrl from '../../../../../../src/components/Card/helpers/get-published-listing-url';
|
|
3
3
|
|
|
4
4
|
const mockedUrl = {
|
|
5
5
|
publishedListingPage: { url: 'www.listing.test.com' }
|