@eeacms/volto-clms-theme 1.1.133 → 1.1.134

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,12 +4,18 @@ 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.134](https://github.com/eea/volto-clms-theme/compare/1.1.133...1.1.134) - 9 April 2024
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - [CLMS-3190] Cart projection selected by default [Ion Lizarazu - [`83450c3`](https://github.com/eea/volto-clms-theme/commit/83450c35118d1c6917580c3124fe915f51bb2ca4)]
12
+ - add a new line [Mikel Larreategi - [`106e188`](https://github.com/eea/volto-clms-theme/commit/106e1883a738bcd02f46b94ddddc6f5cd3fa01ee)]
13
+ - show only the day [Mikel Larreategi - [`4647a61`](https://github.com/eea/volto-clms-theme/commit/4647a61e826dadd4f6e1145becc47e7dc7d9cfc8)]
7
14
  ### [1.1.133](https://github.com/eea/volto-clms-theme/compare/1.1.132...1.1.133) - 8 April 2024
8
15
 
9
16
  #### :hammer_and_wrench: Others
10
17
 
11
18
  - lint [Mikel Larreategi - [`76ba7cb`](https://github.com/eea/volto-clms-theme/commit/76ba7cbc17ea624233726a5e57788c4a1ba93348)]
12
- - show validation updates [Mikel Larreategi - [`8dbb259`](https://github.com/eea/volto-clms-theme/commit/8dbb259181b08eb709f5700a54f76d8e336a4391)]
13
19
  ### [1.1.132](https://github.com/eea/volto-clms-theme/compare/1.1.131...1.1.132) - 4 April 2024
14
20
 
15
21
  ### [1.1.131](https://github.com/eea/volto-clms-theme/compare/1.1.130...1.1.131) - 27 March 2024
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.1.133",
3
+ "version": "1.1.134",
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",
@@ -18,7 +18,7 @@ import {
18
18
  import { postImportWMSLayers, postImportWMSFields } from '../../actions';
19
19
  import { GeonetworkImporterButtons } from './GeonetworkImporterButtons';
20
20
  import { UniversalLink } from '@plone/volto/components';
21
- import { cclDateTimeFormat } from '../CclUtils/dateFormats';
21
+ import { cclDateFormat } from '../CclUtils/dateFormats';
22
22
  import jwtDecode from 'jwt-decode';
23
23
  import PropTypes from 'prop-types';
24
24
 
@@ -396,6 +396,7 @@ const CLMSDatasetDetailView = ({ content, token }) => {
396
396
  {(content.production_updates_show ||
397
397
  (libraries && libraries.length > 0)) && (
398
398
  <>
399
+ <br />
399
400
  <div class="citation-title">Production updates</div>
400
401
 
401
402
  {content.production_updates_show && (
@@ -411,7 +412,7 @@ const CLMSDatasetDetailView = ({ content, token }) => {
411
412
 
412
413
  {!content.production_updates_show &&
413
414
  libraries.map((item) => {
414
- const show_dt = cclDateTimeFormat(item.effective);
415
+ const show_dt = cclDateFormat(item.effective);
415
416
  return (
416
417
  <div className="validation-citation-container">
417
418
  <p>
@@ -424,7 +424,7 @@ const CLMSCartContent = (props) => {
424
424
  {!item?.file_id ? (
425
425
  <Select
426
426
  placeholder="Select projection"
427
- value={item?.projection}
427
+ value={item?.original_projection.split('/')[0]}
428
428
  options={
429
429
  projections_uid?.[item.dataset_uid] &&
430
430
  projections_uid[item.dataset_uid].length > 0 &&
@@ -440,32 +440,16 @@ const CLMSCartContent = (props) => {
440
440
  }
441
441
  })
442
442
  ?.map((projection) => {
443
+ const re = new RegExp(
444
+ projection.split(':')[1],
445
+ );
443
446
  return {
444
447
  key: projection,
445
448
  value: projection,
446
- text: item?.original_projection
447
- .replaceAll(
448
- '/ ',
449
- ' ' +
450
- projection.substring(
451
- 0,
452
- projection.indexOf(':') + 1,
453
- ),
454
- )
455
- .includes(projection)
456
- ? projection +
457
- ' (Source system of the dataset)'
449
+ text: re.test(item.original_projection)
450
+ ? `${projection} (Source system of the dataset)`
458
451
  : projection,
459
- className: item?.original_projection
460
- .replaceAll(
461
- '/ ',
462
- ' ' +
463
- projection.substring(
464
- 0,
465
- projection.indexOf(':') + 1,
466
- ),
467
- )
468
- .includes(projection)
452
+ className: re.test(item.original_projection)
469
453
  ? 'original_projection'
470
454
  : 'projection',
471
455
  };