@eeacms/volto-embed 4.0.0 → 4.0.1
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 -1
- package/Jenkinsfile +2 -2
- package/package.json +1 -1
- package/src/PrivacyProtection/PrivacyProtection.jsx +4 -22
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,18 @@ 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
|
-
#### [4.0.
|
|
7
|
+
#### [4.0.1](https://github.com/eea/volto-embed/compare/4.0.0...4.0.1)
|
|
8
8
|
|
|
9
|
+
- dedupe getFiltered method, use from datablocks [`7f7b1b5`](https://github.com/eea/volto-embed/commit/7f7b1b51b280edc856e19d6b02a37f3f8894bd04)
|
|
10
|
+
- fix regex [`1dc059f`](https://github.com/eea/volto-embed/commit/1dc059fa58f7a1789e4b570d1631226b404fa805)
|
|
11
|
+
- early return [`467e6fc`](https://github.com/eea/volto-embed/commit/467e6fc2c053d2e17526ad6fb4cbf34c2bb8abe1)
|
|
12
|
+
- safari: don't use lookbehind [`a4e4ece`](https://github.com/eea/volto-embed/commit/a4e4ece2891a5e2bcbf7f47a4345d0adca5258e6)
|
|
13
|
+
|
|
14
|
+
### [4.0.0](https://github.com/eea/volto-embed/compare/3.0.1...4.0.0)
|
|
15
|
+
|
|
16
|
+
> 5 April 2022
|
|
17
|
+
|
|
18
|
+
- Breaking. Volto 15.x compatibility [`#22`](https://github.com/eea/volto-embed/pull/22)
|
|
9
19
|
- Prettier [`fffa1c9`](https://github.com/eea/volto-embed/commit/fffa1c9f42c9dacc7de1fed730e0a4494c04d2f8)
|
|
10
20
|
- Prettier [`f9ca05d`](https://github.com/eea/volto-embed/commit/f9ca05d3c55d204080f8769bd7d556b4d8f0ce21)
|
|
11
21
|
- Breaking changes. Bumped to version 4.0.0 [`eb78abf`](https://github.com/eea/volto-embed/commit/eb78abf98103ee8831814b3df4c441279c586da2)
|
package/Jenkinsfile
CHANGED
|
@@ -184,10 +184,10 @@ pipeline {
|
|
|
184
184
|
unstash "xunit-reports"
|
|
185
185
|
unstash "cypress-coverage"
|
|
186
186
|
def scannerHome = tool 'SonarQubeScanner';
|
|
187
|
-
def nodeJS = tool '
|
|
187
|
+
def nodeJS = tool 'NodeJS';
|
|
188
188
|
withSonarQubeEnv('Sonarqube') {
|
|
189
189
|
sh '''sed -i "s#/opt/frontend/my-volto-project/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
|
|
190
|
-
sh "export PATH=$
|
|
190
|
+
sh "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
|
|
191
191
|
sh '''try=2; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}-${BRANCH_NAME}&tags=${SONARQUBE_TAGS},${BRANCH_NAME}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 60; try=\$(( \$try - 1 )); fi; done'''
|
|
192
192
|
}
|
|
193
193
|
}
|
package/package.json
CHANGED
|
@@ -13,7 +13,10 @@ import { toast } from 'react-toastify';
|
|
|
13
13
|
import config from '@plone/volto/registry';
|
|
14
14
|
import { getBaseUrl } from '@plone/volto/helpers';
|
|
15
15
|
import { Toast } from '@plone/volto/components';
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
getConnectedDataParametersForContext,
|
|
18
|
+
getFilteredURL,
|
|
19
|
+
} from '@eeacms/volto-datablocks/helpers';
|
|
17
20
|
|
|
18
21
|
import { createImageUrl } from './helpers';
|
|
19
22
|
import { ProtectionSchema } from './schema';
|
|
@@ -69,27 +72,6 @@ const CookieWatcher = (domain_key, cookies, pollingRate = 250) => {
|
|
|
69
72
|
return exist;
|
|
70
73
|
};
|
|
71
74
|
|
|
72
|
-
const getFilteredURL = (url, connected_data_parameters = []) => {
|
|
73
|
-
if (!connected_data_parameters?.length) return url;
|
|
74
|
-
let decodedURL = decodeURIComponent(url);
|
|
75
|
-
const queries = decodedURL.match(/(?<=(<<))(.*?)(?=(>>))/g);
|
|
76
|
-
if (!queries?.length) return url;
|
|
77
|
-
const keys = connected_data_parameters.map((param) => param.i);
|
|
78
|
-
for (let poz in queries) {
|
|
79
|
-
const key = queries[poz];
|
|
80
|
-
const paramPoz = keys.indexOf(key);
|
|
81
|
-
if (paramPoz > -1) {
|
|
82
|
-
decodedURL = decodedURL.replace(
|
|
83
|
-
`<<${key}>>`,
|
|
84
|
-
connected_data_parameters[paramPoz].v[0],
|
|
85
|
-
);
|
|
86
|
-
|
|
87
|
-
continue;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
return decodedURL;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
75
|
const PrivacyProtection = (props) => {
|
|
94
76
|
const { children, data = {}, id, editable, intl, path, cookies } = props;
|
|
95
77
|
const {
|