Skip to content

Commit

Permalink
Merge pull request #121 from eea/develop
Browse files Browse the repository at this point in the history
Rollback previous change
  • Loading branch information
zotya committed Jan 24, 2024
2 parents 3b90342 + fb9ee1c commit ec4c9d4
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 32 deletions.
23 changes: 6 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [0.7.1](https://github.com/eea/volto-searchlib/compare/0.7.0...0.7.1) - 23 January 2024
### [0.7.2](https://github.com/eea/volto-searchlib/compare/0.7.1...0.7.2) - 24 January 2024

#### :hammer_and_wrench: Others

- Don't crash in sorting when facet is not yet available [Tiberiu Ichim - [`ad28f68`](https://github.com/eea/volto-searchlib/commit/ad28f684dcb1241bb5974aeadabdc9f10d9d51ce)]
- Fix api of useSort [Tiberiu Ichim - [`fea7cd2`](https://github.com/eea/volto-searchlib/commit/fea7cd2a789d88ea0220a8a6012c14125df2a48b)]
- Show a console logging when there's facets defined with custom sort but no custom facet values [Tiberiu Ichim - [`fa3988a`](https://github.com/eea/volto-searchlib/commit/fa3988a51169be60c7491457965623649e15767b)]
- Rollback previous change [Tiberiu Ichim - [`430000f`](https://github.com/eea/volto-searchlib/commit/430000fc7101fcef378b6c8b7bbabccf6f54b7ba)]
### [0.7.1](https://github.com/eea/volto-searchlib/compare/0.7.0...0.7.1) - 23 January 2024

### [0.7.0](https://github.com/eea/volto-searchlib/compare/0.6.7...0.7.0) - 16 January 2024

#### :house: Internal changes

- style: Automated code fix [eea-jenkins - [`8fabfb5`](https://github.com/eea/volto-searchlib/commit/8fabfb5f02695078dce0b727ca9a8e8368add3a6)]
- style: Automated code fix [eea-jenkins - [`2c0ffe7`](https://github.com/eea/volto-searchlib/commit/2c0ffe7f91d82fc6ef8c1e7b0724e448d6da21e8)]
- style: Automated code fix [eea-jenkins - [`528f293`](https://github.com/eea/volto-searchlib/commit/528f293baa92826890a76aa6044398d91fb9a7ef)]
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`e1801bd`](https://github.com/eea/volto-searchlib/commit/e1801bd0087e8e47a08078a3fa081a8f1be6c5f4)]

#### :hammer_and_wrench: Others

Expand All @@ -27,14 +30,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fixed slider [Zoltan Szabo - [`db223bf`](https://github.com/eea/volto-searchlib/commit/db223bfe6c13ddb9eb80efbcf5fec4cf13172de5)]
- disable facets while the results are loading [Zoltan Szabo - [`6529042`](https://github.com/eea/volto-searchlib/commit/65290420f7c2100a07c64a51733c3af96db3a89e)]
- in histogram facets only show the range where the buckets are not empty [Zoltan Szabo - [`3994c03`](https://github.com/eea/volto-searchlib/commit/3994c0375590e92f7e1536ebfec817ba9d5cf5f6)]
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`d5e1586`](https://github.com/eea/volto-searchlib/commit/d5e15860300831a535982abbe0d76e62f277f5fa)]
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`b359f50`](https://github.com/eea/volto-searchlib/commit/b359f50b28613b348440bf602a1550bcb9efedc7)]
- added possibility to configure facets to only be visible for authenticated users [Zoltan Szabo - [`cbbe2ec`](https://github.com/eea/volto-searchlib/commit/cbbe2ec5ac0efc6bff24ef3707a51715b745d56d)]
- hide facets if has no values to show [Zoltan Szabo - [`0a1740a`](https://github.com/eea/volto-searchlib/commit/0a1740a79474690649bd957f6841a2fae741058e)]
- only show the 'More filters' button if there are more filters [Zoltan Szabo - [`96dac21`](https://github.com/eea/volto-searchlib/commit/96dac2193b43b792269548c5351c447d4e9beb93)]
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`e2bbc26`](https://github.com/eea/volto-searchlib/commit/e2bbc262dd14cd72e3213291b25fe314a0e105fd)]
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`804556f`](https://github.com/eea/volto-searchlib/commit/804556fa4e5f7b8baf3570b55e7f24296a241253)]
- test: [JENKINS] Improve cypress time [valentinab25 - [`0c38ce9`](https://github.com/eea/volto-searchlib/commit/0c38ce972c318c64b70044dfad232202dc311687)]
- * test: add unit tests and modify jest-addon.config for searchlib alias - refs #254313 [ana-oprea - [`620031b`](https://github.com/eea/volto-searchlib/commit/620031b2f9b808a7e2804a5a7eb39c438e132f98)]
### [0.6.7](https://github.com/eea/volto-searchlib/compare/0.6.6...0.6.7) - 17 October 2023

Expand Down Expand Up @@ -80,7 +78,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- test: Fix eslint and yarn i18n [Alin Voinea - [`315d99c`](https://github.com/eea/volto-searchlib/commit/315d99ccc61013bf5f5dc0ce145740a2abc393f8)]
- i18n: Add en [Alin Voinea - [`324f48b`](https://github.com/eea/volto-searchlib/commit/324f48b7f65acc706bb418c224740757a619d6d4)]
- lint fix [ichim-david - [`10ff8dc`](https://github.com/eea/volto-searchlib/commit/10ff8dc42a3ce570b5f53d1eff18d9cace2abb64)]
### [0.6.3](https://github.com/eea/volto-searchlib/compare/0.6.2...0.6.3) - 23 August 2023
Expand Down Expand Up @@ -133,7 +130,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :house: Internal changes

- chore: [JENKINS] Deprecate circularity website [valentinab25 - [`2953502`](https://github.com/eea/volto-searchlib/commit/2953502af020d9f7867f59a1160efadb3812fe29)]

#### :hammer_and_wrench: Others

Expand Down Expand Up @@ -224,7 +220,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Fix reading time facet [kreafox - [`c6353ce`](https://github.com/eea/volto-searchlib/commit/c6353cefc8ac3d1fdfb0865f43c7529c767599b5)]
- customize archived-item label for datahub [Zoltan Szabo - [`844576e`](https://github.com/eea/volto-searchlib/commit/844576e5660f0afb78541d536c93099995ace540)]
- Fix full view [Tiberiu Ichim - [`a74c51a`](https://github.com/eea/volto-searchlib/commit/a74c51a649d5aa89190af8c1f5531b3fdf050d43)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`f9f4c91`](https://github.com/eea/volto-searchlib/commit/f9f4c9183662cebfc3999e205134b48ccd51cce2)]
### [0.4.27](https://github.com/eea/volto-searchlib/compare/0.4.26...0.4.27) - 1 March 2023

#### :hammer_and_wrench: Others
Expand Down Expand Up @@ -461,7 +456,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

- Prettier [kreafox - [`fe76714`](https://github.com/eea/volto-searchlib/commit/fe76714b187a97010003b9b3203ad4d20c5b794c)]
- Prettier [kreafox - [`b639666`](https://github.com/eea/volto-searchlib/commit/b639666c564298b8a8469588e2e39572dba2bced)]
- Use volto version before yarn 3 [kreafox - [`b6e1e72`](https://github.com/eea/volto-searchlib/commit/b6e1e72a2e2cd8cc5597c1be5c7fd00a404b622f)]
- Make search input placeholder configurable [kreafox - [`18f3f53`](https://github.com/eea/volto-searchlib/commit/18f3f533af4c3f3d95264d8c54a9945d6b869055)]
- Remove dependency [kreafox - [`8f2b0d0`](https://github.com/eea/volto-searchlib/commit/8f2b0d03829f4cd9f2717f1308357c197b60fc53)]
- Fix project eslintrc [kreafox - [`76e3a6e`](https://github.com/eea/volto-searchlib/commit/76e3a6e4000f9aa3db208d057227c0ceea7ad38d)]
Expand All @@ -471,7 +465,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Fix project eslintrc [kreafox - [`c182a4c`](https://github.com/eea/volto-searchlib/commit/c182a4c89752ca1f767d25e926ec07d7bb036530)]
- Hide more like this from cards view [kreafox - [`3e2d8f7`](https://github.com/eea/volto-searchlib/commit/3e2d8f73776cb49bf9d0a51271ca15a0cac803e6)]
- Cleanup CSS [kreafox - [`42cfa19`](https://github.com/eea/volto-searchlib/commit/42cfa193769c33d1a84a66fd97a18409b221b674)]
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`2c105dc`](https://github.com/eea/volto-searchlib/commit/2c105dc7b8ca3767e218e72ddd52ae5df8bb20c7)]
### [0.4.1](https://github.com/eea/volto-searchlib/compare/0.4.0...0.4.1) - 10 November 2022

#### :hammer_and_wrench: Others
Expand Down Expand Up @@ -501,13 +494,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Add missing less variable [kreafox - [`3329f84`](https://github.com/eea/volto-searchlib/commit/3329f84f2478a194702ba1a6c6934afe2cf598b2)]
- Style update [kreafox - [`8f24f0f`](https://github.com/eea/volto-searchlib/commit/8f24f0f597c9414ed346abe99e5257c1967e1c3a)]
- Change search box color on datahub [kreafox - [`8851e42`](https://github.com/eea/volto-searchlib/commit/8851e4239b4d3e8405c2cb270c2b86ec5e651c8f)]
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`a42552c`](https://github.com/eea/volto-searchlib/commit/a42552cfb253523ae8962041497b328694bb4465)]
- Fix landing page cards override [kreafox - [`9504e20`](https://github.com/eea/volto-searchlib/commit/9504e2073cc3501466be2b0c5c67d9f1b6526d99)]
### [0.3.16](https://github.com/eea/volto-searchlib/compare/0.3.15...0.3.16) - 27 September 2022

#### :hammer_and_wrench: Others

- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`c6f41f2`](https://github.com/eea/volto-searchlib/commit/c6f41f2aac8ebb42ffc4cbed636c91371a8ab177)]
### [0.3.15](https://github.com/eea/volto-searchlib/compare/0.3.14...0.3.15) - 21 September 2022

#### :hammer_and_wrench: Others
Expand Down Expand Up @@ -613,7 +604,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- App info CSS & hide footer elements [kreafox - [`fe9172e`](https://github.com/eea/volto-searchlib/commit/fe9172ee2e4f5feadc4e97686ae16d598017e60e)]
- AnswersBox styling & cleanup [kreafox - [`7092994`](https://github.com/eea/volto-searchlib/commit/709299447a6a2aa14d3f93857651898853bd3503)]
- AnswersBox styling [kreafox - [`dfda196`](https://github.com/eea/volto-searchlib/commit/dfda1962d5b4856ed9d41294eabfa636d887ab72)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`8e8a206`](https://github.com/eea/volto-searchlib/commit/8e8a206746877118b9f2336b11dfdfadd9d1e408)]
### [0.3.4](https://github.com/eea/volto-searchlib/compare/0.3.3...0.3.4) - 13 June 2022

#### :hammer_and_wrench: Others
Expand Down Expand Up @@ -1150,7 +1140,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Refs #140559 - Styles for search header. [GhitaB - [`4ec2040`](https://github.com/eea/volto-searchlib/commit/4ec204052740b441992f679ff895864f2a4df0e2)]
- Refs #140559 - Improve facet filters boxes. [GhitaB - [`16aa4ea`](https://github.com/eea/volto-searchlib/commit/16aa4ea83a24ba461e6de4c291a869c532508690)]
- Refs #140559 - Show the selected filters values to the facet label box. [GhitaB - [`f66ebd2`](https://github.com/eea/volto-searchlib/commit/f66ebd20a7b6e5b2ef21a99e175020a3a9e7b2ca)]
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`528b9d6`](https://github.com/eea/volto-searchlib/commit/528b9d647bd4cdab527dfd93b9f85512b1d48c23)]
- Refs #140559 - Styles for source. [GhitaB - [`63f7d70`](https://github.com/eea/volto-searchlib/commit/63f7d70f60a88c77fbfce737a659accd87f86c60)]
- Refs #140559 - White filters bar. [GhitaB - [`90a96f6`](https://github.com/eea/volto-searchlib/commit/90a96f64edf9c2b90859f3a2044cba813964ffa8)]
- Refs #140559 - White filters bar. [GhitaB - [`ad4fd48`](https://github.com/eea/volto-searchlib/commit/ad4fd48c4a24345a7e658699917258117d6c6fb6)]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-searchlib",
"version": "0.7.1",
"version": "0.7.2",
"description": "@eeacms/volto-searchlib: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
2 changes: 1 addition & 1 deletion searchlib/components/AnswerBox/AnswerBoxDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default (props) => {
<a
href="https://www.eea.europa.eu/en/legal-notice#disclaimer"
target="_blank"
rel="noreferrer"
rel="noopener"
>
EEA Disclaimer
</a>
Expand Down
4 changes: 2 additions & 2 deletions searchlib/components/FilterList/MoreLikeThisEntry.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ const MoreLikeThisEntry = (props) => {
as={ExternalLink}
href={item.href}
target="_blank"
rel="noreferrer"
rel="noopener"
/>
<h4>
<a href={item.href} target="_blank" rel="noreferrer">
<a href={item.href} target="_blank" rel="noopener">
<Icon name="external" size="small" />
{item.title}
</a>
Expand Down
4 changes: 2 additions & 2 deletions searchlib/components/Result/CardItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const ExternalLink = (props) => {
className={props.className}
href={props.href}
target="_blank"
rel="noreferrer"
rel="noopener"
style={props.style}
>
{props.children}
Expand Down Expand Up @@ -89,7 +89,7 @@ const CardItemComponent = withSearch(({ setFilter, removeFilter }) => ({
as={ExternalLink}
href={url}
target="_blank"
rel="noreferrer"
rel="noopener"
label={
(result.daysSinceIssued < 30 && (
<Label color="yellow" ribbon="right">
Expand Down
2 changes: 1 addition & 1 deletion searchlib/components/Result/ExternalLink.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const ExternalLink = (props) => {
className={props.className}
href={props.href}
target="_blank"
rel="noreferrer"
rel="noopener"
style={props.style}
title={props.title}
>
Expand Down
17 changes: 12 additions & 5 deletions searchlib/lib/hocs/useSort.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useAppConfig } from '@eeacms/search/lib/hocs';

const useSort = (
values,
criterias,
_criterias_unused,
{ defaultSortOn, defaultSortOrder },
field = null, // in case of custom order, we get the facetValues order from field's configuration
) => {
Expand All @@ -27,6 +27,13 @@ const useSort = (
if (sortOn === 'custom') {
const fConfig = appConfig.facets.filter((f) => f.field === field);
const facetValues = fConfig[0].facetValues;
if (!facetValues || facetValues.length === 0) {
// eslint-disable-next-line no-console
console.warn(
'You need to configure the custom facet values for',
field,
);
}

return sortOrder === 'ascending'
? customOrder(options, facetValues, 'ascending')
Expand All @@ -40,10 +47,10 @@ const useSort = (
: 0
: -1
: b[sortOn] > a[sortOn]
? b[sortOn] !== a[sortOn]
? 1
: 0
: -1;
? b[sortOn] !== a[sortOn]
? 1
: 0
: -1;
});
}
};
Expand Down
6 changes: 3 additions & 3 deletions searchlib/stories/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const Page = ({ user, onLogin, onLogout, onCreateAccount }) => (
<a
href="https://componentdriven.org"
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
<strong>component-driven</strong>
</a>{' '}
Expand All @@ -46,15 +46,15 @@ export const Page = ({ user, onLogin, onLogout, onCreateAccount }) => (
<a
href="https://storybook.js.org/tutorials/"
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
Storybook tutorials
</a>
. Read more in the{' '}
<a
href="https://storybook.js.org/docs"
target="_blank"
rel="noopener noreferrer"
rel="noopener"
>
docs
</a>
Expand Down

0 comments on commit ec4c9d4

Please sign in to comment.