generated from eea/volto-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from eea/develop
chore: set DataProvenace based on behavior
- Loading branch information
Showing
4 changed files
with
28 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@eeacms/volto-eea-website-policy", | ||
"version": "1.7.1", | ||
"version": "1.7.2", | ||
"description": "@eeacms/volto-eea-website-policy: Volto add-on", | ||
"main": "src/index.js", | ||
"author": "European Environment Agency: IDM2 A-Team", | ||
|
@@ -16,7 +16,12 @@ | |
"type": "git", | ||
"url": "[email protected]:eea/volto-eea-website-policy.git" | ||
}, | ||
"addons": [], | ||
"addons": [ | ||
"@eeacms/volto-widget-dataprovenance" | ||
], | ||
"dependencies": { | ||
"@eeacms/volto-widget-dataprovenance": "*" | ||
}, | ||
"devDependencies": { | ||
"@cypress/code-coverage": "^3.10.0", | ||
"@plone/scripts": "*", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
// import React from 'react'; | ||
// import RichTextWidget from '@plone/volto-slate/widgets/RichTextWidget'; | ||
import RichTextWidget from '@plone/volto-slate/widgets/RichTextWidget'; | ||
import { DataProvenance as NextDataProvenance } from '@eeacms/volto-widget-dataprovenance/components/theme/Widgets/DataProvenance'; | ||
|
||
export const DataProvenance = () => | ||
// <RichTextWidget {...props} readOnly={true} /> | ||
' Data Provenance '; | ||
export const DataProvenance = (props) => { | ||
if (props.behavior === 'eea.coremetadata.behavior') { | ||
return <NextDataProvenance {...props} />; | ||
} | ||
if (props.behavior === 'eea.dexterity.indicators.metadata') { | ||
return <RichTextWidget {...props} />; | ||
} | ||
return ' Data Provenance '; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
// import React from 'react'; | ||
// import RichTextWidget from '@plone/volto-slate/widgets/RichTextWidget'; | ||
import RichTextWidget from '@plone/volto-slate/widgets/RichTextWidget'; | ||
|
||
export const InstitutionalMandate = () => | ||
// <RichTextWidget {...props} readOnly={true} /> | ||
' Institutional Mandate '; | ||
export const InstitutionalMandate = (props) => { | ||
return <RichTextWidget {...props} readOnly={true} />; | ||
}; |