@eeacms/volto-cca-policy 0.3.73 → 0.3.74
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/.eslintrc.js +8 -4
- package/CHANGELOG.md +51 -2
- package/package.json +11 -10
- package/src/components/manage/Blocks/ASTNavigation/schema.js +3 -1
- package/src/components/manage/Blocks/C3SIndicatorsGlossaryBlock/schema.js +3 -1
- package/src/components/manage/Blocks/C3SIndicatorsListingBlock/schema.js +3 -1
- package/src/components/manage/Blocks/C3SIndicatorsOverviewBlock/schema.js +3 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/FeatureDisplay.jsx +6 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/styles.less +1 -1
- package/src/components/manage/Blocks/CollectionStatistics/styles.less +1 -1
- package/src/components/manage/Blocks/ContentLinks/schema.js +3 -1
- package/src/components/manage/Blocks/CountryMapHeatIndex/euro-countries-simplified.js +46197 -0
- package/src/components/manage/Blocks/CountryMapHeatIndex/styles.less +1 -1
- package/src/components/manage/Blocks/CountryMapObservatory/mapstyle.js +28 -26
- package/src/components/manage/Blocks/CountryMapObservatory/styles.less +1 -1
- package/src/components/manage/Blocks/CountryMapProfile/OLView.jsx +5 -5
- package/src/components/manage/Blocks/CountryMapProfile/euro-countries-simplified.js +46197 -0
- package/src/components/manage/Blocks/CountryMapProfile/styles.less +1 -1
- package/src/components/manage/Blocks/CountryProfileDetail/View.test.jsx +1 -2
- package/src/components/manage/Blocks/FlourishEmbedBlock/schema.js +3 -1
- package/src/components/manage/Blocks/RASTBlock/schema.js +3 -1
- package/src/components/manage/Blocks/ReadMore/schema.js +3 -1
- package/src/components/manage/Blocks/RelevantAceContent/schema.js +3 -1
- package/src/components/manage/Blocks/SearchAceContent/schema.js +3 -1
- package/src/components/manage/Blocks/TransRegionSelect/schema.js +3 -1
- package/src/components/manage/Blocks/index.js +0 -1
- package/src/components/theme/ASTNavigation/ASTNavigation.jsx +2 -3
- package/src/components/theme/BannerTitle/BannerTitle.jsx +2 -0
- package/src/components/theme/Header/Header.jsx +32 -22
- package/src/components/theme/Header/LanguageSwitch.jsx +2 -2
- package/src/components/theme/Views/BrokenLinks.jsx +0 -2
- package/src/components/theme/Views/CcaEventView.jsx +2 -4
- package/src/components/theme/Views/DatabaseItemView.test.jsx +1 -2
- package/src/components/theme/Widgets/GeolocationWidget.jsx +0 -2
- package/src/customizations/@plone/volto-slate/utils/volto-blocks.js +2 -5
- package/src/customizations/@plone/volto-slate/widgets/HtmlSlateWidget.jsx +1 -2
- package/src/customizations/volto/components/manage/Blocks/Grid/grid-1.svg +6 -0
- package/src/customizations/volto/components/manage/Blocks/Grid/grid-2.svg +9 -0
- package/src/customizations/volto/components/manage/Blocks/Grid/grid-3.svg +10 -0
- package/src/customizations/volto/components/manage/Blocks/Grid/grid-4.svg +11 -0
- package/src/customizations/volto/components/manage/Blocks/Grid/grid-5.svg +13 -0
- package/src/customizations/volto/components/manage/Blocks/Grid/grid-6.svg +14 -0
- package/src/customizations/volto/components/manage/Blocks/Grid/templates.js +61 -0
- package/src/customizations/volto/components/theme/App/App.jsx +3 -1
- package/src/customizations/volto/helpers/Html/Html.jsx +2 -9
- package/src/customizations/volto/middleware/api.js +190 -186
- package/src/customizations/volto/server.jsx +1 -1
- package/src/express-middleware.js +4 -2
- package/src/helpers/Utils.jsx +15 -2
- package/src/helpers/country_map/euro-countries-simplified.js +3 -1
- package/src/index.js +2 -8
- package/src/search/cca/views.js +3 -1
- package/src/search/health_observatory/views-health.js +3 -1
- package/src/store/middleware.js +38 -37
- package/theme/globals/blocks.less +4 -0
- package/theme/globals/mission.less +2 -9
- package/theme/globals/observatory.less +2 -2
- package/theme/globals/views.less +25 -0
- package/src/components/theme/Views/brokenlinks.less +0 -21
- package/src/components/theme/Widgets/geolocation.css +0 -3
- package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.test.jsx +0 -229
- package/src/customizations/volto/components/manage/Widgets/ArrayWidget.jsx +0 -428
- package/src/customizations/volto/components/manage/Widgets/Readme.md +0 -5
- package/src/customizations/volto/components/theme/Footer/Footer.jsx +0 -96
- package/src/policy.js +0 -135
|
@@ -120,52 +120,70 @@ function sendOnSocket(request) {
|
|
|
120
120
|
* @param {Object} api Api object.
|
|
121
121
|
* @returns {Promise} Action promise.
|
|
122
122
|
*/
|
|
123
|
-
const apiMiddlewareFactory =
|
|
124
|
-
|
|
125
|
-
) =>
|
|
126
|
-
|
|
123
|
+
const apiMiddlewareFactory =
|
|
124
|
+
(api) =>
|
|
125
|
+
({ dispatch, getState }) =>
|
|
126
|
+
(next) =>
|
|
127
|
+
(action) => {
|
|
128
|
+
const { settings } = config;
|
|
127
129
|
|
|
128
|
-
|
|
130
|
+
const isAnonymous = !getState().userSession.token;
|
|
129
131
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
if (typeof action === 'function') {
|
|
133
|
+
return action(dispatch, getState);
|
|
134
|
+
}
|
|
133
135
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
+
const { request, type, mode = 'parallel', ...rest } = action;
|
|
137
|
+
const { subrequest } = action; // We want subrequest remains in `...rest` above
|
|
136
138
|
|
|
137
|
-
|
|
139
|
+
let actionPromise;
|
|
138
140
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
141
|
+
if (!request) {
|
|
142
|
+
return next(action);
|
|
143
|
+
}
|
|
142
144
|
|
|
143
|
-
|
|
145
|
+
next({ ...rest, type: `${type}_PENDING` });
|
|
144
146
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
147
|
+
if (socket) {
|
|
148
|
+
actionPromise = Array.isArray(request)
|
|
149
|
+
? Promise.all(
|
|
150
|
+
request.map((item) =>
|
|
151
|
+
sendOnSocket({
|
|
152
|
+
...item,
|
|
153
|
+
path: addExpandersToPath(item.path, type, isAnonymous),
|
|
154
|
+
id: type,
|
|
155
|
+
}),
|
|
156
|
+
),
|
|
157
|
+
)
|
|
158
|
+
: sendOnSocket({
|
|
159
|
+
...request,
|
|
160
|
+
path: addExpandersToPath(request.path, type, isAnonymous),
|
|
161
|
+
id: type,
|
|
162
|
+
});
|
|
163
|
+
} else {
|
|
164
|
+
actionPromise = Array.isArray(request)
|
|
165
|
+
? mode === 'serial'
|
|
166
|
+
? request.reduce((prevPromise, item) => {
|
|
167
|
+
return prevPromise.then((acc) => {
|
|
168
|
+
return api[item.op](
|
|
169
|
+
addExpandersToPath(item.path, type, isAnonymous),
|
|
170
|
+
{
|
|
171
|
+
data: item.data,
|
|
172
|
+
type: item.type,
|
|
173
|
+
headers: item.headers,
|
|
174
|
+
params: request.params,
|
|
175
|
+
checkUrl: settings.actions_raising_api_errors.includes(
|
|
176
|
+
action.type,
|
|
177
|
+
),
|
|
178
|
+
},
|
|
179
|
+
).then((reqres) => {
|
|
180
|
+
return [...acc, reqres];
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
}, Promise.resolve([]))
|
|
184
|
+
: Promise.all(
|
|
185
|
+
request.map((item) =>
|
|
186
|
+
api[item.op](addExpandersToPath(item.path, type, isAnonymous), {
|
|
169
187
|
data: item.data,
|
|
170
188
|
type: item.type,
|
|
171
189
|
headers: item.headers,
|
|
@@ -173,178 +191,164 @@ const apiMiddlewareFactory = (api) => ({ dispatch, getState }) => (next) => (
|
|
|
173
191
|
checkUrl: settings.actions_raising_api_errors.includes(
|
|
174
192
|
action.type,
|
|
175
193
|
),
|
|
176
|
-
},
|
|
177
|
-
)
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
request.
|
|
184
|
-
|
|
185
|
-
data: item.data,
|
|
186
|
-
type: item.type,
|
|
187
|
-
headers: item.headers,
|
|
188
|
-
params: request.params,
|
|
189
|
-
checkUrl: settings.actions_raising_api_errors.includes(
|
|
190
|
-
action.type,
|
|
191
|
-
),
|
|
192
|
-
}),
|
|
193
|
-
),
|
|
194
|
-
)
|
|
195
|
-
: api[request.op](addExpandersToPath(request.path, type, isAnonymous), {
|
|
196
|
-
data: request.data,
|
|
197
|
-
type: request.type,
|
|
198
|
-
headers: request.headers,
|
|
199
|
-
params: request.params,
|
|
200
|
-
checkUrl: settings.actions_raising_api_errors.includes(action.type),
|
|
201
|
-
});
|
|
202
|
-
actionPromise.then(
|
|
203
|
-
(result) => {
|
|
204
|
-
const { settings } = config;
|
|
205
|
-
if (getState().apierror.connectionRefused) {
|
|
206
|
-
next({
|
|
207
|
-
...rest,
|
|
208
|
-
type: RESET_APIERROR,
|
|
194
|
+
}),
|
|
195
|
+
),
|
|
196
|
+
)
|
|
197
|
+
: api[request.op](addExpandersToPath(request.path, type, isAnonymous), {
|
|
198
|
+
data: request.data,
|
|
199
|
+
type: request.type,
|
|
200
|
+
headers: request.headers,
|
|
201
|
+
params: request.params,
|
|
202
|
+
checkUrl: settings.actions_raising_api_errors.includes(action.type),
|
|
209
203
|
});
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
getState().intl.locale !== toReactIntlLang(lang) &&
|
|
218
|
-
!subrequest &&
|
|
219
|
-
config.settings.supportedLanguages.includes(lang)
|
|
220
|
-
) {
|
|
221
|
-
const langFileName = toGettextLang(lang);
|
|
222
|
-
import('~/../locales/' + langFileName + '.json').then((locale) => {
|
|
223
|
-
dispatch(changeLanguage(lang, locale.default));
|
|
204
|
+
actionPromise.then(
|
|
205
|
+
(result) => {
|
|
206
|
+
const { settings } = config;
|
|
207
|
+
if (getState().apierror.connectionRefused) {
|
|
208
|
+
next({
|
|
209
|
+
...rest,
|
|
210
|
+
type: RESET_APIERROR,
|
|
224
211
|
});
|
|
225
212
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
213
|
+
if (type === GET_CONTENT) {
|
|
214
|
+
// customization original: result?.language?.token
|
|
215
|
+
const lang = result?.language?.token || result.language || '';
|
|
216
|
+
// end customization
|
|
217
|
+
if (
|
|
218
|
+
lang &&
|
|
219
|
+
getState().intl.locale !== toReactIntlLang(lang) &&
|
|
220
|
+
!subrequest &&
|
|
221
|
+
config.settings.supportedLanguages.includes(lang)
|
|
222
|
+
) {
|
|
223
|
+
const langFileName = toGettextLang(lang);
|
|
224
|
+
import('~/../locales/' + langFileName + '.json').then(
|
|
225
|
+
(locale) => {
|
|
226
|
+
dispatch(changeLanguage(lang, locale.default));
|
|
227
|
+
},
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
if (type === LOGIN && settings.websockets) {
|
|
232
|
+
const cookies = new Cookies();
|
|
233
|
+
cookies.set(
|
|
234
|
+
'auth_token',
|
|
235
|
+
result.token,
|
|
236
|
+
getCookieOptions({
|
|
237
|
+
expires: new Date(jwtDecode(result.token).exp * 1000),
|
|
238
|
+
}),
|
|
241
239
|
);
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
next({
|
|
263
|
-
...rest,
|
|
264
|
-
error: { status: 500, error },
|
|
265
|
-
type: `${type}_FAIL`,
|
|
266
|
-
});
|
|
267
|
-
// Rethrow the original exception on the client side only,
|
|
268
|
-
// so it doesn't fall through to express on the server.
|
|
269
|
-
if (__CLIENT__) throw error;
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
|
-
(error) => {
|
|
273
|
-
// Only SSR can set ECONNREFUSED
|
|
274
|
-
if (error.code === 'ECONNREFUSED') {
|
|
275
|
-
next({
|
|
276
|
-
...rest,
|
|
277
|
-
error,
|
|
278
|
-
statusCode: error.code,
|
|
279
|
-
connectionRefused: true,
|
|
280
|
-
type: SET_APIERROR,
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
// Response error is marked crossDomain if CORS error happen
|
|
285
|
-
else if (error.crossDomain) {
|
|
286
|
-
next({
|
|
287
|
-
...rest,
|
|
288
|
-
error,
|
|
289
|
-
statusCode: 'CORSERROR',
|
|
290
|
-
connectionRefused: false,
|
|
291
|
-
type: SET_APIERROR,
|
|
292
|
-
});
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
// Check for actions who can raise api errors
|
|
296
|
-
if (settings.actions_raising_api_errors.includes(action.type)) {
|
|
297
|
-
// Gateway timeout
|
|
298
|
-
if (error?.response?.statusCode === 504) {
|
|
299
|
-
next({
|
|
300
|
-
...rest,
|
|
301
|
-
error,
|
|
302
|
-
statusCode: error.code,
|
|
303
|
-
connectionRefused: true,
|
|
304
|
-
type: SET_APIERROR,
|
|
240
|
+
api.get('/@wstoken').then((res) => {
|
|
241
|
+
socket = new WebSocket(
|
|
242
|
+
`${settings.apiPath.replace('http', 'ws')}/@ws?ws_token=${
|
|
243
|
+
res.token
|
|
244
|
+
}`,
|
|
245
|
+
);
|
|
246
|
+
socket.onmessage = (message) => {
|
|
247
|
+
const packet = JSON.parse(message.data);
|
|
248
|
+
if (packet.error) {
|
|
249
|
+
dispatch({
|
|
250
|
+
type: `${packet.id}_FAIL`,
|
|
251
|
+
error: packet.error,
|
|
252
|
+
});
|
|
253
|
+
} else {
|
|
254
|
+
dispatch({
|
|
255
|
+
type: `${packet.id}_SUCCESS`,
|
|
256
|
+
result: JSON.parse(packet.data),
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
};
|
|
305
260
|
});
|
|
306
261
|
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
262
|
+
try {
|
|
263
|
+
return next({ ...rest, result, type: `${type}_SUCCESS` });
|
|
264
|
+
} catch (error) {
|
|
265
|
+
// There was an exception while processing reducers or downstream middleware.
|
|
310
266
|
next({
|
|
311
267
|
...rest,
|
|
312
|
-
error,
|
|
313
|
-
|
|
314
|
-
connectionRefused: false,
|
|
315
|
-
type: SET_APIERROR,
|
|
268
|
+
error: { status: 500, error },
|
|
269
|
+
type: `${type}_FAIL`,
|
|
316
270
|
});
|
|
271
|
+
// Rethrow the original exception on the client side only,
|
|
272
|
+
// so it doesn't fall through to express on the server.
|
|
273
|
+
if (__CLIENT__) throw error;
|
|
317
274
|
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
275
|
+
},
|
|
276
|
+
(error) => {
|
|
277
|
+
// Only SSR can set ECONNREFUSED
|
|
278
|
+
if (error.code === 'ECONNREFUSED') {
|
|
321
279
|
next({
|
|
322
280
|
...rest,
|
|
323
281
|
error,
|
|
324
282
|
statusCode: error.code,
|
|
325
|
-
connectionRefused:
|
|
283
|
+
connectionRefused: true,
|
|
326
284
|
type: SET_APIERROR,
|
|
327
285
|
});
|
|
328
286
|
}
|
|
329
287
|
|
|
330
|
-
//
|
|
331
|
-
else if (error
|
|
288
|
+
// Response error is marked crossDomain if CORS error happen
|
|
289
|
+
else if (error.crossDomain) {
|
|
332
290
|
next({
|
|
333
291
|
...rest,
|
|
334
292
|
error,
|
|
335
|
-
statusCode:
|
|
336
|
-
message: error.response.body.message,
|
|
293
|
+
statusCode: 'CORSERROR',
|
|
337
294
|
connectionRefused: false,
|
|
338
295
|
type: SET_APIERROR,
|
|
339
296
|
});
|
|
340
297
|
}
|
|
341
|
-
}
|
|
342
|
-
return next({ ...rest, error, type: `${type}_FAIL` });
|
|
343
|
-
},
|
|
344
|
-
);
|
|
345
|
-
}
|
|
346
298
|
|
|
347
|
-
|
|
348
|
-
|
|
299
|
+
// Check for actions who can raise api errors
|
|
300
|
+
if (settings.actions_raising_api_errors.includes(action.type)) {
|
|
301
|
+
// Gateway timeout
|
|
302
|
+
if (error?.response?.statusCode === 504) {
|
|
303
|
+
next({
|
|
304
|
+
...rest,
|
|
305
|
+
error,
|
|
306
|
+
statusCode: error.code,
|
|
307
|
+
connectionRefused: true,
|
|
308
|
+
type: SET_APIERROR,
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// Redirect
|
|
313
|
+
else if (error?.code === 301) {
|
|
314
|
+
next({
|
|
315
|
+
...rest,
|
|
316
|
+
error,
|
|
317
|
+
statusCode: error.code,
|
|
318
|
+
connectionRefused: false,
|
|
319
|
+
type: SET_APIERROR,
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Redirect
|
|
324
|
+
else if (error?.code === 408) {
|
|
325
|
+
next({
|
|
326
|
+
...rest,
|
|
327
|
+
error,
|
|
328
|
+
statusCode: error.code,
|
|
329
|
+
connectionRefused: false,
|
|
330
|
+
type: SET_APIERROR,
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// Unauthorized
|
|
335
|
+
else if (error?.response?.statusCode === 401) {
|
|
336
|
+
next({
|
|
337
|
+
...rest,
|
|
338
|
+
error,
|
|
339
|
+
statusCode: error.response,
|
|
340
|
+
message: error.response.body.message,
|
|
341
|
+
connectionRefused: false,
|
|
342
|
+
type: SET_APIERROR,
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return next({ ...rest, error, type: `${type}_FAIL` });
|
|
347
|
+
},
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
return actionPromise;
|
|
352
|
+
};
|
|
349
353
|
|
|
350
354
|
export default apiMiddlewareFactory;
|
|
@@ -22,7 +22,7 @@ import cookiesMiddleware from 'universal-cookie-express';
|
|
|
22
22
|
import debug from 'debug';
|
|
23
23
|
// import crypto from 'crypto';
|
|
24
24
|
|
|
25
|
-
import routes from '@
|
|
25
|
+
import routes from '@plone/volto/routes';
|
|
26
26
|
import config from '@plone/volto/registry';
|
|
27
27
|
|
|
28
28
|
import {
|
|
@@ -24,7 +24,7 @@ function viewMiddleware(req, res, next) {
|
|
|
24
24
|
.catch(next);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
const viewsMiddlewareConfigurator = (config) => {
|
|
28
28
|
const middleware = express.Router();
|
|
29
29
|
|
|
30
30
|
// TODO: do we want catch all?
|
|
@@ -43,4 +43,6 @@ export default function (config) {
|
|
|
43
43
|
middleware.id = 'viewsMiddleware';
|
|
44
44
|
config.settings.expressMiddleware.push(middleware);
|
|
45
45
|
return config;
|
|
46
|
-
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default viewsMiddlewareConfigurator;
|
package/src/helpers/Utils.jsx
CHANGED
|
@@ -111,7 +111,20 @@ export const BannerTitle = (props) => {
|
|
|
111
111
|
} = config;
|
|
112
112
|
const TitleBlockView = blocksConfig?.title?.view;
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
const blockData = {
|
|
115
|
+
'@type': 'title',
|
|
116
|
+
...data,
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
return (
|
|
120
|
+
<TitleBlockView
|
|
121
|
+
{...props}
|
|
122
|
+
data={blockData}
|
|
123
|
+
metadata={content}
|
|
124
|
+
properties={content}
|
|
125
|
+
blocksConfig={blocksConfig}
|
|
126
|
+
/>
|
|
127
|
+
);
|
|
115
128
|
};
|
|
116
129
|
|
|
117
130
|
export const ReferenceInfo = (props) => {
|
|
@@ -424,7 +437,7 @@ export const WebDetails = (props) => {
|
|
|
424
437
|
<FormattedMessage id="Web" defaultMessage="Web" />
|
|
425
438
|
</h4>
|
|
426
439
|
<p>
|
|
427
|
-
<a href={eventUrl} target="_blank">
|
|
440
|
+
<a href={eventUrl} target="_blank" rel="noopener">
|
|
428
441
|
<FormattedMessage
|
|
429
442
|
id="Visit external website"
|
|
430
443
|
defaultMessage="Visit external website"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const euroCountries = {
|
|
2
2
|
type: 'FeatureCollection',
|
|
3
3
|
name: 'new-map-1-1',
|
|
4
4
|
crs: {
|
|
@@ -46232,3 +46232,5 @@ export default {
|
|
|
46232
46232
|
},
|
|
46233
46233
|
],
|
|
46234
46234
|
};
|
|
46235
|
+
|
|
46236
|
+
export default euroCountries;
|
package/src/index.js
CHANGED
|
@@ -350,11 +350,6 @@ const applyConfig = (config) => {
|
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
config.blocks.blocksConfig.__grid = {
|
|
354
|
-
...config.blocks.blocksConfig.__grid,
|
|
355
|
-
maxNumberOfColumns: 7,
|
|
356
|
-
};
|
|
357
|
-
|
|
358
353
|
config.blocks.blocksConfig.nextCloudVideo = {
|
|
359
354
|
...config.blocks.blocksConfig.nextCloudVideo,
|
|
360
355
|
whiteList: [
|
|
@@ -563,9 +558,8 @@ const applyConfig = (config) => {
|
|
|
563
558
|
// 'content',
|
|
564
559
|
];
|
|
565
560
|
|
|
566
|
-
config.widgets.vocabulary[
|
|
567
|
-
|
|
568
|
-
] = SelectAutoCompleteWidget;
|
|
561
|
+
config.widgets.vocabulary['plone.app.vocabularies.Users'] =
|
|
562
|
+
SelectAutoCompleteWidget;
|
|
569
563
|
|
|
570
564
|
config.settings.matomoTrackerIdFn = (pathname) => {
|
|
571
565
|
return pathname.split('/')[2] === 'mission'
|
package/src/search/cca/views.js
CHANGED
package/src/store/middleware.js
CHANGED
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
export const langRedirection =
|
|
2
|
-
|
|
3
|
-
) =>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export const langRedirection =
|
|
2
|
+
({ dispatch, getState }) =>
|
|
3
|
+
(next) =>
|
|
4
|
+
(action) => {
|
|
5
|
+
if (typeof action === 'function') {
|
|
6
|
+
return next(action);
|
|
7
|
+
}
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
switch (action.type) {
|
|
10
|
+
case '@@router/LOCATION_CHANGE':
|
|
11
|
+
const { pathname } = action.payload.location;
|
|
12
|
+
const state = getState();
|
|
13
|
+
const locale = state.intl.locale || 'en';
|
|
14
|
+
const search = ['/data-and-downloads', '/advanced-search'];
|
|
15
|
+
const isSearchPage = search.some((el) => pathname.includes(el));
|
|
16
|
+
const queryString = action.payload.location.search;
|
|
17
|
+
const urlParams = new URLSearchParams(queryString);
|
|
18
|
+
const hasLanguageQueryParam = urlParams.has('set_language');
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
// sometimes there's Links where the target has moved
|
|
21
|
+
const nonApiPathname = pathname.replaceAll('++api++', '');
|
|
22
|
+
if (nonApiPathname !== pathname) {
|
|
23
|
+
action.payload.location.pathname = nonApiPathname;
|
|
24
|
+
window.history.replaceState(window.history.state, '', nonApiPathname);
|
|
25
|
+
}
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
27
|
+
if (
|
|
28
|
+
locale !== 'en' &&
|
|
29
|
+
!isSearchPage &&
|
|
30
|
+
!hasLanguageQueryParam &&
|
|
31
|
+
pathname.indexOf('/en/') > -1
|
|
32
|
+
) {
|
|
33
|
+
const newPathname = pathname.replaceAll('/en/', `/${locale}/`);
|
|
34
|
+
action.payload.location.pathname = newPathname;
|
|
35
|
+
window.history.replaceState(window.history.state, '', newPathname);
|
|
36
|
+
}
|
|
37
|
+
return next(action);
|
|
38
|
+
default:
|
|
39
|
+
return next(action);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
@@ -15,20 +15,13 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
body.view-viewview.contenttype-subsite.section-mission
|
|
18
|
-
.block.
|
|
19
|
-
h2 {
|
|
20
|
-
color: #3d5265;
|
|
21
|
-
font-size: 23px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
body.view-viewview.contenttype-subsite.section-mission
|
|
25
|
-
.block.__grid.teaserGrid.centered
|
|
18
|
+
.block.gridBlock
|
|
26
19
|
.image {
|
|
27
20
|
height: 260px;
|
|
28
21
|
}
|
|
29
22
|
|
|
30
23
|
body.view-viewview.contenttype-subsite.section-mission
|
|
31
|
-
.block.
|
|
24
|
+
.block.gridBlock
|
|
32
25
|
img {
|
|
33
26
|
height: 260px;
|
|
34
27
|
object-fit: contain;
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
.no-padding-tab .column-blocks-wrapper {
|
|
36
36
|
margin-bottom: 1rem;
|
|
37
37
|
|
|
38
|
-
.block.
|
|
38
|
+
.block.gridBlock {
|
|
39
39
|
margin-bottom: 0rem;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
.block.call-to-action,
|
|
75
|
-
.block.
|
|
75
|
+
.block.gridBlock {
|
|
76
76
|
margin-bottom: 0rem;
|
|
77
77
|
}
|
|
78
78
|
|