@eeacms/volto-clms-theme 1.1.102 → 1.1.104

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 CHANGED
@@ -4,11 +4,19 @@ 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.1.102](https://github.com/eea/volto-clms-theme/compare/1.1.101...1.1.102) - 16 January 2024
7
+ ### [1.1.104](https://github.com/eea/volto-clms-theme/compare/1.1.103...1.1.104) - 19 January 2024
8
8
 
9
9
  #### :bug: Bug Fixes
10
10
 
11
- - fix:CLMS-2970 [Unai - [`24cbfe5`](https://github.com/eea/volto-clms-theme/commit/24cbfe5a2bd410d9483ce812a61d49bc37e569a8)]
11
+ - fix: multiselect in accordionCheckbox facet [Unai - [`55d543f`](https://github.com/eea/volto-clms-theme/commit/55d543ffffb8edfb4d5872231add7e7c5406d5a5)]
12
+
13
+ ### [1.1.103](https://github.com/eea/volto-clms-theme/compare/1.1.102...1.1.103) - 17 January 2024
14
+
15
+ #### :hammer_and_wrench: Others
16
+
17
+ - temporary comment of Sonarqube report [Mikel Larreategi - [`0fc3508`](https://github.com/eea/volto-clms-theme/commit/0fc350843b2496dea201cd5fcd35b85be72220ca)]
18
+ - text change on meeting view [Unai - [`d7a6c09`](https://github.com/eea/volto-clms-theme/commit/d7a6c09541078770c8af73fcf0ca025ffaff0e9a)]
19
+ ### [1.1.102](https://github.com/eea/volto-clms-theme/compare/1.1.101...1.1.102) - 16 January 2024
12
20
 
13
21
  #### :hammer_and_wrench: Others
14
22
 
package/Jenkinsfile CHANGED
@@ -215,66 +215,66 @@ pipeline {
215
215
  }
216
216
  }
217
217
 
218
- stage('Report to SonarQube') {
219
- when {
220
- anyOf {
221
- allOf {
222
- not { environment name: 'CHANGE_ID', value: '' }
223
- environment name: 'CHANGE_TARGET', value: 'develop'
224
- }
225
- allOf {
226
- environment name: 'CHANGE_ID', value: ''
227
- anyOf {
228
- allOf {
229
- branch 'develop'
230
- not { changelog '.*^Automated release [0-9\\.]+$' }
231
- }
232
- branch 'master'
233
- }
234
- }
235
- }
236
- }
237
- steps {
238
- script {
239
- def scannerHome = tool 'SonarQubeScanner'
240
- def nodeJS = tool 'NodeJS'
241
- withSonarQubeEnv('Sonarqube') {
242
- sh '''sed -i "s#/app/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
243
- sh '''sed -i "s#src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
244
- // sh "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
245
- sh '''try=5; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}-${BRANCH_NAME}&tags=${SONARQUBE_TAGS},${BRANCH_NAME}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 15; try=\$(( \$try - 1 )); fi; done'''
246
- }
247
- }
248
- }
249
- }
218
+ // stage('Report to SonarQube') {
219
+ // when {
220
+ // anyOf {
221
+ // allOf {
222
+ // not { environment name: 'CHANGE_ID', value: '' }
223
+ // environment name: 'CHANGE_TARGET', value: 'develop'
224
+ // }
225
+ // allOf {
226
+ // environment name: 'CHANGE_ID', value: ''
227
+ // anyOf {
228
+ // allOf {
229
+ // branch 'develop'
230
+ // not { changelog '.*^Automated release [0-9\\.]+$' }
231
+ // }
232
+ // branch 'master'
233
+ // }
234
+ // }
235
+ // }
236
+ // }
237
+ // steps {
238
+ // script {
239
+ // def scannerHome = tool 'SonarQubeScanner'
240
+ // def nodeJS = tool 'NodeJS'
241
+ // withSonarQubeEnv('Sonarqube') {
242
+ // sh '''sed -i "s#/app/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
243
+ // sh '''sed -i "s#src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
244
+ // // sh "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
245
+ // sh '''try=5; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}-${BRANCH_NAME}&tags=${SONARQUBE_TAGS},${BRANCH_NAME}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 15; try=\$(( \$try - 1 )); fi; done'''
246
+ // }
247
+ // }
248
+ // }
249
+ // }
250
250
 
251
- stage('SonarQube compare to master') {
252
- when {
253
- anyOf {
254
- allOf {
255
- not { environment name: 'CHANGE_ID', value: '' }
256
- environment name: 'CHANGE_TARGET', value: 'develop'
257
- }
258
- allOf {
259
- environment name: 'CHANGE_ID', value: ''
260
- branch 'develop'
261
- not { changelog '.*^Automated release [0-9\\.]+$' }
262
- }
263
- }
264
- }
265
- steps {
266
- script {
267
- sh '''echo "Error" > checkresult.txt'''
268
- catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
269
- sh '''set -o pipefail; docker run -i --rm --pull always --name="$IMAGE_NAME-gitflow-sn" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" eeacms/gitflow /checkSonarqubemaster.sh | grep -v "Found script" | tee checkresult.txt'''
270
- }
251
+ // stage('SonarQube compare to master') {
252
+ // when {
253
+ // anyOf {
254
+ // allOf {
255
+ // not { environment name: 'CHANGE_ID', value: '' }
256
+ // environment name: 'CHANGE_TARGET', value: 'develop'
257
+ // }
258
+ // allOf {
259
+ // environment name: 'CHANGE_ID', value: ''
260
+ // branch 'develop'
261
+ // not { changelog '.*^Automated release [0-9\\.]+$' }
262
+ // }
263
+ // }
264
+ // }
265
+ // steps {
266
+ // script {
267
+ // sh '''echo "Error" > checkresult.txt'''
268
+ // catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
269
+ // sh '''set -o pipefail; docker run -i --rm --pull always --name="$IMAGE_NAME-gitflow-sn" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" eeacms/gitflow /checkSonarqubemaster.sh | grep -v "Found script" | tee checkresult.txt'''
270
+ // }
271
271
 
272
- publishChecks name: 'SonarQube', title: 'Sonarqube Code Quality Check', summary: 'Quality check on the SonarQube metrics from branch develop, comparing it with the ones from master branch. No bugs are allowed',
273
- text: readFile(file: 'checkresult.txt'), conclusion: "${currentBuild.currentResult}",
274
- detailsURL: "${env.BUILD_URL}display/redirect"
275
- }
276
- }
277
- }
272
+ // publishChecks name: 'SonarQube', title: 'Sonarqube Code Quality Check', summary: 'Quality check on the SonarQube metrics from branch develop, comparing it with the ones from master branch. No bugs are allowed',
273
+ // text: readFile(file: 'checkresult.txt'), conclusion: "${currentBuild.currentResult}",
274
+ // detailsURL: "${env.BUILD_URL}display/redirect"
275
+ // }
276
+ // }
277
+ // }
278
278
 
279
279
  stage('Pull Request') {
280
280
  when {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.1.102",
3
+ "version": "1.1.104",
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",
@@ -23,6 +23,14 @@ export const uncheckOptionAndChildren = (value, option) => {
23
23
  };
24
24
 
25
25
  export const enhanceExpandedByDefault = ({ schema, formData }) => {
26
+ let { fields } = schema.fieldsets[0];
27
+ const pos = fields.indexOf('type') + 1;
28
+ fields = [
29
+ ...fields.slice(0, pos),
30
+ 'multiple',
31
+ ...fields.slice(pos, fields.length),
32
+ ];
33
+ schema.fieldsets[0].fields = fields;
26
34
  return expandedByDefault(schema);
27
35
  };
28
36
 
@@ -421,15 +421,31 @@ const CLMSCartContent = (props) => {
421
421
  return {
422
422
  key: projection,
423
423
  value: projection,
424
- text:
425
- projection === item?.original_projection
426
- ? projection +
427
- ' (Source system of the dataset)'
428
- : projection,
429
- className:
430
- projection === item?.original_projection
431
- ? 'original_projection'
432
- : 'projection',
424
+ text: item?.original_projection
425
+ .replaceAll(
426
+ '/ ',
427
+ ' ' +
428
+ projection.substring(
429
+ 0,
430
+ projection.indexOf(':') + 1,
431
+ ),
432
+ )
433
+ .includes(projection)
434
+ ? projection +
435
+ ' (Source system of the dataset)'
436
+ : projection,
437
+ className: item?.original_projection
438
+ .replaceAll(
439
+ '/ ',
440
+ ' ' +
441
+ projection.substring(
442
+ 0,
443
+ projection.indexOf(':') + 1,
444
+ ),
445
+ )
446
+ .includes(projection)
447
+ ? 'original_projection'
448
+ : 'projection',
433
449
  };
434
450
  })
435
451
  }
@@ -114,9 +114,9 @@ export const CLMSMeetingView = (props) => {
114
114
  id: 'agreePrivacyPolicyLinkText',
115
115
  defaultMessage: 'privacy policy.',
116
116
  },
117
- downloadEvent: {
118
- id: 'Download Event',
119
- defineMessages: 'Download Event',
117
+ addEventToCalendar: {
118
+ id: 'Add event to calendar',
119
+ defineMessages: 'Add event to calendar',
120
120
  },
121
121
  });
122
122
 
@@ -323,7 +323,7 @@ export const CLMSMeetingView = (props) => {
323
323
  rel="noreferrer"
324
324
  href={`${expandToBackendURL(content['@id'])}/ics_view`}
325
325
  >
326
- {intl.formatMessage(messages.downloadEvent)}
326
+ {intl.formatMessage(messages.addEventToCalendar)}
327
327
  </a>
328
328
  </div>
329
329
  </Segment>
@@ -369,7 +369,7 @@ export const CLMSMeetingView = (props) => {
369
369
  rel="noreferrer"
370
370
  href={`${expandToBackendURL(content['@id'])}/ics_view`}
371
371
  >
372
- {intl.formatMessage(messages.downloadEvent)}
372
+ {intl.formatMessage(messages.addEventToCalendar)}
373
373
  </a>
374
374
  </div>
375
375
  </Segment>
@@ -522,7 +522,7 @@ export const CLMSMeetingView = (props) => {
522
522
  rel="noreferrer"
523
523
  href={`${expandToBackendURL(content['@id'])}/ics_view`}
524
524
  >
525
- {intl.formatMessage(messages.downloadEvent)}
525
+ {intl.formatMessage(messages.addEventToCalendar)}
526
526
  </a>
527
527
  </div>
528
528
  </Segment>
@@ -1,10 +1,11 @@
1
- import React from 'react';
1
+ import React, { useEffect } from 'react';
2
+ import { useLocation } from 'react-router-dom';
3
+
2
4
  //import { injectIntl } from 'react-intl';
3
5
  import TextareaWidget from '@plone/volto/components/manage/Widgets/TextareaWidget';
4
6
 
5
- import { useLocation } from 'react-router-dom';
6
-
7
7
  const TextareaWithRequestData = (props) => {
8
+ const { onChange, id } = props;
8
9
  const { search } = useLocation();
9
10
 
10
11
  const hashMatch = decodeURIComponent(
@@ -13,7 +14,16 @@ const TextareaWithRequestData = (props) => {
13
14
  : '',
14
15
  );
15
16
 
16
- return <TextareaWidget {...props} defaultValue={hashMatch} />;
17
+ useEffect(() => {
18
+ if (hashMatch) {
19
+ onChange(id, hashMatch);
20
+ }
21
+ // eslint-disable-next-line react-hooks/exhaustive-deps
22
+ }, [hashMatch]);
23
+
24
+ return (
25
+ <TextareaWidget {...props} defaultValue={hashMatch} formHasErrors={false} />
26
+ );
17
27
  };
18
28
 
19
29
  export default TextareaWithRequestData;