@eeacms/volto-datahub 0.1.0 → 0.1.3
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 +19 -0
- package/package.json +3 -3
- package/src/components/LandingPage/DatahubLandingPage.jsx +67 -59
- package/src/index.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,27 @@ 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.3](https://github.com/eea/volto-datahub/compare/0.1.2...0.1.3)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
#### [0.1.2](https://github.com/eea/volto-datahub/compare/0.1.1...0.1.2)
|
|
11
|
+
|
|
12
|
+
> 30 June 2022
|
|
13
|
+
|
|
14
|
+
- Release [`#3`](https://github.com/eea/volto-datahub/pull/3)
|
|
15
|
+
- Hide questions & fix landing page [`a1ef303`](https://github.com/eea/volto-datahub/commit/a1ef3033df0e84f3a72dd0f984c8717dff2a771c)
|
|
16
|
+
|
|
17
|
+
#### [0.1.1](https://github.com/eea/volto-datahub/compare/0.1.0...0.1.1)
|
|
18
|
+
|
|
19
|
+
> 10 June 2022
|
|
20
|
+
|
|
21
|
+
- Fix dependencies [`#2`](https://github.com/eea/volto-datahub/pull/2)
|
|
22
|
+
|
|
7
23
|
#### [0.1.0](https://github.com/eea/volto-datahub/compare/0.0.1...0.1.0)
|
|
8
24
|
|
|
25
|
+
> 9 June 2022
|
|
26
|
+
|
|
27
|
+
- Develop [`#1`](https://github.com/eea/volto-datahub/pull/1)
|
|
9
28
|
- Avoid warning [`02c08ac`](https://github.com/eea/volto-datahub/commit/02c08acf2ce2009d63451dceb81a3e754e57572b)
|
|
10
29
|
- Update imports [`c35b976`](https://github.com/eea/volto-datahub/commit/c35b97607a84423d946afb8fba84b539c9c3caf3)
|
|
11
30
|
- fixed typo [`2f6f573`](https://github.com/eea/volto-datahub/commit/2f6f5739f56239a8cf19045fe28c35ba01e8138e)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-datahub",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "@eeacms/volto-datahub: Volto add-on",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"url": "git@github.com:eea/volto-datahub.git"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@
|
|
21
|
-
"@eeacms/volto-globalsearch": "0.1.1"
|
|
20
|
+
"@eeacms/volto-globalsearch": "*"
|
|
22
21
|
},
|
|
23
22
|
"devDependencies": {
|
|
23
|
+
"@plone/scripts": "*",
|
|
24
24
|
"@cypress/code-coverage": "^3.9.5",
|
|
25
25
|
"babel-plugin-transform-class-properties": "^6.24.1"
|
|
26
26
|
},
|
|
@@ -154,7 +154,7 @@ const LandingPage = (props) => {
|
|
|
154
154
|
return (
|
|
155
155
|
<div className="landing-page-container">
|
|
156
156
|
<div className="landing-page">
|
|
157
|
-
<
|
|
157
|
+
<h4 className="browse-by">Browse by</h4>
|
|
158
158
|
|
|
159
159
|
<div className="filters">
|
|
160
160
|
{sections
|
|
@@ -173,50 +173,56 @@ const LandingPage = (props) => {
|
|
|
173
173
|
);
|
|
174
174
|
})}
|
|
175
175
|
</div>
|
|
176
|
-
<div className="
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
176
|
+
<div className="landing-page-cards">
|
|
177
|
+
<div className="ui cards">
|
|
178
|
+
{sortedTiles(tiles, activeSectionConfig, appConfig).map((topic) => {
|
|
179
|
+
const onClickHandler = () => {
|
|
180
|
+
setFilter(
|
|
181
|
+
activeSection,
|
|
182
|
+
topic.value,
|
|
183
|
+
activeSectionConfig.filterType || 'any',
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
// apply configured default values
|
|
187
|
+
appConfig.facets
|
|
188
|
+
.filter((f) => f.field !== activeSection && f.default)
|
|
189
|
+
.forEach((facet) => {
|
|
190
|
+
facet.default.values.forEach((value) =>
|
|
191
|
+
setFilter(
|
|
192
|
+
facet.field,
|
|
193
|
+
value,
|
|
194
|
+
facet.default.type || 'any',
|
|
195
|
+
),
|
|
196
|
+
);
|
|
197
|
+
});
|
|
198
|
+
setSort(sortField, sortDirection);
|
|
199
|
+
setShowFacets(true);
|
|
200
|
+
};
|
|
184
201
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
onClick={onClickHandler}
|
|
205
|
-
>
|
|
206
|
-
<div className="content">
|
|
207
|
-
<div className="header">
|
|
208
|
-
{icon ? <Icon {...icon} type={topic.value} /> : ''}
|
|
209
|
-
<Term term={topic.value} field={activeSection} />
|
|
202
|
+
return (
|
|
203
|
+
<div
|
|
204
|
+
key={topic.value}
|
|
205
|
+
tabIndex="-1"
|
|
206
|
+
role="button"
|
|
207
|
+
onKeyDown={onClickHandler}
|
|
208
|
+
className="ui card"
|
|
209
|
+
onClick={onClickHandler}
|
|
210
|
+
>
|
|
211
|
+
<div className="content">
|
|
212
|
+
<div className="header">
|
|
213
|
+
{icon ? <Icon {...icon} type={topic.value} /> : ''}
|
|
214
|
+
<Term term={topic.value} field={activeSection} />
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
<div className="extra content">
|
|
218
|
+
<span className="count">
|
|
219
|
+
{topic.count} {topic.count === 1 ? 'item' : 'items'}
|
|
220
|
+
</span>
|
|
210
221
|
</div>
|
|
211
222
|
</div>
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
</span>
|
|
216
|
-
</div>
|
|
217
|
-
</div>
|
|
218
|
-
);
|
|
219
|
-
})}
|
|
223
|
+
);
|
|
224
|
+
})}
|
|
225
|
+
</div>
|
|
220
226
|
</div>
|
|
221
227
|
{hasOverflow ? (
|
|
222
228
|
<div className="info">
|
|
@@ -225,24 +231,26 @@ const LandingPage = (props) => {
|
|
|
225
231
|
) : null}
|
|
226
232
|
{children}
|
|
227
233
|
<hr></hr>
|
|
228
|
-
<div className="
|
|
229
|
-
<div
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
<div className="
|
|
239
|
-
<
|
|
234
|
+
<div className="landing-page-cards">
|
|
235
|
+
<div className="ui cards">
|
|
236
|
+
<div
|
|
237
|
+
key="all_series"
|
|
238
|
+
tabIndex="-1"
|
|
239
|
+
role="button"
|
|
240
|
+
onKeyDown={fixedOnClickHandler}
|
|
241
|
+
className="ui card"
|
|
242
|
+
onClick={fixedOnClickHandler}
|
|
243
|
+
>
|
|
244
|
+
<div className="content">
|
|
245
|
+
<div className="header">
|
|
246
|
+
<Term term={all_series.value} field="cluster_name" />
|
|
247
|
+
</div>
|
|
248
|
+
</div>
|
|
249
|
+
<div className="extra content">
|
|
250
|
+
<span className="count">
|
|
251
|
+
{all_series.count} {all_series.count === 1 ? 'item' : 'items'}
|
|
252
|
+
</span>
|
|
240
253
|
</div>
|
|
241
|
-
</div>
|
|
242
|
-
<div className="extra content">
|
|
243
|
-
<span className="count">
|
|
244
|
-
{all_series.count} {all_series.count === 1 ? 'item' : 'items'}
|
|
245
|
-
</span>
|
|
246
254
|
</div>
|
|
247
255
|
</div>
|
|
248
256
|
</div>
|
package/src/index.js
CHANGED
|
@@ -26,6 +26,7 @@ const applyConfig = (config) => {
|
|
|
26
26
|
datahub.elastic_index = '_es/datahub';
|
|
27
27
|
datahub.index_name = 'data_searchui_datahub';
|
|
28
28
|
datahub.enableNLP = false;
|
|
29
|
+
datahub.showPromptQueries = false;
|
|
29
30
|
datahub.requestBodyModifiers.push(tweakForNLPService);
|
|
30
31
|
// datahub.resultViews[0].factories.item = "DatahubListingViewItem"
|
|
31
32
|
|