@eeacms/volto-clms-theme 1.0.65 → 1.0.69
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 +135 -2
- package/jest-addon.config.js +5 -0
- package/package.json +20 -16
- package/src/actions/datasets_by_uid/datasets_by_uid.test.js +14 -0
- package/src/actions/downloadtool/downloadtool.test.js +54 -0
- package/src/actions/extra_breadcrumbs/extra_breadcrumb.test.js +16 -0
- package/src/actions/format_conversion_table/format_conversion_table.test.js +16 -0
- package/src/actions/geonetwork/import_geonetwork.test.js +15 -0
- package/src/actions/import_wms_layers/import_wms_layers.js +20 -0
- package/src/actions/import_wms_layers/import_wms_layers.test.js +15 -0
- package/src/actions/index.js +5 -0
- package/src/actions/meeting/meeting.test.js +41 -0
- package/src/actions/newsletter/get_newsletter_subscribers.test.js +14 -0
- package/src/actions/projections/get_projections.test.js +13 -0
- package/src/actions/registry/registry.test.js +15 -0
- package/src/actions/subscription/post_subscription.js +0 -3
- package/src/actions/subscription/post_subscription.test.js +64 -0
- package/src/actions/tokens/tokens.test.js +39 -0
- package/src/actions/userschema/userschema.test.js +14 -0
- package/src/components/Blocks/CclButtonBlock/CclButtonBlockEdit.test.jsx +123 -0
- package/src/components/Blocks/CclButtonBlock/CclButtonBlockView.jsx +8 -11
- package/src/components/Blocks/CclButtonBlock/CclButtonBlockView.test.jsx +42 -0
- package/src/components/Blocks/CclButtonBlock/__snapshots__/CclButtonBlockEdit.test.jsx.snap +27 -0
- package/src/components/Blocks/CclButtonBlock/__snapshots__/CclButtonBlockView.test.jsx.snap +56 -0
- package/src/components/Blocks/CclCardBlock/CclCardBlockEdit.jsx +8 -8
- package/src/components/Blocks/CclCardBlock/CclCardBlockEdit.test.jsx +159 -0
- package/src/components/Blocks/CclCardBlock/CclCardBlockView.test.jsx +61 -0
- package/src/components/Blocks/CclCardBlock/__snapshots__/CclCardBlockEdit.test.jsx.snap +45 -0
- package/src/components/Blocks/CclCardContainerBlock/CclCardContainerBlockEdit.jsx +8 -12
- package/src/components/Blocks/CclCardContainerBlock/CclCardContainerBlockView.jsx +3 -3
- package/src/components/Blocks/CclContextNavigationBlock/CclContextNavigationBlockEdit.test.jsx +42 -0
- package/src/components/Blocks/CclContextNavigationBlock/CclContextNavigationBlockView.test.jsx +42 -0
- package/src/components/Blocks/CclContextNavigationBlock/__snapshots__/CclContextNavigationBlockEdit.test.jsx.snap +12 -0
- package/src/components/Blocks/CclContextNavigationBlock/__snapshots__/CclContextNavigationBlockView.test.jsx.snap +3 -0
- package/src/components/Blocks/CclHomeBgImageBlock/CclHomeImageEditor.jsx +43 -41
- package/src/components/Blocks/CclHomeProductsBlock/CclHomeProductsBlockView.test.jsx +54 -0
- package/src/components/Blocks/CclHomeProductsBlock/__snapshots__/CclHomeProductsBlockView.test.jsx.snap +57 -0
- package/src/components/Blocks/CclHomeSearchBlock/CclHomeSearchBlockEdit.jsx +9 -10
- package/src/components/Blocks/CclHomeSearchBlock/CclHomeSearchBlockView.jsx +28 -9
- package/src/components/Blocks/CclHomeSearchBlock/CclHomeSearchBlockView.test.jsx +113 -0
- package/src/components/Blocks/CclHomeSearchBlock/__snapshots__/CclHomeSearchBlockView.test.jsx.snap +310 -0
- package/src/components/Blocks/CclHomeUsersBlock/CclHomeUserBlockView.test.jsx +61 -0
- package/src/components/Blocks/CclHomeUsersBlock/CclHomeUsersBlockEdit.jsx +180 -146
- package/src/components/Blocks/CclHomeUsersBlock/CclHomeUsersBlockView.jsx +8 -1
- package/src/components/Blocks/CclHomeUsersBlock/HomeUsersSchema.js +0 -1
- package/src/components/Blocks/CclRelatedListingBlock/CclRelatedListingEdit.jsx +4 -6
- package/src/components/Blocks/CclRelatedListingBlock/CclRelatedListingView.jsx +26 -23
- package/src/components/Blocks/CclTextLinkCarouselBlock/CclTextLinkCarouselEdit.jsx +4 -10
- package/src/components/Blocks/CclTextLinkCarouselBlock/CclTextLinkCarouselView.jsx +2 -6
- package/src/components/Blocks/CclUseCaseList/CclUseCaseListEdit.jsx +16 -13
- package/src/components/Blocks/CclUseCaseList/CclUseCaseListView.jsx +17 -19
- package/src/components/Blocks/CclUseCaseList/utils.js +1 -1
- package/src/components/Blocks/CustomTemplates/VoltoArcgisBlock/CclMapMenu.jsx +2 -2
- package/src/components/Blocks/CustomTemplates/VoltoFormBlock/customIdFieldSchema.js +2 -2
- package/src/components/Blocks/CustomTemplates/VoltoListingBlock/CclListingCards.jsx +1 -4
- package/src/components/Blocks/CustomTemplates/VoltoListingBlock/CclListingCards.test.jsx +247 -0
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/AccordionFacet.jsx +82 -0
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/DoubleRangeFacet.jsx +74 -0
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/FilterList.jsx +57 -0
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/RightModalFacets.jsx +38 -33
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/WithType.jsx +8 -0
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/index.js +12 -3
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/range.css +5 -0
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/rewriteOptions.js +49 -0
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclCarouselView.jsx +17 -48
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclTabsView.jsx +11 -55
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclVerticalFaqTabsView.jsx +17 -17
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclVerticalTabsView.jsx +24 -15
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/RoutingHOC.jsx +18 -48
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/TabsWidget.jsx +11 -8
- package/src/components/Blocks/customBlocks.js +69 -155
- package/src/components/Blocks/{CclCardContainerBlock/utils.js → utils.js} +0 -0
- package/src/components/CLMSDatasetDetailView/BoundingBoxComponent.test.jsx +27 -0
- package/src/components/CLMSDatasetDetailView/CLMSDatasetDetailView.jsx +119 -22
- package/src/components/CLMSDatasetDetailView/CLMSDatasetDetailView.test.jsx +163 -0
- package/src/components/CLMSDatasetDetailView/ContactComponent.test.jsx +34 -0
- package/src/components/CLMSDatasetDetailView/DataSetInfoContent.jsx +155 -101
- package/src/components/CLMSDatasetDetailView/DataSetInfoContent.test.jsx +63 -0
- package/src/components/CLMSDatasetDetailView/DistributionInfoComponent.test.jsx +24 -0
- package/src/components/CLMSDatasetDetailView/DownloadDataSetContent.jsx +1 -13
- package/src/components/CLMSDatasetDetailView/DownloadDataSetContent.test.jsx +136 -0
- package/src/components/CLMSDatasetDetailView/index.js +0 -1
- package/src/components/CLMSDownloadCartView/CLMSCartContent.jsx +46 -31
- package/src/components/CLMSDownloadCartView/CLMSCartContent.test.jsx +5 -0
- package/src/components/CLMSDownloadCartView/CLMSDownloadCartView.jsx +5 -30
- package/src/components/CLMSDownloadCartView/CLMSDownloadCartView.test.jsx +5 -0
- package/src/components/CLMSDownloadCartView/cartUtils.js +3 -6
- package/src/components/CLMSDownloadCartView/cartUtils.test.js +5 -0
- package/src/components/CLMSDownloadCartView/conversion.js +1 -2
- package/src/components/CLMSDownloadCartView/conversion.test.js +5 -0
- package/src/components/CLMSDownloadableFileView/CLMSDownloadableFile.test.jsx +5 -0
- package/src/components/CLMSDownloadableFileView/CLMSDownloadableFileView.jsx +6 -18
- package/src/components/CLMSDownloadsView/CLMSDownloadTasks.jsx +41 -67
- package/src/components/CLMSDownloadsView/CLMSDownloadTasks.test.jsx +5 -0
- package/src/components/CLMSDownloadsView/CLMSDownloadsView.jsx +0 -3
- package/src/components/CLMSDownloadsView/CLMSDownloadsView.test.jsx +5 -0
- package/src/components/CLMSDownloadsView/FileCard.jsx +1 -16
- package/src/components/CLMSDownloadsView/FileCard.test.jsx +5 -0
- package/src/components/CLMSDownloadsView/filecard.less +9 -0
- package/src/components/CLMSMapViewerView/CLMSMapViewerView.jsx +3 -3
- package/src/components/CLMSMapViewerView/CLMSMapViewerView.test.jsx +5 -0
- package/src/components/CLMSMeetingView/CLMSMeetingEmailView.test.jsx +5 -0
- package/src/components/CLMSMeetingView/CLMSMeetingEmailsView.jsx +6 -5
- package/src/components/CLMSMeetingView/CLMSMeetingEmailsView.test.jsx +5 -0
- package/src/components/CLMSMeetingView/CLMSMeetingSubscriberVew.test.jsx +5 -0
- package/src/components/CLMSMeetingView/CLMSMeetingSubscriberView.test.jsx +5 -0
- package/src/components/CLMSMeetingView/CLMSMeetingSubscribersView.test.jsx +5 -0
- package/src/components/CLMSMeetingView/CLMSMeetingView.jsx +46 -33
- package/src/components/CLMSNewsItemView/CLMSNewsItemView.test.jsx +44 -0
- package/src/components/CLMSProfileView/CLMSApiTokensView.test.jsx +5 -0
- package/src/components/CLMSProfileView/CLMSNewsletterSubscriberView.test.jsx +5 -0
- package/src/components/CLMSProfileView/CLMSProfileView.jsx +6 -3
- package/src/components/CLMSProfileView/CLMSProfileView.test.jsx +5 -0
- package/src/components/CLMSProfileView/CLMSUserProfileView.test.jsx +5 -0
- package/src/components/CLMSSubscriptionView/ConfirmSubscriptionView.jsx +18 -12
- package/src/components/CLMSSubscriptionView/ConfirmSubscriptionView.test.jsx +5 -0
- package/src/components/CLMSSubscriptionView/SubscriptionView.jsx +33 -33
- package/src/components/CLMSSubscriptionView/SubscriptionView.test.jsx +5 -0
- package/src/components/CLMSSubscriptionView/subscription_utils.test.js +5 -0
- package/src/components/CclButton/CclButton.jsx +4 -3
- package/src/components/CclButton/CclButton.test.js +76 -0
- package/src/components/CclCard/CclCard.jsx +31 -42
- package/src/components/CclCard/CclCard.test.jsx +134 -0
- package/src/components/CclCard/cards.less +2 -2
- package/src/components/CclCitation/CclCitation.test.jsx +11 -0
- package/src/components/CclCitation/__snapshots__/CclCitation.test.jsx.snap +14 -0
- package/src/components/CclDownloadTable/CclDownloadTable.jsx +194 -43
- package/src/components/CclDownloadTable/CclDownloadTable.test.jsx +5 -0
- package/src/components/CclDownloadTable/download-table.less +14 -1
- package/src/components/CclDownloadTable/modkData.test.js +5 -0
- package/src/components/CclExpandableFilter/CclExpandableFilter.test.jsx +60 -0
- package/src/components/CclFiltersModal/CclFiltersModal.test.jsx +5 -0
- package/src/components/CclFooterColumn/CclFooterColumn.test.jsx +5 -0
- package/src/components/CclInfoDescription/CclInfoContainer.test.js +16 -0
- package/src/components/CclInfoDescription/CclInfoDescription.test.js +18 -0
- package/src/components/CclLanguageSelector/CclLanguageSelector.jsx +80 -109
- package/src/components/CclLanguageSelector/CclLanguageSelector.test.jsx +117 -0
- package/src/components/CclLanguageSelector/__snapshots__/CclLanguageSelector.test.jsx.snap +43 -0
- package/src/components/CclLoginModal/CclLoginModal.jsx +3 -1
- package/src/components/CclLoginModal/CclLoginModal.test.jsx +5 -0
- package/src/components/CclModal/CclModal.test.js +71 -0
- package/src/components/CclTab/CclTab.jsx +8 -3
- package/src/components/CclTab/CclTab.test.jsx +55 -0
- package/src/components/CclTab/CclTabs.jsx +8 -9
- package/src/components/CclTab/CclTabs.test.jsx +5 -0
- package/src/components/CclTopMainMenu/CclFooterMenu.jsx +4 -4
- package/src/components/CclTopMainMenu/CclFooterMenu.test.jsx +5 -0
- package/src/components/CclTopMainMenu/CclTopMainMenu.jsx +6 -6
- package/src/components/CclTopMainMenu/CclTopMainMenu.test.jsx +5 -0
- package/src/components/CclTopMainMenu/multilingualPath.js +1 -3
- package/src/components/CclTopMainMenu/multilingualPath.test.js +5 -0
- package/src/components/CclUtils/StringToHTML.test.jsx +5 -0
- package/src/components/CclVerticalFilterMenu/CclVerticalFilterMenu.jsx +2 -2
- package/src/components/CclVerticalFilterMenu/CclVerticalFilterMenu.test.jsx +30 -0
- package/src/components/Widgets/BoundingWidget.test.jsx +5 -0
- package/src/components/Widgets/ContactWidget.test.jsx +5 -0
- package/src/components/Widgets/DistributionInfoWidget.test.jsx +5 -0
- package/src/components/Widgets/DownloadableFilesWidget.test.jsx +5 -0
- package/src/components/Widgets/GeonetworkIdentifiersWidget.test.jsx +5 -0
- package/src/components/Widgets/MapLayersWidget.jsx +8 -1
- package/src/components/Widgets/MapLayersWidget.test.jsx +5 -0
- package/src/components/Widgets/TextLinkWidget.test.jsx +5 -0
- package/src/customizations/volto/components/manage/Toolbar/Toolbar.test.jsx +5 -0
- package/src/customizations/volto/components/theme/Breadcrumbs/Breadcrumbs.test.jsx +5 -0
- package/src/customizations/volto/components/theme/Footer/Footer.jsx +58 -34
- package/src/customizations/volto/components/theme/Footer/Footer.test.jsx +5 -0
- package/src/customizations/volto/components/theme/Header/Header.jsx +56 -78
- package/src/customizations/volto/components/theme/Header/Header.test.jsx +5 -0
- package/src/customizations/volto/components/theme/Logo/Logo.test.jsx +5 -0
- package/src/customizations/volto/components/theme/Logout/Logout.jsx +74 -0
- package/src/customizations/volto/components/theme/Logout/Logout.test.jsx +5 -0
- package/src/customizations/volto/components/theme/Navigation/ContextNavigation.test.jsx +5 -0
- package/src/customizations/volto/components/theme/Navigation/Navigation.test.jsx +5 -0
- package/src/customizations/volto/components/theme/SearchWidget/SerachWidget.test.jsx +5 -0
- package/src/index.js +3 -6
- package/src/reducers/datasets_by_uid/datasets_by_uid.test.js +53 -0
- package/src/reducers/downloadtool/downloadtool_reducer.js +8 -67
- package/src/reducers/downloadtool/downloadtool_reducer.test.js +340 -0
- package/src/reducers/downloadtool/nutsnames_reducer.test.js +61 -0
- package/src/reducers/extra_breadcrumbs/extra_breadcrumb_reducer.js +21 -1
- package/src/reducers/extra_breadcrumbs/extra_breadcrumb_reducer.test.js +51 -0
- package/src/reducers/geonetwork/import_geonetwork_reducer.test.js +60 -0
- package/src/reducers/import_wms_layers/import_wms_layers.test.js +60 -0
- package/src/reducers/import_wms_layers/import_wms_layers_reducer.js +44 -0
- package/src/reducers/index.js +2 -2
- package/src/reducers/meeting/meeting_register_reducer.test.js +82 -0
- package/src/reducers/meeting/meeting_subscribers_reducer.js +4 -2
- package/src/reducers/meeting/meeting_subscribers_reducer.test.js +149 -0
- package/src/reducers/newsletter/get_newsletter_reducer.test.js +75 -0
- package/src/reducers/registry/registry.test.js +74 -0
- package/src/reducers/subscription/subscription_reducer.test.js +71 -0
- package/src/reducers/tokens/tokens.test.js +221 -0
- package/src/reducers/userschema/userschema.js +1 -1
- package/src/reducers/userschema/userschema.test.js +63 -0
- package/theme/clms/css/carousel.css +1 -1
- package/theme/clms/css/header.css +11 -0
- package/theme/clms/css/home.css +4 -4
- package/theme/clms/css/maps.css +9 -1
- package/theme/clms/css/maps.less +11 -1
- package/theme/clms/css/ownstyles.less +1 -1
- package/theme/clms/css/styles.less +17 -4
- package/src/components/Blocks/CclHomeUsersBlock/utils.js +0 -27
- package/src/components/Blocks/CclProductLeftMenu/CclProductLeftMenuEdit.jsx +0 -124
- package/src/components/Blocks/CclProductLeftMenu/CclProductLeftMenuView.jsx +0 -48
- package/src/components/Blocks/CclProductLeftMenu/LeftMenuSchema.js +0 -78
- package/src/components/Blocks/CclProductLeftMenu/utils.js +0 -25
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/AccordionCheckboxFacet.jsx +0 -56
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/AccordionLabelFacet.jsx +0 -58
- package/src/components/CLMSDatasetDetailView/MetadataContent.jsx +0 -255
- package/src/components/CLMSDownloadCartView/CLMSTasksInProgress.jsx +0 -238
- package/src/components/CLMSEventView/CLMSEventView.jsx +0 -53
- package/src/components/CclTable/CclTable.jsx +0 -95
- package/src/components/CclTable/table.less +0 -42
- package/src/i18n.js +0 -183
|
@@ -79,9 +79,6 @@ const CLMSDownloadsView = (props) => {
|
|
|
79
79
|
let downloadInProgressUidsList = getUIDList(
|
|
80
80
|
downloadtool?.download_in_progress,
|
|
81
81
|
);
|
|
82
|
-
// let downloadCancelledUidsList = getUIDList(
|
|
83
|
-
// downloadtool?.download_cancelled,
|
|
84
|
-
// );
|
|
85
82
|
let finishedOKUidsList = getUIDList(downloadtool?.download_finished_ok);
|
|
86
83
|
let finishedNOKUidsList = getUIDList(downloadtool?.download_finished_nok);
|
|
87
84
|
let rejectedUidsList = getUIDList(downloadtool?.download_rejected);
|
|
@@ -15,7 +15,6 @@ import alertSVG from '@plone/volto/icons/alert.svg';
|
|
|
15
15
|
import errorSVG from '@plone/volto/icons/error.svg';
|
|
16
16
|
import { faInfoCircle } from '@fortawesome/free-solid-svg-icons';
|
|
17
17
|
import packSVG from '@plone/volto/icons/pack.svg';
|
|
18
|
-
// import cancelledSVG from '@plone/volto/icons/spam.svg';
|
|
19
18
|
import removeSVG from '@plone/volto/icons/delete.svg';
|
|
20
19
|
|
|
21
20
|
const prettyBytes = require('pretty-bytes');
|
|
@@ -78,20 +77,6 @@ const FileCard = (props) => {
|
|
|
78
77
|
trigger={<Loader active inline indeterminate size="medium" />}
|
|
79
78
|
/>
|
|
80
79
|
)}
|
|
81
|
-
{/* {item?.Status === 'Cancelled' && (
|
|
82
|
-
<Popup
|
|
83
|
-
content="Cancelled"
|
|
84
|
-
size="small"
|
|
85
|
-
trigger={
|
|
86
|
-
<Icon
|
|
87
|
-
name={cancelledSVG}
|
|
88
|
-
size={45}
|
|
89
|
-
color="#e40166"
|
|
90
|
-
title={'Cancelled'}
|
|
91
|
-
/>
|
|
92
|
-
}
|
|
93
|
-
/>
|
|
94
|
-
)} */}
|
|
95
80
|
{item?.Status === 'Finished_ok' && (
|
|
96
81
|
<Popup
|
|
97
82
|
content="Finished correctly"
|
|
@@ -179,7 +164,7 @@ const FileCard = (props) => {
|
|
|
179
164
|
</ul>
|
|
180
165
|
)}
|
|
181
166
|
{item?.Status === 'Finished_ok' && 10 - daysDiff > -1 && (
|
|
182
|
-
<Segment basic>
|
|
167
|
+
<Segment basic className="file-download">
|
|
183
168
|
{item?.DownloadURL && (
|
|
184
169
|
<a href={item.DownloadURL} target="_blank" rel="noreferrer">
|
|
185
170
|
{formatMessage(messages.Download)}
|
|
@@ -10,3 +10,12 @@
|
|
|
10
10
|
.ui.column.grid.filecard div.trashcontainer {
|
|
11
11
|
box-shadow: none !important;
|
|
12
12
|
}
|
|
13
|
+
|
|
14
|
+
.ui.column.grid.filecard .file-datetimes,
|
|
15
|
+
.ui.column.grid.filecard .file-download {
|
|
16
|
+
padding: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ui.column.grid.filecard .file-datetimes svg {
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
}
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* @module components/CLMSMapViewView/CLMSMapViewView
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { Helmet, getBaseUrl } from '@plone/volto/helpers';
|
|
6
7
|
import React, { useEffect } from 'react';
|
|
7
|
-
import { Helmet } from '@plone/volto/helpers';
|
|
8
8
|
import { defineMessages, useIntl } from 'react-intl';
|
|
9
|
+
|
|
9
10
|
import { MapViewer } from '@eeacms/volto-arcgis-block/components';
|
|
10
11
|
import config from '@eeacms/volto-arcgis-block/components/MapViewer/config';
|
|
11
|
-
import { useDispatch } from 'react-redux';
|
|
12
12
|
import { getExtraBreadcrumbItems } from '../../actions';
|
|
13
|
-
import {
|
|
13
|
+
import { useDispatch } from 'react-redux';
|
|
14
14
|
const CLMSMapViewerView = (props) => {
|
|
15
15
|
const dispatch = useDispatch();
|
|
16
16
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { Link, useLocation } from 'react-router-dom';
|
|
1
2
|
import React, { useState } from 'react';
|
|
2
3
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
3
4
|
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
-
import { searchContent } from '@plone/volto/actions';
|
|
5
|
-
import { useLocation, Link } from 'react-router-dom';
|
|
6
5
|
|
|
7
6
|
import { Pagination } from '@plone/volto/components';
|
|
7
|
+
import { searchContent } from '@plone/volto/actions';
|
|
8
|
+
|
|
8
9
|
export const CLMSMeetingEmailsView = (props) => {
|
|
9
10
|
const { content, intl } = props;
|
|
10
11
|
const dispatch = useDispatch();
|
|
@@ -132,9 +133,9 @@ export const CLMSMeetingEmailsView = (props) => {
|
|
|
132
133
|
<Link to={email['@id']}>{email.sender}</Link>
|
|
133
134
|
</td>
|
|
134
135
|
<td>
|
|
135
|
-
{email.receiver.map((receiver,
|
|
136
|
-
<span key={
|
|
137
|
-
{
|
|
136
|
+
{email.receiver.map((receiver, emailIndex) => (
|
|
137
|
+
<span key={emailIndex}>
|
|
138
|
+
{emailIndex !== 0 && ', '}
|
|
138
139
|
{receiver.token}
|
|
139
140
|
</span>
|
|
140
141
|
))}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import './meetingstyles.less';
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
|
|
4
|
+
import { Header, Image, Message, Segment } from 'semantic-ui-react';
|
|
5
|
+
import { Icon, Toast } from '@plone/volto/components';
|
|
4
6
|
import {
|
|
5
|
-
When,
|
|
6
7
|
Recurrence,
|
|
8
|
+
When,
|
|
7
9
|
} from '@plone/volto/components/theme/View/EventDatesInfo';
|
|
8
|
-
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
|
9
|
-
import { Header, Segment, Message, Image } from 'semantic-ui-react';
|
|
10
|
-
import { Icon, Toast } from '@plone/volto/components';
|
|
11
|
-
import { toast } from 'react-toastify';
|
|
12
|
-
import checkSVG from '@plone/volto/icons/check.svg';
|
|
13
|
-
import { postMeetingRegister } from '../../actions';
|
|
14
10
|
import { useDispatch, useSelector } from 'react-redux';
|
|
15
|
-
import jwtDecode from 'jwt-decode';
|
|
16
|
-
import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
|
|
17
11
|
import { useHistory, useLocation } from 'react-router-dom';
|
|
12
|
+
|
|
13
|
+
import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
|
|
16
|
+
import checkSVG from '@plone/volto/icons/check.svg';
|
|
18
17
|
import { createContent } from '@plone/volto/actions';
|
|
18
|
+
import jwtDecode from 'jwt-decode';
|
|
19
|
+
import { postMeetingRegister } from '../../actions';
|
|
20
|
+
import { toast } from 'react-toastify';
|
|
21
|
+
|
|
19
22
|
export const CLMSMeetingView = (props) => {
|
|
20
23
|
const { content, intl } = props;
|
|
21
24
|
const dispatch = useDispatch();
|
|
@@ -108,6 +111,33 @@ export const CLMSMeetingView = (props) => {
|
|
|
108
111
|
);
|
|
109
112
|
history.push(props.location.pathname + '/form');
|
|
110
113
|
}
|
|
114
|
+
const RegistrationButton = ({ rContent, rMeeting_register, rIsLoggedIn }) => {
|
|
115
|
+
return (
|
|
116
|
+
<>
|
|
117
|
+
{rContent.is_registered ||
|
|
118
|
+
(rMeeting_register.logged_user_registration &&
|
|
119
|
+
!rMeeting_register.error) ? (
|
|
120
|
+
<Message color="olive" size="large">
|
|
121
|
+
<Icon size={20} name={checkSVG} />{' '}
|
|
122
|
+
<FormattedMessage
|
|
123
|
+
id="You are already registered"
|
|
124
|
+
defaultMessage="You are already registered"
|
|
125
|
+
/>
|
|
126
|
+
</Message>
|
|
127
|
+
) : (
|
|
128
|
+
rIsLoggedIn && (
|
|
129
|
+
<CclButton onClick={() => handleRegister()}>
|
|
130
|
+
<FormattedMessage
|
|
131
|
+
id="Register to this meeting"
|
|
132
|
+
defaultMessage="Register to this meeting"
|
|
133
|
+
/>
|
|
134
|
+
</CclButton>
|
|
135
|
+
)
|
|
136
|
+
)}
|
|
137
|
+
</>
|
|
138
|
+
);
|
|
139
|
+
};
|
|
140
|
+
|
|
111
141
|
const handleRegister = () => {
|
|
112
142
|
dispatch(postMeetingRegister(location.pathname)).then((response) => {
|
|
113
143
|
var responseJSON = JSON.parse(response.replace(/'/g, '"'));
|
|
@@ -345,28 +375,11 @@ export const CLMSMeetingView = (props) => {
|
|
|
345
375
|
)}
|
|
346
376
|
</>
|
|
347
377
|
) : (
|
|
348
|
-
|
|
349
|
-
{content
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
<Icon size={20} name={checkSVG} />{' '}
|
|
354
|
-
<FormattedMessage
|
|
355
|
-
id="You are already registered"
|
|
356
|
-
defaultMessage="You are already registered"
|
|
357
|
-
/>
|
|
358
|
-
</Message>
|
|
359
|
-
) : (
|
|
360
|
-
isLoggedIn && (
|
|
361
|
-
<CclButton onClick={() => handleRegister()}>
|
|
362
|
-
<FormattedMessage
|
|
363
|
-
id="Register to this meeting"
|
|
364
|
-
defaultMessage="Register to this meeting"
|
|
365
|
-
/>
|
|
366
|
-
</CclButton>
|
|
367
|
-
)
|
|
368
|
-
)}
|
|
369
|
-
</>
|
|
378
|
+
<RegistrationButton
|
|
379
|
+
rContent={content}
|
|
380
|
+
rMeeting_register={meeting_register}
|
|
381
|
+
rIsLoggedIn={isLoggedIn}
|
|
382
|
+
/>
|
|
370
383
|
)}
|
|
371
384
|
</div>
|
|
372
385
|
</div>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import renderer from 'react-test-renderer';
|
|
3
|
+
import CLMSNewsItemView from './CLMSNewsItemView';
|
|
4
|
+
import { MemoryRouter } from 'react-router-dom';
|
|
5
|
+
|
|
6
|
+
describe('CLMSNewsItemView', () => {
|
|
7
|
+
it('Check CLMSNewsItemView default values', () => {
|
|
8
|
+
const content = {
|
|
9
|
+
title: 'example title',
|
|
10
|
+
/*image: {
|
|
11
|
+
image:"https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg",
|
|
12
|
+
}*/
|
|
13
|
+
};
|
|
14
|
+
const newsView = renderer
|
|
15
|
+
.create(
|
|
16
|
+
<MemoryRouter>
|
|
17
|
+
<CLMSNewsItemView content={content}>
|
|
18
|
+
<p>Event view test</p>
|
|
19
|
+
</CLMSNewsItemView>
|
|
20
|
+
</MemoryRouter>,
|
|
21
|
+
)
|
|
22
|
+
.toJSON();
|
|
23
|
+
expect(newsView).toBeDefined();
|
|
24
|
+
});
|
|
25
|
+
it('Check CLMSNewsItemView custom values', () => {
|
|
26
|
+
const content = {
|
|
27
|
+
title: 'example title',
|
|
28
|
+
image: {
|
|
29
|
+
image:
|
|
30
|
+
'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
const newsView = renderer
|
|
34
|
+
.create(
|
|
35
|
+
<MemoryRouter>
|
|
36
|
+
<CLMSNewsItemView content={content}>
|
|
37
|
+
<p>Event view test</p>
|
|
38
|
+
</CLMSNewsItemView>
|
|
39
|
+
</MemoryRouter>,
|
|
40
|
+
)
|
|
41
|
+
.toJSON();
|
|
42
|
+
expect(newsView).toBeDefined();
|
|
43
|
+
});
|
|
44
|
+
});
|
|
@@ -3,20 +3,23 @@
|
|
|
3
3
|
* @module components/CLMSProfileView/CLMSProfileView
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import {
|
|
7
|
+
AVAILABLE_SUBSCRIPTIONS,
|
|
8
|
+
SubscriptionView,
|
|
9
|
+
} from '@eeacms/volto-clms-theme/components/CLMSSubscriptionView';
|
|
6
10
|
import {
|
|
7
11
|
CLMSApiTokensView,
|
|
8
|
-
CLMSUserProfileView,
|
|
9
12
|
CLMSNewsletterSubscriberView,
|
|
13
|
+
CLMSUserProfileView,
|
|
10
14
|
} from '@eeacms/volto-clms-theme/components/CLMSProfileView';
|
|
11
|
-
import { SubscriptionView } from '@eeacms/volto-clms-theme/components/CLMSSubscriptionView';
|
|
12
15
|
import React, { Component } from 'react';
|
|
16
|
+
|
|
13
17
|
import CclTabs from '@eeacms/volto-clms-theme/components/CclTab/CclTabs';
|
|
14
18
|
import PropTypes from 'prop-types';
|
|
15
19
|
import { compose } from 'redux';
|
|
16
20
|
import { connect } from 'react-redux';
|
|
17
21
|
import { getExtraBreadcrumbItems } from '../../actions';
|
|
18
22
|
import jwtDecode from 'jwt-decode';
|
|
19
|
-
import { AVAILABLE_SUBSCRIPTIONS } from '@eeacms/volto-clms-theme/components/CLMSSubscriptionView';
|
|
20
23
|
/**
|
|
21
24
|
* CLMSProfileView class.
|
|
22
25
|
* @class CLMSProfileView
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { NotFound, Toast } from '@plone/volto/components';
|
|
2
2
|
import React, { Component } from 'react';
|
|
3
3
|
import { confirmSubscribeTo, confirmUnsubscribeTo } from '../../actions';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import
|
|
4
|
+
import { defineMessages, injectIntl } from 'react-intl';
|
|
5
|
+
|
|
6
|
+
import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
|
|
7
7
|
import { Loader } from 'semantic-ui-react';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { compose } from 'redux';
|
|
9
|
+
import { connect } from 'react-redux';
|
|
10
10
|
import { getSubscriptionConfig } from './subscription_utils';
|
|
11
|
-
import {
|
|
11
|
+
import { toast } from 'react-toastify';
|
|
12
12
|
|
|
13
13
|
const messages = defineMessages({
|
|
14
14
|
suscriptionConfirm: {
|
|
@@ -91,7 +91,17 @@ class ConfirmSubscriptionView extends Component {
|
|
|
91
91
|
.catch(() => this.props.error && this.requestErrorToast());
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
+
|
|
95
|
+
ButtonText = (loading) => {
|
|
96
|
+
return loading ? (
|
|
97
|
+
'Confirm'
|
|
98
|
+
) : (
|
|
99
|
+
<Loader active inline indeterminate size="small" />
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
|
|
94
103
|
render() {
|
|
104
|
+
const ButtonText = this.ButtonText;
|
|
95
105
|
return (
|
|
96
106
|
<>
|
|
97
107
|
{this.state.type_conf ? (
|
|
@@ -117,11 +127,7 @@ class ConfirmSubscriptionView extends Component {
|
|
|
117
127
|
</div>
|
|
118
128
|
</div>
|
|
119
129
|
<CclButton onClick={this.handlePost}>
|
|
120
|
-
{
|
|
121
|
-
'Confirm'
|
|
122
|
-
) : (
|
|
123
|
-
<Loader active inline indeterminate size="small" />
|
|
124
|
-
)}
|
|
130
|
+
<ButtonText loading={this.props.loading} />
|
|
125
131
|
</CclButton>
|
|
126
132
|
</div>
|
|
127
133
|
) : (
|
|
@@ -3,21 +3,24 @@
|
|
|
3
3
|
* @module components/CLMSSubscriptionView/SubscriptionView
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { Button, Container, Form, Loader } from 'semantic-ui-react';
|
|
7
|
+
import { Icon, NotFound, Toast } from '@plone/volto/components';
|
|
6
8
|
import React, { Component } from 'react';
|
|
7
|
-
import PropTypes from 'prop-types';
|
|
8
|
-
import { connect } from 'react-redux';
|
|
9
|
-
import { compose } from 'redux';
|
|
10
9
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
11
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
getExtraBreadcrumbItems,
|
|
12
|
+
subscribeTo,
|
|
13
|
+
unsubscribeTo,
|
|
14
|
+
} from '../../actions';
|
|
15
|
+
|
|
16
|
+
import { Link } from 'react-router-dom';
|
|
17
|
+
import PropTypes from 'prop-types';
|
|
12
18
|
import aheadSVG from '@plone/volto/icons/ahead.svg';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { subscribeTo, unsubscribeTo } from '../../actions';
|
|
16
|
-
import { Loader } from 'semantic-ui-react';
|
|
19
|
+
import { compose } from 'redux';
|
|
20
|
+
import { connect } from 'react-redux';
|
|
17
21
|
import { getSubscriptionConfig } from './subscription_utils';
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
import { NotFound } from '@plone/volto/components';
|
|
22
|
+
import { toast } from 'react-toastify';
|
|
23
|
+
|
|
21
24
|
const messages = defineMessages({
|
|
22
25
|
subscribeToThe: {
|
|
23
26
|
id: '{subscribe_or_unsubscribe} to the {type}',
|
|
@@ -137,27 +140,28 @@ class SubscriptionView extends Component {
|
|
|
137
140
|
* @returns {undefined}
|
|
138
141
|
*/
|
|
139
142
|
onSubmit(event) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
if (this.props.isUnsubscribe) {
|
|
144
|
+
if (this.state.value) {
|
|
145
|
+
this.props
|
|
146
|
+
.unsubscribeTo(this.state.type_conf.back_url, this.state.value)
|
|
147
|
+
.then(() => this.props.loaded && this.requestSuccessToast())
|
|
148
|
+
.catch(() => this.props.error && this.requestErrorToast());
|
|
149
|
+
} else {
|
|
150
|
+
this.emptyFieldErrorToast();
|
|
151
|
+
}
|
|
146
152
|
} else {
|
|
147
|
-
|
|
153
|
+
event.preventDefault();
|
|
154
|
+
if (this.state.value) {
|
|
155
|
+
this.props
|
|
156
|
+
.subscribeTo(this.state.type_conf.back_url, this.state.value)
|
|
157
|
+
.then(() => this.props.loaded && this.requestSuccessToast())
|
|
158
|
+
.catch(() => this.props.error && this.requestErrorToast());
|
|
159
|
+
} else {
|
|
160
|
+
this.emptyFieldErrorToast();
|
|
161
|
+
}
|
|
148
162
|
}
|
|
149
163
|
}
|
|
150
164
|
|
|
151
|
-
submitUnsubscribeTo = () => {
|
|
152
|
-
if (this.state.value) {
|
|
153
|
-
this.props
|
|
154
|
-
.unsubscribeTo(this.state.type_conf.back_url, this.state.value)
|
|
155
|
-
.then(() => this.props.loaded && this.requestSuccessToast())
|
|
156
|
-
.catch(() => this.props.error && this.requestErrorToast());
|
|
157
|
-
} else {
|
|
158
|
-
this.emptyFieldErrorToast();
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
165
|
/**
|
|
162
166
|
* Render method.
|
|
163
167
|
* @method render
|
|
@@ -179,11 +183,7 @@ class SubscriptionView extends Component {
|
|
|
179
183
|
<Form
|
|
180
184
|
className="ccl-form user-form contact-form"
|
|
181
185
|
size={'large'}
|
|
182
|
-
onSubmit={
|
|
183
|
-
this.props.isUnsubscribe
|
|
184
|
-
? this.submitUnsubscribeTo
|
|
185
|
-
: this.onSubmit
|
|
186
|
-
}
|
|
186
|
+
onSubmit={this.onSubmit}
|
|
187
187
|
>
|
|
188
188
|
<div className="ccl-fieldset">
|
|
189
189
|
<div className="ccl-form-group">
|
|
@@ -22,12 +22,13 @@ function CclButton(props) {
|
|
|
22
22
|
|
|
23
23
|
const flattern_url = flattenToAppURL(url);
|
|
24
24
|
|
|
25
|
-
function hasProtocol(
|
|
26
|
-
return
|
|
25
|
+
function hasProtocol(protocolUrl) {
|
|
26
|
+
return protocolUrl.startsWith('https://') ||
|
|
27
|
+
protocolUrl.startsWith('http://')
|
|
27
28
|
? true
|
|
28
29
|
: false;
|
|
29
30
|
}
|
|
30
|
-
let RenderElement
|
|
31
|
+
let RenderElement;
|
|
31
32
|
if (isButton) {
|
|
32
33
|
RenderElement = 'button';
|
|
33
34
|
} else {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import CclButton from './CclButton';
|
|
2
|
+
import renderer from 'react-test-renderer';
|
|
3
|
+
import { MemoryRouter } from 'react-router-dom';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
describe('CclButton', () => {
|
|
7
|
+
it('Check external link', () => {
|
|
8
|
+
const button = renderer
|
|
9
|
+
.create(
|
|
10
|
+
<CclButton
|
|
11
|
+
url="https://www.example.com"
|
|
12
|
+
download={false}
|
|
13
|
+
disabled={false}
|
|
14
|
+
mode="mode"
|
|
15
|
+
style={{
|
|
16
|
+
backgroundColor: 'red',
|
|
17
|
+
}}
|
|
18
|
+
>
|
|
19
|
+
<p>Hello!</p>
|
|
20
|
+
</CclButton>,
|
|
21
|
+
)
|
|
22
|
+
.toJSON();
|
|
23
|
+
expect(button).toBeDefined();
|
|
24
|
+
});
|
|
25
|
+
it('Check internal link', () => {
|
|
26
|
+
const button = renderer
|
|
27
|
+
.create(
|
|
28
|
+
<MemoryRouter>
|
|
29
|
+
<CclButton
|
|
30
|
+
url="/example"
|
|
31
|
+
download={false}
|
|
32
|
+
disabled={false}
|
|
33
|
+
mode="mode"
|
|
34
|
+
style={{
|
|
35
|
+
backgroundColor: 'red',
|
|
36
|
+
}}
|
|
37
|
+
>
|
|
38
|
+
<p>Hello!</p>
|
|
39
|
+
</CclButton>
|
|
40
|
+
</MemoryRouter>,
|
|
41
|
+
)
|
|
42
|
+
.toJSON();
|
|
43
|
+
expect(button).toBeDefined();
|
|
44
|
+
});
|
|
45
|
+
it('Check with prop isButton = true', () => {
|
|
46
|
+
const button = renderer
|
|
47
|
+
.create(
|
|
48
|
+
<MemoryRouter>
|
|
49
|
+
<CclButton
|
|
50
|
+
url="/example"
|
|
51
|
+
download={false}
|
|
52
|
+
disabled={false}
|
|
53
|
+
mode="mode"
|
|
54
|
+
style={{
|
|
55
|
+
backgroundColor: 'red',
|
|
56
|
+
}}
|
|
57
|
+
isButton={true}
|
|
58
|
+
>
|
|
59
|
+
<p>Hello!</p>
|
|
60
|
+
</CclButton>
|
|
61
|
+
</MemoryRouter>,
|
|
62
|
+
)
|
|
63
|
+
.toJSON();
|
|
64
|
+
expect(button).toBeDefined();
|
|
65
|
+
});
|
|
66
|
+
it('Check default values', () => {
|
|
67
|
+
const button = renderer
|
|
68
|
+
.create(
|
|
69
|
+
<MemoryRouter>
|
|
70
|
+
<CclButton />
|
|
71
|
+
</MemoryRouter>,
|
|
72
|
+
)
|
|
73
|
+
.toJSON();
|
|
74
|
+
expect(button).toBeDefined();
|
|
75
|
+
});
|
|
76
|
+
});
|