@magento/pagebuilder 9.3.5 → 9.3.6-alpha11

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.
@@ -6,7 +6,21 @@ export default node => {
6
6
  const rawHTML = node.childNodes[0] ? node.childNodes[0].innerHTML : '';
7
7
 
8
8
  // Sanitize the raw HTML using DOMPurify
9
- const sanitizedHTML = DOMPurify.sanitize(rawHTML);
9
+ const sanitizedHTML = DOMPurify.sanitize(rawHTML, {
10
+ ADD_TAGS: ['iframe'],
11
+ ADD_ATTR: [
12
+ 'allow',
13
+ 'allowfullscreen',
14
+ 'frameborder',
15
+ 'scrolling',
16
+ 'src',
17
+ 'title',
18
+ 'width',
19
+ 'height',
20
+ 'sandbox'
21
+ ],
22
+ ALLOWED_URI_REGEXP: /^https?:\/\//i // allow only http/https sources
23
+ });
10
24
 
11
25
  return {
12
26
  // Return the sanitized HTML content, along with the result from getAdvanced
@@ -15,13 +15,6 @@ import defaultOperations from '../carousel.gql';
15
15
  import mosOperations from '../carousel.gql.ce';
16
16
  import acOperations from '../carousel.gql.ee';
17
17
 
18
- jest.mock(
19
- '@magento/peregrine/lib/hooks/useCustomerWishlistSkus/useCustomerWishlistSkus',
20
- () => ({
21
- useCustomerWishlistSkus: jest.fn()
22
- })
23
- );
24
-
25
18
  const cache = new InMemoryCache({
26
19
  typePolicies
27
20
  });
@@ -1,7 +1,5 @@
1
1
  import { useQuery } from '@apollo/client';
2
2
 
3
- import { useCustomerWishlistSkus } from '@magento/peregrine/lib/hooks/useCustomerWishlistSkus/useCustomerWishlistSkus';
4
-
5
3
  import mergeOperations from '@magento/peregrine/lib/util/shallowMerge';
6
4
  import defaultOperations from './carousel.gql';
7
5
 
@@ -11,8 +9,6 @@ import defaultOperations from './carousel.gql';
11
9
  export const useCarousel = (props = {}) => {
12
10
  const operations = mergeOperations(defaultOperations, props.operations);
13
11
 
14
- useCustomerWishlistSkus();
15
-
16
12
  const { data: storeConfigData } = useQuery(operations.getStoreConfigQuery, {
17
13
  fetchPolicy: 'cache-and-network'
18
14
  });
@@ -36,9 +36,12 @@ exports[`renders a Video component 1`] = `
36
36
  >
37
37
  <div>
38
38
  <iframe
39
+ allow="geolocation; microphone; camera; encrypted-media"
39
40
  allowFullScreen="1"
40
41
  frameBorder="0"
41
42
  loading="lazy"
43
+ referrerPolicy="no-referrer"
44
+ sandbox=" allow-scripts allow-same-origin allow-popups allow-forms"
42
45
  src="https://www.youtube.com/watch?v=N0bYol6ax8Y"
43
46
  title="https://www.youtube.com/watch?v=N0bYol6ax8Y"
44
47
  />
@@ -84,9 +87,12 @@ exports[`renders a Video component with all props configured 1`] = `
84
87
  >
85
88
  <div>
86
89
  <iframe
90
+ allow="geolocation; microphone; camera; encrypted-media"
87
91
  allowFullScreen="1"
88
92
  frameBorder="0"
89
93
  loading="lazy"
94
+ referrerPolicy="no-referrer"
95
+ sandbox=" allow-scripts allow-same-origin allow-popups allow-forms"
90
96
  src="https://vimeo.com/116810486"
91
97
  title="https://vimeo.com/116810486"
92
98
  />
@@ -81,7 +81,14 @@ const Video = props => {
81
81
  title={url}
82
82
  frameBorder="0"
83
83
  allowFullScreen="1"
84
+ sandbox="
85
+ allow-scripts
86
+ allow-same-origin
87
+ allow-popups
88
+ allow-forms"
84
89
  loading="lazy"
90
+ allow="geolocation; microphone; camera; encrypted-media"
91
+ referrerPolicy="no-referrer"
85
92
  src={url}
86
93
  />
87
94
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magento/pagebuilder",
3
- "version": "9.3.5",
3
+ "version": "9.3.6-alpha11",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,9 +34,9 @@
34
34
  "homepage": "https://github.com/magento/pwa-studio/tree/main/packages/pagebuilder#readme",
35
35
  "dependencies": {},
36
36
  "devDependencies": {
37
- "@magento/peregrine": "~15.5.2",
38
- "@magento/pwa-buildpack": "~11.5.4",
39
- "@magento/venia-ui": "~11.7.0",
37
+ "@magento/peregrine": "15.6.2-alpha11",
38
+ "@magento/pwa-buildpack": "11.5.5-alpha11",
39
+ "@magento/venia-ui": "11.7.1-alpha11",
40
40
  "@storybook/react": "~6.3.7",
41
41
  "jarallax": "~1.11.1",
42
42
  "load-google-maps-api": "~2.0.1",
@@ -44,15 +44,15 @@
44
44
  "react": "~17.0.1",
45
45
  "react-dom": "~17.0.1",
46
46
  "react-slick": "~0.28.0",
47
- "react-tabs": "~3.0.0",
47
+ "react-tabs": "~3.1.0",
48
48
  "react-test-renderer": "~17.0.1"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@apollo/client": "~3.5.0",
52
52
  "@magento/babel-preset-peregrine": "~1.3.3",
53
- "@magento/peregrine": "~15.5.2",
54
- "@magento/pwa-buildpack": "~11.5.4",
55
- "@magento/venia-ui": "~11.7.0",
53
+ "@magento/peregrine": "15.6.2-alpha11",
54
+ "@magento/pwa-buildpack": "11.5.5-alpha11",
55
+ "@magento/venia-ui": "11.7.1-alpha11",
56
56
  "jarallax": "~1.11.1",
57
57
  "load-google-maps-api": "~2.0.1",
58
58
  "lodash.escape": "~4.0.1",