@eeacms/volto-clms-theme 1.0.46 → 1.0.50
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 +48 -0
- package/README.md +86 -0
- package/package.json +7 -1
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclVerticalTabsView.jsx +21 -7
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/TabsWidget.jsx +78 -15
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/custom.less +5 -0
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/subTabSchema.js +19 -0
- package/src/components/CLMSDatasetDetailView/BoundingBoxComponent.jsx +20 -0
- package/src/components/CLMSDatasetDetailView/CLMSDatasetDetailView.jsx +17 -23
- package/src/components/CLMSDatasetDetailView/ContactComponent.jsx +44 -0
- package/src/components/CLMSDatasetDetailView/DistributionInfoComponent.jsx +20 -0
- package/src/components/CLMSDatasetDetailView/MetadataContent.jsx +209 -80
- package/src/components/CLMSEventView/CLMSEventView.jsx +15 -13
- package/src/components/CLMSNewsItemView/CLMSNewsItemView.jsx +13 -11
- package/src/components/CclCard/CclCard.jsx +8 -5
- package/src/components/CclInfoDescription/CclInfoDescription.jsx +9 -8
- package/src/components/CclTab/CclTab.jsx +12 -12
- package/src/components/CclTab/CclTabs.jsx +30 -9
- package/src/customizations/volto/components/theme/Header/Header.jsx +15 -14
- package/theme/clms/css/menu.css +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,56 @@ 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.50](https://github.com/eea/volto-clms-theme/compare/1.0.49...1.0.50)
|
|
8
|
+
|
|
9
|
+
- cart icon with 0 items [`477f1ef`](https://github.com/eea/volto-clms-theme/commit/477f1efa39d6d5e4adede1b3c4f15e2b524dbcf5)
|
|
10
|
+
- add routing to dataset view [`e65a730`](https://github.com/eea/volto-clms-theme/commit/e65a7304fc338b3262b7f9dad9b5c5029391f3c1)
|
|
11
|
+
- add option without routing [`9675773`](https://github.com/eea/volto-clms-theme/commit/9675773a9531a98cee7f9735b09ebc6c3cfcd6fe)
|
|
12
|
+
|
|
13
|
+
#### [1.0.49](https://github.com/eea/volto-clms-theme/compare/1.0.48...1.0.49)
|
|
14
|
+
|
|
15
|
+
> 17 December 2021
|
|
16
|
+
|
|
17
|
+
- DataSet Metadata view [`#157`](https://github.com/eea/volto-clms-theme/pull/157)
|
|
18
|
+
- labels and conformity pass [`59be2fd`](https://github.com/eea/volto-clms-theme/commit/59be2fd5034fdfed211c4e0b0872504432e254e9)
|
|
19
|
+
- image [`47cc7dc`](https://github.com/eea/volto-clms-theme/commit/47cc7dc37974848f2d90cdf6a035970620489cf8)
|
|
20
|
+
|
|
21
|
+
#### [1.0.48](https://github.com/eea/volto-clms-theme/compare/1.0.47...1.0.48)
|
|
22
|
+
|
|
23
|
+
> 16 December 2021
|
|
24
|
+
|
|
25
|
+
- Develop [`#156`](https://github.com/eea/volto-clms-theme/pull/156)
|
|
26
|
+
- dataset view [`38faa9d`](https://github.com/eea/volto-clms-theme/commit/38faa9d291e22c92a1c9049c7241555b2300f830)
|
|
27
|
+
- tab editor [`cfbcf74`](https://github.com/eea/volto-clms-theme/commit/cfbcf742b370cc665c689a2480a09d3b640dc318)
|
|
28
|
+
- remove required to description in proptypes [`9f6da1d`](https://github.com/eea/volto-clms-theme/commit/9f6da1d9c2125865c329a263d0a7b3e771baa287)
|
|
29
|
+
- map keys [`6be4246`](https://github.com/eea/volto-clms-theme/commit/6be424624a61f867f85b6d914811111405ebeb98)
|
|
30
|
+
- add resolutions to package.json volto-slate and react-slick [`54460ad`](https://github.com/eea/volto-clms-theme/commit/54460addb4c4644a03e6af2f94e5c75ee5154bf3)
|
|
31
|
+
- check if items is not null [`26b4399`](https://github.com/eea/volto-clms-theme/commit/26b439981ca354b0f372bdf09a112a58482f2d4b)
|
|
32
|
+
- fix subtab functionality and show subtab in editor [`ece4408`](https://github.com/eea/volto-clms-theme/commit/ece4408bd557a1d2f2868733e1560e2853da1822)
|
|
33
|
+
|
|
34
|
+
#### [1.0.47](https://github.com/eea/volto-clms-theme/compare/1.0.46...1.0.47)
|
|
35
|
+
|
|
36
|
+
> 16 December 2021
|
|
37
|
+
|
|
38
|
+
- Develop [`#155`](https://github.com/eea/volto-clms-theme/pull/155)
|
|
39
|
+
- use smaller images in Cards [`#147`](https://github.com/eea/volto-clms-theme/pull/147)
|
|
40
|
+
- Demo modifications [`#154`](https://github.com/eea/volto-clms-theme/pull/154)
|
|
41
|
+
- Geonetwork fields [`#153`](https://github.com/eea/volto-clms-theme/pull/153)
|
|
42
|
+
- Sub tab option created [`#152`](https://github.com/eea/volto-clms-theme/pull/152)
|
|
43
|
+
- add Role label [`ae98fda`](https://github.com/eea/volto-clms-theme/commit/ae98fdac159d385554a67d3a0690ba17b5dfa244)
|
|
44
|
+
- show all the fields of geonetwork [`9eae556`](https://github.com/eea/volto-clms-theme/commit/9eae55614a26e84613dd747451e9a3fb864a6ac4)
|
|
45
|
+
- if parent tab is clicked sub tab is opened [`5cc5d1c`](https://github.com/eea/volto-clms-theme/commit/5cc5d1c93691985965640499951e0a905da8acbb)
|
|
46
|
+
- add the content url to the simple line listing template [`6ad396f`](https://github.com/eea/volto-clms-theme/commit/6ad396fdaf1850a3d509f4f640e421278341b74b)
|
|
47
|
+
- pretier fix on text carousel [`5e18334`](https://github.com/eea/volto-clms-theme/commit/5e183349cf13b6f2739dbbfbbd48617bc6c9c34c)
|
|
48
|
+
- SubTab style set [`73d9fa8`](https://github.com/eea/volto-clms-theme/commit/73d9fa85b05055b180409927583b71dc0a562f0f)
|
|
49
|
+
- remove default image from New and Event view [`0ef541d`](https://github.com/eea/volto-clms-theme/commit/0ef541dbede5316c46f48585b9728a672f03b7ad)
|
|
50
|
+
- use smaller images [`a545b9e`](https://github.com/eea/volto-clms-theme/commit/a545b9ed547fa124903b66987e6d7b3e46c17146)
|
|
51
|
+
|
|
7
52
|
#### [1.0.46](https://github.com/eea/volto-clms-theme/compare/1.0.45...1.0.46)
|
|
8
53
|
|
|
54
|
+
> 15 December 2021
|
|
55
|
+
|
|
56
|
+
- Develop [`#151`](https://github.com/eea/volto-clms-theme/pull/151)
|
|
9
57
|
- volto-form-block style [`#150`](https://github.com/eea/volto-clms-theme/pull/150)
|
|
10
58
|
- Bugs n improvements [`#149`](https://github.com/eea/volto-clms-theme/pull/149)
|
|
11
59
|
- Develop [`#148`](https://github.com/eea/volto-clms-theme/pull/148)
|
package/README.md
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
# volto-clms-theme
|
|
2
|
+
|
|
2
3
|
[](https://github.com/eea/volto-clms-theme/releases)
|
|
4
|
+
|
|
3
5
|
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-clms-theme/job/master/display/redirect)
|
|
6
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-clms-theme-master)
|
|
7
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-clms-theme-master)
|
|
8
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-clms-theme-master)
|
|
9
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-clms-theme-master)
|
|
10
|
+
|
|
4
11
|
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-clms-theme/job/develop/display/redirect)
|
|
12
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-clms-theme-develop)
|
|
13
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-clms-theme-develop)
|
|
14
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-clms-theme-develop)
|
|
15
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-clms-theme-develop)
|
|
5
16
|
|
|
6
17
|
[Volto](https://github.com/plone/volto) add-on
|
|
7
18
|
|
|
@@ -46,6 +57,81 @@ Demo GIF
|
|
|
46
57
|
|
|
47
58
|
1. Happy editing!
|
|
48
59
|
|
|
60
|
+
## Release
|
|
61
|
+
|
|
62
|
+
### Automatic release using Jenkins
|
|
63
|
+
|
|
64
|
+
* The automatic release is started by creating a [Pull Request](../../compare/master...develop) from `develop` to `master`. The pull request status checks correlated to the branch and PR Jenkins jobs need to be processed successfully. 1 review from a github user with rights is mandatory.
|
|
65
|
+
* It runs on every commit on `master` branch, which is protected from direct commits, only allowing pull request merge commits.
|
|
66
|
+
* The automatic release is done by [Jenkins](https://ci.eionet.europa.eu). The status of the release job can be seen both in the Readme.md badges and the green check/red cross/yellow circle near the last commit information. If you click on the icon, you will have the list of checks that were run. The `continuous-integration/jenkins/branch` link goes to the Jenkins job execution webpage.
|
|
67
|
+
* Automated release scripts are located in the `eeacms/gitflow` docker image, specifically [js-release.sh](https://github.com/eea/eea.docker.gitflow/blob/master/src/js-release.sh) script. It uses the `release-it` tool.
|
|
68
|
+
* As long as a PR request is open from develop to master, the PR Jenkins job will automatically re-create the CHANGELOG.md and package.json files to be production-ready.
|
|
69
|
+
* The version format must be MAJOR.MINOR.PATCH. By default, next release is set to next minor version (with patch 0).
|
|
70
|
+
* You can manually change the version in `package.json`. The new version must not be already present in the tags/releases of the repository, otherwise it will be automatically increased by the script. Any changes to the version will trigger a `CHANGELOG.md` re-generation.
|
|
71
|
+
* Automated commits and commits with [JENKINS] or [YARN] in the commit log are excluded from `CHANGELOG.md` file.
|
|
72
|
+
|
|
73
|
+
### Manual release from the develop branch ( beta release )
|
|
74
|
+
|
|
75
|
+
#### Installation and configuration of release-it
|
|
76
|
+
|
|
77
|
+
You need to first install the [release-it](https://github.com/release-it/release-it) client.
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
npm install -g release-it
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Release-it uses the configuration written in the [`.release-it.json`](./.release-it.json) file located in the root of the repository.
|
|
84
|
+
|
|
85
|
+
Release-it is a tool that automates 4 important steps in the release process:
|
|
86
|
+
|
|
87
|
+
1. Version increase in `package.json` ( increased from the current version in `package.json`)
|
|
88
|
+
2. `CHANGELOG.md` automatic generation from commit messages ( grouped by releases )
|
|
89
|
+
3. GitHub release on the commit with the changelog and package.json modification on the develop branch
|
|
90
|
+
4. NPM release ( by default it's disabled, but can be enabled in the configuration file )
|
|
91
|
+
|
|
92
|
+
To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
export GITHUB_TOKEN=XXX-XXXXXXXXXXXXXXXXXXXXXX
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN :
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
echo "//registry.npmjs.org/:_authToken=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" > .npmrc
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
#### Using release-it tool
|
|
105
|
+
|
|
106
|
+
There are 3 yarn scripts that can be run to do the release
|
|
107
|
+
|
|
108
|
+
##### yarn release-beta
|
|
109
|
+
|
|
110
|
+
Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
? Select increment (next version):
|
|
114
|
+
❯ prepatch (0.1.1-beta.0)
|
|
115
|
+
preminor (0.2.0-beta.0)
|
|
116
|
+
premajor (1.0.0-beta.0)
|
|
117
|
+
Other, please specify...
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
##### yarn release-major-beta
|
|
121
|
+
|
|
122
|
+
Same as `yarn release-beta`, but with premajor version pre-selected.
|
|
123
|
+
|
|
124
|
+
##### yarn release
|
|
125
|
+
|
|
126
|
+
Generic command, does not automatically add the `beta` to version, but you can still manually write it if you choose Other.
|
|
127
|
+
|
|
128
|
+
#### Important notes
|
|
129
|
+
|
|
130
|
+
> Do not use release-it tool on master branch, the commit on CHANGELOG.md file and the version increase in the package.json file can't be done without a PULL REQUEST.
|
|
131
|
+
|
|
132
|
+
> Do not keep Pull Requests from develop to master branches open when you are doing beta releases from the develop branch. As long as a PR to master is open, an automatic script will run on every commit and will update both the version and the changelog to a production-ready state - ( MAJOR.MINOR.PATCH mandatory format for version).
|
|
133
|
+
|
|
134
|
+
|
|
49
135
|
## How to contribute
|
|
50
136
|
|
|
51
137
|
See [DEVELOP.md](https://github.com/eea/volto-clms-theme/blob/master/DEVELOP.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-clms-theme",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.50",
|
|
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",
|
|
@@ -29,6 +29,10 @@
|
|
|
29
29
|
"volto-form-block",
|
|
30
30
|
"@eeacms/volto-taxonomy"
|
|
31
31
|
],
|
|
32
|
+
"resolutions": {
|
|
33
|
+
"volto-slate": "4.2.1",
|
|
34
|
+
"react-slick": "0.28.1"
|
|
35
|
+
},
|
|
32
36
|
"dependencies": {
|
|
33
37
|
"@eeacms/volto-tabs-block": "1.2.7",
|
|
34
38
|
"@eeacms/volto-accordion-block": "3.4.7",
|
|
@@ -101,6 +105,8 @@
|
|
|
101
105
|
},
|
|
102
106
|
"scripts": {
|
|
103
107
|
"release": "release-it",
|
|
108
|
+
"release-major-beta": "release-it major --preRelease=beta",
|
|
109
|
+
"release-beta": "release-it --preRelease=beta",
|
|
104
110
|
"bootstrap": "npm install -g ejs; npm link ejs; node bootstrap",
|
|
105
111
|
"stylelint": "../../../node_modules/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'",
|
|
106
112
|
"stylelint:theme": "../../../node_modules/stylelint/bin/stylelint.js --allow-empty-input 'theme/**/*.{css,less}'",
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import './fontawesome';
|
|
2
|
+
|
|
3
|
+
import { NavLink, Route } from 'react-router-dom';
|
|
4
|
+
|
|
1
5
|
import React from 'react';
|
|
2
|
-
import {
|
|
6
|
+
import { RenderBlocks } from '@plone/volto/components';
|
|
3
7
|
import { compose } from 'redux';
|
|
8
|
+
import { connect } from 'react-redux';
|
|
9
|
+
import cx from 'classnames';
|
|
4
10
|
import { withRouter } from 'react-router';
|
|
5
|
-
import { RenderBlocks } from '@plone/volto/components';
|
|
6
11
|
import { withScrollToTarget } from '@eeacms/volto-tabs-block/hocs';
|
|
7
|
-
import './fontawesome';
|
|
8
|
-
import cx from 'classnames';
|
|
9
|
-
import { Route, NavLink } from 'react-router-dom';
|
|
10
12
|
|
|
11
13
|
const CclVerticalTabsView = (props) => {
|
|
12
14
|
const { metadata = {}, tabsList = [], ExtraComponent = null } = props;
|
|
@@ -47,16 +49,28 @@ const CclVerticalTabsView = (props) => {
|
|
|
47
49
|
setActiveTab = () => {},
|
|
48
50
|
} = props;
|
|
49
51
|
const title = tabs[tab].title;
|
|
52
|
+
const subTab = tabs[tab]?.subTab?.subtab || false;
|
|
50
53
|
const tabIndex = index + 1;
|
|
54
|
+
const nextTabIndex = index + 2;
|
|
55
|
+
const nextSubTab =
|
|
56
|
+
tabs[tabsList[tabIndex]]?.subTab?.subtab || false;
|
|
51
57
|
const defaultTitle = `Tab ${tabIndex}`;
|
|
52
58
|
return (
|
|
53
59
|
<div
|
|
54
60
|
key={index}
|
|
55
61
|
id={tabIndex}
|
|
56
|
-
className={cx(
|
|
62
|
+
className={cx(
|
|
63
|
+
'card',
|
|
64
|
+
tab === activeTab && 'active',
|
|
65
|
+
subTab && 'subcard',
|
|
66
|
+
)}
|
|
57
67
|
>
|
|
58
68
|
<NavLink
|
|
59
|
-
to={
|
|
69
|
+
to={
|
|
70
|
+
subTab === false && nextSubTab !== false
|
|
71
|
+
? '#tab' + nextTabIndex
|
|
72
|
+
: '#tab' + tabIndex
|
|
73
|
+
}
|
|
60
74
|
className="collapsed"
|
|
61
75
|
onClick={(e) => {
|
|
62
76
|
if (activeTab !== tab) {
|
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import './fontawesome';
|
|
2
|
+
|
|
3
|
+
import { FormFieldWrapper, Icon } from '@plone/volto/components';
|
|
4
|
+
import { Grid, Header } from 'semantic-ui-react';
|
|
5
|
+
import { faExternalLinkAlt, faIcons } from '@fortawesome/free-solid-svg-icons';
|
|
3
6
|
import { omit, without } from 'lodash';
|
|
4
|
-
|
|
5
|
-
import { Icon, FormFieldWrapper } from '@plone/volto/components';
|
|
7
|
+
|
|
6
8
|
import { DragDropList } from '@plone/volto/components';
|
|
7
|
-
import {
|
|
9
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
10
|
+
import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { SidebarPopup } from '@plone/volto/components';
|
|
8
13
|
import { StyleWrapperEdit } from '@eeacms/volto-block-style/StyleWrapper';
|
|
14
|
+
import clearSVG from '@plone/volto/icons/clear.svg';
|
|
9
15
|
import dragSVG from '@plone/volto/icons/drag.svg';
|
|
16
|
+
import { emptyTab } from '@eeacms/volto-tabs-block/helpers';
|
|
17
|
+
import { fontAwesomeSchema } from './fontAwesomeSchema';
|
|
18
|
+
import leftMenuSVG from '@plone/volto/icons/nav.svg';
|
|
19
|
+
import move from 'lodash-move';
|
|
20
|
+
import plusSVG from '@plone/volto/icons/circle-plus.svg';
|
|
21
|
+
import rightSVG from '@plone/volto/icons/right-key.svg';
|
|
22
|
+
import { subTabSchema } from './subTabSchema';
|
|
10
23
|
import themeSVG from '@plone/volto/icons/theme.svg';
|
|
11
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
12
|
-
import { faIcons, faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons';
|
|
13
24
|
import trashSVG from '@plone/volto/icons/delete.svg';
|
|
14
|
-
import
|
|
15
|
-
import { SidebarPopup } from '@plone/volto/components';
|
|
16
|
-
import { fontAwesomeSchema } from './fontAwesomeSchema';
|
|
17
|
-
import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
|
|
18
|
-
import clearSVG from '@plone/volto/icons/clear.svg';
|
|
19
|
-
import './fontawesome';
|
|
20
|
-
import { Header, Grid } from 'semantic-ui-react';
|
|
25
|
+
import { v4 as uuid } from 'uuid';
|
|
21
26
|
|
|
22
27
|
export function moveColumn(formData, source, destination) {
|
|
23
28
|
return {
|
|
@@ -36,6 +41,7 @@ const TabsWidget = (props) => {
|
|
|
36
41
|
const [blockStyleVisible, setBlockStyleVisible] = React.useState(false);
|
|
37
42
|
const [activeTabId, setActiveTabId] = React.useState(0);
|
|
38
43
|
const [activeFontAwesomePopup, setActiveFontAwesomePopup] = React.useState(0);
|
|
44
|
+
const [activeSubTabPopup, setActiveSubTabPopup] = React.useState(0);
|
|
39
45
|
|
|
40
46
|
const { value = {}, id, onChange } = props;
|
|
41
47
|
const { blocks = {} } = value;
|
|
@@ -83,7 +89,18 @@ const TabsWidget = (props) => {
|
|
|
83
89
|
<Icon name={dragSVG} size="18px" />
|
|
84
90
|
</div>
|
|
85
91
|
<div className="tab-area">
|
|
86
|
-
<div
|
|
92
|
+
<div
|
|
93
|
+
className="label"
|
|
94
|
+
style={{
|
|
95
|
+
textOverflow: 'ellipsis',
|
|
96
|
+
whiteSpace: 'nowrap',
|
|
97
|
+
overflow: 'hidden',
|
|
98
|
+
maxWidth: '65%',
|
|
99
|
+
}}
|
|
100
|
+
>
|
|
101
|
+
{child.subTab?.subtab === true && (
|
|
102
|
+
<Icon name={rightSVG} size="18px" />
|
|
103
|
+
)}
|
|
87
104
|
{child.title || `Tab ${index + 1}`}
|
|
88
105
|
</div>
|
|
89
106
|
<button
|
|
@@ -190,6 +207,52 @@ const TabsWidget = (props) => {
|
|
|
190
207
|
/>
|
|
191
208
|
</SidebarPopup>
|
|
192
209
|
|
|
210
|
+
<button
|
|
211
|
+
onClick={() => {
|
|
212
|
+
setActiveTabId(childId);
|
|
213
|
+
setActiveSubTabPopup(true);
|
|
214
|
+
}}
|
|
215
|
+
title="Sub Tab"
|
|
216
|
+
>
|
|
217
|
+
<Icon size={'24px'} name={leftMenuSVG} />
|
|
218
|
+
</button>
|
|
219
|
+
<SidebarPopup open={activeSubTabPopup}>
|
|
220
|
+
<InlineForm
|
|
221
|
+
schema={subTabSchema()}
|
|
222
|
+
title={
|
|
223
|
+
<>
|
|
224
|
+
{subTabSchema().title}
|
|
225
|
+
<button
|
|
226
|
+
onClick={() => {
|
|
227
|
+
setActiveSubTabPopup(false);
|
|
228
|
+
}}
|
|
229
|
+
style={{ float: 'right' }}
|
|
230
|
+
>
|
|
231
|
+
<Icon name={clearSVG} size="24px" />
|
|
232
|
+
</button>
|
|
233
|
+
</>
|
|
234
|
+
}
|
|
235
|
+
formData={{
|
|
236
|
+
...activeTabData?.subTab,
|
|
237
|
+
}}
|
|
238
|
+
onChangeField={(idTab, formValue) => {
|
|
239
|
+
onChange(id, {
|
|
240
|
+
...value,
|
|
241
|
+
blocks: {
|
|
242
|
+
...value.blocks,
|
|
243
|
+
[activeTabId]: {
|
|
244
|
+
...(activeTabData || {}),
|
|
245
|
+
subTab: {
|
|
246
|
+
...activeTabData?.subTab,
|
|
247
|
+
[idTab]: formValue,
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
});
|
|
252
|
+
}}
|
|
253
|
+
/>
|
|
254
|
+
</SidebarPopup>
|
|
255
|
+
|
|
193
256
|
{value.blocks_layout?.items?.length > 1 ? (
|
|
194
257
|
<button
|
|
195
258
|
onClick={() => {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const subTabSchema = () => ({
|
|
2
|
+
title: 'Vertical tab block',
|
|
3
|
+
fieldsets: [
|
|
4
|
+
{
|
|
5
|
+
id: 'default',
|
|
6
|
+
title: 'Default',
|
|
7
|
+
fields: ['subtab'],
|
|
8
|
+
},
|
|
9
|
+
],
|
|
10
|
+
properties: {
|
|
11
|
+
subtab: {
|
|
12
|
+
title: 'Is subtab',
|
|
13
|
+
description: 'Define if this tab is a subTab',
|
|
14
|
+
type: 'boolean',
|
|
15
|
+
default: false,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
required: [],
|
|
19
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const BoundingBoxComponent = (props) => {
|
|
4
|
+
const { north, south, east, west } = props.bbox;
|
|
5
|
+
|
|
6
|
+
return (
|
|
7
|
+
<div className="bounding-box-container">
|
|
8
|
+
<h3>Bounding Box</h3>
|
|
9
|
+
<div className="bounding-box-item">
|
|
10
|
+
{east && <div className="bounding-box-item">East: {east}</div>}
|
|
11
|
+
{west && <div className="bounding-box-item">West: {west}</div>}
|
|
12
|
+
{north && <div className="bounding-box-item">North: {north}</div>}
|
|
13
|
+
{south && <div className="bounding-box-item">South: {south}</div>}
|
|
14
|
+
</div>
|
|
15
|
+
<br />
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default BoundingBoxComponent;
|
|
@@ -125,36 +125,30 @@ const CLMSDatasetDetailView = ({ content, token }) => {
|
|
|
125
125
|
this dataset.
|
|
126
126
|
<br />
|
|
127
127
|
<br />
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
'https://sdi.eea.europa.eu/catalogue/srv/eng/catalog.search#/metadata/' +
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
128
|
+
<a
|
|
129
|
+
target="_blank"
|
|
130
|
+
rel="noreferrer"
|
|
131
|
+
href={
|
|
132
|
+
item.type === 'EEA'
|
|
133
|
+
? 'https://sdi.eea.europa.eu/catalogue/srv/eng/catalog.search#/metadata/' +
|
|
134
|
+
item.id
|
|
135
|
+
: 'https://land.copernicus.vgt.vito.be/geonetwork/srv/eng/catalog.search#/metadata/' +
|
|
136
|
+
item.id
|
|
137
|
+
}
|
|
138
|
+
>
|
|
139
|
+
{item.type === 'EEA' && (
|
|
137
140
|
<FormattedMessage
|
|
138
141
|
id="EEA Geonetwork element"
|
|
139
142
|
defaultMessage="EEA Geonetwork element"
|
|
140
143
|
/>
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
{item.type === 'VITO' && (
|
|
144
|
-
<a
|
|
145
|
-
target="_blank"
|
|
146
|
-
rel="noreferrer"
|
|
147
|
-
href={
|
|
148
|
-
'https://land.copernicus.vgt.vito.be/geonetwork/srv/eng/catalog.search#/metadata/' +
|
|
149
|
-
item.id
|
|
150
|
-
}
|
|
151
|
-
>
|
|
144
|
+
)}
|
|
145
|
+
{item.type === 'VITO' && (
|
|
152
146
|
<FormattedMessage
|
|
153
147
|
id="VITO Geonetwork element"
|
|
154
148
|
defaultMessage="VITO Geonetwork element"
|
|
155
149
|
/>
|
|
156
|
-
|
|
157
|
-
|
|
150
|
+
)}
|
|
151
|
+
</a>
|
|
158
152
|
</div>
|
|
159
153
|
<CclButton
|
|
160
154
|
onClick={() => {
|
|
@@ -196,7 +190,7 @@ const CLMSDatasetDetailView = ({ content, token }) => {
|
|
|
196
190
|
})}
|
|
197
191
|
</Segment.Group>
|
|
198
192
|
)}
|
|
199
|
-
<CclTabs>
|
|
193
|
+
<CclTabs routing={true}>
|
|
200
194
|
<div tabTitle="General Info">{DataSetInfoContent(content)}</div>
|
|
201
195
|
<div tabTitle="Metadata">{MetadataContent(content)}</div>
|
|
202
196
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const ContactComponent = (props) => {
|
|
4
|
+
const {
|
|
5
|
+
organisationName,
|
|
6
|
+
deliveryPoint,
|
|
7
|
+
city,
|
|
8
|
+
administrativeArea,
|
|
9
|
+
postalCode,
|
|
10
|
+
country,
|
|
11
|
+
electronicMailAddress,
|
|
12
|
+
url,
|
|
13
|
+
urlTitle,
|
|
14
|
+
roleCode,
|
|
15
|
+
} = props.contact;
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<div className="contact-container">
|
|
19
|
+
<h3>Contact</h3>
|
|
20
|
+
<div className="contact-item">
|
|
21
|
+
{city && <div className="contact-item">{city}</div>}
|
|
22
|
+
{organisationName && (
|
|
23
|
+
<div className="contact-item">{organisationName}</div>
|
|
24
|
+
)}
|
|
25
|
+
{deliveryPoint && <div className="contact-item">{deliveryPoint}</div>}
|
|
26
|
+
{city && <div className="contact-item">{city}</div>}
|
|
27
|
+
{administrativeArea && (
|
|
28
|
+
<div className="contact-item">{administrativeArea}</div>
|
|
29
|
+
)}
|
|
30
|
+
{postalCode && <div className="contact-item">{postalCode}</div>}
|
|
31
|
+
{country && <div className="contact-item">{country}</div>}
|
|
32
|
+
{electronicMailAddress && (
|
|
33
|
+
<div className="contact-item">{electronicMailAddress}</div>
|
|
34
|
+
)}
|
|
35
|
+
{url && <div className="contact-item">{url}</div>}
|
|
36
|
+
{urlTitle && <div className="contact-item">{urlTitle}</div>}
|
|
37
|
+
{roleCode && <div className="contact-item">Role: {roleCode}</div>}
|
|
38
|
+
</div>
|
|
39
|
+
<br />
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default ContactComponent;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const DistributionInfoComponent = (props) => {
|
|
4
|
+
const { resourceLocator, services } = props.resource;
|
|
5
|
+
|
|
6
|
+
return (
|
|
7
|
+
<div className="distribution-info-container">
|
|
8
|
+
<h3>Resource</h3>
|
|
9
|
+
<div className="distribution-info-item">
|
|
10
|
+
{resourceLocator && (
|
|
11
|
+
<div className="distribution-info-item">{resourceLocator}</div>
|
|
12
|
+
)}
|
|
13
|
+
{services && <div className="distribution-info-item">{services}</div>}
|
|
14
|
+
</div>
|
|
15
|
+
<br />
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default DistributionInfoComponent;
|
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { CclInfoContainer, CclInfoDescription } from '../CclInfoDescription';
|
|
2
|
+
|
|
3
|
+
import BoundingBoxComponent from './BoundingBoxComponent';
|
|
3
4
|
import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
|
|
5
|
+
import ContactComponent from './ContactComponent';
|
|
6
|
+
import DistributionInfoComponent from './DistributionInfoComponent';
|
|
7
|
+
import { Label } from 'semantic-ui-react';
|
|
8
|
+
import React from 'react';
|
|
4
9
|
import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
|
|
5
10
|
|
|
6
11
|
const MetadataContent = (data) => {
|
|
7
12
|
return (
|
|
8
13
|
<>
|
|
9
|
-
{data
|
|
10
|
-
return
|
|
11
|
-
<CclButton
|
|
12
|
-
className="ccl-button ccl-button--default download-dataset-metadata"
|
|
13
|
-
url={
|
|
14
|
-
'https://sdi.eea.europa.eu/catalogue/srv/eng/catalog.search#/metadata/' +
|
|
15
|
-
item.id
|
|
16
|
-
}
|
|
17
|
-
download={true}
|
|
18
|
-
>
|
|
19
|
-
Download metadata: {item.title}
|
|
20
|
-
</CclButton>
|
|
21
|
-
) : (
|
|
14
|
+
{data?.geonetwork_identifiers?.items.map((item, key) => {
|
|
15
|
+
return (
|
|
22
16
|
<CclButton
|
|
17
|
+
key={key}
|
|
23
18
|
className="ccl-button ccl-button--default download-dataset-metadata"
|
|
24
19
|
url={
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
item.type === 'EEA'
|
|
21
|
+
? 'https://sdi.eea.europa.eu/catalogue/srv/eng/catalog.search#/metadata/' +
|
|
22
|
+
item.id
|
|
23
|
+
: 'https://land.copernicus.vgt.vito.be/geonetwork/srv/eng/catalog.search#/metadata/' +
|
|
24
|
+
item.id
|
|
27
25
|
}
|
|
28
26
|
download={true}
|
|
29
27
|
>
|
|
@@ -34,90 +32,221 @@ const MetadataContent = (data) => {
|
|
|
34
32
|
|
|
35
33
|
<CclInfoContainer>
|
|
36
34
|
<h2>Data identification</h2>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
{data?.dataResourceTitle && (
|
|
36
|
+
<CclInfoDescription
|
|
37
|
+
title="Resource title"
|
|
38
|
+
tooltip="Name by which the cited resource is known"
|
|
39
|
+
description={data?.dataResourceTitle}
|
|
40
|
+
/>
|
|
41
|
+
)}
|
|
42
|
+
{data?.resourceEffective && (
|
|
43
|
+
<CclInfoDescription
|
|
44
|
+
title="Date of publication"
|
|
45
|
+
tooltip=""
|
|
46
|
+
description={new Date(data?.resourceEffective).toLocaleDateString()}
|
|
47
|
+
/>
|
|
48
|
+
)}
|
|
49
|
+
{data?.resourceModified && (
|
|
50
|
+
<CclInfoDescription
|
|
51
|
+
title="Revision date"
|
|
52
|
+
tooltip=""
|
|
53
|
+
description={new Date(data?.resourceModified).toLocaleDateString()}
|
|
54
|
+
/>
|
|
55
|
+
)}
|
|
42
56
|
<CclInfoDescription
|
|
43
57
|
title="Resource abstract"
|
|
44
58
|
tooltip="Brief narrative summary of the content of the resource(s) with coverage, main attributes, data sources, important of the work, etc."
|
|
45
59
|
description={
|
|
46
|
-
<StringToHTML string={data
|
|
60
|
+
<StringToHTML string={data?.dataResourceAbstract?.data || ''} />
|
|
47
61
|
}
|
|
48
62
|
/>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
{data?.keywords && data?.keywords?.length > 0 && (
|
|
64
|
+
<CclInfoDescription
|
|
65
|
+
title="Keywords"
|
|
66
|
+
tooltip=""
|
|
67
|
+
description={
|
|
68
|
+
<Label.Group>
|
|
69
|
+
{data?.keywords.map((keyword, key) => {
|
|
70
|
+
return (
|
|
71
|
+
<Label key={key} color="olive">
|
|
72
|
+
{keyword}
|
|
73
|
+
</Label>
|
|
74
|
+
);
|
|
75
|
+
})}
|
|
76
|
+
</Label.Group>
|
|
77
|
+
}
|
|
78
|
+
/>
|
|
79
|
+
)}
|
|
80
|
+
{data?.geographicCoverage?.geolocation && (
|
|
81
|
+
<CclInfoDescription
|
|
82
|
+
title="Geographic coverage"
|
|
83
|
+
tooltip=""
|
|
84
|
+
description={
|
|
85
|
+
<Label.Group>
|
|
86
|
+
{data?.geographicCoverage?.geolocation.map((location, key) => {
|
|
87
|
+
return (
|
|
88
|
+
<Label key={key} color="olive">
|
|
89
|
+
{location.label}
|
|
90
|
+
</Label>
|
|
91
|
+
);
|
|
92
|
+
})}
|
|
93
|
+
</Label.Group>
|
|
94
|
+
}
|
|
95
|
+
/>
|
|
96
|
+
)}
|
|
97
|
+
{data?.accessAndUseLimitationPublic_line && (
|
|
98
|
+
<CclInfoDescription
|
|
99
|
+
title="Limitation of public access"
|
|
100
|
+
tooltip=""
|
|
101
|
+
description={data?.accessAndUseLimitationPublic_line}
|
|
102
|
+
/>
|
|
103
|
+
)}
|
|
71
104
|
<CclInfoDescription
|
|
72
|
-
title="
|
|
73
|
-
tooltip="
|
|
105
|
+
title="Conditions applying to access and use"
|
|
106
|
+
tooltip=""
|
|
74
107
|
description={
|
|
75
|
-
<StringToHTML string={data
|
|
108
|
+
<StringToHTML string={data?.accessAndUseConstraints?.data || ''} />
|
|
76
109
|
}
|
|
77
110
|
/>
|
|
78
|
-
</CclInfoContainer>
|
|
79
|
-
<CclInfoContainer>
|
|
80
|
-
<h2>Conformity</h2>
|
|
81
111
|
<CclInfoDescription
|
|
82
|
-
title="
|
|
83
|
-
tooltip="
|
|
84
|
-
description={
|
|
85
|
-
<StringToHTML string={data.conformitySpecification?.data} />
|
|
86
|
-
}
|
|
112
|
+
title="Spatial Resolution"
|
|
113
|
+
tooltip=""
|
|
114
|
+
description={data?.qualitySpatialResolution_line}
|
|
87
115
|
/>
|
|
116
|
+
{data?.classificationTopicCategory && (
|
|
117
|
+
<CclInfoDescription
|
|
118
|
+
title="Topic of Category"
|
|
119
|
+
tooltip=""
|
|
120
|
+
description={
|
|
121
|
+
<Label.Group>
|
|
122
|
+
{data?.classificationTopicCategory &&
|
|
123
|
+
data?.classificationTopicCategory.map((topic, key) => {
|
|
124
|
+
return (
|
|
125
|
+
<Label key={key} color="olive">
|
|
126
|
+
{topic.title}
|
|
127
|
+
</Label>
|
|
128
|
+
);
|
|
129
|
+
})}
|
|
130
|
+
</Label.Group>
|
|
131
|
+
}
|
|
132
|
+
/>
|
|
133
|
+
)}
|
|
134
|
+
{data?.geographicBoundingBox?.items?.length > 0 && (
|
|
135
|
+
<CclInfoDescription
|
|
136
|
+
title="Bounding Boxes"
|
|
137
|
+
tooltip=""
|
|
138
|
+
description={data?.geographicBoundingBox?.items.map((bbox, key) => {
|
|
139
|
+
return <BoundingBoxComponent key={key} bbox={bbox} />;
|
|
140
|
+
})}
|
|
141
|
+
/>
|
|
142
|
+
)}
|
|
143
|
+
{data?.temporalCoverage && (
|
|
144
|
+
<CclInfoDescription
|
|
145
|
+
title="Temporal Extent"
|
|
146
|
+
tooltip=""
|
|
147
|
+
description={
|
|
148
|
+
<Label.Group>
|
|
149
|
+
{data?.temporalCoverage &&
|
|
150
|
+
data?.temporalCoverage.map((year, key) => {
|
|
151
|
+
return (
|
|
152
|
+
<Label key={key} color="olive">
|
|
153
|
+
{year}
|
|
154
|
+
</Label>
|
|
155
|
+
);
|
|
156
|
+
})}
|
|
157
|
+
</Label.Group>
|
|
158
|
+
}
|
|
159
|
+
/>
|
|
160
|
+
)}
|
|
88
161
|
</CclInfoContainer>
|
|
162
|
+
{data?.dataResourceType && (
|
|
163
|
+
<CclInfoContainer>
|
|
164
|
+
<h2>Hierarchy Level</h2>
|
|
165
|
+
<CclInfoDescription
|
|
166
|
+
title="Resource Type"
|
|
167
|
+
tooltip=""
|
|
168
|
+
description={data?.dataResourceType}
|
|
169
|
+
/>
|
|
170
|
+
</CclInfoContainer>
|
|
171
|
+
)}
|
|
172
|
+
{data?.responsiblePartyWithRole?.items &&
|
|
173
|
+
data?.responsiblePartyWithRole?.items?.length > 0 && (
|
|
174
|
+
<CclInfoContainer>
|
|
175
|
+
<h2>Contacts</h2>
|
|
176
|
+
<CclInfoDescription
|
|
177
|
+
title="Responsible Party with Role"
|
|
178
|
+
tooltip=""
|
|
179
|
+
description={data?.responsiblePartyWithRole?.items.map(
|
|
180
|
+
(item, key) => {
|
|
181
|
+
return <ContactComponent key={key} contact={item} />;
|
|
182
|
+
},
|
|
183
|
+
)}
|
|
184
|
+
/>
|
|
185
|
+
</CclInfoContainer>
|
|
186
|
+
)}
|
|
187
|
+
{data?.coordinateReferenceSystemList &&
|
|
188
|
+
data?.coordinateReferenceSystemList.length > 0 && (
|
|
189
|
+
<CclInfoContainer>
|
|
190
|
+
<h2>Reference system info</h2>
|
|
191
|
+
<CclInfoDescription
|
|
192
|
+
title="Coordinate Reference System"
|
|
193
|
+
tooltip="CRS of the resource"
|
|
194
|
+
description={
|
|
195
|
+
<Label.Group>
|
|
196
|
+
{data?.coordinateReferenceSystemList &&
|
|
197
|
+
data?.coordinateReferenceSystemList.map(
|
|
198
|
+
(reference, key) => {
|
|
199
|
+
return (
|
|
200
|
+
<Label key={key} color="olive">
|
|
201
|
+
{reference}
|
|
202
|
+
</Label>
|
|
203
|
+
);
|
|
204
|
+
},
|
|
205
|
+
)}
|
|
206
|
+
</Label.Group>
|
|
207
|
+
}
|
|
208
|
+
/>
|
|
209
|
+
</CclInfoContainer>
|
|
210
|
+
)}
|
|
89
211
|
<CclInfoContainer>
|
|
90
|
-
<h2>
|
|
91
|
-
<CclInfoDescription
|
|
92
|
-
title="Conditions applying to access and use"
|
|
93
|
-
tooltip="Restriction on the access and use of a resource or metadata"
|
|
94
|
-
description={
|
|
95
|
-
<StringToHTML string={data.accessAndUseConstraints?.data} />
|
|
96
|
-
}
|
|
97
|
-
/>
|
|
212
|
+
<h2>Data quality info</h2>
|
|
98
213
|
<CclInfoDescription
|
|
99
|
-
title="
|
|
100
|
-
tooltip="
|
|
214
|
+
title="Specification"
|
|
215
|
+
tooltip="A citation of the implementing rules adopted under Article 7(1) of Directive 2007/2/EC or other specification to which a particular resource conforms"
|
|
101
216
|
description={
|
|
102
|
-
<StringToHTML string={data
|
|
217
|
+
<StringToHTML string={data?.conformitySpecification?.data} />
|
|
103
218
|
}
|
|
104
219
|
/>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
220
|
+
{data?.conformityPass?.title && (
|
|
221
|
+
<CclInfoDescription
|
|
222
|
+
title="Pass"
|
|
223
|
+
tooltip=""
|
|
224
|
+
description={data?.conformityPass?.title}
|
|
225
|
+
/>
|
|
226
|
+
)}
|
|
108
227
|
<CclInfoDescription
|
|
109
|
-
title="
|
|
110
|
-
tooltip="
|
|
111
|
-
description={<StringToHTML string={data
|
|
112
|
-
/>
|
|
113
|
-
<CclInfoDescription
|
|
114
|
-
title="Responsible party role"
|
|
115
|
-
tooltip="Function performed by the party"
|
|
116
|
-
description={
|
|
117
|
-
<StringToHTML string={data.responsiblePartyRole?.data} />
|
|
118
|
-
}
|
|
228
|
+
title="Lineage"
|
|
229
|
+
tooltip="General explanation of the data produce knowledge's about the lineage of a dataset"
|
|
230
|
+
description={<StringToHTML string={data?.qualityLineage?.data} />}
|
|
119
231
|
/>
|
|
120
232
|
</CclInfoContainer>
|
|
233
|
+
{data?.distributionInfo?.items &&
|
|
234
|
+
data?.distributionInfo?.items?.length > 0 && (
|
|
235
|
+
<CclInfoContainer>
|
|
236
|
+
<h2>Distribution info</h2>
|
|
237
|
+
<CclInfoDescription
|
|
238
|
+
title="Resource Locator and Services"
|
|
239
|
+
tooltip=""
|
|
240
|
+
description={data?.distributionInfo?.items.map(
|
|
241
|
+
(resource, key) => {
|
|
242
|
+
return (
|
|
243
|
+
<DistributionInfoComponent key={key} resource={resource} />
|
|
244
|
+
);
|
|
245
|
+
},
|
|
246
|
+
)}
|
|
247
|
+
/>
|
|
248
|
+
</CclInfoContainer>
|
|
249
|
+
)}
|
|
121
250
|
</>
|
|
122
251
|
);
|
|
123
252
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
|
|
3
|
-
import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
|
|
4
2
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
|
|
5
5
|
|
|
6
6
|
export const CLMSEventView = (props) => {
|
|
7
7
|
const { content } = props;
|
|
@@ -12,17 +12,19 @@ export const CLMSEventView = (props) => {
|
|
|
12
12
|
<div className="event-detail-date">
|
|
13
13
|
{new Date(content?.effective).toLocaleDateString()}
|
|
14
14
|
</div>
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
{content?.image && (
|
|
16
|
+
<figure className="news-detail-image">
|
|
17
|
+
<img
|
|
18
|
+
src={
|
|
19
|
+
content?.image
|
|
20
|
+
? content?.image?.download
|
|
21
|
+
: 'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg'
|
|
22
|
+
}
|
|
23
|
+
alt={content?.image ? content?.image?.filename : 'Placeholder'}
|
|
24
|
+
/>
|
|
25
|
+
<figcaption>{content?.image_caption}</figcaption>
|
|
26
|
+
</figure>
|
|
27
|
+
)}
|
|
26
28
|
<div className="event-detail-when">
|
|
27
29
|
<FontAwesomeIcon icon={['far', 'calendar-alt']} />
|
|
28
30
|
<div className="event-detail-when-text">
|
|
@@ -10,17 +10,19 @@ const CLMSNewsItemView = (props) => {
|
|
|
10
10
|
<div className="news-detail-date">
|
|
11
11
|
{new Date(content?.effective).toLocaleDateString()}
|
|
12
12
|
</div>
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
{content?.image && (
|
|
14
|
+
<figure className="news-detail-image">
|
|
15
|
+
<img
|
|
16
|
+
src={
|
|
17
|
+
content?.image
|
|
18
|
+
? content?.image?.download
|
|
19
|
+
: 'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg'
|
|
20
|
+
}
|
|
21
|
+
alt={content?.image ? content?.image?.filename : 'Placeholder'}
|
|
22
|
+
/>
|
|
23
|
+
<figcaption>{content?.image_caption}</figcaption>
|
|
24
|
+
</figure>
|
|
25
|
+
)}
|
|
24
26
|
<div className="news-detail-content">
|
|
25
27
|
<StringToHTML string={content.text?.data || ''} />
|
|
26
28
|
</div>
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Link } from 'react-router-dom';
|
|
3
1
|
import './cards.less';
|
|
4
|
-
|
|
5
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
2
|
+
|
|
6
3
|
import * as mime from 'react-native-mime-types';
|
|
7
4
|
|
|
5
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
6
|
+
import { Link } from 'react-router-dom';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
8
10
|
function bytesToSize(bytes) {
|
|
9
11
|
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
|
|
10
12
|
if (bytes === 0) return '0 Byte';
|
|
@@ -26,7 +28,7 @@ function CclCard(props) {
|
|
|
26
28
|
{type === 'doc' && (
|
|
27
29
|
<>
|
|
28
30
|
<div className="card-doc-title">
|
|
29
|
-
<a href={card?.file?.download ||
|
|
31
|
+
<a href={card?.file?.download || url}>
|
|
30
32
|
{card?.title || 'Card default title'}
|
|
31
33
|
</a>
|
|
32
34
|
</div>
|
|
@@ -47,6 +49,7 @@ function CclCard(props) {
|
|
|
47
49
|
<div className="card-block-image">
|
|
48
50
|
<img
|
|
49
51
|
src={
|
|
52
|
+
card?.image?.scales?.preview?.download ||
|
|
50
53
|
card?.image?.download ||
|
|
51
54
|
'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg'
|
|
52
55
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
1
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import { faInfoCircle } from '@fortawesome/free-solid-svg-icons';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -16,14 +16,16 @@ import { faInfoCircle } from '@fortawesome/free-solid-svg-icons';
|
|
|
16
16
|
</CclInfoDescription>
|
|
17
17
|
*
|
|
18
18
|
*/
|
|
19
|
-
function CclInfoDescription({ title, description, tooltip
|
|
19
|
+
function CclInfoDescription({ title, description, tooltip }) {
|
|
20
20
|
return (
|
|
21
21
|
<div className="dataset-info-field">
|
|
22
22
|
<div className="dataset-field-title">
|
|
23
23
|
<h3>{title}</h3>
|
|
24
|
-
|
|
25
|
-
<
|
|
26
|
-
|
|
24
|
+
{tooltip && (
|
|
25
|
+
<span className="info-icon" tooltip={tooltip} direction="up">
|
|
26
|
+
<FontAwesomeIcon icon={faInfoCircle} />
|
|
27
|
+
</span>
|
|
28
|
+
)}
|
|
27
29
|
</div>
|
|
28
30
|
<div className="dataset-field-description">{description}</div>
|
|
29
31
|
</div>
|
|
@@ -32,7 +34,6 @@ function CclInfoDescription({ title, description, tooltip = 'Info' }) {
|
|
|
32
34
|
|
|
33
35
|
CclInfoDescription.propTypes = {
|
|
34
36
|
title: PropTypes.string.isRequired,
|
|
35
|
-
description: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
|
|
36
|
-
.isRequired,
|
|
37
|
+
description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
37
38
|
};
|
|
38
39
|
export default CclInfoDescription;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { NavLink } from 'react-router-dom';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import cx from 'classnames';
|
|
3
5
|
|
|
4
6
|
function CclTab(props) {
|
|
5
|
-
let { activeTab, tabTitle, onClick } = props;
|
|
7
|
+
let { activeTab, tabTitle, onClick, tabId, routing } = props;
|
|
6
8
|
|
|
7
9
|
function onTabClick() {
|
|
8
|
-
onClick(
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
let className = 'card';
|
|
12
|
-
|
|
13
|
-
if (activeTab === tabTitle) {
|
|
14
|
-
className += ' active';
|
|
10
|
+
onClick(tabId);
|
|
15
11
|
}
|
|
16
|
-
|
|
17
12
|
return (
|
|
18
13
|
<div
|
|
19
|
-
className={
|
|
14
|
+
className={cx('card', activeTab === tabId && 'active')}
|
|
20
15
|
onClick={onTabClick}
|
|
21
16
|
onKeyDown={onTabClick}
|
|
22
17
|
tabIndex="0"
|
|
23
18
|
role="button"
|
|
19
|
+
id={tabId}
|
|
24
20
|
>
|
|
25
|
-
|
|
21
|
+
{routing ? (
|
|
22
|
+
<NavLink to={'#' + tabId}>{tabTitle}</NavLink>
|
|
23
|
+
) : (
|
|
24
|
+
<NavLink to={'#'}>{tabTitle}</NavLink>
|
|
25
|
+
)}
|
|
26
26
|
</div>
|
|
27
27
|
);
|
|
28
28
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import './CclTabs.less';
|
|
2
|
+
|
|
1
3
|
import React, { useState } from 'react';
|
|
2
|
-
|
|
4
|
+
|
|
3
5
|
import CclTab from './CclTab';
|
|
4
|
-
import '
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Tabs component documentation.
|
|
@@ -19,31 +21,50 @@ import './CclTabs.less';
|
|
|
19
21
|
*
|
|
20
22
|
*/
|
|
21
23
|
const CclTabs = (props) => {
|
|
22
|
-
let { children } = props;
|
|
23
|
-
let [activeTab, setActiveTab] = useState(
|
|
24
|
+
let { children, routing = false } = props;
|
|
25
|
+
let [activeTab, setActiveTab] = useState(
|
|
26
|
+
props.children[0].props.tabId ||
|
|
27
|
+
props.children[0].props.tabTitle.replace(' ', ''),
|
|
28
|
+
);
|
|
24
29
|
|
|
25
30
|
function onClickTabItem(tab) {
|
|
26
31
|
setActiveTab(tab);
|
|
27
32
|
}
|
|
33
|
+
React.useEffect(() => {
|
|
34
|
+
const hash = window.location.hash.substring(1) || '';
|
|
35
|
+
if (routing) {
|
|
36
|
+
if (hash) {
|
|
37
|
+
setActiveTab(hash);
|
|
38
|
+
} else {
|
|
39
|
+
setActiveTab(
|
|
40
|
+
children
|
|
41
|
+
.filter((item) => !!item.props.tabTitle)[0]
|
|
42
|
+
.props?.tabTitle?.replace(' ', ''),
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}, [children, routing]);
|
|
28
47
|
|
|
29
48
|
return (
|
|
30
49
|
<div className="ccl-container-flex">
|
|
31
50
|
<div className="left-content cont-w-25">
|
|
32
|
-
<
|
|
51
|
+
<nav className="left-menu">
|
|
33
52
|
{children
|
|
34
53
|
.filter((item) => !!item.props.tabTitle)
|
|
35
|
-
.map((child) => {
|
|
54
|
+
.map((child, key) => {
|
|
36
55
|
const { tabTitle } = child.props;
|
|
37
56
|
return (
|
|
38
57
|
<CclTab
|
|
39
58
|
activeTab={activeTab}
|
|
40
|
-
key={
|
|
59
|
+
key={key}
|
|
60
|
+
routing={routing}
|
|
61
|
+
tabId={tabTitle.replace(' ', '')}
|
|
41
62
|
tabTitle={tabTitle}
|
|
42
63
|
onClick={onClickTabItem}
|
|
43
64
|
/>
|
|
44
65
|
);
|
|
45
66
|
})}
|
|
46
|
-
</
|
|
67
|
+
</nav>
|
|
47
68
|
|
|
48
69
|
{/* Check if underPanel element exist and render */}
|
|
49
70
|
{children
|
|
@@ -59,7 +80,7 @@ const CclTabs = (props) => {
|
|
|
59
80
|
{children
|
|
60
81
|
.filter((item) => !!item.props.tabTitle)
|
|
61
82
|
.map((child, index) => {
|
|
62
|
-
return child.props.tabTitle !== activeTab ? (
|
|
83
|
+
return child.props.tabTitle.replace(' ', '') !== activeTab ? (
|
|
63
84
|
<div key={index} className="deactivate-content">
|
|
64
85
|
{child.props.children}
|
|
65
86
|
</div>
|
|
@@ -5,33 +5,32 @@
|
|
|
5
5
|
* @module components/theme/Header/Header
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import
|
|
9
|
-
import PropTypes from 'prop-types';
|
|
10
|
-
import { connect, useSelector, useDispatch } from 'react-redux';
|
|
8
|
+
import '@eeacms/volto-clms-theme/../theme/clms/css/header.css';
|
|
11
9
|
|
|
10
|
+
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
12
11
|
import { Logo, Navigation, SearchWidget } from '@plone/volto/components';
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import { compose } from 'redux';
|
|
12
|
+
import React, { Component, useEffect } from 'react';
|
|
13
|
+
import { connect, useDispatch, useSelector } from 'react-redux';
|
|
16
14
|
|
|
17
15
|
import { BodyClass } from '@plone/volto/helpers';
|
|
18
|
-
|
|
19
16
|
import CclLanguageSelector from '@eeacms/volto-clms-theme/components/CclLanguageSelector/CclLanguageSelector';
|
|
17
|
+
import CclLoginModal from '@eeacms/volto-clms-theme/components/CclLoginModal/CclLoginModal';
|
|
20
18
|
import CclTopMainMenu from '@eeacms/volto-clms-theme/components/CclTopMainMenu/CclTopMainMenu';
|
|
21
|
-
|
|
22
|
-
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
23
19
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
20
|
+
import { Link } from 'react-router-dom';
|
|
21
|
+
import PropTypes from 'prop-types';
|
|
22
|
+
import { compose } from 'redux';
|
|
24
23
|
// import { CART_SESSION_KEY } from '@eeacms/volto-clms-theme/utils/useCartState';
|
|
25
24
|
import { getCartItems } from '@eeacms/volto-clms-utils/actions';
|
|
26
|
-
import '@
|
|
27
|
-
import
|
|
28
|
-
|
|
25
|
+
import { getUser } from '@plone/volto/actions';
|
|
26
|
+
import jwtDecode from 'jwt-decode';
|
|
27
|
+
|
|
29
28
|
// import useCartState from '@eeacms/volto-clms-theme/utils/useCartState';
|
|
30
29
|
|
|
31
30
|
const CartIconCounter = (props) => {
|
|
32
31
|
const { cart_items, users, intl } = useSelector((state) => state);
|
|
33
32
|
|
|
34
|
-
const cart = cart_items.items;
|
|
33
|
+
const cart = cart_items.items || [];
|
|
35
34
|
const user_id = users.user.id;
|
|
36
35
|
|
|
37
36
|
const dispatch = useDispatch();
|
|
@@ -39,7 +38,6 @@ const CartIconCounter = (props) => {
|
|
|
39
38
|
dispatch(getCartItems(user_id));
|
|
40
39
|
}, [user_id, dispatch]);
|
|
41
40
|
return (
|
|
42
|
-
cart?.length !== 0 &&
|
|
43
41
|
cart && (
|
|
44
42
|
<>
|
|
45
43
|
<span>
|
|
@@ -248,6 +246,7 @@ class Header extends Component {
|
|
|
248
246
|
{(this.props.user.id && (
|
|
249
247
|
<>
|
|
250
248
|
<li>
|
|
249
|
+
<CartIconCounter />
|
|
251
250
|
<Link
|
|
252
251
|
to={`/${this.props.locale}/profile`}
|
|
253
252
|
className="header-login-link"
|
|
@@ -280,6 +279,8 @@ class Header extends Component {
|
|
|
280
279
|
</>
|
|
281
280
|
)) || (
|
|
282
281
|
<li>
|
|
282
|
+
<CartIconCounter />
|
|
283
|
+
|
|
283
284
|
<Link
|
|
284
285
|
to={`/${this.props.locale}/login`}
|
|
285
286
|
className="header-login-link"
|