@eeacms/volto-eea-website-policy 1.7.1 → 1.7.2

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,12 @@ 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.7.2](https://github.com/eea/volto-eea-website-policy/compare/1.7.1...1.7.2) - 28 July 2023
8
+
9
+ #### :house: Internal changes
10
+
11
+ - chore: set DataProvenace based on behavior [Miu Razvan - [`b4623f0`](https://github.com/eea/volto-eea-website-policy/commit/b4623f066a2212ec60725dc16326eae9f0170a3b)]
12
+
7
13
  ### [1.7.1](https://github.com/eea/volto-eea-website-policy/compare/1.7.0...1.7.1) - 24 July 2023
8
14
 
9
15
  #### :rocket: New Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-website-policy",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "@eeacms/volto-eea-website-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -16,7 +16,12 @@
16
16
  "type": "git",
17
17
  "url": "git@github.com:eea/volto-eea-website-policy.git"
18
18
  },
19
- "addons": [],
19
+ "addons": [
20
+ "@eeacms/volto-widget-dataprovenance"
21
+ ],
22
+ "dependencies": {
23
+ "@eeacms/volto-widget-dataprovenance": "*"
24
+ },
20
25
  "devDependencies": {
21
26
  "@cypress/code-coverage": "^3.10.0",
22
27
  "@plone/scripts": "*",
@@ -1,6 +1,12 @@
1
- // import React from 'react';
2
- // import RichTextWidget from '@plone/volto-slate/widgets/RichTextWidget';
1
+ import RichTextWidget from '@plone/volto-slate/widgets/RichTextWidget';
2
+ import { DataProvenance as NextDataProvenance } from '@eeacms/volto-widget-dataprovenance/components/theme/Widgets/DataProvenance';
3
3
 
4
- export const DataProvenance = () =>
5
- // <RichTextWidget {...props} readOnly={true} />
6
- ' Data Provenance ';
4
+ export const DataProvenance = (props) => {
5
+ if (props.behavior === 'eea.coremetadata.behavior') {
6
+ return <NextDataProvenance {...props} />;
7
+ }
8
+ if (props.behavior === 'eea.dexterity.indicators.metadata') {
9
+ return <RichTextWidget {...props} />;
10
+ }
11
+ return ' Data Provenance ';
12
+ };
@@ -1,6 +1,5 @@
1
- // import React from 'react';
2
- // import RichTextWidget from '@plone/volto-slate/widgets/RichTextWidget';
1
+ import RichTextWidget from '@plone/volto-slate/widgets/RichTextWidget';
3
2
 
4
- export const InstitutionalMandate = () =>
5
- // <RichTextWidget {...props} readOnly={true} />
6
- ' Institutional Mandate ';
3
+ export const InstitutionalMandate = (props) => {
4
+ return <RichTextWidget {...props} readOnly={true} />;
5
+ };