@eeacms/volto-eea-website-policy 2.2.3 → 2.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 +57 -50
- package/locales/volto.pot +8 -3
- package/package.json +1 -3
- package/src/index.js +0 -9
- package/src/components/Blocks/ContextNavigation/ContextNavigationEdit.jsx +0 -45
- package/src/components/Blocks/ContextNavigation/ContextNavigationEdit.test.jsx +0 -88
- package/src/components/Blocks/ContextNavigation/ContextNavigationView.jsx +0 -14
- package/src/components/Blocks/ContextNavigation/ContextNavigationView.test.jsx +0 -71
- package/src/components/Blocks/ContextNavigation/index.js +0 -30
- package/src/components/Blocks/ContextNavigation/schema.js +0 -88
- package/src/components/Blocks/ContextNavigation/variations/Accordion.jsx +0 -175
- package/src/components/Blocks/ContextNavigation/variations/Default.jsx +0 -9
- package/src/components/Blocks/ContextNavigation/variations/index.js +0 -18
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,63 @@ 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
|
+
### [2.3.0](https://github.com/eea/volto-eea-website-policy/compare/2.2.3...2.3.0) - 11 October 2024
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat(ContextNavigation): improve accordion outside click handling [David Ichim - [`0eb27ac`](https://github.com/eea/volto-eea-website-policy/commit/0eb27acf6d8fd04ecb7f003d4fe2de65b0077168)]
|
|
12
|
+
- feat(ContextNavigation): wrap accordion summary and list in container on tablet [David Ichim - [`43b659f`](https://github.com/eea/volto-eea-website-policy/commit/43b659fab611c24d42b46fc7e57cbb9e292e5f6e)]
|
|
13
|
+
- feat(ContextNavigation): add aria-label to context navigation [David Ichim - [`5c7241d`](https://github.com/eea/volto-eea-website-policy/commit/5c7241d44146751b370b8d960d28efabd607c870)]
|
|
14
|
+
- feat: use isMenuOpenOnOutsideClick to detect outside clicks [nileshgulia1 - [`5bef098`](https://github.com/eea/volto-eea-website-policy/commit/5bef098d7dd6b9829fbb4c1341747aecad89fce5)]
|
|
15
|
+
- feat: add accordion variation for contextNavigation block [nileshgulia1 - [`a8fdad8`](https://github.com/eea/volto-eea-website-policy/commit/a8fdad8c1902224b56e6e4f30357546ef9de40dc)]
|
|
16
|
+
- feat(contextNavigation): add variations support [nileshgulia1 - [`4c984c8`](https://github.com/eea/volto-eea-website-policy/commit/4c984c8eadfcf0eb7aed0541fb8737fc2b1b2e27)]
|
|
17
|
+
|
|
18
|
+
#### :bug: Bug Fixes
|
|
19
|
+
|
|
20
|
+
- fix: cypress [nileshgulia1 - [`5df3c21`](https://github.com/eea/volto-eea-website-policy/commit/5df3c21f0e7043aa80e35077246be75a52c3c7e4)]
|
|
21
|
+
- fix(contextNav): make accordion expands initially, fix tests [nileshgulia1 - [`9bfa568`](https://github.com/eea/volto-eea-website-policy/commit/9bfa568ac9b584e4e3d9dea0675e82a93304a25f)]
|
|
22
|
+
- fix(context-navigation): set active accordion on initial mounts [nileshgulia1 - [`de902b1`](https://github.com/eea/volto-eea-website-policy/commit/de902b1fb1e06d50bc9a39bf589e8ededa6ec2a1)]
|
|
23
|
+
- fix: addKeyDown handlers [nileshgulia1 - [`7150f64`](https://github.com/eea/volto-eea-website-policy/commit/7150f641ab46c885b90474e37ff0bf294868ba95)]
|
|
24
|
+
- fix: make accordion accessible, add details tag [nileshgulia1 - [`d1e5f29`](https://github.com/eea/volto-eea-website-policy/commit/d1e5f29bf62801bf1b3f12f1417729acc1a010b0)]
|
|
25
|
+
- fix: compute is_current for nested items also [nileshgulia1 - [`3e66745`](https://github.com/eea/volto-eea-website-policy/commit/3e66745f39bcd4ac861124a16bfaa5685ec11e47)]
|
|
26
|
+
- fix: acitve states on accordion and links elements [nileshgulia1 - [`1b4426f`](https://github.com/eea/volto-eea-website-policy/commit/1b4426f8ce44f11cc10d73dd08f213c0b891c488)]
|
|
27
|
+
- fix: behave as links when no childs are present [nileshgulia1 - [`c6ac493`](https://github.com/eea/volto-eea-website-policy/commit/c6ac4937519d41f631757472f49f0b609ed8cda1)]
|
|
28
|
+
|
|
29
|
+
#### :nail_care: Enhancements
|
|
30
|
+
|
|
31
|
+
- change(navigation): moved navigation block with the side nav within volto-eea-website-theme #270999 #99 from eea/270999_report_navigation [Ichim David - [`f37254e`](https://github.com/eea/volto-eea-website-policy/commit/f37254e403ac3ce13c4b8d7bcecb54c811c8cad8)]
|
|
32
|
+
- change(contextNavigation): use withEEASideMenu in accordion variation [nileshgulia1 - [`24927d8`](https://github.com/eea/volto-eea-website-policy/commit/24927d8bb6c44e9a3267183ac0a0fd0c0aa58bd4)]
|
|
33
|
+
- change(accordion): simplify logic and improve render by have a list of elements instead of div tags [David Ichim - [`9c73cd5`](https://github.com/eea/volto-eea-website-policy/commit/9c73cd55b5303df958c64a12a251f9a9b15d35ef)]
|
|
34
|
+
|
|
35
|
+
#### :house: Internal changes
|
|
36
|
+
|
|
37
|
+
- chore(eslint):add tabIndex [nileshgulia1 - [`53a3ac2`](https://github.com/eea/volto-eea-website-policy/commit/53a3ac2bf52499fde069fbe57c5efc3f11eaa485)]
|
|
38
|
+
- chore: fix eslint [nileshgulia1 - [`acad444`](https://github.com/eea/volto-eea-website-policy/commit/acad4440314a9f5464cc1b2f10eb3ab1489ff54a)]
|
|
39
|
+
|
|
40
|
+
#### :hammer_and_wrench: Others
|
|
41
|
+
|
|
42
|
+
- removed test for context navigation after the move to volto-eea-website-theme [David Ichim - [`696f0a1`](https://github.com/eea/volto-eea-website-policy/commit/696f0a11c3a8401c064293053490265ffb644215)]
|
|
43
|
+
- bumped package version to 2.3.0 [David Ichim - [`fd88b99`](https://github.com/eea/volto-eea-website-policy/commit/fd88b99d92cb991171807788d8abea3d86832142)]
|
|
44
|
+
- removed ContextNavigation block moved within eea-website-theme [David Ichim - [`361b887`](https://github.com/eea/volto-eea-website-policy/commit/361b8877c02596b971c1ecabd84d8eaa89d3000f)]
|
|
45
|
+
- removed double rolesWhoCanChangeLayout setting [David Ichim - [`37dab9e`](https://github.com/eea/volto-eea-website-policy/commit/37dab9ef04dc1497655e49186f398b5dd53f39b1)]
|
|
46
|
+
- use contextnavigation in policy [nileshgulia1 - [`eea2258`](https://github.com/eea/volto-eea-website-policy/commit/eea2258244c146ff682e055ffb88cf0b9020da93)]
|
|
47
|
+
- move contextNav to volto-eea-website-theme [nileshgulia1 - [`07aa147`](https://github.com/eea/volto-eea-website-policy/commit/07aa14746a0253f75dc7c63610e1998eae6ffbf5)]
|
|
48
|
+
- Added extra handleOutsideClick on Accordion mobile and tablet to close when clicking besides the smaller menu [David Ichim - [`6d36534`](https://github.com/eea/volto-eea-website-policy/commit/6d365349ba9f779b527344d6d109c77d77501acf)]
|
|
49
|
+
- close nav on tablet or mobile resolution by default [David Ichim - [`9e119d2`](https://github.com/eea/volto-eea-website-policy/commit/9e119d23d50dd5a614279da6ec3ccc369a16ba19)]
|
|
50
|
+
- dropped useless code [David Ichim - [`7f5c122`](https://github.com/eea/volto-eea-website-policy/commit/7f5c122c596eb4db7f0ea4c81708b3c88aca657b)]
|
|
51
|
+
- Added initial context navigation block test for both Default and Accordion variations [David Ichim - [`7257385`](https://github.com/eea/volto-eea-website-policy/commit/7257385a69f3b7b3541c1a78588504812741d59f)]
|
|
52
|
+
- more sonarqube warning fixing [David Ichim - [`e676f77`](https://github.com/eea/volto-eea-website-policy/commit/e676f77a35578ddbc7f03d7c340084d24375bc67)]
|
|
53
|
+
- Removed leftover schema enhancer in favor of normal schema editing [David Ichim - [`b67f3c4`](https://github.com/eea/volto-eea-website-policy/commit/b67f3c412bd31efb1a4bbe2b6b6e1140a55bc32a)]
|
|
54
|
+
- fix sonarqube warning regarding missing onKeyDown for summary tag [David Ichim - [`e0fabbf`](https://github.com/eea/volto-eea-website-policy/commit/e0fabbf31609d8e3c706b13ae09c5c52f6a836c7)]
|
|
55
|
+
- use accordion-list-title instead of title class [David Ichim - [`4ee90f2`](https://github.com/eea/volto-eea-website-policy/commit/4ee90f23d3e3d306c5b26bcd405cc85df390f34d)]
|
|
56
|
+
- Added aria-controls, aria-labelledby and region role for better a11y support for accordion [David Ichim - [`a946170`](https://github.com/eea/volto-eea-website-policy/commit/a946170070dd9edd198338f70f19cd47e75e22d7)]
|
|
57
|
+
- bump size of accordion open close icon [David Ichim - [`b42ee13`](https://github.com/eea/volto-eea-website-policy/commit/b42ee1368ec83c2dc7f724d5e417d8b14c337459)]
|
|
58
|
+
- Added extra classes needed to properly style the accordion style context-navigation [David Ichim - [`bdd5aca`](https://github.com/eea/volto-eea-website-policy/commit/bdd5aca036e81de505051c4d84099bc0c37d54e1)]
|
|
59
|
+
- Improve filtering of navigation using portal_type passed to restapi [David Ichim - [`3a4ae52`](https://github.com/eea/volto-eea-website-policy/commit/3a4ae525a028445bb03686a68c4aeb926fdac39b)]
|
|
60
|
+
- WIP: filter portal_types in contextNavigation block [nileshgulia1 - [`b417ca1`](https://github.com/eea/volto-eea-website-policy/commit/b417ca14397da944220508df75ab38cd8a36f22d)]
|
|
61
|
+
- Lint fix [David Ichim - [`c41d684`](https://github.com/eea/volto-eea-website-policy/commit/c41d68481325009a918078f9870c22e9253638e4)]
|
|
62
|
+
- Added classes to ul and li of accordion context navigation [David Ichim - [`08cd8a6`](https://github.com/eea/volto-eea-website-policy/commit/08cd8a653308a49a137529264536e8aa024c6580)]
|
|
63
|
+
- Fix: also add expand icon when no name is set [nileshgulia1 - [`a06ab09`](https://github.com/eea/volto-eea-website-policy/commit/a06ab0989dc46962a68913dc8836be69d0349a04)]
|
|
7
64
|
### [2.2.3](https://github.com/eea/volto-eea-website-policy/compare/2.2.2...2.2.3) - 19 September 2024
|
|
8
65
|
|
|
9
66
|
#### :rocket: New Features
|
|
@@ -12,14 +69,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
12
69
|
|
|
13
70
|
#### :hammer_and_wrench: Others
|
|
14
71
|
|
|
15
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`74f7cb1`](https://github.com/eea/volto-eea-website-policy/commit/74f7cb1b4f7dd3232f9a6c0ad35e50bc86b64e60)]
|
|
16
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`c8978f0`](https://github.com/eea/volto-eea-website-policy/commit/c8978f02c53c38d88b654544051aa28ba5ccd05c)]
|
|
17
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`fb31e28`](https://github.com/eea/volto-eea-website-policy/commit/fb31e285959820147aa07e827cea25589d27be63)]
|
|
18
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`3b0c059`](https://github.com/eea/volto-eea-website-policy/commit/3b0c059772a0ca32f398c17b6ddb74be8e2f0060)]
|
|
19
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`25d16e4`](https://github.com/eea/volto-eea-website-policy/commit/25d16e401b4d2685a201a1b3a9830916ed4c5b80)]
|
|
20
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`d4fdfaf`](https://github.com/eea/volto-eea-website-policy/commit/d4fdfaf94d8fa962906cf713c865202bbff1ff60)]
|
|
21
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`742d72c`](https://github.com/eea/volto-eea-website-policy/commit/742d72c1f020fc7a2ed553dc739be54daeb2283d)]
|
|
22
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`e3dc5ef`](https://github.com/eea/volto-eea-website-policy/commit/e3dc5ef5da18aa64091388d8779dcc2819e5ad80)]
|
|
23
72
|
### [2.2.2](https://github.com/eea/volto-eea-website-policy/compare/2.2.1...2.2.2) - 28 August 2024
|
|
24
73
|
|
|
25
74
|
#### :bug: Bug Fixes
|
|
@@ -28,10 +77,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
28
77
|
|
|
29
78
|
#### :hammer_and_wrench: Others
|
|
30
79
|
|
|
31
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`2703b09`](https://github.com/eea/volto-eea-website-policy/commit/2703b09f3803fa058b45f3f55c5343ab548139a1)]
|
|
32
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`2506307`](https://github.com/eea/volto-eea-website-policy/commit/2506307c355c2de50a40b76a6c09ac1989d11be1)]
|
|
33
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`48999a4`](https://github.com/eea/volto-eea-website-policy/commit/48999a4a5a16593ca90981a72a4606abc4a02e89)]
|
|
34
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`de57cc0`](https://github.com/eea/volto-eea-website-policy/commit/de57cc0093cec55cf372fe4beb610f77588b4bb3)]
|
|
35
80
|
### [2.2.1](https://github.com/eea/volto-eea-website-policy/compare/2.2.0...2.2.1) - 27 August 2024
|
|
36
81
|
|
|
37
82
|
#### :bug: Bug Fixes
|
|
@@ -40,8 +85,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
40
85
|
|
|
41
86
|
#### :hammer_and_wrench: Others
|
|
42
87
|
|
|
43
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`e333afd`](https://github.com/eea/volto-eea-website-policy/commit/e333afd4354f5a78f7c2aec9026df928219c144a)]
|
|
44
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`9cb821a`](https://github.com/eea/volto-eea-website-policy/commit/9cb821a08010dfae144a5a4ae30e1c40da65d02a)]
|
|
45
88
|
### [2.2.0](https://github.com/eea/volto-eea-website-policy/compare/2.1.1...2.2.0) - 26 August 2024
|
|
46
89
|
|
|
47
90
|
#### :rocket: New Features
|
|
@@ -50,20 +93,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
50
93
|
|
|
51
94
|
#### :hammer_and_wrench: Others
|
|
52
95
|
|
|
53
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`9864108`](https://github.com/eea/volto-eea-website-policy/commit/9864108aea2be5def74d4d89542e0babf1fbc93b)]
|
|
54
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`d406101`](https://github.com/eea/volto-eea-website-policy/commit/d40610109bd581903a4a6212867197a352b3cc06)]
|
|
55
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`16936d4`](https://github.com/eea/volto-eea-website-policy/commit/16936d4b67baead7f2572eb19c47c9423da1af5a)]
|
|
56
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`1c1c92b`](https://github.com/eea/volto-eea-website-policy/commit/1c1c92bc8ea0a036cebf2b854197c52dd1f8681a)]
|
|
57
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`21accb1`](https://github.com/eea/volto-eea-website-policy/commit/21accb12e958b832f7463da93684f470420d1714)]
|
|
58
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`4898d16`](https://github.com/eea/volto-eea-website-policy/commit/4898d1673ba71098d18385d123f1fa403ff8089e)]
|
|
59
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`c4e596f`](https://github.com/eea/volto-eea-website-policy/commit/c4e596f4efbee0f835bf293f713da21669bc8c00)]
|
|
60
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`aa79040`](https://github.com/eea/volto-eea-website-policy/commit/aa7904074d9b90208218b4a801ea68491727de68)]
|
|
61
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`6c3aa38`](https://github.com/eea/volto-eea-website-policy/commit/6c3aa382200cd756f4bd7b40fee96bef71d5079e)]
|
|
62
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`9adc480`](https://github.com/eea/volto-eea-website-policy/commit/9adc480e0edf278386a065bf30b66c138592ee82)]
|
|
63
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`5554c13`](https://github.com/eea/volto-eea-website-policy/commit/5554c13183d7adda41dca07593fd51846b0d1375)]
|
|
64
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`e526958`](https://github.com/eea/volto-eea-website-policy/commit/e52695821dce6790ff89213f967569bce223680b)]
|
|
65
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`7e0381c`](https://github.com/eea/volto-eea-website-policy/commit/7e0381cd77ef067541585421a94536849dbdf4b5)]
|
|
66
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`3473b02`](https://github.com/eea/volto-eea-website-policy/commit/3473b02f98ea09fe4afa46389f14468c1897586d)]
|
|
67
96
|
### [2.1.1](https://github.com/eea/volto-eea-website-policy/compare/2.1.0...2.1.1) - 30 May 2024
|
|
68
97
|
|
|
69
98
|
#### :house: Internal changes
|
|
@@ -72,12 +101,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
72
101
|
|
|
73
102
|
#### :hammer_and_wrench: Others
|
|
74
103
|
|
|
75
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`c297b9e`](https://github.com/eea/volto-eea-website-policy/commit/c297b9efe743ad1f95ab662007a2186b5f042f4c)]
|
|
76
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`b11c055`](https://github.com/eea/volto-eea-website-policy/commit/b11c055d0a41c89a60f70875124994ba52772e48)]
|
|
77
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`a77d04e`](https://github.com/eea/volto-eea-website-policy/commit/a77d04e9f1e4d6b8657e09fd1a2bcde66499f77f)]
|
|
78
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`12c6e92`](https://github.com/eea/volto-eea-website-policy/commit/12c6e92e4157896bf812dbbd8996c754b491d3ea)]
|
|
79
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`0aa866d`](https://github.com/eea/volto-eea-website-policy/commit/0aa866dc6fb5f4226a99a3e192a958af60385185)]
|
|
80
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`7517f96`](https://github.com/eea/volto-eea-website-policy/commit/7517f96d82efd6a7ddaa746c81a51997583363f6)]
|
|
81
104
|
### [2.1.0](https://github.com/eea/volto-eea-website-policy/compare/2.0.0...2.1.0) - 9 May 2024
|
|
82
105
|
|
|
83
106
|
#### :rocket: New Features
|
|
@@ -87,10 +110,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
87
110
|
#### :hammer_and_wrench: Others
|
|
88
111
|
|
|
89
112
|
- Release 2.1.0 [alin - [`da22af4`](https://github.com/eea/volto-eea-website-policy/commit/da22af436092236d7ef6e8568e3eca4813d517b5)]
|
|
90
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`9a5d706`](https://github.com/eea/volto-eea-website-policy/commit/9a5d7064e829622e2627c616c4ca1ce71511dfcb)]
|
|
91
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`f8b40e9`](https://github.com/eea/volto-eea-website-policy/commit/f8b40e961138efc4090d0ab45a5689905c672b15)]
|
|
92
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`4ab2144`](https://github.com/eea/volto-eea-website-policy/commit/4ab2144e02291d98064b001d9eb40417da4d1795)]
|
|
93
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`5af4642`](https://github.com/eea/volto-eea-website-policy/commit/5af464227c6695c7e2d3ccd9f240c2a5071bfefa)]
|
|
94
113
|
## [2.0.0](https://github.com/eea/volto-eea-website-policy/compare/1.15.0...2.0.0) - 22 April 2024
|
|
95
114
|
|
|
96
115
|
#### :rocket: New Features
|
|
@@ -163,7 +182,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
163
182
|
|
|
164
183
|
#### :hammer_and_wrench: Others
|
|
165
184
|
|
|
166
|
-
- test: [JENKINS] fail with logs on coverage [valentinab25 - [`5cf68f8`](https://github.com/eea/volto-eea-website-policy/commit/5cf68f8db34448d10fe993d16541ad9732434cc8)]
|
|
167
185
|
### [1.12.0-beta.1](https://github.com/eea/volto-eea-website-policy/compare/1.11.1...1.12.0-beta.1) - 12 January 2024
|
|
168
186
|
|
|
169
187
|
#### :hammer_and_wrench: Others
|
|
@@ -184,11 +202,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
184
202
|
#### :hammer_and_wrench: Others
|
|
185
203
|
|
|
186
204
|
- Release 1.11.0 [Alin Voinea - [`3249160`](https://github.com/eea/volto-eea-website-policy/commit/3249160422c6c6e0cf14823b614f8885101a847a)]
|
|
187
|
-
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`8beb7e7`](https://github.com/eea/volto-eea-website-policy/commit/8beb7e7a12cbc314e56e4b1aceab5ef8d00ca6f3)]
|
|
188
|
-
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`12d3da1`](https://github.com/eea/volto-eea-website-policy/commit/12d3da12e9a3b0882cf55efe2d40f3032724d41b)]
|
|
189
|
-
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`0af0764`](https://github.com/eea/volto-eea-website-policy/commit/0af076467120ed9a80c697931e869837b92a0a4c)]
|
|
190
|
-
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`8662e3e`](https://github.com/eea/volto-eea-website-policy/commit/8662e3e5fc3640d678ce320eb8856a37d419306c)]
|
|
191
|
-
- test: [JENKINS] Improve cypress time [valentinab25 - [`ef1074f`](https://github.com/eea/volto-eea-website-policy/commit/ef1074fdf968cafdf476d4ee4951eb18ebac048a)]
|
|
192
205
|
### [1.10.0](https://github.com/eea/volto-eea-website-policy/compare/1.9.2...1.10.0) - 2 November 2023
|
|
193
206
|
|
|
194
207
|
#### :rocket: New Features
|
|
@@ -197,7 +210,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
197
210
|
|
|
198
211
|
#### :house: Internal changes
|
|
199
212
|
|
|
200
|
-
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`8b1b422`](https://github.com/eea/volto-eea-website-policy/commit/8b1b42297b46d9fb7325589b3bd043233c0d66e9)]
|
|
201
213
|
- chore: husky, lint-staged use fixed versions [valentinab25 - [`44ac62e`](https://github.com/eea/volto-eea-website-policy/commit/44ac62e6f8b7e5b7d57edfbf82812c91dc5d6bba)]
|
|
202
214
|
- chore:volto 16 in tests, update docs, fix stylelint overrides [valentinab25 - [`b9a46d8`](https://github.com/eea/volto-eea-website-policy/commit/b9a46d85a64739188a3df9e8cbe645418b5d8b0a)]
|
|
203
215
|
|
|
@@ -318,7 +330,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
318
330
|
|
|
319
331
|
- Release 1.5.0 [Alin Voinea - [`a3dea8e`](https://github.com/eea/volto-eea-website-policy/commit/a3dea8ea15cb8d2a876dc10da926ece3a5707ea9)]
|
|
320
332
|
- test(Jenkinsfile): Use latest stable volto for testing [Alin Voinea - [`a8f7123`](https://github.com/eea/volto-eea-website-policy/commit/a8f712364187f9638886667c249fa102cb49b5c0)]
|
|
321
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`124a8f8`](https://github.com/eea/volto-eea-website-policy/commit/124a8f8ad4ced507aeec27012d725f2e2b977e08)]
|
|
322
333
|
### [1.4.0](https://github.com/eea/volto-eea-website-policy/compare/1.3.4...1.4.0) - 21 February 2023
|
|
323
334
|
|
|
324
335
|
#### :rocket: New Features
|
|
@@ -398,7 +409,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
398
409
|
#### :hammer_and_wrench: Others
|
|
399
410
|
|
|
400
411
|
- Release 1.1.0 [Alin Voinea - [`0291b3b`](https://github.com/eea/volto-eea-website-policy/commit/0291b3bb7b4c6ab09ca98728885cea4051eac8e3)]
|
|
401
|
-
- yarn 3 [Alin Voinea - [`593aa58`](https://github.com/eea/volto-eea-website-policy/commit/593aa58eaa4d28aced0603b7f7dd125c857a6f54)]
|
|
402
412
|
### [1.0.4](https://github.com/eea/volto-eea-website-policy/compare/1.0.3...1.0.4) - 22 November 2022
|
|
403
413
|
|
|
404
414
|
#### :nail_care: Enhancements
|
|
@@ -444,7 +454,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
444
454
|
|
|
445
455
|
#### :hammer_and_wrench: Others
|
|
446
456
|
|
|
447
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`d153f54`](https://github.com/eea/volto-eea-website-policy/commit/d153f54e55e918fa4746e05488c734624eaf14a9)]
|
|
448
457
|
### [0.4.0](https://github.com/eea/volto-eea-website-policy/compare/0.3.3...0.4.0) - 19 September 2022
|
|
449
458
|
|
|
450
459
|
#### :hammer_and_wrench: Others
|
|
@@ -520,7 +529,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
520
529
|
- format index.js [Andrei Grigore - [`db4481a`](https://github.com/eea/volto-eea-website-policy/commit/db4481aeeba59a769272659f33278c902fc69bec)]
|
|
521
530
|
- Update index.js [Alexandru Ghica - [`dc09886`](https://github.com/eea/volto-eea-website-policy/commit/dc0988640a76a9914381b120f58bb61a9ab1eb39)]
|
|
522
531
|
- Added externalRoutes [Alexandru Ghica - [`b68135b`](https://github.com/eea/volto-eea-website-policy/commit/b68135b013fafa93a41ea602ea2fad30879abe0f)]
|
|
523
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`575cca6`](https://github.com/eea/volto-eea-website-policy/commit/575cca674602ca2e1c2a41300c47ba594ff49aa0)]
|
|
524
532
|
### [0.1.1](https://github.com/eea/volto-eea-website-policy/compare/0.1.0...0.1.1) - 4 March 2022
|
|
525
533
|
|
|
526
534
|
#### :hammer_and_wrench: Others
|
|
@@ -533,5 +541,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
533
541
|
|
|
534
542
|
#### :hammer_and_wrench: Others
|
|
535
543
|
|
|
536
|
-
- yarn bootstrap [Alin Voinea - [`9b4d197`](https://github.com/eea/volto-eea-website-policy/commit/9b4d197cbc7992566cb36524d190078d5ad21a44)]
|
|
537
544
|
- Initial commit [Alin Voinea - [`3800692`](https://github.com/eea/volto-eea-website-policy/commit/3800692f7a4de6460815bd6061facacb986cbef0)]
|
package/locales/volto.pot
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
msgid ""
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Plone\n"
|
|
4
|
-
"POT-Creation-Date:
|
|
4
|
+
"POT-Creation-Date: 2024-09-02T18:05:47.779Z\n"
|
|
5
5
|
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
6
6
|
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
7
|
-
"MIME-Version: 1.0\n"
|
|
8
7
|
"Content-Type: text/plain; charset=utf-8\n"
|
|
9
8
|
"Content-Transfer-Encoding: 8bit\n"
|
|
10
9
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
10
|
+
"MIME-Version: 1.0\n"
|
|
11
11
|
"Language-Code: en\n"
|
|
12
12
|
"Language-Name: English\n"
|
|
13
13
|
"Preferred-Encodings: utf-8\n"
|
|
14
14
|
"Domain: volto\n"
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
#. Default: "Navigation"
|
|
17
|
+
#: components/Blocks/ContextNavigation/variations/Accordion
|
|
18
|
+
#: components/Blocks/ContextNavigation/variations/AccordionClaude
|
|
19
|
+
#: components/Blocks/ContextNavigation/variations/AccordionOriginal
|
|
20
|
+
msgid "Navigation"
|
|
21
|
+
msgstr ""
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-eea-website-policy",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.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",
|
|
@@ -17,12 +17,10 @@
|
|
|
17
17
|
"url": "git@github.com:eea/volto-eea-website-policy.git"
|
|
18
18
|
},
|
|
19
19
|
"addons": [
|
|
20
|
-
"@eeacms/volto-block-toc",
|
|
21
20
|
"@eeacms/volto-widget-dataprovenance",
|
|
22
21
|
"@plone-collective/volto-authomatic"
|
|
23
22
|
],
|
|
24
23
|
"dependencies": {
|
|
25
|
-
"@eeacms/volto-block-toc": "*",
|
|
26
24
|
"@eeacms/volto-widget-dataprovenance": "*",
|
|
27
25
|
"@plone-collective/volto-authomatic": "*"
|
|
28
26
|
},
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { runtimeConfig } from '@plone/volto/runtime_config';
|
|
2
|
-
import installContextNavigationBlock from '@eeacms/volto-eea-website-policy/components/Blocks/ContextNavigation';
|
|
3
2
|
import { appendGroup } from './helpers';
|
|
4
3
|
import { FrequencyOfDissemination } from '@eeacms/volto-eea-website-policy/components/Widgets/FrequencyOfDissemination';
|
|
5
4
|
|
|
@@ -98,14 +97,6 @@ const applyConfig = (config) => {
|
|
|
98
97
|
...config.settings.eea,
|
|
99
98
|
rolesWhoCanChangeLayout: ['Manager'],
|
|
100
99
|
};
|
|
101
|
-
config.settings.eea.rolesWhoCanChangeLayout = ['Manager'];
|
|
102
|
-
|
|
103
|
-
// Custom blocks
|
|
104
|
-
// context navigation
|
|
105
|
-
config = [installContextNavigationBlock].reduce(
|
|
106
|
-
(acc, apply) => apply(acc),
|
|
107
|
-
config,
|
|
108
|
-
);
|
|
109
100
|
|
|
110
101
|
// Add groups
|
|
111
102
|
config.blocks.groupBlocksOrder = appendGroup(
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EditSchema } from './schema';
|
|
3
|
-
import { SidebarPortal } from '@plone/volto/components';
|
|
4
|
-
import BlockDataForm from '@plone/volto/components/manage/Form/BlockDataForm';
|
|
5
|
-
|
|
6
|
-
import ContextNavigationView from './ContextNavigationView';
|
|
7
|
-
|
|
8
|
-
const ContextNavigationFillEdit = (props) => {
|
|
9
|
-
const contentTypes = props.properties?.['@components']?.types;
|
|
10
|
-
const availableTypes = React.useMemo(
|
|
11
|
-
() => contentTypes?.map((type) => [type.id, type.title || type.name]),
|
|
12
|
-
[contentTypes],
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
const schema = React.useMemo(
|
|
16
|
-
() => EditSchema({ availableTypes }),
|
|
17
|
-
[availableTypes],
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<>
|
|
22
|
-
<h3>Context navigation</h3>
|
|
23
|
-
<ContextNavigationView {...props} mode="edit" />{' '}
|
|
24
|
-
<SidebarPortal selected={props.selected}>
|
|
25
|
-
<BlockDataForm
|
|
26
|
-
schema={schema}
|
|
27
|
-
title={schema.title}
|
|
28
|
-
onChangeField={(id, value) => {
|
|
29
|
-
props.onChangeBlock(props.block, {
|
|
30
|
-
...props.data,
|
|
31
|
-
[id]: value,
|
|
32
|
-
});
|
|
33
|
-
}}
|
|
34
|
-
onChangeBlock={props.onChangeBlock}
|
|
35
|
-
formData={props.data}
|
|
36
|
-
block={props.block}
|
|
37
|
-
navRoot={props.navRoot}
|
|
38
|
-
contentType={props.contentType}
|
|
39
|
-
/>
|
|
40
|
-
</SidebarPortal>
|
|
41
|
-
</>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export default ContextNavigationFillEdit;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render, fireEvent } from '@testing-library/react';
|
|
3
|
-
import ContextNavigationEdit from './ContextNavigationEdit';
|
|
4
|
-
import { Router } from 'react-router-dom';
|
|
5
|
-
import { Provider } from 'react-intl-redux';
|
|
6
|
-
import configureStore from 'redux-mock-store';
|
|
7
|
-
import { createMemoryHistory } from 'history';
|
|
8
|
-
import '@testing-library/jest-dom/extend-expect';
|
|
9
|
-
|
|
10
|
-
jest.mock('@plone/volto/components', () => ({
|
|
11
|
-
InlineForm: ({ onChangeField }) => (
|
|
12
|
-
<div>
|
|
13
|
-
<p>InlineForm</p>
|
|
14
|
-
<input id="test" onChange={onChangeField} />
|
|
15
|
-
</div>
|
|
16
|
-
),
|
|
17
|
-
SidebarPortal: ({ children, selected }) =>
|
|
18
|
-
selected ? (
|
|
19
|
-
<div>
|
|
20
|
-
<div>SidebarPortal</div>
|
|
21
|
-
{children}
|
|
22
|
-
</div>
|
|
23
|
-
) : null,
|
|
24
|
-
}));
|
|
25
|
-
|
|
26
|
-
jest.mock('@plone/volto/components/theme/Navigation/ContextNavigation', () => {
|
|
27
|
-
return {
|
|
28
|
-
__esModule: true,
|
|
29
|
-
default: ({ params }) => {
|
|
30
|
-
return <div>ConnectedContextNavigation {params.root_path}</div>;
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
jest.mock('@plone/volto/helpers', () => ({
|
|
36
|
-
withBlockExtensions: jest.fn((Component) => Component),
|
|
37
|
-
emptyBlocksForm: jest.fn(),
|
|
38
|
-
getBlocksLayoutFieldname: () => 'blocks_layout',
|
|
39
|
-
withVariationSchemaEnhancer: jest.fn((Component) => Component),
|
|
40
|
-
}));
|
|
41
|
-
|
|
42
|
-
const mockStore = configureStore();
|
|
43
|
-
const store = mockStore({
|
|
44
|
-
intl: {
|
|
45
|
-
locale: 'en',
|
|
46
|
-
messages: {},
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
describe('ContextNavigationEdit', () => {
|
|
51
|
-
it('renders corectly', () => {
|
|
52
|
-
const history = createMemoryHistory();
|
|
53
|
-
const { getByText, queryByText } = render(
|
|
54
|
-
<Provider store={store}>
|
|
55
|
-
<Router history={history}>
|
|
56
|
-
<ContextNavigationEdit selected={false} />
|
|
57
|
-
</Router>
|
|
58
|
-
,
|
|
59
|
-
</Provider>,
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
expect(getByText('Context navigation')).toBeInTheDocument();
|
|
63
|
-
expect(getByText('ConnectedContextNavigation')).toBeInTheDocument();
|
|
64
|
-
expect(queryByText('InlineForm')).toBeNull();
|
|
65
|
-
expect(queryByText('SidebarPortal')).toBeNull();
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
it('renders corectly', () => {
|
|
69
|
-
const history = createMemoryHistory();
|
|
70
|
-
const { container, getByText } = render(
|
|
71
|
-
<Provider store={store}>
|
|
72
|
-
<Router history={history}>
|
|
73
|
-
<ContextNavigationEdit selected={true} onChangeBlock={() => {}} />
|
|
74
|
-
</Router>
|
|
75
|
-
,
|
|
76
|
-
</Provider>,
|
|
77
|
-
);
|
|
78
|
-
|
|
79
|
-
expect(getByText('Context navigation')).toBeInTheDocument();
|
|
80
|
-
expect(getByText('ConnectedContextNavigation')).toBeInTheDocument();
|
|
81
|
-
expect(getByText('InlineForm')).toBeInTheDocument();
|
|
82
|
-
expect(getByText('SidebarPortal')).toBeInTheDocument();
|
|
83
|
-
|
|
84
|
-
fireEvent.change(container.querySelector('#test'), {
|
|
85
|
-
target: { value: 'test' },
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { flattenToAppURL, withBlockExtensions } from '@plone/volto/helpers';
|
|
3
|
-
import DefaultTemplate from './variations/Default';
|
|
4
|
-
|
|
5
|
-
const ContextNavigationView = (props = {}) => {
|
|
6
|
-
const { variation, data = {} } = props;
|
|
7
|
-
const navProps = { ...data };
|
|
8
|
-
const root_path = data?.root_node?.[0]?.['@id'];
|
|
9
|
-
if (root_path) navProps['root_path'] = flattenToAppURL(root_path);
|
|
10
|
-
const Renderer = variation?.view ?? DefaultTemplate;
|
|
11
|
-
return <Renderer params={navProps} mode={props.mode} />;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default withBlockExtensions(ContextNavigationView);
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
import ContextNavigationView from './ContextNavigationView';
|
|
4
|
-
import { Router } from 'react-router-dom';
|
|
5
|
-
import { Provider } from 'react-intl-redux';
|
|
6
|
-
import configureStore from 'redux-mock-store';
|
|
7
|
-
import { createMemoryHistory } from 'history';
|
|
8
|
-
import '@testing-library/jest-dom/extend-expect';
|
|
9
|
-
|
|
10
|
-
jest.mock('@plone/volto/components/theme/Navigation/ContextNavigation', () => {
|
|
11
|
-
return {
|
|
12
|
-
__esModule: true,
|
|
13
|
-
default: ({ params }) => {
|
|
14
|
-
return <div>ConnectedContextNavigation {params.root_path}</div>;
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
jest.mock('@plone/volto/helpers', () => ({
|
|
20
|
-
withBlockExtensions: jest.fn((Component) => Component),
|
|
21
|
-
emptyBlocksForm: jest.fn(),
|
|
22
|
-
getBlocksLayoutFieldname: () => 'blocks_layout',
|
|
23
|
-
flattenToAppURL: () => '',
|
|
24
|
-
}));
|
|
25
|
-
|
|
26
|
-
const mockStore = configureStore();
|
|
27
|
-
const store = mockStore({
|
|
28
|
-
intl: {
|
|
29
|
-
locale: 'en',
|
|
30
|
-
messages: {},
|
|
31
|
-
},
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
describe('ContextNavigationView', () => {
|
|
35
|
-
let history;
|
|
36
|
-
beforeEach(() => {
|
|
37
|
-
history = createMemoryHistory();
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it('renders corectly', () => {
|
|
41
|
-
const { container } = render(
|
|
42
|
-
<Provider store={store}>
|
|
43
|
-
<Router history={history}>
|
|
44
|
-
<ContextNavigationView />
|
|
45
|
-
</Router>
|
|
46
|
-
</Provider>,
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
expect(container.firstChild).toHaveTextContent(
|
|
50
|
-
'ConnectedContextNavigation',
|
|
51
|
-
);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it('renders corectly', () => {
|
|
55
|
-
const { container } = render(
|
|
56
|
-
<Provider store={store}>
|
|
57
|
-
<Router history={history}>
|
|
58
|
-
<ContextNavigationView
|
|
59
|
-
data={{
|
|
60
|
-
navProps: { root_path: 'https://localhost:3000/test' },
|
|
61
|
-
root_node: [{ '@id': 'root_node' }],
|
|
62
|
-
}}
|
|
63
|
-
/>
|
|
64
|
-
</Router>
|
|
65
|
-
</Provider>,
|
|
66
|
-
);
|
|
67
|
-
expect(container.firstChild).toHaveTextContent(
|
|
68
|
-
'ConnectedContextNavigation',
|
|
69
|
-
);
|
|
70
|
-
});
|
|
71
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import codeSVG from '@plone/volto/icons/code.svg';
|
|
2
|
-
import ContextNavigationEdit from './ContextNavigationEdit';
|
|
3
|
-
import ContextNavigationView from './ContextNavigationView';
|
|
4
|
-
import BlockSettingsSchema from '@plone/volto/components/manage/Blocks/Block/Schema';
|
|
5
|
-
import variations from './variations';
|
|
6
|
-
|
|
7
|
-
const applyConfig = (config) => {
|
|
8
|
-
config.blocks.blocksConfig.contextNavigation = {
|
|
9
|
-
id: 'contextNavigation',
|
|
10
|
-
title: 'Navigation',
|
|
11
|
-
icon: codeSVG,
|
|
12
|
-
group: 'site',
|
|
13
|
-
view: ContextNavigationView,
|
|
14
|
-
edit: ContextNavigationEdit,
|
|
15
|
-
schema: BlockSettingsSchema,
|
|
16
|
-
restricted: true,
|
|
17
|
-
variations,
|
|
18
|
-
mostUsed: true,
|
|
19
|
-
blockHasOwnFocusManagement: true,
|
|
20
|
-
sidebarTab: 1,
|
|
21
|
-
security: {
|
|
22
|
-
addPermission: [],
|
|
23
|
-
view: [],
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return config;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export default applyConfig;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
export const EditSchema = ({ availableTypes }) => {
|
|
2
|
-
return {
|
|
3
|
-
title: 'Navigation',
|
|
4
|
-
fieldsets: [
|
|
5
|
-
{
|
|
6
|
-
id: 'default',
|
|
7
|
-
title: 'Default',
|
|
8
|
-
fields: [
|
|
9
|
-
'name',
|
|
10
|
-
'root_node',
|
|
11
|
-
'portal_type',
|
|
12
|
-
'includeTop',
|
|
13
|
-
'currentFolderOnly',
|
|
14
|
-
'topLevel',
|
|
15
|
-
'bottomLevel',
|
|
16
|
-
'no_icons',
|
|
17
|
-
'thumb_scale',
|
|
18
|
-
'no_thumbs',
|
|
19
|
-
],
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
required: [],
|
|
23
|
-
properties: {
|
|
24
|
-
name: {
|
|
25
|
-
title: 'Title',
|
|
26
|
-
description: 'The title of the navigation tree',
|
|
27
|
-
},
|
|
28
|
-
root_node: {
|
|
29
|
-
title: 'Root node',
|
|
30
|
-
description:
|
|
31
|
-
'You may search for and choose a folder to act as the root of the navigation tree. Leave blank to use the Plone site root.',
|
|
32
|
-
widget: 'object_browser',
|
|
33
|
-
// TODO: these don't work. Why?
|
|
34
|
-
mode: 'link',
|
|
35
|
-
selectedItemAttrs: ['Title', 'Description'],
|
|
36
|
-
},
|
|
37
|
-
portal_type: {
|
|
38
|
-
title: 'Filter children',
|
|
39
|
-
description: 'Only show child items of this content type',
|
|
40
|
-
choices: availableTypes,
|
|
41
|
-
isMulti: true,
|
|
42
|
-
},
|
|
43
|
-
includeTop: {
|
|
44
|
-
title: 'Include top node',
|
|
45
|
-
description:
|
|
46
|
-
"Whether or not to show the top, or 'root', node in the navigation tree. This is affected by the 'Start level' setting.",
|
|
47
|
-
type: 'boolean',
|
|
48
|
-
},
|
|
49
|
-
currentFolderOnly: {
|
|
50
|
-
title: 'Only show the contents of the current folder',
|
|
51
|
-
description:
|
|
52
|
-
'If selected, the navigation tree will only show the current folder and its children at all times.',
|
|
53
|
-
type: 'boolean',
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
topLevel: {
|
|
57
|
-
title: 'Start level',
|
|
58
|
-
description:
|
|
59
|
-
'An integer value that specifies the number of folder levels below the site root that must be exceeded before the navigation tree will display. 0 means that the navigation tree should be displayed everywhere including pages in the root of the site. 1 means the tree only shows up inside folders located in the root and downwards, never showing at the top level.',
|
|
60
|
-
type: 'number',
|
|
61
|
-
default: 1,
|
|
62
|
-
},
|
|
63
|
-
bottomLevel: {
|
|
64
|
-
title: 'Navigation tree depth',
|
|
65
|
-
description:
|
|
66
|
-
'How many folders should be included before the navigation tree stops. 0 means no limit. 1 only includes the root folder.',
|
|
67
|
-
type: 'number',
|
|
68
|
-
default: 0,
|
|
69
|
-
},
|
|
70
|
-
no_icons: {
|
|
71
|
-
title: 'Suppress icons',
|
|
72
|
-
description:
|
|
73
|
-
'If enabled, the portlet will not show document type icons.',
|
|
74
|
-
type: 'boolean',
|
|
75
|
-
},
|
|
76
|
-
thumb_scale: {
|
|
77
|
-
title: 'Override thumb scale',
|
|
78
|
-
description:
|
|
79
|
-
"Enter a valid scale name (see 'Image Handling' control panel) to override (e.g. icon, tile, thumb, mini, preview, ... ). Leave empty to use default (see 'Site' control panel).",
|
|
80
|
-
},
|
|
81
|
-
no_thumbs: {
|
|
82
|
-
title: 'Suppress thumbs',
|
|
83
|
-
type: 'boolean',
|
|
84
|
-
description: 'If enabled, the portlet will not show thumbs.',
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
};
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import cx from 'classnames';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { defineMessages, useIntl } from 'react-intl';
|
|
5
|
-
import { withRouter } from 'react-router';
|
|
6
|
-
import { compose } from 'redux';
|
|
7
|
-
import { Accordion } from 'semantic-ui-react';
|
|
8
|
-
|
|
9
|
-
import Slugger from 'github-slugger';
|
|
10
|
-
|
|
11
|
-
import { Icon, UniversalLink } from '@plone/volto/components';
|
|
12
|
-
import { withContentNavigation } from '@plone/volto/components/theme/Navigation/withContentNavigation';
|
|
13
|
-
import withEEASideMenu from '@eeacms/volto-block-toc/hocs/withEEASideMenu';
|
|
14
|
-
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
15
|
-
|
|
16
|
-
import downIcon from '@plone/volto/icons/down-key.svg';
|
|
17
|
-
import upIcon from '@plone/volto/icons/up-key.svg';
|
|
18
|
-
|
|
19
|
-
const messages = defineMessages({
|
|
20
|
-
navigation: {
|
|
21
|
-
id: 'Navigation',
|
|
22
|
-
defaultMessage: 'Navigation',
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
const AccordionNavigation = ({
|
|
27
|
-
navigation = {},
|
|
28
|
-
device,
|
|
29
|
-
isMenuOpenOnOutsideClick,
|
|
30
|
-
}) => {
|
|
31
|
-
const { items = [], title, has_custom_name } = navigation;
|
|
32
|
-
const intl = useIntl();
|
|
33
|
-
const navOpen = ['mobile', 'tablet'].includes(device) ? false : true;
|
|
34
|
-
const [isNavOpen, setIsNavOpen] = React.useState(navOpen);
|
|
35
|
-
const [activeItems, setActiveItems] = React.useState({});
|
|
36
|
-
|
|
37
|
-
const onClickSummary = React.useCallback((e) => {
|
|
38
|
-
e.preventDefault();
|
|
39
|
-
setIsNavOpen((prev) => !prev);
|
|
40
|
-
}, []);
|
|
41
|
-
|
|
42
|
-
React.useEffect(() => {
|
|
43
|
-
if (isMenuOpenOnOutsideClick === false) setIsNavOpen(false);
|
|
44
|
-
}, [isMenuOpenOnOutsideClick]);
|
|
45
|
-
|
|
46
|
-
const onKeyDownSummary = React.useCallback(
|
|
47
|
-
(e) => {
|
|
48
|
-
if (e.keyCode === 13 || e.keyCode === 32) {
|
|
49
|
-
e.preventDefault();
|
|
50
|
-
onClickSummary(e);
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
[onClickSummary],
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
const renderItems = ({ item, level = 0 }) => {
|
|
57
|
-
const {
|
|
58
|
-
title,
|
|
59
|
-
href,
|
|
60
|
-
is_current,
|
|
61
|
-
is_in_path,
|
|
62
|
-
items: childItems,
|
|
63
|
-
type,
|
|
64
|
-
} = item;
|
|
65
|
-
const hasChildItems = childItems && childItems.length > 0;
|
|
66
|
-
const normalizedTitle = Slugger.slug(title);
|
|
67
|
-
|
|
68
|
-
const checkIfActive = () => {
|
|
69
|
-
return activeItems[href] !== undefined ? activeItems[href] : is_in_path;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
const isActive = checkIfActive();
|
|
73
|
-
|
|
74
|
-
const handleTitleClick = () => {
|
|
75
|
-
setActiveItems((prev) => ({ ...prev, [href]: !isActive }));
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
return (
|
|
79
|
-
<li
|
|
80
|
-
className={cx({
|
|
81
|
-
is_in_path,
|
|
82
|
-
'accordion-list-title': !hasChildItems,
|
|
83
|
-
'accordion-list-item': hasChildItems,
|
|
84
|
-
})}
|
|
85
|
-
key={href}
|
|
86
|
-
>
|
|
87
|
-
{hasChildItems ? (
|
|
88
|
-
<Accordion className="default">
|
|
89
|
-
<Accordion.Title
|
|
90
|
-
active={isActive}
|
|
91
|
-
as={'button'}
|
|
92
|
-
aria-expanded={isActive}
|
|
93
|
-
onClick={handleTitleClick}
|
|
94
|
-
aria-controls={`accordion-content-${normalizedTitle}`}
|
|
95
|
-
id={`accordion-title-${normalizedTitle}`}
|
|
96
|
-
>
|
|
97
|
-
<span className="title-text">{title}</span>
|
|
98
|
-
<Icon name={isActive ? upIcon : downIcon} size="32px" />
|
|
99
|
-
</Accordion.Title>
|
|
100
|
-
<Accordion.Content
|
|
101
|
-
active={isActive}
|
|
102
|
-
id={`accordion-content-${normalizedTitle}`}
|
|
103
|
-
aria-labelledby={`accordion-title-${normalizedTitle}`}
|
|
104
|
-
role="region"
|
|
105
|
-
>
|
|
106
|
-
<ul className="accordion-list">
|
|
107
|
-
{childItems.map((child) =>
|
|
108
|
-
renderItems({ item: child, level: level + 1 }),
|
|
109
|
-
)}
|
|
110
|
-
</ul>
|
|
111
|
-
</Accordion.Content>
|
|
112
|
-
</Accordion>
|
|
113
|
-
) : (
|
|
114
|
-
<UniversalLink
|
|
115
|
-
href={flattenToAppURL(href)}
|
|
116
|
-
className={cx(`title-link contenttype-${type}`, {
|
|
117
|
-
current: is_current,
|
|
118
|
-
in_path: is_in_path,
|
|
119
|
-
})}
|
|
120
|
-
>
|
|
121
|
-
{title}
|
|
122
|
-
</UniversalLink>
|
|
123
|
-
)}
|
|
124
|
-
</li>
|
|
125
|
-
);
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
return items.length ? (
|
|
129
|
-
<>
|
|
130
|
-
<nav className="context-navigation">
|
|
131
|
-
<details open={isNavOpen}>
|
|
132
|
-
{/* eslint-disable-next-line */}
|
|
133
|
-
<summary
|
|
134
|
-
className="context-navigation-header accordion-header"
|
|
135
|
-
onClick={onClickSummary}
|
|
136
|
-
onKeyDown={onKeyDownSummary}
|
|
137
|
-
>
|
|
138
|
-
{has_custom_name ? title : intl.formatMessage(messages.navigation)}
|
|
139
|
-
<Icon name={isNavOpen ? upIcon : downIcon} size="40px" />
|
|
140
|
-
</summary>
|
|
141
|
-
<ul className="context-navigation-list accordion-list">
|
|
142
|
-
{items.map((item) => renderItems({ item }))}
|
|
143
|
-
</ul>
|
|
144
|
-
</details>
|
|
145
|
-
</nav>
|
|
146
|
-
</>
|
|
147
|
-
) : null;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
AccordionNavigation.propTypes = {
|
|
151
|
-
/**
|
|
152
|
-
* Navigation tree returned from @contextnavigation restapi endpoint
|
|
153
|
-
*/
|
|
154
|
-
navigation: PropTypes.shape({
|
|
155
|
-
items: PropTypes.arrayOf(
|
|
156
|
-
PropTypes.shape({
|
|
157
|
-
title: PropTypes.string,
|
|
158
|
-
url: PropTypes.string,
|
|
159
|
-
href: PropTypes.string,
|
|
160
|
-
is_current: PropTypes.bool,
|
|
161
|
-
is_in_path: PropTypes.bool,
|
|
162
|
-
items: PropTypes.array,
|
|
163
|
-
type: PropTypes.string,
|
|
164
|
-
}),
|
|
165
|
-
),
|
|
166
|
-
has_custom_name: PropTypes.bool,
|
|
167
|
-
title: PropTypes.string,
|
|
168
|
-
}),
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
export default compose(
|
|
172
|
-
withRouter,
|
|
173
|
-
withContentNavigation,
|
|
174
|
-
withEEASideMenu,
|
|
175
|
-
)(AccordionNavigation);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ConnectedContextNavigation from '@plone/volto/components/theme/Navigation/ContextNavigation';
|
|
3
|
-
|
|
4
|
-
const Default = (props) => {
|
|
5
|
-
const { params } = props;
|
|
6
|
-
return <ConnectedContextNavigation params={params} />;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export default Default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import Accordion from './Accordion';
|
|
2
|
-
import Default from './Default';
|
|
3
|
-
|
|
4
|
-
const contextBlockVariations = [
|
|
5
|
-
{
|
|
6
|
-
id: 'default',
|
|
7
|
-
title: 'Listing (default)',
|
|
8
|
-
view: Default,
|
|
9
|
-
isDefault: true,
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
id: 'accordion',
|
|
13
|
-
title: 'Accordion',
|
|
14
|
-
view: Accordion,
|
|
15
|
-
},
|
|
16
|
-
];
|
|
17
|
-
|
|
18
|
-
export default contextBlockVariations;
|