@eeacms/volto-clms-theme 1.0.99 → 1.0.100

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,8 +4,16 @@ 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.100](https://github.com/eea/volto-clms-theme/compare/1.0.99...1.0.100)
8
+
9
+ - remove console.log [`87d44e1`](https://github.com/eea/volto-clms-theme/commit/87d44e1eae1460da3eeeaa4936de00dcdd1617d9)
10
+ - save original format of the dataset to be able to handle conversions correctlyÇ [`cb90951`](https://github.com/eea/volto-clms-theme/commit/cb909517bd8c8a1b3a0f9511a0a690d3c05b26ff)
11
+
7
12
  #### [1.0.99](https://github.com/eea/volto-clms-theme/compare/1.0.98...1.0.99)
8
13
 
14
+ > 14 June 2022
15
+
16
+ - Develop [`#265`](https://github.com/eea/volto-clms-theme/pull/265)
9
17
  - show rejection message [`47cdaad`](https://github.com/eea/volto-clms-theme/commit/47cdaad816a7967abc1a3b4171e2308715515104)
10
18
  - change condition [`05818e7`](https://github.com/eea/volto-clms-theme/commit/05818e7caa42345a9ee7068da96e608dfd3601ec)
11
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.0.99",
3
+ "version": "1.0.100",
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",
@@ -11,6 +11,7 @@ import {
11
11
  getCartObjectFromPrepackaged,
12
12
  getDownloadToolPostBody,
13
13
  formatNaming,
14
+ originalFormatNaming,
14
15
  } from './cartUtils';
15
16
  import {
16
17
  getDownloadtool,
@@ -344,7 +345,7 @@ const CLMSCartContent = (props) => {
344
345
  value={formatNaming(item)}
345
346
  options={getAvailableConversion(
346
347
  formatConversionTable,
347
- formatNaming(item),
348
+ originalFormatNaming(item),
348
349
  )}
349
350
  onChange={(e, data) => {
350
351
  const objIndex = cartItems.findIndex(
@@ -2,6 +2,10 @@ export const formatNaming = (item) => {
2
2
  return item?.format?.token || item?.format;
3
3
  };
4
4
 
5
+ export const originalFormatNaming = (item) => {
6
+ return item?.original_format?.token || item?.original_format;
7
+ };
8
+
5
9
  export const getDownloadToolPostBody = (selectedItems) => {
6
10
  const datasetList = selectedItems.map((item) => {
7
11
  let body_extras = {};
@@ -81,6 +85,8 @@ export const getCartObjectFromMapviewer = (
81
85
  name: dataset_data.title || '-',
82
86
  area: area || '-',
83
87
  format: type_options.length > 0 ? type_options[0].full_format : null,
88
+ original_format:
89
+ type_options.length > 0 ? type_options[0].full_format : null,
84
90
  resolution: dataset_data.resolution || '-',
85
91
  size: dataset_data.size || '-',
86
92
  source: 'Map viewer',