@eeacms/volto-clms-theme 1.0.139 → 1.0.141
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 +20 -0
- package/package.json +1 -1
- package/src/components/Blocks/CustomTemplates/VoltoListingBlock/CclListingCards.jsx +2 -1
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/rewriteOptions.js +17 -0
- package/src/components/Blocks/customBlocks.js +1 -0
- package/src/components/CclCard/CclCard.jsx +7 -1
- package/src/customizations/volto-form-block/components/Field.jsx +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,26 @@ 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.141](https://github.com/eea/volto-clms-theme/compare/1.0.140...1.0.141) - 7 November 2022
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix: remove No value on required selections at volto-form-block [ionlizarazu - [`a3b8731`](https://github.com/eea/volto-clms-theme/commit/a3b87310b724ea6b236fd6ce9cf3c34cfda076f2)]
|
|
12
|
+
- fix: volto-form-block config [ionlizarazu - [`4db7214`](https://github.com/eea/volto-clms-theme/commit/4db7214b00a3613c1e8e461c620bba3890469b98)]
|
|
13
|
+
|
|
14
|
+
### [1.0.140](https://github.com/eea/volto-clms-theme/compare/1.0.139...1.0.140) - 7 November 2022
|
|
15
|
+
|
|
16
|
+
#### :bug: Bug Fixes
|
|
17
|
+
|
|
18
|
+
- fix: use UniversalLink to render the final link, and include the download url of the file [Mikel Larreategi - [`8a490db`](https://github.com/eea/volto-clms-theme/commit/8a490db836f72e1330aa2e22db5e8222fd7dbc53)]
|
|
19
|
+
|
|
20
|
+
#### :house: Internal changes
|
|
21
|
+
|
|
22
|
+
- chore: use UniversalLink [Mikel Larreategi - [`f304971`](https://github.com/eea/volto-clms-theme/commit/f304971e4d555dd16498ceccc5ff43586d81626b)]
|
|
23
|
+
|
|
24
|
+
#### :hammer_and_wrench: Others
|
|
25
|
+
|
|
26
|
+
- new sorting for geographical classification facet [Mikel Larreategi - [`4faaa55`](https://github.com/eea/volto-clms-theme/commit/4faaa55ac2bc2bd8b783d929b30faffa025bae38)]
|
|
7
27
|
### [1.0.139](https://github.com/eea/volto-clms-theme/compare/1.0.138...1.0.139) - 4 November 2022
|
|
8
28
|
|
|
9
29
|
#### :bug: Bug Fixes
|
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ import { flattenToAppURL } from '@plone/volto/helpers';
|
|
|
5
5
|
|
|
6
6
|
import { isInternalURL } from '@plone/volto/helpers/Url/Url';
|
|
7
7
|
import { useSelector } from 'react-redux';
|
|
8
|
+
import { UniversalLink } from '@plone/volto/components';
|
|
8
9
|
|
|
9
10
|
import CclCard from '@eeacms/volto-clms-theme/components/CclCard/CclCard';
|
|
10
11
|
|
|
@@ -27,7 +28,7 @@ const CclListingCards = (props) => {
|
|
|
27
28
|
</ConditionalLink>
|
|
28
29
|
);
|
|
29
30
|
} else if (href) {
|
|
30
|
-
link = <
|
|
31
|
+
link = <UniversalLink href={href}>{linkTitle || href}</UniversalLink>;
|
|
31
32
|
}
|
|
32
33
|
let containerClass = '';
|
|
33
34
|
if (['news', 'event'].includes(variation)) {
|
|
@@ -52,6 +52,13 @@ const rewriteOptions = (name, choices) => {
|
|
|
52
52
|
'Document',
|
|
53
53
|
];
|
|
54
54
|
|
|
55
|
+
const dataset_geographical_classification = [
|
|
56
|
+
'EEA',
|
|
57
|
+
'Northern hemisphere',
|
|
58
|
+
'Southern hemisphere',
|
|
59
|
+
'Global',
|
|
60
|
+
];
|
|
61
|
+
|
|
55
62
|
if (name === 'portal_type') {
|
|
56
63
|
result = choices
|
|
57
64
|
.filter((opt) => portal_types.includes(opt.value))
|
|
@@ -114,6 +121,16 @@ const rewriteOptions = (name, choices) => {
|
|
|
114
121
|
return 0;
|
|
115
122
|
});
|
|
116
123
|
}
|
|
124
|
+
|
|
125
|
+
if (name === 'dataset_geographical_classification') {
|
|
126
|
+
result = choices.sort((a, b) => {
|
|
127
|
+
return (
|
|
128
|
+
dataset_geographical_classification.indexOf(a.value) -
|
|
129
|
+
dataset_geographical_classification.indexOf(b.value)
|
|
130
|
+
);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
117
134
|
return result;
|
|
118
135
|
};
|
|
119
136
|
|
|
@@ -507,6 +507,7 @@ const customBlocks = (config) => ({
|
|
|
507
507
|
view: FormCustomView,
|
|
508
508
|
fieldSchema: customIdFieldSchema,
|
|
509
509
|
fieldTypeSchemaExtenders: {
|
|
510
|
+
...config.blocks.blocksConfig.form.fieldTypeSchemaExtenders,
|
|
510
511
|
checkbox_html: CheckboxSchemaExtender,
|
|
511
512
|
},
|
|
512
513
|
additionalFields: [
|
|
@@ -13,6 +13,7 @@ import { Icon as VoltoIcon } from '@plone/volto/components';
|
|
|
13
13
|
|
|
14
14
|
import PlaceHolder from '@eeacms/volto-clms-theme/../theme/clms/img/ccl-thumbnail-placeholder.jpg';
|
|
15
15
|
import { cclDateFormat } from '@eeacms/volto-clms-theme/components/CclUtils';
|
|
16
|
+
import { UniversalLink } from '@plone/volto/components';
|
|
16
17
|
|
|
17
18
|
const CardImage = ({ card, size = 'preview', isCustomCard }) => {
|
|
18
19
|
return card?.image_field ? (
|
|
@@ -142,7 +143,12 @@ function CclCard(props) {
|
|
|
142
143
|
</div>
|
|
143
144
|
<div className="card-text">
|
|
144
145
|
<div className="card-file-title">
|
|
145
|
-
<
|
|
146
|
+
<UniversalLink
|
|
147
|
+
openLinkInNewTab={true}
|
|
148
|
+
href={url + '/@@download/file'}
|
|
149
|
+
>
|
|
150
|
+
{card?.title}
|
|
151
|
+
</UniversalLink>
|
|
146
152
|
</div>
|
|
147
153
|
{showDates && (
|
|
148
154
|
<div className="card-file-date">
|