@eeacms/volto-cca-policy 0.2.6 → 0.2.8
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 +46 -0
- package/package.json +1 -1
- package/src/components/index.js +8 -8
- package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyExplorerView.js +1 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyFilters.jsx +26 -16
- package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyMap.jsx +2 -2
- package/src/components/manage/Blocks/CaseStudyExplorer/FeatureInteraction.jsx +5 -2
- package/src/components/manage/Blocks/CaseStudyExplorer/InfoOverlay.jsx +4 -4
- package/src/components/manage/Blocks/CaseStudyExplorer/styles.less +93 -64
- package/src/components/manage/Blocks/CountryMapProfile/Interactions.jsx +24 -35
- package/src/components/manage/Blocks/RASTBlock/RASTAccordion.jsx +1 -8
- package/src/components/manage/Blocks/TabsBlock/Spotlight.jsx +2 -3
- package/src/components/manage/Blocks/TabsBlock/spotlight.less +24 -3
- package/src/components/theme/Widgets/RASTWidgetView.jsx +18 -0
- package/src/index.js +20 -20
- package/theme/extras/hero.overrides +1 -1
- package/src/components/theme/MissionDisclaimer/MissionDisclaimer.jsx +0 -24
- package/src/components/theme/Views/MissionFundingCCAView.jsx +0 -159
- package/src/components/theme/Views/MissionFundingCCAView.test.jsx +0 -104
- package/src/components/theme/Views/MissionToolView.jsx +0 -226
- package/src/components/theme/Views/MissionToolView.test.jsx +0 -154
- package/src/components/theme/Widgets/TokenWidget.jsx +0 -16
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MemoryRouter } from 'react-router-dom';
|
|
3
|
-
import configureStore from 'redux-mock-store';
|
|
4
|
-
import renderer from 'react-test-renderer';
|
|
5
|
-
import '@testing-library/jest-dom/extend-expect';
|
|
6
|
-
import { Provider } from 'react-intl-redux';
|
|
7
|
-
import MissionToolView from './MissionToolView';
|
|
8
|
-
import config from '@plone/volto/registry';
|
|
9
|
-
|
|
10
|
-
config.blocks = {
|
|
11
|
-
blocksConfig: {
|
|
12
|
-
title: {
|
|
13
|
-
view: () => <div>Title Block Component</div>,
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const mockStore = configureStore();
|
|
19
|
-
|
|
20
|
-
describe('MissionToolView', () => {
|
|
21
|
-
it('should render the component', () => {
|
|
22
|
-
const data = {
|
|
23
|
-
content: {
|
|
24
|
-
contributors: [],
|
|
25
|
-
description: 'Summary',
|
|
26
|
-
objective: {
|
|
27
|
-
'content-type': 'text/html',
|
|
28
|
-
data: '<p></p>',
|
|
29
|
-
encoding: 'utf8',
|
|
30
|
-
},
|
|
31
|
-
short_description: {
|
|
32
|
-
'content-type': 'text/html',
|
|
33
|
-
data: '<p></p>',
|
|
34
|
-
encoding: 'utf8',
|
|
35
|
-
},
|
|
36
|
-
free_keywords: {
|
|
37
|
-
'content-type': 'text/html',
|
|
38
|
-
data: '<p></p>',
|
|
39
|
-
encoding: 'utf8',
|
|
40
|
-
},
|
|
41
|
-
readiness_for_use: [
|
|
42
|
-
{
|
|
43
|
-
title: 'Tool tested in several case studies',
|
|
44
|
-
token: 'Tool tested in several case studies',
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
title: 'Tool broadly used',
|
|
48
|
-
token: 'Tool broadly used',
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
|
-
application: {
|
|
52
|
-
'content-type': 'text/html',
|
|
53
|
-
data: '<p></p>',
|
|
54
|
-
encoding: 'utf8',
|
|
55
|
-
},
|
|
56
|
-
strengths_weaknesses: {
|
|
57
|
-
'content-type': 'text/html',
|
|
58
|
-
data: '<p></p>',
|
|
59
|
-
encoding: 'utf8',
|
|
60
|
-
},
|
|
61
|
-
input: {
|
|
62
|
-
'content-type': 'text/html',
|
|
63
|
-
data: '<p></p>',
|
|
64
|
-
encoding: 'utf8',
|
|
65
|
-
},
|
|
66
|
-
output: {
|
|
67
|
-
'content-type': 'text/html',
|
|
68
|
-
data: '<p></p>',
|
|
69
|
-
encoding: 'utf8',
|
|
70
|
-
},
|
|
71
|
-
replicability: {
|
|
72
|
-
'content-type': 'text/html',
|
|
73
|
-
data: '<p></p>',
|
|
74
|
-
encoding: 'utf8',
|
|
75
|
-
},
|
|
76
|
-
materials: {
|
|
77
|
-
'content-type': 'text/html',
|
|
78
|
-
data: '<p></p>',
|
|
79
|
-
encoding: 'utf8',
|
|
80
|
-
},
|
|
81
|
-
website: {
|
|
82
|
-
'content-type': 'text/html',
|
|
83
|
-
data: '<p></p>',
|
|
84
|
-
encoding: 'utf8',
|
|
85
|
-
},
|
|
86
|
-
contact: {
|
|
87
|
-
'content-type': 'text/html',
|
|
88
|
-
data: '<p></p>',
|
|
89
|
-
encoding: 'utf8',
|
|
90
|
-
},
|
|
91
|
-
associated_project: {
|
|
92
|
-
'content-type': 'text/html',
|
|
93
|
-
data: '<p></p>',
|
|
94
|
-
encoding: 'utf8',
|
|
95
|
-
},
|
|
96
|
-
rast_steps: [
|
|
97
|
-
{
|
|
98
|
-
title: 'Step 1. Preparing the ground for adaptation',
|
|
99
|
-
token: 'STEP_1',
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
title: 'Step 4. Assessing and selecting adaptation options',
|
|
103
|
-
token: 'STEP_4',
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
geographical_scale: [
|
|
107
|
-
{
|
|
108
|
-
title: 'Item 1',
|
|
109
|
-
token: 'Item 1',
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
title: 'Item 2',
|
|
113
|
-
token: 'Item 2',
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
geographical_area: {
|
|
117
|
-
'content-type': 'text/html',
|
|
118
|
-
data: '<p></p>',
|
|
119
|
-
encoding: 'utf8',
|
|
120
|
-
},
|
|
121
|
-
sectors: [
|
|
122
|
-
{
|
|
123
|
-
title: 'Biodiversity',
|
|
124
|
-
token: 'BIODIVERSITY',
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
title: 'Coastal areas',
|
|
128
|
-
token: 'COASTAL',
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
title: 'Title here',
|
|
132
|
-
},
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
const store = mockStore({
|
|
136
|
-
userSession: { token: '1234' },
|
|
137
|
-
intl: {
|
|
138
|
-
locale: 'en',
|
|
139
|
-
messages: {},
|
|
140
|
-
},
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
const component = renderer.create(
|
|
144
|
-
<Provider store={store}>
|
|
145
|
-
<MemoryRouter>
|
|
146
|
-
<MissionToolView {...data} />
|
|
147
|
-
</MemoryRouter>
|
|
148
|
-
</Provider>,
|
|
149
|
-
);
|
|
150
|
-
|
|
151
|
-
const json = component.toJSON();
|
|
152
|
-
expect(json).toMatchSnapshot();
|
|
153
|
-
});
|
|
154
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import cx from 'classnames';
|
|
3
|
-
import Tag from '@eeacms/volto-eea-design-system/ui/Tag/Tag';
|
|
4
|
-
|
|
5
|
-
export const TokenWidget = ({ value, children, className }) =>
|
|
6
|
-
value ? (
|
|
7
|
-
<span className={cx(className, 'token', 'widget')}>
|
|
8
|
-
{value.map((tag) => (
|
|
9
|
-
<Tag href={`http://search.apps.eea.europa.eu/?q=${tag}`} key={tag}>
|
|
10
|
-
{children ? children(tag) : tag}
|
|
11
|
-
</Tag>
|
|
12
|
-
))}
|
|
13
|
-
</span>
|
|
14
|
-
) : (
|
|
15
|
-
''
|
|
16
|
-
);
|