@eeacms/volto-clms-theme 1.0.35 → 1.0.36

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.
@@ -1 +1,9 @@
1
- module.exports = require('@plone/volto/babel');
1
+ const defaultBabel = require('@plone/volto/babel');
2
+
3
+ function applyDefault(api) {
4
+ const voltoBabel = defaultBabel(api);
5
+ voltoBabel.plugins.push('@babel/plugin-transform-modules-commonjs', 'transform-class-properties', 'istanbul');
6
+ return voltoBabel;
7
+ }
8
+
9
+ module.exports = applyDefault;
@@ -0,0 +1,46 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const projectRootPath = fs.realpathSync('./project'); // __dirname
5
+ // const packageJson = require(path.join(projectRootPath, 'package.json'));
6
+ const jsConfig = require(path.join(projectRootPath, 'jsconfig.json')).compilerOptions;
7
+
8
+ const pathsConfig = jsConfig.paths;
9
+
10
+ let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto');
11
+
12
+ Object.keys(pathsConfig).forEach(pkg => {
13
+ if (pkg === '@plone/volto') {
14
+ voltoPath = `./${jsConfig.baseUrl}/${pathsConfig[pkg][0]}`;
15
+ }
16
+ });
17
+ const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
18
+ const reg = new AddonConfigurationRegistry(projectRootPath);
19
+
20
+ // Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
21
+ const addonAliases = Object.keys(reg.packages).map(o => [
22
+ o,
23
+ reg.packages[o].modulePath,
24
+ ]);
25
+
26
+
27
+ module.exports = {
28
+ extends: `${projectRootPath}/node_modules/@plone/volto/.eslintrc`,
29
+ settings: {
30
+ 'import/resolver': {
31
+ alias: {
32
+ map: [
33
+ ['@plone/volto', '@plone/volto/src'],
34
+ ...addonAliases,
35
+ ['@package', `${__dirname}/src`],
36
+ ['~', `${__dirname}/src`],
37
+ ],
38
+ extensions: ['.js', '.jsx', '.json'],
39
+ },
40
+ 'babel-plugin-root-import': {
41
+ rootPathSuffix: 'src',
42
+ },
43
+ },
44
+ },
45
+ };
46
+
package/.release-it.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
+ "npm": {
3
+ "publish": false
4
+ },
2
5
  "git": {
3
6
  "commitMessage": "Automated release ${version}",
4
7
  "requireBranch": "develop",
5
- "requireCleanWorkingDir": false,
6
- "git.requireCommits": true
8
+ "changelog": "npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs",
9
+ "tagName": "${version}"
7
10
  },
8
11
  "github": {
9
- "release": false,
12
+ "release": true,
10
13
  "releaseName": "${version}",
11
14
  "releaseNotes": "npx auto-changelog --stdout --sort-commits date --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs"
12
15
  },
13
- "npm": {
14
- "publish": false
15
- },
16
16
  "hooks": {
17
17
  "after:bump": "npx auto-changelog --sort-commits date --commit-limit false -p"
18
18
  }
package/CHANGELOG.md CHANGED
@@ -4,8 +4,38 @@ 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.36](https://github.com/eea/volto-clms-theme/compare/1.0.35...1.0.36)
8
+
9
+ - Unification work based on volto-sustainability-theme [`#103`](https://github.com/eea/volto-clms-theme/pull/103)
10
+ - Footer, Service desk and work oportunities corrections [`#104`](https://github.com/eea/volto-clms-theme/pull/104)
11
+ - add volto-arcgis-block dependency [`c698fd9`](https://github.com/eea/volto-clms-theme/commit/c698fd9f2915d706c97118511e9c7f895baa4f94)
12
+ - add needed addons [`9ff03af`](https://github.com/eea/volto-clms-theme/commit/9ff03af81e84e989366b90180476270c036825cd)
13
+ - reorganize packages.json [`6a574a7`](https://github.com/eea/volto-clms-theme/commit/6a574a7877e9637041f2a32f2bcea0d79b3eeec7)
14
+ - Footer 'expert support provided by' hidden temporaly [`a6815ef`](https://github.com/eea/volto-clms-theme/commit/a6815efd3e6715c6f6e4e70f9e54ac01ed230f18)
15
+ - work oportunities open/close status fixed [`1f28116`](https://github.com/eea/volto-clms-theme/commit/1f2811641ca4752100574f12e16c9abab2c23e8a)
16
+ - Work opportunities working without is_open checkbox [`1f64c61`](https://github.com/eea/volto-clms-theme/commit/1f64c612d67470bf56fd2fd63cbd8f1dc7e80242)
17
+ - work oportunities open/close depends on submission deadline [`a35d5c9`](https://github.com/eea/volto-clms-theme/commit/a35d5c98c343190b45c3fc7052e1db47e12d45b8)
18
+ - change class with className and for with htmlFor [`1b0b8d4`](https://github.com/eea/volto-clms-theme/commit/1b0b8d4876e6fa8f92d907428062d753a06f7bb1)
19
+ - service desk link and style fix [`85479e8`](https://github.com/eea/volto-clms-theme/commit/85479e8124fd176920ae177a3b01f9fe282e383e)
20
+ - Service desk view created [`d7dec45`](https://github.com/eea/volto-clms-theme/commit/d7dec45ef8cfe5e199a0b31d84ebddc5f6e4a608)
21
+ - FAQ style fixed when using a listing block inside acordion block [`ca26614`](https://github.com/eea/volto-clms-theme/commit/ca2661459d3454a5749d23de4c5210bb735b748c)
22
+ - correction in card [`6830866`](https://github.com/eea/volto-clms-theme/commit/683086608caf1d1c127db423a24867b5da125aea)
23
+ - upgrade kitkat [`2f9b905`](https://github.com/eea/volto-clms-theme/commit/2f9b9058d29d48d6f4d7dd6f04840c0076d202ae)
24
+ - merge develop into branch [`26aa1dc`](https://github.com/eea/volto-clms-theme/commit/26aa1dc087dafdc568f1ca3cbb62dbd1ef730502)
25
+ - add commitMessage and requireBranch [`adfc26f`](https://github.com/eea/volto-clms-theme/commit/adfc26f2a87b89b9e7881d591c6215e8467242cd)
26
+ - remove slate dependency [`1863b3c`](https://github.com/eea/volto-clms-theme/commit/1863b3c8e6df0cd4a43ca059ef72ea9804cc5371)
27
+ - add kitkat to dependencies [`5a64f80`](https://github.com/eea/volto-clms-theme/commit/5a64f8068bf3ce33de1685219a50be612450cb05)
28
+ - add kitkat to dependencies [`773a7ed`](https://github.com/eea/volto-clms-theme/commit/773a7ed6cb63fde1eedf52a2eb84f918dc7a439d)
29
+ - unification procces [`63b7258`](https://github.com/eea/volto-clms-theme/commit/63b7258fbe6701f5e4cc4fd1a960446a3b6614cf)
30
+ - package.json modifications [`deade8e`](https://github.com/eea/volto-clms-theme/commit/deade8ea5bad7fe91ecfdaed83ef0fb0afe56ef2)
31
+ - card change [`7f25b11`](https://github.com/eea/volto-clms-theme/commit/7f25b11f2aa49eab7d43f3efe894775ccf8ba217)
32
+ - block card style fix [`06d9631`](https://github.com/eea/volto-clms-theme/commit/06d9631b7fb4188600faa1eb05c8bbad335c2a58)
33
+ - Service desk view first commit [`468289d`](https://github.com/eea/volto-clms-theme/commit/468289def4edcca58c2bf2771c0c14cf89003e4c)
34
+
7
35
  #### [1.0.35](https://github.com/eea/volto-clms-theme/compare/1.0.34...1.0.35)
8
36
 
37
+ > 26 October 2021
38
+
9
39
  - Develop into master [`#105`](https://github.com/eea/volto-clms-theme/pull/105)
10
40
  - remove slate from addons [`5eaa93c`](https://github.com/eea/volto-clms-theme/commit/5eaa93cd3d3aba1680137236d92b43816a0289e5)
11
41
  - removed volto-slate dependency [`a1ba7e5`](https://github.com/eea/volto-clms-theme/commit/a1ba7e50779400df9748ca0ec46f336945d97994)
package/DEVELOP.md CHANGED
@@ -6,13 +6,11 @@ Before starting make sure your development environment is properly set. See [Vol
6
6
 
7
7
  1. Make sure you have installed `yo`, `@plone/generator-volto` and `mrs-developer`
8
8
 
9
- $ npm install -g yo
10
- $ npm install -g @plone/generator-volto
11
- $ npm install -g mrs-developer
9
+ $ npm install -g yo @plone/generator-volto mrs-developer
12
10
 
13
11
  1. Create new volto app
14
12
 
15
- $ yo @plone/volto my-volto-project --addon @eeacms/volto-addon-template
13
+ $ yo @plone/volto my-volto-project --addon @eeacms/volto-clms-theme --skip-install
16
14
  $ cd my-volto-project
17
15
 
18
16
  1. Add the following to `mrs.developer.json`:
package/Makefile ADDED
@@ -0,0 +1,39 @@
1
+ SHELL=/bin/bash
2
+
3
+ DIR=$(shell basename $$(pwd))
4
+ ADDON ?= "@eeacms/volto-clms-theme"
5
+
6
+ # We like colors
7
+ # From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects
8
+ RED=`tput setaf 1`
9
+ GREEN=`tput setaf 2`
10
+ RESET=`tput sgr0`
11
+ YELLOW=`tput setaf 3`
12
+
13
+ project:
14
+ npm install -g yo
15
+ npm install -g @plone/generator-volto
16
+ npm install -g mrs-developer
17
+ yo @plone/volto project --addon ${ADDON} --workspace "src/addons/${DIR}" --no-interactive
18
+ ln -sf $$(pwd) project/src/addons/
19
+ cp .project.eslintrc.js .eslintrc.js
20
+ cd project && yarn
21
+ @echo "-------------------"
22
+ @echo "$(GREEN)Volto project is ready!$(RESET)"
23
+ @echo "$(RED)Now run: cd project && yarn start$(RESET)"
24
+
25
+ all: project
26
+
27
+ .PHONY: start-test-backend
28
+ start-test-backend: ## Start Test Plone Backend
29
+ @echo "$(GREEN)==> Start Test Plone Backend$(RESET)"
30
+ docker run -i --rm -e ZSERVER_HOST=0.0.0.0 -e ZSERVER_PORT=55001 -p 55001:55001 -e SITE=plone -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,kitconcept.volto:default-homepage -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,kitconcept.volto,kitconcept.volto.cors -e ADDONS='plone.app.robotframework plone.app.contenttypes plone.restapi kitconcept.volto' plone ./bin/robot-server plone.app.robotframework.testing.PLONE_ROBOT_TESTING
31
+
32
+ .PHONY: start-backend-docker
33
+ start-backend-docker: ## Starts a Docker-based backend
34
+ @echo "$(GREEN)==> Start Docker-based Plone Backend$(RESET)"
35
+ docker run -it --rm --name=plone -p 8080:8080 -e SITE=Plone -e ADDONS="kitconcept.volto" -e ZCML="kitconcept.volto.cors" plone
36
+
37
+ .PHONY: help
38
+ help: ## Show this help.
39
+ @echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
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",
@@ -27,21 +27,36 @@
27
27
  "@eeacms/volto-tabs-block"
28
28
  ],
29
29
  "dependencies": {
30
+ "@eeacms/volto-tabs-block": "1.2.7",
31
+ "@eeacms/volto-accordion-block": "3.4.7",
32
+ "@eeacms/volto-columns-block": "4.4.3",
33
+ "@eeacms/volto-metadata-block": "^2.1.0",
34
+ "@eeacms/volto-resize-helper": "0.2.1",
30
35
  "volto-dropdownmenu": "2.2.7",
31
- "@eeacms/volto-arcgis-block": "0.1.11",
32
36
  "@fortawesome/fontawesome-svg-core": "1.2.35",
33
37
  "@fortawesome/free-solid-svg-icons": "5.15.3",
34
38
  "@fortawesome/free-regular-svg-icons": "5.15.3",
35
39
  "@fortawesome/react-fontawesome": "0.1.14",
36
- "@eeacms/volto-tabs-block": "1.2.7",
37
40
  "react-slick": "0.28.1",
38
41
  "slick-carousel": "1.8.1",
39
- "@eeacms/volto-accordion-block": "3.4.4",
40
- "@eeacms/volto-columns-block": "4.4.3",
41
- "@eeacms/volto-metadata-block": "^2.1.0",
42
42
  "react-svg": "14.0.4",
43
- "react-native-mime-types": "2.3.0",
44
- "@eeacms/volto-resize-helper": "0.2.1"
43
+ "@eeacms/volto-arcgis-block": "*",
44
+ "react-native-mime-types": "2.3.0"
45
+ },
46
+ "devDependencies": {
47
+ "eslint": "^6.8.0",
48
+ "eslint-config-prettier": "^8.2.0",
49
+ "eslint-plugin-prettier": "3.1.3",
50
+ "eslint-plugin-react-app": "^6.2.2",
51
+ "husky": "6.0.0",
52
+ "jsconfig": "^0.2.0",
53
+ "prettier": "2.0.5",
54
+ "prettier-eslint": "^12.0.0",
55
+ "stylelint": "^13.12.0",
56
+ "stylelint-config-idiomatic-order": "8.1.0",
57
+ "stylelint-prettier": "1.1.2",
58
+ "@cypress/code-coverage": "^3.9.5",
59
+ "babel-plugin-transform-class-properties": "^6.24.1"
45
60
  },
46
61
  "prettier": {
47
62
  "trailingComma": "all",
@@ -94,20 +109,5 @@
94
109
  "cypress:open": "NODE_ENV=production CYPRESS_API=plone ../../../node_modules/cypress/bin/cypress open",
95
110
  "precommit": "yarn stylelint && yarn prettier && yarn lint",
96
111
  "prepare": "husky install"
97
- },
98
- "devDependencies": {
99
- "eslint": "^6.8.0",
100
- "eslint-config-prettier": "^8.2.0",
101
- "eslint-plugin-prettier": "3.1.3",
102
- "eslint-plugin-react-app": "^6.2.2",
103
- "husky": "6.0.0",
104
- "jsconfig": "^0.2.0",
105
- "prettier": "2.0.5",
106
- "prettier-eslint": "^12.0.0",
107
- "stylelint": "^13.12.0",
108
- "stylelint-config-idiomatic-order": "8.1.0",
109
- "stylelint-prettier": "1.1.2",
110
- "@cypress/code-coverage": "^3.9.5",
111
- "babel-plugin-transform-class-properties": "^6.24.1"
112
112
  }
113
113
  }
@@ -36,17 +36,33 @@ const CclWorkOpportunity = (props) => {
36
36
  );
37
37
  };
38
38
 
39
+ function formatDate(date) {
40
+ var d = new Date(date),
41
+ month = '' + (d.getMonth() + 1),
42
+ day = '' + d.getDate(),
43
+ year = d.getFullYear();
44
+
45
+ if (month.length < 2) month = '0' + month;
46
+ if (day.length < 2) day = '0' + day;
47
+
48
+ return [year, month, day].join('-');
49
+ }
50
+
51
+ var Today = formatDate(Date.now());
52
+
39
53
  const CclListingWorkOpportunities = (props) => {
40
54
  const { items, variation } = props;
41
55
  const intl = useIntl();
42
56
 
43
57
  const regex = /CclWO/;
44
58
  const status = variation?.replace(regex, '');
45
-
46
59
  return (
47
60
  <>
48
61
  {items
49
- .filter((item) => item.is_open && status === 'OpenTenders')
62
+ .filter(
63
+ (item) =>
64
+ item.submission_deadline < Today && status === 'CloseTenders',
65
+ )
50
66
  .map((item, index) => (
51
67
  <CclWorkOpportunity
52
68
  key={index}
@@ -55,7 +71,10 @@ const CclListingWorkOpportunities = (props) => {
55
71
  ></CclWorkOpportunity>
56
72
  ))}
57
73
  {items
58
- .filter((item) => !item.is_open && status === 'CloseTenders')
74
+ .filter(
75
+ (item) =>
76
+ item.submission_deadline > Today && status === 'OpenTenders',
77
+ )
59
78
  .map((item, index) => (
60
79
  <CclWorkOpportunity
61
80
  key={index}
@@ -0,0 +1,112 @@
1
+ /* eslint-disable jsx-a11y/label-has-associated-control */
2
+ import React from 'react';
3
+ import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
4
+
5
+ const ServiceDeskView = () => {
6
+ return (
7
+ <>
8
+ <div className="ui container">
9
+ <section className="page-section">
10
+ <h1 className="page-title">Service desk</h1>
11
+ <div className="page-description">
12
+ <p>
13
+ Have you checked our <a href="/en/faq">FAQ section</a>? If you
14
+ haven't found an answer to your problem or question, please fill
15
+ in this form to contact the Copernicus land service desk.
16
+ </p>
17
+ <p>
18
+ We will try to respond as soon as possible within office working
19
+ hours from Monday to Friday.
20
+ </p>
21
+ <p>Please note, that the support is provided in English only.</p>
22
+ </div>
23
+ <div className="ccl-container">
24
+ <form className="ccl-form user-form contact-form">
25
+ <div className="ccl-fieldset">
26
+ <div className="ccl-form-group">
27
+ <label
28
+ className="ccl-form-label"
29
+ htmlFor="contact_form_email"
30
+ >
31
+ E-mail
32
+ </label>
33
+ <span className="label-required">*</span>
34
+ <input
35
+ type="text"
36
+ className="ccl-text-input"
37
+ id="contact_form_email"
38
+ name=""
39
+ placeholder="Enter an email address"
40
+ />
41
+ </div>
42
+ <div className="ccl-form-group">
43
+ <label
44
+ className="ccl-form-label"
45
+ htmlFor="contact_form_subject"
46
+ >
47
+ Subject
48
+ </label>
49
+ <span className="label-required">*</span>
50
+ <span className="form-tip">
51
+ A short indication of the problem, question or issue, i.e.
52
+ login, download, errors in the product, thematic question
53
+ etc.
54
+ </span>
55
+ <input
56
+ type="text"
57
+ className="ccl-text-input"
58
+ id="contact_form_subject"
59
+ name=""
60
+ placeholder="Enter an subject"
61
+ />
62
+ </div>
63
+ <div className="ccl-form-group">
64
+ <label
65
+ className="ccl-form-label"
66
+ htmlFor="contact_form_message"
67
+ >
68
+ Message
69
+ </label>
70
+ <span className="label-required">*</span>
71
+ <span className="form-tip">
72
+ A short description of the problem, question or issue.
73
+ Please don't forget to specify which product(s) you are
74
+ referring to in your message.
75
+ </span>
76
+ <textarea
77
+ className="ccl-textarea"
78
+ id="contact_form_message"
79
+ name=""
80
+ cols="30"
81
+ rows="10"
82
+ placeholder="Enter a message"
83
+ ></textarea>
84
+ </div>
85
+ <div className="ccl-form-group">
86
+ <label
87
+ className="ccl-form-label"
88
+ htmlFor="contact_form_verification"
89
+ >
90
+ Verification
91
+ </label>
92
+ <span className="label-required">*</span>
93
+ <div className="validation-image"></div>
94
+ <input
95
+ type="text"
96
+ className="ccl-text-input"
97
+ id="contact_form_verification"
98
+ name=""
99
+ placeholder="Enter validation code"
100
+ />
101
+ </div>
102
+ </div>
103
+ <CclButton mode="default">Submit</CclButton>
104
+ </form>
105
+ </div>
106
+ </section>
107
+ </div>
108
+ </>
109
+ );
110
+ };
111
+
112
+ export default ServiceDeskView;
@@ -325,10 +325,10 @@ const Footer = () => {
325
325
  </a>
326
326
  <span>{intl.formatMessage(messages.jointResearchCenter)}</span>
327
327
  </div>
328
- <div className="ccl-footer-col-title">
328
+ {/* <div className="ccl-footer-col-title">
329
329
  {intl.formatMessage(messages.expertSupportProvidedBy)}
330
330
  </div>
331
- <p>{intl.formatMessage(messages.EIONETActionGroup)}</p>
331
+ <p>{intl.formatMessage(messages.EIONETActionGroup)}</p> */}
332
332
  </CclFooterColumn>
333
333
  </div>
334
334
  </div>
package/src/index.js CHANGED
@@ -10,6 +10,7 @@ import CLMSMeetingSubscribersView from '@eeacms/volto-clms-theme/components/CLMS
10
10
  import CLMSMeetingEmailsView from '@eeacms/volto-clms-theme/components/CLMSMeetingView/CLMSMeetingEmailsView';
11
11
  import CLMSMeetingEmailView from '@eeacms/volto-clms-theme/components/CLMSMeetingView/CLMSMeetingEmailView';
12
12
  import CLMSMeetingSubscriberView from '@eeacms/volto-clms-theme/components/CLMSMeetingView/CLMSMeetingSubscriberView';
13
+ import ServiceDeskView from '@eeacms/volto-clms-theme/components/CLMSServiceDeskView/CLMSServiceDeskView';
13
14
  // WIDGET IMPORTS
14
15
  import TabsWidget from './components/Blocks/CustomTemplates/VoltoTabsBlock/TabsWidget';
15
16
  import BoundingWidget from './components/Widgets/BoundingWidget';
@@ -104,6 +105,10 @@ const applyConfig = (config) => {
104
105
  path: '/**/profile',
105
106
  component: ProfileView,
106
107
  },
108
+ {
109
+ path: '/**/contact-service-desk',
110
+ component: ServiceDeskView,
111
+ },
107
112
  {
108
113
  path: '/**/download-by-area',
109
114
  component: CLMSMapViewerView,
@@ -25,7 +25,7 @@
25
25
  h2.accordion-title span::before {
26
26
  margin-right: 1rem;
27
27
  color: #a0b128;
28
- content: "Q";
28
+ content: 'Q';
29
29
  float: left;
30
30
  font-size: 1.75rem;
31
31
  line-height: 1.125rem;
@@ -36,6 +36,11 @@
36
36
  margin-bottom: 0.5rem;
37
37
  }
38
38
 
39
+ .accordion-block > .accordion > .content > .rah-static > div {
40
+ width: 100%;
41
+ margin-bottom: 0.5rem;
42
+ }
43
+
39
44
  .accordion .content {
40
45
  padding: 1rem !important;
41
46
  border-left: solid 4px #adb0b8;
@@ -49,7 +54,7 @@
49
54
  .accordion .content > div::before {
50
55
  margin-right: 1rem;
51
56
  color: #adb0b8;
52
- content: "A";
57
+ content: 'A';
53
58
  float: left;
54
59
  font-size: 1.75rem;
55
60
  font-weight: bold;