@eeacms/volto-embed 2.0.9 → 2.0.10

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,10 +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
+ #### [2.0.10](https://github.com/eea/volto-embed/compare/2.0.9...2.0.10)
8
+
9
+ - improve arcgis map view [`#14`](https://github.com/eea/volto-embed/pull/14)
10
+ - no hardcoded text [`4001bb4`](https://github.com/eea/volto-embed/commit/4001bb414df05c1516f95e4dcec4a328406dc63f)
11
+ - fix [`a41ca9a`](https://github.com/eea/volto-embed/commit/a41ca9a2795a59f2633fb97938244e335dca8c43)
12
+ - Update package.json [`a95b014`](https://github.com/eea/volto-embed/commit/a95b014a26651e11224b2f6531add7a599812d2a)
13
+
7
14
  #### [2.0.9](https://github.com/eea/volto-embed/compare/2.0.8...2.0.9)
8
15
 
9
- - Update package.json [`6e7344d`](https://github.com/eea/volto-embed/commit/6e7344d2bb9ce89de68cd4d1044a665814ad3b54)
10
- - Update package.json [`e618b5d`](https://github.com/eea/volto-embed/commit/e618b5db3f564f67563c0b7cd9aa5a3200ae1734)
16
+ > 11 November 2021
17
+
18
+ - Update package.json [`#13`](https://github.com/eea/volto-embed/pull/13)
11
19
 
12
20
  #### [2.0.8](https://github.com/eea/volto-embed/compare/2.0.7...2.0.8)
13
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-embed",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "description": "Embed external content",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -20,7 +20,7 @@
20
20
  "volto-slate"
21
21
  ],
22
22
  "dependencies": {
23
- "volto-slate": "*",
23
+ "volto-slate": "4.2.1",
24
24
  "@eeacms/volto-datablocks": "*",
25
25
  "@eeacms/volto-corsproxy": "*",
26
26
  "react-visibility-sensor": "5.1.1"
@@ -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) => {
@@ -111,7 +114,6 @@ export default injectIntl(
111
114
  height: `${height}px`,
112
115
  position: 'relative',
113
116
  };
114
-
115
117
  React.useEffect(() => {
116
118
  if (bgImg) {
117
119
  setImage(createImageUrl(bgImg)); //create imageUrl from uploaded image
@@ -180,17 +182,14 @@ export default injectIntl(
180
182
  ? {
181
183
  backgroundImage: `url(${image})`,
182
184
  backgroundRepeat: 'no-repeat',
183
- backgroundPosition: 'center',
184
185
  backgroundSize: 'cover',
186
+ backgroundPosition: 'center -70px',
185
187
  }
186
188
  : {}
187
189
  }
188
190
  >
189
191
  <div className="overlay">
190
192
  <div className="wrapped">
191
- <div className="privacy-statement">
192
- {serializeNodes(dataprotection.privacy_statement || [])}
193
- </div>
194
193
  <div className="privacy-button">
195
194
  <Button
196
195
  primary
@@ -224,6 +223,13 @@ export default injectIntl(
224
223
  {config.settings.ownDomain || '.eea.europa.eu'} that will
225
224
  expire in {getExpDays()} days.
226
225
  </p>
226
+ <p className="discreet">
227
+ {serializeNodes(
228
+ dataprotection.privacy_statement ||
229
+ ProtectionSchema().properties.privacy_statement
230
+ .defaultValue,
231
+ )}
232
+ </p>
227
233
  </div>
228
234
  </div>
229
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',
@@ -24,12 +24,13 @@
24
24
  margin: 0 auto;
25
25
  background: white;
26
26
  border-radius: 5px;
27
- opacity: 0.6;
27
+ opacity: 0.8;
28
28
  -ms-transform: translate(-50%, -50%);
29
29
  transform: translate(-50%, -50%);
30
30
  }
31
31
 
32
- .discreet {
32
+ .discreet,
33
+ .discreet > p {
33
34
  color: grey;
34
35
  font-size: 14px;
35
36
  }