@eeacms/volto-clms-theme 1.0.69 → 1.0.70

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,8 +4,24 @@ 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.70](https://github.com/eea/volto-clms-theme/compare/1.0.69...1.0.70)
8
+
9
+ - test [`030fee9`](https://github.com/eea/volto-clms-theme/commit/030fee91c17a03a5a3449500af23429d47c2b168)
10
+ - gemet inspire themes label renaming [`669643a`](https://github.com/eea/volto-clms-theme/commit/669643a41d16c84c044b564047fee161a10a1e80)
11
+ - fix te3st [`5b49612`](https://github.com/eea/volto-clms-theme/commit/5b49612b558765f326f14aaae8b195e21d02c461)
12
+ - fix test [`a0fade3`](https://github.com/eea/volto-clms-theme/commit/a0fade3fa8dfb9bcce669b73e6181d9fe32af1b8)
13
+ - fix routing on vertical tabs with search filters [`d5515a1`](https://github.com/eea/volto-clms-theme/commit/d5515a163fee044405070848b9b65c27b3cab34c)
14
+ - search widget modification [`79fd282`](https://github.com/eea/volto-clms-theme/commit/79fd282cd4daf6bfc3f974ce28e89b6aa69106b8)
15
+ - test [`0f4654a`](https://github.com/eea/volto-clms-theme/commit/0f4654a1b5b2b6c27cc403f4a4e15c447ce5e2df)
16
+ - test [`2797b10`](https://github.com/eea/volto-clms-theme/commit/2797b10c42dca21f31b898de8b4483d5f3bf39c3)
17
+ - test [`e0a1f29`](https://github.com/eea/volto-clms-theme/commit/e0a1f296b29abdb4aad93517171fc4f14218a6f0)
18
+ - test [`8bd1316`](https://github.com/eea/volto-clms-theme/commit/8bd1316153da80952c2db8188dd71bd10d0466eb)
19
+
7
20
  #### [1.0.69](https://github.com/eea/volto-clms-theme/compare/1.0.68...1.0.69)
8
21
 
22
+ > 17 February 2022
23
+
24
+ - Develop [`#206`](https://github.com/eea/volto-clms-theme/pull/206)
9
25
  - new set of action and reducers to import WMS layers from a new endpoint [`#204`](https://github.com/eea/volto-clms-theme/pull/204)
10
26
  - Bugs n improvements [`#205`](https://github.com/eea/volto-clms-theme/pull/205)
11
27
  - add react-input-range to transformIgnorePatterns [`e3c704d`](https://github.com/eea/volto-clms-theme/commit/e3c704d4e0569d55b1c5cf50a3bf3191452aea38)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.0.69",
3
+ "version": "1.0.70",
4
4
  "description": "volto-clms-theme: Volto theme for CLMS site",
5
5
  "main": "src/index.js",
6
6
  "author": "CodeSyntax for the European Environment Agency",
@@ -8,8 +8,6 @@ import React from 'react';
8
8
  import configureStore from 'redux-mock-store';
9
9
  import renderer from 'react-test-renderer';
10
10
 
11
- // import { shallow } from 'enzyme';
12
-
13
11
  Enzyme.configure({ adapter: new Adapter() });
14
12
 
15
13
  global.__SERVER__ = true; // eslint-disable-line no-underscore-dangle
@@ -34,6 +32,7 @@ describe('CclButtonBlockEdit', () => {
34
32
  style: 'default',
35
33
  download: false,
36
34
  };
35
+
37
36
  // const component = shallow(
38
37
  const component = mount(
39
38
  <Provider store={store}>
@@ -42,8 +41,12 @@ describe('CclButtonBlockEdit', () => {
42
41
  data={data}
43
42
  selected={false}
44
43
  block="1234"
45
- onChangeBlock={() => {}}
46
- setSidebarTab={() => {}}
44
+ onChangeBlock={() => {
45
+ return 'test';
46
+ }}
47
+ setSidebarTab={() => {
48
+ return 'test';
49
+ }}
47
50
  />
48
51
  </MemoryRouter>
49
52
  </Provider>,
@@ -74,10 +77,18 @@ describe('CclButtonBlockEdit', () => {
74
77
  data={data}
75
78
  selected={false}
76
79
  block="1234"
77
- onChangeBlock={() => {}}
78
- onSelectBlock={() => {}}
79
- onChangeField={() => {}}
80
- setSidebarTab={() => {}}
80
+ onChangeBlock={() => {
81
+ return 'test';
82
+ }}
83
+ onSelectBlock={() => {
84
+ return 'test';
85
+ }}
86
+ onChangeField={() => {
87
+ return 'test';
88
+ }}
89
+ setSidebarTab={() => {
90
+ return 'test';
91
+ }}
81
92
  />
82
93
  </MemoryRouter>
83
94
  </Provider>,
@@ -109,10 +120,18 @@ describe('CclButtonBlockEdit', () => {
109
120
  data={data}
110
121
  selected={false}
111
122
  block="1234"
112
- onChangeBlock={() => {}}
113
- onSelectBlock={() => {}}
114
- onChangeField={() => {}}
115
- setSidebarTab={() => {}}
123
+ onChangeBlock={() => {
124
+ return 'test';
125
+ }}
126
+ onSelectBlock={() => {
127
+ return 'test';
128
+ }}
129
+ onChangeField={() => {
130
+ return 'test';
131
+ }}
132
+ setSidebarTab={() => {
133
+ return 'test';
134
+ }}
116
135
  />
117
136
  </MemoryRouter>
118
137
  </Provider>,
@@ -9,6 +9,28 @@ export const portal_types_labels = {
9
9
  TechnicalLibrary: 'Product documentation',
10
10
  };
11
11
 
12
+ export const category_labels = {
13
+ farming: 'Farming',
14
+ biota: 'Biota',
15
+ boundaries: 'Boundaries',
16
+ climatologyMeteorologyAtmosphere: 'Climatology / Meteorology / Atmosphere',
17
+ economy: 'Economy',
18
+ elevation: 'Elevation',
19
+ environment: 'Environment',
20
+ geoscientificInformation: 'Geoscientific Information',
21
+ health: 'Health',
22
+ imageryBaseMapsEarthCover: 'Imagery / Base Maps / Earth Cover',
23
+ intelligenceMilitary: 'Intelligence / Military',
24
+ inlandWaters: 'InlandWaters',
25
+ location: 'Location',
26
+ oceans: 'Oceans',
27
+ planningCadastre: 'Planning Cadastre',
28
+ society: 'Society',
29
+ structure: 'Structure',
30
+ transportation: 'Transportation',
31
+ utilitiesCommunication: 'Utilities / Communication',
32
+ };
33
+
12
34
  const rewriteOptions = (name, choices) => {
13
35
  var result = choices;
14
36
  if (name === 'review_state') {
@@ -27,7 +49,6 @@ const rewriteOptions = (name, choices) => {
27
49
  'Tender',
28
50
  'TechnicalLibrary',
29
51
  ];
30
-
31
52
  if (name === 'portal_type') {
32
53
  result = choices
33
54
  .filter((opt) => portal_types.includes(opt.value))
@@ -43,6 +64,20 @@ const rewriteOptions = (name, choices) => {
43
64
  return 0;
44
65
  });
45
66
  }
67
+ if (name === 'classificationTopicCategory') {
68
+ result = choices
69
+ .map((opt) => {
70
+ return { ...opt, label: category_labels[opt.value] };
71
+ })
72
+ .sort((a, b) => {
73
+ if (a.label < b.label) {
74
+ return -1;
75
+ } else if (a.label > b.label) {
76
+ return 1;
77
+ }
78
+ return 0;
79
+ });
80
+ }
46
81
  return result;
47
82
  };
48
83
 
@@ -61,7 +61,7 @@ const CclVerticalFaqTabsView = (props) => {
61
61
  className={cx('card', tab === activeTab && 'active')}
62
62
  >
63
63
  <NavLink
64
- to={'#tab' + tabIndex}
64
+ to={'#tab=' + tabIndex}
65
65
  className="collapsed"
66
66
  onClick={(e) => {
67
67
  handleActive(activeTab, tab, setActiveTab);
@@ -80,7 +80,7 @@ const CclVerticalTabsView = (props) => {
80
80
  <span>{title || defaultTitle}</span>
81
81
  ) : (
82
82
  <NavLink
83
- to={'#tab' + tabIndex}
83
+ to={'#tab=' + tabIndex}
84
84
  className="collapsed"
85
85
  onClick={(e) => {
86
86
  handleClick(e, tab, activeTab, setActiveTab);
@@ -16,7 +16,7 @@ const RoutingHOC = (TabView) =>
16
16
  ) {
17
17
  return rTabsList[0];
18
18
  }
19
- return rTabsList[window.location.hash.substring(4) - 1];
19
+ return rTabsList[window.location.hash.match(/.*&?#?tab=(.*)/)[1] - 1];
20
20
  }
21
21
  React.useEffect(() => {
22
22
  const isReload =
@@ -90,7 +90,7 @@ class SearchWidget extends Component {
90
90
  onSubmit(event) {
91
91
  const section = this.state.section ? `&path=${this.props.pathname}` : '';
92
92
  this.props.history.push(
93
- `/${this.props.locale}/search?SearchableText=${this.state.text}${section}`,
93
+ `/${this.props.locale}/global-search?SearchableText=${this.state.text}${section}`,
94
94
  );
95
95
  event.preventDefault();
96
96
  }
@@ -104,7 +104,7 @@ class SearchWidget extends Component {
104
104
  return (
105
105
  <Form
106
106
  className="ccl-header-search"
107
- action="/search"
107
+ action="/global-search"
108
108
  onSubmit={this.onSubmit}
109
109
  >
110
110
  <Input