@eeacms/volto-eea-website-policy 1.7.2 → 1.8.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,11 +4,19 @@ 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
7
+ ### [1.8.0](https://github.com/eea/volto-eea-website-policy/compare/1.7.3...1.8.0) - 15 August 2023
8
8
 
9
- #### :house: Internal changes
9
+ #### :nail_care: Enhancements
10
+
11
+ - refactor: Move DataProvenance code to dedicated widget addon - refs #256379 [Alin Voinea - [`3e7b046`](https://github.com/eea/volto-eea-website-policy/commit/3e7b046f3396c9aa73757916c6f02156aa18a6c2)]
12
+
13
+ ### [1.7.3](https://github.com/eea/volto-eea-website-policy/compare/1.7.2...1.7.3) - 1 August 2023
14
+
15
+ #### :house: Documentation changes
16
+
17
+ - docs: Cleanup Makefile, update DEVELOP documentation, i18n - refs #254894 [valentinab25 - [`13f903c`](https://github.com/eea/volto-eea-website-policy/commit/13f903c2e998d75a3fb575b262196c0826bfa021)]
10
18
 
11
- - chore: set DataProvenace based on behavior [Miu Razvan - [`b4623f0`](https://github.com/eea/volto-eea-website-policy/commit/b4623f066a2212ec60725dc16326eae9f0170a3b)]
19
+ ### [1.7.2](https://github.com/eea/volto-eea-website-policy/compare/1.7.1...1.7.2) - 29 July 2023
12
20
 
13
21
  ### [1.7.1](https://github.com/eea/volto-eea-website-policy/compare/1.7.0...1.7.1) - 24 July 2023
14
22
 
@@ -77,7 +85,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
77
85
 
78
86
  - Release 1.5.0 [Alin Voinea - [`a3dea8e`](https://github.com/eea/volto-eea-website-policy/commit/a3dea8ea15cb8d2a876dc10da926ece3a5707ea9)]
79
87
  - test(Jenkinsfile): Use latest stable volto for testing [Alin Voinea - [`a8f7123`](https://github.com/eea/volto-eea-website-policy/commit/a8f712364187f9638886667c249fa102cb49b5c0)]
80
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`124a8f8`](https://github.com/eea/volto-eea-website-policy/commit/124a8f8ad4ced507aeec27012d725f2e2b977e08)]
81
88
  ### [1.4.0](https://github.com/eea/volto-eea-website-policy/compare/1.3.4...1.4.0) - 21 February 2023
82
89
 
83
90
  #### :rocket: New Features
@@ -157,7 +164,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
157
164
  #### :hammer_and_wrench: Others
158
165
 
159
166
  - Release 1.1.0 [Alin Voinea - [`0291b3b`](https://github.com/eea/volto-eea-website-policy/commit/0291b3bb7b4c6ab09ca98728885cea4051eac8e3)]
160
- - yarn 3 [Alin Voinea - [`593aa58`](https://github.com/eea/volto-eea-website-policy/commit/593aa58eaa4d28aced0603b7f7dd125c857a6f54)]
161
167
  ### [1.0.4](https://github.com/eea/volto-eea-website-policy/compare/1.0.3...1.0.4) - 22 November 2022
162
168
 
163
169
  #### :nail_care: Enhancements
@@ -203,7 +209,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
203
209
 
204
210
  #### :hammer_and_wrench: Others
205
211
 
206
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`d153f54`](https://github.com/eea/volto-eea-website-policy/commit/d153f54e55e918fa4746e05488c734624eaf14a9)]
207
212
  ### [0.4.0](https://github.com/eea/volto-eea-website-policy/compare/0.3.3...0.4.0) - 19 September 2022
208
213
 
209
214
  #### :hammer_and_wrench: Others
@@ -279,7 +284,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
279
284
  - format index.js [Andrei Grigore - [`db4481a`](https://github.com/eea/volto-eea-website-policy/commit/db4481aeeba59a769272659f33278c902fc69bec)]
280
285
  - Update index.js [Alexandru Ghica - [`dc09886`](https://github.com/eea/volto-eea-website-policy/commit/dc0988640a76a9914381b120f58bb61a9ab1eb39)]
281
286
  - Added externalRoutes [Alexandru Ghica - [`b68135b`](https://github.com/eea/volto-eea-website-policy/commit/b68135b013fafa93a41ea602ea2fad30879abe0f)]
282
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`575cca6`](https://github.com/eea/volto-eea-website-policy/commit/575cca674602ca2e1c2a41300c47ba594ff49aa0)]
283
287
  ### [0.1.1](https://github.com/eea/volto-eea-website-policy/compare/0.1.0...0.1.1) - 4 March 2022
284
288
 
285
289
  #### :hammer_and_wrench: Others
@@ -292,5 +296,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
292
296
 
293
297
  #### :hammer_and_wrench: Others
294
298
 
295
- - yarn bootstrap [Alin Voinea - [`9b4d197`](https://github.com/eea/volto-eea-website-policy/commit/9b4d197cbc7992566cb36524d190078d5ad21a44)]
296
299
  - Initial commit [Alin Voinea - [`3800692`](https://github.com/eea/volto-eea-website-policy/commit/3800692f7a4de6460815bd6061facacb986cbef0)]
package/DEVELOP.md CHANGED
@@ -2,6 +2,28 @@
2
2
 
3
3
  ## Develop
4
4
 
5
+ 1. Make sure you have `docker` and `docker compose` installed and running on your machine:
6
+
7
+ ```Bash
8
+ git clone https://github.com/eea/volto-eea-website-policy.git
9
+ cd volto-eea-website-policy
10
+ git checkout -b bugfix-123456 develop
11
+ make
12
+ make start
13
+ ```
14
+
15
+ 1. Wait for `Volto started at 0.0.0.0:3000` meesage
16
+
17
+ 1. Go to http://localhost:3000
18
+
19
+ 1. Happy hacking!
20
+
21
+ ```Bash
22
+ cd src/addons/volto-eea-website-policy/
23
+ ```
24
+
25
+ ### Or add @eeacms/volto-eea-website-policy to your Volto project
26
+
5
27
  Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/)
6
28
 
7
29
  1. Make sure you have installed `yo`, `@plone/generator-volto` and `mrs-developer`
@@ -49,3 +71,37 @@ Before starting make sure your development environment is properly set. See [Vol
49
71
  1. Happy hacking!
50
72
 
51
73
  cd src/addons/volto-eea-website-policy/
74
+
75
+ ## Cypress
76
+
77
+ To run cypress locally, first make sure you don't have any Volto/Plone running on ports `8080` and `3000`.
78
+
79
+ You don't have to be in a `clean-volto-project`, you can be in any Volto Frontend
80
+ project where you added `volto-eea-website-policy` to `mrs.developer.json`
81
+
82
+ Go to:
83
+
84
+ ```BASH
85
+ cd src/addons/volto-eea-website-policy/
86
+ ```
87
+
88
+ Start:
89
+
90
+ ```Bash
91
+ make
92
+ make start
93
+ ```
94
+
95
+ This will build and start with Docker a clean `Plone backend` and `Volto Frontend` with `volto-eea-website-policy` block installed.
96
+
97
+ Open Cypress Interface:
98
+
99
+ ```Bash
100
+ make cypress-open
101
+ ```
102
+
103
+ Or run it:
104
+
105
+ ```Bash
106
+ make cypress-run
107
+ ```
package/README.md CHANGED
@@ -23,10 +23,23 @@ EEA Main Website (Plone 6) [Volto](https://github.com/plone/volto) Frontend Poli
23
23
 
24
24
  ## Getting started
25
25
 
26
+ ### Try volto-eea-website-policy with Docker
27
+
28
+ git clone https://github.com/eea/volto-eea-website-policy.git
29
+ cd volto-eea-website-policy
30
+ make
31
+ make start
32
+
33
+ Go to http://localhost:3000
34
+
26
35
  ### Add volto-eea-website-policy to your Volto project
27
36
 
28
37
  1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
29
38
 
39
+ ```Bash
40
+ docker compose up backend
41
+ ```
42
+
30
43
  1. Start Volto frontend
31
44
 
32
45
  * If you already have a volto project, just update `package.json`:
@@ -0,0 +1,28 @@
1
+ version: "3"
2
+ services:
3
+ backend:
4
+ image: plone/plone-backend:${PLONE_VERSION:-6}
5
+ ports:
6
+ - "8080:8080"
7
+ environment:
8
+ SITE: "Plone"
9
+
10
+ frontend:
11
+ build:
12
+ context: ./
13
+ dockerfile: ./Dockerfile
14
+ args:
15
+ ADDON_NAME: "${ADDON_NAME}"
16
+ ADDON_PATH: "${ADDON_PATH}"
17
+ VOLTO_VERSION: ${VOLTO_VERSION:-16}
18
+ ports:
19
+ - "3000:3000"
20
+ - "3001:3001"
21
+ depends_on:
22
+ - backend
23
+ volumes:
24
+ - ./:/app/src/addons/${ADDON_PATH}
25
+ environment:
26
+ RAZZLE_INTERNAL_API_PATH: "http://backend:8080/Plone"
27
+ RAZZLE_DEV_PROXY_API_PATH: "http://backend:8080/Plone"
28
+ HOST: "0.0.0.0"
@@ -0,0 +1,14 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: \n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: \n"
8
+ "Language: \n"
9
+ "Language-Team: \n"
10
+ "Content-Type: \n"
11
+ "Content-Transfer-Encoding: \n"
12
+ "Plural-Forms: \n"
13
+
14
+
@@ -0,0 +1,14 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: \n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: \n"
8
+ "Language: \n"
9
+ "Language-Team: \n"
10
+ "Content-Type: \n"
11
+ "Content-Transfer-Encoding: \n"
12
+ "Plural-Forms: \n"
13
+
14
+
@@ -0,0 +1,14 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: \n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: \n"
8
+ "Language: \n"
9
+ "Language-Team: \n"
10
+ "Content-Type: \n"
11
+ "Content-Transfer-Encoding: \n"
12
+ "Plural-Forms: \n"
13
+
14
+
package/locales/volto.pot CHANGED
@@ -0,0 +1,16 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Plone\n"
4
+ "POT-Creation-Date: 2023-06-28T10:48:22.678Z\n"
5
+ "Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
6
+ "Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
7
+ "MIME-Version: 1.0\n"
8
+ "Content-Type: text/plain; charset=utf-8\n"
9
+ "Content-Transfer-Encoding: 8bit\n"
10
+ "Plural-Forms: nplurals=1; plural=0;\n"
11
+ "Language-Code: en\n"
12
+ "Language-Name: English\n"
13
+ "Preferred-Encodings: utf-8\n"
14
+ "Domain: volto\n"
15
+
16
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-website-policy",
3
- "version": "1.7.2",
3
+ "version": "1.8.0",
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",
package/src/index.js CHANGED
@@ -2,8 +2,6 @@ import { runtimeConfig } from '@plone/volto/runtime_config';
2
2
  import installContextNavigationBlock from '@eeacms/volto-eea-website-policy/components/Blocks/ContextNavigation';
3
3
  import { appendGroup } from './helpers';
4
4
  import { FrequencyOfDissemination } from '@eeacms/volto-eea-website-policy/components/Widgets/FrequencyOfDissemination';
5
- import { DataProvenance } from '@eeacms/volto-eea-website-policy/components/Widgets/DataProvenance';
6
- import { InstitutionalMandate } from '@eeacms/volto-eea-website-policy/components/Widgets/InstitutionalMandate';
7
5
 
8
6
  const restrictedBlocks = [
9
7
  'imagecards',
@@ -120,8 +118,6 @@ const applyConfig = (config) => {
120
118
  });
121
119
 
122
120
  // Custom widgets
123
- config.widgets.id.data_provenance = DataProvenance;
124
- config.widgets.id.institutional_mandate = InstitutionalMandate;
125
121
  config.widgets.views.id.frequency_of_dissemination = FrequencyOfDissemination;
126
122
 
127
123
  // Subsite
@@ -1 +0,0 @@
1
- module.exports = require('@plone/volto/babel');
@@ -1,12 +0,0 @@
1
- import RichTextWidget from '@plone/volto-slate/widgets/RichTextWidget';
2
- import { DataProvenance as NextDataProvenance } from '@eeacms/volto-widget-dataprovenance/components/theme/Widgets/DataProvenance';
3
-
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,5 +0,0 @@
1
- import RichTextWidget from '@plone/volto-slate/widgets/RichTextWidget';
2
-
3
- export const InstitutionalMandate = (props) => {
4
- return <RichTextWidget {...props} readOnly={true} />;
5
- };