@eeacms/volto-bise-policy 1.0.3 → 1.0.4

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,18 @@ 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.0.3](https://github.com/eea/volto-bise-policy/compare/1.0.2...1.0.3) - 12 April 2023
7
+ ### [1.0.4](https://github.com/eea/volto-bise-policy/compare/1.0.3...1.0.4) - 25 April 2023
8
8
 
9
- #### :hammer_and_wrench: Others
9
+ #### :rocket: New Features
10
+
11
+ - feat(Footer.jsx): add support for customizing footer actions, copyright, social and contact actions from backend [Miu Razvan - [`33ae6fc`](https://github.com/eea/volto-bise-policy/commit/33ae6fc768a53bc72d31c8240924ca33e070a483)]
12
+
13
+ #### :house: Internal changes
14
+
15
+ - style(KeyFactsView.jsx): add optional chaining to line.upper.data [Miu Razvan - [`ea4df76`](https://github.com/eea/volto-bise-policy/commit/ea4df7686861d05d2fa56e104c54b5659255f176)]
16
+
17
+ ### [1.0.3](https://github.com/eea/volto-bise-policy/compare/1.0.2...1.0.3) - 12 April 2023
10
18
 
11
- - update [Miu Razvan - [`a75120c`](https://github.com/eea/volto-bise-policy/commit/a75120c5047d4654b064ba1e5114d2405be5d2ff)]
12
19
  ### [1.0.2](https://github.com/eea/volto-bise-policy/compare/1.0.1...1.0.2) - 29 March 2023
13
20
 
14
21
  ### [1.0.1](https://github.com/eea/volto-bise-policy/compare/1.0.0...1.0.1) - 29 March 2023
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-bise-policy",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "@eeacms/volto-bise-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -42,7 +42,7 @@ const View = ({ data }) => {
42
42
  <div className="facts-wrapper">
43
43
  {(lines || []).map((line, i) => (
44
44
  <div className="fact" key={i}>
45
- {line.upper.data ? (
45
+ {line.upper?.data ? (
46
46
  <>
47
47
  <div
48
48
  className="upper"
@@ -4,20 +4,85 @@
4
4
  */
5
5
 
6
6
  import React from 'react';
7
+ import { useSelector, shallowEqual } from 'react-redux';
8
+ import { flattenToAppURL } from '@plone/volto/helpers';
7
9
  import EEAFooter from '@eeacms/volto-eea-design-system/ui/Footer/Footer';
8
10
  import config from '@plone/volto/registry';
9
11
 
10
- const Footer = (props) => {
12
+ const Footer = () => {
11
13
  const { eea } = config.settings;
14
+ const {
15
+ footerActions = [],
16
+ copyrightActions = [],
17
+ socialActions = [],
18
+ contactActions = [],
19
+ contactExtraActions = [],
20
+ } = useSelector(
21
+ (state) => ({
22
+ footerActions: state.actions?.actions?.footer_actions,
23
+ copyrightActions: state.actions?.actions?.copyright_actions,
24
+ socialActions: state.actions?.actions?.social_actions,
25
+ contactActions: state.actions?.actions?.contact_actions,
26
+ contactExtraActions: state.actions?.actions?.contact_extra_actions,
27
+ }),
28
+ shallowEqual,
29
+ );
30
+ // ZMI > portal_actions > footer_actions
31
+ const actions = footerActions.length
32
+ ? footerActions.map((action) => ({
33
+ title: action.title,
34
+ link: flattenToAppURL(action.url),
35
+ }))
36
+ : eea.footerOpts.actions;
37
+
38
+ // ZMI > portal_actions > copyright_actions
39
+ const copyright = copyrightActions.length
40
+ ? copyrightActions.map((action) => ({
41
+ title: action.title,
42
+ site: action.title,
43
+ link: flattenToAppURL(action.url),
44
+ }))
45
+ : eea.footerOpts.copyright;
46
+
47
+ // ZMI > portal_actions > social_actions
48
+ const social = socialActions.length
49
+ ? socialActions.map((action) => ({
50
+ name: action.id,
51
+ icon: action.icon,
52
+ link: action.url,
53
+ }))
54
+ : eea.footerOpts.social;
55
+
56
+ // ZMI > portal_actions > contact_actions
57
+ const contacts = contactActions.length
58
+ ? contactActions.map((action, idx) => ({
59
+ text: action.title,
60
+ icon: action.icon,
61
+ link: flattenToAppURL(action.url),
62
+ children:
63
+ idx === 0
64
+ ? contactExtraActions.map((child) => ({
65
+ text: child.title,
66
+ icon: child.icon,
67
+ link: flattenToAppURL(child.url),
68
+ }))
69
+ : [],
70
+ }))
71
+ : eea.footerOpts.contacts;
72
+
73
+ // Update options with actions from backend
74
+ const options = {
75
+ ...eea.footerOpts,
76
+ social,
77
+ contacts,
78
+ };
79
+
12
80
  return (
13
81
  <EEAFooter>
14
- <EEAFooter.SubFooter {...eea.footerOpts} />
82
+ <EEAFooter.SubFooter {...options} />
15
83
  <EEAFooter.Header>{eea.footerOpts.header}</EEAFooter.Header>
16
84
  <EEAFooter.Sites sites={eea.footerOpts.sites} />
17
- <EEAFooter.Actions
18
- actions={eea.footerOpts.actions}
19
- copyright={eea.footerOpts.copyright}
20
- />
85
+ <EEAFooter.Actions actions={actions} copyright={copyright} />
21
86
  </EEAFooter>
22
87
  );
23
88
  };
@@ -5,6 +5,10 @@
5
5
  padding-top: 1.5rem;
6
6
  padding-bottom: 1.5rem;
7
7
  font-style: italic;
8
- box-shadow: none;
8
+ position: relative;
9
+
10
+ &.shadow-none {
11
+ box-shadow: none;
12
+ }
9
13
  }
10
14
  }
@@ -154,36 +154,24 @@ p.has--clear--both:empty {
154
154
  padding: 0 !important;
155
155
  }
156
156
 
157
- /* TEXT */
158
- h1,
159
- h2,
160
- h3,
161
- h4,
162
- h5,
163
- h6,
164
- p,
165
- a,
166
- span,
167
- button {
168
- font-family: OpenSans, 'Raleway', sans-serif;
169
- }
170
-
171
- h1,
172
- h2,
173
- h3,
174
- h4,
175
- h5,
176
- h6 {
177
- color: @primaryColor !important;
178
- }
179
-
180
- h2 {
181
- font-weight: 600;
157
+ .eea.header a:hover {
158
+ color: @secondaryColor;
182
159
  }
183
160
 
184
- a {
185
- color: @secondaryColor;
186
- font-weight: 600;
161
+ .content-area {
162
+ /* TEXT */
163
+ // h1,
164
+ // h2,
165
+ // h3,
166
+ // h4,
167
+ // h5,
168
+ // h6,
169
+ // p,
170
+ // a,
171
+ // span,
172
+ // button {
173
+ // font-family: OpenSans, 'Raleway', sans-serif;
174
+ // }
187
175
 
188
176
  h1,
189
177
  h2,
@@ -191,12 +179,16 @@ p.has--clear--both:empty {
191
179
  h4,
192
180
  h5,
193
181
  h6 {
194
- color: @secondaryColor !important;
182
+ color: @primaryColor !important;
195
183
  }
196
184
 
197
- &:hover {
185
+ h2 {
186
+ font-weight: 600;
187
+ }
188
+
189
+ a {
198
190
  color: @secondaryColor;
199
- text-decoration: underline;
191
+ font-weight: 600;
200
192
 
201
193
  h1,
202
194
  h2,
@@ -206,21 +198,6 @@ p.has--clear--both:empty {
206
198
  h6 {
207
199
  color: @secondaryColor !important;
208
200
  }
209
- }
210
- }
211
-
212
- .light-links {
213
- h1,
214
- h2,
215
- h3,
216
- h4,
217
- h5,
218
- h6 {
219
- color: @secondaryColor !important;
220
- }
221
-
222
- a {
223
- color: @secondaryColor;
224
201
 
225
202
  &:hover {
226
203
  color: @secondaryColor;
@@ -236,15 +213,44 @@ p.has--clear--both:empty {
236
213
  }
237
214
  }
238
215
  }
239
- }
240
216
 
241
- .dark-links {
242
- a {
243
- color: @primaryColor;
217
+ .light-links {
218
+ h1,
219
+ h2,
220
+ h3,
221
+ h4,
222
+ h5,
223
+ h6 {
224
+ color: @secondaryColor !important;
225
+ }
244
226
 
245
- &:hover {
227
+ a {
228
+ color: @secondaryColor;
229
+
230
+ &:hover {
231
+ color: @secondaryColor;
232
+ text-decoration: underline;
233
+
234
+ h1,
235
+ h2,
236
+ h3,
237
+ h4,
238
+ h5,
239
+ h6 {
240
+ color: @secondaryColor !important;
241
+ }
242
+ }
243
+ }
244
+ }
245
+
246
+ .dark-links {
247
+ a {
246
248
  color: @primaryColor;
247
- text-decoration: underline;
249
+
250
+ &:hover {
251
+ color: @primaryColor;
252
+ text-decoration: underline;
253
+ }
248
254
  }
249
255
  }
250
256
  }
@@ -264,28 +270,6 @@ p.has--clear--both:empty {
264
270
  z-index: 6;
265
271
  }
266
272
 
267
-
268
- @{view} {
269
- .red-bg::before {
270
- .full-width();
271
- }
272
- }
273
-
274
- @{edit} {
275
- .red-bg::before {
276
- .full-width-edit();
277
- }
278
- }
279
-
280
- .red-bg {
281
- position: relative;
282
- color: #fff;
283
-
284
- &::before {
285
- content: '';
286
- height: 100%;
287
- background-color: coral;
288
- z-index: -1 !important;
289
- position: absolute !important;
290
- }
273
+ .simple-data-table {
274
+ padding: 0;
291
275
  }
@@ -4,8 +4,8 @@
4
4
 
5
5
  @import '@eeacms/volto-bise-policy/../theme/tokens/tokens';
6
6
 
7
- @fontName: 'OpenSans';
8
- @fontSize: 16px;
7
+ // @fontName: 'OpenSans';
8
+ // @fontSize: 16px;
9
9
 
10
10
  /*-------------------
11
11
  Brand Colors