@eeacms/volto-cca-policy 1.0.3 → 1.0.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 +41 -0
- package/locales/bg/LC_MESSAGES/volto.po +576 -0
- package/locales/cs/LC_MESSAGES/volto.po +576 -0
- package/locales/da/LC_MESSAGES/volto.po +576 -0
- package/locales/de/LC_MESSAGES/volto.po +576 -0
- package/locales/el/LC_MESSAGES/volto.po +576 -0
- package/locales/en/LC_MESSAGES/volto.po +576 -0
- package/locales/es/LC_MESSAGES/volto.po +576 -0
- package/locales/et/LC_MESSAGES/volto.po +576 -0
- package/locales/fi/LC_MESSAGES/volto.po +576 -0
- package/locales/fr/LC_MESSAGES/volto.po +576 -0
- package/locales/ga/LC_MESSAGES/volto.po +576 -0
- package/locales/hr/LC_MESSAGES/volto.po +576 -0
- package/locales/hu/LC_MESSAGES/volto.po +576 -0
- package/locales/is/LC_MESSAGES/volto.po +576 -0
- package/locales/it/LC_MESSAGES/volto.po +576 -0
- package/locales/lt/LC_MESSAGES/volto.po +576 -0
- package/locales/lv/LC_MESSAGES/volto.po +576 -0
- package/locales/mt/LC_MESSAGES/volto.po +576 -0
- package/locales/nl/LC_MESSAGES/volto.po +576 -0
- package/locales/nn/LC_MESSAGES/volto.po +576 -0
- package/locales/pl/LC_MESSAGES/volto.po +576 -0
- package/locales/pt/LC_MESSAGES/volto.po +576 -0
- package/locales/ro/LC_MESSAGES/volto.po +576 -0
- package/locales/sk/LC_MESSAGES/volto.po +576 -0
- package/locales/sl/LC_MESSAGES/volto.po +576 -0
- package/locales/sv/LC_MESSAGES/volto.po +576 -0
- package/locales/tr/LC_MESSAGES/volto.po +576 -0
- package/locales/volto.pot +577 -1
- package/package.json +1 -1
- package/src/components/Search/NavigatorCatalogue/NavigatorCatalogueCardItem.jsx +10 -14
- package/src/components/Search/NavigatorCatalogue/NavigatorCatalogueCardItem.test.jsx +6 -0
- package/src/components/Search/NavigatorCatalogue/NavigatorCatalogueContentView.jsx +1 -1
- package/src/components/Search/NavigatorCatalogue/NavigatorCatalogueMapView.jsx +268 -7
- package/src/components/Search/NavigatorCatalogue/NavigatorCatalogueMapView.test.jsx +160 -0
- package/src/components/Search/NavigatorCatalogue/utils.js +56 -0
- package/src/components/theme/CompareTools/CompareToolsView.jsx +15 -8
- package/src/components/theme/CompareTools/CompareToolsView.test.jsx +110 -0
- package/src/constants.js +0 -48
- package/theme/globals/navigator.less +178 -55
- package/artifacts/BLOCKS.md +0 -167
- package/artifacts/link-integrity-workflow/README.md +0 -76
- package/artifacts/link-integrity-workflow/index.md +0 -33
- package/artifacts/link-integrity-workflow/link-integrity-block-fields-report.md +0 -132
- package/artifacts/link-integrity-workflow/link-integrity-blocks-report.md +0 -52
- package/artifacts/link-integrity-workflow/understanding-link-integrity.md +0 -143
- package/artifacts/link-integrity-workflow/volto-block-link-analysis.md +0 -63
- package/artifacts/link-integrity-workflow/volto-block-link-discovery.md +0 -60
- package/artifacts/test-fixes/test-fixes-specification.md +0 -267
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '@testing-library/jest-dom';
|
|
3
|
+
import { render, screen } from '@testing-library/react';
|
|
4
|
+
import { IntlProvider } from 'react-intl';
|
|
5
|
+
import { useAtom } from 'jotai';
|
|
6
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
7
|
+
import { useHistory, useLocation } from 'react-router-dom';
|
|
8
|
+
import CompareToolsView from './CompareToolsView';
|
|
9
|
+
import { fetchResultsByUid } from './utils';
|
|
10
|
+
|
|
11
|
+
jest.mock('jotai', () => ({
|
|
12
|
+
...jest.requireActual('jotai'),
|
|
13
|
+
useAtom: jest.fn(),
|
|
14
|
+
}));
|
|
15
|
+
|
|
16
|
+
jest.mock('react-redux', () => ({
|
|
17
|
+
useDispatch: jest.fn(),
|
|
18
|
+
useSelector: jest.fn(),
|
|
19
|
+
}));
|
|
20
|
+
|
|
21
|
+
jest.mock('react-router-dom', () => ({
|
|
22
|
+
useHistory: jest.fn(),
|
|
23
|
+
useLocation: jest.fn(),
|
|
24
|
+
}));
|
|
25
|
+
|
|
26
|
+
jest.mock('@plone/volto/helpers/Helmet/Helmet', () => () => null);
|
|
27
|
+
jest.mock('@plone/volto/helpers/BodyClass/BodyClass', () => () => null);
|
|
28
|
+
jest.mock('../BannerTitle/BannerTitle', () => () => null);
|
|
29
|
+
jest.mock(
|
|
30
|
+
'@plone/volto/components/manage/UniversalLink/UniversalLink',
|
|
31
|
+
() =>
|
|
32
|
+
({ children, href, ...props }) => (
|
|
33
|
+
<a href={href} {...props}>
|
|
34
|
+
{children}
|
|
35
|
+
</a>
|
|
36
|
+
),
|
|
37
|
+
);
|
|
38
|
+
jest.mock('@plone/volto/registry', () => ({
|
|
39
|
+
__esModule: true,
|
|
40
|
+
default: {
|
|
41
|
+
settings: {
|
|
42
|
+
searchlib: {
|
|
43
|
+
searchui: {
|
|
44
|
+
navigatorCatalogueSearch: {
|
|
45
|
+
landingPageURL: '/en/navigator/tool-catalogue',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
}));
|
|
52
|
+
|
|
53
|
+
jest.mock('./utils', () => ({
|
|
54
|
+
MAX_COMPARE_TOOLS: 4,
|
|
55
|
+
compareToolsAtom: {},
|
|
56
|
+
fetchResultsByUid: jest.fn(),
|
|
57
|
+
getCompareToolUid: (result) => result.cca_uid?.raw || '',
|
|
58
|
+
getPathname: (url) => url?.split('?')[0] || '',
|
|
59
|
+
}));
|
|
60
|
+
|
|
61
|
+
describe('CompareToolsView accessibility', () => {
|
|
62
|
+
beforeEach(() => {
|
|
63
|
+
jest.clearAllMocks();
|
|
64
|
+
useAtom.mockReturnValue([[], jest.fn()]);
|
|
65
|
+
useDispatch.mockReturnValue(jest.fn());
|
|
66
|
+
useSelector.mockReturnValue('en');
|
|
67
|
+
useHistory.mockReturnValue({ push: jest.fn() });
|
|
68
|
+
useLocation.mockReturnValue({
|
|
69
|
+
pathname: '/en/navigator/compare',
|
|
70
|
+
search: '?uid=one&uid=two',
|
|
71
|
+
hash: '',
|
|
72
|
+
state: {},
|
|
73
|
+
});
|
|
74
|
+
fetchResultsByUid.mockResolvedValue([
|
|
75
|
+
{
|
|
76
|
+
cca_uid: { raw: 'one' },
|
|
77
|
+
title: 'Tool one',
|
|
78
|
+
href: '/tool-one',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
cca_uid: { raw: 'two' },
|
|
82
|
+
title: 'Tool two',
|
|
83
|
+
href: '/tool-two',
|
|
84
|
+
},
|
|
85
|
+
]);
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
it('labels the table, row headers, and remove actions', async () => {
|
|
89
|
+
render(
|
|
90
|
+
<IntlProvider locale="en">
|
|
91
|
+
<CompareToolsView />
|
|
92
|
+
</IntlProvider>,
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
expect(
|
|
96
|
+
await screen.findByRole('table', { name: 'Compare tools' }),
|
|
97
|
+
).toBeInTheDocument();
|
|
98
|
+
expect(
|
|
99
|
+
screen.getByRole('rowheader', { name: 'Usability' }),
|
|
100
|
+
).toHaveAttribute('scope', 'row');
|
|
101
|
+
expect(
|
|
102
|
+
screen.getByRole('rowheader', { name: 'Functionality' }),
|
|
103
|
+
).toHaveAttribute('scope', 'row');
|
|
104
|
+
expect(
|
|
105
|
+
screen.getByRole('button', {
|
|
106
|
+
name: 'Remove Tool one from comparison',
|
|
107
|
+
}),
|
|
108
|
+
).toBeInTheDocument();
|
|
109
|
+
});
|
|
110
|
+
});
|
package/src/constants.js
CHANGED
|
@@ -123,54 +123,6 @@ export const DOWNLOAD_MISSION_FUNDING_FIELDS = [
|
|
|
123
123
|
},
|
|
124
124
|
];
|
|
125
125
|
|
|
126
|
-
// Download fields for mission content types
|
|
127
|
-
// Don't delete - might be needed later (ticket refs #295149)
|
|
128
|
-
// export const DOWNLOAD_MISSION_STORIES_FIELDS = [
|
|
129
|
-
// { field: 'about', name: 'About' },
|
|
130
|
-
// { field: 'title', name: 'Title' },
|
|
131
|
-
// { field: 'main_content', name: 'Content' },
|
|
132
|
-
// { field: 'created', name: 'Creation Date' },
|
|
133
|
-
// { field: 'issued', name: 'Issued Date' },
|
|
134
|
-
// { field: 'cca_climate_impacts', name: 'Climate impact' },
|
|
135
|
-
// { field: 'cca_adaptation_sectors', name: 'Sectors' },
|
|
136
|
-
// { field: 'key_system', name: 'Key Community Systems' },
|
|
137
|
-
// { field: 'cca_funding_programme', name: 'Funding programme' },
|
|
138
|
-
// {
|
|
139
|
-
// field: 'spatial',
|
|
140
|
-
// name: 'Countries ',
|
|
141
|
-
// },
|
|
142
|
-
// { field: 'cca_keywords', name: 'Keywords' },
|
|
143
|
-
// ];
|
|
144
|
-
|
|
145
|
-
// export const DOWNLOAD_MISSION_PROJECTS_FIELDS = [
|
|
146
|
-
// { field: 'about', name: 'About' },
|
|
147
|
-
// { field: 'title', name: 'Title' },
|
|
148
|
-
// { field: 'main_content', name: 'Content' },
|
|
149
|
-
// { field: 'created', name: 'Creation Date' },
|
|
150
|
-
// { field: 'issued', name: 'Issued Date' },
|
|
151
|
-
// { field: 'cca_keywords', name: 'Keywords' },
|
|
152
|
-
// { field: 'cca_funding_programme', name: 'Funding Programme' },
|
|
153
|
-
// { field: 'cca_climate_impacts', name: 'Climate impact' },
|
|
154
|
-
// { field: 'cca_adaptation_elements', name: 'Adaptation Approaches' },
|
|
155
|
-
// { field: 'cca_adaptation_sectors', name: 'Sectors' },
|
|
156
|
-
// { field: 'cca_geographic_countries', name: 'Countries' },
|
|
157
|
-
// ];
|
|
158
|
-
|
|
159
|
-
// export const DOWNLOAD_MISSION_TOOLS_FIELDS = [
|
|
160
|
-
// { field: 'about', name: 'About' },
|
|
161
|
-
// { field: 'title', name: 'Title' },
|
|
162
|
-
// { field: 'main_content', name: 'Content' },
|
|
163
|
-
// { field: 'created', name: 'Creation Date' },
|
|
164
|
-
// { field: 'issued', name: 'Issued Date' },
|
|
165
|
-
// { field: 'cca_rast_steps', name: 'RAST step(s) of relevance' },
|
|
166
|
-
// { field: 'cca_geographical_scale', name: 'Geographical scale' },
|
|
167
|
-
// { field: 'cca_climate_impacts', name: 'Climate impact' },
|
|
168
|
-
// { field: 'cca_tool_language', name: 'Language(s) of the tool' },
|
|
169
|
-
// { field: 'cca_adaptation_sectors', name: 'Sectors' },
|
|
170
|
-
// { field: 'cca_most_useful_for', name: 'Most useful for' },
|
|
171
|
-
// { field: 'cca_user_requirements', name: 'User requirements' },
|
|
172
|
-
// ];
|
|
173
|
-
|
|
174
126
|
export const EEA_LANGUAGES = [
|
|
175
127
|
{ name: 'български', code: 'bg' },
|
|
176
128
|
{ name: 'Español', code: 'es' },
|
|
@@ -8,6 +8,39 @@
|
|
|
8
8
|
@navigatorIconBackgroundColor: #f5f9fb;
|
|
9
9
|
@navigatorIconColor: #7890a2;
|
|
10
10
|
|
|
11
|
+
.navigator-small-clear-button() {
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
width: 28px;
|
|
14
|
+
height: 28px;
|
|
15
|
+
min-height: 28px;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
padding: 0 !important;
|
|
19
|
+
border: 0;
|
|
20
|
+
border-radius: 50%;
|
|
21
|
+
margin: 0 !important;
|
|
22
|
+
background: transparent;
|
|
23
|
+
box-shadow: none;
|
|
24
|
+
color: #607482;
|
|
25
|
+
line-height: 1;
|
|
26
|
+
|
|
27
|
+
i.icon {
|
|
28
|
+
display: block;
|
|
29
|
+
width: auto;
|
|
30
|
+
height: auto;
|
|
31
|
+
margin: 0 !important;
|
|
32
|
+
font-size: 1rem;
|
|
33
|
+
line-height: 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:hover,
|
|
37
|
+
&:focus {
|
|
38
|
+
background: #e8f0f5;
|
|
39
|
+
box-shadow: none;
|
|
40
|
+
color: #30495b;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
11
44
|
.navigator-tool-icon {
|
|
12
45
|
display: inline-flex;
|
|
13
46
|
flex: 0 0 auto;
|
|
@@ -154,37 +187,8 @@
|
|
|
154
187
|
}
|
|
155
188
|
|
|
156
189
|
.ui.button.compare-panel-tool-clear {
|
|
157
|
-
|
|
158
|
-
width: 28px;
|
|
159
|
-
height: 28px;
|
|
160
|
-
min-height: 28px;
|
|
190
|
+
.navigator-small-clear-button();
|
|
161
191
|
flex: 0 0 auto;
|
|
162
|
-
align-items: center;
|
|
163
|
-
justify-content: center;
|
|
164
|
-
padding: 0 !important;
|
|
165
|
-
border: 0;
|
|
166
|
-
border-radius: 50%;
|
|
167
|
-
margin: 0 !important;
|
|
168
|
-
background: transparent;
|
|
169
|
-
box-shadow: none;
|
|
170
|
-
color: #607482;
|
|
171
|
-
line-height: 1;
|
|
172
|
-
|
|
173
|
-
i.icon {
|
|
174
|
-
display: block;
|
|
175
|
-
width: auto;
|
|
176
|
-
height: auto;
|
|
177
|
-
margin: 0 !important;
|
|
178
|
-
font-size: 1rem;
|
|
179
|
-
line-height: 1;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
&:hover,
|
|
183
|
-
&:focus {
|
|
184
|
-
background: #e8f0f5;
|
|
185
|
-
box-shadow: none;
|
|
186
|
-
color: #30495b;
|
|
187
|
-
}
|
|
188
192
|
}
|
|
189
193
|
|
|
190
194
|
.compare-panel-actions {
|
|
@@ -320,7 +324,8 @@
|
|
|
320
324
|
table-layout: fixed;
|
|
321
325
|
|
|
322
326
|
thead th,
|
|
323
|
-
tbody td
|
|
327
|
+
tbody td,
|
|
328
|
+
tbody th {
|
|
324
329
|
border-color: @navigatorBorderColor;
|
|
325
330
|
}
|
|
326
331
|
|
|
@@ -335,15 +340,18 @@
|
|
|
335
340
|
vertical-align: bottom;
|
|
336
341
|
}
|
|
337
342
|
|
|
338
|
-
tbody td
|
|
343
|
+
tbody td,
|
|
344
|
+
tbody th {
|
|
339
345
|
min-height: 84px;
|
|
340
346
|
padding: 1.35rem 1.25rem;
|
|
341
347
|
line-height: 1.45;
|
|
342
348
|
vertical-align: top;
|
|
343
349
|
background: #fff;
|
|
350
|
+
font-weight: inherit;
|
|
351
|
+
text-align: left;
|
|
344
352
|
}
|
|
345
353
|
|
|
346
|
-
tbody
|
|
354
|
+
tbody th:first-child {
|
|
347
355
|
background: @navigatorCriteriaBackgroundColor;
|
|
348
356
|
}
|
|
349
357
|
}
|
|
@@ -430,40 +438,144 @@
|
|
|
430
438
|
}
|
|
431
439
|
}
|
|
432
440
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
441
|
+
.navigator-catalogue-map {
|
|
442
|
+
display: grid;
|
|
443
|
+
width: 100%;
|
|
444
|
+
height: 600px;
|
|
445
|
+
min-height: 600px;
|
|
446
|
+
align-items: stretch;
|
|
447
|
+
gap: 1.5rem;
|
|
448
|
+
grid-template-columns: minmax(0, 4fr) minmax(12rem, 1fr);
|
|
449
|
+
|
|
450
|
+
.ol-map-wrapper,
|
|
451
|
+
.ol-map {
|
|
452
|
+
height: 600px;
|
|
436
453
|
}
|
|
437
454
|
|
|
438
|
-
.
|
|
439
|
-
|
|
440
|
-
|
|
455
|
+
.navigator-catalogue-map-canvas {
|
|
456
|
+
position: relative;
|
|
457
|
+
min-width: 0;
|
|
458
|
+
height: 100%;
|
|
441
459
|
}
|
|
442
460
|
|
|
443
|
-
.
|
|
461
|
+
.ol-map {
|
|
462
|
+
width: 100%;
|
|
463
|
+
height: 100%;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.ol-layer {
|
|
467
|
+
transition: opacity 0.3s ease;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.navigator-catalogue-map-loading {
|
|
472
|
+
display: flex;
|
|
473
|
+
min-height: 400px;
|
|
474
|
+
align-items: center;
|
|
475
|
+
justify-content: center;
|
|
476
|
+
color: #7c8a96;
|
|
477
|
+
font-size: 1rem;
|
|
478
|
+
gap: 1rem;
|
|
479
|
+
|
|
480
|
+
i.icon.loading {
|
|
481
|
+
font-size: 1.5rem;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.navigator-catalogue-map-tooltip {
|
|
486
|
+
position: absolute;
|
|
487
|
+
z-index: 1000;
|
|
488
|
+
min-width: 200px;
|
|
489
|
+
max-width: 280px;
|
|
490
|
+
padding: 1em;
|
|
491
|
+
margin-top: -10px;
|
|
492
|
+
margin-left: 15px;
|
|
493
|
+
background: #fff;
|
|
494
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
|
|
495
|
+
pointer-events: auto;
|
|
496
|
+
|
|
497
|
+
.tooltip-header {
|
|
498
|
+
font-size: 16px;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.tooltip-body {
|
|
502
|
+
margin: 1em 0;
|
|
503
|
+
font-size: 0.875rem;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.tooltip-actions {
|
|
507
|
+
.ui.button {
|
|
508
|
+
width: 100%;
|
|
509
|
+
margin: 0;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.ui.button.tooltip-close {
|
|
514
|
+
.navigator-small-clear-button();
|
|
515
|
+
position: absolute;
|
|
516
|
+
top: 0.5rem;
|
|
517
|
+
right: 0.5rem;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.navigator-catalogue-map-legend {
|
|
522
|
+
font-size: 16px;
|
|
523
|
+
|
|
524
|
+
.legend-title {
|
|
525
|
+
margin-top: 0;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.legend-item {
|
|
444
529
|
display: flex;
|
|
445
|
-
min-height: 320px;
|
|
446
530
|
align-items: center;
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
color: @navigatorMetaTextColor;
|
|
450
|
-
gap: 1rem;
|
|
531
|
+
padding: 0.2rem 0;
|
|
532
|
+
gap: 0.5rem;
|
|
451
533
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
534
|
+
.legend-color {
|
|
535
|
+
display: inline-block;
|
|
536
|
+
width: 16px;
|
|
537
|
+
height: 16px;
|
|
538
|
+
flex-shrink: 0;
|
|
455
539
|
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
456
542
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
543
|
+
@media only screen and (max-width: 768px) {
|
|
544
|
+
.navigator-catalogue-map {
|
|
545
|
+
height: auto;
|
|
546
|
+
min-height: 0;
|
|
547
|
+
grid-template-columns: minmax(0, 1fr);
|
|
461
548
|
|
|
462
|
-
|
|
463
|
-
|
|
549
|
+
.navigator-catalogue-map-canvas {
|
|
550
|
+
height: 400px;
|
|
551
|
+
min-height: 350px;
|
|
464
552
|
}
|
|
465
553
|
}
|
|
466
554
|
|
|
555
|
+
.navigator-catalogue-map-tooltip {
|
|
556
|
+
top: auto !important;
|
|
557
|
+
bottom: 1rem;
|
|
558
|
+
left: 50% !important;
|
|
559
|
+
margin-left: 0;
|
|
560
|
+
transform: translateX(-50%);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.navigator-catalogue-map-legend {
|
|
564
|
+
width: 100%;
|
|
565
|
+
box-sizing: border-box;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
body.searchlib-page .searchapp-navigatorCatalogueSearch {
|
|
570
|
+
.back-link {
|
|
571
|
+
display: none;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.search-input,
|
|
575
|
+
.sui-search-box {
|
|
576
|
+
margin-bottom: 2rem;
|
|
577
|
+
}
|
|
578
|
+
|
|
467
579
|
.ui.right.sidebar {
|
|
468
580
|
background-color: #fff;
|
|
469
581
|
box-shadow: -4px 0 4px rgba(0, 0, 0, 0.25);
|
|
@@ -687,12 +799,22 @@ body.searchlib-page .searchapp-navigatorCatalogueSearch {
|
|
|
687
799
|
background: #ddd8f5;
|
|
688
800
|
color: #51458a;
|
|
689
801
|
}
|
|
802
|
+
|
|
803
|
+
&.more {
|
|
804
|
+
border: 0;
|
|
805
|
+
cursor: pointer;
|
|
806
|
+
font-family: inherit;
|
|
807
|
+
}
|
|
690
808
|
}
|
|
691
809
|
|
|
692
810
|
.navigator-guide-search {
|
|
693
811
|
.navigator-guide-header {
|
|
694
812
|
margin-bottom: 2rem;
|
|
695
813
|
text-align: center;
|
|
814
|
+
|
|
815
|
+
h2 {
|
|
816
|
+
margin-top: 0.5em;
|
|
817
|
+
}
|
|
696
818
|
}
|
|
697
819
|
|
|
698
820
|
.navigator-guide-preview-header {
|
|
@@ -705,10 +827,11 @@ body.searchlib-page .searchapp-navigatorCatalogueSearch {
|
|
|
705
827
|
|
|
706
828
|
.navigator-guide-eyebrow,
|
|
707
829
|
.navigator-guide-preview-label {
|
|
708
|
-
font-size:
|
|
830
|
+
font-size: 13px;
|
|
709
831
|
font-weight: 700;
|
|
710
832
|
letter-spacing: 0.08em;
|
|
711
833
|
text-transform: uppercase;
|
|
834
|
+
color: @navigatorAccentColor;
|
|
712
835
|
}
|
|
713
836
|
|
|
714
837
|
.navigator-guide-layout {
|
package/artifacts/BLOCKS.md
DELETED
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
# Custom Blocks in `volto-cca-policy`
|
|
2
|
-
|
|
3
|
-
This addon registers **20 custom blocks** and extends **2 existing blocks** (Listing, Tabs Block) with new variations.
|
|
4
|
-
All blocks are installed via `src/components/manage/Blocks/index.js`.
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Custom Blocks
|
|
9
|
-
|
|
10
|
-
### AST Navigation
|
|
11
|
-
- **Block ID:** `astNavigation`
|
|
12
|
-
- **Group:** `site`
|
|
13
|
-
- **Restricted to:** Mission pages (via `blockAvailableInMission`)
|
|
14
|
-
- **What it does:** Renders a visual navigation map (logo map) for the *Adaptation Support Tool (AST)*. Supports two image types (`ast` and `uast`). Editors configure 6 linked items that map to clickable regions on the logo image. Clicking a region navigates to the corresponding content page.
|
|
15
|
-
|
|
16
|
-
### C3S Indicators Glossary
|
|
17
|
-
- **Block ID:** `c3SIndicatorsGlossaryBlock`
|
|
18
|
-
- **Group:** `site`
|
|
19
|
-
- **Restricted to:** Mission pages
|
|
20
|
-
- **What it does:** Displays a glossary table of C3S (Copernicus Climate Change Service) indicator terms. The content is provided by a server-side `@components` view (`c3s_indicators_glossary_table`) and rendered as raw HTML.
|
|
21
|
-
|
|
22
|
-
### C3S Indicators Listing
|
|
23
|
-
- **Block ID:** `c3SIndicatorListingBlock`
|
|
24
|
-
- **Group:** `site`
|
|
25
|
-
- **Restricted to:** Mission pages
|
|
26
|
-
- **What it does:** Renders a description and a linked list of C3S indicators. Content (description text + item list with URLs) is provided by the server-side `@components` view `c3s_indicators_listing`.
|
|
27
|
-
|
|
28
|
-
### C3S Indicators Overview
|
|
29
|
-
- **Block ID:** `c3SIndicatorsOverviewBlock`
|
|
30
|
-
- **Group:** `site`
|
|
31
|
-
- **Restricted to:** Mission pages
|
|
32
|
-
- **What it does:** Displays an HTML description/overview of C3S indicators, fetched from the server-side `@components` view `c3s_indicators_overview`.
|
|
33
|
-
|
|
34
|
-
### Case Study Explorer
|
|
35
|
-
- **Block ID:** `caseStudyExplorer`
|
|
36
|
-
- **Group:** `site`
|
|
37
|
-
- **Restricted to:** Mission pages
|
|
38
|
-
- **What it does:** An interactive map-based explorer for climate adaptation case studies. Loads case study data from an ArcGIS JSON endpoint (`@@case-studies-map.arcgis.json`). Provides filter controls (sectors, impacts, etc.) and an interactive map with clickable features. Supports URL-based filter parameters.
|
|
39
|
-
|
|
40
|
-
### Collection Statistics
|
|
41
|
-
- **Block ID:** `collectionStats`
|
|
42
|
-
- **Group:** `site`
|
|
43
|
-
- **What it does:** Displays aggregated statistics for a content collection. Shows two groups of stats with icons and counts:
|
|
44
|
-
- **Health impacts:** Climate-sensitive diseases, Heat, Wildfires, Droughts and floods, Air pollution and aero-allergens
|
|
45
|
-
- **Content types:** Adaptation options, Case studies, Guidance, Indicators, Information portals, Organisations, Publications, Research projects, Tools, Videos
|
|
46
|
-
- Stats are computed from query stats via `getQueryStats` and can link to filtered search results.
|
|
47
|
-
|
|
48
|
-
### Content Links
|
|
49
|
-
- **Block ID:** `contentLinks`
|
|
50
|
-
- **Group:** `site`
|
|
51
|
-
- **Variations:**
|
|
52
|
-
- `default` — Simple list of linked content items
|
|
53
|
-
- `navigationList` — Navigation-style list with active-state highlighting based on current URL
|
|
54
|
-
- `dropdown` — Dropdown selector for linking to content items (with configurable placeholder text)
|
|
55
|
-
- **What it does:** Displays a set of manually selected content items as links. Useful for sidebars, navigation menus, or quick-access link groups.
|
|
56
|
-
|
|
57
|
-
### Country Map Heat Index
|
|
58
|
-
- **Block ID:** `countryMapHeatIndex`
|
|
59
|
-
- **Group:** `site`
|
|
60
|
-
- **Restricted to:** Mission pages
|
|
61
|
-
- **What it does:** An interactive OpenLayers map of European countries colored by heat index data. Fetches metadata from `@@countries-heat-index-json`. Countries are highlighted with tooltips and are clickable, navigating to the respective country page. Includes a filter control and supports lazy loading via visibility sensor.
|
|
62
|
-
|
|
63
|
-
### Country Map Observatory
|
|
64
|
-
- **Block ID:** `countryMapObservatory`
|
|
65
|
-
- **Group:** `site`
|
|
66
|
-
- **Restricted to:** Mission pages
|
|
67
|
-
- **What it does:** An interactive OpenLayers map for the Health Observatory section. Renders EU countries with metadata from `@@countries-metadata-extract-2025`. Supports thematic map modes (e.g., "National adaptation policy"), tooltips, and click-to-navigate interactions. Uses WMS tile sources and lazy loading.
|
|
68
|
-
|
|
69
|
-
### Country Map Profile
|
|
70
|
-
- **Block ID:** `countryMapProfile`
|
|
71
|
-
- **Group:** `site`
|
|
72
|
-
- **Restricted to:** Mission pages
|
|
73
|
-
- **What it does:** An interactive OpenLayers map for country profiles. Renders EU countries with metadata from `@@countries-metadata-extract-2025` (including flag images). Supports thematic map modes, tooltips, click-to-navigate, and a filter control. Uses WMS tile sources and lazy loading.
|
|
74
|
-
|
|
75
|
-
### Country Profile Detail
|
|
76
|
-
- **Block ID:** `countryProfileDetail`
|
|
77
|
-
- **Group:** `site`
|
|
78
|
-
- **What it does:** Renders the detailed country profile content provided by a server-side `@components` view (`countryprofile.html`). Displays tabbed sections with accordions, including a language disclaimer for non-English content and optional top messages/accordions.
|
|
79
|
-
|
|
80
|
-
### Data Connected Embed Block
|
|
81
|
-
- **Block ID:** `data_connected_embed` (extends `@eeacms/volto-datablocks`)
|
|
82
|
-
- **What it does:** Customizes the data-connected embed block from `volto-datablocks` to inject the current page language (`lang`) as an additional query parameter. This ensures embedded data visualizations respect the page's language context. Wraps the base `ViewEmbedBlock` with Redux connectivity and `injectIntl`.
|
|
83
|
-
|
|
84
|
-
### ECDE Indicators
|
|
85
|
-
- **Block ID:** `ecdeIndicators`
|
|
86
|
-
- **Group:** `site`
|
|
87
|
-
- **Restricted to:** Mission pages
|
|
88
|
-
- **What it does:** Embeds European Climate Data Explorer (ECDE) indicator visualizations from the Copernicus Climate Data Store (CDS). Loads region data from an EEA ArcGIS service and renders interactive CDS toolbox apps (e.g., growing degree days, mean temperature) for selected European NUTS regions.
|
|
89
|
-
|
|
90
|
-
### Filter AceContent
|
|
91
|
-
- **Block ID:** `filterAceContent`
|
|
92
|
-
- **Group:** `site`
|
|
93
|
-
- **Restricted to:** Mission pages
|
|
94
|
-
- **Variations:**
|
|
95
|
-
- `simpleListing` — Listing view (default)
|
|
96
|
-
- `simpleCards` — Card grid view
|
|
97
|
-
- **What it does:** Provides a faceted search/filter interface for ACE (Adaptation Content Exchange) content. Supports filtering by bio-regions, countries, climate impacts, sectors, element types, funding programmes, macro-regions, key types, and free-text search. Uses a custom select widget with styled dropdowns.
|
|
98
|
-
|
|
99
|
-
### Flourish Visualization
|
|
100
|
-
- **Block ID:** `FlourishEmbedBlock`
|
|
101
|
-
- **Group:** `site`
|
|
102
|
-
- **What it does:** Embeds interactive data visualizations from [Flourish.studio](https://flourish.studio). Editors paste a Flourish embed code, and the block extracts the visualization URL, wraps it in an iframe with privacy protection (lazy loading via consent gate), and displays it at a fixed height of 980px.
|
|
103
|
-
|
|
104
|
-
### RAST (Related And Sub-Tree) Block
|
|
105
|
-
- **Block ID:** `rastBlock`
|
|
106
|
-
- **Group:** `site`
|
|
107
|
-
- **Restricted to:** Mission pages
|
|
108
|
-
- **What it does:** Renders a contextual navigation block showing related content and sub-items from a configurable root path. Supports skipping specific items and optionally showing subfolders. Uses `ContextNavigation` and `RASTAccordion` components to display a hierarchical accordion-style navigation tree.
|
|
109
|
-
|
|
110
|
-
### Read More
|
|
111
|
-
- **Block ID:** `readMoreBlock`
|
|
112
|
-
- **Group:** `site`
|
|
113
|
-
- **What it does:** Creates a collapsible "read more" section. Wraps all preceding sibling blocks in a height-constrained container with an expand/collapse button. Configurable properties include open/closed labels, button position, and initial height.
|
|
114
|
-
|
|
115
|
-
### Redirection Block
|
|
116
|
-
- **Block ID:** `redirectBlock`
|
|
117
|
-
- **Group:** `site`
|
|
118
|
-
- **What it does:** Automatically redirects anonymous users to a configured target URL. Logged-in users (editors) see a discreet notice showing the redirect target instead of being redirected, so they can still edit the page.
|
|
119
|
-
|
|
120
|
-
### Relevant AceContent
|
|
121
|
-
- **Block ID:** `relevantAceContent`
|
|
122
|
-
- **Group:** `site`
|
|
123
|
-
- **Restricted to:** Mission pages
|
|
124
|
-
- **What it does:** Displays a list of relevant ACE (Adaptation Content Exchange) items. Supports two modes: manually selected items and dynamically searched results (by element type, sector, search type, special tags, or search text). Can combine both modes. Renders as a simple linked list.
|
|
125
|
-
|
|
126
|
-
### Search AceContent
|
|
127
|
-
- **Block ID:** `searchAceContent`
|
|
128
|
-
- **Group:** `site`
|
|
129
|
-
- **Restricted to:** Mission pages
|
|
130
|
-
- **What it does:** Displays search results from the ACE content search API. Shows results as a linked list with translated labels and counts. Includes a "Share your information" button linking to the share page.
|
|
131
|
-
|
|
132
|
-
### Tabs Block — Spotlight Variation
|
|
133
|
-
- **Block ID:** `tabs_block` (extends `@eeacms/volto-tabs-block`)
|
|
134
|
-
- **Variation added:** `spotlight`
|
|
135
|
-
- **What it does:** Adds a "Spotlight" variation to the standard tabs block. Renders tab content with a spotlight-style layout featuring configurable icons or images (with position and size options), simple markdown support, and scroll-to-target behavior.
|
|
136
|
-
|
|
137
|
-
### Trans Region Select
|
|
138
|
-
- **Block ID:** `transRegionSelect`
|
|
139
|
-
- **Group:** `site`
|
|
140
|
-
- **Restricted to:** Mission pages
|
|
141
|
-
- **What it does:** Renders a dropdown selector for transnational regions. Fetches region data from the content's `@components` view (`transnationalregion`) and provides a dropdown with links to each region's page, plus a default "Other regions" option.
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
## Extended Standard Blocks
|
|
146
|
-
|
|
147
|
-
### Listing (standard Volto block — extended)
|
|
148
|
-
The standard Volto `listing` block is extended with **6 new variations**:
|
|
149
|
-
|
|
150
|
-
| Variation | Description |
|
|
151
|
-
|-----------|-------------|
|
|
152
|
-
| `dropdown` | Renders listed items as a dropdown selector with a configurable placeholder text |
|
|
153
|
-
| `organisationCards` | Displays items as a 4-column card grid with logo/image and description (for organisations) |
|
|
154
|
-
| `indicatorCards` | Displays C3S/Lancet Countdown indicators as styled cards with title and description |
|
|
155
|
-
| `eventCards` | Displays events as cards with date info, contact details, event URL, and EEA branding |
|
|
156
|
-
| `eventAccordion` | Displays events in an accordion layout with formatted date ranges and "read more" expand |
|
|
157
|
-
| `simpleListing` | Plain text list of linked items (minimal styling) |
|
|
158
|
-
| `simpleCards` | Generic 4-column card grid with image/logo and title |
|
|
159
|
-
|
|
160
|
-
Additionally, the listing block's `noResultsComponent` is overridden to render nothing (instead of showing "No results" text).
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
|
|
164
|
-
## Shared Utilities
|
|
165
|
-
|
|
166
|
-
- **`withResponsiveContainer.js`** — HOC that wraps map blocks in a responsive container (used by Country Map blocks)
|
|
167
|
-
- **`withVisibilitySensor.jsx`** — HOC that defers map initialization until the block is visible in the viewport (lazy loading)
|