@eeacms/volto-embed 5.0.0 → 5.0.2
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/.project.eslintrc.js +3 -1
- package/CHANGELOG.md +22 -1
- package/package.json +3 -3
- package/src/Iframe/EditIframe.jsx +4 -2
- package/src/Iframe/ViewIframe.jsx +4 -2
- package/src/Iframe/schema.js +39 -0
- package/src/PrivacyProtection/PrivacyProtection.jsx +8 -5
- package/src/Iframe/schema.jsx +0 -26
package/.project.eslintrc.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
2
|
const path = require('path');
|
|
3
3
|
|
|
4
|
-
const projectRootPath = fs.
|
|
4
|
+
const projectRootPath = fs.existsSync('./project')
|
|
5
|
+
? fs.realpathSync('./project')
|
|
6
|
+
: fs.realpathSync('./../../../');
|
|
5
7
|
const packageJson = require(path.join(projectRootPath, 'package.json'));
|
|
6
8
|
const jsConfig = require(path.join(projectRootPath, 'jsconfig.json')).compilerOptions;
|
|
7
9
|
|
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,23 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
-
### [5.0.
|
|
7
|
+
### [5.0.2](https://github.com/eea/volto-embed/compare/5.0.1...5.0.2) - 20 March 2023
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Update Jenkinsfile: Use latest volto version [kreafox - [`06ae06f`](https://github.com/eea/volto-embed/commit/06ae06f9903e5106c6baa8b925c6f15cc2b6fd59)]
|
|
12
|
+
- Fix height in condition [kreafox - [`b1e7538`](https://github.com/eea/volto-embed/commit/b1e7538458f9cfcbe92cff06895f193bce66ce93)]
|
|
13
|
+
- Add default height value [kreafox - [`03573ac`](https://github.com/eea/volto-embed/commit/03573ac0871895b05fe53af1d896423a13f3ed6f)]
|
|
14
|
+
- Add option of CSS height [kreafox - [`507df4f`](https://github.com/eea/volto-embed/commit/507df4fec24da8f7999faeabd98fb6ba779c97fa)]
|
|
15
|
+
### [5.0.1](https://github.com/eea/volto-embed/compare/5.0.0...5.0.1) - 25 January 2023
|
|
16
|
+
|
|
17
|
+
#### :hammer_and_wrench: Others
|
|
18
|
+
|
|
19
|
+
- update .project.eslintrc.js [Miu Razvan - [`628fd40`](https://github.com/eea/volto-embed/commit/628fd402b00d075ce319b9be92ff5f0e4d0ca2c4)]
|
|
20
|
+
- rename schema.jsx [Miu Razvan - [`62794e3`](https://github.com/eea/volto-embed/commit/62794e398eab5117132e5622cab735f6cf4f79fd)]
|
|
21
|
+
- improving code quality as per sonarqube reported issues [tedw87 - [`c7842f7`](https://github.com/eea/volto-embed/commit/c7842f7795f344e9d30538ddf2da04e97e319ebe)]
|
|
22
|
+
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`fe3a2de`](https://github.com/eea/volto-embed/commit/fe3a2de6180796c3d6b569733d2b9365a669c23e)]
|
|
23
|
+
## [5.0.0](https://github.com/eea/volto-embed/compare/4.0.4...5.0.0) - 31 October 2022
|
|
8
24
|
|
|
9
25
|
#### :hammer_and_wrench: Others
|
|
10
26
|
|
|
@@ -23,6 +39,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
23
39
|
|
|
24
40
|
- use specific alpha for addon test [andreiggr - [`e6df633`](https://github.com/eea/volto-embed/commit/e6df633aa4d2b0ee7eeb6b5aafa21528f14cd1df)]
|
|
25
41
|
- add optional height to privacy container [andreiggr - [`e2ac711`](https://github.com/eea/volto-embed/commit/e2ac711db4e461b474cade42109346a73bb8ecbd)]
|
|
42
|
+
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`9f3f358`](https://github.com/eea/volto-embed/commit/9f3f35882fb367d72c7916abe7cbf366dbd8d5b6)]
|
|
43
|
+
- Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`7677140`](https://github.com/eea/volto-embed/commit/767714006abf7cbe336c5ab00d76c7232d5bc798)]
|
|
26
44
|
### [4.0.2](https://github.com/eea/volto-embed/compare/4.0.1...4.0.2) - 15 July 2022
|
|
27
45
|
|
|
28
46
|
#### :hammer_and_wrench: Others
|
|
@@ -62,6 +80,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
62
80
|
|
|
63
81
|
- Update package.json [Nilesh - [`0ec673a`](https://github.com/eea/volto-embed/commit/0ec673a8178731b8c1e010101caee2a3c9fafaca)]
|
|
64
82
|
- Update package.json [Nilesh - [`b8b94ec`](https://github.com/eea/volto-embed/commit/b8b94ec64672229f464b9108b4ac01a848827c00)]
|
|
83
|
+
- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`cfe04d8`](https://github.com/eea/volto-embed/commit/cfe04d885255bb8e472a3b268b98e3d7b9022437)]
|
|
65
84
|
- Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`bf197dd`](https://github.com/eea/volto-embed/commit/bf197dd6516f9c18994add19b1141e061a96e2b6)]
|
|
66
85
|
- no hardcoded text [Daniela Mormocea - [`4001bb4`](https://github.com/eea/volto-embed/commit/4001bb414df05c1516f95e4dcec4a328406dc63f)]
|
|
67
86
|
- fix [Daniela Mormocea - [`a41ca9a`](https://github.com/eea/volto-embed/commit/a41ca9a2795a59f2633fb97938244e335dca8c43)]
|
|
@@ -135,6 +154,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
135
154
|
- revert use of custom bg image [nileshgulia1 - [`63a74b7`](https://github.com/eea/volto-embed/commit/63a74b7e671d85b602b0190c7a18e6d6ad71341b)]
|
|
136
155
|
- PrivacyProtection update & accept bg image [Andrei Grigore - [`f3f05d1`](https://github.com/eea/volto-embed/commit/f3f05d1d21fc88b90de3f68a995242b6c359e03a)]
|
|
137
156
|
- fix loading of cookies [nileshgulia1 - [`46348d8`](https://github.com/eea/volto-embed/commit/46348d8321b4633a3d5fdcbfb2c4f01912d7ed2a)]
|
|
157
|
+
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`a1e1f50`](https://github.com/eea/volto-embed/commit/a1e1f50db8a1ebc11261c3a24c39687c00ca7eea)]
|
|
158
|
+
- Add Sonarqube tag using frontend addons list [EEA Jenkins - [`1e1471e`](https://github.com/eea/volto-embed/commit/1e1471ebab5ba6e5bf0c231ddd0de94d8fe6c846)]
|
|
138
159
|
### [2.0.1](https://github.com/eea/volto-embed/compare/2.0.0...2.0.1) - 28 May 2021
|
|
139
160
|
|
|
140
161
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-embed",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "Embed external content",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"@eeacms/volto-datablocks"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@eeacms/volto-datablocks": "*",
|
|
23
22
|
"@eeacms/volto-corsproxy": "*",
|
|
23
|
+
"@eeacms/volto-datablocks": "*",
|
|
24
24
|
"react-visibility-sensor": "5.1.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@plone/scripts": "*",
|
|
28
27
|
"@cypress/code-coverage": "^3.10.0",
|
|
28
|
+
"@plone/scripts": "*",
|
|
29
29
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
30
30
|
"md5": "^2.3.0"
|
|
31
31
|
},
|
|
@@ -16,8 +16,10 @@ import clearSVG from '@plone/volto/icons/clear.svg';
|
|
|
16
16
|
import aheadSVG from '@plone/volto/icons/ahead.svg';
|
|
17
17
|
import mapsBlockSVG from '@plone/volto/components/manage/Blocks/Maps/block-maps.svg';
|
|
18
18
|
import schema from './schema';
|
|
19
|
-
import {
|
|
20
|
-
|
|
19
|
+
import {
|
|
20
|
+
PrivacyProtection,
|
|
21
|
+
addPrivacyProtectionToSchema,
|
|
22
|
+
} from '../PrivacyProtection';
|
|
21
23
|
|
|
22
24
|
const messages = defineMessages({
|
|
23
25
|
MapsBlockInputPlaceholder: {
|
|
@@ -33,7 +33,9 @@ const View = ({ data, intl, id }) => {
|
|
|
33
33
|
data.align,
|
|
34
34
|
)}
|
|
35
35
|
style={
|
|
36
|
-
data.align === 'full'
|
|
36
|
+
data.align === 'full'
|
|
37
|
+
? { position: 'static', height: data.height }
|
|
38
|
+
: { height: data.height }
|
|
37
39
|
}
|
|
38
40
|
>
|
|
39
41
|
<div
|
|
@@ -49,7 +51,7 @@ const View = ({ data, intl, id }) => {
|
|
|
49
51
|
className="google-map"
|
|
50
52
|
frameBorder="0"
|
|
51
53
|
allowFullScreen
|
|
52
|
-
style={{ height:
|
|
54
|
+
style={{ height: data.height }}
|
|
53
55
|
/>
|
|
54
56
|
</PrivacyProtection>
|
|
55
57
|
</div>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const schema = {
|
|
2
|
+
title: 'Embed external content',
|
|
3
|
+
|
|
4
|
+
fieldsets: [
|
|
5
|
+
{
|
|
6
|
+
id: 'default',
|
|
7
|
+
title: 'Default',
|
|
8
|
+
fields: ['url', 'align', 'height'],
|
|
9
|
+
},
|
|
10
|
+
],
|
|
11
|
+
|
|
12
|
+
properties: {
|
|
13
|
+
url: {
|
|
14
|
+
title: 'Embed URL',
|
|
15
|
+
},
|
|
16
|
+
align: {
|
|
17
|
+
title: 'Alignment',
|
|
18
|
+
widget: 'align',
|
|
19
|
+
type: 'string',
|
|
20
|
+
},
|
|
21
|
+
height: {
|
|
22
|
+
title: (
|
|
23
|
+
<a
|
|
24
|
+
rel="noreferrer"
|
|
25
|
+
target="_blank"
|
|
26
|
+
href="https://developer.mozilla.org/en-US/docs/Web/CSS/height"
|
|
27
|
+
>
|
|
28
|
+
CSS height
|
|
29
|
+
</a>
|
|
30
|
+
),
|
|
31
|
+
default: '45vh',
|
|
32
|
+
description: 'Iframe height',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
required: ['url'],
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default schema;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { compose } from 'redux';
|
|
3
|
-
import { useSelector } from 'react-redux';
|
|
3
|
+
import { useSelector, useDispatch } from 'react-redux';
|
|
4
4
|
import VisibilitySensor from 'react-visibility-sensor';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
Placeholder,
|
|
7
|
+
Dimmer,
|
|
8
|
+
Loader,
|
|
9
|
+
Button,
|
|
10
|
+
Checkbox,
|
|
11
|
+
} from 'semantic-ui-react';
|
|
6
12
|
import { withCookies } from 'react-cookie';
|
|
7
|
-
//import { find, without } from 'lodash';
|
|
8
13
|
import { serializeNodes } from '@plone/volto-slate/editor/render';
|
|
9
|
-
import { Button, Checkbox } from 'semantic-ui-react';
|
|
10
14
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
11
|
-
import { useDispatch } from 'react-redux';
|
|
12
15
|
import { toast } from 'react-toastify';
|
|
13
16
|
import config from '@plone/volto/registry';
|
|
14
17
|
import { getBaseUrl } from '@plone/volto/helpers';
|
package/src/Iframe/schema.jsx
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const IframeSchema = {
|
|
2
|
-
title: 'Embed external content',
|
|
3
|
-
|
|
4
|
-
fieldsets: [
|
|
5
|
-
{
|
|
6
|
-
id: 'default',
|
|
7
|
-
title: 'Default',
|
|
8
|
-
fields: ['url', 'align'],
|
|
9
|
-
},
|
|
10
|
-
],
|
|
11
|
-
|
|
12
|
-
properties: {
|
|
13
|
-
url: {
|
|
14
|
-
title: 'Embed URL',
|
|
15
|
-
},
|
|
16
|
-
align: {
|
|
17
|
-
title: 'Alignment',
|
|
18
|
-
widget: 'align',
|
|
19
|
-
type: 'string',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
required: ['url'],
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export default IframeSchema;
|