@eeacms/volto-eea-website-theme 0.6.12 → 0.6.13

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 CHANGED
@@ -4,9 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [0.6.13](https://github.com/eea/volto-eea-website-theme/compare/0.6.12...0.6.13)
8
+
9
+ - Fix double header issue - refs #151713 [`3151229`](https://github.com/eea/volto-eea-website-theme/commit/3151229d27193d6b4a4355419c924d2ddd538e71)
10
+ - Customize EventView - copied unchanged from @plone/volto 16.0.0-alpha.7 [`346fc87`](https://github.com/eea/volto-eea-website-theme/commit/346fc87c0834627efa70ed1303c5ee98a5a17ae2)
11
+
7
12
  #### [0.6.12](https://github.com/eea/volto-eea-website-theme/compare/0.6.11...0.6.12)
8
13
 
9
- - change(footer): updated logos order and added climate observatory [`96ddddf`](https://github.com/eea/volto-eea-website-theme/commit/96ddddffd0530ffb10d50a1d011f82bb97e6ba2b)
14
+ > 23 June 2022
15
+
16
+ - change(footer): updated logos order and added climate observatory [`#44`](https://github.com/eea/volto-eea-website-theme/pull/44)
10
17
 
11
18
  #### [0.6.11](https://github.com/eea/volto-eea-website-theme/compare/0.6.10...0.6.11)
12
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-website-theme",
3
- "version": "0.6.12",
3
+ "version": "0.6.13",
4
4
  "description": "@eeacms/volto-eea-website-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -0,0 +1,90 @@
1
+ /**
2
+ * EventView view component.
3
+ * @module components/theme/View/EventView
4
+ */
5
+
6
+ import React from 'react';
7
+ import PropTypes from 'prop-types';
8
+ import { hasBlocksData, flattenHTMLToAppURL } from '@plone/volto/helpers';
9
+ import { Image, Grid } from 'semantic-ui-react';
10
+ import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
11
+ import { EventDetails } from '@plone/volto/components';
12
+
13
+ const EventTextfieldView = ({ content }) => (
14
+ <React.Fragment>
15
+ {content.title && <h1 className="documentFirstHeading">{content.title}</h1>}
16
+ {content.description && (
17
+ <p className="documentDescription">{content.description}</p>
18
+ )}
19
+ {content.image && (
20
+ <Image
21
+ className="document-image"
22
+ src={content.image.scales.thumb.download}
23
+ floated="right"
24
+ />
25
+ )}
26
+ {content.text && (
27
+ <div
28
+ dangerouslySetInnerHTML={{
29
+ __html: flattenHTMLToAppURL(content.text.data),
30
+ }}
31
+ />
32
+ )}
33
+ </React.Fragment>
34
+ );
35
+
36
+ /**
37
+ * EventView view component class.
38
+ * @function EventView
39
+ * @params {object} content Content object.
40
+ * @returns {string} Markup of the component.
41
+ */
42
+ const EventView = (props) => {
43
+ const { content } = props;
44
+
45
+ return (
46
+ <div id="page-document" className="ui container viewwrapper event-view">
47
+ <Grid>
48
+ <Grid.Column mobile={12} tablet={7} computer={7}>
49
+ {hasBlocksData(content) ? (
50
+ <RenderBlocks {...props} />
51
+ ) : (
52
+ <EventTextfieldView {...props} />
53
+ )}
54
+ </Grid.Column>
55
+ <Grid.Column mobile={12} tablet={5} computer={5}>
56
+ <EventDetails content={content} />
57
+ </Grid.Column>
58
+ </Grid>
59
+ </div>
60
+ );
61
+ };
62
+
63
+ /**
64
+ * Property types.
65
+ * @property {Object} propTypes Property types.
66
+ * @static
67
+ */
68
+ EventView.propTypes = {
69
+ content: PropTypes.shape({
70
+ title: PropTypes.string,
71
+ description: PropTypes.string,
72
+ text: PropTypes.shape({
73
+ data: PropTypes.string,
74
+ }),
75
+ attendees: PropTypes.arrayOf(PropTypes.string).isRequired,
76
+ contact_email: PropTypes.string,
77
+ contact_name: PropTypes.string,
78
+ contact_phone: PropTypes.string,
79
+ end: PropTypes.string.isRequired,
80
+ event_url: PropTypes.string,
81
+ location: PropTypes.string,
82
+ open_end: PropTypes.bool,
83
+ recurrence: PropTypes.any,
84
+ start: PropTypes.string.isRequired,
85
+ subjects: PropTypes.arrayOf(PropTypes.string).isRequired,
86
+ whole_day: PropTypes.bool,
87
+ }).isRequired,
88
+ };
89
+
90
+ export default EventView;