diff --git a/CHANGELOG.md b/CHANGELOG.md
index f73a7e9..d43add7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,8 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
+#### [0.2.1](https://github.com/eea/volto-forests-theme/compare/0.2.0...0.2.1)
+
+- Discodata connector support animations [`4082ff8`](https://github.com/eea/volto-forests-theme/commit/4082ff8383c189e78113ed595fc4a6f7b3671793)
+
#### [0.2.0](https://github.com/eea/volto-forests-theme/compare/0.2.0-beta.0...0.2.0)
+> 4 February 2022
+
+- Added compatibility with volto-datablocks@3.x [`#53`](https://github.com/eea/volto-forests-theme/pull/53)
- Develop [`#51`](https://github.com/eea/volto-forests-theme/pull/51)
#### [0.2.0-beta.0](https://github.com/eea/volto-forests-theme/compare/0.1.37...0.2.0-beta.0)
diff --git a/package.json b/package.json
index f6b79e7..2f3dff7 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-forests-theme",
- "version": "0.2.0",
+ "version": "0.2.1",
"description": "@eeacms/volto-forests-theme: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
diff --git a/src/components/manage/Blocks/DiscodataConnectorBlock/v1/Edit.jsx b/src/components/manage/Blocks/DiscodataConnectorBlock/v1/Edit.jsx
index d0b04df..dcbb589 100644
--- a/src/components/manage/Blocks/DiscodataConnectorBlock/v1/Edit.jsx
+++ b/src/components/manage/Blocks/DiscodataConnectorBlock/v1/Edit.jsx
@@ -72,7 +72,7 @@ const Edit = (props) => {
block={props.block}
/>
-
+
);
};
diff --git a/src/components/manage/Blocks/DiscodataConnectorBlock/v1/View.jsx b/src/components/manage/Blocks/DiscodataConnectorBlock/v1/View.jsx
index bb82ae5..e615bde 100644
--- a/src/components/manage/Blocks/DiscodataConnectorBlock/v1/View.jsx
+++ b/src/components/manage/Blocks/DiscodataConnectorBlock/v1/View.jsx
@@ -4,7 +4,7 @@ import { connectToMultipleProviders } from '@eeacms/volto-datablocks/hocs';
import { DataConnectedValue } from '@eeacms/volto-datablocks/Utils';
import { Sources } from '@eeacms/volto-datablocks/Utils';
-const providerView = (dataProviderKey, dataProvider) => {
+const providerView = (dataProviderKey, dataProvider, editMode) => {
return (
{
column={dataProvider.displayColumn}
textTemplate={dataProvider.textTemplate}
specifier={dataProvider.specifier}
+ animatedCounter={!editMode ? dataProvider.animatedCounter : ''}
placeholder="_"
/>
)}
@@ -122,11 +123,15 @@ const View = (props) => {
className={dataProvider.wrapperClassName}
key={`data-wrapper-${dataProviderKey}`}
>
- {providerView(dataProviderKey, dataProvider)}
+ {providerView(
+ dataProviderKey,
+ dataProvider,
+ props.editMode,
+ )}
{Object.entries(
dataProvider.children,
).map(([cildrenKey, children]) =>
- providerView(cildrenKey, children),
+ providerView(cildrenKey, children, props.editMode),
)}
);
@@ -136,7 +141,7 @@ const View = (props) => {
className={dataProvider.wrapperClassName}
key={`data-wrapper-${dataProviderKey}`}
>
- {providerView(dataProviderKey, dataProvider)}
+ {providerView(dataProviderKey, dataProvider, props.editMode)}
);
},
diff --git a/src/components/manage/Blocks/DiscodataConnectorBlock/v1/schema.js b/src/components/manage/Blocks/DiscodataConnectorBlock/v1/schema.js
index cb983b2..3bf6195 100644
--- a/src/components/manage/Blocks/DiscodataConnectorBlock/v1/schema.js
+++ b/src/components/manage/Blocks/DiscodataConnectorBlock/v1/schema.js
@@ -20,7 +20,12 @@ const dataProviderSchemaExtender = (schema, child = {}, props) => {
{
id: 'properties',
title: 'Properties',
- fields: ['measurmentUnit', 'additionalText', 'className'],
+ fields: [
+ 'measurmentUnit',
+ 'additionalText',
+ 'className',
+ 'animatedCounter',
+ ],
},
...(child.hasDiscodataConnector
? [
@@ -90,6 +95,7 @@ const dataProviderSchema = {
'className',
'parent',
'wrapperClassName',
+ 'animatedCounter',
],
},
],
@@ -147,6 +153,11 @@ const dataProviderSchema = {
type: 'text',
title: 'Additional text',
},
+ animatedCounter: {
+ type: 'boolean',
+ title: 'Animated Counter',
+ description: 'Apply counter animation to a number',
+ },
className: {
type: 'select',