@eeacms/volto-clms-theme 1.1.60 → 1.1.62
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,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.1.
|
|
7
|
+
### [1.1.62](https://github.com/eea/volto-clms-theme/compare/1.1.61...1.1.62) - 18 October 2023
|
|
8
8
|
|
|
9
9
|
#### :hammer_and_wrench: Others
|
|
10
10
|
|
|
11
|
-
-
|
|
11
|
+
- cleanup [Mikel Larreategi - [`87c90a8`](https://github.com/eea/volto-clms-theme/commit/87c90a822b5a5a374a63821a28caf1880d1bed54)]
|
|
12
|
+
- clms-2644 filter in all available attributes of the prepackaged files not just in some hard-coded ones [Mikel Larreategi - [`559aac7`](https://github.com/eea/volto-clms-theme/commit/559aac7c031152b8f2a721425d85d388c1a56c16)]
|
|
13
|
+
### [1.1.61](https://github.com/eea/volto-clms-theme/compare/1.1.60...1.1.61) - 18 October 2023
|
|
14
|
+
|
|
15
|
+
### [1.1.60](https://github.com/eea/volto-clms-theme/compare/1.1.59...1.1.60) - 18 October 2023
|
|
16
|
+
|
|
12
17
|
### [1.1.59](https://github.com/eea/volto-clms-theme/compare/1.1.58...1.1.59) - 17 October 2023
|
|
13
18
|
|
|
14
19
|
### [1.1.58](https://github.com/eea/volto-clms-theme/compare/1.1.57...1.1.58) - 17 October 2023
|
package/package.json
CHANGED
|
@@ -102,20 +102,17 @@ function CclDownloadTable(props) {
|
|
|
102
102
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
103
103
|
}, [cartSelection, currentPage]);
|
|
104
104
|
|
|
105
|
+
const hasText = (item, text) => {
|
|
106
|
+
/* A function to search over all attributes in an object, except given ones */
|
|
107
|
+
let { path, name, UID, unique_id, ...rest } = item;
|
|
108
|
+
return Object.values(rest).find((value) => {
|
|
109
|
+
return value && value.toLowerCase().includes(text.toLocaleLowerCase());
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
|
|
105
113
|
React.useEffect(() => {
|
|
106
|
-
let fItems = prePackagedCollection.filter(
|
|
107
|
-
(item)
|
|
108
|
-
item?.title?.toLowerCase().includes(filterText.toLocaleLowerCase()) ||
|
|
109
|
-
item?.file?.toLowerCase().includes(filterText.toLocaleLowerCase()) ||
|
|
110
|
-
item?.area?.toLowerCase().includes(filterText.toLocaleLowerCase()) ||
|
|
111
|
-
item?.year?.toLowerCase().includes(filterText.toLocaleLowerCase()) ||
|
|
112
|
-
item?.version?.toLowerCase().includes(filterText.toLocaleLowerCase()) ||
|
|
113
|
-
item?.resolution
|
|
114
|
-
?.toLowerCase()
|
|
115
|
-
.includes(filterText.toLocaleLowerCase()) ||
|
|
116
|
-
item?.type?.toLowerCase().includes(filterText.toLocaleLowerCase()) ||
|
|
117
|
-
item?.format?.toLowerCase().includes(filterText.toLocaleLowerCase()) ||
|
|
118
|
-
item?.size?.toLowerCase().includes(filterText.toLocaleLowerCase()),
|
|
114
|
+
let fItems = prePackagedCollection.filter((item) =>
|
|
115
|
+
hasText(item, filterText),
|
|
119
116
|
);
|
|
120
117
|
if (filterText) {
|
|
121
118
|
setCurrentPageItems(fItems.slice(0, 10));
|
|
@@ -295,7 +292,10 @@ function CclDownloadTable(props) {
|
|
|
295
292
|
<div className="image-modal">
|
|
296
293
|
<img
|
|
297
294
|
src={
|
|
298
|
-
|
|
295
|
+
props.dataset.download_grid_image_for_prepackages
|
|
296
|
+
? props.dataset.download_grid_image_for_prepackages
|
|
297
|
+
.download
|
|
298
|
+
: prepackage_grid_image
|
|
299
299
|
? prepackage_grid_image
|
|
300
300
|
: PlaceHolder
|
|
301
301
|
}
|
|
@@ -328,25 +328,6 @@ function CclDownloadTable(props) {
|
|
|
328
328
|
{columns.map((column, key) => (
|
|
329
329
|
<th key={key}>{schema?.properties[column]?.title}</th>
|
|
330
330
|
))}
|
|
331
|
-
{/* {columns.map((column) => {
|
|
332
|
-
return (
|
|
333
|
-
column !== '@id' &&
|
|
334
|
-
column !== 'UID' &&
|
|
335
|
-
column !== 'unique_id' &&
|
|
336
|
-
column !== '' && <th>{column}</th>
|
|
337
|
-
);
|
|
338
|
-
})} */}
|
|
339
|
-
{/* {columns.includes('title') && <th>Title</th>}
|
|
340
|
-
{columns.includes('file') && <th>File name</th>}
|
|
341
|
-
{columns.includes('area') && (
|
|
342
|
-
<th>{dataset.download_table_area_of_interest_title}</th>
|
|
343
|
-
)}
|
|
344
|
-
{columns.includes('year') && <th>Year</th>}
|
|
345
|
-
{columns.includes('version') && <th>Version</th>}
|
|
346
|
-
{columns.includes('resolution') && <th>Resolution</th>}
|
|
347
|
-
{columns.includes('type') && <th>Type</th>}
|
|
348
|
-
{columns.includes('format') && <th>Format</th>}
|
|
349
|
-
{columns.includes('size') && <th>Size</th>} */}
|
|
350
331
|
</tr>
|
|
351
332
|
</thead>
|
|
352
333
|
<tbody>
|
|
@@ -387,42 +368,6 @@ function CclDownloadTable(props) {
|
|
|
387
368
|
</td>
|
|
388
369
|
);
|
|
389
370
|
})}
|
|
390
|
-
{/* {columns.includes('title') && (
|
|
391
|
-
<td>{contentOrDash(dataset_file?.title)}</td>
|
|
392
|
-
)}
|
|
393
|
-
{columns.includes('file') && (
|
|
394
|
-
<td>{contentOrDash(dataset_file?.file)}</td>
|
|
395
|
-
)}
|
|
396
|
-
{columns.includes('area') && (
|
|
397
|
-
<td>{contentOrDash(dataset_file?.area)}</td>
|
|
398
|
-
)}
|
|
399
|
-
{columns.includes('year') && (
|
|
400
|
-
<td>{contentOrDash(dataset_file?.year)}</td>
|
|
401
|
-
)}
|
|
402
|
-
{columns.includes('version') && (
|
|
403
|
-
<td>{contentOrDash(dataset_file?.version)}</td>
|
|
404
|
-
)}
|
|
405
|
-
{columns.includes('resolution') && (
|
|
406
|
-
<td>{contentOrDash(dataset_file?.resolution)}</td>
|
|
407
|
-
)}
|
|
408
|
-
{columns.includes('type') && (
|
|
409
|
-
<td>
|
|
410
|
-
<span
|
|
411
|
-
className={
|
|
412
|
-
'tag tag-' +
|
|
413
|
-
(dataset_file?.type?.toLowerCase() || 'raster')
|
|
414
|
-
}
|
|
415
|
-
>
|
|
416
|
-
{contentOrDash(dataset_file?.type)}
|
|
417
|
-
</span>
|
|
418
|
-
</td>
|
|
419
|
-
)}
|
|
420
|
-
{columns.includes('format') && (
|
|
421
|
-
<td>{contentOrDash(dataset_file?.format)}</td>
|
|
422
|
-
)}
|
|
423
|
-
{columns.includes('size') && (
|
|
424
|
-
<td>{contentOrDash(dataset_file?.size)}</td>
|
|
425
|
-
)} */}
|
|
426
371
|
</tr>
|
|
427
372
|
);
|
|
428
373
|
})
|