@eeacms/volto-eea-website-theme 1.11.1 → 1.11.3

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,36 @@ 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.11.3](https://github.com/eea/volto-eea-website-theme/compare/1.11.2...1.11.3) - 24 March 2023
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: add 'with-title-block' class to body [Miu Razvan - [`6fdf40f`](https://github.com/eea/volto-eea-website-theme/commit/6fdf40f603559a99ceca2ad9066d86b42ab09d5d)]
12
+
13
+ #### :nail_care: Enhancements
14
+
15
+ - change(header): Remove customization moved to volto-eea-design-system [Krisztina Elekes - [`9276965`](https://github.com/eea/volto-eea-website-theme/commit/92769656f56caeaf32fcdf4ae6d623698c07f386)]
16
+ - change(colors): update the design system colour palette defined in package config #123 from eea/update-color-palette [ichim-david - [`ba3b729`](https://github.com/eea/volto-eea-website-theme/commit/ba3b729d90e44fff6cd27e7b45239ef802008dbb)]
17
+ - refactor(colors): update colors according to latest [ITML - [`f256205`](https://github.com/eea/volto-eea-website-theme/commit/f256205b2b93019c1c18c421381a94e5abc1065b)]
18
+ - change(theme): removed outdated browser info from core Volto [David Ichim - [`6d6fa03`](https://github.com/eea/volto-eea-website-theme/commit/6d6fa036c9ef85dbc5d6416a4f34635da0784778)]
19
+
20
+ #### :house: Internal changes
21
+
22
+ - chore(Form): Update Form shadow to Volto 16.17.1 #122 from eea/form-customization-to-volto-16-17-1 [ichim-david - [`5815668`](https://github.com/eea/volto-eea-website-theme/commit/5815668000c4ff5e7236f7dc12999b04840eb849)]
23
+ - chore(Form): Update Form shadow to Volto 16.17.1 [Alin Voinea - [`36d5f2c`](https://github.com/eea/volto-eea-website-theme/commit/36d5f2c18df8173701a769d7ad8991a36bf771ee)]
24
+
25
+ #### :hammer_and_wrench: Others
26
+
27
+ - lint fix [David Ichim - [`97057a8`](https://github.com/eea/volto-eea-website-theme/commit/97057a811bacd63b352cdf08e7c0a20e199feed6)]
28
+ ### [1.11.2](https://github.com/eea/volto-eea-website-theme/compare/1.11.1...1.11.2) - 15 March 2023
29
+
30
+ #### :bug: Bug Fixes
31
+
32
+ - fix(imageBlock): re-add sizeWidget classes [nileshgulia1 - [`de4673b`](https://github.com/eea/volto-eea-website-theme/commit/de4673b1efe3e0559e4bcde9fe15a014fac5a6da)]
33
+
34
+ #### :hammer_and_wrench: Others
35
+
36
+ - Merge pull request #121 from eea/develop [Nilesh - [`1ce20da`](https://github.com/eea/volto-eea-website-theme/commit/1ce20da3c52678cbbe38cea1de8aa7f878b0d8f3)]
7
37
  ### [1.11.1](https://github.com/eea/volto-eea-website-theme/compare/1.11.0...1.11.1) - 14 March 2023
8
38
 
9
39
  #### :nail_care: Enhancements
@@ -62,7 +92,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
62
92
 
63
93
  #### :hammer_and_wrench: Others
64
94
 
65
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`6c5e2f8`](https://github.com/eea/volto-eea-website-theme/commit/6c5e2f80456e2061d9e9c15fd0a0b91b9ac70568)]
66
95
  ### [1.9.1](https://github.com/eea/volto-eea-website-theme/compare/1.9.0...1.9.1) - 28 February 2023
67
96
 
68
97
  #### :bug: Bug Fixes
@@ -209,7 +238,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
209
238
 
210
239
  - For some reasons types is a string [Alin Voinea - [`3769a09`](https://github.com/eea/volto-eea-website-theme/commit/3769a0981181d5b633f3498daebbe96be8b4b833)]
211
240
  - Fix(redirect): o.filter - refs #157627 [Alin Voinea - [`deb23da`](https://github.com/eea/volto-eea-website-theme/commit/deb23da846444cc96539697fd798429ae0abe89e)]
212
- - Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`f1fffc5`](https://github.com/eea/volto-eea-website-theme/commit/f1fffc5db96725440863d545580b4e76cce4b796)]
213
241
  ### [1.5.0](https://github.com/eea/volto-eea-website-theme/compare/1.4.2...1.5.0) - 9 January 2023
214
242
 
215
243
  #### :hammer_and_wrench: Others
@@ -243,7 +271,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
243
271
 
244
272
  - Release 1.4.0 [Alin Voinea - [`bd42a0d`](https://github.com/eea/volto-eea-website-theme/commit/bd42a0d26e928cac5d99933194755da3db06b341)]
245
273
  - bump version to use as volto-eea-design-system [David Ichim - [`f4be047`](https://github.com/eea/volto-eea-website-theme/commit/f4be047328b46399b03b612d378b18aaf82e7dc1)]
246
- - Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`9b7cfef`](https://github.com/eea/volto-eea-website-theme/commit/9b7cfefb4d34fc1c948015e491feb370f9795bd8)]
247
274
  - test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`df252a9`](https://github.com/eea/volto-eea-website-theme/commit/df252a9bfed0bb86cadf53c59dd1603b1e2cd822)]
248
275
  ### [1.3.2](https://github.com/eea/volto-eea-website-theme/compare/1.3.1...1.3.2) - 16 December 2022
249
276
 
@@ -253,7 +280,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
253
280
 
254
281
  #### :hammer_and_wrench: Others
255
282
 
256
- - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`a43c658`](https://github.com/eea/volto-eea-website-theme/commit/a43c658a7920c8df95e763b9a637f38ce77eba2c)]
257
283
  - Better razzle.config [Tiberiu Ichim - [`81dbf48`](https://github.com/eea/volto-eea-website-theme/commit/81dbf48815fb27facb4f82c9b764540fdf188b2e)]
258
284
  - Better razzle.config [Tiberiu Ichim - [`7bc9da2`](https://github.com/eea/volto-eea-website-theme/commit/7bc9da2cd837ab62a95cd29979cdd9b0055b7d67)]
259
285
  ### [1.3.1](https://github.com/eea/volto-eea-website-theme/compare/1.3.0...1.3.1) - 28 November 2022
@@ -262,9 +288,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
262
288
 
263
289
  - feat(Footer): Bring back footer contacts extra actions - refs #151856 [Alin Voinea - [`6c19413`](https://github.com/eea/volto-eea-website-theme/commit/6c194139420c9fd847692d180db1c1593e2483de)]
264
290
 
265
- #### :hammer_and_wrench: Others
266
-
267
- - yarn 3 [Alin Voinea - [`ea7a709`](https://github.com/eea/volto-eea-website-theme/commit/ea7a7094945312776e9b6f44e371178603e92139)]
268
291
  ### [1.3.0](https://github.com/eea/volto-eea-website-theme/compare/1.2.0...1.3.0) - 22 November 2022
269
292
 
270
293
  #### :rocket: New Features
@@ -305,7 +328,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
305
328
  - Add subsite class to body [Tiberiu Ichim - [`74d700f`](https://github.com/eea/volto-eea-website-theme/commit/74d700fbfd6249a8604762a7e4e49cce857db0f3)]
306
329
  - Add subsite info to header [Tiberiu Ichim - [`47daf8b`](https://github.com/eea/volto-eea-website-theme/commit/47daf8bb6374a1222040626b19d4154df7ba1b83)]
307
330
  - fix eslint [Miu Razvan - [`eb8d0a7`](https://github.com/eea/volto-eea-website-theme/commit/eb8d0a790bc70c0aae256c6ff35f63c4885f338e)]
308
- - Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`cc578a4`](https://github.com/eea/volto-eea-website-theme/commit/cc578a413b205a8e61e091fab3a88f94cedefc89)]
309
331
  ### [1.1.0](https://github.com/eea/volto-eea-website-theme/compare/1.0.0...1.1.0) - 28 October 2022
310
332
 
311
333
  #### :nail_care: Enhancements
@@ -353,7 +375,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
353
375
 
354
376
  #### :hammer_and_wrench: Others
355
377
 
356
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`33b56ac`](https://github.com/eea/volto-eea-website-theme/commit/33b56acb13fbaf0c5b79e8fc6e13c4b699c79c90)]
357
378
  ### [0.7.3](https://github.com/eea/volto-eea-website-theme/compare/0.7.2...0.7.3) - 22 September 2022
358
379
 
359
380
  #### :hammer_and_wrench: Others
@@ -621,7 +642,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
621
642
  - Header refactor, add custom logo #5 [ichim-david - [`4950235`](https://github.com/eea/volto-eea-website-theme/commit/49502358105437cfeac3b144e6d301cb59aa2346)]
622
643
  - Update footer.config with new publication card component [ichim-david - [`2e38e9a`](https://github.com/eea/volto-eea-website-theme/commit/2e38e9a417f835009d60c80d4eb4b30229f55e45)]
623
644
  - 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)]
624
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`da8ceb6`](https://github.com/eea/volto-eea-website-theme/commit/da8ceb68ea68bfbc9504e48ccd4d68277f11ab9a)]
625
645
  - use breadcrumbs from eea-design-system [nileshgulia1 - [`db2f9e9`](https://github.com/eea/volto-eea-website-theme/commit/db2f9e9a4327420a3cce9a9903cd88549b129eab)]
626
646
  - Update theme.config [ichim-david - [`8eca4f4`](https://github.com/eea/volto-eea-website-theme/commit/8eca4f40397a4aeca6d39029c92db78968d37064)]
627
647
  - Added keyContent component to theme.config [ichim-david - [`d86f202`](https://github.com/eea/volto-eea-website-theme/commit/d86f202d0274d839487a88b51cae9a0e899beb23)]
@@ -663,5 +683,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
663
683
 
664
684
  #### :hammer_and_wrench: Others
665
685
 
666
- - yarn bootstrap [Alin Voinea - [`6995e9e`](https://github.com/eea/volto-eea-website-theme/commit/6995e9e091f21fdbbdffa8a44fc0e2c626f6d46a)]
667
686
  - 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": "1.11.1",
3
+ "version": "1.11.3",
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",
@@ -10,6 +10,7 @@ import { Editor, createEditor, Transforms, Node, Range } from 'slate';
10
10
  import { ReactEditor, Editable, Slate, withReact } from 'slate-react';
11
11
  import config from '@plone/volto/registry';
12
12
  import { SidebarPortal } from '@plone/volto/components';
13
+ import { BodyClass } from '@plone/volto/helpers';
13
14
  import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
14
15
  import BannerView from '@eeacms/volto-eea-website-theme/components/theme/Banner/View';
15
16
  import schema from './schema';
@@ -163,6 +164,7 @@ export const TitleBlockEdit = (props) => {
163
164
 
164
165
  return (
165
166
  <React.Fragment>
167
+ <BodyClass className="with-title-block" />
166
168
  <BannerView
167
169
  {...props}
168
170
  banner={{
@@ -6,6 +6,7 @@
6
6
  import React from 'react';
7
7
  import { Portal } from 'react-portal';
8
8
  import PropTypes from 'prop-types';
9
+ import { BodyClass } from '@plone/volto/helpers';
9
10
 
10
11
  import BannerView from '@eeacms/volto-eea-website-theme/components/theme/Banner/View';
11
12
 
@@ -26,9 +27,12 @@ function IsomorphicPortal({ children }) {
26
27
  * @extends Component
27
28
  */
28
29
  const View = (props) => (
29
- <IsomorphicPortal>
30
- <BannerView {...props} />
31
- </IsomorphicPortal>
30
+ <React.Fragment>
31
+ <BodyClass className="with-title-block" />
32
+ <IsomorphicPortal>
33
+ <BannerView {...props} />
34
+ </IsomorphicPortal>
35
+ </React.Fragment>
32
36
  );
33
37
 
34
38
  /**
package/src/config.js CHANGED
@@ -289,10 +289,10 @@ export const colors = [
289
289
  '#007B6C',
290
290
  '#005248',
291
291
  '#007B6C',
292
- '#00A390',
293
- '#00CCB4',
294
- '#00F5D8',
295
- '#85FFF1',
292
+ '#289588',
293
+ '#50B0A4',
294
+ '#78CAC0',
295
+ '#A0E5DC',
296
296
  '#C8FFF8',
297
297
  // Secondary & shades
298
298
  '#004B7F',
@@ -308,13 +308,13 @@ export const colors = [
308
308
  '#3D5265',
309
309
  '#4C677F',
310
310
  '#6989A5',
311
- '#8EA6C2',
311
+ '#87A7C3',
312
312
  '#ACCAE5',
313
313
  '#DAE8F4',
314
314
  // Black & White shades
315
315
  '#000000',
316
316
  '#323232',
317
- '#67696b',
317
+ '#747678',
318
318
  '#BCBEC0',
319
319
  '#E6E7E8',
320
320
  '#F9F9F9',
@@ -268,6 +268,9 @@ class Edit extends Component {
268
268
  <img
269
269
  className={cx({
270
270
  'full-width': data.align === 'full',
271
+ large: data.size === 'l',
272
+ medium: data.size === 'm',
273
+ small: data.size === 's',
271
274
  })}
272
275
  src={
273
276
  isInternalURL(data.url)
@@ -63,6 +63,9 @@ export const View = (props) => {
63
63
  <img
64
64
  className={cx({
65
65
  'full-width': data.align === 'full',
66
+ large: data.size === 'l',
67
+ medium: data.size === 'm',
68
+ small: data.size === 's',
66
69
  })}
67
70
  src={
68
71
  isInternalURL(data.url)
@@ -180,10 +180,11 @@ class Form extends Component {
180
180
  formData.hasOwnProperty(blocksLayoutFieldname) &&
181
181
  formData[blocksLayoutFieldname].items.length > 0
182
182
  ) {
183
- selectedBlock = formData[blocksLayoutFieldname].items[0];
184
-
185
- if (config.blocks?.initialBlocksFocus?.[this.props.type]) {
186
- //Default selected is not the first block, but the one from config.
183
+ if (config.blocks?.initialBlocksFocus === null) {
184
+ selectedBlock = null;
185
+ } else if (this.props.type in config.blocks?.initialBlocksFocus) {
186
+ // Default selected is not the first block, but the one from config.
187
+ // TODO Select first block and not an arbitrary one.
187
188
  Object.keys(formData[blocksFieldname]).forEach((b_key) => {
188
189
  if (
189
190
  formData[blocksFieldname][b_key]['@type'] ===
@@ -192,8 +193,11 @@ class Form extends Component {
192
193
  selectedBlock = b_key;
193
194
  }
194
195
  });
196
+ } else {
197
+ selectedBlock = formData[blocksLayoutFieldname].items[0];
195
198
  }
196
199
  }
200
+
197
201
  this.state = {
198
202
  formData,
199
203
  initialFormData: cloneDeep(formData),
@@ -254,7 +258,11 @@ class Form extends Component {
254
258
  * Tab selection is done only by setting activeIndex in state
255
259
  */
256
260
  onTabChange(e, { activeIndex }) {
257
- this.setState({ activeIndex });
261
+ const defaultFocus = this.props.schema.fieldsets[activeIndex].fields[0];
262
+ this.setState({
263
+ activeIndex,
264
+ ...(defaultFocus ? { inFocus: { [defaultFocus]: true } } : {}),
265
+ });
258
266
  }
259
267
 
260
268
  /**
@@ -641,7 +649,7 @@ class Form extends Component {
641
649
  error={keys(this.state.errors).length > 0}
642
650
  className={settings.verticalFormTabs ? 'vertical-form' : ''}
643
651
  >
644
- <fieldset className="invisible" disabled={!this.props.editable}>
652
+ <fieldset className="invisible">
645
653
  <Segment.Group raised>
646
654
  {schema && schema.fieldsets.length > 1 && (
647
655
  <>
@@ -678,10 +686,11 @@ class Form extends Component {
678
686
  ...map(item.fields, (field, index) => (
679
687
  <Field
680
688
  {...schema.properties[field]}
689
+ isDisabled={!this.props.editable}
681
690
  id={field}
682
691
  formData={this.state.formData}
683
692
  fieldSet={item.title.toLowerCase()}
684
- focus={index === 0}
693
+ focus={this.state.inFocus[field]}
685
694
  value={this.state.formData?.[field]}
686
695
  required={schema.required.indexOf(field) !== -1}
687
696
  onChange={this.onChangeField}
@@ -60,6 +60,7 @@ const EEAHeader = ({ pathname, token, items, history, subsite }) => {
60
60
 
61
61
  const { eea } = config.settings;
62
62
  const headerOpts = eea.headerOpts || {};
63
+ const headerSearchBox = eea.headerSearchBox || [];
63
64
  const { logo, logoWhite } = headerOpts || {};
64
65
  const width = useSelector((state) => state.screen?.width);
65
66
  const dispatch = useDispatch();
@@ -199,6 +200,7 @@ const EEAHeader = ({ pathname, token, items, history, subsite }) => {
199
200
  </Header.TopHeader>
200
201
  <Header.Main
201
202
  pathname={pathname}
203
+ headerSearchBox={headerSearchBox}
202
204
  inverted={isHomePageInverse ? true : false}
203
205
  transparency={isHomePageInverse ? true : false}
204
206
  logo={
@@ -0,0 +1,5 @@
1
+ const OutdatedBrowser = () => {
2
+ return null;
3
+ };
4
+
5
+ export default OutdatedBrowser;
@@ -1,131 +0,0 @@
1
- import React, { useEffect } from 'react';
2
- import { Container, Input, List } from 'semantic-ui-react';
3
- import { withRouter, Link } from 'react-router-dom';
4
- import { useClickOutside } from '@eeacms/volto-eea-design-system/helpers';
5
- import config from '@plone/volto/registry';
6
-
7
- const getRandomItems = (arr, max) => {
8
- return (
9
- arr?.slice(0, max).map(function () {
10
- return this.splice(Math.floor(Math.random() * this.length), 1)[0];
11
- }, arr.slice()) || []
12
- );
13
- };
14
-
15
- function HeaderSearchPopUp({
16
- history,
17
- location,
18
- onClose,
19
- searchInputRef,
20
- triggerRefs = [],
21
- }) {
22
- const nodeRef = React.useRef();
23
- const { eea } = config.settings;
24
- const defaultView = eea.headerSearchBox.filter((v) => v.isDefault);
25
- const localView = eea.headerSearchBox.filter((v) =>
26
- location.pathname.includes(v.path),
27
- );
28
- const activeView = localView.length > 0 ? localView[0] : defaultView[0];
29
- const {
30
- path,
31
- placeholder,
32
- buttonTitle,
33
- description,
34
- searchSuggestions,
35
- } = activeView;
36
- const { suggestionsTitle, suggestions, maxToShow } = searchSuggestions || {};
37
-
38
- const [text, setText] = React.useState('');
39
- const [visibleSuggestions, setVisibileSuggestions] = React.useState(
40
- getRandomItems(suggestions, maxToShow),
41
- );
42
-
43
- useEffect(() => {
44
- setVisibileSuggestions(getRandomItems(suggestions, maxToShow));
45
- }, [maxToShow, suggestions]);
46
-
47
- useClickOutside({ targetRefs: [nodeRef, ...triggerRefs], callback: onClose });
48
-
49
- const onChangeText = (event, { value }) => {
50
- setText(value);
51
- event.preventDefault();
52
- };
53
-
54
- const onSubmit = (event) => {
55
- history.push(`${path}?q=${text}`);
56
-
57
- if (window?.searchContext?.resetSearch) {
58
- window.searchContext.resetSearch({ searchTerm: text });
59
- }
60
-
61
- onClose();
62
- event.preventDefault();
63
- };
64
-
65
- const onClickHandler = (suggestion) => {
66
- if (window?.searchContext?.resetSearch) {
67
- window.searchContext.resetSearch({ searchTerm: suggestion });
68
- }
69
-
70
- onClose();
71
- };
72
-
73
- return (
74
- <div id="search-box" ref={nodeRef}>
75
- <div className="wrapper">
76
- <Container>
77
- <form method="get" onSubmit={onSubmit}>
78
- <Input
79
- ref={searchInputRef}
80
- className="search"
81
- onChange={onChangeText}
82
- icon={{
83
- className: 'ri-search-line',
84
- link: true,
85
- onClick: onSubmit,
86
- }}
87
- placeholder={placeholder}
88
- fluid
89
- />
90
- </form>
91
- {searchSuggestions && suggestions.length > 0 && (
92
- <div className="search-suggestions">
93
- {suggestionsTitle && <h4>{suggestionsTitle}</h4>}
94
-
95
- <List>
96
- {visibleSuggestions.map((item, i) => {
97
- return (
98
- <List.Item key={i}>
99
- <Link
100
- to={`${path}?q=${item}`}
101
- onClick={() => onClickHandler(item)}
102
- >
103
- {item}
104
- </Link>
105
- </List.Item>
106
- );
107
- })}
108
- </List>
109
- </div>
110
- )}
111
- </Container>
112
- {buttonTitle && (
113
- <div className="advanced-search">
114
- <Container>
115
- <div>{description}</div>
116
- <a
117
- href={defaultView[0].path}
118
- className="ui button white inverted"
119
- title="Advanced search"
120
- >
121
- {buttonTitle}
122
- </a>
123
- </Container>
124
- </div>
125
- )}
126
- </div>
127
- </div>
128
- );
129
- }
130
-
131
- export default withRouter(HeaderSearchPopUp);