@eeacms/volto-eea-design-system 1.61.4 → 1.61.6

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,7 +4,27 @@ 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.61.4](https://github.com/eea/volto-eea-design-system/compare/1.61.3...1.61.4) - 5 October 2026
7
+ ### [1.61.6](https://github.com/eea/volto-eea-design-system/compare/1.61.5...1.61.6) - 26 October 2026
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: remove flagged comments by css:S125 [ana-oprea - [`2fd68ca`](https://github.com/eea/volto-eea-design-system/commit/2fd68ca8d7a0457be7fcf67505966ea9d8332a1c)]
12
+ - fix: Error upgrading eea-website-frontend to the latest Volto 18.x.x - refs #309318 [ana-oprea - [`eabfffd`](https://github.com/eea/volto-eea-design-system/commit/eabfffd36dcd8d3f980ba71e95aa44a034e71902)]
13
+
14
+ ### [1.61.5](https://github.com/eea/volto-eea-design-system/compare/1.61.4...1.61.5) - 7 October 2026
15
+
16
+ #### :rocket: New Features
17
+
18
+ - feat(subsite): use optional useAISearchIcon for subsite passed via headerSearch Controlpanel refs#308136 [nileshgulia1 - [`5c5bebc`](https://github.com/eea/volto-eea-design-system/commit/5c5bebcb47e99168553d3f811493ec7d98858c0e)]
19
+
20
+ #### :nail_care: Enhancements
21
+
22
+ - refactor: only turn off the site wide ai search action when subsite wants it. [nileshgulia1 - [`1cf5bed`](https://github.com/eea/volto-eea-design-system/commit/1cf5bed4bb4f5942635aabf2009f128171704a80)]
23
+
24
+ #### :hammer_and_wrench: Others
25
+
26
+ - Merge pull request #552 from eea/develop [Nilesh - [`a83b0c1`](https://github.com/eea/volto-eea-design-system/commit/a83b0c174f41da449c6c0d9ee720ec4b9a74b095)]
27
+ ### [1.61.4](https://github.com/eea/volto-eea-design-system/compare/1.61.3...1.61.4) - 6 October 2026
8
28
 
9
29
  #### :rocket: New Features
10
30
 
@@ -128,9 +148,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
128
148
  - feat: Volto 18 support - refs #287700 [Alin Voinea - [`6d4f49c`](https://github.com/eea/volto-eea-design-system/commit/6d4f49c3c2a2bfae2ff1b01df6c9e1ec3b13efc5)]
129
149
  - feat(Header): replace search icon with ai variant [Miu Razvan - [`af211a9`](https://github.com/eea/volto-eea-design-system/commit/af211a933bb5499036b7be24b75a2949fa791cea)]
130
150
 
131
- #### :house: Internal changes
132
-
133
-
134
151
  #### :hammer_and_wrench: Others
135
152
 
136
153
  - tests: Fix Sonar Qube tags - refs #297339 [Alin Voinea - [`248553d`](https://github.com/eea/volto-eea-design-system/commit/248553d47d053514f512178793f64d382711c57e)]
@@ -355,8 +372,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
355
372
  - perf(inpage): render in page navigation only when hidden class changes [David Ichim - [`bce09b2`](https://github.com/eea/volto-eea-design-system/commit/bce09b276b1d181abc21623794ff1574e99160c5)]
356
373
  ### [1.31.1](https://github.com/eea/volto-eea-design-system/compare/1.31.0...1.31.1) - 7 June 2024
357
374
 
358
- #### :hammer_and_wrench: Others
359
-
360
375
  ### [1.31.0](https://github.com/eea/volto-eea-design-system/compare/1.23.8...1.31.0) - 22 May 2024
361
376
 
362
377
  #### :boom: Breaking Change
@@ -383,8 +398,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
383
398
 
384
399
  - fix(inpage-navigation): warning Can't perform a React state update on an unmounted component [David Ichim - [`1192493`](https://github.com/eea/volto-eea-design-system/commit/119249384f8f7f4dab6a4c093c182b5dd12bb4f6)]
385
400
 
386
- #### :hammer_and_wrench: Others
387
-
388
401
  ### [1.23.5](https://github.com/eea/volto-eea-design-system/compare/1.23.4...1.23.5) - 5 April 2024
389
402
 
390
403
  #### :nail_care: Enhancements
@@ -671,7 +684,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
671
684
  - fix [Dobricean Ioan Dorian - [`615e67f`](https://github.com/eea/volto-eea-design-system/commit/615e67ff3c9a0fbd6cc7cadbb0c845bf09eec4f0)]
672
685
  - remove [Dobricean Ioan Dorian - [`bf3974b`](https://github.com/eea/volto-eea-design-system/commit/bf3974be18225c893fd09814cb2aca9a84ba0ece)]
673
686
  - fix popper [Dobricean Ioan Dorian - [`762f199`](https://github.com/eea/volto-eea-design-system/commit/762f199ff5725e7ad1fb788feb4f7b7548d1ee44)]
674
- - test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`b7eea21`](https://github.com/eea/volto-eea-design-system/commit/b7eea21fd4e71c4f420cd061717166483082dd6e)]
675
687
  ### [1.16.0](https://github.com/eea/volto-eea-design-system/compare/1.15.0...1.16.0) - 17 August 2023
676
688
 
677
689
  #### :rocket: New Features
@@ -808,9 +820,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
808
820
  - change(footer): add dedicated classes for theme sites logos [David Ichim - [`adebd04`](https://github.com/eea/volto-eea-design-system/commit/adebd04bcf5dc5b28b90db540816384fc60b4073)]
809
821
  - change(footer): header can now be added anywhere in the footer section [David Ichim - [`6ae4872`](https://github.com/eea/volto-eea-design-system/commit/6ae48728dd961d783c6a8120c8a88dc38f63eed6)]
810
822
 
811
- #### :house: Internal changes
812
-
813
-
814
823
  #### :house: Documentation changes
815
824
 
816
825
  - docs: Update and rename Corporate-site-templates to 2-corporate-site-templates.md [Antonio De Marinis - [`41ffc55`](https://github.com/eea/volto-eea-design-system/commit/41ffc5545def9034e3955bf967a2b0b947023528)]
@@ -1466,7 +1475,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1466
1475
  - bump package version [David Ichim - [`b4628be`](https://github.com/eea/volto-eea-design-system/commit/b4628bed134abc76e38a243d4e98143e19cef989)]
1467
1476
  - feature(docusaurus, storybook): logos selection for sites plus inverted options #253 from eea/doc-logo-page [ichim-david - [`dbfc90d`](https://github.com/eea/volto-eea-design-system/commit/dbfc90d035dc40e9d4054347f00fde4de486d63d)]
1468
1477
  - (feat): Add ability to disable the language select from website top menu - refs #158616 [dobri1408 - [`411c8e4`](https://github.com/eea/volto-eea-design-system/commit/411c8e4afaf0b2b9edfdeeecdca22aa4cc41f329)]
1469
- - test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`92feea0`](https://github.com/eea/volto-eea-design-system/commit/92feea09796c9ef0530f65fa1d34139905133215)]
1470
1478
  - Proof reading page header section [ichim-david - [`230239e`](https://github.com/eea/volto-eea-design-system/commit/230239e1b22734fb8606656985bc5e513731e244)]
1471
1479
  ### [1.0.0-alpha.7](https://github.com/eea/volto-eea-design-system/compare/1.0.0-alpha.6...1.0.0-alpha.7) - 16 December 2022
1472
1480
 
@@ -3223,7 +3231,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
3223
3231
  - refactor(header): adjust to volto in progress [ITML - [`760beca`](https://github.com/eea/volto-eea-design-system/commit/760becabf40dbbaed36dac6c37275c7e31aa2509)]
3224
3232
  - refactor(banner): actions as buttons; don't hardcode url for banner image; subcomponentize Banner, add Banner.Action; add developer guidelines on inline styles and line endings; [Tiberiu Ichim - [`6dd5a41`](https://github.com/eea/volto-eea-design-system/commit/6dd5a41248e8bf4095744bd89217707f3ad820a1)]
3225
3233
  - refactor(Image): change image path [ITML - [`a580da6`](https://github.com/eea/volto-eea-design-system/commit/a580da68a45bbe68d314f60e9495fc321489caf5)]
3226
- - change(infrastructure) cherry-pick fix 9639243 skipping jenkins on auto commits [David Ichim - [`fc744cd`](https://github.com/eea/volto-eea-design-system/commit/fc744cda5a4e6d9da0ab6e7f92868d53f28f53c1)]
3227
3234
  - change(infrastructure): modify whats new doc when committing the auto deployment [David Ichim - [`39df33e`](https://github.com/eea/volto-eea-design-system/commit/39df33ed946a8167e4954cffb676144700e0ec38)]
3228
3235
  - change(blockquote): introduce float argument for blockquote with image storybook [David Ichim - [`8fc7290`](https://github.com/eea/volto-eea-design-system/commit/8fc72906c264b5e96702f8518e81d5724b494a5c)]
3229
3236
  - change(infrastructure): specify that docs folder contains changes for deployment [David Ichim - [`a1ca915`](https://github.com/eea/volto-eea-design-system/commit/a1ca9153b70e3525cd73423d059a8607f63fc2b9)]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-design-system",
3
- "version": "1.61.4",
3
+ "version": "1.61.6",
4
4
  "description": "@eeacms/volto-eea-design-system: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
package/src/semantic.less CHANGED
@@ -73,18 +73,10 @@
73
73
  @import '~semantic-ui-less/definitions/elements/rail';
74
74
  }
75
75
 
76
- //& {
77
- // @import '~semantic-ui-less/definitions/elements/reveal';
78
- //}
79
-
80
76
  & {
81
77
  @import '~semantic-ui-less/definitions/elements/segment';
82
78
  }
83
79
 
84
- //& {
85
- // @import '~semantic-ui-less/definitions/elements/step';
86
- //}
87
-
88
80
  /* Collections */
89
81
  & {
90
82
  @import '~semantic-ui-less/definitions/collections/breadcrumb';
@@ -111,10 +103,6 @@
111
103
  }
112
104
 
113
105
  /* Views */
114
- //& {
115
- // @import '~semantic-ui-less/definitions/views/ad';
116
- //}
117
-
118
106
  & {
119
107
  @import '~semantic-ui-less/definitions/views/card';
120
108
  }
@@ -123,14 +111,6 @@
123
111
  @import '~semantic-ui-less/definitions/views/comment';
124
112
  }
125
113
 
126
- //& {
127
- // @import '~semantic-ui-less/definitions/views/feed';
128
- //}
129
-
130
- // & {
131
- // @import '~semantic-ui-less/definitions/views/item';
132
- // }
133
-
134
114
  & {
135
115
  @import '@eeacms/volto-eea-design-system/../theme/themes/eea/definitions/views/item';
136
116
  }
@@ -164,10 +144,6 @@
164
144
  @import '~semantic-ui-less/definitions/modules/modal';
165
145
  }
166
146
 
167
- //& {
168
- // @import '~semantic-ui-less/definitions/modules/nag';
169
- //}
170
-
171
147
  & {
172
148
  @import '~semantic-ui-less/definitions/modules/popup';
173
149
  }
@@ -176,18 +152,10 @@
176
152
  @import '~semantic-ui-less/definitions/modules/progress';
177
153
  }
178
154
 
179
- //& {
180
- // @import '~semantic-ui-less/definitions/modules/rating';
181
- //}
182
-
183
155
  & {
184
156
  @import '~semantic-ui-less/definitions/modules/search';
185
157
  }
186
158
 
187
- //& {
188
- // @import '~semantic-ui-less/definitions/modules/shape';
189
- //}
190
-
191
159
  & {
192
160
  @import '~semantic-ui-less/definitions/modules/sidebar';
193
161
  }
@@ -17,7 +17,11 @@ import burgerIcon from '@eeacms/volto-eea-design-system/../theme/themes/eea/asse
17
17
  import HeaderSearchPopUp from './HeaderSearchPopUp';
18
18
  import HeaderMenuPopUp from './HeaderMenuPopUp';
19
19
  import { useAISummaryToggle } from './useAISummaryToggle';
20
- import { findBestMatchingMenuItem, isMenuItemActive } from './utils';
20
+ import {
21
+ findBestMatchingMenuItem,
22
+ getSearchInput,
23
+ isMenuItemActive,
24
+ } from './utils';
21
25
  import PropTypes from 'prop-types';
22
26
  import omit from 'lodash/omit';
23
27
  import { isInternalURL } from '@plone/volto/helpers/Url/Url';
@@ -162,10 +166,16 @@ const Main = ({
162
166
  const [burger, setBurger] = React.useState('');
163
167
  const searchInputRef = React.useRef(null);
164
168
  const [isClient, setIsClient] = React.useState();
165
- const useAISearchIcon = useSelector(
169
+ const siteUseAISearchIcon = useSelector(
166
170
  (state) =>
167
171
  state.reduxAsyncConnect?.headerSettings?.useAISearchIcon || false,
168
172
  );
173
+ // The search box matching the current path can turn the site-wide icon off
174
+ const useAISearchIcon =
175
+ siteUseAISearchIcon &&
176
+ (getSearchInput(headerSearchBox || [], { pathname: pathname || '' })
177
+ .useAISearchIcon ??
178
+ true);
169
179
 
170
180
  const [aiSummaryEnabled] = useAISummaryToggle();
171
181
 
@@ -772,12 +772,13 @@ test('menu click outside behavior with different active states', async () => {
772
772
  });
773
773
 
774
774
  describe('header search icon and AI summary state', () => {
775
- const renderMain = () =>
775
+ const renderMain = (props = {}) =>
776
776
  renderWithProvider(
777
777
  <Router history={createMemoryHistory()}>
778
778
  <Header>
779
779
  <Header.Main
780
780
  pathname="/test"
781
+ {...props}
781
782
  menuItems={[
782
783
  { '@id': '/test', url: '/test', title: 'Test', items: [] },
783
784
  ]}
@@ -824,4 +825,37 @@ describe('header search icon and AI summary state', () => {
824
825
  'search-line.svg',
825
826
  );
826
827
  });
828
+
829
+ describe('search box useAISearchIcon override', () => {
830
+ const headerSearchBox = [
831
+ { type: 'search-input', path: '/search' },
832
+ {
833
+ type: 'search-input',
834
+ matchpath: '/en/epanet',
835
+ path: '/en/epanet/site-search',
836
+ useAISearchIcon: false,
837
+ },
838
+ ];
839
+
840
+ it('shows the plain magnifier in the search box path that turns the AI icon off', () => {
841
+ mockState.reduxAsyncConnect.headerSettings.useAISearchIcon = true;
842
+
843
+ const { container } = renderMain({
844
+ pathname: '/en/epanet/about',
845
+ headerSearchBox,
846
+ });
847
+ expect(
848
+ container.querySelector('img[alt="Global search"]'),
849
+ ).toHaveAttribute('src', 'search-line.svg');
850
+ });
851
+
852
+ it('keeps the site-wide AI sparkle outside that path', () => {
853
+ mockState.reduxAsyncConnect.headerSettings.useAISearchIcon = true;
854
+
855
+ const { container } = renderMain({ pathname: '/en', headerSearchBox });
856
+ expect(
857
+ container.querySelector('img[alt="Global search"]'),
858
+ ).toHaveAttribute('src', 'ai-search.svg');
859
+ });
860
+ });
827
861
  });
@@ -10,6 +10,7 @@ import { handleEnterKeyPress } from '@eeacms/volto-eea-design-system/helpers';
10
10
  import searchSVG from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Header/search-line.svg';
11
11
  import aiSearchIcon from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Header/ai-search.svg';
12
12
  import { useAISummaryToggle } from './useAISummaryToggle';
13
+ import { getSearchInput } from './utils';
13
14
 
14
15
  const getRandomItems = (arr, max) => {
15
16
  return (
@@ -19,18 +20,6 @@ const getRandomItems = (arr, max) => {
19
20
  );
20
21
  };
21
22
 
22
- const getSearchInput = (config, location) => {
23
- return (
24
- config.filter(
25
- (v) =>
26
- v.type === 'search-input' &&
27
- location.pathname.match(v.matchpath ? v.matchpath : v.path),
28
- )[0] ||
29
- config.filter((v) => v.type === 'search-input')[0] ||
30
- {}
31
- );
32
- };
33
-
34
23
  const serializeAction = (action, location) => {
35
24
  if (action.type === 'info' && isArray(action.content)) {
36
25
  const matchedContent =
@@ -97,10 +86,13 @@ function HeaderSearchPopUp({
97
86
  getRandomItems(suggestions, maxToShow),
98
87
  );
99
88
 
100
- const useAISearchIcon = useSelector(
89
+ const siteUseAISearchIcon = useSelector(
101
90
  (state) =>
102
91
  state.reduxAsyncConnect?.headerSettings?.useAISearchIcon || false,
103
92
  );
93
+ // A search box can turn the site-wide icon off, e.g. a subsite search
94
+ const useAISearchIcon =
95
+ siteUseAISearchIcon && (searchInput.useAISearchIcon ?? true);
104
96
 
105
97
  const [aiSummaryEnabled] = useAISummaryToggle();
106
98
 
@@ -340,6 +340,35 @@ describe('HeaderSearchPopUp', () => {
340
340
  });
341
341
  });
342
342
 
343
+ describe('search box useAISearchIcon override', () => {
344
+ beforeEach(() => {
345
+ window.localStorage.clear();
346
+ });
347
+
348
+ const renderWithEntry = (entry) =>
349
+ render(
350
+ <Provider store={mockStore}>
351
+ <Router history={history}>
352
+ <HeaderSearchPopUp
353
+ headerSearchBox={[{ ...sampleHeaderSearchBox[0], ...entry }]}
354
+ onClose={mockOnClose}
355
+ triggerRefs={[]}
356
+ />
357
+ </Router>
358
+ </Provider>,
359
+ );
360
+
361
+ it('shows the plain magnifier when the search box turns the AI icon off', () => {
362
+ mockState.reduxAsyncConnect.headerSettings.useAISearchIcon = true;
363
+
364
+ const { container } = renderWithEntry({ useAISearchIcon: false });
365
+ expect(container.querySelector('img')).toHaveAttribute(
366
+ 'src',
367
+ 'search-line.svg',
368
+ );
369
+ });
370
+ });
371
+
343
372
  describe('hideActions', () => {
344
373
  const renderWith = (headerSearchBox) =>
345
374
  render(
@@ -91,3 +91,24 @@ export const numbersToMenuItemColumns = (numbers) => {
91
91
  })
92
92
  .filter((col) => col !== '');
93
93
  };
94
+
95
+ /**
96
+ * Finds the search-input entry of the header search box config that matches
97
+ * the current path (its matchpath, else its path), falling back to the first
98
+ * search-input entry.
99
+ *
100
+ * @param {Array} config - headerSearchBox entries
101
+ * @param {Object} location - object with a pathname
102
+ * @returns {Object} The matched search-input entry, or {}
103
+ */
104
+ export const getSearchInput = (config, location) => {
105
+ return (
106
+ config.filter(
107
+ (v) =>
108
+ v.type === 'search-input' &&
109
+ location.pathname.match(v.matchpath ? v.matchpath : v.path),
110
+ )[0] ||
111
+ config.filter((v) => v.type === 'search-input')[0] ||
112
+ {}
113
+ );
114
+ };
@@ -129,6 +129,10 @@
129
129
  /* Global focus-visible for accessibility */
130
130
  @focusVisibleOutline: .2rem auto var(--focus-visible, @blue-2);
131
131
 
132
+ /* Used by Volto's pastanaga extras/focus.less (Volto >= 18.36.0) */
133
+ @innerFocusShadow: transparent;
134
+ @outerFocusOutline: var(--focus-visible, @blue-2);
135
+
132
136
  /* Used on inputs, textarea etc */
133
137
  @focusedFormBorderColor: @secondaryColor;
134
138