@eeacms/volto-cca-policy 0.2.52 → 0.2.53

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/locales/volto.pot CHANGED
@@ -1,7 +1,7 @@
1
1
  msgid ""
2
2
  msgstr ""
3
3
  "Project-Id-Version: Plone\n"
4
- "POT-Creation-Date: 2024-05-13T12:26:08.591Z\n"
4
+ "POT-Creation-Date: 2024-07-11T09:19:12.102Z\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
7
  "Content-Type: text/plain; charset=utf-8\n"
@@ -13,6 +13,21 @@ msgstr ""
13
13
  "Preferred-Encodings: utf-8\n"
14
14
  "Domain: volto\n"
15
15
 
16
+ #. Default: "A background document for the event is available"
17
+ #: components/theme/Views/CcaEventView
18
+ msgid "A background document for the event is available"
19
+ msgstr ""
20
+
21
+ #. Default: "Adaptation Approaches"
22
+ #: components/manage/Blocks/CaseStudyExplorer/CaseStudyFilters
23
+ msgid "Adaptation Approaches"
24
+ msgstr ""
25
+
26
+ #. Default: "Adaptation Approaches:"
27
+ #: helpers/ContentMetadata
28
+ msgid "Adaptation Approaches:"
29
+ msgstr ""
30
+
16
31
  #. Default: "Adaptation Details"
17
32
  #: components/theme/Views/AdaptationOptionView
18
33
  msgid "Adaptation Details"
@@ -23,11 +38,6 @@ msgstr ""
23
38
  msgid "Adaptation Options Implemented In This Case"
24
39
  msgstr ""
25
40
 
26
- #. Default: "Adaptation elements:"
27
- #: helpers/ContentMetadata
28
- msgid "Adaptation elements:"
29
- msgstr ""
30
-
31
41
  #. Default: "Adaptation options"
32
42
  #: components/manage/Blocks/CaseStudyExplorer/FeatureDisplay
33
43
  msgid "Adaptation options"
@@ -227,11 +237,18 @@ msgstr ""
227
237
 
228
238
  #. Default: "Download Event"
229
239
  #: components/theme/Views/EventView
240
+ #: helpers/Utils
230
241
  msgid "Download Event"
231
242
  msgstr ""
232
243
 
244
+ #. Default: "Download the detailed agenda"
245
+ #: components/theme/Views/CcaEventView
246
+ msgid "Download the detailed agenda"
247
+ msgstr ""
248
+
233
249
  #. Default: "Download this event in iCal format"
234
250
  #: components/theme/Views/EventView
251
+ #: helpers/Utils
235
252
  msgid "Download this event in iCal format"
236
253
  msgstr ""
237
254
 
@@ -240,14 +257,9 @@ msgstr ""
240
257
  msgid "Duration:"
241
258
  msgstr ""
242
259
 
243
- #. Default: "ECDE homepage"
260
+ #. Default: "Exit fullscreen"
244
261
  #: components/theme/Views/C3SIndicatorView
245
- msgid "ECDE homepage"
246
- msgstr ""
247
-
248
- #. Default: "Explore in detail"
249
- #: components/theme/Views/C3SIndicatorView
250
- msgid "Explore in detail"
262
+ msgid "Exit fullscreen"
251
263
  msgstr ""
252
264
 
253
265
  #. Default: "Feb"
@@ -260,6 +272,11 @@ msgstr ""
260
272
  msgid "Fr"
261
273
  msgstr ""
262
274
 
275
+ #. Default: "Fullscreen"
276
+ #: components/theme/Views/C3SIndicatorView
277
+ msgid "Fullscreen"
278
+ msgstr ""
279
+
263
280
  #. Default: "Funding Programme:"
264
281
  #: helpers/ContentMetadata
265
282
  msgid "Funding Programme:"
@@ -275,11 +292,6 @@ msgstr ""
275
292
  msgid "Getting started"
276
293
  msgstr ""
277
294
 
278
- #. Default: "Go back"
279
- #: components/theme/Views/C3SIndicatorView
280
- msgid "Go back"
281
- msgstr ""
282
-
283
295
  #. Default: "Governance level:"
284
296
  #: helpers/ContentMetadata
285
297
  msgid "Governance level:"
@@ -356,6 +368,11 @@ msgstr ""
356
368
  msgid "Jun"
357
369
  msgstr ""
358
370
 
371
+ #. Default: "Key Type Measure"
372
+ #: components/manage/Blocks/FilterAceContent/FilterAceContentView
373
+ msgid "Key Type Measure"
374
+ msgstr ""
375
+
359
376
  #. Default: "Key Type Measures:"
360
377
  #: helpers/ContentMetadata
361
378
  msgid "Key Type Measures:"
@@ -478,7 +495,7 @@ msgstr ""
478
495
  msgid "Observatory contributions"
479
496
  msgstr ""
480
497
 
481
- #. Default: "Ott"
498
+ #. Default: "Oct"
482
499
  #: components/manage/Blocks/Listing/EventCardsListingView
483
500
  msgid "Oct"
484
501
  msgstr ""
@@ -601,6 +618,12 @@ msgstr ""
601
618
  msgid "See video outside Climate-ADAPT"
602
619
  msgstr ""
603
620
 
621
+ #. Default: "Select"
622
+ #: components/manage/Blocks/ContentLinks/DropdownListView
623
+ #: components/manage/Blocks/Listing/DropdownListingView
624
+ msgid "Select"
625
+ msgstr ""
626
+
604
627
  #. Default: "Select…"
605
628
  #: components/manage/Widgets/CreatableSelectWidget
606
629
  msgid "Select…"
@@ -714,6 +737,7 @@ msgstr ""
714
737
 
715
738
  #. Default: "Visit external website"
716
739
  #: components/theme/Views/EventView
740
+ #: helpers/Utils
717
741
  msgid "Visit external website"
718
742
  msgstr ""
719
743
 
@@ -724,6 +748,7 @@ msgstr ""
724
748
 
725
749
  #. Default: "Web"
726
750
  #: components/theme/Views/EventView
751
+ #: helpers/Utils
727
752
  msgid "Web"
728
753
  msgstr ""
729
754
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.2.52",
3
+ "version": "0.2.53",
4
4
  "description": "@eeacms/volto-cca-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -10,14 +10,23 @@ import { useCases } from './hooks';
10
10
 
11
11
  import './styles.less';
12
12
 
13
+ import { useLocation } from 'react-router-dom';
14
+
13
15
  const cases_url = '@@case-studies-map.arcgis.json';
14
16
 
15
17
  export default function CaseStudyExplorerView(props) {
18
+ const location = useLocation();
19
+ const searchParams = new URLSearchParams(location.search);
20
+ const querySectorValue = searchParams.get('sectors')
21
+ ? searchParams.get('sectors').split(',')
22
+ : [];
23
+
16
24
  const casesData = useCases(addAppURL(cases_url));
17
25
  const [cases, setCases] = React.useState([]);
18
26
 
27
+ const [querySectors, setQuerySectors] = React.useState(querySectorValue);
19
28
  const [activeFilters, setActiveFilters] = React.useState({
20
- sectors: [],
29
+ sectors: querySectorValue,
21
30
  impacts: [],
22
31
  elements: [],
23
32
  measures: [],
@@ -82,6 +91,8 @@ export default function CaseStudyExplorerView(props) {
82
91
  >
83
92
  <CaseStudyFilters
84
93
  filters={filters}
94
+ querySectors={querySectors}
95
+ setQuerySectors={setQuerySectors}
85
96
  activeFilters={activeFilters}
86
97
  setActiveFilters={setActiveFilters}
87
98
  />
@@ -12,7 +12,13 @@ const AccordionIcon = ({ active }) => {
12
12
  };
13
13
 
14
14
  export default function CaseStudyFilters(props) {
15
- const { filters, activeFilters, setActiveFilters } = props;
15
+ const {
16
+ filters,
17
+ activeFilters,
18
+ setActiveFilters,
19
+ querySectors,
20
+ setQuerySectors,
21
+ } = props;
16
22
 
17
23
  const resetFilters = () => {
18
24
  let clone = { ...activeFilters };
@@ -27,7 +33,9 @@ export default function CaseStudyFilters(props) {
27
33
  nrActiveFilters += element.length;
28
34
  });
29
35
 
30
- const [activeIndex, setActiveIndex] = React.useState([]);
36
+ const [activeIndex, setActiveIndex] = React.useState(
37
+ querySectors instanceof Array && querySectors.length ? [0] : [],
38
+ );
31
39
 
32
40
  function handleClick(e, titleProps) {
33
41
  let index = Object.create(activeIndex);
@@ -52,7 +60,18 @@ export default function CaseStudyFilters(props) {
52
60
  return null;
53
61
  });
54
62
  }
63
+
64
+ let tempSectors = JSON.parse(JSON.stringify(querySectors));
65
+
66
+ if (!data.checked) {
67
+ tempSectors = tempSectors.filter((value) => {
68
+ if (value !== data.value) return value;
69
+ return null;
70
+ });
71
+ }
72
+
55
73
  setActiveFilters(temp);
74
+ setQuerySectors(tempSectors);
56
75
  };
57
76
 
58
77
  const intl = useIntl();
@@ -148,8 +167,8 @@ export default function CaseStudyFilters(props) {
148
167
  >
149
168
  <AccordionIcon active={activeIndex.includes(3)} />
150
169
  <FormattedMessage
151
- id="Adaptation elements"
152
- defaultMessage="Adaptation elements"
170
+ id="Adaptation approaches"
171
+ defaultMessage="Adaptation approaches"
153
172
  />
154
173
  </Accordion.Title>
155
174
  <Accordion.Content active={activeIndex.includes(3)}>
@@ -418,8 +418,8 @@ function ContentMetadata(props) {
418
418
  <>
419
419
  <h5>
420
420
  <FormattedMessage
421
- id="Adaptation elements:"
422
- defaultMessage="Adaptation elements:"
421
+ id="Adaptation Approaches:"
422
+ defaultMessage="Adaptation Approaches:"
423
423
  />
424
424
  </h5>
425
425
  <MetadataItemList value={elements} />
@@ -62,7 +62,7 @@ const transnational_regions = {
62
62
  const adaptation_elements = {
63
63
  field: 'cca_adaptation_elements.keyword',
64
64
  factory: 'MultiTermFacet',
65
- label: 'Adaptation Elements',
65
+ label: 'Adaptation Approaches',
66
66
  showInFacetsList: true,
67
67
  filterType: 'any',
68
68
  isFilterable: false,
@@ -16,7 +16,7 @@ const facets = [
16
16
  field: 'cca_adaptation_elements.keyword',
17
17
  isFilterable: false,
18
18
  isMulti: true,
19
- label: 'Adaptation Elements',
19
+ label: 'Adaptation Approaches',
20
20
  alwaysVisible: false,
21
21
  }),
22
22
  geographic_countries,
@@ -24,7 +24,7 @@ const facets = [
24
24
  field: 'cca_adaptation_elements.keyword',
25
25
  isFilterable: false,
26
26
  isMulti: true,
27
- label: 'Adaptation Elements',
27
+ label: 'Adaptation Approaches',
28
28
  alwaysVisible: false,
29
29
  }),
30
30
  geographic_countries,