@eeacms/volto-embed 10.1.2 → 10.1.4

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.
@@ -1,20 +1,28 @@
1
1
  import { ProtectionSchema } from './schema';
2
+ import { defineMessages } from 'react-intl';
2
3
 
3
- export const addPrivacyProtectionToSchema = (schema) => {
4
+ const messages = defineMessages({
5
+ dataProtection: {
6
+ id: 'dataProtection',
7
+ defaultMessage: 'Data Protection',
8
+ },
9
+ });
10
+
11
+ export const addPrivacyProtectionToSchema = (schema, intl) => {
4
12
  return {
5
13
  ...schema,
6
14
  fieldsets: [
7
15
  ...schema.fieldsets,
8
16
  {
9
17
  fields: ['dataprotection'],
10
- title: 'Data Protection',
18
+ title: intl.formatMessage(messages.dataProtection),
11
19
  },
12
20
  ],
13
21
  properties: {
14
22
  ...schema.properties,
15
23
  dataprotection: {
16
24
  widget: 'object',
17
- schema: ProtectionSchema(),
25
+ schema: ProtectionSchema(intl),
18
26
  },
19
27
  },
20
28
  };
@@ -1,4 +1,4 @@
1
- import React, { useMemo, useState, useEffect } from 'react';
1
+ import { useMemo, useState, useEffect } from 'react';
2
2
  import { useIntl, FormattedMessage, defineMessages } from 'react-intl';
3
3
  import { Icon } from '@plone/volto/components';
4
4
  import { Button, Modal, Grid, Label, Input, Message } from 'semantic-ui-react';
@@ -12,6 +12,7 @@ import { getBaseUrl } from '@plone/volto/helpers';
12
12
  import clearSVG from '@plone/volto/icons/clear.svg';
13
13
  import aheadSVG from '@plone/volto/icons/ahead.svg';
14
14
  import mapsBlockSVG from '@plone/volto/components/manage/Blocks/Maps/block-maps.svg';
15
+ import './style.less';
15
16
 
16
17
  const messages = defineMessages({
17
18
  MapsBlockInputPlaceholder: {
@@ -38,7 +39,7 @@ function MapEditorModal({ id, onClose, onChange, ...rest }) {
38
39
  const [error, setError] = useState(false);
39
40
 
40
41
  const schema = useMemo(
41
- () => addPrivacyProtectionToSchema(MapsSchema({ intl })),
42
+ () => addPrivacyProtectionToSchema(MapsSchema({ intl }), intl),
42
43
  [intl],
43
44
  );
44
45
 
@@ -93,7 +94,7 @@ function MapEditorModal({ id, onClose, onChange, ...rest }) {
93
94
  }
94
95
 
95
96
  return (
96
- <Modal open={true} size="fullscreen" className="chart-editor-modal">
97
+ <Modal open={true} className="editor-modal" size="fullscreen">
97
98
  <Modal.Content scrolling>
98
99
  <div className="block maps align center">
99
100
  {value.url && (
@@ -0,0 +1,3 @@
1
+ .editor-modal {
2
+ z-index: 150 !important;
3
+ }