@eeacms/volto-embed 2.0.7 → 2.0.11

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 CHANGED
@@ -4,9 +4,45 @@ 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
- #### [2.0.7](https://github.com/eea/volto-embed/compare/2.0.6...2.0.7)
7
+ #### [2.0.11](https://github.com/eea/volto-embed/compare/2.0.10...2.0.11)
8
+
9
+ - add cy tests [`#16`](https://github.com/eea/volto-embed/pull/16)
10
+ - improve arcgis map view [`#14`](https://github.com/eea/volto-embed/pull/14)
11
+ - Update package.json [`0ec673a`](https://github.com/eea/volto-embed/commit/0ec673a8178731b8c1e010101caee2a3c9fafaca)
12
+ - Update package.json [`b8b94ec`](https://github.com/eea/volto-embed/commit/b8b94ec64672229f464b9108b4ac01a848827c00)
13
+ - Refs #142010 - Optimize Volto-addons gitflow pipelines [`bf197dd`](https://github.com/eea/volto-embed/commit/bf197dd6516f9c18994add19b1141e061a96e2b6)
14
+ - no hardcoded text [`4001bb4`](https://github.com/eea/volto-embed/commit/4001bb414df05c1516f95e4dcec4a328406dc63f)
15
+ - fix [`a41ca9a`](https://github.com/eea/volto-embed/commit/a41ca9a2795a59f2633fb97938244e335dca8c43)
16
+ - Update package.json [`a95b014`](https://github.com/eea/volto-embed/commit/a95b014a26651e11224b2f6531add7a599812d2a)
17
+
18
+ #### [2.0.10](https://github.com/eea/volto-embed/compare/2.0.9...2.0.10)
19
+
20
+ > 23 November 2021
21
+
22
+ - Develop [`#15`](https://github.com/eea/volto-embed/pull/15)
23
+
24
+ #### [2.0.9](https://github.com/eea/volto-embed/compare/2.0.8...2.0.9)
25
+
26
+ > 11 November 2021
8
27
 
28
+ - Update package.json [`#13`](https://github.com/eea/volto-embed/pull/13)
29
+
30
+ #### [2.0.8](https://github.com/eea/volto-embed/compare/2.0.7...2.0.8)
31
+
32
+ > 28 October 2021
33
+
34
+ - Develop [`#12`](https://github.com/eea/volto-embed/pull/12)
35
+ - Style [`#11`](https://github.com/eea/volto-embed/pull/11)
9
36
  - encode url to have the right country screenshot [`#9`](https://github.com/eea/volto-embed/pull/9)
37
+ - correctly center center page [`cb47367`](https://github.com/eea/volto-embed/commit/cb47367aa3a4ab87c5e0bacde93d7cc27fca7723)
38
+ - style [`878f9ad`](https://github.com/eea/volto-embed/commit/878f9adadc4cee17cd63a89144d3d702222cf08a)
39
+ - style privacy div in center of map [`cf05b57`](https://github.com/eea/volto-embed/commit/cf05b570fc5ffbcc79e3c75587fe4ce46c75fe15)
40
+
41
+ #### [2.0.7](https://github.com/eea/volto-embed/compare/2.0.6...2.0.7)
42
+
43
+ > 13 October 2021
44
+
45
+ - Develop sync [`#10`](https://github.com/eea/volto-embed/pull/10)
10
46
 
11
47
  #### [2.0.6](https://github.com/eea/volto-embed/compare/2.0.5...2.0.6)
12
48
 
package/Jenkinsfile CHANGED
@@ -4,13 +4,37 @@ pipeline {
4
4
  environment {
5
5
  GIT_NAME = "volto-embed"
6
6
  NAMESPACE = "@eeacms"
7
- SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,forest.eea.europa.eu"
7
+ SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,forest.eea.europa.eu,water.europa.eu-freshwater"
8
8
  DEPENDENCIES = "volto-slate"
9
9
  }
10
10
 
11
11
  stages {
12
12
 
13
+ stage('Release') {
14
+ when {
15
+ allOf {
16
+ environment name: 'CHANGE_ID', value: ''
17
+ branch 'master'
18
+ }
19
+ }
20
+ steps {
21
+ node(label: 'docker') {
22
+ withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),string(credentialsId: 'eea-jenkins-npm-token', variable: 'NPM_TOKEN')]) {
23
+ sh '''docker pull eeacms/gitflow'''
24
+ sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e NPM_TOKEN="$NPM_TOKEN" -e LANGUAGE=javascript eeacms/gitflow'''
25
+ }
26
+ }
27
+ }
28
+ }
29
+
13
30
  stage('Code') {
31
+ when {
32
+ allOf {
33
+ environment name: 'CHANGE_ID', value: ''
34
+ not { changelog '.*^Automated release [0-9\\.]+$' }
35
+ not { branch 'master' }
36
+ }
37
+ }
14
38
  steps {
15
39
  parallel(
16
40
 
@@ -36,6 +60,15 @@ pipeline {
36
60
  }
37
61
 
38
62
  stage('Tests') {
63
+ when {
64
+ allOf {
65
+ environment name: 'CHANGE_ID', value: ''
66
+ anyOf {
67
+ not { changelog '.*^Automated release [0-9\\.]+$' }
68
+ branch 'master'
69
+ }
70
+ }
71
+ }
39
72
  steps {
40
73
  parallel(
41
74
 
@@ -75,6 +108,15 @@ pipeline {
75
108
  }
76
109
 
77
110
  stage('Integration tests') {
111
+ when {
112
+ allOf {
113
+ environment name: 'CHANGE_ID', value: ''
114
+ anyOf {
115
+ not { changelog '.*^Automated release [0-9\\.]+$' }
116
+ branch 'master'
117
+ }
118
+ }
119
+ }
78
120
  steps {
79
121
  parallel(
80
122
 
@@ -82,7 +124,7 @@ pipeline {
82
124
  node(label: 'docker') {
83
125
  script {
84
126
  try {
85
- sh '''docker pull plone; docker run -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="profile-plone.restapi:blocks" plone fg'''
127
+ sh '''docker pull plone; docker run -d --rm --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="profile-plone.restapi:blocks" plone fg'''
86
128
  sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" plone/volto-addon-ci cypress'''
87
129
  } finally {
88
130
  try {
@@ -100,7 +142,8 @@ pipeline {
100
142
  reportName: 'CypressCoverage',
101
143
  reportTitles: 'Integration Tests Code Coverage'])
102
144
  }
103
- archiveArtifacts artifacts: 'cypress-reports/videos/*.mp4', fingerprint: true
145
+ sh '''touch empty_file; for ok_test in $(grep -E 'file=.*failures="0"' $(grep 'testsuites .*failures="0"' $(find cypress-results -name *.xml) empty_file | awk -F: '{print $1}') empty_file | sed 's/.* file="\\(.*\\)" time.*/\\1/' | sed 's#^cypress/integration/##g' | sed 's#^../../../node_modules/@eeacms/##g'); do rm -f cypress-reports/videos/$ok_test.mp4; rm -f cypress-reports/$ok_test.mp4; done'''
146
+ archiveArtifacts artifacts: 'cypress-reports/**/*.mp4', fingerprint: true, allowEmptyArchive: true
104
147
  stash name: "cypress-coverage", includes: "cypress-coverage/**", allowEmpty: true
105
148
  }
106
149
  finally {
@@ -122,10 +165,16 @@ pipeline {
122
165
  }
123
166
 
124
167
  stage('Report to SonarQube') {
125
- // Exclude Pull-Requests
126
168
  when {
127
169
  allOf {
128
170
  environment name: 'CHANGE_ID', value: ''
171
+ anyOf {
172
+ branch 'master'
173
+ allOf {
174
+ branch 'develop'
175
+ not { changelog '.*^Automated release [0-9\\.]+$' }
176
+ }
177
+ }
129
178
  }
130
179
  }
131
180
  steps {
@@ -156,8 +205,8 @@ pipeline {
156
205
  steps {
157
206
  node(label: 'docker') {
158
207
  script {
159
- if ( env.CHANGE_BRANCH != "develop" && !( env.CHANGE_BRANCH.startsWith("hotfix")) ) {
160
- error "Pipeline aborted due to PR not made from develop or hotfix branch"
208
+ if ( env.CHANGE_BRANCH != "develop" ) {
209
+ error "Pipeline aborted due to PR not made from develop branch"
161
210
  }
162
211
  withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN')]) {
163
212
  sh '''docker pull eeacms/gitflow'''
@@ -168,23 +217,6 @@ pipeline {
168
217
  }
169
218
  }
170
219
 
171
- stage('Release') {
172
- when {
173
- allOf {
174
- environment name: 'CHANGE_ID', value: ''
175
- branch 'master'
176
- }
177
- }
178
- steps {
179
- node(label: 'docker') {
180
- withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),string(credentialsId: 'eea-jenkins-npm-token', variable: 'NPM_TOKEN')]) {
181
- sh '''docker pull eeacms/gitflow'''
182
- sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e NPM_TOKEN="$NPM_TOKEN" -e LANGUAGE=javascript eeacms/gitflow'''
183
- }
184
- }
185
- }
186
- }
187
-
188
220
  }
189
221
 
190
222
  post {
package/README.md CHANGED
@@ -1,7 +1,18 @@
1
1
  # volto-embed
2
+
2
3
  [![Releases](https://img.shields.io/github/v/release/eea/volto-embed)](https://github.com/eea/volto-embed/releases)
4
+
3
5
  [![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto-addons%2Fvolto-embed%2Fmaster&subject=master)](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-embed/job/master/display/redirect)
6
+ [![Lines of Code](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed-master&metric=ncloc)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed-master)
7
+ [![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed-master&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed-master)
8
+ [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed-master&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed-master)
9
+ [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed-master&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed-master)
10
+
4
11
  [![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto-addons%2Fvolto-embed%2Fdevelop&subject=develop)](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-embed/job/develop/display/redirect)
12
+ [![Lines of Code](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed-develop&metric=ncloc)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed-develop)
13
+ [![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed-develop&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed-develop)
14
+ [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed-develop&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed-develop)
15
+ [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed-develop&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed-develop)
5
16
 
6
17
  GDPR-compliant external resource embedding components for Volto.
7
18
 
@@ -51,6 +62,81 @@ See `src/Iframe/ViewIframe` for details on how to implement.
51
62
 
52
63
  1. Happy editing!
53
64
 
65
+ ## Release
66
+
67
+ ### Automatic release using Jenkins
68
+
69
+ * The automatic release is started by creating a [Pull Request](../../compare/master...develop) from `develop` to `master`. The pull request status checks correlated to the branch and PR Jenkins jobs need to be processed successfully. 1 review from a github user with rights is mandatory.
70
+ * It runs on every commit on `master` branch, which is protected from direct commits, only allowing pull request merge commits.
71
+ * The automatic release is done by [Jenkins](https://ci.eionet.europa.eu). The status of the release job can be seen both in the Readme.md badges and the green check/red cross/yellow circle near the last commit information. If you click on the icon, you will have the list of checks that were run. The `continuous-integration/jenkins/branch` link goes to the Jenkins job execution webpage.
72
+ * Automated release scripts are located in the `eeacms/gitflow` docker image, specifically [js-release.sh](https://github.com/eea/eea.docker.gitflow/blob/master/src/js-release.sh) script. It uses the `release-it` tool.
73
+ * As long as a PR request is open from develop to master, the PR Jenkins job will automatically re-create the CHANGELOG.md and package.json files to be production-ready.
74
+ * The version format must be MAJOR.MINOR.PATCH. By default, next release is set to next minor version (with patch 0).
75
+ * You can manually change the version in `package.json`. The new version must not be already present in the tags/releases of the repository, otherwise it will be automatically increased by the script. Any changes to the version will trigger a `CHANGELOG.md` re-generation.
76
+ * Automated commits and commits with [JENKINS] or [YARN] in the commit log are excluded from `CHANGELOG.md` file.
77
+
78
+ ### Manual release from the develop branch ( beta release )
79
+
80
+ #### Installation and configuration of release-it
81
+
82
+ You need to first install the [release-it](https://github.com/release-it/release-it) client.
83
+
84
+ ```
85
+ npm install -g release-it
86
+ ```
87
+
88
+ Release-it uses the configuration written in the [`.release-it.json`](./.release-it.json) file located in the root of the repository.
89
+
90
+ Release-it is a tool that automates 4 important steps in the release process:
91
+
92
+ 1. Version increase in `package.json` ( increased from the current version in `package.json`)
93
+ 2. `CHANGELOG.md` automatic generation from commit messages ( grouped by releases )
94
+ 3. GitHub release on the commit with the changelog and package.json modification on the develop branch
95
+ 4. NPM release ( by default it's disabled, but can be enabled in the configuration file )
96
+
97
+ To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
98
+
99
+ ```
100
+ export GITHUB_TOKEN=XXX-XXXXXXXXXXXXXXXXXXXXXX
101
+ ```
102
+
103
+ To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN :
104
+
105
+ ```
106
+ echo "//registry.npmjs.org/:_authToken=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" > .npmrc
107
+ ```
108
+
109
+ #### Using release-it tool
110
+
111
+ There are 3 yarn scripts that can be run to do the release
112
+
113
+ ##### yarn release-beta
114
+
115
+ Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
116
+
117
+ ```
118
+ ? Select increment (next version):
119
+ ❯ prepatch (0.1.1-beta.0)
120
+ preminor (0.2.0-beta.0)
121
+ premajor (1.0.0-beta.0)
122
+ Other, please specify...
123
+ ```
124
+
125
+ ##### yarn release-major-beta
126
+
127
+ Same as `yarn release-beta`, but with premajor version pre-selected.
128
+
129
+ ##### yarn release
130
+
131
+ Generic command, does not automatically add the `beta` to version, but you can still manually write it if you choose Other.
132
+
133
+ #### Important notes
134
+
135
+ > Do not use release-it tool on master branch, the commit on CHANGELOG.md file and the version increase in the package.json file can't be done without a PULL REQUEST.
136
+
137
+ > Do not keep Pull Requests from develop to master branches open when you are doing beta releases from the develop branch. As long as a PR to master is open, an automatic script will run on every commit and will update both the version and the changelog to a production-ready state - ( MAJOR.MINOR.PATCH mandatory format for version).
138
+
139
+
54
140
  ## How to contribute
55
141
 
56
142
  See [DEVELOP.md](https://github.com/eea/volto-embed/blob/master/DEVELOP.md).
Binary file
@@ -1,6 +1,7 @@
1
1
  import { setupBeforeEach, tearDownAfterEach } from '../support';
2
2
  import { changePageTitle, addBlock, selectBlock } from '../helpers';
3
3
  import { openSidebarTab } from '../helpers';
4
+ import 'cypress-file-upload';
4
5
 
5
6
  const group = {
6
7
  title: 'Common',
@@ -22,6 +23,32 @@ describe('Blocks Tests', () => {
22
23
  cy.get('#sidebar-properties header > h2')
23
24
  .first()
24
25
  .contains('Embed external content');
25
- });
26
+
27
+ cy.get('.field-wrapper-privacy_statement-0-dataprotection p').first().clear().type('Test text for privacy protection');
28
+ cy.get('.field-wrapper-privacy_cookie_key-1-dataprotection');
29
+ cy.get('.field-wrapper-enabled-2-dataprotection .checkbox').click();
30
+
31
+ const imageFile = 'cat.jpg';
32
+ cy.get('.field-wrapper-background_image-3-dataprotection .dropzone-placeholder').attachFile(imageFile);
33
+ const embed_url = "<div class=\"mapouter\"><div class=\"gmap_canvas\"><iframe width=\"600\" height=\"500\" id=\"gmap_canvas\" src=\"https://maps.google.com/maps?q=2880%20Broadway,%20New%20York&t=&z=13&ie=UTF8&iwloc=&output=embed\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\"></iframe><a href=\"https://www.embedgooglemap.net/blog/divi-discount-code-elegant-themes-coupon/\"></a><br></div></div>";
34
+ cy.get('.block.maps input').click().type(embed_url, { force: true })
35
+
36
+ cy.get('.block-editor-text').last().click();
37
+ cy.get('.block-add-button').first().click();
38
+ cy.get('.blocks-chooser .title').contains('Common').click();
39
+ cy.get('.ui.basic.icon.button.maps').contains('Maps').click();
40
+
41
+ cy.get('.align-widget.field-wrapper-align button').first().click();
42
+ cy.get('.block.maps input').last().click().type(embed_url, { force: true })
43
+ cy.get('.field-wrapper-background_image-3-dataprotection .dropzone-placeholder').attachFile(imageFile);
44
+
45
+
46
+ // Save
47
+ cy.get('#toolbar-save').click();
48
+ cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page');
49
+
50
+ // then the page view should contain our changes
51
+ cy.get('.ui.loader');
52
+ });
26
53
  });
27
54
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-embed",
3
- "version": "2.0.7",
3
+ "version": "2.0.11",
4
4
  "description": "Embed external content",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -17,12 +17,12 @@
17
17
  "addons": [
18
18
  "@eeacms/volto-corsproxy",
19
19
  "@eeacms/volto-datablocks",
20
- "volto-slate:asDefault"
20
+ "volto-slate"
21
21
  ],
22
22
  "dependencies": {
23
- "volto-slate": "2.9.1",
23
+ "volto-slate": "*",
24
24
  "@eeacms/volto-datablocks": "*",
25
- "@eeacms/volto-corsproxy": "2.1.2",
25
+ "@eeacms/volto-corsproxy": "*",
26
26
  "react-visibility-sensor": "5.1.1"
27
27
  },
28
28
  "devDependencies": {
@@ -31,6 +31,8 @@
31
31
  },
32
32
  "scripts": {
33
33
  "release": "release-it",
34
+ "release-major-beta": "release-it major --preRelease=beta",
35
+ "release-beta": "release-it --preRelease=beta",
34
36
  "bootstrap": "npm install -g ejs; npm link ejs; node bootstrap",
35
37
  "stylelint": "../../../node_modules/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'",
36
38
  "stylelint:overrides": "../../../node_modules/.bin/stylelint --syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides'",
@@ -17,6 +17,7 @@ import { createImageUrl } from './helpers';
17
17
  import { getBaseUrl } from '@plone/volto/helpers';
18
18
  import { Toast } from '@plone/volto/components';
19
19
  import { getConnectedDataParametersForContext } from '@eeacms/volto-datablocks/helpers';
20
+ import { ProtectionSchema } from './schema';
20
21
 
21
22
  const messages = defineMessages({
22
23
  success: {
@@ -85,7 +86,9 @@ export default injectIntl(
85
86
  const [visible, setVisibility] = useState(false);
86
87
  const defaultShow = canShow(dataprotection.privacy_cookie_key);
87
88
  const [show, setShow] = useState(defaultShow);
88
- const [remember, setRemember] = useState(defaultShow);
89
+ const [remember, setRemember] = useState(
90
+ cookieExist(dataprotection.privacy_cookie_key) ? defaultShow : true,
91
+ );
89
92
  const dispatch = useDispatch();
90
93
  const checkExistance = CookieWatcher(dataprotection.privacy_cookie_key);
91
94
  const queryParam = useSelector((state) => {
@@ -109,8 +112,8 @@ export default injectIntl(
109
112
 
110
113
  const styles = {
111
114
  height: `${height}px`,
115
+ position: 'relative',
112
116
  };
113
-
114
117
  React.useEffect(() => {
115
118
  if (bgImg) {
116
119
  setImage(createImageUrl(bgImg)); //create imageUrl from uploaded image
@@ -179,17 +182,14 @@ export default injectIntl(
179
182
  ? {
180
183
  backgroundImage: `url(${image})`,
181
184
  backgroundRepeat: 'no-repeat',
182
- backgroundPosition: 'center',
183
185
  backgroundSize: 'cover',
186
+ backgroundPosition: 'center -70px',
184
187
  }
185
188
  : {}
186
189
  }
187
190
  >
188
191
  <div className="overlay">
189
192
  <div className="wrapped">
190
- <div className="privacy-statement">
191
- {serializeNodes(dataprotection.privacy_statement || [])}
192
- </div>
193
193
  <div className="privacy-button">
194
194
  <Button
195
195
  primary
@@ -223,6 +223,13 @@ export default injectIntl(
223
223
  {config.settings.ownDomain || '.eea.europa.eu'} that will
224
224
  expire in {getExpDays()} days.
225
225
  </p>
226
+ <p className="discreet">
227
+ {serializeNodes(
228
+ dataprotection.privacy_statement ||
229
+ ProtectionSchema().properties.privacy_statement
230
+ .defaultValue,
231
+ )}
232
+ </p>
226
233
  </div>
227
234
  </div>
228
235
  </div>
@@ -20,6 +20,29 @@ export const ProtectionSchema = () => ({
20
20
  description: 'Defined in template. Change only if necessary',
21
21
  widget: 'slate_richtext',
22
22
  className: 'slate-Widget',
23
+ defaultValue: [
24
+ {
25
+ children: [
26
+ {
27
+ text:
28
+ 'This map is hosted by a third party, Environmental Systems Research Institute. By showing the external content you accept the terms and conditions of ',
29
+ },
30
+ {
31
+ type: 'a',
32
+ url: 'https://www.esri.com',
33
+ children: [
34
+ {
35
+ text: 'esri.com',
36
+ },
37
+ ],
38
+ },
39
+ {
40
+ text:
41
+ '. This includes their cookie policies, which we have no control over.',
42
+ },
43
+ ],
44
+ },
45
+ ],
23
46
  },
24
47
  privacy_cookie_key: {
25
48
  title: 'Privacy cookie key',
@@ -16,15 +16,21 @@
16
16
  }
17
17
 
18
18
  .wrapped {
19
+ position: absolute;
20
+ top: 50%;
21
+ left: 50%;
19
22
  width: 300px;
20
23
  padding: 1.4rem;
21
24
  margin: 0 auto;
22
25
  background: white;
23
26
  border-radius: 5px;
24
- opacity: 0.6;
27
+ opacity: 0.8;
28
+ -ms-transform: translate(-50%, -50%);
29
+ transform: translate(-50%, -50%);
25
30
  }
26
31
 
27
- .discreet {
32
+ .discreet,
33
+ .discreet > p {
28
34
  color: grey;
29
35
  font-size: 14px;
30
36
  }