@eeacms/volto-clms-theme 1.0.119 → 1.0.122

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +68 -4
  2. package/package.json +2 -2
  3. package/src/components/Blocks/CclHomeBgImageBlock/CclGreenBgView.jsx +2 -0
  4. package/src/components/Blocks/CclTextLinkCarouselBlock/CclTextLinkCarouselView.jsx +9 -1
  5. package/src/components/Blocks/CustomTemplates/VoltoFormBlock/CheckboxHtmlWidget.jsx +97 -0
  6. package/src/components/Blocks/CustomTemplates/VoltoFormBlock/CheckboxSchemaExtender.js +22 -0
  7. package/src/components/Blocks/CustomTemplates/VoltoFormBlock/customIdFieldSchema.js +13 -35
  8. package/src/components/Blocks/CustomTemplates/VoltoFormBlock/index.js +11 -0
  9. package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/FilterList.jsx +42 -3
  10. package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/SearchInput.jsx +1 -0
  11. package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/rewriteOptions.js +11 -1
  12. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/custom.less +2 -1
  13. package/src/components/Blocks/customBlocks.js +14 -2
  14. package/src/components/CLMSDatasetDetailView/CLMSDatasetDetailView.jsx +4 -6
  15. package/src/components/CLMSDatasetDetailView/DataSetInfoContent.jsx +4 -15
  16. package/src/components/CLMSDatasetDetailView/DownloadDataSetContent.jsx +7 -1
  17. package/src/components/CLMSDatasetDetailView/RelatedUseCases.jsx +1 -1
  18. package/src/components/CLMSDownloadCartView/CLMSCartContent.jsx +1 -1
  19. package/src/components/CLMSMeetingView/CLMSMeetingView.jsx +8 -93
  20. package/src/components/CLMSNewsItemView/CLMSNewsItemView.jsx +0 -75
  21. package/src/components/CLMSSubscriptionView/SubscriptionView.jsx +2 -2
  22. package/src/components/CclCard/CclCard.jsx +28 -22
  23. package/src/components/CclCard/cards.less +12 -12
  24. package/src/components/CclLoginModal/CclLoginModal.jsx +3 -6
  25. package/src/components/CclTab/CclTabs.jsx +3 -1
  26. package/src/components/Widgets/ImageWidget.jsx +8 -6
  27. package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +10 -16
  28. package/src/customizations/volto/components/manage/Widgets/ArrayWidget.jsx +413 -0
  29. package/src/customizations/volto-form-block/components/Field.jsx +261 -0
  30. package/src/index.js +16 -0
  31. package/theme/clms/css/carousel.css +2 -4
  32. package/theme/clms/css/forms.css +10 -0
  33. package/theme/clms/css/home.css +1 -2
  34. package/theme/clms/css/maps.less +8 -1
  35. package/theme/clms/css/styles.less +20 -1
  36. package/theme/clms/css/volto-block-style-override.css +7 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,74 @@ 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.122](https://github.com/eea/volto-clms-theme/compare/1.0.121...1.0.122) - 12 September 2022
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: show effective, but if there is no effective, show the creation date [Mikel Larreategi - [`a5fcda7`](https://github.com/eea/volto-clms-theme/commit/a5fcda7fdeee90958332b1ecd67815f6c7acebae)]
12
+
13
+ #### :bug: Bug Fixes
14
+
15
+ - fix: dataset view loaded when accessing from catalogue [Unai - [`75a311b`](https://github.com/eea/volto-clms-theme/commit/75a311bbb38edd754421ea59ae421789db14a389)]
16
+ - fix: technnical library searched in main dataset page [Unai - [`d6c9f92`](https://github.com/eea/volto-clms-theme/commit/d6c9f925018d1209569564ac92c7ebcbca43a08b)]
17
+ - fix: external url opens in new tab [Unai - [`89f6db0`](https://github.com/eea/volto-clms-theme/commit/89f6db08b8a38f535469f293c9eaf5720968b5d3)]
18
+ - fix: error on image widget fixed [Unai - [`9c56bf8`](https://github.com/eea/volto-clms-theme/commit/9c56bf86a023b97744b8cdcce3c032c434947563)]
19
+ - fix: CLMS-1158 sort gement vocabulary alphabetically with lowercase [Mikel Larreategi - [`195d7d2`](https://github.com/eea/volto-clms-theme/commit/195d7d22d2ebd816612022f720c99dee31116307)]
20
+
21
+ #### :hammer_and_wrench: Others
22
+
23
+ - fix typo [Mikel Larreategi - [`21352f9`](https://github.com/eea/volto-clms-theme/commit/21352f97672beda66b626ae00614d2437a7d37ad)]
24
+ - fix typo [Mikel Larreategi - [`dcac8e4`](https://github.com/eea/volto-clms-theme/commit/dcac8e4377ef6d2035b22ff21141259e440eabda)]
25
+ - ESLint fix [rodriama - [`176abac`](https://github.com/eea/volto-clms-theme/commit/176abac31f7bb32024d7538655d418654a78ad49)]
26
+ - ESLint fix [rodriama - [`5931a21`](https://github.com/eea/volto-clms-theme/commit/5931a21ebfbcdbc09d0e325acfa3dff4c60d93e7)]
27
+ - Carousel text link width [rodriama - [`744a222`](https://github.com/eea/volto-clms-theme/commit/744a222ef381062a9bc62394ef9f5b3037d19533)]
28
+ - Pre-packaged and cart table styles [rodriama - [`7997b90`](https://github.com/eea/volto-clms-theme/commit/7997b90146423b976ba7939fda37458b561b0cc9)]
29
+ - Pre-package message styles [rodriama - [`36ca58f`](https://github.com/eea/volto-clms-theme/commit/36ca58f5d210dda93b3d0ffe27bf0a816871c926)]
30
+ - li bullet [rodriama - [`5395ea9`](https://github.com/eea/volto-clms-theme/commit/5395ea940f1dcd3512d08fc961a0207eea2baddb)]
31
+ - Revert "Revert "refactor(widget): changed used widget in datetime cases"" [Mikel Larreategi - [`f2a0399`](https://github.com/eea/volto-clms-theme/commit/f2a03991691db758b568e58cc6abb9fa196fcbb1)]
32
+ - Revert "Revert "refactor(meeting): changed from Meeting Registration to Event Registration"" [Mikel Larreategi - [`cb56508`](https://github.com/eea/volto-clms-theme/commit/cb56508a9eff001226e85e78674d2b2ef9b537df)]
33
+ - Revert "Revert "refactor(news events and datasets): remove related datasets and product accordions from news and events and replaced image scale used in datasets"" [Mikel Larreategi - [`cb35423`](https://github.com/eea/volto-clms-theme/commit/cb354230d1aca5e62acbce62f0ce2a5df7c02be9)]
34
+ - Revert "Revert "new version of volto-form-block and modifications to add links to checkbox description"" [Mikel Larreategi - [`33a222a`](https://github.com/eea/volto-clms-theme/commit/33a222a38d74c95e8c706fce69a0334cf3c4f4e6)]
35
+ - Revert "Revert "fix: CLMS-1067"" [Mikel Larreategi - [`a790c1f`](https://github.com/eea/volto-clms-theme/commit/a790c1f6f3fb9e18666ad1e2b53fad7e86c7c0e0)]
36
+ - Revert "Revert "fix: display the dropdown above the footer"" [Mikel Larreategi - [`f436e66`](https://github.com/eea/volto-clms-theme/commit/f436e66b58070f7f3c59ae22968b032fbc72b690)]
37
+ - bugfixes [ionlizarazu - [`a2d3ba0`](https://github.com/eea/volto-clms-theme/commit/a2d3ba044a21ca6d1c8f2af8a8b4889477c994c5)]
38
+ - bugfixes [ionlizarazu - [`0e2e7f7`](https://github.com/eea/volto-clms-theme/commit/0e2e7f738adae529217562cb11872cb12d1530bd)]
39
+ ### [1.0.121](https://github.com/eea/volto-clms-theme/compare/1.0.120...1.0.121) - 5 September 2022
40
+
41
+ #### :bug: Bug Fixes
42
+
43
+ - fix: CLMS-1224 this file should be removed with volto-16 [Unai - [`7cf72ab`](https://github.com/eea/volto-clms-theme/commit/7cf72aba7b1d69cf1b310a89410aa3a3753f01f3)]
44
+ - fix:lint problems [Unai - [`4e8b9dc`](https://github.com/eea/volto-clms-theme/commit/4e8b9dc6c3cb6813baeb4b75fea5afb1198d9640)]
45
+ - fix: not count children filters on checboxParentFacets [ionlizarazu - [`4b21b1c`](https://github.com/eea/volto-clms-theme/commit/4b21b1c3337e132248ad1ada6a9bf268c5332579)]
46
+ - fix: related use cases [Unai - [`381af05`](https://github.com/eea/volto-clms-theme/commit/381af058fe7484805e5175600b40cd80d52d2c9e)]
47
+ - fix: changed data resource abstract with overview [Unai - [`c630b7e`](https://github.com/eea/volto-clms-theme/commit/c630b7e6a6e093319473554a4a724fd320783f2d)]
48
+ - fix:redirect to download from map viewer when necesary [Unai - [`9ad9d78`](https://github.com/eea/volto-clms-theme/commit/9ad9d78e7e7b946c34da20d7edea2d68c7cd6fe5)]
49
+ - fix: file card modified to show effective date [Unai - [`b2467e7`](https://github.com/eea/volto-clms-theme/commit/b2467e7a3a813871811388e92b308aea62aa688c)]
50
+ - fix:technical documents on datasets general info view [Unai - [`532cf09`](https://github.com/eea/volto-clms-theme/commit/532cf094933c9d0ba1b9fa77609555621645972a)]
51
+ - fix:carousel link open in new tab [Unai - [`bcc39a5`](https://github.com/eea/volto-clms-theme/commit/bcc39a5b921fee81a653743afd1f219a79c4748f)]
52
+
53
+ #### :nail_care: Enhancements
54
+
55
+ - refactor: removed overview title from dataset [Unai - [`e08ff03`](https://github.com/eea/volto-clms-theme/commit/e08ff0348e2a371b033206e3e66f900f09edd443)]
56
+
57
+ #### :hammer_and_wrench: Others
58
+
59
+ - merge sprint-31 branch [Mikel Larreategi - [`617b5d2`](https://github.com/eea/volto-clms-theme/commit/617b5d25a17cdd264b017a8440d3c4c1c9e283bd)]
60
+ - rename variable [ionlizarazu - [`7b4c537`](https://github.com/eea/volto-clms-theme/commit/7b4c53783e4bbe676ee6e7982610b191a9b40532)]
61
+ ### [1.0.120](https://github.com/eea/volto-clms-theme/compare/1.0.119...1.0.120) - 2 September 2022
62
+
63
+ #### :bug: Bug Fixes
64
+
65
+ - fix: use plain a for EU Login URL [Mikel Larreategi - [`e8d2d66`](https://github.com/eea/volto-clms-theme/commit/e8d2d664e750df517a8d955c4833a70e0f8b34e3)]
66
+
67
+ #### :hammer_and_wrench: Others
68
+
69
+ - Map login button fix [rodriama - [`0e7e520`](https://github.com/eea/volto-clms-theme/commit/0e7e520ac2515846b4af6e782a9f4cdc2375a467)]
70
+ - Card doc fix [rodriama - [`556e33c`](https://github.com/eea/volto-clms-theme/commit/556e33c833b9980edab3b778fc408e662fd5fffd)]
71
+ - ESLint fix [rodriama - [`d55db81`](https://github.com/eea/volto-clms-theme/commit/d55db818a02be4ccfcc524c1f03005600644a9e4)]
72
+ - Credits pop up fix [rodriama - [`3772c16`](https://github.com/eea/volto-clms-theme/commit/3772c163a0a998a7dc7b0fddd176346f2d56a4e1)]
73
+ - ESLint fix [rodriama - [`08a9bd8`](https://github.com/eea/volto-clms-theme/commit/08a9bd8c3cc78d928df58cc8b66fa3aea81f2b13)]
74
+ - Event detail segment [rodriama - [`524e3ff`](https://github.com/eea/volto-clms-theme/commit/524e3fff130ae53ffb09aa534d120677e5fd1c1a)]
7
75
  ### [1.0.119](https://github.com/eea/volto-clms-theme/compare/1.0.118...1.0.119) - 1 September 2022
8
76
 
9
77
  #### :bug: Bug Fixes
@@ -143,7 +211,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
143
211
  #### :hammer_and_wrench: Others
144
212
 
145
213
  - 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)]
146
- - Revert "[JENKINS] Use eeacms/plone-backend and Volto alpha version- Refs #151967" [Mikel Larreategi - [`46eb694`](https://github.com/eea/volto-clms-theme/commit/46eb69415280a3c982405299135027ae4221426a)]
147
214
  - 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)]
148
215
  - lint fix [Unai - [`1264a7a`](https://github.com/eea/volto-clms-theme/commit/1264a7adfe8d679fea1bd821ad087add20f4271d)]
149
216
  - 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)]
@@ -294,7 +361,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
294
361
  - search block new features [ionlizarazu - [`8e814cb`](https://github.com/eea/volto-clms-theme/commit/8e814cbd359782540c21fe37b37ef146d331f0d6)]
295
362
  - language selector cookie management [ionlizarazu - [`1385ac9`](https://github.com/eea/volto-clms-theme/commit/1385ac95795702206d3623ba6e780faa43a89e0a)]
296
363
  - toolbar cookie management [ionlizarazu - [`5c23200`](https://github.com/eea/volto-clms-theme/commit/5c23200790b20e1d4f1bc966463c37bf4c808f47)]
297
- - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`0316a0d`](https://github.com/eea/volto-clms-theme/commit/0316a0d8b6fb0fa14af13002415f3c95d9f8ede3)]
298
364
  ### [1.0.84](https://github.com/eea/volto-clms-theme/compare/1.0.83...1.0.84) - 18 March 2022
299
365
 
300
366
  #### :hammer_and_wrench: Others
@@ -1199,13 +1265,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1199
1265
  #### :hammer_and_wrench: Others
1200
1266
 
1201
1267
  - replace @collective/volto-dropdownmenu with volto-dropdownmenu [ionlizarazu - [`07f004f`](https://github.com/eea/volto-clms-theme/commit/07f004fe0219e403fb51bc045c83d34f3b981f76)]
1202
- - yarn.lock [ionlizarazu - [`fe1ca04`](https://github.com/eea/volto-clms-theme/commit/fe1ca04889d29fe7b653db4c69af2751b84b8a1a)]
1203
1268
  - add NODE_ENV parameter [ionlizarazu - [`101f27c`](https://github.com/eea/volto-clms-theme/commit/101f27c25b8fbd192e1b11865e95cf5ffee08c1b)]
1204
1269
  - upgrade volto-dropdownmenu version [ionlizarazu - [`2081855`](https://github.com/eea/volto-clms-theme/commit/2081855301f4c708776e0dbab39db143cee00dbc)]
1205
1270
  - HomeSearch block missing url behaviour [ionlizarazu - [`d20a378`](https://github.com/eea/volto-clms-theme/commit/d20a378ce3f254b8343692348f314bf281974542)]
1206
1271
  - babel configuration [ionlizarazu - [`203ea2d`](https://github.com/eea/volto-clms-theme/commit/203ea2de07f99ca3403e4ca220ca74d7ce69b61d)]
1207
1272
  - prettier [ionlizarazu - [`e79e26b`](https://github.com/eea/volto-clms-theme/commit/e79e26bf2fa40ba7b4eb53a24dabd87928221c28)]
1208
- - add yarn lock [ionlizarazu - [`e1ab28b`](https://github.com/eea/volto-clms-theme/commit/e1ab28b060d5a74431c368b0de82a68dabce1eab)]
1209
1273
  - Jenkinsfile cypress test [ionlizarazu - [`b385d65`](https://github.com/eea/volto-clms-theme/commit/b385d65986f717c60f8c434a08fc11b829d08eb4)]
1210
1274
  - cypress [ionlizarazu - [`a243cf0`](https://github.com/eea/volto-clms-theme/commit/a243cf0182fa3dd113c16ff495c71e310252d83b)]
1211
1275
  - 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.0.119",
3
+ "version": "1.0.122",
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",
@@ -55,7 +55,7 @@
55
55
  "react-svg": "14.0.4",
56
56
  "slick-carousel": "1.8.1",
57
57
  "volto-dropdownmenu": "2.2.7",
58
- "volto-form-block": "2.4.1",
58
+ "volto-form-block": "2.4.2",
59
59
  "react-input-range": "^1.3.0",
60
60
  "lightgallery": "^2.4.0",
61
61
  "validator": "13.7.0"
@@ -69,6 +69,8 @@ const CclGreenBgView = (props) => {
69
69
  <a
70
70
  className="ccl-banner-info-link"
71
71
  href={'' + data?.locationHref?.[0]?.['@id']}
72
+ target="_blank"
73
+ rel="noreferrer"
72
74
  >
73
75
  More info
74
76
  </a>
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import loadable from '@loadable/component';
3
+ import { UniversalLink } from '@plone/volto/components';
3
4
  const Slider = loadable(() => import('react-slick'));
4
5
 
5
6
  const CclTextLinkCarouselView = (props) => {
@@ -24,7 +25,14 @@ const CclTextLinkCarouselView = (props) => {
24
25
  {data?.textLink?.items.map((item, index) => (
25
26
  <div className="text-link-carousel-block" key={index}>
26
27
  <div className="text-link-carousel-block-content">
27
- <a href={'' + item?.link?.[0]?.['@id']}>{item?.text}</a>
28
+ <UniversalLink
29
+ openLinkInNewTab={true}
30
+ href={'' + item?.link?.[0]?.['@id']}
31
+ >
32
+ {item?.text}
33
+ </UniversalLink>
34
+
35
+ {/* <a href={'' + item?.link?.[0]?.['@id']}>{item?.text}</a> */}
28
36
  </div>
29
37
  </div>
30
38
  ))}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * CheckboxHtmlWidget component.
3
+ * @module components/manage/Widgets/CheckboxHtmlWidget
4
+ * added aria- attributes
5
+ */
6
+
7
+ import React from 'react';
8
+ import PropTypes from 'prop-types';
9
+ import { Checkbox } from 'semantic-ui-react';
10
+
11
+ import { injectIntl } from 'react-intl';
12
+ import { FormFieldWrapper } from '@plone/volto/components';
13
+ import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
14
+
15
+ /**
16
+ * CheckboxHtmlWidget component class.
17
+ * @function CheckboxHtmlWidget
18
+ * @returns {string} Markup of the component.
19
+ *
20
+ * To use it, in schema properties, declare a field like:
21
+ *
22
+ * ```jsx
23
+ * {
24
+ * title: "Active",
25
+ * type: 'boolean',
26
+ * }
27
+ * ```
28
+ */
29
+ const CheckboxHtmlWidget = (props) => {
30
+ const { id, title, value, onChange, isDisabled, required, invalid } = props;
31
+
32
+ let attributes = {};
33
+ if (required) {
34
+ attributes.required = true;
35
+ attributes['aria-required'] = 'true';
36
+ }
37
+
38
+ const isInvalid = invalid === true || invalid === 'true';
39
+ if (isInvalid) {
40
+ attributes['aria-invalid'] = true;
41
+ }
42
+
43
+ return (
44
+ <FormFieldWrapper {...props} columns={1}>
45
+ <div className="wrapper">
46
+ <Checkbox
47
+ id={`field-${id}`}
48
+ name={`field-${id}`}
49
+ checked={value || false}
50
+ disabled={isDisabled}
51
+ onChange={(event, { checked }) => {
52
+ onChange(id, checked);
53
+ }}
54
+ aria-required={required ? 'true' : 'false'}
55
+ label={<label htmlFor={`field-${id}`}>{title}</label>}
56
+ {...attributes}
57
+ />
58
+ </div>
59
+ <StringToHTML string={props.html_description?.data || ''} />
60
+ </FormFieldWrapper>
61
+ );
62
+ };
63
+
64
+ /**
65
+ * Property types.
66
+ * @property {Object} propTypes Property types.
67
+ * @static
68
+ */
69
+ CheckboxHtmlWidget.propTypes = {
70
+ id: PropTypes.string.isRequired,
71
+ title: PropTypes.string.isRequired,
72
+ description: PropTypes.string,
73
+ required: PropTypes.bool,
74
+ error: PropTypes.arrayOf(PropTypes.string),
75
+ value: PropTypes.bool,
76
+ onChange: PropTypes.func,
77
+ onEdit: PropTypes.func,
78
+ onDelete: PropTypes.func,
79
+ wrapped: PropTypes.bool,
80
+ };
81
+
82
+ /**
83
+ * Default properties.
84
+ * @property {Object} defaultProps Default properties.
85
+ * @static
86
+ */
87
+ CheckboxHtmlWidget.defaultProps = {
88
+ description: null,
89
+ required: false,
90
+ error: [],
91
+ value: null,
92
+ onChange: null,
93
+ onEdit: null,
94
+ onDelete: null,
95
+ };
96
+
97
+ export default injectIntl(CheckboxHtmlWidget);
@@ -0,0 +1,22 @@
1
+ import { defineMessages } from 'react-intl';
2
+ const messages = defineMessages({
3
+ field_html_description: {
4
+ id: 'field_html_description',
5
+ defaultMessage: 'HTML formatted description',
6
+ },
7
+ });
8
+
9
+ const CheckboxSchemaExtender = (intl) => {
10
+ return {
11
+ fields: ['html_description'],
12
+ properties: {
13
+ html_description: {
14
+ title: intl.formatMessage(messages.field_html_description),
15
+ widget: 'richtext',
16
+ },
17
+ },
18
+ required: ['html_description'],
19
+ };
20
+ };
21
+
22
+ export default CheckboxSchemaExtender;
@@ -63,19 +63,6 @@ const messages = defineMessages({
63
63
  id: 'form_field_type_static_text',
64
64
  defaultMessage: 'Static text',
65
65
  },
66
- field_input_values: {
67
- id: 'form_field_input_values',
68
- defaultMessage: 'Possible values',
69
- },
70
- useAsReplyTo: {
71
- id: 'form_useAsReplyTo',
72
- defineMessages: "Use as 'reply to'",
73
- },
74
- useAsReplyTo_description: {
75
- id: 'form_useAsReplyTo_description',
76
- defineMessages:
77
- 'If selected, this will be the address the receiver can use to reply.',
78
- },
79
66
  field_custom_id: {
80
67
  id: 'field_custom_id',
81
68
  defineMessages: 'Field Custom Id',
@@ -107,14 +94,11 @@ export default (props) => {
107
94
  ),
108
95
  }
109
96
  : {};
110
- var fieldTypeChoices = [
111
- 'select',
112
- 'single_choice',
113
- 'multiple_choice',
114
- ].includes(props?.field_type)
115
- ? ['input_values']
116
- : [];
117
- var useAsReplyTo = props?.field_type === 'from' ? ['use_as_reply_to'] : [];
97
+ var schemaExtender =
98
+ config.blocks.blocksConfig.form.fieldTypeSchemaExtenders[props?.field_type];
99
+ const schemaExtenderValues = schemaExtender
100
+ ? schemaExtender(intl)
101
+ : { properties: [], fields: [], required: [] };
118
102
  return {
119
103
  title: props?.label || '',
120
104
  fieldsets: [
@@ -125,8 +109,7 @@ export default (props) => {
125
109
  'label',
126
110
  'description',
127
111
  'field_type',
128
- ...fieldTypeChoices,
129
- ...useAsReplyTo,
112
+ ...schemaExtenderValues.fields,
130
113
  'required',
131
114
  'field_custom_id',
132
115
  ],
@@ -151,27 +134,22 @@ export default (props) => {
151
134
  ],
152
135
  ...attachmentDescription,
153
136
  },
154
- input_values: {
155
- title: intl.formatMessage(messages.field_input_values),
156
- type: 'array',
157
- creatable: true,
158
- },
159
- use_as_reply_to: {
160
- title: intl.formatMessage(messages.useAsReplyTo),
161
- description: intl.formatMessage(messages.useAsReplyTo_description),
162
- type: 'boolean',
163
- default: false,
164
- },
165
137
  required: {
166
138
  title: intl.formatMessage(messages.field_required),
167
139
  type: 'boolean',
168
140
  default: false,
169
141
  },
142
+ ...schemaExtenderValues.properties,
170
143
  field_custom_id: {
171
144
  title: intl.formatMessage(messages.field_custom_id),
172
145
  send_to_backend: true,
173
146
  },
174
147
  },
175
- required: ['label', 'field_type', 'input_values', ...fieldTypeChoices],
148
+ required: [
149
+ 'label',
150
+ 'field_type',
151
+ 'input_values',
152
+ ...schemaExtenderValues.required,
153
+ ],
176
154
  };
177
155
  };
@@ -0,0 +1,11 @@
1
+ import CheckboxSchemaExtender from './CheckboxSchemaExtender';
2
+ import customIdFieldSchema from './customIdFieldSchema';
3
+ import CheckboxHtmlWidget from './CheckboxHtmlWidget';
4
+ import VocabularyWidget from './VocabularyWidget';
5
+
6
+ export {
7
+ CheckboxSchemaExtender,
8
+ customIdFieldSchema,
9
+ CheckboxHtmlWidget,
10
+ VocabularyWidget,
11
+ };
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Button, Icon } from 'semantic-ui-react';
3
3
  import { defineMessages, useIntl } from 'react-intl';
4
+ import { structure_taxonomy_terms } from '@eeacms/volto-clms-theme/components';
4
5
 
5
6
  const messages = defineMessages({
6
7
  currentFilters: {
@@ -14,7 +15,7 @@ const messages = defineMessages({
14
15
  });
15
16
 
16
17
  const FilterList = (props) => {
17
- const { facets, setFacets, isEditMode, data } = props;
18
+ const { facets, setFacets, isEditMode, data, querystring } = props;
18
19
  const showFilterList = !Object.values(facets).every((facet) => !facet.length);
19
20
 
20
21
  const baseFacets = data.facets;
@@ -28,10 +29,48 @@ const FilterList = (props) => {
28
29
  baseFacets.map((bf) => bf.field?.value).includes(v[0]),
29
30
  ),
30
31
  );
32
+ const fieldsToAvoidChildren =
33
+ data?.facets?.length > 0
34
+ ? data.facets
35
+ .filter((item) => item.type === 'checkboxTreeParentFacet')
36
+ .map((item) => item.field.value)
37
+ : [];
38
+ let filtersToAvoid = [];
39
+ if (querystring.loaded) {
40
+ filtersToAvoid = fieldsToAvoidChildren
41
+ .map((field) => {
42
+ let result = [];
43
+ const fieldValuesDict = querystring?.indexes[field]?.values;
44
+ const fieldValues = Object.keys(fieldValuesDict).map((fieldKey) => {
45
+ return { value: fieldKey, label: fieldValuesDict[fieldKey].title };
46
+ });
47
+ const fieldStructuredValues = structure_taxonomy_terms(fieldValues);
48
+ fieldStructuredValues.forEach((parent) => {
49
+ parent.childrens.forEach((children) => result.push(children.value));
50
+ });
51
+ return result;
52
+ })
53
+ .flat(1);
54
+ }
55
+ const filtersToAvoidSet = new Set(filtersToAvoid);
31
56
 
32
- const totalFilters = [].concat.apply([], Object.values(currentFilters))
33
- .length;
57
+ // if (choices?.length > 0) {
58
+ // options = structure_taxonomy_terms(choices);
59
+ // }
60
+ const currentFiltersToCount = {};
61
+ Object.keys(currentFilters).forEach((filterKey) => {
62
+ currentFiltersToCount[filterKey] =
63
+ typeof currentFilters[filterKey] === 'object'
64
+ ? currentFilters[filterKey].filter((filter) => {
65
+ return !filtersToAvoidSet.has(filter);
66
+ })
67
+ : null;
68
+ });
69
+ // const totalFilters = [].concat.apply([], Object.values(currentFilters))
70
+ // .length;
34
71
 
72
+ const totalFilters = [].concat.apply([], Object.values(currentFiltersToCount))
73
+ .length;
35
74
  const intl = useIntl();
36
75
 
37
76
  return showFilterList && Object.keys(currentFilters).length ? (
@@ -25,6 +25,7 @@ const SearchInput = (props) => {
25
25
  useEffect(() => {
26
26
  onTriggerSearch(rest.searchedText);
27
27
  setSearchText(rest.searchedText);
28
+ return () => {};
28
29
  }, [rest.searchedText, onTriggerSearch, setSearchText]);
29
30
 
30
31
  return (
@@ -4,7 +4,7 @@ export const portal_types_labels = {
4
4
  'News Item': 'News',
5
5
  'eea.meeting': 'Event',
6
6
  UseCase: 'Use case',
7
- WorkOpportunity: 'Job vacancy',
7
+ WorkOpportunity: 'Vacancy',
8
8
  Tender: 'Tender',
9
9
  TechnicalLibrary: 'Product documentation',
10
10
  Document: 'Page',
@@ -94,6 +94,16 @@ const rewriteOptions = (name, choices) => {
94
94
  return { ...opt, label: opt.label.replace(/^[0-9][0-9]#/, '') };
95
95
  });
96
96
  }
97
+ if (name === 'gemet') {
98
+ result = choices.sort((a, b) => {
99
+ if (a.label.toLowerCase() < b.label.toLowerCase()) {
100
+ return -1;
101
+ } else if (a.label.toLowerCase() > b.label.toLowerCase()) {
102
+ return 1;
103
+ }
104
+ return 0;
105
+ });
106
+ }
97
107
  return result;
98
108
  };
99
109
 
@@ -17,7 +17,7 @@ div.tabs-block.CCLCarousel {
17
17
  .slick-slider.text-carousel {
18
18
  div & {
19
19
  z-index: 1;
20
- width: 60%;
20
+ width: calc(100% - 8rem);
21
21
  }
22
22
  }
23
23
 
@@ -32,6 +32,7 @@ div.tabs-block.CCLCarousel {
32
32
  .text-link-carousel-block {
33
33
  height: 2rem;
34
34
  padding: 0;
35
+ margin-left: 0.5rem;
35
36
  }
36
37
 
37
38
  .text-link-carousel-block-content {
@@ -59,8 +59,12 @@ import TextLinkCarouselView from '@eeacms/volto-clms-theme/components/Blocks/Ccl
59
59
  import SubscriptionBlockView from '@eeacms/volto-clms-theme/components/Blocks/CclSubscriptionBlock/SubscriptionView';
60
60
  import SubscriptionBlockEdit from '@eeacms/volto-clms-theme/components/Blocks/CclSubscriptionBlock/SubscriptionEdit';
61
61
  import containerSVG from '@plone/volto/icons/apps.svg';
62
- import customIdFieldSchema from '@eeacms/volto-clms-theme/components/Blocks/CustomTemplates/VoltoFormBlock/customIdFieldSchema';
63
- import VocabularyWidget from '@eeacms/volto-clms-theme/components/Blocks/CustomTemplates/VoltoFormBlock/VocabularyWidget';
62
+ import {
63
+ customIdFieldSchema,
64
+ CheckboxSchemaExtender,
65
+ CheckboxHtmlWidget,
66
+ VocabularyWidget,
67
+ } from '@eeacms/volto-clms-theme/components/Blocks/CustomTemplates/VoltoFormBlock';
64
68
  import downSVG from '@plone/volto/icons/down-key.svg';
65
69
  import homeBand from '@plone/volto/icons/image-wide.svg';
66
70
  import linkSVG from '@plone/volto/icons/link.svg';
@@ -475,6 +479,9 @@ const customBlocks = (config) => ({
475
479
  form: {
476
480
  ...config.blocks.blocksConfig.form,
477
481
  fieldSchema: customIdFieldSchema,
482
+ fieldTypeSchemaExtenders: {
483
+ checkbox_html: CheckboxSchemaExtender,
484
+ },
478
485
  additionalFields: [
479
486
  {
480
487
  id: 'product_vocabulary',
@@ -511,6 +518,11 @@ const customBlocks = (config) => ({
511
518
  label: 'Image Field Widget',
512
519
  component: ImageWidget,
513
520
  },
521
+ {
522
+ id: 'checkbox_html',
523
+ label: 'Checkbox with html',
524
+ component: CheckboxHtmlWidget,
525
+ },
514
526
  ],
515
527
  },
516
528
  });
@@ -77,6 +77,7 @@ const CLMSDatasetDetailView = ({ content, token }) => {
77
77
  key={item.id}
78
78
  loading={geonetwork_importation.loading}
79
79
  circular
80
+ style={{ width: '50%' }}
80
81
  >
81
82
  <strong>
82
83
  {item.title} (from {item.type}):{' '}
@@ -203,6 +204,7 @@ const CLMSDatasetDetailView = ({ content, token }) => {
203
204
  key={'wms-layers-import'}
204
205
  loading={wms_layers_importation?.loading}
205
206
  circular
207
+ style={{ width: '50%' }}
206
208
  >
207
209
  <Modal
208
210
  onClose={() => {
@@ -288,17 +290,13 @@ const CLMSDatasetDetailView = ({ content, token }) => {
288
290
  </p>
289
291
  )}
290
292
  </Segment>
291
- </Segment.Group>
292
- )}
293
-
294
- {user?.roles && user.roles.includes('Manager') && (
295
- <Segment.Group compact horizontal>
296
293
  <Segment
297
294
  padded={'very'}
298
295
  color={'olive'}
299
296
  key={'wms-fields-import'}
300
297
  loading={wms_fields_importation?.loading}
301
298
  circular
299
+ style={{ width: '50%' }}
302
300
  >
303
301
  <Modal
304
302
  onClose={() => {
@@ -408,7 +406,7 @@ const CLMSDatasetDetailView = ({ content, token }) => {
408
406
  {content?.image && (
409
407
  <div className="menu-detail-image">
410
408
  <img
411
- src={content?.image?.scales?.mini?.download}
409
+ src={content?.image?.scales?.preview?.download}
412
410
  alt="Placeholder"
413
411
  />
414
412
  </div>
@@ -14,22 +14,14 @@ import { useLocation } from 'react-router-dom';
14
14
 
15
15
  const DataSetInfoContent = (props) => {
16
16
  const dispatch = useDispatch();
17
- const {
18
- UID,
19
- id,
20
- validation,
21
- dataResourceAbstract,
22
- data,
23
- geonetwork_identifiers,
24
- citation,
25
- } = props;
17
+ const { UID, id, validation, data, geonetwork_identifiers, citation } = props;
26
18
  const location = useLocation();
27
19
  const searchSubrequests = useSelector((state) => state.search.subrequests);
28
20
  let libraries = searchSubrequests?.[id]?.items || [];
29
21
  let librariesPending = searchSubrequests?.[id]?.loading;
30
22
  const user = useSelector((state) => state.users.user);
31
23
  React.useEffect(() => {
32
- if (location.hash === '#GeneralInfo' && UID) {
24
+ if (UID) {
33
25
  dispatch(
34
26
  searchContent(
35
27
  '',
@@ -66,7 +58,6 @@ const DataSetInfoContent = (props) => {
66
58
  ? iTitleIcons.rightPosition
67
59
  : iTitleIcons.leftPosition;
68
60
  }
69
-
70
61
  return (
71
62
  <div>
72
63
  {validation?.data && validation?.data !== '<p><br/></p>' && (
@@ -77,11 +68,9 @@ const DataSetInfoContent = (props) => {
77
68
  ></CclCitation>
78
69
  )}
79
70
  <CclInfoContainer>
80
- {dataResourceAbstract?.data && (
71
+ {props?.description && (
81
72
  <CclInfoDescription
82
- title="Data resource abstract"
83
- description={<StringToHTML string={dataResourceAbstract.data} />}
84
- tooltip="Brief narrative summary of the content of the resource(s) with coverage, main attributes, data sources, important of the work, etc."
73
+ description={<StringToHTML string={props.description} />}
85
74
  ></CclInfoDescription>
86
75
  )}
87
76
  </CclInfoContainer>
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import CclDownloadTable from '@eeacms/volto-clms-theme/components/CclDownloadTable/CclDownloadTable';
3
3
  import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
4
- import { Link, useLocation } from 'react-router-dom';
4
+ import { Link, useLocation, Redirect } from 'react-router-dom';
5
5
 
6
6
  const DownloadDataSetContent = (data) => {
7
7
  let url = '/register';
@@ -9,6 +9,12 @@ const DownloadDataSetContent = (data) => {
9
9
 
10
10
  return (
11
11
  <div>
12
+ {data.downloadable_files?.items[0].path === '' &&
13
+ location.hash === '#Download' ? (
14
+ <Redirect to={location.pathname + '/download-by-area'} />
15
+ ) : (
16
+ ''
17
+ )}
12
18
  {data.token === '' && (
13
19
  <div className="login-block">
14
20
  <div className="login-content">
@@ -14,7 +14,7 @@ const RelatedUseCases = (props) => {
14
14
  let librariesPending = searchSubrequests?.[id]?.loading;
15
15
  const location = useLocation();
16
16
  React.useEffect(() => {
17
- if (location.hash === '#Usecases' && UID) {
17
+ if (location.hash === '#Use-cases' && UID) {
18
18
  dispatch(
19
19
  searchContent(
20
20
  '',