@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.
Files changed (95) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +9 -0
  3. package/lib/HOC/withInfiniteScroll.js +21 -23
  4. package/lib/HOC/withInfiniteScroll.js.map +1 -1
  5. package/lib/components/Banner/Banner.js +3 -3
  6. package/lib/components/Banner/Banner.js.map +1 -1
  7. package/lib/components/Breadcrumb/Breadcrumb.js +11 -11
  8. package/lib/components/Breadcrumb/Breadcrumb.js.map +1 -1
  9. package/lib/components/Card/CardRender.js +4 -4
  10. package/lib/components/Card/CardRender.js.map +1 -1
  11. package/lib/components/Card/helpers/get-dynamic-grid-classes.js +3 -3
  12. package/lib/components/Card/helpers/get-dynamic-grid-classes.js.map +1 -1
  13. package/lib/components/ContentGroup/helpers/get-sections-data.js +8 -8
  14. package/lib/components/ContentGroup/helpers/get-sections-data.js.map +1 -1
  15. package/lib/components/ContentGroupSection/ContentGroupSection.js +4 -2
  16. package/lib/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
  17. package/lib/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
  18. package/lib/components/EmailConfirm/EmailConfirm.js +4 -4
  19. package/lib/components/EmailConfirm/EmailConfirm.js.map +1 -1
  20. package/lib/components/Iframe/Iframe.js +51 -0
  21. package/lib/components/Iframe/Iframe.js.map +1 -0
  22. package/lib/components/Iframe/constants.js +15 -0
  23. package/lib/components/Iframe/constants.js.map +1 -0
  24. package/lib/components/Iframe/index.js +12 -0
  25. package/lib/components/Iframe/index.js.map +1 -0
  26. package/lib/components/Image/ImageFactory.js +9 -9
  27. package/lib/components/Image/ImageFactory.js.map +1 -1
  28. package/lib/components/ItemList/ItemListNew/ItemListNew.js +3 -3
  29. package/lib/components/ItemList/ItemListNew/ItemListNew.js.map +1 -1
  30. package/lib/components/Layout/Layout.js +4 -4
  31. package/lib/components/Layout/Layout.js.map +1 -1
  32. package/lib/components/List/ListFactory.js +9 -9
  33. package/lib/components/List/ListFactory.js.map +1 -1
  34. package/lib/components/List/ListRender.js.map +1 -1
  35. package/lib/components/List/components/Cards/CardsRenderItem.js.map +1 -1
  36. package/lib/components/List/components/Full/FullRenderItem.js.map +1 -1
  37. package/lib/components/List/components/Header/ListHeader.js.map +1 -1
  38. package/lib/components/List/helpers/sort-aggs.js +10 -10
  39. package/lib/components/List/helpers/sort-aggs.js.map +1 -1
  40. package/lib/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
  41. package/lib/components/SearchFilter/SearchFilterContainer.js +5 -5
  42. package/lib/components/SearchFilter/SearchFilterContainer.js.map +1 -1
  43. package/lib/components/SearchFilter/components/Range.js +4 -4
  44. package/lib/components/SearchFilter/components/Range.js.map +1 -1
  45. package/lib/components/SearchFilterSort/SearchFilterSort.js +5 -5
  46. package/lib/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
  47. package/lib/components/TextBlock/TextBlockRender.js.map +1 -1
  48. package/lib/components/Video/providers/Vimeo/VimeoProvider.js +21 -23
  49. package/lib/components/Video/providers/Vimeo/VimeoProvider.js.map +1 -1
  50. package/lib/components/index.js +5 -0
  51. package/lib/components/index.js.map +1 -1
  52. package/lib/helpers/build-raw-query-base.js +6 -6
  53. package/lib/helpers/build-raw-query-base.js.map +1 -1
  54. package/lib/helpers/get-click-wrapper-options.js +11 -11
  55. package/lib/helpers/get-click-wrapper-options.js.map +1 -1
  56. package/lib/helpers/get-entity-data.js +3 -3
  57. package/lib/helpers/get-entity-data.js.map +1 -1
  58. package/lib/helpers/get-search-filter-type.js +4 -4
  59. package/lib/helpers/get-search-filter-type.js.map +1 -1
  60. package/lib/helpers/parse-props-to-display.js.map +1 -1
  61. package/lib/helpers/split-children.js +12 -12
  62. package/lib/helpers/split-children.js.map +1 -1
  63. package/lib/hooks/helpers/buildPBComponents.js +3 -3
  64. package/lib/hooks/helpers/buildPBComponents.js.map +1 -1
  65. package/lib/hooks/helpers/inject-textblock-banners.js +3 -3
  66. package/lib/hooks/helpers/inject-textblock-banners.js.map +1 -1
  67. package/lib/hooks/helpers/insert-banners.js.map +1 -1
  68. package/lib/hooks/use-page-builder.js +7 -9
  69. package/lib/hooks/use-page-builder.js.map +1 -1
  70. package/lib-es/components/ContentGroupSection/ContentGroupSection.js +4 -2
  71. package/lib-es/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
  72. package/lib-es/components/Iframe/Iframe.js +42 -0
  73. package/lib-es/components/Iframe/Iframe.js.map +1 -0
  74. package/lib-es/components/Iframe/constants.js +7 -0
  75. package/lib-es/components/Iframe/constants.js.map +1 -0
  76. package/lib-es/components/Iframe/index.js +3 -0
  77. package/lib-es/components/Iframe/index.js.map +1 -0
  78. package/lib-es/components/List/ListRender.js.map +1 -1
  79. package/lib-es/components/List/components/Cards/CardsRenderItem.js.map +1 -1
  80. package/lib-es/components/List/components/Full/FullRenderItem.js.map +1 -1
  81. package/lib-es/components/List/components/Header/ListHeader.js.map +1 -1
  82. package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
  83. package/lib-es/components/TextBlock/TextBlockRender.js.map +1 -1
  84. package/lib-es/components/index.js +2 -1
  85. package/lib-es/components/index.js.map +1 -1
  86. package/lib-es/helpers/parse-props-to-display.js.map +1 -1
  87. package/package.json +8 -7
  88. package/src/components/ContentGroupSection/ContentGroupSection.js +3 -2
  89. package/src/components/Iframe/Iframe.js +36 -0
  90. package/src/components/Iframe/constants.js +4 -0
  91. package/src/components/Iframe/index.js +3 -0
  92. package/src/components/index.js +2 -1
  93. package/tests/unit/src/components/Iframe/Iframe.test.js +18 -0
  94. package/tests/unit/src/components/Iframe/__snapshots__/Iframe.test.js.snap +21 -0
  95. 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.126.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": "^0.125.0",
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": "^0.125.0",
34
- "@blaze-cms/plugin-search-ui": "^0.125.0",
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": "^0.125.0",
37
- "@blaze-cms/utils-handlebars": "^0.125.0",
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": "3426eb3c15ca8bf9c601ebfccff00ad695b9a83a"
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;
@@ -0,0 +1,4 @@
1
+ const IFRAME_CLASS = 'iframe-container';
2
+ const DEFAULT_WIDTH = { width: '1px', minWidth: '100%' };
3
+
4
+ export { IFRAME_CLASS, DEFAULT_WIDTH };
@@ -0,0 +1,3 @@
1
+ import Iframe from './Iframe';
2
+
3
+ export default Iframe;
@@ -51,5 +51,6 @@ export default {
51
51
  ),
52
52
  contentgroupsection: dynamic(() =>
53
53
  import(/* webpackChunkName: "blazePbContentGroupSection" */ './ContentGroupSection')
54
- )
54
+ ),
55
+ iframe: dynamic(() => import(/* webpackChunkName: "blazePbIframe" */ './Iframe'))
55
56
  };
@@ -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],