@blaze-cms/react-page-builder 0.127.0 → 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 +11 -0
- package/README.md +9 -0
- package/lib/HOC/withInfiniteScroll.js +21 -23
- package/lib/HOC/withInfiniteScroll.js.map +1 -1
- package/lib/components/Banner/Banner.js +3 -3
- package/lib/components/Banner/Banner.js.map +1 -1
- package/lib/components/Breadcrumb/Breadcrumb.js +11 -11
- package/lib/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/lib/components/Card/CardRender.js +4 -4
- package/lib/components/Card/CardRender.js.map +1 -1
- package/lib/components/Card/helpers/get-dynamic-grid-classes.js +3 -3
- package/lib/components/Card/helpers/get-dynamic-grid-classes.js.map +1 -1
- package/lib/components/ContentGroup/helpers/get-sections-data.js +8 -8
- package/lib/components/ContentGroup/helpers/get-sections-data.js.map +1 -1
- package/lib/components/ContentGroupSection/ContentGroupSection.js +4 -2
- package/lib/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
- package/lib/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
- package/lib/components/EmailConfirm/EmailConfirm.js +4 -4
- package/lib/components/EmailConfirm/EmailConfirm.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/Image/ImageFactory.js +9 -9
- package/lib/components/Image/ImageFactory.js.map +1 -1
- package/lib/components/ItemList/ItemListNew/ItemListNew.js +3 -3
- package/lib/components/ItemList/ItemListNew/ItemListNew.js.map +1 -1
- package/lib/components/Layout/Layout.js +4 -4
- package/lib/components/Layout/Layout.js.map +1 -1
- package/lib/components/List/ListFactory.js +9 -9
- package/lib/components/List/ListFactory.js.map +1 -1
- package/lib/components/List/ListRender.js.map +1 -1
- package/lib/components/List/components/Cards/CardsRenderItem.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/helpers/sort-aggs.js +10 -10
- package/lib/components/List/helpers/sort-aggs.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
- package/lib/components/SearchFilter/SearchFilterContainer.js +5 -5
- package/lib/components/SearchFilter/SearchFilterContainer.js.map +1 -1
- package/lib/components/SearchFilter/components/Range.js +4 -4
- package/lib/components/SearchFilter/components/Range.js.map +1 -1
- package/lib/components/SearchFilterSort/SearchFilterSort.js +5 -5
- package/lib/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
- package/lib/components/TextBlock/TextBlockRender.js.map +1 -1
- package/lib/components/Video/providers/Vimeo/VimeoProvider.js +21 -23
- package/lib/components/Video/providers/Vimeo/VimeoProvider.js.map +1 -1
- package/lib/components/index.js +5 -0
- package/lib/components/index.js.map +1 -1
- package/lib/helpers/build-raw-query-base.js +6 -6
- package/lib/helpers/build-raw-query-base.js.map +1 -1
- package/lib/helpers/get-click-wrapper-options.js +11 -11
- package/lib/helpers/get-click-wrapper-options.js.map +1 -1
- package/lib/helpers/get-entity-data.js +3 -3
- package/lib/helpers/get-entity-data.js.map +1 -1
- package/lib/helpers/get-search-filter-type.js +4 -4
- package/lib/helpers/get-search-filter-type.js.map +1 -1
- package/lib/helpers/parse-props-to-display.js.map +1 -1
- package/lib/helpers/split-children.js +12 -12
- package/lib/helpers/split-children.js.map +1 -1
- package/lib/hooks/helpers/buildPBComponents.js +3 -3
- package/lib/hooks/helpers/buildPBComponents.js.map +1 -1
- package/lib/hooks/helpers/inject-textblock-banners.js +3 -3
- 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-page-builder.js +7 -9
- package/lib/hooks/use-page-builder.js.map +1 -1
- package/lib-es/components/ContentGroupSection/ContentGroupSection.js +4 -2
- 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/ListRender.js.map +1 -1
- package/lib-es/components/List/components/Cards/CardsRenderItem.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/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
- package/lib-es/components/TextBlock/TextBlockRender.js.map +1 -1
- package/lib-es/components/index.js +2 -1
- package/lib-es/components/index.js.map +1 -1
- package/lib-es/helpers/parse-props-to-display.js.map +1 -1
- package/package.json +10 -9
- package/src/components/ContentGroupSection/ContentGroupSection.js +3 -2
- 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/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 +3 -0
- 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
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": "
|
|
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",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"core-js": "^3.2.1",
|
|
47
47
|
"entities": "^2.0.0",
|
|
48
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
|
}
|
|
@@ -13,9 +13,10 @@ const ContentGroupSection = ({ children, name, ...props }) => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
ContentGroupSection.propTypes = {
|
|
16
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
|
|
16
|
+
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
17
|
+
name: PropTypes.string
|
|
17
18
|
};
|
|
18
19
|
|
|
19
|
-
ContentGroupSection.defaultProps = { children: null };
|
|
20
|
+
ContentGroupSection.defaultProps = { children: null, name: '' };
|
|
20
21
|
|
|
21
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;
|
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,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' }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import useDynamicSizeKey from '../../../../../../src/components/Card/helpers/use-dynamic-size-key';
|
|
3
3
|
|
|
4
4
|
describe('useDynamicSizeKey helper function', () => {
|
|
5
5
|
it('should return dynamicSizeKey string based on props passed', () => {
|
|
@@ -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 { getMockedProvider } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
@@ -15,12 +18,11 @@ describe('Carousel image component', () => {
|
|
|
15
18
|
const mockedProps = getMockedProps();
|
|
16
19
|
let component;
|
|
17
20
|
|
|
18
|
-
beforeEach(async
|
|
21
|
+
beforeEach(async () => {
|
|
19
22
|
component = await getMockedProvider(CarouselImage, {
|
|
20
23
|
mocks: MOCK_WITH_DATA,
|
|
21
24
|
props: mockedProps
|
|
22
25
|
});
|
|
23
|
-
done();
|
|
24
26
|
});
|
|
25
27
|
|
|
26
28
|
afterEach(() => component.unmount());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import parseHTML from 'html-react-parser';
|
|
2
|
-
import
|
|
2
|
+
import wrapScriptTags from '../../../../../../src/components/Code/helpers/wrap-script-tags';
|
|
3
3
|
import ScriptTag from '../../../../../../src/components/Code/ScriptTag';
|
|
4
4
|
|
|
5
5
|
describe('wrapScriptTags helper', () => {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
2
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
3
6
|
import HeadingLargeSummary from '../../../../../../src/components/DataSummary/DataSummaryTypes/HeadingLargeSummary';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
2
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
3
6
|
import ItemDetailsSummary from '../../../../../../src/components/DataSummary/DataSummaryTypes/ItemDetailsSummary';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
2
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
3
6
|
import LargeSummary from '../../../../../../src/components/DataSummary/DataSummaryTypes/LargeSummary/LargeSummary';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
2
5
|
import ListSummary from '../../../../../../src/components/DataSummary/DataSummaryTypes/ListSummary/ListSummary';
|
|
3
6
|
import { propsDataSummary } from '../mockData';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
1
4
|
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
2
5
|
import TextSummary from '../../../../../../src/components/DataSummary/DataSummaryTypes/TextSummary/TextSummary';
|
|
3
6
|
import { propsDataSummary } from '../mockData';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import buildLoopPropsContent from '../../../../../../src/components/DataSummary/helpers/build-loop-props-content';
|
|
3
3
|
import { mockedLoopProps, mockedPropsToDisplay, mockedData, mockedResults } from './mocks';
|
|
4
4
|
|
|
5
5
|
describe('buildLoopPropsContent helper function', () => {
|
package/tests/unit/src/components/DataSummary/helpers/build-props-to-display-with-content.test.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import buildPropsToDisplayWithContent from '../../../../../../src/components/DataSummary/helpers/build-props-to-display-with-content';
|
|
3
3
|
|
|
4
4
|
const mockedPropsArray = ['id', 'name', 'tags.name', 'tags.id'];
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getDataSummaryQuery from '../../../../../../src/components/DataSummary/helpers/get-data-summary-query';
|
|
3
3
|
|
|
4
4
|
describe('get data summary query func', () => {
|
|
5
5
|
const data = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @jest-environment node
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import getLinkBasedOnValue from '../../../../../../src/components/DataSummary/helpers/get-link-based-on-value';
|
|
5
5
|
|
|
6
6
|
describe('Get link based on value', () => {
|
|
7
7
|
it('should be a function', () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import getLinkToPublishedContent from '../../../../../../src/components/DataSummary/helpers/get-link-to-published-content';
|
|
3
3
|
|
|
4
4
|
describe('get link to published content', () => {
|
|
5
5
|
const publishedKey = 'content.published';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
-
import
|
|
2
|
+
import parseBooleanValues from '../../../../../../src/components/DataSummary/helpers/parse-boolean-values';
|
|
3
3
|
|
|
4
4
|
describe('parseBooleanValues helper function', () => {
|
|
5
5
|
it('should return the value if exists and is not a boolean', () => {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
4
|
+
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
5
|
+
import Iframe from '../../../../../src/components/Iframe/Iframe';
|
|
6
|
+
|
|
7
|
+
describe('Iframe component', () => {
|
|
8
|
+
it('should not render if no src is passed', () => {
|
|
9
|
+
const { asFragment: iFrame } = render(Iframe);
|
|
10
|
+
expect(iFrame()).toMatchSnapshot();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('should not render otherwise', () => {
|
|
14
|
+
const { asFragment: iFrame } = render(Iframe, {
|
|
15
|
+
src: 'www.someurl.com',
|
|
16
|
+
height: '200',
|
|
17
|
+
width: '100'
|
|
18
|
+
});
|
|
19
|
+
expect(iFrame()).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Iframe component should not render if no src is passed 1`] = `<DocumentFragment />`;
|
|
4
|
+
|
|
5
|
+
exports[`Iframe component should not render otherwise 1`] = `
|
|
6
|
+
<DocumentFragment>
|
|
7
|
+
<div
|
|
8
|
+
class="iframe-container"
|
|
9
|
+
>
|
|
10
|
+
<iframe
|
|
11
|
+
height="200"
|
|
12
|
+
id="iFrameResizer0"
|
|
13
|
+
scrolling="no"
|
|
14
|
+
src="www.someurl.com"
|
|
15
|
+
style="overflow: hidden;"
|
|
16
|
+
title="iframe"
|
|
17
|
+
width="100"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
</DocumentFragment>
|
|
21
|
+
`;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
1
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
2
6
|
import { MockedProvider } from '@apollo/client/testing';
|
|
3
7
|
import { render, act, screen, waitFor } from '@testing-library/react';
|
|
4
|
-
|
|
8
|
+
|
|
5
9
|
import { Router } from 'react-router-dom';
|
|
6
10
|
import { createMemoryHistory } from 'history';
|
|
7
11
|
import GlobalLightbox from '../../../../../../src/components/Image/GlobalLightbox/GlobalLightbox';
|