@eeacms/volto-clms-theme 1.1.27 → 1.1.28
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,11 +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.
|
|
7
|
+
### [1.1.28](https://github.com/eea/volto-clms-theme/compare/1.1.27...1.1.28) - 14 July 2023
|
|
8
8
|
|
|
9
9
|
#### :hammer_and_wrench: Others
|
|
10
10
|
|
|
11
|
-
-
|
|
11
|
+
- add a new related items variation, using a direct query [Mikel Larreategi - [`708f32f`](https://github.com/eea/volto-clms-theme/commit/708f32fe10e75a159c10bda3401a406b7dab6d91)]
|
|
12
|
+
### [1.1.27](https://github.com/eea/volto-clms-theme/compare/1.1.26...1.1.27) - 14 July 2023
|
|
13
|
+
|
|
12
14
|
### [1.1.26](https://github.com/eea/volto-clms-theme/compare/1.1.25...1.1.26) - 14 July 2023
|
|
13
15
|
|
|
14
16
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -17,6 +17,8 @@ const CclRelatedListingView = (props) => {
|
|
|
17
17
|
properties,
|
|
18
18
|
metadata,
|
|
19
19
|
associated_elements = 'products',
|
|
20
|
+
directQuery = {},
|
|
21
|
+
directRelation = false,
|
|
20
22
|
searchParamsExecution = () => {},
|
|
21
23
|
} = props;
|
|
22
24
|
const use_pagination = useFilteredPagination(
|
|
@@ -34,10 +36,13 @@ const CclRelatedListingView = (props) => {
|
|
|
34
36
|
(state) => state.search.subrequests?.[id],
|
|
35
37
|
);
|
|
36
38
|
const uid = metadata ? metadata['UID'] : properties['UID'];
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
|
|
40
|
+
const associated = directRelation
|
|
41
|
+
? directQuery
|
|
42
|
+
: associated_elements === 'products'
|
|
43
|
+
? { associated_products: uid }
|
|
44
|
+
: { associated_datasets: uid };
|
|
45
|
+
|
|
41
46
|
let libraries = searchSubrequests?.items || [];
|
|
42
47
|
const variationsConfig =
|
|
43
48
|
config.blocks.blocksConfig['relatedListing'].variations;
|
|
@@ -370,7 +370,11 @@ const DataSetInfoContent = (props) => {
|
|
|
370
370
|
variation: 'CclCardsdoc',
|
|
371
371
|
content_type: 'DataSet',
|
|
372
372
|
}}
|
|
373
|
-
associated_elements="
|
|
373
|
+
associated_elements="datasets"
|
|
374
|
+
directRelation={true}
|
|
375
|
+
directQuery={{
|
|
376
|
+
UID: props.datasets.map((item) => item.token),
|
|
377
|
+
}}
|
|
374
378
|
searchParamsExecution={() => {
|
|
375
379
|
const newIndex =
|
|
376
380
|
activeIndex.indexOf(1) === -1
|