design-comuni-plone-theme 10.4.0 → 10.4.2

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.
Files changed (121) hide show
  1. package/.eslintrc.js +1 -1
  2. package/CHANGELOG.md +39 -0
  3. package/RELEASE.md +18 -0
  4. package/error-503.html +52 -50
  5. package/package.json +40 -24
  6. package/publiccode.yml +2 -2
  7. package/src/actions/getDettagliProcedimento.js +1 -2
  8. package/src/components/ItaliaTheme/Blocks/Listing/BandiInEvidenceTemplate.jsx +108 -104
  9. package/src/components/ItaliaTheme/Blocks/Listing/CardWithSlideUpTextTemplate.jsx +8 -10
  10. package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block.jsx +1 -7
  11. package/src/components/ItaliaTheme/Blocks/__tests__/Alert.test.jsx +1 -2
  12. package/src/components/ItaliaTheme/Blocks/__tests__/CardWithImage.test.jsx +1 -2
  13. package/src/components/ItaliaTheme/Header/HeaderSlim/UserLoggedMenu.jsx +0 -1
  14. package/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx +2 -2
  15. package/src/components/ItaliaTheme/Pagination/PaginationItem.jsx +2 -8
  16. package/src/components/ItaliaTheme/Pagination/createPaginationItems/itemFactories.js +4 -4
  17. package/src/components/ItaliaTheme/Search/utils.js +5 -3
  18. package/src/components/ItaliaTheme/View/Commons/ContactsCard.jsx +4 -4
  19. package/src/components/ItaliaTheme/View/Commons/DownloadFileFormat.jsx +1 -0
  20. package/src/components/ItaliaTheme/View/__tests__/PersonaView.test.jsx +928 -932
  21. package/src/components/ItaliaTheme/manage/Widgets/TextEditorWidget.jsx +12 -8
  22. package/src/components/SelectInput/SelectInput.jsx +16 -21
  23. package/src/components/SelectInput/select-styles.css +1 -1
  24. package/src/config/Blocks/blocks.js +4 -3
  25. package/src/config/Blocks/listingVariations.js +4 -3
  26. package/src/config/Subsites/index.js +16 -16
  27. package/src/config/italiaConfig.js +6 -5
  28. package/src/customizations/volto/components/manage/Blocks/HeroImageLeft/Edit.jsx +31 -26
  29. package/src/customizations/volto/components/manage/Blocks/Listing/ListingBody.jsx +2 -2
  30. package/src/customizations/volto/components/manage/Blocks/Listing/withQuerystringResults.jsx +6 -6
  31. package/src/customizations/volto/components/manage/Blocks/Search/components/CheckboxFacet.jsx +2 -2
  32. package/src/customizations/volto/components/manage/Blocks/Search/components/FilterList.jsx +15 -20
  33. package/src/customizations/volto/components/manage/Blocks/Search/components/ToggleFacetFilterListEntry.jsx +2 -9
  34. package/src/customizations/volto/components/manage/Diff/DiffField.jsx +2 -9
  35. package/src/customizations/volto/components/manage/Sidebar/ObjectBrowserBody.jsx +10 -10
  36. package/src/customizations/volto/components/manage/Widgets/DatetimeWidget.jsx +4 -10
  37. package/src/customizations/volto/components/manage/Widgets/ObjectBrowserWidget.jsx +2 -9
  38. package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +2 -2
  39. package/src/customizations/volto/helpers/FormValidation/FormValidation.js +7 -6
  40. package/src/customizations/volto/helpers/Html/Html.jsx +2 -2
  41. package/src/customizations/volto/middleware/api.js +194 -190
  42. package/src/customizations/volto/middleware/blacklistRoutes.js +36 -34
  43. package/src/helpers/dates.js +2 -2
  44. package/src/theme/ItaliaTheme/Addons/volto-gdpr-privacy.scss +12 -5
  45. package/src/theme/ItaliaTheme/Blocks/_accordion.scss +2 -0
  46. package/src/theme/ItaliaTheme/Blocks/_alert.scss +1 -1
  47. package/src/theme/ItaliaTheme/Blocks/_bandiInEvidenceTemplate.scss +6 -1
  48. package/src/theme/ItaliaTheme/Blocks/_calendar.scss +8 -6
  49. package/src/theme/ItaliaTheme/Blocks/_cardWithImageAndInEvidence.scss +7 -7
  50. package/src/theme/ItaliaTheme/Blocks/_cardWithSlideUpTextTemplate.scss +5 -4
  51. package/src/theme/ItaliaTheme/Blocks/_completeBlockLinkstemplate.scss +4 -2
  52. package/src/theme/ItaliaTheme/Blocks/_countdown.scss +2 -2
  53. package/src/theme/ItaliaTheme/Blocks/_ctaBlock.scss +7 -5
  54. package/src/theme/ItaliaTheme/Blocks/_gridBlock.scss +8 -3
  55. package/src/theme/ItaliaTheme/Blocks/_gridGalleryTemplate.scss +1 -0
  56. package/src/theme/ItaliaTheme/Blocks/_hero.scss +1 -0
  57. package/src/theme/ItaliaTheme/Blocks/_iconBlocks.scss +2 -2
  58. package/src/theme/ItaliaTheme/Blocks/_imageBlock.scss +1 -0
  59. package/src/theme/ItaliaTheme/Blocks/_listing.scss +1 -1
  60. package/src/theme/ItaliaTheme/Blocks/_photogallerytemplate.scss +1 -0
  61. package/src/theme/ItaliaTheme/Blocks/_ribbonCardTemplate.scss +5 -4
  62. package/src/theme/ItaliaTheme/Blocks/_rssBlock.scss +3 -2
  63. package/src/theme/ItaliaTheme/Blocks/_search.scss +72 -36
  64. package/src/theme/ItaliaTheme/Blocks/_searchSections.scss +4 -3
  65. package/src/theme/ItaliaTheme/Blocks/_simpleCardTemplate.scss +6 -3
  66. package/src/theme/ItaliaTheme/Blocks/_sliderTemplate.scss +1 -1
  67. package/src/theme/ItaliaTheme/Blocks/_smallblockLinkstemplate.scss +3 -3
  68. package/src/theme/ItaliaTheme/Blocks/_subblocks-edit.scss +1 -1
  69. package/src/theme/ItaliaTheme/Blocks/_tableOfContents.scss +17 -7
  70. package/src/theme/ItaliaTheme/Blocks/_video.scss +1 -1
  71. package/src/theme/ItaliaTheme/Blocks/_videoGallery.scss +7 -6
  72. package/src/theme/ItaliaTheme/Components/_card.scss +14 -7
  73. package/src/theme/ItaliaTheme/Components/_cardPersona.scss +2 -2
  74. package/src/theme/ItaliaTheme/Components/_cmp-timeline.scss +16 -14
  75. package/src/theme/ItaliaTheme/Components/_contactsCard.scss +3 -3
  76. package/src/theme/ItaliaTheme/Components/_customerSatisfaction.scss +31 -11
  77. package/src/theme/ItaliaTheme/Components/_diffField.scss +25 -14
  78. package/src/theme/ItaliaTheme/Components/_galleryPreview.scss +10 -10
  79. package/src/theme/ItaliaTheme/Components/_mobileMenu.scss +1 -1
  80. package/src/theme/ItaliaTheme/Components/_navscroll.scss +2 -0
  81. package/src/theme/ItaliaTheme/Components/_pageHeader.scss +5 -4
  82. package/src/theme/ItaliaTheme/Components/_scrollToTop.scss +1 -0
  83. package/src/theme/ItaliaTheme/Components/_sharing.scss +1 -1
  84. package/src/theme/ItaliaTheme/Components/_sideMenu.scss +9 -5
  85. package/src/theme/ItaliaTheme/Components/_subsiteFooter.scss +1 -1
  86. package/src/theme/ItaliaTheme/Print/_all_pages.scss +5 -2
  87. package/src/theme/ItaliaTheme/Print/_bandi.scss +8 -8
  88. package/src/theme/ItaliaTheme/Print/_event.scss +11 -10
  89. package/src/theme/ItaliaTheme/Print/_news_items.scss +17 -17
  90. package/src/theme/ItaliaTheme/Print/_persona.scss +8 -8
  91. package/src/theme/ItaliaTheme/Print/_servizio.scss +8 -8
  92. package/src/theme/ItaliaTheme/Views/_bando.scss +1 -0
  93. package/src/theme/ItaliaTheme/Views/_cartellaModulistica.scss +20 -8
  94. package/src/theme/ItaliaTheme/Views/_common.scss +4 -3
  95. package/src/theme/ItaliaTheme/Views/_embeddedVideo.scss +1 -1
  96. package/src/theme/ItaliaTheme/Views/_evento.scss +1 -0
  97. package/src/theme/ItaliaTheme/Views/_faqFolder.scss +1 -0
  98. package/src/theme/ItaliaTheme/Views/_paginaArgomento.scss +1 -0
  99. package/src/theme/ItaliaTheme/Views/_puntoDiContatto.scss +1 -0
  100. package/src/theme/ItaliaTheme/Views/_servizio.scss +4 -1
  101. package/src/theme/ItaliaTheme/Views/_slider.scss +3 -3
  102. package/src/theme/ItaliaTheme/Views/_trasparenzaView.scss +2 -0
  103. package/src/theme/ItaliaTheme/Views/_uo.scss +3 -1
  104. package/src/theme/ItaliaTheme/Views/_venue.scss +3 -2
  105. package/src/theme/ItaliaTheme/Widgets/_canaleDigitaleWidget.scss +2 -1
  106. package/src/theme/ItaliaTheme/Widgets/_dataGridWidget.scss +24 -8
  107. package/src/theme/ItaliaTheme/Widgets/_iconWidget.scss +1 -1
  108. package/src/theme/ItaliaTheme/_common.scss +9 -4
  109. package/src/theme/ItaliaTheme/_main.scss +11 -8
  110. package/src/theme/_cms-ui.scss +46 -23
  111. package/src/theme/_cms-ui_container.scss +8 -3
  112. package/src/theme/_site-variables.scss +4 -2
  113. package/src/theme/bootstrap-override/bootstrap-italia/_breadcrumb.scss +1 -1
  114. package/src/theme/bootstrap-override/bootstrap-italia/_footer.scss +9 -4
  115. package/src/theme/bootstrap-override/bootstrap-italia/_linklist.scss +2 -0
  116. package/src/theme/bootstrap-override/bootstrap-italia/_megamenu.scss +1 -0
  117. package/src/theme/bootstrap-override/bootstrap-italia/_point-list.scss +4 -3
  118. package/src/theme/extras/_checkbox.scss +1 -1
  119. package/src/theme/extras/_modals.scss +5 -3
  120. package/src/theme/extras/_search.scss +14 -4
  121. package/src/theme/extras/_sidebar.scss +3 -0
@@ -128,58 +128,76 @@ function sendOnSocket(request) {
128
128
  * @param {Object} api Api object.
129
129
  * @returns {Promise} Action promise.
130
130
  */
131
- const apiMiddlewareFactory = (api) => ({ dispatch, getState }) => (next) => (
132
- action,
133
- ) => {
134
- const { settings } = config;
131
+ const apiMiddlewareFactory =
132
+ (api) =>
133
+ ({ dispatch, getState }) =>
134
+ (next) =>
135
+ (action) => {
136
+ const { settings } = config;
135
137
 
136
- const token = getState().userSession.token;
137
- let isAnonymous = true;
138
- if (token) {
139
- const tokenExpiration = jwtDecode(token).exp;
140
- const currentTime = new Date().getTime() / 1000;
141
- isAnonymous = !token || currentTime > tokenExpiration;
142
- }
138
+ const token = getState().userSession.token;
139
+ let isAnonymous = true;
140
+ if (token) {
141
+ const tokenExpiration = jwtDecode(token).exp;
142
+ const currentTime = new Date().getTime() / 1000;
143
+ isAnonymous = !token || currentTime > tokenExpiration;
144
+ }
143
145
 
144
- if (typeof action === 'function') {
145
- return action(dispatch, getState);
146
- }
146
+ if (typeof action === 'function') {
147
+ return action(dispatch, getState);
148
+ }
147
149
 
148
- const { request, type, mode = 'parallel', ...rest } = action;
149
- const { subrequest } = action; // We want subrequest remains in `...rest` above
150
+ const { request, type, mode = 'parallel', ...rest } = action;
151
+ const { subrequest } = action; // We want subrequest remains in `...rest` above
150
152
 
151
- let actionPromise;
153
+ let actionPromise;
152
154
 
153
- if (!request) {
154
- return next(action);
155
- }
155
+ if (!request) {
156
+ return next(action);
157
+ }
156
158
 
157
- next({ ...rest, type: `${type}_PENDING` });
159
+ next({ ...rest, type: `${type}_PENDING` });
158
160
 
159
- if (socket) {
160
- actionPromise = Array.isArray(request)
161
- ? Promise.all(
162
- request.map((item) =>
163
- sendOnSocket({
164
- ...item,
165
- path: addExpandersToPath(item.path, type, isAnonymous),
166
- id: type,
167
- }),
168
- ),
169
- )
170
- : sendOnSocket({
171
- ...request,
172
- path: addExpandersToPath(request.path, type, isAnonymous),
173
- id: type,
174
- });
175
- } else {
176
- actionPromise = Array.isArray(request)
177
- ? mode === 'serial'
178
- ? request.reduce((prevPromise, item) => {
179
- return prevPromise.then((acc) => {
180
- return api[item.op](
181
- addExpandersToPath(item.path, type, isAnonymous),
182
- {
161
+ if (socket) {
162
+ actionPromise = Array.isArray(request)
163
+ ? Promise.all(
164
+ request.map((item) =>
165
+ sendOnSocket({
166
+ ...item,
167
+ path: addExpandersToPath(item.path, type, isAnonymous),
168
+ id: type,
169
+ }),
170
+ ),
171
+ )
172
+ : sendOnSocket({
173
+ ...request,
174
+ path: addExpandersToPath(request.path, type, isAnonymous),
175
+ id: type,
176
+ });
177
+ } else {
178
+ actionPromise = Array.isArray(request)
179
+ ? mode === 'serial'
180
+ ? request.reduce((prevPromise, item) => {
181
+ return prevPromise.then((acc) => {
182
+ return api[item.op](
183
+ addExpandersToPath(item.path, type, isAnonymous),
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
+ ).then((reqres) => {
194
+ return [...acc, reqres];
195
+ });
196
+ });
197
+ }, Promise.resolve([]))
198
+ : Promise.all(
199
+ request.map((item) =>
200
+ api[item.op](addExpandersToPath(item.path, type, isAnonymous), {
183
201
  data: item.data,
184
202
  type: item.type,
185
203
  headers: item.headers,
@@ -187,176 +205,162 @@ const apiMiddlewareFactory = (api) => ({ dispatch, getState }) => (next) => (
187
205
  checkUrl: settings.actions_raising_api_errors.includes(
188
206
  action.type,
189
207
  ),
190
- },
191
- ).then((reqres) => {
192
- return [...acc, reqres];
193
- });
194
- });
195
- }, Promise.resolve([]))
196
- : Promise.all(
197
- request.map((item) =>
198
- api[item.op](addExpandersToPath(item.path, type, isAnonymous), {
199
- data: item.data,
200
- type: item.type,
201
- headers: item.headers,
202
- params: request.params,
203
- checkUrl: settings.actions_raising_api_errors.includes(
204
- action.type,
205
- ),
206
- }),
207
- ),
208
- )
209
- : api[request.op](addExpandersToPath(request.path, type, isAnonymous), {
210
- data: request.data,
211
- type: request.type,
212
- headers: request.headers,
213
- params: request.params,
214
- checkUrl: settings.actions_raising_api_errors.includes(action.type),
215
- });
216
- actionPromise.then(
217
- (result) => {
218
- const { settings } = config;
219
- if (getState().apierror.connectionRefused) {
220
- next({
221
- ...rest,
222
- type: RESET_APIERROR,
208
+ }),
209
+ ),
210
+ )
211
+ : api[request.op](addExpandersToPath(request.path, type, isAnonymous), {
212
+ data: request.data,
213
+ type: request.type,
214
+ headers: request.headers,
215
+ params: request.params,
216
+ checkUrl: settings.actions_raising_api_errors.includes(action.type),
223
217
  });
224
- }
225
- if (type === GET_CONTENT) {
226
- const lang = result?.language?.token;
227
- if (
228
- lang &&
229
- getState().intl.locale !== toReactIntlLang(lang) &&
230
- !subrequest &&
231
- config.settings.supportedLanguages.includes(lang)
232
- ) {
233
- const langFileName = toGettextLang(lang);
234
- import('~/../locales/' + langFileName + '.json').then((locale) => {
235
- dispatch(changeLanguage(lang, locale.default));
218
+ actionPromise.then(
219
+ (result) => {
220
+ const { settings } = config;
221
+ if (getState().apierror.connectionRefused) {
222
+ next({
223
+ ...rest,
224
+ type: RESET_APIERROR,
236
225
  });
237
226
  }
238
- }
239
- if (type === LOGIN && settings.websockets) {
240
- const cookies = new Cookies();
241
- cookies.set(
242
- 'auth_token',
243
- result.token,
244
- getCookieOptions({
245
- expires: new Date(jwtDecode(result.token).exp * 1000),
246
- }),
247
- );
248
- api.get('/@wstoken').then((res) => {
249
- socket = new WebSocket(
250
- `${settings.apiPath.replace('http', 'ws')}/@ws?ws_token=${
251
- res.token
252
- }`,
227
+ if (type === GET_CONTENT) {
228
+ const lang = result?.language?.token;
229
+ if (
230
+ lang &&
231
+ getState().intl.locale !== toReactIntlLang(lang) &&
232
+ !subrequest &&
233
+ config.settings.supportedLanguages.includes(lang)
234
+ ) {
235
+ const langFileName = toGettextLang(lang);
236
+ import('~/../locales/' + langFileName + '.json').then(
237
+ (locale) => {
238
+ dispatch(changeLanguage(lang, locale.default));
239
+ },
240
+ );
241
+ }
242
+ }
243
+ if (type === LOGIN && settings.websockets) {
244
+ const cookies = new Cookies();
245
+ cookies.set(
246
+ 'auth_token',
247
+ result.token,
248
+ getCookieOptions({
249
+ expires: new Date(jwtDecode(result.token).exp * 1000),
250
+ }),
253
251
  );
254
- socket.onmessage = (message) => {
255
- const packet = JSON.parse(message.data);
256
- if (packet.error) {
257
- dispatch({
258
- type: `${packet.id}_FAIL`,
259
- error: packet.error,
260
- });
261
- } else {
262
- dispatch({
263
- type: `${packet.id}_SUCCESS`,
264
- result: JSON.parse(packet.data),
265
- });
266
- }
267
- };
268
- });
269
- }
270
- try {
271
- return next({ ...rest, result, type: `${type}_SUCCESS` });
272
- } catch (error) {
273
- // There was an exception while processing reducers or downstream middleware.
274
- next({
275
- ...rest,
276
- error: { status: 500, error },
277
- type: `${type}_FAIL`,
278
- });
279
- // Rethrow the original exception on the client side only,
280
- // so it doesn't fall through to express on the server.
281
- if (__CLIENT__) throw error;
282
- }
283
- },
284
- (error) => {
285
- // Only SSR can set ECONNREFUSED
286
- if (error.code === 'ECONNREFUSED') {
287
- next({
288
- ...rest,
289
- error,
290
- statusCode: error.code,
291
- connectionRefused: true,
292
- type: SET_APIERROR,
293
- });
294
- }
295
-
296
- // Response error is marked crossDomain if CORS error happen
297
- else if (error.crossDomain) {
298
- next({
299
- ...rest,
300
- error,
301
- statusCode: 'CORSERROR',
302
- connectionRefused: false,
303
- type: SET_APIERROR,
304
- });
305
- }
306
-
307
- // Check for actions who can raise api errors
308
- if (settings.actions_raising_api_errors.includes(action.type)) {
309
- // Gateway timeout
310
- if (error?.response?.statusCode === 504) {
311
- next({
312
- ...rest,
313
- error,
314
- statusCode: error.code,
315
- connectionRefused: true,
316
- type: SET_APIERROR,
252
+ api.get('/@wstoken').then((res) => {
253
+ socket = new WebSocket(
254
+ `${settings.apiPath.replace('http', 'ws')}/@ws?ws_token=${
255
+ res.token
256
+ }`,
257
+ );
258
+ socket.onmessage = (message) => {
259
+ const packet = JSON.parse(message.data);
260
+ if (packet.error) {
261
+ dispatch({
262
+ type: `${packet.id}_FAIL`,
263
+ error: packet.error,
264
+ });
265
+ } else {
266
+ dispatch({
267
+ type: `${packet.id}_SUCCESS`,
268
+ result: JSON.parse(packet.data),
269
+ });
270
+ }
271
+ };
317
272
  });
318
273
  }
319
-
320
- // Redirect
321
- else if (error?.code === 301) {
274
+ try {
275
+ return next({ ...rest, result, type: `${type}_SUCCESS` });
276
+ } catch (error) {
277
+ // There was an exception while processing reducers or downstream middleware.
322
278
  next({
323
279
  ...rest,
324
- error,
325
- statusCode: error.code,
326
- connectionRefused: false,
327
- type: SET_APIERROR,
280
+ error: { status: 500, error },
281
+ type: `${type}_FAIL`,
328
282
  });
283
+ // Rethrow the original exception on the client side only,
284
+ // so it doesn't fall through to express on the server.
285
+ if (__CLIENT__) throw error;
329
286
  }
330
-
331
- // Redirect
332
- else if (error?.code === 408) {
287
+ },
288
+ (error) => {
289
+ // Only SSR can set ECONNREFUSED
290
+ if (error.code === 'ECONNREFUSED') {
333
291
  next({
334
292
  ...rest,
335
293
  error,
336
294
  statusCode: error.code,
337
- connectionRefused: false,
295
+ connectionRefused: true,
338
296
  type: SET_APIERROR,
339
297
  });
340
298
  }
341
299
 
342
- // Unauthorized
343
- else if (error?.response?.statusCode === 401) {
300
+ // Response error is marked crossDomain if CORS error happen
301
+ else if (error.crossDomain) {
344
302
  next({
345
303
  ...rest,
346
304
  error,
347
- statusCode: error.response,
348
- message: error.response.body.message,
305
+ statusCode: 'CORSERROR',
349
306
  connectionRefused: false,
350
307
  type: SET_APIERROR,
351
308
  });
352
309
  }
353
- }
354
- return next({ ...rest, error, type: `${type}_FAIL` });
355
- },
356
- );
357
- }
358
310
 
359
- return actionPromise;
360
- };
311
+ // Check for actions who can raise api errors
312
+ if (settings.actions_raising_api_errors.includes(action.type)) {
313
+ // Gateway timeout
314
+ if (error?.response?.statusCode === 504) {
315
+ next({
316
+ ...rest,
317
+ error,
318
+ statusCode: error.code,
319
+ connectionRefused: true,
320
+ type: SET_APIERROR,
321
+ });
322
+ }
323
+
324
+ // Redirect
325
+ else if (error?.code === 301) {
326
+ next({
327
+ ...rest,
328
+ error,
329
+ statusCode: error.code,
330
+ connectionRefused: false,
331
+ type: SET_APIERROR,
332
+ });
333
+ }
334
+
335
+ // Redirect
336
+ else if (error?.code === 408) {
337
+ next({
338
+ ...rest,
339
+ error,
340
+ statusCode: error.code,
341
+ connectionRefused: false,
342
+ type: SET_APIERROR,
343
+ });
344
+ }
345
+
346
+ // Unauthorized
347
+ else if (error?.response?.statusCode === 401) {
348
+ next({
349
+ ...rest,
350
+ error,
351
+ statusCode: error.response,
352
+ message: error.response.body.message,
353
+ connectionRefused: false,
354
+ type: SET_APIERROR,
355
+ });
356
+ }
357
+ }
358
+ return next({ ...rest, error, type: `${type}_FAIL` });
359
+ },
360
+ );
361
+ }
362
+
363
+ return actionPromise;
364
+ };
361
365
 
362
366
  export default apiMiddlewareFactory;
@@ -5,43 +5,45 @@
5
5
  import config from '@plone/volto/registry';
6
6
  import { matchPath } from 'react-router';
7
7
 
8
- const blacklistRoutes = ({ dispatch, getState }) => (next) => (action) => {
9
- if (typeof action === 'function') {
10
- return next(action);
11
- }
12
-
13
- switch (action.type) {
14
- case '@@router/LOCATION_CHANGE':
15
- let { pathname } = action.payload.location;
16
- const { externalRoutes = [] } = config.settings;
8
+ const blacklistRoutes =
9
+ ({ dispatch, getState }) =>
10
+ (next) =>
11
+ (action) => {
12
+ if (typeof action === 'function') {
13
+ return next(action);
14
+ }
17
15
 
18
- const route = externalRoutes.find((route) =>
19
- matchPath(pathname, route.match),
20
- );
16
+ switch (action.type) {
17
+ case '@@router/LOCATION_CHANGE':
18
+ let { pathname } = action.payload.location;
19
+ const { externalRoutes = [] } = config.settings;
21
20
 
22
- let actionToSend = action;
23
- if (pathname.startsWith('/++api++')) {
24
- actionToSend.payload.location.pathname = actionToSend.payload.location.pathname.substring(
25
- 8,
21
+ const route = externalRoutes.find((route) =>
22
+ matchPath(pathname, route.match),
26
23
  );
27
- // To handle the `window.location.replace`
28
- pathname = actionToSend.payload.location.pathname;
29
- if (window.history) {
30
- window.history.replaceState(window.history.state, '', pathname);
24
+
25
+ let actionToSend = action;
26
+ if (pathname.startsWith('/++api++')) {
27
+ actionToSend.payload.location.pathname =
28
+ actionToSend.payload.location.pathname.substring(8);
29
+ // To handle the `window.location.replace`
30
+ pathname = actionToSend.payload.location.pathname;
31
+ if (window.history) {
32
+ window.history.replaceState(window.history.state, '', pathname);
33
+ }
31
34
  }
32
- }
33
35
 
34
- if (!route) {
35
- return next(actionToSend);
36
- } else {
37
- window.location.replace(
38
- route.url ? route.url(actionToSend.payload) : pathname,
39
- );
40
- }
41
- break;
42
- default:
43
- return next(action);
44
- }
45
- };
36
+ if (!route) {
37
+ return next(actionToSend);
38
+ } else {
39
+ window.location.replace(
40
+ route.url ? route.url(actionToSend.payload) : pathname,
41
+ );
42
+ }
43
+ break;
44
+ default:
45
+ return next(action);
46
+ }
47
+ };
46
48
 
47
- export default blacklistRoutes;
49
+ export default blacklistRoutes;
@@ -11,8 +11,8 @@ export const viewDate = (locale, value, format) => {
11
11
  ? // Since we assume UTC everywhere, then transform to local (momentjs default)
12
12
  moment(value)
13
13
  : value.match(/T(.)/g)
14
- ? moment(`${value}Z`) // This might happen in old Plone versions dates
15
- : moment(value); //This when date is like '2021-05-05'
14
+ ? moment(`${value}Z`) // This might happen in old Plone versions dates
15
+ : moment(value); //This when date is like '2021-05-05'
16
16
  } else {
17
17
  datetime = moment(value);
18
18
  }
@@ -48,6 +48,7 @@
48
48
  line-height: 17px;
49
49
  outline: none;
50
50
  vertical-align: baseline;
51
+
51
52
  input:focus ~ label::before {
52
53
  box-shadow: $gdpr-focus-shadow !important;
53
54
  outline: none !important;
@@ -63,8 +64,11 @@
63
64
  left: 0;
64
65
  border: 1px solid $gdpr-toggle-border;
65
66
  background-color: $gdpr-toggle;
66
- transition: border 0.1s ease, opacity 0.1s ease,
67
- transform 0.1s ease, box-shadow 0.1s ease;
67
+ transition:
68
+ border 0.1s ease,
69
+ opacity 0.1s ease,
70
+ transform 0.1s ease,
71
+ box-shadow 0.1s ease;
68
72
  }
69
73
 
70
74
  &:after {
@@ -151,12 +155,14 @@
151
155
  width: 1.5rem;
152
156
  height: 1.5rem;
153
157
  border: 1.5px solid $gdpr-toggle-border;
158
+ border-radius: 500rem;
154
159
  background: #ffffff
155
160
  linear-gradient(transparent, rgba(0, 0, 0, 0.05));
156
- border-radius: 500rem;
157
161
  content: '' !important;
158
162
  opacity: 1;
159
- transition: background 0.3s ease, left 0.3s ease;
163
+ transition:
164
+ background 0.3s ease,
165
+ left 0.3s ease;
160
166
  }
161
167
  }
162
168
  }
@@ -197,8 +203,8 @@
197
203
  }
198
204
 
199
205
  button.gdpr-privacy-show-banner {
200
- margin: 0;
201
206
  border-radius: 0;
207
+ margin: 0;
202
208
  border-bottom-left-radius: 5px;
203
209
  border-top-left-radius: 5px;
204
210
  }
@@ -233,6 +239,7 @@ body.has-toolbar-collapsed {
233
239
  }
234
240
  }
235
241
  }
242
+
236
243
  .gdpr-privacy-banner
237
244
  .gdpr-privacy-content-wrapper
238
245
  .gdpr-privacy-content
@@ -38,6 +38,7 @@ $accordion-icon-color: #7fb2e5;
38
38
  top: -7px;
39
39
  right: 0;
40
40
  left: unset;
41
+
41
42
  &:focus {
42
43
  outline: 1px solid $focus-outline-color;
43
44
  }
@@ -63,6 +64,7 @@ $accordion-icon-color: #7fb2e5;
63
64
  padding: 0 0.4em;
64
65
  border: none;
65
66
  background: none;
67
+
66
68
  &:focus {
67
69
  outline: 1px solid $focus-outline-color;
68
70
  }
@@ -55,8 +55,8 @@
55
55
  }
56
56
 
57
57
  img.left-image {
58
- object-fit: unset;
59
58
  max-width: 80%;
59
+ object-fit: unset;
60
60
 
61
61
  &.size {
62
62
  &-m {
@@ -18,6 +18,7 @@
18
18
  .card-body {
19
19
  display: flex;
20
20
  flex-direction: column;
21
+ justify-content: space-between;
21
22
  padding: 2.5rem;
22
23
  padding-bottom: 0rem;
23
24
  }
@@ -50,9 +51,13 @@
50
51
  }
51
52
 
52
53
  // tablet
53
- @media (max-width: 1367px) and (min-width: 586px) {
54
+ @media (min-width: 586px) and (max-width: 1367px) {
54
55
  .bandi-in-evidence-cards-wrapper {
55
56
  grid-template-columns: auto auto;
57
+
58
+ div.read-more a.read-more {
59
+ flex-direction: row;
60
+ }
56
61
  }
57
62
  }
58
63