@eeacms/volto-eea-website-theme 1.11.3 → 1.12.0

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,6 +4,21 @@ 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
+ ### [1.12.0](https://github.com/eea/volto-eea-website-theme/compare/1.11.3...1.12.0) - 24 March 2023
8
+
9
+ #### :nail_care: Enhancements
10
+
11
+ - change(banner): modified title of share buttons [David Ichim - [`c6dcbb5`](https://github.com/eea/volto-eea-website-theme/commit/c6dcbb534d26155d82d8a2729c454fbe3e2b312b)]
12
+ - change(banner): use custom-made Popup for better accessibility [David Ichim - [`955abf1`](https://github.com/eea/volto-eea-website-theme/commit/955abf1c525841577b7cc737871e9640c64a10dc)]
13
+ - change(banner): removed title parameter from MetadataField [David Ichim - [`aff3b6a`](https://github.com/eea/volto-eea-website-theme/commit/aff3b6a8302be165c6bce5cc20d3da734c81fc87)]
14
+
15
+ #### :hammer_and_wrench: Others
16
+
17
+ - Release 1.12.0 [Alin Voinea - [`4f77af8`](https://github.com/eea/volto-eea-website-theme/commit/4f77af895d6ba9952fa54b1928bbb9f56543765d)]
18
+ - (feat):Page Header Banner accessibility #119 from eea/banner-accesibility [ichim-david - [`3102129`](https://github.com/eea/volto-eea-website-theme/commit/3102129fe6e1416c566522d7da90fd1f118726d5)]
19
+ - delete id [Dobricean Ioan Dorian - [`500727f`](https://github.com/eea/volto-eea-website-theme/commit/500727f87b93dc2c1498c1ed1861d93e464532f4)]
20
+ - final version [Dobricean Ioan Dorian - [`f26adf4`](https://github.com/eea/volto-eea-website-theme/commit/f26adf4fb584a1f7f31a177852bfbde1a15ebd4f)]
21
+ - popup accesibility [Dobricean Ioan Dorian - [`14961bd`](https://github.com/eea/volto-eea-website-theme/commit/14961bdf6bdfcd2a83c53f8fbca83671833217f7)]
7
22
  ### [1.11.3](https://github.com/eea/volto-eea-website-theme/compare/1.11.2...1.11.3) - 24 March 2023
8
23
 
9
24
  #### :rocket: New Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-website-theme",
3
- "version": "1.11.3",
3
+ "version": "1.12.0",
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",
@@ -1,11 +1,12 @@
1
- import React, { useCallback, useMemo } from 'react';
1
+ import React, { useCallback, useMemo, useRef } from 'react';
2
2
  import { compose } from 'redux';
3
3
  import { connect } from 'react-redux';
4
4
  import { withRouter } from 'react-router';
5
5
  import { defineMessages, injectIntl } from 'react-intl';
6
6
  import { startCase } from 'lodash';
7
7
  import qs from 'querystring';
8
- import { Popup, Icon } from 'semantic-ui-react';
8
+ import { Icon } from 'semantic-ui-react';
9
+ import Popup from '@eeacms/volto-eea-design-system/ui/Popup/Popup';
9
10
  import { flattenToAppURL } from '@plone/volto/helpers';
10
11
  import Banner from '@eeacms/volto-eea-design-system/ui/Banner/Banner';
11
12
  import {
@@ -33,26 +34,14 @@ const messages = defineMessages({
33
34
  id: 'Created',
34
35
  defaultMessage: 'Created',
35
36
  },
36
- created_on: {
37
- id: 'Created on',
38
- defaultMessage: 'Created on',
39
- },
40
37
  published: {
41
38
  id: 'Published',
42
39
  defaultMessage: 'Published',
43
40
  },
44
- published_on: {
45
- id: 'Published on',
46
- defaultMessage: 'Published on',
47
- },
48
41
  modified: {
49
42
  id: 'Modified',
50
43
  defaultMessage: 'Modified',
51
44
  },
52
- modified_on: {
53
- id: 'Modified on',
54
- defaultMessage: 'Modified on',
55
- },
56
45
  });
57
46
 
58
47
  const friendlyId = (id) => {
@@ -74,6 +63,7 @@ const Title = ({ config = {}, properties }) => {
74
63
  const View = (props) => {
75
64
  const { banner = {}, intl, location, types = [] } = props;
76
65
  const metadata = props.metadata || props.properties;
66
+ const popupRef = useRef(null);
77
67
  const {
78
68
  info = [],
79
69
  hideContentType,
@@ -134,44 +124,50 @@ const View = (props) => {
134
124
  actions={
135
125
  <>
136
126
  {!hideShareButton && (
137
- <Popup
138
- className="share-popup"
139
- content={() => (
140
- <>
141
- <p>{intl.formatMessage(messages.share_to)}</p>
142
- <div className="actions">
143
- <Banner.Action
144
- icon="ri-facebook-fill"
145
- onClick={() => {
146
- sharePage(metadata['@id'], 'facebook');
147
- }}
148
- />
149
- <Banner.Action
150
- icon="ri-twitter-fill"
151
- onClick={() => {
152
- sharePage(metadata['@id'], 'twitter');
153
- }}
154
- />
155
- <Banner.Action
156
- icon="ri-linkedin-fill"
157
- onClick={() => {
158
- sharePage(metadata['@id'], 'linkedin');
159
- }}
160
- />
161
- </div>
162
- </>
163
- )}
164
- position="bottom center"
165
- size="small"
166
- trigger={
167
- <Banner.Action
168
- icon="ri-share-fill"
169
- title={intl.formatMessage(messages.share)}
170
- className="share"
171
- onClick={() => {}}
172
- />
173
- }
174
- />
127
+ <>
128
+ <Popup
129
+ className={'share-popup'}
130
+ trigger={
131
+ <Banner.Action
132
+ icon="ri-share-fill"
133
+ title={intl.formatMessage(messages.share)}
134
+ className="share"
135
+ onClick={() => {}}
136
+ />
137
+ }
138
+ content={
139
+ <>
140
+ <p>{intl.formatMessage(messages.share_to)}</p>
141
+ <div className="actions" ref={popupRef}>
142
+ <Banner.Action
143
+ icon="ri-facebook-fill"
144
+ title={'Share page to Facebook'}
145
+ titleClass={'hiddenStructure'}
146
+ onClick={() => {
147
+ sharePage(metadata['@id'], 'facebook');
148
+ }}
149
+ />
150
+ <Banner.Action
151
+ icon="ri-twitter-fill"
152
+ title={'Share page to Twitter'}
153
+ titleClass={'hiddenStructure'}
154
+ onClick={() => {
155
+ sharePage(metadata['@id'], 'twitter');
156
+ }}
157
+ />
158
+ <Banner.Action
159
+ icon="ri-linkedin-fill"
160
+ title={'Share page to Linkedin'}
161
+ titleClass={'hiddenStructure'}
162
+ onClick={() => {
163
+ sharePage(metadata['@id'], 'linkedin');
164
+ }}
165
+ />
166
+ </div>
167
+ </>
168
+ }
169
+ />
170
+ </>
175
171
  )}
176
172
  {!hideDownloadButton && (
177
173
  <Banner.Action
@@ -197,19 +193,16 @@ const View = (props) => {
197
193
  type="date"
198
194
  label={intl.formatMessage(messages.created)}
199
195
  value={creationDate}
200
- title={`${intl.formatMessage(messages.created_on)} {}`}
201
196
  />
202
197
  <Banner.MetadataField
203
198
  type="date"
204
199
  label={intl.formatMessage(messages.published)}
205
200
  value={publishingDate}
206
- title={`${intl.formatMessage(messages.published_on)} {}`}
207
201
  />
208
202
  <Banner.MetadataField
209
203
  type="date"
210
204
  label={intl.formatMessage(messages.modified)}
211
205
  value={modificationDate}
212
- title={`${intl.formatMessage(messages.modified_on)} {}`}
213
206
  />
214
207
  {info.map((item, index) => (
215
208
  <Banner.MetadataField