@blaze-cms/react-page-builder 0.126.0 → 0.127.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 +8 -7
- 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/components/Iframe/Iframe.test.js +18 -0
- package/tests/unit/src/components/Iframe/__snapshots__/Iframe.test.js.snap +21 -0
- package/tests/unit/src/components/__snapshots__/index.test.js.snap +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blaze-cms/react-page-builder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.127.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": "
|
|
30
|
+
"@blaze-cms/core-auth-ui": "0.127.0-admin-updates.0",
|
|
31
31
|
"@blaze-cms/core-errors": "^0.118.0",
|
|
32
32
|
"@blaze-cms/image-cdn-react": "0.3.0-alpha.3",
|
|
33
|
-
"@blaze-cms/nextjs-components": "
|
|
34
|
-
"@blaze-cms/plugin-search-ui": "
|
|
33
|
+
"@blaze-cms/nextjs-components": "0.127.0-admin-updates.0",
|
|
34
|
+
"@blaze-cms/plugin-search-ui": "0.127.0-admin-updates.0",
|
|
35
35
|
"@blaze-cms/setup-ui": "^0.92.0",
|
|
36
|
-
"@blaze-cms/utils": "
|
|
37
|
-
"@blaze-cms/utils-handlebars": "
|
|
36
|
+
"@blaze-cms/utils": "0.127.0-admin-updates.0",
|
|
37
|
+
"@blaze-cms/utils-handlebars": "0.127.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": "^0.10.0",
|
|
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": "ea29a84e65872f21b486ee450a11a63e53754641"
|
|
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
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { render } from '@blaze-cms/tools/test-helpers/test-functions';
|
|
2
|
+
import Iframe from '../../../../../src/components/Iframe/Iframe';
|
|
3
|
+
|
|
4
|
+
describe('Iframe component', () => {
|
|
5
|
+
it('should not render if no src is passed', () => {
|
|
6
|
+
const { asFragment: iFrame } = render(Iframe);
|
|
7
|
+
expect(iFrame()).toMatchSnapshot();
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('should not render otherwise', () => {
|
|
11
|
+
const { asFragment: iFrame } = render(Iframe, {
|
|
12
|
+
src: 'www.someurl.com',
|
|
13
|
+
height: '200',
|
|
14
|
+
width: '100'
|
|
15
|
+
});
|
|
16
|
+
expect(iFrame()).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -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
|
+
`;
|
|
@@ -50,6 +50,10 @@ Object {
|
|
|
50
50
|
"$$typeof": Symbol(react.forward_ref),
|
|
51
51
|
"render": [Function],
|
|
52
52
|
},
|
|
53
|
+
"iframe": Object {
|
|
54
|
+
"$$typeof": Symbol(react.forward_ref),
|
|
55
|
+
"render": [Function],
|
|
56
|
+
},
|
|
53
57
|
"image": Object {
|
|
54
58
|
"$$typeof": Symbol(react.forward_ref),
|
|
55
59
|
"render": [Function],
|