@eeacms/volto-clms-theme 1.1.96 → 1.1.98

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,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.98](https://github.com/eea/volto-clms-theme/compare/1.1.97...1.1.98) - 18 December 2023
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: change text [Mikel Larreategi - [`bac2b2a`](https://github.com/eea/volto-clms-theme/commit/bac2b2a58058f5c7d3cc2700f3f1c2d8661e5ebc)]
12
+
13
+ ### [1.1.97](https://github.com/eea/volto-clms-theme/compare/1.1.96...1.1.97) - 18 December 2023
14
+
15
+ #### :rocket: New Features
16
+
17
+ - feat: change download button name CLMS-2926 [Mikel Larreategi - [`1a1d693`](https://github.com/eea/volto-clms-theme/commit/1a1d693f0ee7613dfe7d824c9c594702550be31a)]
18
+
7
19
  ### [1.1.96](https://github.com/eea/volto-clms-theme/compare/1.1.95...1.1.96) - 15 December 2023
8
20
 
9
21
  #### :house: Internal changes
@@ -173,6 +185,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
173
185
 
174
186
  - to render nothing, return null [Mikel Larreategi - [`2fb3580`](https://github.com/eea/volto-clms-theme/commit/2fb35802b23e3aba5fd166aeefd103c929ffb5d1)]
175
187
  - simplify condtioin [Mikel Larreategi - [`f9b43da`](https://github.com/eea/volto-clms-theme/commit/f9b43da91d360e0028402f9a7ba762f16b0d9b22)]
188
+ - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`7c6e9ca`](https://github.com/eea/volto-clms-theme/commit/7c6e9cac9da0c06d0f24711303404f5055fba7d1)]
176
189
  ### [1.1.80](https://github.com/eea/volto-clms-theme/compare/1.1.79...1.1.80) - 17 November 2023
177
190
 
178
191
  #### :bug: Bug Fixes
@@ -183,6 +196,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
183
196
 
184
197
  #### :hammer_and_wrench: Others
185
198
 
199
+ - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`37c3299`](https://github.com/eea/volto-clms-theme/commit/37c3299dd19c95057e70d48152bfef2365f2416c)]
186
200
  - CLMS-2509 (Bug): Lint [Urkorue - [`1bbc011`](https://github.com/eea/volto-clms-theme/commit/1bbc011481c0ee1feb68d0cf57c4a5a9f4c224ca)]
187
201
  - CLMS-2509 (Bug): Timeseries icon centered [Urkorue - [`fc38685`](https://github.com/eea/volto-clms-theme/commit/fc3868598ab592f01bb3ee23f985ada5c11227d4)]
188
202
  ### [1.1.78](https://github.com/eea/volto-clms-theme/compare/1.1.77...1.1.78) - 16 November 2023
@@ -235,14 +249,17 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
235
249
 
236
250
  #### :hammer_and_wrench: Others
237
251
 
252
+ - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`c55db1c`](https://github.com/eea/volto-clms-theme/commit/c55db1c20cfef1eb34c587343a4822fa4bde3c54)]
238
253
  ### [1.1.73](https://github.com/eea/volto-clms-theme/compare/1.1.72...1.1.73) - 6 November 2023
239
254
 
240
255
  #### :hammer_and_wrench: Others
241
256
 
257
+ - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`3a543b9`](https://github.com/eea/volto-clms-theme/commit/3a543b9000c1168d54edfb8003eb08dfa7c85031)]
242
258
  - comment Integration tests [Ion Lizarazu - [`74713f8`](https://github.com/eea/volto-clms-theme/commit/74713f8f78d77ba193d8c27462cc8787d698ab81)]
243
259
  - uncomment cypress tests [Ion Lizarazu - [`3526a5c`](https://github.com/eea/volto-clms-theme/commit/3526a5c46481667b0518c6cce0927e67726c6f6c)]
244
260
  - use chrome instead of chromium to run cypress tests [Ion Lizarazu - [`6ae3a06`](https://github.com/eea/volto-clms-theme/commit/6ae3a06dbec1914c06a55c0dcb826c49b75f9739)]
245
261
  - ccltabs activeTab condition having first child [Ion Lizarazu - [`3cf9376`](https://github.com/eea/volto-clms-theme/commit/3cf9376d55f5f41b7e42c25e5925cd871ec71d81)]
262
+ - test: [JENKINS] Improve cypress time [valentinab25 - [`f41ecfe`](https://github.com/eea/volto-clms-theme/commit/f41ecfea8b5a1e409303ffcc7befe7f51316d652)]
246
263
  ### [1.1.72](https://github.com/eea/volto-clms-theme/compare/1.1.71...1.1.72) - 2 November 2023
247
264
 
248
265
  ### [1.1.71](https://github.com/eea/volto-clms-theme/compare/1.1.70...1.1.71) - 31 October 2023
@@ -253,6 +270,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
253
270
 
254
271
  #### :house: Internal changes
255
272
 
273
+ - chore: [JENKINS] Refactor automated testing [valentinab25 - [`67ca3bb`](https://github.com/eea/volto-clms-theme/commit/67ca3bb111f34842569c12b9c87a2a91bd14b09e)]
256
274
 
257
275
  #### :hammer_and_wrench: Others
258
276
 
@@ -349,6 +367,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
349
367
 
350
368
  - readme [Mikel Larreategi - [`3c0ab05`](https://github.com/eea/volto-clms-theme/commit/3c0ab051981a4efad7712bc46182eed9d79fd10f)]
351
369
  - remove from addons [Mikel Larreategi - [`89c2e7d`](https://github.com/eea/volto-clms-theme/commit/89c2e7d793193e6bb64642f0b06a01cd3c81108a)]
370
+ - yarn.lock added after running yarn [Unai - [`ad307be`](https://github.com/eea/volto-clms-theme/commit/ad307be72bbfe753f7571ea4d784a09978e0f7f2)]
352
371
  - prettier issue fix [Unai - [`8bc0650`](https://github.com/eea/volto-clms-theme/commit/8bc0650918f9fa1065d19d2c15ce153a5fc5abbb)]
353
372
  - set a limit of 5 items in the download queue [Mikel Larreategi - [`b81cc83`](https://github.com/eea/volto-clms-theme/commit/b81cc8383165bafbbff52fbeeb365d413051802e)]
354
373
  - adjust logo size [Mikel Larreategi - [`b90a72c`](https://github.com/eea/volto-clms-theme/commit/b90a72c07102025a7e90607b25d34611ddd4f4f6)]
@@ -490,6 +509,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
490
509
 
491
510
  - fix cart items concat function [Ion Lizarazu - [`4b72249`](https://github.com/eea/volto-clms-theme/commit/4b72249ef17a0cda22661809fce5be7c2d1f6649)]
492
511
  - revert Jenkinsfile [Ion Lizarazu - [`64f6cd0`](https://github.com/eea/volto-clms-theme/commit/64f6cd08100357843b507c00d3286d7debe0ef04)]
512
+ - yarn.lock file [Ion Lizarazu - [`8444ad1`](https://github.com/eea/volto-clms-theme/commit/8444ad1606b3939e4609bdd186e5ace2252588a8)]
493
513
  - packages.json versions order [Ion Lizarazu - [`4fd7a86`](https://github.com/eea/volto-clms-theme/commit/4fd7a86ab43238841b421e1ed10ebd52ab420a15)]
494
514
  - downloadablefilestablewidget param modification [Ion Lizarazu - [`5dd794a`](https://github.com/eea/volto-clms-theme/commit/5dd794a33a8eddd042a753b7ab47e7d2a323b011)]
495
515
  - add technical_documents_accordion_text field to the dataset view [Ion Lizarazu - [`96ed1e5`](https://github.com/eea/volto-clms-theme/commit/96ed1e5e2c2b501bd303bc76b333a70ad1614c16)]
@@ -614,6 +634,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
614
634
 
615
635
  - remove NUTS text for area naming in the cart [ionlizarazu - [`062e0a3`](https://github.com/eea/volto-clms-theme/commit/062e0a375f5352bc13c18ff7ec33fad4bcc59f2f)]
616
636
  - dependencies [ionlizarazu - [`405ef96`](https://github.com/eea/volto-clms-theme/commit/405ef96090fe7bd4af73a49d3285a92fad712e3b)]
637
+ - yarn.lock [ionlizarazu - [`7132119`](https://github.com/eea/volto-clms-theme/commit/71321195c4dd4fceed67f2f0872f3e24bba61c17)]
617
638
  - volto-blocks-grid module mapping [ionlizarazu - [`4fec3ca`](https://github.com/eea/volto-clms-theme/commit/4fec3cabc437322ad92ed90d682250bd123ccaaf)]
618
639
  - volto-blocks-grid v7.0.2 [ionlizarazu - [`2557e60`](https://github.com/eea/volto-clms-theme/commit/2557e6039d3cea33ca0bd11a0a3ef4764c611f78)]
619
640
  - remove styling from teaser block [ionlizarazu - [`879e684`](https://github.com/eea/volto-clms-theme/commit/879e684057c88f52f60f0fa54cbaa155c7d14688)]
@@ -701,6 +722,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
701
722
 
702
723
  #### :house: Internal changes
703
724
 
725
+ - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`b4cbf65`](https://github.com/eea/volto-clms-theme/commit/b4cbf6557fbc67f7fc4cea5aa2cb19804f3d7e3c)]
704
726
 
705
727
  #### :hammer_and_wrench: Others
706
728
 
@@ -1899,6 +1921,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1899
1921
  #### :hammer_and_wrench: Others
1900
1922
 
1901
1923
  - 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)]
1924
+ - Revert "[JENKINS] Use eeacms/plone-backend and Volto alpha version- Refs #151967" [Mikel Larreategi - [`46eb694`](https://github.com/eea/volto-clms-theme/commit/46eb69415280a3c982405299135027ae4221426a)]
1902
1925
  - 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)]
1903
1926
  - lint fix [Unai - [`1264a7a`](https://github.com/eea/volto-clms-theme/commit/1264a7adfe8d679fea1bd821ad087add20f4271d)]
1904
1927
  - 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)]
@@ -2049,6 +2072,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2049
2072
  - search block new features [ionlizarazu - [`8e814cb`](https://github.com/eea/volto-clms-theme/commit/8e814cbd359782540c21fe37b37ef146d331f0d6)]
2050
2073
  - language selector cookie management [ionlizarazu - [`1385ac9`](https://github.com/eea/volto-clms-theme/commit/1385ac95795702206d3623ba6e780faa43a89e0a)]
2051
2074
  - toolbar cookie management [ionlizarazu - [`5c23200`](https://github.com/eea/volto-clms-theme/commit/5c23200790b20e1d4f1bc966463c37bf4c808f47)]
2075
+ - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`0316a0d`](https://github.com/eea/volto-clms-theme/commit/0316a0d8b6fb0fa14af13002415f3c95d9f8ede3)]
2052
2076
  ### [1.0.84](https://github.com/eea/volto-clms-theme/compare/1.0.83...1.0.84) - 18 March 2022
2053
2077
 
2054
2078
  #### :hammer_and_wrench: Others
@@ -2953,11 +2977,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2953
2977
  #### :hammer_and_wrench: Others
2954
2978
 
2955
2979
  - replace @collective/volto-dropdownmenu with volto-dropdownmenu [ionlizarazu - [`07f004f`](https://github.com/eea/volto-clms-theme/commit/07f004fe0219e403fb51bc045c83d34f3b981f76)]
2980
+ - yarn.lock [ionlizarazu - [`fe1ca04`](https://github.com/eea/volto-clms-theme/commit/fe1ca04889d29fe7b653db4c69af2751b84b8a1a)]
2956
2981
  - add NODE_ENV parameter [ionlizarazu - [`101f27c`](https://github.com/eea/volto-clms-theme/commit/101f27c25b8fbd192e1b11865e95cf5ffee08c1b)]
2957
2982
  - upgrade volto-dropdownmenu version [ionlizarazu - [`2081855`](https://github.com/eea/volto-clms-theme/commit/2081855301f4c708776e0dbab39db143cee00dbc)]
2958
2983
  - HomeSearch block missing url behaviour [ionlizarazu - [`d20a378`](https://github.com/eea/volto-clms-theme/commit/d20a378ce3f254b8343692348f314bf281974542)]
2959
2984
  - babel configuration [ionlizarazu - [`203ea2d`](https://github.com/eea/volto-clms-theme/commit/203ea2de07f99ca3403e4ca220ca74d7ce69b61d)]
2960
2985
  - prettier [ionlizarazu - [`e79e26b`](https://github.com/eea/volto-clms-theme/commit/e79e26bf2fa40ba7b4eb53a24dabd87928221c28)]
2986
+ - add yarn lock [ionlizarazu - [`e1ab28b`](https://github.com/eea/volto-clms-theme/commit/e1ab28b060d5a74431c368b0de82a68dabce1eab)]
2961
2987
  - Jenkinsfile cypress test [ionlizarazu - [`b385d65`](https://github.com/eea/volto-clms-theme/commit/b385d65986f717c60f8c434a08fc11b829d08eb4)]
2962
2988
  - cypress [ionlizarazu - [`a243cf0`](https://github.com/eea/volto-clms-theme/commit/a243cf0182fa3dd113c16ff495c71e310252d83b)]
2963
2989
  - some fixes [ionlizarazu - [`046279b`](https://github.com/eea/volto-clms-theme/commit/046279b9d05bea8a64eca03eed493e02621534c9)]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.1.96",
3
+ "version": "1.1.98",
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",
@@ -355,7 +355,7 @@ const CLMSCartContent = (props) => {
355
355
  <strong>Format: </strong>{' '}
356
356
  <UniversalLink href="/en/faq/download/need-information-about-the-file-formats">
357
357
  <Popup
358
- content="Explore Formats details and coordinate systems with a click."
358
+ content="Explore Formats details with a click."
359
359
  trigger={
360
360
  <FontAwesomeIcon
361
361
  color="#000000"
@@ -448,6 +448,10 @@ const CLMSCartContent = (props) => {
448
448
  datasetTimeseries.datasets[item?.dataset_uid]
449
449
  .period
450
450
  }
451
+ download_limit_temporal_extent={
452
+ datasetTimeseries.datasets[item?.dataset_uid]
453
+ .download_limit_temporal_extent
454
+ }
451
455
  item={item}
452
456
  setTimeseriesValue={setTimeseriesValue}
453
457
  />
@@ -589,7 +593,7 @@ const CLMSCartContent = (props) => {
589
593
  cartSelection.length === 0 || tooManyInQueue || tooManySelected()
590
594
  }
591
595
  >
592
- Start downloading
596
+ Process Download Request
593
597
  </CclButton>
594
598
  </>
595
599
  )}
@@ -8,7 +8,13 @@ import { cclDateFormat } from '@eeacms/volto-clms-theme/components/CclUtils';
8
8
  import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
9
9
 
10
10
  export const TimeseriesPicker = (props) => {
11
- const { start, end, item, setTimeseriesValue } = props;
11
+ const {
12
+ start,
13
+ end,
14
+ item,
15
+ download_limit_temporal_extent,
16
+ setTimeseriesValue,
17
+ } = props;
12
18
  const [startValue, setStartValue] = useState(
13
19
  item?.TemporalFilter?.StartDate
14
20
  ? new Date(cclDateFormat(item.TemporalFilter.StartDate))
@@ -20,82 +26,12 @@ export const TimeseriesPicker = (props) => {
20
26
  : null,
21
27
  );
22
28
  const [isOpen, setIsOpen] = useState(false);
23
- const daysrestriction = item.name.includes('10-daily')
24
- ? 'month'
25
- : item.name.includes('daily')
26
- ? 'week'
27
- : 'year';
28
29
 
29
- const monthDiff = (d1, d2) => {
30
- var months;
31
- months = (d2.getFullYear() - d1.getFullYear()) * 12;
32
- months -= d1.getMonth();
33
- months += d2.getMonth();
34
- return months <= 0 ? 0 : months;
35
- };
36
-
37
- const isLeptYear = (year) => {
38
- return year % 400 === 0 ? true : year % 100 === 0 ? false : year % 4 === 0;
39
- };
40
-
41
- const validDaysDifference = (value) => {
42
- const periocity = item.name.includes('10-daily')
43
- ? 1
44
- : item.name.includes('daily')
45
- ? 7
46
- : 1;
47
- let validValue = false;
48
- const diffTime = Math.abs(
49
- new Date(value['EndDate']) - new Date(value['StartDate']),
50
- );
51
- const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
52
- const diffMonths = monthDiff(
53
- new Date(value['StartDate']),
54
- new Date(value['EndDate']),
55
- );
56
- const diffYears =
57
- new Date(value['EndDate']).getFullYear() -
58
- new Date(value['StartDate']).getFullYear();
59
- if (daysrestriction === 'week' && diffDays < periocity) {
60
- validValue = true;
61
- } else if (daysrestriction === 'month' && diffMonths <= periocity) {
62
- const startDate = new Date(value['StartDate']);
63
- const startDateMonth = startDate.getMonth();
64
- if (
65
- (startDateMonth === 3 ||
66
- startDateMonth === 5 ||
67
- startDateMonth === 8 ||
68
- startDateMonth === 10) &&
69
- diffDays <= 30
70
- )
71
- validValue = true;
72
- else if (
73
- startDateMonth === 1 &&
74
- isLeptYear(startDate.getFullYear()) &&
75
- diffDays <= 29
76
- )
77
- validValue = true;
78
- else if (startDateMonth === 1 && diffDays <= 28) validValue = true;
79
- else if (
80
- startDateMonth !== 1 &&
81
- startDateMonth !== 3 &&
82
- startDateMonth !== 5 &&
83
- startDateMonth !== 8 &&
84
- startDateMonth !== 10 &&
85
- diffDays <= 31
86
- )
87
- validValue = true;
88
- } else if (daysrestriction === 'year' && diffYears <= periocity) {
89
- const startDate = new Date(value['StartDate']);
90
- if (
91
- isLeptYear(startDate.getFullYear()) &&
92
- startDate.getMonth() < 2 &&
93
- diffDays <= 366
94
- )
95
- validValue = true;
96
- else if (diffDays <= 365) validValue = true;
97
- }
98
- return validValue;
30
+ const isValidDateRange = ({ start, end, limit }) => {
31
+ /* Calculate if the difference in days is smaller than the allowed limit */
32
+ const oneDay = 24 * 60 * 60 * 1000; // hours*minutes*seconds*milliseconds
33
+ const diffDays = Math.round(Math.abs((start - end) / oneDay));
34
+ return diffDays <= limit;
99
35
  };
100
36
 
101
37
  return (
@@ -170,11 +106,17 @@ export const TimeseriesPicker = (props) => {
170
106
  Click the start and end dates, and then apply.
171
107
  {(!startValue ||
172
108
  !endValue ||
173
- !validDaysDifference({
174
- StartDate: startValue,
175
- EndDate: endValue,
109
+ !isValidDateRange({
110
+ start: startValue,
111
+ end: endValue,
112
+ limit: download_limit_temporal_extent,
176
113
  })) && (
177
- <span> Allowed time range of 1 {daysrestriction}. </span>
114
+ <span>
115
+ {' '}
116
+ Allowed time range of {
117
+ download_limit_temporal_extent
118
+ } days.{' '}
119
+ </span>
178
120
  )}
179
121
  <CclButton
180
122
  isButton={true}
@@ -183,9 +125,10 @@ export const TimeseriesPicker = (props) => {
183
125
  startValue?.getTime() > endValue?.getTime() ||
184
126
  !startValue ||
185
127
  !endValue ||
186
- !validDaysDifference({
187
- StartDate: startValue,
188
- EndDate: endValue,
128
+ !isValidDateRange({
129
+ start: startValue,
130
+ end: endValue,
131
+ limit: download_limit_temporal_extent,
189
132
  })
190
133
  }
191
134
  onClick={() => {