@eeacms/volto-clms-theme 1.1.213 → 1.1.215
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,13 @@ 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.215](https://github.com/eea/volto-clms-theme/compare/1.1.214...1.1.215) - 24 February 2025
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Refs #284774 - CclRelatedListingBlock, add Item batch size field, number, default 20. [GhitaB - [`24b030b`](https://github.com/eea/volto-clms-theme/commit/24b030b1137d9a123916a8f4481069f99edabfca)]
|
|
12
|
+
### [1.1.214](https://github.com/eea/volto-clms-theme/compare/1.1.213...1.1.214) - 21 February 2025
|
|
13
|
+
|
|
7
14
|
### [1.1.213](https://github.com/eea/volto-clms-theme/compare/1.1.212...1.1.213) - 20 February 2025
|
|
8
15
|
|
|
9
16
|
#### :bug: Bug Fixes
|
package/package.json
CHANGED
|
@@ -22,9 +22,11 @@ const CclRelatedListingView = (props) => {
|
|
|
22
22
|
directRelation = false,
|
|
23
23
|
searchParamsExecution = () => {},
|
|
24
24
|
} = props;
|
|
25
|
+
|
|
26
|
+
const items_per_page = data.item_batch_size || 20;
|
|
25
27
|
const use_pagination = useFilteredPagination(
|
|
26
28
|
[],
|
|
27
|
-
|
|
29
|
+
items_per_page,
|
|
28
30
|
id,
|
|
29
31
|
searchParamsExecution,
|
|
30
32
|
);
|
|
@@ -15,7 +15,7 @@ const Schema = (props) => {
|
|
|
15
15
|
{
|
|
16
16
|
id: 'default',
|
|
17
17
|
title: 'Default',
|
|
18
|
-
fields: ['content_type', 'variation'],
|
|
18
|
+
fields: ['content_type', 'variation', 'item_batch_size'],
|
|
19
19
|
},
|
|
20
20
|
],
|
|
21
21
|
properties: {
|
|
@@ -27,6 +27,13 @@ const Schema = (props) => {
|
|
|
27
27
|
title: 'Variation',
|
|
28
28
|
choices: [...variations],
|
|
29
29
|
},
|
|
30
|
+
item_batch_size: {
|
|
31
|
+
title: 'Item batch size',
|
|
32
|
+
type: 'number',
|
|
33
|
+
minimum: 0,
|
|
34
|
+
maximum: 10000,
|
|
35
|
+
default: 20,
|
|
36
|
+
},
|
|
30
37
|
},
|
|
31
38
|
required: [],
|
|
32
39
|
};
|
|
@@ -27,12 +27,13 @@ export const TimeseriesPicker = (props) => {
|
|
|
27
27
|
: null,
|
|
28
28
|
);
|
|
29
29
|
const [isOpen, setIsOpen] = useState(false);
|
|
30
|
+
const [datesApplied, setDatesApplied] = useState(false);
|
|
30
31
|
|
|
31
32
|
const isValidDateRange = ({ start, end, limit }) => {
|
|
32
33
|
/* Calculate if the difference in days is smaller than the allowed limit */
|
|
33
34
|
const oneDay = 24 * 60 * 60 * 1000; // hours*minutes*seconds*milliseconds
|
|
34
35
|
const diffDays = Math.round(Math.abs((start - end) / oneDay));
|
|
35
|
-
return diffDays
|
|
36
|
+
return diffDays <= limit;
|
|
36
37
|
};
|
|
37
38
|
const dates_array = data_arrays?.map((e) => new Date(e));
|
|
38
39
|
return (
|
|
@@ -61,7 +62,7 @@ export const TimeseriesPicker = (props) => {
|
|
|
61
62
|
<Icon name={calendarSVG} size={25} />
|
|
62
63
|
<br />
|
|
63
64
|
<span>
|
|
64
|
-
{item.TemporalFilter
|
|
65
|
+
{item.TemporalFilter && datesApplied
|
|
65
66
|
? `${cclDateFormat(
|
|
66
67
|
item.TemporalFilter.StartDate,
|
|
67
68
|
)}-${cclDateFormat(item.TemporalFilter.EndDate)}`
|
|
@@ -202,6 +203,7 @@ export const TimeseriesPicker = (props) => {
|
|
|
202
203
|
StartDate: startValue,
|
|
203
204
|
EndDate: endValue,
|
|
204
205
|
});
|
|
206
|
+
setDatesApplied(true);
|
|
205
207
|
setIsOpen(false);
|
|
206
208
|
}}
|
|
207
209
|
>
|