@eeacms/volto-hero-block 5.2.0 → 5.3.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,13 +4,22 @@ 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
|
+
### [5.3.0](https://github.com/eea/volto-hero-block/compare/5.2.0...5.3.0) - 27 March 2023
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat(copyright): Possibility to arbitrary add prefix text to copyright info - refs #250724 [Alin Voinea - [`f0b9944`](https://github.com/eea/volto-hero-block/commit/f0b994458d737b2c23bcf0b73e39b8dfbbcc321e)]
|
|
12
|
+
|
|
13
|
+
#### :house: Internal changes
|
|
14
|
+
|
|
15
|
+
- chore(Hero): Keep Hero block backward compatible if no copyrightPrefix provided - refs #250724 [Alin Voinea - [`2b17631`](https://github.com/eea/volto-hero-block/commit/2b176317c94856dd9424dcd92699c93d2f0dc066)]
|
|
16
|
+
|
|
7
17
|
### [5.2.0](https://github.com/eea/volto-hero-block/compare/5.1.0...5.2.0) - 24 March 2023
|
|
8
18
|
|
|
9
19
|
#### :hammer_and_wrench: Others
|
|
10
20
|
|
|
11
21
|
- Release 5.2.0 [Alin Voinea - [`b0dfa0c`](https://github.com/eea/volto-hero-block/commit/b0dfa0c46f5f697d9e2419522ce04ead9353272d)]
|
|
12
22
|
- update [Miu Razvan - [`2a9e854`](https://github.com/eea/volto-hero-block/commit/2a9e8540853cd49e7461ac4de9fef2109874dcdd)]
|
|
13
|
-
- import schema from blocksConfig [Miu Razvan - [`196a003`](https://github.com/eea/volto-hero-block/commit/196a003957676b562987ef6509cf2b73ea2e77d2)]
|
|
14
23
|
### [5.1.0](https://github.com/eea/volto-hero-block/compare/5.0.0...5.1.0) - 24 March 2023
|
|
15
24
|
|
|
16
25
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -13,6 +13,15 @@ function Copyright({ children, ...rest }) {
|
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
Copyright.Prefix = ({ children, ...rest }) =>
|
|
17
|
+
children ? (
|
|
18
|
+
<span {...rest} className={'icon-prefix'}>
|
|
19
|
+
{children}
|
|
20
|
+
</span>
|
|
21
|
+
) : (
|
|
22
|
+
''
|
|
23
|
+
);
|
|
24
|
+
|
|
16
25
|
Copyright.Icon = ({ children, ...rest }) => (
|
|
17
26
|
<span {...rest} className={'icon-wrapper'}>
|
|
18
27
|
{children}
|
|
@@ -49,6 +49,7 @@ const Edit = (props) => {
|
|
|
49
49
|
onSelectBlock,
|
|
50
50
|
} = props;
|
|
51
51
|
const { text, copyright, copyrightIcon, copyrightPosition } = data;
|
|
52
|
+
const copyrightPrefix = config.blocks.blocksConfig.hero.copyrightPrefix || '';
|
|
52
53
|
const schema = React.useMemo(() => {
|
|
53
54
|
const blockSchema = config.blocks.blocksConfig.hero.schema;
|
|
54
55
|
if (isFunction(blockSchema)) {
|
|
@@ -101,6 +102,7 @@ const Edit = (props) => {
|
|
|
101
102
|
</Hero.Meta>
|
|
102
103
|
{copyright ? (
|
|
103
104
|
<Copyright copyrightPosition={copyrightPosition}>
|
|
105
|
+
<Copyright.Prefix>{copyrightPrefix}</Copyright.Prefix>
|
|
104
106
|
<Copyright.Icon>
|
|
105
107
|
<Icon className={copyrightIcon} />
|
|
106
108
|
</Copyright.Icon>
|
|
@@ -6,6 +6,7 @@ import { BodyClass } from '@plone/volto/helpers';
|
|
|
6
6
|
import Hero from './Hero';
|
|
7
7
|
import Copyright from './Copyright';
|
|
8
8
|
import { serializeText } from '@eeacms/volto-hero-block/helpers';
|
|
9
|
+
import config from '@plone/volto/registry';
|
|
9
10
|
|
|
10
11
|
const Metadata = ({ buttonLabel, buttonLink, inverted, styles }) => {
|
|
11
12
|
const { buttonVariant = 'white' } = styles || {};
|
|
@@ -25,6 +26,7 @@ const Metadata = ({ buttonLabel, buttonLink, inverted, styles }) => {
|
|
|
25
26
|
const View = (props) => {
|
|
26
27
|
const { data = {} } = props;
|
|
27
28
|
const { text, copyright, copyrightIcon, copyrightPosition } = data;
|
|
29
|
+
const copyrightPrefix = config.blocks.blocksConfig.hero.copyrightPrefix || '';
|
|
28
30
|
return (
|
|
29
31
|
<React.Fragment>
|
|
30
32
|
<BodyClass className="with-hero-block" />
|
|
@@ -35,6 +37,7 @@ const View = (props) => {
|
|
|
35
37
|
</Hero.Meta>
|
|
36
38
|
{copyright ? (
|
|
37
39
|
<Copyright copyrightPosition={copyrightPosition}>
|
|
40
|
+
<Copyright.Prefix>{copyrightPrefix}</Copyright.Prefix>
|
|
38
41
|
<Copyright.Icon>
|
|
39
42
|
<Icon className={copyrightIcon} />
|
|
40
43
|
</Copyright.Icon>
|