@eeacms/volto-clms-theme 1.1.32 → 1.1.33
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 +12 -6
- package/package.json +1 -1
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/RightModalFacets.jsx +8 -0
- package/src/components/CclCard/CclCard.jsx +63 -6
- package/src/components/CclCard/CclCard.test.jsx +36 -23
- package/src/components/Widgets/MapLayersWidget.jsx +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +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.1.33](https://github.com/eea/volto-clms-theme/compare/1.1.32...1.1.33) - 22 August 2023
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- use aprovider with a store [Mikel Larreategi - [`f10c230`](https://github.com/eea/volto-clms-theme/commit/f10c230c7b4548f94488aa610e98d2bd812136f5)]
|
|
12
|
+
- use a provider [Mikel Larreategi - [`a5b7b02`](https://github.com/eea/volto-clms-theme/commit/a5b7b02c222128bb4ace31b10069989f81391efa)]
|
|
13
|
+
- missing context [Mikel Larreategi - [`926177e`](https://github.com/eea/volto-clms-theme/commit/926177e1caadf52578eef6f390a1b565f4a83d96)]
|
|
14
|
+
- show the new field [Mikel Larreategi - [`1ef84d5`](https://github.com/eea/volto-clms-theme/commit/1ef84d5ac96876dd0e0ad36ae676b98bb1d53e57)]
|
|
15
|
+
- use simple links [Mikel Larreategi - [`d755715`](https://github.com/eea/volto-clms-theme/commit/d755715e3004a01085d85ed82e773d959ddb3ca9)]
|
|
16
|
+
- new field [Mikel Larreategi - [`e80a61b`](https://github.com/eea/volto-clms-theme/commit/e80a61be206b99d56992f581b5f7adb2d8444f3e)]
|
|
17
|
+
- add links [Mikel Larreategi - [`aa273a0`](https://github.com/eea/volto-clms-theme/commit/aa273a0655de622c237e3f16925d588d4bcbc98d)]
|
|
18
|
+
- CLMS-2481 rename sorting index names [Mikel Larreategi - [`93ddba7`](https://github.com/eea/volto-clms-theme/commit/93ddba7aaf4fc4ce4acea036163d210096e60aba)]
|
|
7
19
|
### [1.1.32](https://github.com/eea/volto-clms-theme/compare/1.1.31...1.1.32) - 21 August 2023
|
|
8
20
|
|
|
9
21
|
#### :hammer_and_wrench: Others
|
|
@@ -90,7 +102,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
90
102
|
|
|
91
103
|
- remove NUTS text for area naming in the cart [ionlizarazu - [`062e0a3`](https://github.com/eea/volto-clms-theme/commit/062e0a375f5352bc13c18ff7ec33fad4bcc59f2f)]
|
|
92
104
|
- dependencies [ionlizarazu - [`405ef96`](https://github.com/eea/volto-clms-theme/commit/405ef96090fe7bd4af73a49d3285a92fad712e3b)]
|
|
93
|
-
- yarn.lock [ionlizarazu - [`7132119`](https://github.com/eea/volto-clms-theme/commit/71321195c4dd4fceed67f2f0872f3e24bba61c17)]
|
|
94
105
|
- volto-blocks-grid module mapping [ionlizarazu - [`4fec3ca`](https://github.com/eea/volto-clms-theme/commit/4fec3cabc437322ad92ed90d682250bd123ccaaf)]
|
|
95
106
|
- volto-blocks-grid v7.0.2 [ionlizarazu - [`2557e60`](https://github.com/eea/volto-clms-theme/commit/2557e6039d3cea33ca0bd11a0a3ef4764c611f78)]
|
|
96
107
|
- remove styling from teaser block [ionlizarazu - [`879e684`](https://github.com/eea/volto-clms-theme/commit/879e684057c88f52f60f0fa54cbaa155c7d14688)]
|
|
@@ -178,7 +189,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
178
189
|
|
|
179
190
|
#### :house: Internal changes
|
|
180
191
|
|
|
181
|
-
- chore: [JENKINS] Remove alpha testing version [valentinab25 - [`b4cbf65`](https://github.com/eea/volto-clms-theme/commit/b4cbf6557fbc67f7fc4cea5aa2cb19804f3d7e3c)]
|
|
182
192
|
|
|
183
193
|
#### :hammer_and_wrench: Others
|
|
184
194
|
|
|
@@ -1377,7 +1387,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1377
1387
|
#### :hammer_and_wrench: Others
|
|
1378
1388
|
|
|
1379
1389
|
- related products and datasets added to news and meeting views and login-plone route created [Unai - [`5704a1a`](https://github.com/eea/volto-clms-theme/commit/5704a1a766148746162b60efaf232ea90dc20cf4)]
|
|
1380
|
-
- Revert "[JENKINS] Use eeacms/plone-backend and Volto alpha version- Refs #151967" [Mikel Larreategi - [`46eb694`](https://github.com/eea/volto-clms-theme/commit/46eb69415280a3c982405299135027ae4221426a)]
|
|
1381
1390
|
- sort items according to the lowercased label and put those with special meaning at the end [Mikel Larreategi - [`6410abe`](https://github.com/eea/volto-clms-theme/commit/6410abe096f60dcad54dced2026c9df9b7946d68)]
|
|
1382
1391
|
- lint fix [Unai - [`1264a7a`](https://github.com/eea/volto-clms-theme/commit/1264a7adfe8d679fea1bd821ad087add20f4271d)]
|
|
1383
1392
|
- footer newsletter subscription change, global search maxLength change from 8000 to 200 and /login design change [Unai - [`a09d24a`](https://github.com/eea/volto-clms-theme/commit/a09d24adbb6fa053fb2a2cc0071506b906593b42)]
|
|
@@ -1528,7 +1537,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1528
1537
|
- search block new features [ionlizarazu - [`8e814cb`](https://github.com/eea/volto-clms-theme/commit/8e814cbd359782540c21fe37b37ef146d331f0d6)]
|
|
1529
1538
|
- language selector cookie management [ionlizarazu - [`1385ac9`](https://github.com/eea/volto-clms-theme/commit/1385ac95795702206d3623ba6e780faa43a89e0a)]
|
|
1530
1539
|
- toolbar cookie management [ionlizarazu - [`5c23200`](https://github.com/eea/volto-clms-theme/commit/5c23200790b20e1d4f1bc966463c37bf4c808f47)]
|
|
1531
|
-
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`0316a0d`](https://github.com/eea/volto-clms-theme/commit/0316a0d8b6fb0fa14af13002415f3c95d9f8ede3)]
|
|
1532
1540
|
### [1.0.84](https://github.com/eea/volto-clms-theme/compare/1.0.83...1.0.84) - 18 March 2022
|
|
1533
1541
|
|
|
1534
1542
|
#### :hammer_and_wrench: Others
|
|
@@ -2433,13 +2441,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
2433
2441
|
#### :hammer_and_wrench: Others
|
|
2434
2442
|
|
|
2435
2443
|
- replace @collective/volto-dropdownmenu with volto-dropdownmenu [ionlizarazu - [`07f004f`](https://github.com/eea/volto-clms-theme/commit/07f004fe0219e403fb51bc045c83d34f3b981f76)]
|
|
2436
|
-
- yarn.lock [ionlizarazu - [`fe1ca04`](https://github.com/eea/volto-clms-theme/commit/fe1ca04889d29fe7b653db4c69af2751b84b8a1a)]
|
|
2437
2444
|
- add NODE_ENV parameter [ionlizarazu - [`101f27c`](https://github.com/eea/volto-clms-theme/commit/101f27c25b8fbd192e1b11865e95cf5ffee08c1b)]
|
|
2438
2445
|
- upgrade volto-dropdownmenu version [ionlizarazu - [`2081855`](https://github.com/eea/volto-clms-theme/commit/2081855301f4c708776e0dbab39db143cee00dbc)]
|
|
2439
2446
|
- HomeSearch block missing url behaviour [ionlizarazu - [`d20a378`](https://github.com/eea/volto-clms-theme/commit/d20a378ce3f254b8343692348f314bf281974542)]
|
|
2440
2447
|
- babel configuration [ionlizarazu - [`203ea2d`](https://github.com/eea/volto-clms-theme/commit/203ea2de07f99ca3403e4ca220ca74d7ce69b61d)]
|
|
2441
2448
|
- prettier [ionlizarazu - [`e79e26b`](https://github.com/eea/volto-clms-theme/commit/e79e26bf2fa40ba7b4eb53a24dabd87928221c28)]
|
|
2442
|
-
- add yarn lock [ionlizarazu - [`e1ab28b`](https://github.com/eea/volto-clms-theme/commit/e1ab28b060d5a74431c368b0de82a68dabce1eab)]
|
|
2443
2449
|
- Jenkinsfile cypress test [ionlizarazu - [`b385d65`](https://github.com/eea/volto-clms-theme/commit/b385d65986f717c60f8c434a08fc11b829d08eb4)]
|
|
2444
2450
|
- cypress [ionlizarazu - [`a243cf0`](https://github.com/eea/volto-clms-theme/commit/a243cf0182fa3dd113c16ff495c71e310252d83b)]
|
|
2445
2451
|
- some fixes [ionlizarazu - [`046279b`](https://github.com/eea/volto-clms-theme/commit/046279b9d05bea8a64eca03eed493e02621534c9)]
|
package/package.json
CHANGED
|
@@ -58,6 +58,7 @@ const RightModalFacets = (props) => {
|
|
|
58
58
|
const { showSearchButton } = data;
|
|
59
59
|
const isLive = !showSearchButton;
|
|
60
60
|
const intl = useIntl();
|
|
61
|
+
// Should we generalize this to an external function?
|
|
61
62
|
if (querystring?.sortable_indexes?.effective?.title) {
|
|
62
63
|
querystring.sortable_indexes.effective.title = 'Publication date';
|
|
63
64
|
}
|
|
@@ -67,6 +68,13 @@ const RightModalFacets = (props) => {
|
|
|
67
68
|
if (querystring?.sortable_indexes?.modified?.title) {
|
|
68
69
|
querystring.sortable_indexes.modified.title = 'Last edited';
|
|
69
70
|
}
|
|
71
|
+
if (querystring?.sortable_indexes?.publication_date?.title) {
|
|
72
|
+
querystring.sortable_indexes.publication_date.title = 'Publication date';
|
|
73
|
+
}
|
|
74
|
+
if (querystring?.sortable_indexes?.version?.title) {
|
|
75
|
+
querystring.sortable_indexes.version.title = 'Version';
|
|
76
|
+
}
|
|
77
|
+
|
|
70
78
|
return (
|
|
71
79
|
<Grid className="searchBlock-facets right-column-facets" stackable>
|
|
72
80
|
{data?.headline && (
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useSelector } from 'react-redux';
|
|
2
2
|
import { Link } from 'react-router-dom';
|
|
3
|
-
import { Label } from 'semantic-ui-react';
|
|
4
|
-
import { Icon } from 'semantic-ui-react';
|
|
3
|
+
import { Icon, Label } from 'semantic-ui-react';
|
|
5
4
|
|
|
6
|
-
import { Icon as VoltoIcon } from '@plone/volto/components';
|
|
7
|
-
import { UniversalLink } from '@plone/volto/components';
|
|
8
|
-
import penSVG from '@plone/volto/icons/pen.svg';
|
|
9
5
|
import PlaceHolder from '@eeacms/volto-clms-theme/../theme/clms/img/ccl-thumbnail-placeholder.jpg';
|
|
10
6
|
import { cclDateFormat } from '@eeacms/volto-clms-theme/components/CclUtils';
|
|
7
|
+
import { UniversalLink, Icon as VoltoIcon } from '@plone/volto/components';
|
|
8
|
+
import penSVG from '@plone/volto/icons/pen.svg';
|
|
11
9
|
// import { When } from '@plone/volto/components/theme/View/EventDatesInfo';
|
|
12
10
|
import { When } from '@eeacms/volto-clms-theme/components/CclWhen/CclWhen';
|
|
13
11
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
@@ -15,6 +13,8 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
|
15
13
|
import { portal_types_labels } from '../Blocks/CustomTemplates/VoltoSearchBlock';
|
|
16
14
|
|
|
17
15
|
import PropTypes from 'prop-types';
|
|
16
|
+
import { FormattedMessage } from 'react-intl';
|
|
17
|
+
import CclLoginModal from '@eeacms/volto-clms-theme/components/CclLoginModal/CclLoginModal';
|
|
18
18
|
|
|
19
19
|
const CardImage = ({ card, size = 'preview', isCustomCard }) => {
|
|
20
20
|
return card?.image_field ? (
|
|
@@ -148,6 +148,9 @@ function CclCard(props) {
|
|
|
148
148
|
? 'line card-line-no-description'
|
|
149
149
|
: type || 'line');
|
|
150
150
|
|
|
151
|
+
const locale = useSelector((state) => state.intl.locale);
|
|
152
|
+
const isLoggedIn = useSelector((state) => state.userSession?.token);
|
|
153
|
+
|
|
151
154
|
return (
|
|
152
155
|
<CardLink
|
|
153
156
|
url={url}
|
|
@@ -338,6 +341,60 @@ function CclCard(props) {
|
|
|
338
341
|
<div className="card-description">{card?.description}</div>
|
|
339
342
|
)}
|
|
340
343
|
{children}
|
|
344
|
+
|
|
345
|
+
<div className="card-doc-extrametadata">
|
|
346
|
+
{card?.['@type'] === 'DataSet' && (
|
|
347
|
+
<>
|
|
348
|
+
<br />
|
|
349
|
+
<Link to={'/' + locale + '/map-viewer?dataset=' + card.UID}>
|
|
350
|
+
<FormattedMessage
|
|
351
|
+
id="View in the data viewer"
|
|
352
|
+
defaultMessage="View in the data viewer"
|
|
353
|
+
/>
|
|
354
|
+
</Link>
|
|
355
|
+
|
|
356
|
+
</>
|
|
357
|
+
)}
|
|
358
|
+
|
|
359
|
+
{card?.['@type'] === 'DataSet' && isLoggedIn && (
|
|
360
|
+
<>
|
|
361
|
+
<Link to={`${card['@id']}#download`}>
|
|
362
|
+
<FormattedMessage
|
|
363
|
+
id="Download"
|
|
364
|
+
defaultMessage="Download"
|
|
365
|
+
/>
|
|
366
|
+
</Link>
|
|
367
|
+
|
|
368
|
+
</>
|
|
369
|
+
)}
|
|
370
|
+
|
|
371
|
+
{card?.['@type'] === 'DataSet' && !isLoggedIn && (
|
|
372
|
+
<>
|
|
373
|
+
<CclLoginModal
|
|
374
|
+
otherPath={`${card['@id']}#download`}
|
|
375
|
+
triggerComponent={() => (
|
|
376
|
+
// eslint-disable-next-line jsx-a11y/anchor-is-valid
|
|
377
|
+
<Link>
|
|
378
|
+
<FormattedMessage
|
|
379
|
+
id="Download"
|
|
380
|
+
defaultMessage="Download"
|
|
381
|
+
/>
|
|
382
|
+
</Link>
|
|
383
|
+
)}
|
|
384
|
+
/>
|
|
385
|
+
|
|
386
|
+
</>
|
|
387
|
+
)}
|
|
388
|
+
|
|
389
|
+
{card?.['@type'] === 'DataSet' && (
|
|
390
|
+
<Link to={card['@id']}>
|
|
391
|
+
<FormattedMessage
|
|
392
|
+
id="View more"
|
|
393
|
+
defaultMessage="View more"
|
|
394
|
+
/>
|
|
395
|
+
</Link>
|
|
396
|
+
)}
|
|
397
|
+
</div>
|
|
341
398
|
</div>
|
|
342
399
|
</>
|
|
343
400
|
)}
|
|
@@ -13,6 +13,9 @@ describe('CclCard', () => {
|
|
|
13
13
|
create: {},
|
|
14
14
|
data: {},
|
|
15
15
|
},
|
|
16
|
+
userSession: {
|
|
17
|
+
token: 'xxxxx',
|
|
18
|
+
},
|
|
16
19
|
intl: {
|
|
17
20
|
locale: 'en',
|
|
18
21
|
messages: {},
|
|
@@ -80,11 +83,13 @@ describe('CclCard', () => {
|
|
|
80
83
|
it('Check news card', () => {
|
|
81
84
|
const cardtest = renderer
|
|
82
85
|
.create(
|
|
83
|
-
<
|
|
84
|
-
<
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
<Provider store={store}>
|
|
87
|
+
<MemoryRouter>
|
|
88
|
+
<CclCard type="news" card={card}>
|
|
89
|
+
<p>News card test</p>
|
|
90
|
+
</CclCard>
|
|
91
|
+
</MemoryRouter>
|
|
92
|
+
</Provider>,
|
|
88
93
|
)
|
|
89
94
|
.toJSON();
|
|
90
95
|
expect(cardtest).toBeDefined();
|
|
@@ -92,11 +97,13 @@ describe('CclCard', () => {
|
|
|
92
97
|
it('Check three collumns card', () => {
|
|
93
98
|
const cardtest = renderer
|
|
94
99
|
.create(
|
|
95
|
-
<
|
|
96
|
-
<
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
<Provider store={store}>
|
|
101
|
+
<MemoryRouter>
|
|
102
|
+
<CclCard type="threeColumns" card={card}>
|
|
103
|
+
<p>threeColumns card test</p>
|
|
104
|
+
</CclCard>
|
|
105
|
+
</MemoryRouter>
|
|
106
|
+
</Provider>,
|
|
100
107
|
)
|
|
101
108
|
.toJSON();
|
|
102
109
|
expect(cardtest).toBeDefined();
|
|
@@ -104,11 +111,13 @@ describe('CclCard', () => {
|
|
|
104
111
|
it('Check block card', () => {
|
|
105
112
|
const cardtest = renderer
|
|
106
113
|
.create(
|
|
107
|
-
<
|
|
108
|
-
<
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
|
|
114
|
+
<Provider store={store}>
|
|
115
|
+
<MemoryRouter>
|
|
116
|
+
<CclCard type="block" card={card}>
|
|
117
|
+
<p>Block card test</p>
|
|
118
|
+
</CclCard>
|
|
119
|
+
</MemoryRouter>
|
|
120
|
+
</Provider>,
|
|
112
121
|
)
|
|
113
122
|
.toJSON();
|
|
114
123
|
expect(cardtest).toBeDefined();
|
|
@@ -116,11 +125,13 @@ describe('CclCard', () => {
|
|
|
116
125
|
it('Check default card', () => {
|
|
117
126
|
const cardtest = renderer
|
|
118
127
|
.create(
|
|
119
|
-
<
|
|
120
|
-
<
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
128
|
+
<Provider store={store}>
|
|
129
|
+
<MemoryRouter>
|
|
130
|
+
<CclCard card={card}>
|
|
131
|
+
<p>Line card test</p>
|
|
132
|
+
</CclCard>
|
|
133
|
+
</MemoryRouter>
|
|
134
|
+
</Provider>,
|
|
124
135
|
)
|
|
125
136
|
.toJSON();
|
|
126
137
|
expect(cardtest).toBeDefined();
|
|
@@ -128,9 +139,11 @@ describe('CclCard', () => {
|
|
|
128
139
|
it('Check default values', () => {
|
|
129
140
|
const card = renderer
|
|
130
141
|
.create(
|
|
131
|
-
<
|
|
132
|
-
<
|
|
133
|
-
|
|
142
|
+
<Provider store={store}>
|
|
143
|
+
<MemoryRouter>
|
|
144
|
+
<CclCard />
|
|
145
|
+
</MemoryRouter>
|
|
146
|
+
</Provider>,
|
|
134
147
|
)
|
|
135
148
|
.toJSON();
|
|
136
149
|
expect(card).toBeDefined();
|
|
@@ -34,6 +34,13 @@ const ItemSchema = {
|
|
|
34
34
|
type: 'string',
|
|
35
35
|
default: '',
|
|
36
36
|
},
|
|
37
|
+
filter_static_legend_url: {
|
|
38
|
+
title: 'URL to static image legend used in filters',
|
|
39
|
+
description:
|
|
40
|
+
'If it is filled, the legend shown on the map when using filters will be the image behind the URL',
|
|
41
|
+
type: 'string',
|
|
42
|
+
default: '',
|
|
43
|
+
},
|
|
37
44
|
fields: {
|
|
38
45
|
title: 'Fields to be shown in the mapviewer',
|
|
39
46
|
description: 'Enter the JSON representing the fields',
|
|
@@ -51,6 +58,7 @@ const ItemSchema = {
|
|
|
51
58
|
'default_active',
|
|
52
59
|
'hide',
|
|
53
60
|
'static_legend_url',
|
|
61
|
+
'filter_static_legend_url',
|
|
54
62
|
'fields',
|
|
55
63
|
],
|
|
56
64
|
},
|