@eeacms/volto-cca-policy 0.3.16 → 0.3.18

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 (35) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/locales/bg/LC_MESSAGES/volto.po +815 -341
  3. package/locales/cs/LC_MESSAGES/volto.po +764 -320
  4. package/locales/de/LC_MESSAGES/volto.po +794 -317
  5. package/locales/eea.cca.pot +280 -1
  6. package/locales/en/LC_MESSAGES/volto.po +459 -55
  7. package/locales/es/LC_MESSAGES/volto.po +776 -298
  8. package/locales/et/LC_MESSAGES/volto.po +760 -322
  9. package/locales/fi/LC_MESSAGES/volto.po +796 -334
  10. package/locales/fr/LC_MESSAGES/volto.po +808 -324
  11. package/locales/ga/LC_MESSAGES/volto.po +831 -348
  12. package/locales/hr/LC_MESSAGES/volto.po +762 -319
  13. package/locales/hu/LC_MESSAGES/volto.po +831 -342
  14. package/locales/it/LC_MESSAGES/volto.po +775 -310
  15. package/locales/lt/LC_MESSAGES/volto.po +779 -329
  16. package/locales/nl/LC_MESSAGES/volto.po +805 -330
  17. package/locales/pl/LC_MESSAGES/volto.po +737 -292
  18. package/locales/pt/LC_MESSAGES/volto.po +793 -328
  19. package/locales/ro/LC_MESSAGES/volto.po +797 -326
  20. package/locales/sl/LC_MESSAGES/volto.po +782 -327
  21. package/locales/volto.pot +30 -1
  22. package/package.json +1 -1
  23. package/src/components/manage/Blocks/MissionSignatoriesProfile/AccordionList.jsx +41 -0
  24. package/src/components/manage/Blocks/MissionSignatoriesProfile/MissionSignatoriesProfileView.js +23 -106
  25. package/src/components/manage/Blocks/MissionSignatoriesProfile/StatisticsSection.jsx +23 -0
  26. package/src/components/manage/Blocks/MissionSignatoriesProfile/TabSections/ActionPagesTab.jsx +27 -0
  27. package/src/components/manage/Blocks/MissionSignatoriesProfile/TabSections/AssessmentTab.jsx +185 -0
  28. package/src/components/manage/Blocks/MissionSignatoriesProfile/TabSections/GovernanceTab.jsx +92 -0
  29. package/src/components/manage/Blocks/MissionSignatoriesProfile/TabSections/IntroductionTab.jsx +39 -0
  30. package/src/components/manage/Blocks/MissionSignatoriesProfile/TabSections/PlanningTab.jsx +28 -0
  31. package/src/components/manage/Blocks/MissionSignatoriesProfile/style.less +22 -0
  32. package/src/helpers/ContentMetadata.jsx +21 -2
  33. package/src/helpers/Utils.jsx +27 -9
  34. package/src/utils.js +14 -0
  35. package/theme/assets/images/image-narrow.svg +5 -0
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { Tab } from 'semantic-ui-react';
3
+ import { Callout } from '@eeacms/volto-eea-design-system/ui';
4
+
5
+ const IntroductionTab = () => {
6
+ return (
7
+ <Tab.Pane>
8
+ <h2>Introduction</h2>
9
+ <Callout>
10
+ <p>
11
+ Duis non quam et nisi tincidunt fermentum. Pellentesque habitant morbi
12
+ tristique senectus et netus et malesuada fames ac turpis egestas.
13
+ </p>
14
+ </Callout>
15
+ <h3>The Mission on Adaptation</h3>
16
+ <p>
17
+ Nulla facilisi. Donec fringilla urna id ligula ullamcorper, vel
18
+ tristique lorem posuere. Donec et orci mauris. Nullam tempor velit id mi
19
+ luctus, a scelerisque libero accumsan. In hac habitasse platea dictumst.
20
+ Cras ac nunc nec massa tristique fringilla.
21
+ </p>
22
+ <h3>Data source</h3>
23
+ <p>
24
+ Donec eget libero id leo congue venenatis. Ut enim ad minim veniam, quis
25
+ nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
26
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit
27
+ esse cillum dolore eu fugiat nulla pariatur.
28
+ </p>
29
+ <p>
30
+ Donec eget libero id leo congue venenatis. Ut enim ad minim veniam, quis
31
+ nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
32
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit
33
+ esse cillum dolore eu fugiat nulla pariatur.
34
+ </p>
35
+ </Tab.Pane>
36
+ );
37
+ };
38
+
39
+ export default IntroductionTab;
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { Tab } from 'semantic-ui-react';
3
+ import { Callout } from '@eeacms/volto-eea-design-system/ui';
4
+
5
+ const PlanningTab = () => {
6
+ return (
7
+ <Tab.Pane>
8
+ <h2>Planning</h2>
9
+ <Callout>
10
+ <p>
11
+ Vestibulum ante ipsum primis in faucibus orci luctus et ultrices
12
+ posuere cubilia curae; Pellentesque sodales, velit nec euismod
13
+ scelerisque, lectus est interdum eros, sit amet bibendum eros sapien
14
+ in magna.
15
+ </p>
16
+ </Callout>
17
+ <p>
18
+ Curabitur at felis non libero suscipit fermentum. Duis volutpat, ante et
19
+ scelerisque luctus, sem nulla placerat leo, at aliquet libero justo id
20
+ nulla. Integer at dui nec magna posuere fringilla. Nunc euismod bibendum
21
+ augue. Cras nec ligula velit. Donec in laoreet leo. Quisque suscipit
22
+ ligula eu turpis dignissim, a eleifend ipsum cursus.
23
+ </p>
24
+ </Tab.Pane>
25
+ );
26
+ };
27
+
28
+ export default PlanningTab;
@@ -0,0 +1,22 @@
1
+ .signatories-profile {
2
+ .profile-content-box {
3
+ padding: 1.5em;
4
+ margin: 2em 0;
5
+ background-color: #f9f9f9;
6
+
7
+ .items-wrapper {
8
+ margin: 2em 0;
9
+ }
10
+
11
+ .profile-content-box-info {
12
+ display: flex;
13
+ justify-content: space-between;
14
+ font-size: 14px;
15
+
16
+ .date {
17
+ position: relative;
18
+ top: 5px;
19
+ }
20
+ }
21
+ }
22
+ }
@@ -246,7 +246,17 @@ function GeoChar(props) {
246
246
  <FormattedMessage id="Countries:" defaultMessage="Countries:" />
247
247
  </h5>
248
248
  {spatial_values && spatial_values.length > 0 && (
249
- <p>{spatial_values.map((item) => item.token).join(', ')}</p>
249
+ <p>
250
+ {spatial_values
251
+ .map((item) => item.token)
252
+ .map((token) =>
253
+ intl.formatMessage({
254
+ id: token,
255
+ defaultMessage: token,
256
+ }),
257
+ )
258
+ .join(', ')}
259
+ </p>
250
260
  )}
251
261
  </div>
252
262
  );
@@ -268,7 +278,16 @@ function GeoChar(props) {
268
278
  {section.title && (
269
279
  <h5>{intl.formatMessage(messages[section.title])}</h5>
270
280
  )}
271
- <p>{section.value.join(', ')}</p>
281
+ <p>
282
+ {section.value
283
+ .map((countryName) =>
284
+ intl.formatMessage({
285
+ id: countryName,
286
+ defaultMessage: countryName,
287
+ }),
288
+ )
289
+ .join(', ')}
290
+ </p>
272
291
  </Fragment>
273
292
  ),
274
293
  )}
@@ -494,21 +494,39 @@ export const EventDetails = (props) => {
494
494
 
495
495
  export const MetadataItemList = (props) => {
496
496
  const { value, join_type } = props;
497
+ const intl = useIntl();
497
498
 
498
499
  return value && value.length > 0 ? (
499
500
  <>
500
501
  {!join_type ? (
501
- <p>{value.map((item) => item.title).join(', ')}</p>
502
+ <p>
503
+ {value
504
+ .map((item) => item.title)
505
+ .map((title) =>
506
+ intl.formatMessage({
507
+ id: title,
508
+ defaultMessage: title,
509
+ }),
510
+ )
511
+ .join(', ')}
512
+ </p>
502
513
  ) : (
503
514
  <>
504
- {value.map((item, index) => (
505
- <React.Fragment key={index}>
506
- <span>{item.title}</span>
507
- {index !== value.length - 1 && (
508
- <span dangerouslySetInnerHTML={{ __html: join_type }} />
509
- )}
510
- </React.Fragment>
511
- ))}
515
+ {value
516
+ .map((item) =>
517
+ intl.formatMessage({
518
+ id: item.title,
519
+ defaultMessage: item.title,
520
+ }),
521
+ )
522
+ .map((item, index) => (
523
+ <React.Fragment key={index}>
524
+ <span>{item}</span>
525
+ {index !== value.length - 1 && (
526
+ <span dangerouslySetInnerHTML={{ __html: join_type }} />
527
+ )}
528
+ </React.Fragment>
529
+ ))}
512
530
  </>
513
531
  )}
514
532
  </>
package/src/utils.js CHANGED
@@ -77,3 +77,17 @@ export const filterBlocks = (content, blockTypes = []) => {
77
77
  hasBlockTypes: excludedBlockKeys.length > 0,
78
78
  };
79
79
  };
80
+
81
+ export const formatTextToHTML = (text) => {
82
+ if (!text) return '';
83
+
84
+ // Replace \\n\\n with </p><p> (separate paragraphs)
85
+ let formattedText = text.replace(/\\n\\n/g, '</p><p>');
86
+
87
+ // Replace \\n with <br /> (line breaks within paragraphs)
88
+ formattedText = formattedText.replace(/\\n/g, '<br />');
89
+
90
+ formattedText = `<p>${formattedText}</p>`;
91
+
92
+ return formattedText;
93
+ };
@@ -0,0 +1,5 @@
1
+ <svg width="36" height="36" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M10 13L11.9333 11V25L10 23H26L24.0667 25V11L26 13H10ZM26 11V18V21.5V23.5V25H10V11H26Z" fill="#007B6C"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M7 31H29V29H7V31Z" fill="#007B6C"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M7 7H29V5H7V7Z" fill="#007B6C"/>
5
+ </svg>