@eeacms/volto-datahub 0.1.7 → 0.1.8
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 +7 -0
- package/package.json +1 -1
- package/src/config/facets.js +22 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,15 @@ 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
|
+
#### [0.1.8](https://github.com/eea/volto-datahub/compare/0.1.7...0.1.8)
|
|
8
|
+
|
|
9
|
+
- Added facet for time coverage [`553518e`](https://github.com/eea/volto-datahub/commit/553518e7297e7bdace1323010735feb781e3b628)
|
|
10
|
+
|
|
7
11
|
#### [0.1.7](https://github.com/eea/volto-datahub/compare/0.1.6...0.1.7)
|
|
8
12
|
|
|
13
|
+
> 26 August 2022
|
|
14
|
+
|
|
15
|
+
- Release [`#8`](https://github.com/eea/volto-datahub/pull/8)
|
|
9
16
|
- Link to the SDI metadata pdf [`e28b3a0`](https://github.com/eea/volto-datahub/commit/e28b3a0254ee9d60d0804de57dc401c4a9fbea0a)
|
|
10
17
|
- Add services icon, datasets improvements [`5b9295a`](https://github.com/eea/volto-datahub/commit/5b9295ad26af7305d217e3dec99b7337603e329f)
|
|
11
18
|
- WIP datasets section: sorting, add formats [`7d51ec6`](https://github.com/eea/volto-datahub/commit/7d51ec63aa0716073ab6e1f75488fea83dfe585f)
|
package/package.json
CHANGED
package/src/config/facets.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
multiTermFacet,
|
|
3
|
+
fixedRangeFacet,
|
|
4
|
+
histogramFacet,
|
|
5
|
+
makeRange,
|
|
6
|
+
} from '@eeacms/search';
|
|
2
7
|
import { dateRangeFacet } from '@eeacms/search';
|
|
3
8
|
|
|
4
9
|
const facets = [
|
|
@@ -96,6 +101,22 @@ const facets = [
|
|
|
96
101
|
label: 'Sources',
|
|
97
102
|
iconsFamily: 'Sources',
|
|
98
103
|
}),
|
|
104
|
+
histogramFacet({
|
|
105
|
+
field: 'time_coverage',
|
|
106
|
+
isMulti: true,
|
|
107
|
+
label: 'Time coverage',
|
|
108
|
+
// TODO: implement split in buckets
|
|
109
|
+
ranges: makeRange({
|
|
110
|
+
step: 1,
|
|
111
|
+
normalRange: [1985, 2025],
|
|
112
|
+
includeOutlierStart: false,
|
|
113
|
+
includeOutlierEnd: false,
|
|
114
|
+
}),
|
|
115
|
+
step: 10,
|
|
116
|
+
// isFilterable: false,
|
|
117
|
+
aggs_script:
|
|
118
|
+
"def vals = doc['time_coverage']; if (vals.length == 0){return 2500} else {def ret = [];for (val in vals){def tmp_val = val.substring(0,4);ret.add(tmp_val.toLowerCase() == tmp_val.toUpperCase() ? Integer.parseInt(tmp_val) : 2500);}return ret;}",
|
|
119
|
+
}),
|
|
99
120
|
];
|
|
100
121
|
|
|
101
122
|
export default {
|