@eeacms/volto-clms-theme 1.0.121 → 1.0.123

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 (29) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/package.json +2 -2
  3. package/src/components/Blocks/CustomTemplates/VoltoFormBlock/CheckboxHtmlWidget.jsx +97 -0
  4. package/src/components/Blocks/CustomTemplates/VoltoFormBlock/CheckboxSchemaExtender.js +22 -0
  5. package/src/components/Blocks/CustomTemplates/VoltoFormBlock/customIdFieldSchema.js +13 -35
  6. package/src/components/Blocks/CustomTemplates/VoltoFormBlock/index.js +11 -0
  7. package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/FilterList.jsx +13 -9
  8. package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/SearchInput.jsx +1 -0
  9. package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/rewriteOptions.js +11 -1
  10. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/custom.less +1 -1
  11. package/src/components/Blocks/customBlocks.js +14 -2
  12. package/src/components/CLMSDatasetDetailView/CLMSDatasetDetailView.jsx +1 -1
  13. package/src/components/CLMSDatasetDetailView/DataSetInfoContent.jsx +1 -1
  14. package/src/components/CLMSDownloadCartView/CLMSCartContent.jsx +1 -1
  15. package/src/components/CLMSMeetingView/CLMSMeetingView.jsx +1 -92
  16. package/src/components/CLMSNewsItemView/CLMSNewsItemView.jsx +0 -75
  17. package/src/components/CLMSSubscriptionView/SubscriptionView.jsx +2 -2
  18. package/src/components/CLMSUseCasesView/CLMSUseCasesView.jsx +158 -130
  19. package/src/components/CclCard/CclCard.jsx +7 -4
  20. package/src/components/CclCard/cards.less +9 -0
  21. package/src/components/CclLoginModal/CclLoginModal.jsx +1 -1
  22. package/src/components/CclTab/CclTabs.jsx +3 -1
  23. package/src/components/Widgets/ImageWidget.jsx +8 -6
  24. package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +10 -16
  25. package/src/customizations/volto-form-block/components/Field.jsx +261 -0
  26. package/src/index.js +16 -0
  27. package/theme/clms/css/forms.css +10 -0
  28. package/theme/clms/css/styles.less +20 -1
  29. package/theme/clms/css/volto-block-style-override.css +7 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,47 @@ 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.123](https://github.com/eea/volto-clms-theme/compare/1.0.122...1.0.123) - 14 September 2022
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix:show vocabulary values in DatasetView [Mikel Larreategi - [`d036043`](https://github.com/eea/volto-clms-theme/commit/d03604303159f86b2a9781368a92f68f83e57b53)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - eslint [ionlizarazu - [`7b4faad`](https://github.com/eea/volto-clms-theme/commit/7b4faadabcb364aac0f4234120c2375b8d1b399c)]
16
+ ### [1.0.122](https://github.com/eea/volto-clms-theme/compare/1.0.121...1.0.122) - 12 September 2022
17
+
18
+ #### :rocket: New Features
19
+
20
+ - 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)]
21
+
22
+ #### :bug: Bug Fixes
23
+
24
+ - fix: dataset view loaded when accessing from catalogue [Unai - [`75a311b`](https://github.com/eea/volto-clms-theme/commit/75a311bbb38edd754421ea59ae421789db14a389)]
25
+ - fix: technnical library searched in main dataset page [Unai - [`d6c9f92`](https://github.com/eea/volto-clms-theme/commit/d6c9f925018d1209569564ac92c7ebcbca43a08b)]
26
+ - fix: external url opens in new tab [Unai - [`89f6db0`](https://github.com/eea/volto-clms-theme/commit/89f6db08b8a38f535469f293c9eaf5720968b5d3)]
27
+ - fix: error on image widget fixed [Unai - [`9c56bf8`](https://github.com/eea/volto-clms-theme/commit/9c56bf86a023b97744b8cdcce3c032c434947563)]
28
+ - fix: CLMS-1158 sort gement vocabulary alphabetically with lowercase [Mikel Larreategi - [`195d7d2`](https://github.com/eea/volto-clms-theme/commit/195d7d22d2ebd816612022f720c99dee31116307)]
29
+
30
+ #### :hammer_and_wrench: Others
31
+
32
+ - fix typo [Mikel Larreategi - [`21352f9`](https://github.com/eea/volto-clms-theme/commit/21352f97672beda66b626ae00614d2437a7d37ad)]
33
+ - fix typo [Mikel Larreategi - [`dcac8e4`](https://github.com/eea/volto-clms-theme/commit/dcac8e4377ef6d2035b22ff21141259e440eabda)]
34
+ - ESLint fix [rodriama - [`176abac`](https://github.com/eea/volto-clms-theme/commit/176abac31f7bb32024d7538655d418654a78ad49)]
35
+ - ESLint fix [rodriama - [`5931a21`](https://github.com/eea/volto-clms-theme/commit/5931a21ebfbcdbc09d0e325acfa3dff4c60d93e7)]
36
+ - Carousel text link width [rodriama - [`744a222`](https://github.com/eea/volto-clms-theme/commit/744a222ef381062a9bc62394ef9f5b3037d19533)]
37
+ - Pre-packaged and cart table styles [rodriama - [`7997b90`](https://github.com/eea/volto-clms-theme/commit/7997b90146423b976ba7939fda37458b561b0cc9)]
38
+ - Pre-package message styles [rodriama - [`36ca58f`](https://github.com/eea/volto-clms-theme/commit/36ca58f5d210dda93b3d0ffe27bf0a816871c926)]
39
+ - li bullet [rodriama - [`5395ea9`](https://github.com/eea/volto-clms-theme/commit/5395ea940f1dcd3512d08fc961a0207eea2baddb)]
40
+ - Revert "Revert "refactor(widget): changed used widget in datetime cases"" [Mikel Larreategi - [`f2a0399`](https://github.com/eea/volto-clms-theme/commit/f2a03991691db758b568e58cc6abb9fa196fcbb1)]
41
+ - Revert "Revert "refactor(meeting): changed from Meeting Registration to Event Registration"" [Mikel Larreategi - [`cb56508`](https://github.com/eea/volto-clms-theme/commit/cb56508a9eff001226e85e78674d2b2ef9b537df)]
42
+ - 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)]
43
+ - 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)]
44
+ - Revert "Revert "fix: CLMS-1067"" [Mikel Larreategi - [`a790c1f`](https://github.com/eea/volto-clms-theme/commit/a790c1f6f3fb9e18666ad1e2b53fad7e86c7c0e0)]
45
+ - Revert "Revert "fix: display the dropdown above the footer"" [Mikel Larreategi - [`f436e66`](https://github.com/eea/volto-clms-theme/commit/f436e66b58070f7f3c59ae22968b032fbc72b690)]
46
+ - bugfixes [ionlizarazu - [`a2d3ba0`](https://github.com/eea/volto-clms-theme/commit/a2d3ba044a21ca6d1c8f2af8a8b4889477c994c5)]
47
+ - bugfixes [ionlizarazu - [`0e2e7f7`](https://github.com/eea/volto-clms-theme/commit/0e2e7f738adae529217562cb11872cb12d1530bd)]
7
48
  ### [1.0.121](https://github.com/eea/volto-clms-theme/compare/1.0.120...1.0.121) - 5 September 2022
8
49
 
9
50
  #### :bug: Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.0.121",
3
+ "version": "1.0.123",
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"
@@ -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
+ };
@@ -29,15 +29,18 @@ const FilterList = (props) => {
29
29
  baseFacets.map((bf) => bf.field?.value).includes(v[0]),
30
30
  ),
31
31
  );
32
- const fieldsToAvoidChildren = data.facets
33
- .filter((item) => item.type === 'checkboxTreeParentFacet')
34
- .map((item) => item.field.value);
32
+ const fieldsToAvoidChildren =
33
+ data?.facets?.length > 0
34
+ ? data.facets
35
+ .filter((item) => item.type === 'checkboxTreeParentFacet')
36
+ .map((item) => item.field.value)
37
+ : [];
35
38
  let filtersToAvoid = [];
36
39
  if (querystring.loaded) {
37
40
  filtersToAvoid = fieldsToAvoidChildren
38
41
  .map((field) => {
39
42
  let result = [];
40
- const fieldValuesDict = querystring.indexes[field].values;
43
+ const fieldValuesDict = querystring?.indexes[field]?.values;
41
44
  const fieldValues = Object.keys(fieldValuesDict).map((fieldKey) => {
42
45
  return { value: fieldKey, label: fieldValuesDict[fieldKey].title };
43
46
  });
@@ -56,11 +59,12 @@ const FilterList = (props) => {
56
59
  // }
57
60
  const currentFiltersToCount = {};
58
61
  Object.keys(currentFilters).forEach((filterKey) => {
59
- currentFiltersToCount[filterKey] = currentFilters[filterKey].filter(
60
- (filter) => {
61
- return !filtersToAvoidSet.has(filter);
62
- },
63
- );
62
+ currentFiltersToCount[filterKey] =
63
+ typeof currentFilters[filterKey] === 'object'
64
+ ? currentFilters[filterKey].filter((filter) => {
65
+ return !filtersToAvoidSet.has(filter);
66
+ })
67
+ : null;
64
68
  });
65
69
  // const totalFilters = [].concat.apply([], Object.values(currentFilters))
66
70
  // .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
 
@@ -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
  });
@@ -406,7 +406,7 @@ const CLMSDatasetDetailView = ({ content, token }) => {
406
406
  {content?.image && (
407
407
  <div className="menu-detail-image">
408
408
  <img
409
- src={content?.image?.scales?.mini?.download}
409
+ src={content?.image?.scales?.preview?.download}
410
410
  alt="Placeholder"
411
411
  />
412
412
  </div>
@@ -21,7 +21,7 @@ const DataSetInfoContent = (props) => {
21
21
  let librariesPending = searchSubrequests?.[id]?.loading;
22
22
  const user = useSelector((state) => state.users.user);
23
23
  React.useEffect(() => {
24
- if (location.hash === '#General-Info' && UID) {
24
+ if (UID) {
25
25
  dispatch(
26
26
  searchContent(
27
27
  '',
@@ -355,7 +355,7 @@ const CLMSCartContent = (props) => {
355
355
  <td>{contentOrDash(item.name)}</td>
356
356
  )}
357
357
  <td>{contentOrDash(item.source)}</td>
358
- <td>
358
+ <td style={{ wordBreak: 'break-word' }}>
359
359
  <AreaNaming item={item} />
360
360
  </td>
361
361
  <td>
@@ -20,10 +20,6 @@ import { postMeetingRegister } from '../../actions';
20
20
  import { toast } from 'react-toastify';
21
21
  import { LightGalleryListing } from './CclLightGallery';
22
22
  import CclListingCards from '@eeacms/volto-clms-theme/components/Blocks/CustomTemplates/VoltoListingBlock/CclListingCards';
23
- import config from '@plone/volto/registry';
24
- import AnimateHeight from 'react-animate-height';
25
- import { Accordion } from 'semantic-ui-react';
26
- import { CLMSRelatedItems } from '../CLMSRelatedItems';
27
23
 
28
24
  export const CLMSMeetingView = (props) => {
29
25
  const { content, intl } = props;
@@ -107,7 +103,7 @@ export const CLMSMeetingView = (props) => {
107
103
  dispatch(
108
104
  createContent(props.location.pathname, {
109
105
  '@type': 'AnonymousForm',
110
- title: 'Meeting Registration',
106
+ title: 'Event Registration',
111
107
  id: 'form',
112
108
  }),
113
109
  );
@@ -177,36 +173,6 @@ export const CLMSMeetingView = (props) => {
177
173
  intl.formatMessage(messages.no_fullname_customfield),
178
174
  );
179
175
 
180
- const [activeIndex, setActiveIndex] = React.useState([99]);
181
-
182
- const handleClick = ({ index }) => {
183
- const newIndex =
184
- activeIndex.indexOf(index) === -1
185
- ? [...activeIndex, index]
186
- : activeIndex.filter((item) => item !== index);
187
-
188
- setActiveIndex(newIndex);
189
- };
190
-
191
- const [activeDatasetIndex, setActiveDatasetIndex] = React.useState([99]);
192
-
193
- const handleDatasetClick = ({ datasetindex }) => {
194
- const newDatasetIndex =
195
- activeDatasetIndex.indexOf(datasetindex) === -1
196
- ? [...activeDatasetIndex, datasetindex]
197
- : activeDatasetIndex.filter((item) => item !== datasetindex);
198
-
199
- setActiveDatasetIndex(newDatasetIndex);
200
- };
201
-
202
- const titleIcons = config.blocks?.blocksConfig?.accordion?.titleIcons;
203
-
204
- function iconName(iconData, iTitleIcons) {
205
- return iconData?.right_arrows
206
- ? iTitleIcons.rightPosition
207
- : iTitleIcons.leftPosition;
208
- }
209
-
210
176
  return (
211
177
  <div className="ccl-container">
212
178
  <h1 className="page-title">{content.title}</h1>
@@ -435,63 +401,6 @@ export const CLMSMeetingView = (props) => {
435
401
  linkHref={`${files['@id']}/@@download/file`}
436
402
  />
437
403
  )}
438
- <div className="dataset-info-documents dropdown">
439
- <div className="accordion-block"></div>
440
- {content?.products?.length > 0 && (
441
- <Accordion fluid styled>
442
- <Accordion.Title
443
- as={'h2'}
444
- onClick={() => handleClick({ index: 0 })}
445
- className={'accordion-title align-arrow-right'}
446
- >
447
- {activeIndex.includes(0) ? (
448
- <Icon
449
- name={iconName(content, titleIcons.opened)}
450
- size="24px"
451
- />
452
- ) : (
453
- <Icon
454
- name={iconName(content, titleIcons.closed)}
455
- size="24px"
456
- />
457
- )}
458
- <span>Related products</span>
459
- </Accordion.Title>
460
- <Accordion.Content active={activeIndex.includes(0)}>
461
- <AnimateHeight animateOpacity duration={500} height={'auto'}>
462
- <CLMSRelatedItems items={content.products} />
463
- </AnimateHeight>
464
- </Accordion.Content>
465
- </Accordion>
466
- )}
467
- {content?.datasets?.length > 0 && (
468
- <Accordion fluid styled>
469
- <Accordion.Title
470
- as={'h2'}
471
- onClick={() => handleDatasetClick({ datasetindex: 0 })}
472
- className={'accordion-title align-arrow-right'}
473
- >
474
- {activeDatasetIndex.includes(0) ? (
475
- <Icon
476
- name={iconName(content, titleIcons.opened)}
477
- size="24px"
478
- />
479
- ) : (
480
- <Icon
481
- name={iconName(content, titleIcons.closed)}
482
- size="24px"
483
- />
484
- )}
485
- <span>Related datasets</span>
486
- </Accordion.Title>
487
- <Accordion.Content active={activeDatasetIndex.includes(0)}>
488
- <AnimateHeight animateOpacity duration={500} height={'auto'}>
489
- <CLMSRelatedItems items={content.datasets} />
490
- </AnimateHeight>
491
- </Accordion.Content>
492
- </Accordion>
493
- )}
494
- </div>
495
404
  </Segment>
496
405
  </div>
497
406
  );
@@ -5,46 +5,13 @@ import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
5
5
  import { cclDateFormat } from '@eeacms/volto-clms-theme/components/CclUtils';
6
6
  import { LightGalleryListing } from '@eeacms/volto-clms-theme/components/CLMSMeetingView/CclLightGallery';
7
7
  import CclListingCards from '@eeacms/volto-clms-theme/components/Blocks/CustomTemplates/VoltoListingBlock/CclListingCards';
8
- import config from '@plone/volto/registry';
9
- import { Icon } from '@plone/volto/components';
10
- import AnimateHeight from 'react-animate-height';
11
- import { Accordion } from 'semantic-ui-react';
12
- import { CLMSRelatedItems } from '../CLMSRelatedItems';
13
8
 
14
9
  const CLMSNewsItemView = (props) => {
15
10
  const { content } = props;
16
11
  const files = content.items
17
12
  ? content.items.filter((item) => item['@type'] === 'File')
18
13
  : [];
19
- const [activeIndex, setActiveIndex] = React.useState([99]);
20
14
 
21
- const handleClick = ({ index }) => {
22
- const newIndex =
23
- activeIndex.indexOf(index) === -1
24
- ? [...activeIndex, index]
25
- : activeIndex.filter((item) => item !== index);
26
-
27
- setActiveIndex(newIndex);
28
- };
29
-
30
- const [activeDatasetIndex, setActiveDatasetIndex] = React.useState([99]);
31
-
32
- const handleDatasetClick = ({ datasetindex }) => {
33
- const newDatasetIndex =
34
- activeDatasetIndex.indexOf(datasetindex) === -1
35
- ? [...activeDatasetIndex, datasetindex]
36
- : activeDatasetIndex.filter((item) => item !== datasetindex);
37
-
38
- setActiveDatasetIndex(newDatasetIndex);
39
- };
40
-
41
- const titleIcons = config.blocks?.blocksConfig?.accordion?.titleIcons;
42
-
43
- function iconName(iconData, iTitleIcons) {
44
- return iconData?.right_arrows
45
- ? iTitleIcons.rightPosition
46
- : iTitleIcons.leftPosition;
47
- }
48
15
  return (
49
16
  <div className="ccl-container">
50
17
  {hasBlocksData(content) && content.blocks_layout?.items?.length > 4 ? (
@@ -85,48 +52,6 @@ const CLMSNewsItemView = (props) => {
85
52
  linkHref={`${files['@id']}/@@download/file`}
86
53
  />
87
54
  )}
88
- {content?.products?.length > 0 && (
89
- <Accordion fluid styled>
90
- <Accordion.Title
91
- as={'h2'}
92
- onClick={() => handleClick({ index: 0 })}
93
- className={'accordion-title align-arrow-right'}
94
- >
95
- {activeIndex.includes(0) ? (
96
- <Icon name={iconName(content, titleIcons.opened)} size="24px" />
97
- ) : (
98
- <Icon name={iconName(content, titleIcons.closed)} size="24px" />
99
- )}
100
- <span>Related products</span>
101
- </Accordion.Title>
102
- <Accordion.Content active={activeIndex.includes(0)}>
103
- <AnimateHeight animateOpacity duration={500} height={'auto'}>
104
- <CLMSRelatedItems items={content.products} />
105
- </AnimateHeight>
106
- </Accordion.Content>
107
- </Accordion>
108
- )}
109
- {content?.datasets?.length > 0 && (
110
- <Accordion fluid styled>
111
- <Accordion.Title
112
- as={'h2'}
113
- onClick={() => handleDatasetClick({ datasetindex: 0 })}
114
- className={'accordion-title align-arrow-right'}
115
- >
116
- {activeDatasetIndex.includes(0) ? (
117
- <Icon name={iconName(content, titleIcons.opened)} size="24px" />
118
- ) : (
119
- <Icon name={iconName(content, titleIcons.closed)} size="24px" />
120
- )}
121
- <span>Related datasets</span>
122
- </Accordion.Title>
123
- <Accordion.Content active={activeDatasetIndex.includes(0)}>
124
- <AnimateHeight animateOpacity duration={500} height={'auto'}>
125
- <CLMSRelatedItems items={content.datasets} />
126
- </AnimateHeight>
127
- </Accordion.Content>
128
- </Accordion>
129
- )}
130
55
  </div>
131
56
  );
132
57
  };
@@ -40,8 +40,8 @@ const messages = defineMessages({
40
40
  defaultMessage: 'E-mail',
41
41
  },
42
42
  emailDescription: {
43
- id: 'We will use this address to send you the {type}',
44
- defaultMessage: 'We will use this address to send you {type} ',
43
+ id: 'We will use this e-mail address to send you the {type}',
44
+ defaultMessage: 'We will use this e-mail address to send you {type} ',
45
45
  },
46
46
  saved: {
47
47
  id: 'Changes saved',