@eeacms/volto-eea-website-theme 4.1.1 → 4.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 CHANGED
@@ -4,6 +4,20 @@ 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
+ ### [4.3.0](https://github.com/eea/volto-eea-website-theme/compare/4.2.0...4.3.0) - 23 April 2026
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: Align Toast with EEA Design System Message - refs #294806 [Alin Voinea - [`53106b1`](https://github.com/eea/volto-eea-website-theme/commit/53106b1099b4bfae59a1746e7dc62c49a8ae63cd)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - Release 4.3.0 [Alin Voinea - [`707331f`](https://github.com/eea/volto-eea-website-theme/commit/707331fa7d26a22e5dfdbcb816d62ff18277ac07)]
16
+ ### [4.2.0](https://github.com/eea/volto-eea-website-theme/compare/4.1.1...4.2.0) - 21 April 2026
17
+
18
+ #### :hammer_and_wrench: Others
19
+
20
+ - Release 4.2.0 [Alin Voinea - [`8f7d6d0`](https://github.com/eea/volto-eea-website-theme/commit/8f7d6d0d0547dbe384c835375b56ccdb87c5dd44)]
7
21
  ### [4.1.1](https://github.com/eea/volto-eea-website-theme/compare/4.1.0...4.1.1) - 17 April 2026
8
22
 
9
23
  #### :bug: Bug Fixes
@@ -63,8 +77,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
63
77
 
64
78
  #### :house: Internal changes
65
79
 
66
- - chore: [JENKINSFILE] add package version in sonarqube [valentinab25 - [`b15b302`](https://github.com/eea/volto-eea-website-theme/commit/b15b302ff88ec6afa6901ee7e1726cc4e04a8739)]
67
- - chore: [JENKINSFILE] use sonarqube branches [EEA Jenkins - [`36f2e1e`](https://github.com/eea/volto-eea-website-theme/commit/36f2e1e176471b3753d77ab8aaf0cba577b43b36)]
68
80
 
69
81
  ### [3.19.0](https://github.com/eea/volto-eea-website-theme/compare/3.18.1...3.19.0) - 11 February 2026
70
82
 
@@ -127,7 +139,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
127
139
  #### :hammer_and_wrench: Others
128
140
 
129
141
  - Release 3.12.0 [Alin Voinea - [`ea1e961`](https://github.com/eea/volto-eea-website-theme/commit/ea1e96144684b2a8238ae476fd8d47de82ff42b4)]
130
- - Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`2cac56e`](https://github.com/eea/volto-eea-website-theme/commit/2cac56e22e580e042d368b69254172539ed33b65)]
131
142
  ### [3.11.0](https://github.com/eea/volto-eea-website-theme/compare/3.10.1...3.11.0) - 29 September 2025
132
143
 
133
144
  #### :bug: Bug Fixes
@@ -221,8 +232,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
221
232
 
222
233
  #### :hammer_and_wrench: Others
223
234
 
224
- - Add Sonarqube tag using fise-frontend addons list [EEA Jenkins - [`3d50874`](https://github.com/eea/volto-eea-website-theme/commit/3d50874281ebcb91a1ae3727248f656a6f26c603)]
225
- - Add Sonarqube tag using ied-frontend addons list [EEA Jenkins - [`a3f7676`](https://github.com/eea/volto-eea-website-theme/commit/a3f76767d99cb6dd93cc7fa0eafdea57e9000b2c)]
226
235
  ### [3.5.4](https://github.com/eea/volto-eea-website-theme/compare/3.5.3...3.5.4) - 30 January 2025
227
236
 
228
237
  #### :bug: Bug Fixes
@@ -323,7 +332,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
323
332
 
324
333
  #### :hammer_and_wrench: Others
325
334
 
326
- - Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`e417f83`](https://github.com/eea/volto-eea-website-theme/commit/e417f839312045c56b67ab8134fe5b0622b3e2c3)]
327
335
  ## [3.0.0](https://github.com/eea/volto-eea-website-theme/compare/2.4.0...3.0.0) - 21 October 2024
328
336
 
329
337
  #### :nail_care: Enhancements
@@ -409,7 +417,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
409
417
  - Refs #269520 - other_organisation test [Tripon Eugen - [`7558b27`](https://github.com/eea/volto-eea-website-theme/commit/7558b27a9d1cd6d3480a32b296c7325c796006c9)]
410
418
  - Refs #269520 - other_organisation token widget edit mode [Tripon Eugen - [`b6df127`](https://github.com/eea/volto-eea-website-theme/commit/b6df127bd91b6f55dda8f468e1107037d43752ff)]
411
419
  - Refs #269520 - other_organisation token widget [Tripon Eugen - [`6fd7543`](https://github.com/eea/volto-eea-website-theme/commit/6fd7543894bd2c593a1729116befd95c82ea3c8f)]
412
- - Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`cbc36c7`](https://github.com/eea/volto-eea-website-theme/commit/cbc36c74dfcd5f7cb1013a4c673d9c02e0023766)]
413
420
  ### [2.1.1](https://github.com/eea/volto-eea-website-theme/compare/2.1.0...2.1.1) - 28 May 2024
414
421
 
415
422
  #### :bug: Bug Fixes
@@ -494,7 +501,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
494
501
 
495
502
  #### :hammer_and_wrench: Others
496
503
 
497
- - Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`adc6730`](https://github.com/eea/volto-eea-website-theme/commit/adc6730e21a37afb865b842182624401de6a29f5)]
498
504
  ### [1.33.1](https://github.com/eea/volto-eea-website-theme/compare/1.33.0...1.33.1) - 4 April 2024
499
505
 
500
506
  #### :bug: Bug Fixes
@@ -628,8 +634,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
628
634
 
629
635
  - bump version [Razvan - [`721e939`](https://github.com/eea/volto-eea-website-theme/commit/721e939d12e324b459ebfa78a2e656ee7142a3d6)]
630
636
  - merge master into this branch [Razvan - [`586c8f9`](https://github.com/eea/volto-eea-website-theme/commit/586c8f910bac55a043bd8dda60e9444bd2ae1663)]
631
- - Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`fd90044`](https://github.com/eea/volto-eea-website-theme/commit/fd9004442a9d1d465f7601ecdefe3e23c61e6a9c)]
632
- - Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`4bc3dd3`](https://github.com/eea/volto-eea-website-theme/commit/4bc3dd3ae412a66befd04b5b80fab3716c929240)]
633
637
  - test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`c4dbd28`](https://github.com/eea/volto-eea-website-theme/commit/c4dbd289358205bc2d849aab7edb11ccf3b89cee)]
634
638
  - fix tests [Razvan - [`042330b`](https://github.com/eea/volto-eea-website-theme/commit/042330bc97d32ffe7ba769b4f2453f71cffed706)]
635
639
  - remove RemoveSchema logic [Razvan - [`08d10f8`](https://github.com/eea/volto-eea-website-theme/commit/08d10f8bf6f75478260e4e4c66d7316ba87b907a)]
@@ -724,11 +728,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
724
728
  - test: Add real image to cypress test [Alin Voinea - [`4ff591a`](https://github.com/eea/volto-eea-website-theme/commit/4ff591ae3318c9588b4e2114582c0fa6cfdf31ae)]
725
729
  - test: Add cypress tests for Image block styling position and align [Alin Voinea - [`7341ef7`](https://github.com/eea/volto-eea-website-theme/commit/7341ef7b92714fc0cc3ab0c31c39033e7b3e19e7)]
726
730
  - Revert "change(tests): commented out rss test since title block config is missing" [Alin Voinea - [`fb61191`](https://github.com/eea/volto-eea-website-theme/commit/fb611918d6ca380b89b594f283dcf9f685a4b294)]
727
- - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`6a3be30`](https://github.com/eea/volto-eea-website-theme/commit/6a3be3092589411af7808a235f76de5222fd3868)]
728
- - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`c3978f2`](https://github.com/eea/volto-eea-website-theme/commit/c3978f23375ef066e9fd6f6c2e34ba6c1c058f69)]
729
- - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`f672779`](https://github.com/eea/volto-eea-website-theme/commit/f672779e845bec9240ccc901e9f53ec80c5a1819)]
730
- - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`ae5d8e3`](https://github.com/eea/volto-eea-website-theme/commit/ae5d8e3f4e04dc2808d47ce2ee886e1b23b528da)]
731
- - test: [JENKINS] Improve cypress time [valentinab25 - [`170ff0c`](https://github.com/eea/volto-eea-website-theme/commit/170ff0c8e3b30e69479bdf1117e811fea94f1027)]
732
731
  ### [1.23.0](https://github.com/eea/volto-eea-website-theme/compare/1.22.1...1.23.0) - 2 November 2023
733
732
 
734
733
  #### :rocket: New Features
@@ -741,7 +740,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
741
740
 
742
741
  #### :house: Internal changes
743
742
 
744
- - chore: [JENKINS] Refactor automated testing [valentinab25 - [`f28fce3`](https://github.com/eea/volto-eea-website-theme/commit/f28fce3d1eb815f95fb9aa40de42b10b7e8e30c5)]
745
743
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`6d15088`](https://github.com/eea/volto-eea-website-theme/commit/6d150886c5aeb2ca0b569270486e60f7cc274e2c)]
746
744
  - chore:volto 16 in tests, update docs, fix stylelint overrides [valentinab25 - [`20c0323`](https://github.com/eea/volto-eea-website-theme/commit/20c032380b33c0077c869a05136f93e2fb68e5d4)]
747
745
 
@@ -927,7 +925,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
927
925
 
928
926
  #### :house: Internal changes
929
927
 
930
- - chore: [JENKINS] Deprecate circularity website [valentinab25 - [`370dcbf`](https://github.com/eea/volto-eea-website-theme/commit/370dcbfbf1a8135ce7b1b3b271b004552a631837)]
931
928
 
932
929
  #### :hammer_and_wrench: Others
933
930
 
@@ -1083,7 +1080,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1083
1080
 
1084
1081
  #### :hammer_and_wrench: Others
1085
1082
 
1086
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`6c5e2f8`](https://github.com/eea/volto-eea-website-theme/commit/6c5e2f80456e2061d9e9c15fd0a0b91b9ac70568)]
1087
1083
  ### [1.9.1](https://github.com/eea/volto-eea-website-theme/compare/1.9.0...1.9.1) - 28 February 2023
1088
1084
 
1089
1085
  #### :bug: Bug Fixes
@@ -1230,7 +1226,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1230
1226
 
1231
1227
  - For some reasons types is a string [Alin Voinea - [`3769a09`](https://github.com/eea/volto-eea-website-theme/commit/3769a0981181d5b633f3498daebbe96be8b4b833)]
1232
1228
  - Fix(redirect): o.filter - refs #157627 [Alin Voinea - [`deb23da`](https://github.com/eea/volto-eea-website-theme/commit/deb23da846444cc96539697fd798429ae0abe89e)]
1233
- - Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`f1fffc5`](https://github.com/eea/volto-eea-website-theme/commit/f1fffc5db96725440863d545580b4e76cce4b796)]
1234
1229
  ### [1.5.0](https://github.com/eea/volto-eea-website-theme/compare/1.4.2...1.5.0) - 9 January 2023
1235
1230
 
1236
1231
  #### :hammer_and_wrench: Others
@@ -1264,7 +1259,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1264
1259
 
1265
1260
  - Release 1.4.0 [Alin Voinea - [`bd42a0d`](https://github.com/eea/volto-eea-website-theme/commit/bd42a0d26e928cac5d99933194755da3db06b341)]
1266
1261
  - bump version to use as volto-eea-design-system [David Ichim - [`f4be047`](https://github.com/eea/volto-eea-website-theme/commit/f4be047328b46399b03b612d378b18aaf82e7dc1)]
1267
- - Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`9b7cfef`](https://github.com/eea/volto-eea-website-theme/commit/9b7cfefb4d34fc1c948015e491feb370f9795bd8)]
1268
1262
  - test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`df252a9`](https://github.com/eea/volto-eea-website-theme/commit/df252a9bfed0bb86cadf53c59dd1603b1e2cd822)]
1269
1263
  ### [1.3.2](https://github.com/eea/volto-eea-website-theme/compare/1.3.1...1.3.2) - 16 December 2022
1270
1264
 
@@ -1274,7 +1268,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1274
1268
 
1275
1269
  #### :hammer_and_wrench: Others
1276
1270
 
1277
- - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`a43c658`](https://github.com/eea/volto-eea-website-theme/commit/a43c658a7920c8df95e763b9a637f38ce77eba2c)]
1278
1271
  - Better razzle.config [Tiberiu Ichim - [`81dbf48`](https://github.com/eea/volto-eea-website-theme/commit/81dbf48815fb27facb4f82c9b764540fdf188b2e)]
1279
1272
  - Better razzle.config [Tiberiu Ichim - [`7bc9da2`](https://github.com/eea/volto-eea-website-theme/commit/7bc9da2cd837ab62a95cd29979cdd9b0055b7d67)]
1280
1273
  ### [1.3.1](https://github.com/eea/volto-eea-website-theme/compare/1.3.0...1.3.1) - 28 November 2022
@@ -1285,7 +1278,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1285
1278
 
1286
1279
  #### :hammer_and_wrench: Others
1287
1280
 
1288
- - yarn 3 [Alin Voinea - [`ea7a709`](https://github.com/eea/volto-eea-website-theme/commit/ea7a7094945312776e9b6f44e371178603e92139)]
1289
1281
  ### [1.3.0](https://github.com/eea/volto-eea-website-theme/compare/1.2.0...1.3.0) - 22 November 2022
1290
1282
 
1291
1283
  #### :rocket: New Features
@@ -1326,7 +1318,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1326
1318
  - Add subsite class to body [Tiberiu Ichim - [`74d700f`](https://github.com/eea/volto-eea-website-theme/commit/74d700fbfd6249a8604762a7e4e49cce857db0f3)]
1327
1319
  - Add subsite info to header [Tiberiu Ichim - [`47daf8b`](https://github.com/eea/volto-eea-website-theme/commit/47daf8bb6374a1222040626b19d4154df7ba1b83)]
1328
1320
  - fix eslint [Miu Razvan - [`eb8d0a7`](https://github.com/eea/volto-eea-website-theme/commit/eb8d0a790bc70c0aae256c6ff35f63c4885f338e)]
1329
- - Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`cc578a4`](https://github.com/eea/volto-eea-website-theme/commit/cc578a413b205a8e61e091fab3a88f94cedefc89)]
1330
1321
  ### [1.1.0](https://github.com/eea/volto-eea-website-theme/compare/1.0.0...1.1.0) - 28 October 2022
1331
1322
 
1332
1323
  #### :nail_care: Enhancements
@@ -1374,7 +1365,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1374
1365
 
1375
1366
  #### :hammer_and_wrench: Others
1376
1367
 
1377
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`33b56ac`](https://github.com/eea/volto-eea-website-theme/commit/33b56acb13fbaf0c5b79e8fc6e13c4b699c79c90)]
1378
1368
  ### [0.7.3](https://github.com/eea/volto-eea-website-theme/compare/0.7.2...0.7.3) - 22 September 2022
1379
1369
 
1380
1370
  #### :hammer_and_wrench: Others
@@ -1642,7 +1632,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1642
1632
  - Header refactor, add custom logo #5 [ichim-david - [`4950235`](https://github.com/eea/volto-eea-website-theme/commit/49502358105437cfeac3b144e6d301cb59aa2346)]
1643
1633
  - Update footer.config with new publication card component [ichim-david - [`2e38e9a`](https://github.com/eea/volto-eea-website-theme/commit/2e38e9a417f835009d60c80d4eb4b30229f55e45)]
1644
1634
  - feature(breadcrumbs): implement eea-design-system breadcrumb as Volto component #32 #7 [ichim-david - [`181af41`](https://github.com/eea/volto-eea-website-theme/commit/181af4125ce2b9ddac56dab4723cb11c26633221)]
1645
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`da8ceb6`](https://github.com/eea/volto-eea-website-theme/commit/da8ceb68ea68bfbc9504e48ccd4d68277f11ab9a)]
1646
1635
  - use breadcrumbs from eea-design-system [nileshgulia1 - [`db2f9e9`](https://github.com/eea/volto-eea-website-theme/commit/db2f9e9a4327420a3cce9a9903cd88549b129eab)]
1647
1636
  - Update theme.config [ichim-david - [`8eca4f4`](https://github.com/eea/volto-eea-website-theme/commit/8eca4f40397a4aeca6d39029c92db78968d37064)]
1648
1637
  - Added keyContent component to theme.config [ichim-david - [`d86f202`](https://github.com/eea/volto-eea-website-theme/commit/d86f202d0274d839487a88b51cae9a0e899beb23)]
@@ -1684,5 +1673,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1684
1673
 
1685
1674
  #### :hammer_and_wrench: Others
1686
1675
 
1687
- - yarn bootstrap [Alin Voinea - [`6995e9e`](https://github.com/eea/volto-eea-website-theme/commit/6995e9e091f21fdbbdffa8a44fc0e2c626f6d46a)]
1688
1676
  - Initial commit [Alin Voinea - [`6a9c03a`](https://github.com/eea/volto-eea-website-theme/commit/6a9c03a7cebe71ca87e82cf58c42904063e9d8d3)]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-website-theme",
3
- "version": "4.1.1",
3
+ "version": "4.3.0",
4
4
  "description": "@eeacms/volto-eea-website-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -0,0 +1,9 @@
1
+ import { GET_HEADER_SETTINGS } from '../constants/ActionTypes';
2
+
3
+ export const getHeaderSettings = () => ({
4
+ type: GET_HEADER_SETTINGS,
5
+ request: {
6
+ op: 'get',
7
+ path: '/@header-settings',
8
+ },
9
+ });
@@ -1,3 +1,3 @@
1
1
  export * from './print';
2
2
  export * from './navigation';
3
- export * from './eea-settings';
3
+ export * from './header-settings';
@@ -6,4 +6,4 @@
6
6
  export const SET_ISPRINT = 'SET_ISPRINT';
7
7
  export const SET_PRINT_LOADING = 'SET_PRINT_LOADING';
8
8
  export const GET_NAVIGATION_SETTINGS = 'GET_NAVIGATION_SETTINGS';
9
- export const GET_EEA_SETTINGS = 'GET_EEA_SETTINGS';
9
+ export const GET_HEADER_SETTINGS = 'GET_HEADER_SETTINGS';
@@ -1,2 +1,3 @@
1
1
  import '@eeacms/volto-eea-design-system/semantic.less';
2
2
  import '@plone/volto/../theme/themes/pastanaga/extras/extras.less';
3
+ import './toast.less';
@@ -0,0 +1,99 @@
1
+ .Toastify__toast-container--bottom-center {
2
+ top: 24px;
3
+ bottom: auto;
4
+ left: 50%;
5
+ width: ~'min(480px, calc(100vw - 32px))';
6
+ padding: 0;
7
+ margin-left: 0;
8
+ -webkit-transform: translateX(-50%);
9
+ transform: translateX(-50%);
10
+
11
+ .Toastify__toast {
12
+ display: flex;
13
+ overflow: visible;
14
+ min-height: 0;
15
+ align-items: flex-start;
16
+ padding: 0;
17
+ border: 0;
18
+ border-radius: 0;
19
+ margin-bottom: 12px;
20
+ background: transparent;
21
+ box-shadow: none;
22
+ color: inherit;
23
+ cursor: default;
24
+ }
25
+
26
+ .Toastify__toast-body {
27
+ min-width: 0;
28
+ flex: 1 1 auto;
29
+ padding: 0;
30
+ margin: 0;
31
+ }
32
+
33
+ .Toastify__close-button {
34
+ flex: 0 0 auto;
35
+ align-self: flex-start;
36
+ padding: 4px;
37
+ border: 0;
38
+ margin: -4px -4px -4px 12px;
39
+ background: transparent;
40
+ color: inherit;
41
+ opacity: 1;
42
+ }
43
+
44
+ .Toastify__close-button:hover,
45
+ .Toastify__close-button:focus {
46
+ opacity: 1;
47
+ }
48
+
49
+ .Toastify__toast--info .Toastify__close-button {
50
+ color: #003052;
51
+ }
52
+
53
+ .Toastify__toast--success .Toastify__close-button {
54
+ color: #005248;
55
+ }
56
+
57
+ .Toastify__toast--error .Toastify__close-button {
58
+ color: #b83230;
59
+ }
60
+
61
+ .Toastify__toast--warning .Toastify__close-button {
62
+ color: #3d2201;
63
+ }
64
+
65
+ .toast-dismiss-action {
66
+ display: none;
67
+ }
68
+
69
+ .toast-dismiss-action svg {
70
+ fill: currentColor;
71
+ }
72
+
73
+ .ui.message.eea-toast {
74
+ width: 100%;
75
+ margin: 0;
76
+ cursor: default;
77
+ }
78
+
79
+ .toast-inner-content {
80
+ min-width: 0;
81
+ margin-left: 0;
82
+ }
83
+ }
84
+
85
+ @media only screen and (max-width: 767px) {
86
+ .Toastify__toast-container--bottom-center {
87
+ top: 16px;
88
+ bottom: auto;
89
+ width: ~'min(480px, calc(100vw - 24px))';
90
+
91
+ .Toastify__toast {
92
+ margin-bottom: 8px;
93
+ }
94
+
95
+ .Toastify__close-button {
96
+ margin-left: 8px;
97
+ }
98
+ }
99
+ }
@@ -0,0 +1,55 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import cx from 'classnames';
4
+ import { Icon, Message } from 'semantic-ui-react';
5
+
6
+ const Toast = (props) => {
7
+ function getStatus(props) {
8
+ if (props.info) {
9
+ return 'info';
10
+ } else if (props.success) {
11
+ return 'success';
12
+ } else if (props.error) {
13
+ return 'error';
14
+ } else if (props.warning) {
15
+ return 'warning';
16
+ } else {
17
+ return 'success';
18
+ }
19
+ }
20
+
21
+ const { title, content } = props;
22
+ const status = getStatus(props);
23
+ const statusProps = {
24
+ info: status === 'info',
25
+ success: status === 'success',
26
+ error: status === 'error',
27
+ warning: status === 'warning',
28
+ };
29
+
30
+ return (
31
+ <Message
32
+ icon
33
+ size="large"
34
+ className={cx('eea-toast', `eea-toast--${status}`)}
35
+ {...statusProps}
36
+ >
37
+ <Icon name="exclamation circle" />
38
+ <Message.Content className="toast-inner-content">
39
+ {title && <Message.Header>{title}</Message.Header>}
40
+ <div>{content}</div>
41
+ </Message.Content>
42
+ </Message>
43
+ );
44
+ };
45
+
46
+ Toast.propTypes = {
47
+ title: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
48
+ content: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,
49
+ info: PropTypes.bool,
50
+ success: PropTypes.bool,
51
+ error: PropTypes.bool,
52
+ warning: PropTypes.bool,
53
+ };
54
+
55
+ export default Toast;
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { render } from '@testing-library/react';
3
+ import '@testing-library/jest-dom';
4
+
5
+ import Toast from './Toast';
6
+
7
+ describe('Toast', () => {
8
+ it('renders the title, content, and Volto compatibility class', () => {
9
+ const { container, getByText } = render(
10
+ <Toast success title="Saved" content="The content was saved." />,
11
+ );
12
+
13
+ expect(getByText('Saved')).toBeInTheDocument();
14
+ expect(getByText('The content was saved.')).toBeInTheDocument();
15
+ expect(container.querySelector('.eea-toast')).toHaveClass(
16
+ 'ui',
17
+ 'message',
18
+ 'success',
19
+ 'large',
20
+ 'icon',
21
+ 'eea-toast--success',
22
+ );
23
+ expect(
24
+ container.querySelector('.exclamation.circle.icon'),
25
+ ).toBeInTheDocument();
26
+ expect(container.querySelector('.toast-inner-content')).toBeInTheDocument();
27
+ });
28
+
29
+ it.each([
30
+ ['info', { info: true }, 'eea-toast--info'],
31
+ ['success', { success: true }, 'eea-toast--success'],
32
+ ['error', { error: true }, 'eea-toast--error'],
33
+ ['warning', { warning: true }, 'eea-toast--warning'],
34
+ ])('applies the %s status class', (status, props, className) => {
35
+ const { container } = render(
36
+ <Toast {...props} title={status} content={`${status} content`} />,
37
+ );
38
+
39
+ expect(container.querySelector('.eea-toast')).toHaveClass(className);
40
+ });
41
+ });
@@ -61,9 +61,12 @@ const EEAHeader = ({ pathname, token, items, history, subsite }) => {
61
61
  const width = useSelector((state) => state.screen?.width);
62
62
  const dispatch = useDispatch();
63
63
 
64
- const eeaSettings = useSelector((state) => state.eeaSettings?.data);
64
+ const headerSettings = useSelector(
65
+ (state) => state.reduxAsyncConnect?.headerSettings,
66
+ );
67
+
65
68
  const headerSearchBox =
66
- eeaSettings?.header?.searchBox || eea.headerSearchBox || [];
69
+ headerSettings?.searchBox || eea.headerSearchBox || [];
67
70
  const previousToken = usePrevious(token);
68
71
  const navigationSettings =
69
72
  useSelector((state) => state.navigationSettings?.settings) ||
@@ -33,7 +33,6 @@ import {
33
33
  import { changeLanguage } from '@plone/volto/actions/language/language';
34
34
 
35
35
  import userSession from '@plone/volto/reducers/userSession/userSession';
36
- import { getEEASettings } from '@eeacms/volto-eea-website-theme/actions';
37
36
 
38
37
  import configureStore from '@plone/volto/store';
39
38
  import ErrorPage from '@plone/volto/error';
@@ -264,7 +263,6 @@ server.get('/*', (req, res) => {
264
263
  const location = parseUrl(url);
265
264
 
266
265
  loadOnServer({ store, location, routes, api })
267
- .then(() => Promise.all([store.dispatch(getEEASettings())]).catch(() => {}))
268
266
  .then(() => {
269
267
  const initialLang =
270
268
  req.universalCookies.get('I18N_LANGUAGE') ||
@@ -0,0 +1,20 @@
1
+ import { getHeaderSettings } from '@eeacms/volto-eea-website-theme/actions';
2
+
3
+ // asyncPropsExtenders entry. Loads header settings during SSR so they're
4
+ // available to the Header component on the first render. Result lands in
5
+ // state.reduxAsyncConnect.headerSettings.
6
+ export const headerSettingsExtender = {
7
+ path: '/',
8
+ extend: (dispatchActions) => {
9
+ if (
10
+ dispatchActions.filter((a) => a.key === 'headerSettings').length === 0
11
+ ) {
12
+ dispatchActions.push({
13
+ key: 'headerSettings',
14
+ promise: ({ store: { dispatch } }) =>
15
+ __SERVER__ && dispatch(getHeaderSettings()),
16
+ });
17
+ }
18
+ return dispatchActions;
19
+ },
20
+ };
package/src/index.js CHANGED
@@ -49,7 +49,8 @@ import okMiddleware from './middleware/ok';
49
49
  import voltoCustomCSSMiddleware from './middleware/voltoCustom';
50
50
  import { voltoCustomJsMiddleware } from './middleware/voltoCustom';
51
51
  import installSlate from './slate';
52
- import { print, navigationSettings, eeaSettings } from './reducers';
52
+ import { print, navigationSettings } from './reducers';
53
+ import { headerSettingsExtender } from './helpers/headerSettingsExtender';
53
54
 
54
55
  import * as eea from './config';
55
56
 
@@ -676,9 +677,13 @@ const applyConfig = (config) => {
676
677
  ...(config.addonReducers || {}),
677
678
  print,
678
679
  navigationSettings,
679
- eeaSettings,
680
680
  };
681
681
 
682
+ config.settings.asyncPropsExtenders = [
683
+ ...(config.settings.asyncPropsExtenders || []),
684
+ headerSettingsExtender,
685
+ ];
686
+
682
687
  // Mega menu object
683
688
  if (!config.settings.menuItemsLayouts) {
684
689
  config.settings.menuItemsLayouts = {};
@@ -1,5 +1,4 @@
1
1
  import print from './print';
2
2
  import navigationSettings from './navigation';
3
- import eeaSettings from './eea-settings';
4
3
 
5
- export { print, navigationSettings, eeaSettings };
4
+ export { print, navigationSettings };
@@ -1,9 +0,0 @@
1
- import { GET_EEA_SETTINGS } from '../constants/ActionTypes';
2
-
3
- export const getEEASettings = () => ({
4
- type: GET_EEA_SETTINGS,
5
- request: {
6
- op: 'get',
7
- path: '/@eea.settings',
8
- },
9
- });
@@ -1,33 +0,0 @@
1
- import { GET_EEA_SETTINGS } from '../constants/ActionTypes';
2
-
3
- const initialState = {
4
- error: null,
5
- loaded: false,
6
- loading: false,
7
- data: {},
8
- };
9
-
10
- export default function eeaSettings(state = initialState, action = {}) {
11
- switch (action.type) {
12
- case `${GET_EEA_SETTINGS}_PENDING`:
13
- return { ...state, error: null, loaded: false, loading: true };
14
- case `${GET_EEA_SETTINGS}_SUCCESS`:
15
- return {
16
- ...state,
17
- error: null,
18
- loaded: true,
19
- loading: false,
20
- data: action.result || {},
21
- };
22
- case `${GET_EEA_SETTINGS}_FAIL`:
23
- return {
24
- ...state,
25
- error: action.error,
26
- loaded: false,
27
- loading: false,
28
- data: {},
29
- };
30
- default:
31
- return state;
32
- }
33
- }