@eeacms/volto-clms-theme 1.0.51 → 1.0.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/Jenkinsfile +3 -2
  3. package/README.md +1 -1
  4. package/cypress/integration/block-basics.js +3 -3
  5. package/package.json +2 -6
  6. package/src/actions/datasets_by_uid/datasets_by_uid.js +20 -0
  7. package/src/actions/index.js +5 -0
  8. package/src/components/Blocks/CclHomeBgImageBlock/CclGreenBgView.jsx +2 -2
  9. package/src/components/Blocks/CclHomeProductsBlock/CclHomeProductsBlockEdit.jsx +4 -0
  10. package/src/components/Blocks/CclTextLinkCarouselBlock/CclTextLinkCarouselView.jsx +3 -3
  11. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclCarouselView.jsx +10 -9
  12. package/src/components/Blocks/customBlocks.js +165 -174
  13. package/src/components/CLMSDownloadCartView/CLMSCartContent.jsx +199 -224
  14. package/src/components/CLMSDownloadCartView/CLMSDownloadCartView.jsx +8 -7
  15. package/src/components/CLMSDownloadCartView/CLMSTasksInProgress.jsx +4 -14
  16. package/src/components/CLMSDownloadCartView/cartUtils.js +75 -0
  17. package/src/components/CLMSDownloadCartView/conversion.js +1 -10
  18. package/src/components/CLMSDownloadableFileView/CLMSDownloadableFileView.jsx +23 -0
  19. package/src/components/CLMSEventView/CLMSEventView.jsx +0 -4
  20. package/src/components/CclCard/CclCard.jsx +44 -34
  21. package/src/components/CclCard/cards.less +48 -0
  22. package/src/customizations/volto/components/manage/Toolbar/Toolbar.jsx +96 -67
  23. package/src/customizations/volto/components/theme/Header/Header.jsx +2 -2
  24. package/src/index.js +22 -19
  25. package/src/reducers/datasets_by_uid/datasets_by_uid.js +43 -0
  26. package/src/reducers/index.js +2 -0
  27. package/theme/clms/css/styles.less +20 -0
  28. package/theme/clms/css/title.css +12 -0
  29. package/src/customizations/volto/components/manage/Blocks/Title/Edit.jsx +0 -200
  30. package/src/customizations/volto/components/manage/Blocks/Title/View.jsx +0 -27
package/CHANGELOG.md CHANGED
@@ -4,8 +4,62 @@ 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.55](https://github.com/eea/volto-clms-theme/compare/1.0.54...1.0.55)
8
+
9
+ - new Toolbar from volto-14 [`#168`](https://github.com/eea/volto-clms-theme/pull/168)
10
+ - Small fixes [`#167`](https://github.com/eea/volto-clms-theme/pull/167)
11
+ - roles condition [`830dedb`](https://github.com/eea/volto-clms-theme/commit/830dedbf9eb2d17f83312bf4117899de78a08143)
12
+ - add link instead of a href [`81c4273`](https://github.com/eea/volto-clms-theme/commit/81c4273061f084b18e4aea9b27901a1f456a462e)
13
+ - image rendering size [`de2e7ee`](https://github.com/eea/volto-clms-theme/commit/de2e7ee095cb6db3122813d351b5d1f150232d5f)
14
+ - code formatting [`79db2ed`](https://github.com/eea/volto-clms-theme/commit/79db2ed13c40aeff88ca50d7707c5c3bd6e64eea)
15
+ - add Home Specific blocks group and reorder blocks [`0f9efa7`](https://github.com/eea/volto-clms-theme/commit/0f9efa7b1befe03df8bb46280f4545fe81dadbf6)
16
+ - last commit before PR to eea repo [`9b58b3a`](https://github.com/eea/volto-clms-theme/commit/9b58b3acbc73ee8c0cd15ec7f00ddb82bd001ef2)
17
+ - created new view for downloadable files and created a new variation for product card [`c68992a`](https://github.com/eea/volto-clms-theme/commit/c68992aac4a18ee008ddf3e3150327fabc799801)
18
+ - accordion z-index fix [`bf148fd`](https://github.com/eea/volto-clms-theme/commit/bf148fd84da754f92ba5fc34b911ded576044b09)
19
+ - accordion z-index fix [`8f15fd8`](https://github.com/eea/volto-clms-theme/commit/8f15fd80371514ad2810a02b60f193cc94456d8b)
20
+ - some fixes after demo [`6503d2a`](https://github.com/eea/volto-clms-theme/commit/6503d2a8f0f3669481c5ecaba29add5502dac856)
21
+ - carousel view pretier fix [`ae2c1ab`](https://github.com/eea/volto-clms-theme/commit/ae2c1ab036d76a5b20e683bf287ae84f341096ff)
22
+
23
+ #### [1.0.54](https://github.com/eea/volto-clms-theme/compare/1.0.53...1.0.54)
24
+
25
+ > 3 January 2022
26
+
27
+ - Develop [`#166`](https://github.com/eea/volto-clms-theme/pull/166)
28
+ - cypress test modification from page-title to documentFirstHeading [`b0513d4`](https://github.com/eea/volto-clms-theme/commit/b0513d449980dbc1d57e070a568617a9b365ecaa)
29
+ - add title override css [`ddc08e1`](https://github.com/eea/volto-clms-theme/commit/ddc08e1ae32f9f628b78c46df6b757921bbeea3b)
30
+ - remove Title block override [`80fa60a`](https://github.com/eea/volto-clms-theme/commit/80fa60acc05f435809b90bd5b6c692af46c21b9e)
31
+ - remove resolutions [`dce1914`](https://github.com/eea/volto-clms-theme/commit/dce19140d9c8d3269b51bc3e58d675114ed90ac2)
32
+
33
+ #### [1.0.53](https://github.com/eea/volto-clms-theme/compare/1.0.52...1.0.53)
34
+
35
+ > 22 December 2021
36
+
37
+ - update volto-clms-utils [`#165`](https://github.com/eea/volto-clms-theme/pull/165)
38
+
39
+ #### [1.0.52](https://github.com/eea/volto-clms-theme/compare/1.0.51...1.0.52)
40
+
41
+ > 22 December 2021
42
+
43
+ - Download cart last modifications [`#164`](https://github.com/eea/volto-clms-theme/pull/164)
44
+ - Download cart [`#163`](https://github.com/eea/volto-clms-theme/pull/163)
45
+ - fixes [`c783f5d`](https://github.com/eea/volto-clms-theme/commit/c783f5de953c79dfe4934ce2dc0fdf472d951753)
46
+ - use dataset information from direct attribute [`b56e96b`](https://github.com/eea/volto-clms-theme/commit/b56e96b2d3c58bfb23994f4c8ef53f85eba7fdf1)
47
+ - debug lint [`74e8e2c`](https://github.com/eea/volto-clms-theme/commit/74e8e2c9857031e636b54826ee9f1c6d384100ab)
48
+ - code refractoring [`79979ed`](https://github.com/eea/volto-clms-theme/commit/79979ed79049e9b600f3b377ae746af6a77903a4)
49
+ - downloadtool post body_extras [`fc15d56`](https://github.com/eea/volto-clms-theme/commit/fc15d56040e5711cde05417f8e7a54c331b93ff1)
50
+ - the format selector always draws according to the api @format_conversion_table [`03e1bd9`](https://github.com/eea/volto-clms-theme/commit/03e1bd9ef7ff276e7006e0d09dea300d38530e99)
51
+ - format and projection selector only available for mapviewer sources [`b86dca7`](https://github.com/eea/volto-clms-theme/commit/b86dca7229d4ce957488166fe800d9ffdaa105f7)
52
+ - view the source in the cart (Pre-packaged or Map viewer) [`cb65dc7`](https://github.com/eea/volto-clms-theme/commit/cb65dc7664d68926e8ae0a481969c82105a6f402)
53
+ - if the cart is empty, dont show the table [`c482e18`](https://github.com/eea/volto-clms-theme/commit/c482e1855eebd57866761759019b79bdc7c182a7)
54
+ - cart items from mapviewer [`d7da742`](https://github.com/eea/volto-clms-theme/commit/d7da74202701703b0c0e2053a42e4dff1d0745f2)
55
+ - fix going back error [`9a24291`](https://github.com/eea/volto-clms-theme/commit/9a24291dcf5bbff3a33ad68b1b06726fda855aa0)
56
+ - added to cart message style [`6a2efdb`](https://github.com/eea/volto-clms-theme/commit/6a2efdb9a0b44f15c3b9e1963dd1434d5f7f7c5c)
57
+
7
58
  #### [1.0.51](https://github.com/eea/volto-clms-theme/compare/1.0.50...1.0.51)
8
59
 
60
+ > 20 December 2021
61
+
62
+ - Cart Download tool [`#162`](https://github.com/eea/volto-clms-theme/pull/162)
9
63
  - Download cart [`#160`](https://github.com/eea/volto-clms-theme/pull/160)
10
64
  - download cart projections [`#161`](https://github.com/eea/volto-clms-theme/pull/161)
11
65
  - Download cart format [`#159`](https://github.com/eea/volto-clms-theme/pull/159)
package/Jenkinsfile CHANGED
@@ -124,7 +124,7 @@ pipeline {
124
124
  node(label: 'docker') {
125
125
  script {
126
126
  try {
127
- sh '''docker pull plone; docker run -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="profile-plone.restapi:blocks" plone fg'''
127
+ sh '''docker pull plone; docker run -d --rm --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="profile-plone.restapi:blocks" plone fg'''
128
128
  sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" -e NODE_ENV=test plone/volto-addon-ci cypress'''
129
129
  } finally {
130
130
  try {
@@ -142,7 +142,8 @@ pipeline {
142
142
  reportName: 'CypressCoverage',
143
143
  reportTitles: 'Integration Tests Code Coverage'])
144
144
  }
145
- archiveArtifacts artifacts: 'cypress-reports/videos/*.mp4', fingerprint: true
145
+ sh '''touch empty_file; for ok_test in $(grep -E 'file=.*failures="0"' $(grep 'testsuites .*failures="0"' $(find cypress-results -name *.xml) empty_file | awk -F: '{print $1}') empty_file | sed 's/.* file="\\(.*\\)" time.*/\\1/' | sed 's#^cypress/integration/##g' | sed 's#^../../../node_modules/@eeacms/##g'); do rm -f cypress-reports/videos/$ok_test.mp4; rm -f cypress-reports/$ok_test.mp4; done'''
146
+ archiveArtifacts artifacts: 'cypress-reports/**/*.mp4', fingerprint: true, allowEmptyArchive: true
146
147
  stash name: "cypress-coverage", includes: "cypress-coverage/**", allowEmpty: true
147
148
  }
148
149
  finally {
package/README.md CHANGED
@@ -63,7 +63,7 @@ Demo GIF
63
63
 
64
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
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.
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
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
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
69
  * The version format must be MAJOR.MINOR.PATCH. By default, next release is set to next minor version (with patch 0).
@@ -6,13 +6,13 @@ describe('Blocks Tests', () => {
6
6
 
7
7
  it('Add Block: Empty', () => {
8
8
  // Change page title
9
- cy.get('.page-title > .public-DraftStyleDefault-block')
9
+ cy.get('.documentFirstHeading > .public-DraftStyleDefault-block')
10
10
  .clear()
11
11
  .type('My Add-on Page')
12
- .get('.page-title span[data-text]')
12
+ .get('.documentFirstHeading span[data-text]')
13
13
  .contains('My Add-on Page');
14
14
 
15
- cy.get('.page-title > .public-DraftStyleDefault-block').type('{enter}');
15
+ cy.get('.documentFirstHeading > .public-DraftStyleDefault-block').type('{enter}');
16
16
 
17
17
  // Add block
18
18
  cy.get('.ui.basic.icon.button.block-add-button').first().click();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.0.51",
3
+ "version": "1.0.55",
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,10 +29,6 @@
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
- },
36
32
  "dependencies": {
37
33
  "@eeacms/volto-tabs-block": "1.2.7",
38
34
  "@eeacms/volto-accordion-block": "3.4.7",
@@ -49,7 +45,7 @@
49
45
  "react-svg": "14.0.4",
50
46
  "@eeacms/volto-arcgis-block": "*",
51
47
  "react-native-mime-types": "2.3.0",
52
- "@eeacms/volto-clms-utils": "0.1.2",
48
+ "@eeacms/volto-clms-utils": "0.1.3",
53
49
  "volto-form-block": "2.1.0",
54
50
  "@eeacms/volto-taxonomy": "^1.0.0"
55
51
  },
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Get cart selection to downloadtool.
3
+ * @module actions/getDatasetsByUid
4
+ */
5
+ export const DATASETS_BY_UID = 'DATASETS_BY_UID';
6
+
7
+ /**
8
+ * Get cart selection to downloadtool.
9
+ * @function GetDatasetsByUid
10
+ * @returns {Object} Get extra items action.
11
+ */
12
+ export function getDatasetsByUid(uids) {
13
+ return {
14
+ type: DATASETS_BY_UID,
15
+ request: {
16
+ op: 'get',
17
+ path: '/@datasets_by_uid?UID=' + uids,
18
+ },
19
+ };
20
+ }
@@ -52,6 +52,11 @@ export {
52
52
  getFormatConversionTable,
53
53
  } from './format_conversion_table/get_format_conversion_table';
54
54
 
55
+ export {
56
+ DATASETS_BY_UID,
57
+ getDatasetsByUid,
58
+ } from './datasets_by_uid/datasets_by_uid';
59
+
55
60
  export { GET_PROJECTIONS, getProjections } from './projections/get_projections';
56
61
 
57
62
  export { GET_REGISTRY, getRegistry } from './registry/registry';
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
1
  import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
3
2
  import CclHomeImageEditor from './CclHomeImageEditor';
3
+ import React from 'react';
4
4
 
5
5
  const CclGreenBgView = (props) => {
6
6
  const { data, isEditMode } = props;
@@ -10,7 +10,7 @@ const CclGreenBgView = (props) => {
10
10
  <div
11
11
  className="ccl-banner-top-main"
12
12
  style={{
13
- backgroundImage: `url(${data?.image?.url}/@@images/image)`,
13
+ backgroundImage: `url(${data?.image?.url}/@@images/image/large)`,
14
14
  }}
15
15
  >
16
16
  {isEditMode && <CclHomeImageEditor {...props} />}
@@ -36,6 +36,7 @@ const CclHomeProductsBlockEdit = (props) => {
36
36
  setSelectedProductBlock(-1);
37
37
  }
38
38
  }, [selected]);
39
+
39
40
  return (
40
41
  <>
41
42
  <div
@@ -110,7 +111,10 @@ const CclHomeProductsBlockEdit = (props) => {
110
111
  ...data.products.blocks,
111
112
  [selectedProductBlock]: {
112
113
  ...data.products.blocks[selectedProductBlock],
114
+ // productIcon: {
115
+ // ...data.products.blocks[selectedProductBlock].productIcon,
113
116
  [id]: value,
117
+ // },
114
118
  },
115
119
  },
116
120
  },
@@ -23,10 +23,10 @@ const TextLinkCarouselView = (props) => {
23
23
 
24
24
  return (
25
25
  <>
26
- <div class="ccl-container">
26
+ <div className="ccl-container">
27
27
  <Slider {...settings} ref={slider} className="text-carousel">
28
- {data?.textLink?.items.map((item, index) => (
29
- <div className="text-link-carousel-block" key={index}>
28
+ {data?.textLink?.items.map((key, item) => (
29
+ <div className="text-link-carousel-block" key={key}>
30
30
  <div className="text-link-carousel-block-content">
31
31
  <a href={'' + item?.link?.[0]?.['@id']}>{item.text}</a>
32
32
  </div>
@@ -1,15 +1,16 @@
1
- import React from 'react';
2
- import { connect } from 'react-redux';
3
- import { compose } from 'redux';
4
- import { withRouter } from 'react-router';
5
- import loadable from '@loadable/component';
6
- import { RenderBlocks } from '@plone/volto/components';
7
- import { withScrollToTarget } from '@eeacms/volto-tabs-block/hocs';
8
1
  import './custom.less';
9
- import cx from 'classnames';
10
2
  import 'slick-carousel/slick/slick.css';
11
3
  import 'slick-carousel/slick/slick-theme.css';
12
4
  import '@eeacms/volto-tabs-block/less/carousel.less';
5
+
6
+ import React from 'react';
7
+ import { RenderBlocks } from '@plone/volto/components';
8
+ import { compose } from 'redux';
9
+ import { connect } from 'react-redux';
10
+ import cx from 'classnames';
11
+ import loadable from '@loadable/component';
12
+ import { withRouter } from 'react-router';
13
+ import { withScrollToTarget } from '@eeacms/volto-tabs-block/hocs';
13
14
  const Slider = loadable(() => import('react-slick'));
14
15
 
15
16
  const View = (props) => {
@@ -32,7 +33,7 @@ const View = (props) => {
32
33
  speed: 2000,
33
34
  fade: true,
34
35
  cssEase: 'linear',
35
- autoplay: false,
36
+ autoplay: true,
36
37
  autoplaySpeed: 5000,
37
38
  beforeChange: (oldIndex, index) => {
38
39
  setActiveTab(tabsList[index]);