@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.
- package/CHANGELOG.md +12 -18
- package/locales/de/LC_MESSAGES/volto.po +180 -34
- package/locales/en/LC_MESSAGES/volto.po +164 -18
- package/locales/it/LC_MESSAGES/volto.po +164 -18
- package/locales/ro/LC_MESSAGES/volto.po +164 -18
- package/locales/volto.pot +166 -20
- package/package.json +1 -1
- package/src/Blocks/EmbedMaps/View.jsx +13 -1
- package/src/Blocks/EmbedMaps/schema.js +87 -20
- package/src/Blocks/Maps/Edit.jsx +1 -0
- package/src/Blocks/Maps/MapsSidebar.jsx +4 -1
- package/src/Blocks/Maps/schema.js +5 -1
- package/src/PrivacyProtection/PrivacyProtection.jsx +1 -1
- package/src/PrivacyProtection/schema.js +69 -14
- package/src/PrivacyProtection/utils.js +11 -3
- package/src/Widgets/MapsWidget.jsx +4 -3
- package/src/Widgets/style.less +3 -0
package/locales/volto.pot
CHANGED
|
@@ -1,111 +1,257 @@
|
|
|
1
1
|
msgid ""
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Plone\n"
|
|
4
|
-
"POT-Creation-Date:
|
|
4
|
+
"POT-Creation-Date: 2025-01-08T13:34:41.757Z\n"
|
|
5
5
|
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
6
6
|
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
7
|
-
"MIME-Version: 1.0\n"
|
|
8
7
|
"Content-Type: text/plain; charset=utf-8\n"
|
|
9
8
|
"Content-Transfer-Encoding: 8bit\n"
|
|
10
9
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
10
|
+
"MIME-Version: 1.0\n"
|
|
11
11
|
"Language-Code: en\n"
|
|
12
12
|
"Language-Name: English\n"
|
|
13
13
|
"Preferred-Encodings: utf-8\n"
|
|
14
14
|
"Domain: volto\n"
|
|
15
15
|
|
|
16
|
+
#. Default: "Alignment"
|
|
16
17
|
#: Blocks/Maps/schema
|
|
17
|
-
# defaultMessage: Alignment
|
|
18
18
|
msgid "Alignment"
|
|
19
19
|
msgstr ""
|
|
20
20
|
|
|
21
|
+
#. Default: "Alt text"
|
|
21
22
|
#: Blocks/Maps/schema
|
|
22
|
-
# defaultMessage: Alt text
|
|
23
23
|
msgid "Alt text"
|
|
24
24
|
msgstr ""
|
|
25
25
|
|
|
26
|
+
#. Default: "CSS height"
|
|
26
27
|
#: Blocks/EmbedMaps/schema
|
|
27
28
|
#: Blocks/Maps/schema
|
|
28
|
-
# defaultMessage: CSS height
|
|
29
29
|
msgid "CSS height"
|
|
30
30
|
msgstr ""
|
|
31
31
|
|
|
32
|
+
#. Default: "Center"
|
|
32
33
|
#: Blocks/Maps/Edit
|
|
33
|
-
# defaultMessage: Center
|
|
34
34
|
msgid "Center"
|
|
35
35
|
msgstr ""
|
|
36
36
|
|
|
37
|
+
#. Default: "ESRI Maps Embedded Block"
|
|
37
38
|
#: Blocks/Maps/Edit
|
|
38
|
-
# defaultMessage: ESRI Maps Embedded Block
|
|
39
39
|
msgid "ESRI Maps Embedded Block"
|
|
40
40
|
msgstr ""
|
|
41
41
|
|
|
42
|
+
#. Default: "Embed code error, please follow the instructions and try again."
|
|
42
43
|
#: Blocks/Maps/Edit
|
|
43
44
|
#: Widgets/MapsWidget
|
|
44
|
-
# defaultMessage: Embed code error, please follow the instructions and try again.
|
|
45
45
|
msgid "Embed code error, please follow the instructions and try again."
|
|
46
46
|
msgstr ""
|
|
47
47
|
|
|
48
|
+
#. Default: "Embeded ESRI Maps"
|
|
48
49
|
#: Blocks/Maps/View
|
|
49
50
|
#: EmbedMap/EmbedMap
|
|
50
|
-
# defaultMessage: Embeded ESRI Maps
|
|
51
51
|
msgid "Embeded ESRI Maps"
|
|
52
52
|
msgstr ""
|
|
53
53
|
|
|
54
|
+
#. Default: "Enter map Embed Code"
|
|
54
55
|
#: Blocks/Maps/Edit
|
|
55
56
|
#: Widgets/MapsWidget
|
|
56
|
-
# defaultMessage: Enter map Embed Code
|
|
57
57
|
msgid "Enter map Embed Code"
|
|
58
58
|
msgstr ""
|
|
59
59
|
|
|
60
|
+
#. Default: "Full"
|
|
60
61
|
#: Blocks/Maps/Edit
|
|
61
|
-
# defaultMessage: Full
|
|
62
62
|
msgid "Full"
|
|
63
63
|
msgstr ""
|
|
64
64
|
|
|
65
|
+
#. Default: "Left"
|
|
65
66
|
#: Blocks/Maps/Edit
|
|
66
|
-
# defaultMessage: Left
|
|
67
67
|
msgid "Left"
|
|
68
68
|
msgstr ""
|
|
69
69
|
|
|
70
|
+
#. Default: "Live image generated"
|
|
70
71
|
#: PrivacyProtection/PrivacyProtection
|
|
71
|
-
# defaultMessage: Live image generated
|
|
72
72
|
msgid "Live image generated"
|
|
73
73
|
msgstr ""
|
|
74
74
|
|
|
75
|
+
#. Default: "Map height"
|
|
75
76
|
#: Blocks/EmbedMaps/schema
|
|
76
77
|
#: Blocks/Maps/schema
|
|
77
|
-
# defaultMessage: Map height
|
|
78
78
|
msgid "Map height"
|
|
79
79
|
msgstr ""
|
|
80
80
|
|
|
81
|
+
#. Default: "Maps"
|
|
81
82
|
#: Blocks/Maps/MapsSidebar
|
|
82
83
|
#: Blocks/Maps/schema
|
|
83
|
-
# defaultMessage: Maps
|
|
84
84
|
msgid "Maps"
|
|
85
85
|
msgstr ""
|
|
86
86
|
|
|
87
|
+
#. Default: "Maps URL"
|
|
87
88
|
#: Blocks/Maps/schema
|
|
88
|
-
# defaultMessage: Maps URL
|
|
89
89
|
msgid "Maps URL"
|
|
90
90
|
msgstr ""
|
|
91
91
|
|
|
92
|
+
#. Default: "No map selected"
|
|
92
93
|
#: Blocks/Maps/MapsSidebar
|
|
93
|
-
# defaultMessage: No map selected
|
|
94
94
|
msgid "No map selected"
|
|
95
95
|
msgstr ""
|
|
96
96
|
|
|
97
|
+
#. Default: "Please enter the embed code or URL for the ESRI webmap."
|
|
97
98
|
#: Blocks/Maps/Edit
|
|
98
99
|
#: Widgets/MapsWidget
|
|
99
|
-
# defaultMessage: Please enter the embed code or URL for the ESRI webmap.
|
|
100
100
|
msgid "Please enter the embed code or URL for the ESRI webmap."
|
|
101
101
|
msgstr ""
|
|
102
102
|
|
|
103
|
+
#. Default: "Right"
|
|
103
104
|
#: Blocks/Maps/Edit
|
|
104
|
-
# defaultMessage: Right
|
|
105
105
|
msgid "Right"
|
|
106
106
|
msgstr ""
|
|
107
107
|
|
|
108
|
+
#. Default: "Success"
|
|
108
109
|
#: PrivacyProtection/PrivacyProtection
|
|
109
|
-
# defaultMessage: Success
|
|
110
110
|
msgid "Success"
|
|
111
111
|
msgstr ""
|
|
112
|
+
|
|
113
|
+
#. Default: "Use screen height"
|
|
114
|
+
#: Blocks/Maps/schema
|
|
115
|
+
msgid "Use screen height"
|
|
116
|
+
msgstr ""
|
|
117
|
+
|
|
118
|
+
#. Default: "Background image"
|
|
119
|
+
#: PrivacyProtection/schema
|
|
120
|
+
msgid "backgroundImage"
|
|
121
|
+
msgstr ""
|
|
122
|
+
|
|
123
|
+
#. Default: "The component will automatically generate a static image as placeholder from the URL of the map defined. This image is refreshed on page edit. To override this, upload an image here"
|
|
124
|
+
#: PrivacyProtection/schema
|
|
125
|
+
msgid "backgroundImageDescription"
|
|
126
|
+
msgstr ""
|
|
127
|
+
|
|
128
|
+
#. Default: "CSS Height"
|
|
129
|
+
#: Blocks/EmbedMaps/schema
|
|
130
|
+
msgid "cssHeight"
|
|
131
|
+
msgstr ""
|
|
132
|
+
|
|
133
|
+
#. Default: "Set the height of the map component using CSS height values."
|
|
134
|
+
#: Blocks/EmbedMaps/schema
|
|
135
|
+
msgid "cssMapHeightDescription"
|
|
136
|
+
msgstr ""
|
|
137
|
+
|
|
138
|
+
#. Default: "Data Protection"
|
|
139
|
+
#: PrivacyProtection/schema
|
|
140
|
+
#: PrivacyProtection/utils
|
|
141
|
+
msgid "dataProtection"
|
|
142
|
+
msgstr ""
|
|
143
|
+
|
|
144
|
+
#. Default: "Embed interactive Map"
|
|
145
|
+
#: Blocks/EmbedMaps/schema
|
|
146
|
+
msgid "Embed interactive Map"
|
|
147
|
+
msgstr ""
|
|
148
|
+
|
|
149
|
+
#. Default: "Data protection disclaimer enabled"
|
|
150
|
+
#: PrivacyProtection/schema
|
|
151
|
+
msgid "enabled"
|
|
152
|
+
msgstr ""
|
|
153
|
+
|
|
154
|
+
#. Default: "Enable/disable the privacy protection"
|
|
155
|
+
#: PrivacyProtection/schema
|
|
156
|
+
msgid "enabledDescription"
|
|
157
|
+
msgstr ""
|
|
158
|
+
|
|
159
|
+
#. Default: "Default"
|
|
160
|
+
#: Blocks/EmbedMaps/schema
|
|
161
|
+
msgid "mapDefaultLabel"
|
|
162
|
+
msgstr ""
|
|
163
|
+
|
|
164
|
+
#. Default: "Please select a map from block editor."
|
|
165
|
+
#: Blocks/EmbedMaps/View
|
|
166
|
+
msgid "mapSelection"
|
|
167
|
+
msgstr ""
|
|
168
|
+
|
|
169
|
+
#. Default: "Map url"
|
|
170
|
+
#: Blocks/EmbedMaps/schema
|
|
171
|
+
msgid "mapUrl"
|
|
172
|
+
msgstr ""
|
|
173
|
+
|
|
174
|
+
#. Default: "Value"
|
|
175
|
+
#: Blocks/EmbedMaps/schema
|
|
176
|
+
msgid "mapValueLabel"
|
|
177
|
+
msgstr ""
|
|
178
|
+
|
|
179
|
+
#. Default: "Set a list of parameters."
|
|
180
|
+
#: Blocks/EmbedMaps/schema
|
|
181
|
+
msgid "parametersDescription"
|
|
182
|
+
msgstr ""
|
|
183
|
+
|
|
184
|
+
#. Default: "Parameters"
|
|
185
|
+
#: Blocks/EmbedMaps/schema
|
|
186
|
+
msgid "parametersTitle"
|
|
187
|
+
msgstr ""
|
|
188
|
+
|
|
189
|
+
#. Default: "Privacy cookie key"
|
|
190
|
+
#: PrivacyProtection/schema
|
|
191
|
+
msgid "privacyCookieKey"
|
|
192
|
+
msgstr ""
|
|
193
|
+
|
|
194
|
+
#. Default: "Use default for Esri maps, otherwise change"
|
|
195
|
+
#: PrivacyProtection/schema
|
|
196
|
+
msgid "privacyCookieKeyDescription"
|
|
197
|
+
msgstr ""
|
|
198
|
+
|
|
199
|
+
#. Default: "Privacy statement"
|
|
200
|
+
#: PrivacyProtection/schema
|
|
201
|
+
msgid "privacyStatement"
|
|
202
|
+
msgstr ""
|
|
203
|
+
|
|
204
|
+
#. Default: "Defined in template. Change only if necessary"
|
|
205
|
+
#: PrivacyProtection/schema
|
|
206
|
+
msgid "privacyStatementDescription"
|
|
207
|
+
msgstr ""
|
|
208
|
+
|
|
209
|
+
#. Default: "esri.com"
|
|
210
|
+
#: PrivacyProtection/schema
|
|
211
|
+
msgid "privacyStatementLink"
|
|
212
|
+
msgstr ""
|
|
213
|
+
|
|
214
|
+
#. Default: "This map is hosted by a third party, Environmental Systems Research Institute. By showing the external content you accept the terms and conditions of"
|
|
215
|
+
#: PrivacyProtection/schema
|
|
216
|
+
msgid "privacyStatementPart1"
|
|
217
|
+
msgstr ""
|
|
218
|
+
|
|
219
|
+
#. Default: ". This includes their cookie policies, which we have no control over."
|
|
220
|
+
#: PrivacyProtection/schema
|
|
221
|
+
msgid "privacyStatementPart2"
|
|
222
|
+
msgstr ""
|
|
223
|
+
|
|
224
|
+
#. Default: "Show enlarge button"
|
|
225
|
+
#: Blocks/EmbedMaps/schema
|
|
226
|
+
msgid "showEnlargeButton"
|
|
227
|
+
msgstr ""
|
|
228
|
+
|
|
229
|
+
#. Default: "Show more info"
|
|
230
|
+
#: Blocks/EmbedMaps/schema
|
|
231
|
+
msgid "showMoreInfo"
|
|
232
|
+
msgstr ""
|
|
233
|
+
|
|
234
|
+
#. Default: "Show note"
|
|
235
|
+
#: Blocks/EmbedMaps/schema
|
|
236
|
+
msgid "showNote"
|
|
237
|
+
msgstr ""
|
|
238
|
+
|
|
239
|
+
#. Default: "Show share button"
|
|
240
|
+
#: Blocks/EmbedMaps/schema
|
|
241
|
+
msgid "showShareButton"
|
|
242
|
+
msgstr ""
|
|
243
|
+
|
|
244
|
+
#. Default: "Show sources"
|
|
245
|
+
#: Blocks/EmbedMaps/schema
|
|
246
|
+
msgid "showSources"
|
|
247
|
+
msgstr ""
|
|
248
|
+
|
|
249
|
+
#. Default: "Will show sources set in this page Data provenance"
|
|
250
|
+
#: Blocks/EmbedMaps/schema
|
|
251
|
+
msgid "showSourcesDescription"
|
|
252
|
+
msgstr ""
|
|
253
|
+
|
|
254
|
+
#. Default: "Toolbar"
|
|
255
|
+
#: Blocks/EmbedMaps/schema
|
|
256
|
+
msgid "toolbar"
|
|
257
|
+
msgstr ""
|
package/package.json
CHANGED
|
@@ -6,6 +6,14 @@ import { getContent } from '@plone/volto/actions';
|
|
|
6
6
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
7
7
|
import EmbedMap from '@eeacms/volto-embed/EmbedMap/EmbedMap';
|
|
8
8
|
import { pickMetadata } from '@eeacms/volto-embed/helpers';
|
|
9
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
10
|
+
|
|
11
|
+
const messages = defineMessages({
|
|
12
|
+
interactiveMapSelection: {
|
|
13
|
+
id: 'mapSelection',
|
|
14
|
+
defaultMessage: 'Please select a map from block editor.',
|
|
15
|
+
},
|
|
16
|
+
});
|
|
9
17
|
|
|
10
18
|
let timer;
|
|
11
19
|
|
|
@@ -78,6 +86,8 @@ function View(props) {
|
|
|
78
86
|
getParameters({ parameters, data_query }),
|
|
79
87
|
);
|
|
80
88
|
|
|
89
|
+
const intl = useIntl();
|
|
90
|
+
|
|
81
91
|
useEffect(() => {
|
|
82
92
|
debounce(() => {
|
|
83
93
|
setQueryParams(
|
|
@@ -97,7 +107,9 @@ function View(props) {
|
|
|
97
107
|
}, [id, getContent, mode, url, maps]);
|
|
98
108
|
|
|
99
109
|
if (mode === 'edit' && !url) {
|
|
100
|
-
return
|
|
110
|
+
return (
|
|
111
|
+
<Message>{intl.formatMessage(messages.interactiveMapSelection)}</Message>
|
|
112
|
+
);
|
|
101
113
|
}
|
|
102
114
|
|
|
103
115
|
if (maps?.error) {
|
|
@@ -9,47 +9,114 @@ const messages = defineMessages({
|
|
|
9
9
|
id: 'Map height',
|
|
10
10
|
defaultMessage: 'Map height',
|
|
11
11
|
},
|
|
12
|
+
defaultLabel: {
|
|
13
|
+
id: 'mapDefaultLabel',
|
|
14
|
+
defaultMessage: 'Default',
|
|
15
|
+
},
|
|
16
|
+
valueLabel: {
|
|
17
|
+
id: 'mapValueLabel',
|
|
18
|
+
defaultMessage: 'Value',
|
|
19
|
+
},
|
|
20
|
+
embedInteractiveMap: {
|
|
21
|
+
id: 'embedInteractiveMap',
|
|
22
|
+
defaultMessage: 'Embed interactive Map',
|
|
23
|
+
},
|
|
24
|
+
toolbar: {
|
|
25
|
+
id: 'toolbar',
|
|
26
|
+
defaultMessage: 'Toolbar',
|
|
27
|
+
},
|
|
28
|
+
mapUrl: {
|
|
29
|
+
id: 'mapUrl',
|
|
30
|
+
defaultMessage: 'Map url',
|
|
31
|
+
},
|
|
32
|
+
cssHeight: {
|
|
33
|
+
id: 'cssHeight',
|
|
34
|
+
defaultMessage: 'CSS Height',
|
|
35
|
+
},
|
|
36
|
+
cssMapHeightDescription: {
|
|
37
|
+
id: 'cssMapHeightDescription',
|
|
38
|
+
defaultMessage:
|
|
39
|
+
'Set the height of the map component using CSS height values.',
|
|
40
|
+
},
|
|
41
|
+
showNote: {
|
|
42
|
+
id: 'showNote',
|
|
43
|
+
defaultMessage: 'Show note',
|
|
44
|
+
},
|
|
45
|
+
showSources: {
|
|
46
|
+
id: 'showSources',
|
|
47
|
+
defaultMessage: 'Show sources',
|
|
48
|
+
},
|
|
49
|
+
showSourcesDescription: {
|
|
50
|
+
id: 'showSourcesDescription',
|
|
51
|
+
defaultMessage: 'Will show sources set in this page Data provenance',
|
|
52
|
+
},
|
|
53
|
+
showMoreInfo: {
|
|
54
|
+
id: 'showMoreInfo',
|
|
55
|
+
defaultMessage: 'Show more info',
|
|
56
|
+
},
|
|
57
|
+
showEnlargeButton: {
|
|
58
|
+
id: 'showEnlargeButton',
|
|
59
|
+
defaultMessage: 'Show enlarge button',
|
|
60
|
+
},
|
|
61
|
+
showShareButton: {
|
|
62
|
+
id: 'showShareButton',
|
|
63
|
+
defaultMessage: 'Show share button',
|
|
64
|
+
},
|
|
65
|
+
parametersTitle: {
|
|
66
|
+
id: 'parametersTitle',
|
|
67
|
+
defaultMessage: 'Parameters',
|
|
68
|
+
},
|
|
69
|
+
parametersDescription: {
|
|
70
|
+
id: 'parametersDescription',
|
|
71
|
+
defaultMessage: 'Set a list of parameters.',
|
|
72
|
+
},
|
|
12
73
|
});
|
|
13
74
|
|
|
14
|
-
const parameters = {
|
|
75
|
+
const parameters = (intl) => ({
|
|
15
76
|
title: 'Parameter',
|
|
16
|
-
fieldsets: [
|
|
77
|
+
fieldsets: [
|
|
78
|
+
{
|
|
79
|
+
id: 'default',
|
|
80
|
+
title: intl.formatMessage(messages.defaultLabel),
|
|
81
|
+
fields: ['field', 'value'],
|
|
82
|
+
},
|
|
83
|
+
],
|
|
17
84
|
properties: {
|
|
18
85
|
field: {
|
|
19
86
|
title: 'Name',
|
|
20
87
|
type: 'text',
|
|
21
88
|
},
|
|
22
89
|
value: {
|
|
23
|
-
title:
|
|
90
|
+
title: intl.formatMessage(messages.valueLabel),
|
|
24
91
|
type: 'text',
|
|
25
92
|
},
|
|
26
93
|
},
|
|
27
94
|
required: [],
|
|
28
|
-
};
|
|
95
|
+
});
|
|
29
96
|
|
|
30
97
|
const getSchema = (props) => {
|
|
31
98
|
return {
|
|
32
|
-
title:
|
|
99
|
+
title: props.intl.formatMessage(messages.embedInteractiveMap),
|
|
33
100
|
fieldsets: [
|
|
34
101
|
{
|
|
35
102
|
id: 'default',
|
|
36
|
-
title:
|
|
103
|
+
title: props.intl.formatMessage(messages.defaultLabel),
|
|
37
104
|
fields: ['url', 'height'],
|
|
38
105
|
},
|
|
39
106
|
{
|
|
40
107
|
id: 'toolbar',
|
|
41
|
-
title:
|
|
108
|
+
title: props.intl.formatMessage(messages.toolbar),
|
|
42
109
|
fields: ['with_notes', 'with_more_info', 'with_share', 'with_enlarge'],
|
|
43
110
|
},
|
|
44
111
|
{
|
|
45
112
|
id: 'parameters',
|
|
46
|
-
title:
|
|
113
|
+
title: props.intl.formatMessage(messages.parametersTitle),
|
|
47
114
|
fields: ['parameters'],
|
|
48
115
|
},
|
|
49
116
|
],
|
|
50
117
|
properties: {
|
|
51
118
|
url: {
|
|
52
|
-
title:
|
|
119
|
+
title: props.intl.formatMessage(messages.mapUrl),
|
|
53
120
|
widget: 'internal_url',
|
|
54
121
|
},
|
|
55
122
|
height: {
|
|
@@ -59,42 +126,42 @@ const getSchema = (props) => {
|
|
|
59
126
|
target="_blank"
|
|
60
127
|
href="https://developer.mozilla.org/en-US/docs/Web/CSS/height"
|
|
61
128
|
>
|
|
62
|
-
{props.intl.formatMessage(messages.
|
|
129
|
+
{props.intl.formatMessage(messages.cssHeight)}
|
|
63
130
|
</a>
|
|
64
131
|
),
|
|
65
|
-
description: props.intl.formatMessage(messages.
|
|
132
|
+
description: props.intl.formatMessage(messages.cssMapHeightDescription),
|
|
66
133
|
},
|
|
67
134
|
with_notes: {
|
|
68
|
-
title:
|
|
135
|
+
title: props.intl.formatMessage(messages.showNote),
|
|
69
136
|
type: 'boolean',
|
|
70
137
|
defaultValue: true,
|
|
71
138
|
},
|
|
72
139
|
with_sources: {
|
|
73
|
-
title:
|
|
74
|
-
description:
|
|
140
|
+
title: props.intl.formatMessage(messages.showSources),
|
|
141
|
+
description: props.intl.formatMessage(messages.showSourcesDescription),
|
|
75
142
|
type: 'boolean',
|
|
76
143
|
defaultValue: true,
|
|
77
144
|
},
|
|
78
145
|
with_more_info: {
|
|
79
|
-
title:
|
|
146
|
+
title: props.intl.formatMessage(messages.showMoreInfo),
|
|
80
147
|
type: 'boolean',
|
|
81
148
|
defaultValue: true,
|
|
82
149
|
},
|
|
83
150
|
with_enlarge: {
|
|
84
|
-
title:
|
|
151
|
+
title: props.intl.formatMessage(messages.showEnlargeButton),
|
|
85
152
|
type: 'boolean',
|
|
86
153
|
defaultValue: true,
|
|
87
154
|
},
|
|
88
155
|
with_share: {
|
|
89
|
-
title:
|
|
156
|
+
title: props.intl.formatMessage(messages.showShareButton),
|
|
90
157
|
type: 'boolean',
|
|
91
158
|
defaultValue: true,
|
|
92
159
|
},
|
|
93
160
|
parameters: {
|
|
94
|
-
title:
|
|
161
|
+
title: props.intl.formatMessage(messages.parametersTitle),
|
|
95
162
|
widget: 'object_list',
|
|
96
|
-
schema: parameters,
|
|
97
|
-
description:
|
|
163
|
+
schema: parameters(props.intl),
|
|
164
|
+
description: props.intl.formatMessage(messages.parametersDescription),
|
|
98
165
|
},
|
|
99
166
|
},
|
|
100
167
|
|
package/src/Blocks/Maps/Edit.jsx
CHANGED
|
@@ -235,6 +235,7 @@ class Edit extends Component {
|
|
|
235
235
|
data={this.props.data}
|
|
236
236
|
editable={this.props.editable}
|
|
237
237
|
useVisibilitySensor={this.props.data.useVisibilitySensor ?? true}
|
|
238
|
+
height={this.props.data.height}
|
|
238
239
|
>
|
|
239
240
|
<iframe
|
|
240
241
|
title={this.props.intl.formatMessage(
|
|
@@ -20,7 +20,10 @@ const messages = defineMessages({
|
|
|
20
20
|
const MapsSidebar = (props) => {
|
|
21
21
|
const { data, block, onChangeBlock } = props;
|
|
22
22
|
const intl = useIntl();
|
|
23
|
-
const schema = addPrivacyProtectionToSchema(
|
|
23
|
+
const schema = addPrivacyProtectionToSchema(
|
|
24
|
+
MapsSchema({ ...props, intl }),
|
|
25
|
+
intl,
|
|
26
|
+
);
|
|
24
27
|
|
|
25
28
|
return (
|
|
26
29
|
<>
|
|
@@ -25,6 +25,10 @@ const messages = defineMessages({
|
|
|
25
25
|
id: 'Map height',
|
|
26
26
|
defaultMessage: 'Map height',
|
|
27
27
|
},
|
|
28
|
+
useScreenHeight: {
|
|
29
|
+
id: 'Use screen height',
|
|
30
|
+
defaultMessage: 'Use screen height',
|
|
31
|
+
},
|
|
28
32
|
});
|
|
29
33
|
|
|
30
34
|
export const MapsSchema = (props) => {
|
|
@@ -64,7 +68,7 @@ export const MapsSchema = (props) => {
|
|
|
64
68
|
description: props.intl.formatMessage(messages.CSSMapHeightDescription),
|
|
65
69
|
},
|
|
66
70
|
useScreenHeight: {
|
|
67
|
-
title:
|
|
71
|
+
title: props.intl.formatMessage(messages.useScreenHeight),
|
|
68
72
|
type: 'boolean',
|
|
69
73
|
default: false,
|
|
70
74
|
},
|
|
@@ -260,7 +260,7 @@ const PrivacyProtection = (props) => {
|
|
|
260
260
|
<p className="discreet">
|
|
261
261
|
{serializeNodes(
|
|
262
262
|
privacy_statement ||
|
|
263
|
-
ProtectionSchema().properties.privacy_statement
|
|
263
|
+
ProtectionSchema(intl).properties.privacy_statement
|
|
264
264
|
.defaultValue,
|
|
265
265
|
)}
|
|
266
266
|
</p>
|
|
@@ -1,5 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
|
|
3
|
+
const messages = defineMessages({
|
|
4
|
+
dataProtection: {
|
|
5
|
+
id: 'dataProtection',
|
|
6
|
+
defaultMessage: 'Data Protection',
|
|
7
|
+
},
|
|
8
|
+
privacyStatement: {
|
|
9
|
+
id: 'privacyStatement',
|
|
10
|
+
defaultMessage: 'Privacy statement',
|
|
11
|
+
},
|
|
12
|
+
privacyStatementDescription: {
|
|
13
|
+
id: 'privacyStatementDescription',
|
|
14
|
+
defaultMessage: 'Defined in template. Change only if necessary',
|
|
15
|
+
},
|
|
16
|
+
privacyCookieKey: {
|
|
17
|
+
id: 'privacyCookieKey',
|
|
18
|
+
defaultMessage: 'Privacy cookie key',
|
|
19
|
+
},
|
|
20
|
+
privacyCookieKeyDescription: {
|
|
21
|
+
id: 'privacyCookieKeyDescription',
|
|
22
|
+
defaultMessage: 'Use default for Esri maps, otherwise change',
|
|
23
|
+
},
|
|
24
|
+
enabled: {
|
|
25
|
+
id: 'enabled',
|
|
26
|
+
defaultMessage: 'Data protection disclaimer enabled',
|
|
27
|
+
},
|
|
28
|
+
enabledDescription: {
|
|
29
|
+
id: 'enabledDescription',
|
|
30
|
+
defaultMessage: 'Enable/disable the privacy protection',
|
|
31
|
+
},
|
|
32
|
+
backgroundImage: {
|
|
33
|
+
id: 'backgroundImage',
|
|
34
|
+
defaultMessage: 'Background image',
|
|
35
|
+
},
|
|
36
|
+
backgroundImageDescription: {
|
|
37
|
+
id: 'backgroundImageDescription',
|
|
38
|
+
defaultMessage:
|
|
39
|
+
'The component will automatically generate a static image as placeholder from the URL of the map defined. This image is refreshed on page edit. To override this, upload an image here',
|
|
40
|
+
},
|
|
41
|
+
privacyStatementPart1: {
|
|
42
|
+
id: 'privacyStatementPart1',
|
|
43
|
+
defaultMessage:
|
|
44
|
+
'This map is hosted by a third party, Environmental Systems Research Institute. By showing the external content you accept the terms and conditions of ',
|
|
45
|
+
},
|
|
46
|
+
privacyStatementLink: {
|
|
47
|
+
id: 'privacyStatementLink',
|
|
48
|
+
defaultMessage: 'esri.com',
|
|
49
|
+
},
|
|
50
|
+
privacyStatementPart2: {
|
|
51
|
+
id: 'privacyStatementPart2',
|
|
52
|
+
defaultMessage:
|
|
53
|
+
'. This includes their cookie policies, which we have no control over.',
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export const ProtectionSchema = (intl) => ({
|
|
58
|
+
title: intl.formatMessage(messages.dataProtection),
|
|
3
59
|
|
|
4
60
|
fieldsets: [
|
|
5
61
|
{
|
|
@@ -16,46 +72,45 @@ export const ProtectionSchema = () => ({
|
|
|
16
72
|
|
|
17
73
|
properties: {
|
|
18
74
|
privacy_statement: {
|
|
19
|
-
title:
|
|
20
|
-
description:
|
|
75
|
+
title: intl.formatMessage(messages.privacyStatement),
|
|
76
|
+
description: intl.formatMessage(messages.privacyStatementDescription),
|
|
21
77
|
widget: 'slate_richtext',
|
|
22
78
|
className: 'slate-Widget',
|
|
23
79
|
defaultValue: [
|
|
24
80
|
{
|
|
25
81
|
children: [
|
|
26
82
|
{
|
|
27
|
-
text:
|
|
83
|
+
text: intl.formatMessage(messages.privacyStatementPart1),
|
|
28
84
|
},
|
|
29
85
|
{
|
|
30
86
|
type: 'a',
|
|
31
87
|
url: 'https://www.esri.com',
|
|
32
88
|
children: [
|
|
33
89
|
{
|
|
34
|
-
text:
|
|
90
|
+
text: intl.formatMessage(messages.privacyStatementLink),
|
|
35
91
|
},
|
|
36
92
|
],
|
|
37
93
|
},
|
|
38
94
|
{
|
|
39
|
-
text:
|
|
95
|
+
text: intl.formatMessage(messages.privacyStatementPart2),
|
|
40
96
|
},
|
|
41
97
|
],
|
|
42
98
|
},
|
|
43
99
|
],
|
|
44
100
|
},
|
|
45
101
|
privacy_cookie_key: {
|
|
46
|
-
title:
|
|
47
|
-
description:
|
|
102
|
+
title: intl.formatMessage(messages.privacyCookieKey),
|
|
103
|
+
description: intl.formatMessage(messages.privacyCookieKeyDescription),
|
|
48
104
|
defaultValue: 'esri-maps',
|
|
49
105
|
},
|
|
50
106
|
enabled: {
|
|
51
|
-
title:
|
|
52
|
-
description:
|
|
107
|
+
title: intl.formatMessage(messages.enabled),
|
|
108
|
+
description: intl.formatMessage(messages.enabledDescription),
|
|
53
109
|
type: 'boolean',
|
|
54
110
|
},
|
|
55
111
|
background_image: {
|
|
56
|
-
title:
|
|
57
|
-
description:
|
|
58
|
-
'The component will automatically generate a static image as placeholder from the URL of the map defined. This image is refreshed on page edit. To override this, upload an image here',
|
|
112
|
+
title: intl.formatMessage(messages.backgroundImage),
|
|
113
|
+
description: intl.formatMessage(messages.backgroundImageDescription),
|
|
59
114
|
widget: 'file',
|
|
60
115
|
},
|
|
61
116
|
},
|