@eeacms/volto-clms-theme 1.0.45 → 1.0.49
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 +53 -0
- package/Jenkinsfile +15 -5
- 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 +16 -22
- 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/CclLoginModal/CclLoginModal.jsx +0 -6
- package/src/components/CclTab/CclTab.jsx +8 -11
- package/src/components/CclTab/CclTabs.jsx +23 -8
- package/theme/clms/css/block-form.less +62 -0
- package/theme/clms/css/menu.css +4 -0
- package/theme/clms/css/styles.less +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,61 @@ 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.49](https://github.com/eea/volto-clms-theme/compare/1.0.48...1.0.49)
|
|
8
|
+
|
|
9
|
+
- labels and conformity pass [`59be2fd`](https://github.com/eea/volto-clms-theme/commit/59be2fd5034fdfed211c4e0b0872504432e254e9)
|
|
10
|
+
- image [`47cc7dc`](https://github.com/eea/volto-clms-theme/commit/47cc7dc37974848f2d90cdf6a035970620489cf8)
|
|
11
|
+
|
|
12
|
+
#### [1.0.48](https://github.com/eea/volto-clms-theme/compare/1.0.47...1.0.48)
|
|
13
|
+
|
|
14
|
+
> 16 December 2021
|
|
15
|
+
|
|
16
|
+
- Develop [`#156`](https://github.com/eea/volto-clms-theme/pull/156)
|
|
17
|
+
- dataset view [`38faa9d`](https://github.com/eea/volto-clms-theme/commit/38faa9d291e22c92a1c9049c7241555b2300f830)
|
|
18
|
+
- tab editor [`cfbcf74`](https://github.com/eea/volto-clms-theme/commit/cfbcf742b370cc665c689a2480a09d3b640dc318)
|
|
19
|
+
- remove required to description in proptypes [`9f6da1d`](https://github.com/eea/volto-clms-theme/commit/9f6da1d9c2125865c329a263d0a7b3e771baa287)
|
|
20
|
+
- map keys [`6be4246`](https://github.com/eea/volto-clms-theme/commit/6be424624a61f867f85b6d914811111405ebeb98)
|
|
21
|
+
- add resolutions to package.json volto-slate and react-slick [`54460ad`](https://github.com/eea/volto-clms-theme/commit/54460addb4c4644a03e6af2f94e5c75ee5154bf3)
|
|
22
|
+
- check if items is not null [`26b4399`](https://github.com/eea/volto-clms-theme/commit/26b439981ca354b0f372bdf09a112a58482f2d4b)
|
|
23
|
+
- fix subtab functionality and show subtab in editor [`ece4408`](https://github.com/eea/volto-clms-theme/commit/ece4408bd557a1d2f2868733e1560e2853da1822)
|
|
24
|
+
|
|
25
|
+
#### [1.0.47](https://github.com/eea/volto-clms-theme/compare/1.0.46...1.0.47)
|
|
26
|
+
|
|
27
|
+
> 16 December 2021
|
|
28
|
+
|
|
29
|
+
- Develop [`#155`](https://github.com/eea/volto-clms-theme/pull/155)
|
|
30
|
+
- use smaller images in Cards [`#147`](https://github.com/eea/volto-clms-theme/pull/147)
|
|
31
|
+
- Demo modifications [`#154`](https://github.com/eea/volto-clms-theme/pull/154)
|
|
32
|
+
- Geonetwork fields [`#153`](https://github.com/eea/volto-clms-theme/pull/153)
|
|
33
|
+
- Sub tab option created [`#152`](https://github.com/eea/volto-clms-theme/pull/152)
|
|
34
|
+
- add Role label [`ae98fda`](https://github.com/eea/volto-clms-theme/commit/ae98fdac159d385554a67d3a0690ba17b5dfa244)
|
|
35
|
+
- show all the fields of geonetwork [`9eae556`](https://github.com/eea/volto-clms-theme/commit/9eae55614a26e84613dd747451e9a3fb864a6ac4)
|
|
36
|
+
- if parent tab is clicked sub tab is opened [`5cc5d1c`](https://github.com/eea/volto-clms-theme/commit/5cc5d1c93691985965640499951e0a905da8acbb)
|
|
37
|
+
- add the content url to the simple line listing template [`6ad396f`](https://github.com/eea/volto-clms-theme/commit/6ad396fdaf1850a3d509f4f640e421278341b74b)
|
|
38
|
+
- pretier fix on text carousel [`5e18334`](https://github.com/eea/volto-clms-theme/commit/5e183349cf13b6f2739dbbfbbd48617bc6c9c34c)
|
|
39
|
+
- SubTab style set [`73d9fa8`](https://github.com/eea/volto-clms-theme/commit/73d9fa85b05055b180409927583b71dc0a562f0f)
|
|
40
|
+
- remove default image from New and Event view [`0ef541d`](https://github.com/eea/volto-clms-theme/commit/0ef541dbede5316c46f48585b9728a672f03b7ad)
|
|
41
|
+
- use smaller images [`a545b9e`](https://github.com/eea/volto-clms-theme/commit/a545b9ed547fa124903b66987e6d7b3e46c17146)
|
|
42
|
+
|
|
43
|
+
#### [1.0.46](https://github.com/eea/volto-clms-theme/compare/1.0.45...1.0.46)
|
|
44
|
+
|
|
45
|
+
> 15 December 2021
|
|
46
|
+
|
|
47
|
+
- Develop [`#151`](https://github.com/eea/volto-clms-theme/pull/151)
|
|
48
|
+
- volto-form-block style [`#150`](https://github.com/eea/volto-clms-theme/pull/150)
|
|
49
|
+
- Bugs n improvements [`#149`](https://github.com/eea/volto-clms-theme/pull/149)
|
|
50
|
+
- Develop [`#148`](https://github.com/eea/volto-clms-theme/pull/148)
|
|
51
|
+
- li styles [`3b01bbf`](https://github.com/eea/volto-clms-theme/commit/3b01bbf09c1b60bde0bf101f8ca5382ded58763b)
|
|
52
|
+
- h1 display block [`5e922f6`](https://github.com/eea/volto-clms-theme/commit/5e922f60c4e5ce19c5b6949dab494add2140dd6e)
|
|
53
|
+
- dataset catalogue h1 display [`e88a6c8`](https://github.com/eea/volto-clms-theme/commit/e88a6c88b6ed3ddad765f9d4161ca405de04ecb4)
|
|
54
|
+
- fixed CclLoginModal PropTypes [`09db647`](https://github.com/eea/volto-clms-theme/commit/09db647d09af66ea717c0b9be1650bd99882c6e6)
|
|
55
|
+
- ESLint fix [`e4d19cd`](https://github.com/eea/volto-clms-theme/commit/e4d19cd1d78a8a1e82d606d6f3ac586c6122b8e2)
|
|
56
|
+
|
|
7
57
|
#### [1.0.45](https://github.com/eea/volto-clms-theme/compare/1.0.44...1.0.45)
|
|
8
58
|
|
|
59
|
+
> 13 December 2021
|
|
60
|
+
|
|
61
|
+
- Develop [`#143`](https://github.com/eea/volto-clms-theme/pull/143)
|
|
9
62
|
- Geonetwork importer [`#146`](https://github.com/eea/volto-clms-theme/pull/146)
|
|
10
63
|
- @userschema endpoint based dynamic user profile form [`#145`](https://github.com/eea/volto-clms-theme/pull/145)
|
|
11
64
|
- Changes after the release of ftw.tokenauth 2.0+cs5 [`#144`](https://github.com/eea/volto-clms-theme/pull/144)
|
package/Jenkinsfile
CHANGED
|
@@ -31,8 +31,8 @@ pipeline {
|
|
|
31
31
|
when {
|
|
32
32
|
allOf {
|
|
33
33
|
environment name: 'CHANGE_ID', value: ''
|
|
34
|
-
not { branch 'master' }
|
|
35
34
|
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
35
|
+
not { branch 'master' }
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
steps {
|
|
@@ -63,7 +63,10 @@ pipeline {
|
|
|
63
63
|
when {
|
|
64
64
|
allOf {
|
|
65
65
|
environment name: 'CHANGE_ID', value: ''
|
|
66
|
-
|
|
66
|
+
anyOf {
|
|
67
|
+
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
68
|
+
branch 'master'
|
|
69
|
+
}
|
|
67
70
|
}
|
|
68
71
|
}
|
|
69
72
|
steps {
|
|
@@ -108,7 +111,10 @@ pipeline {
|
|
|
108
111
|
when {
|
|
109
112
|
allOf {
|
|
110
113
|
environment name: 'CHANGE_ID', value: ''
|
|
111
|
-
|
|
114
|
+
anyOf {
|
|
115
|
+
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
116
|
+
branch 'master'
|
|
117
|
+
}
|
|
112
118
|
}
|
|
113
119
|
}
|
|
114
120
|
steps {
|
|
@@ -159,12 +165,16 @@ pipeline {
|
|
|
159
165
|
|
|
160
166
|
stage('Report to SonarQube') {
|
|
161
167
|
when {
|
|
168
|
+
allOf {
|
|
162
169
|
environment name: 'CHANGE_ID', value: ''
|
|
163
170
|
anyOf {
|
|
164
171
|
branch 'master'
|
|
165
|
-
|
|
172
|
+
allOf {
|
|
173
|
+
branch 'develop'
|
|
174
|
+
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
175
|
+
}
|
|
166
176
|
}
|
|
167
|
-
|
|
177
|
+
}
|
|
168
178
|
}
|
|
169
179
|
steps {
|
|
170
180
|
node(label: 'swarm') {
|
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.49",
|
|
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={() => {
|
|
@@ -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;
|