@eeacms/volto-datahub 1.0.8 → 1.0.10

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,6 +4,17 @@ 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.10](https://github.com/eea/volto-datahub/compare/1.0.9...1.0.10) - 18 January 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - Remove unused import [Tiberiu Ichim - [`49bbbc8`](https://github.com/eea/volto-datahub/commit/49bbbc87a5f6235aa2f258a1712db4a8c93dfb80)]
12
+ - Fix date [Tiberiu Ichim - [`a31cce0`](https://github.com/eea/volto-datahub/commit/a31cce052f92174e6692ad3a1665e56194bad38e)]
13
+ ### [1.0.9](https://github.com/eea/volto-datahub/compare/1.0.8...1.0.9) - 17 January 2023
14
+
15
+ #### :hammer_and_wrench: Others
16
+
17
+ - updated Jenkinsfile [Zoltan Szabo - [`b2efcf6`](https://github.com/eea/volto-datahub/commit/b2efcf636c03321d53cf9d1a3cc511132a4dcf1c)]
7
18
  ### [1.0.8](https://github.com/eea/volto-datahub/compare/1.0.7...1.0.8) - 16 January 2023
8
19
 
9
20
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-datahub",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "@eeacms/volto-datahub: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -6,7 +6,7 @@ import { Container, Icon } from 'semantic-ui-react';
6
6
  import { Toolbar } from '@plone/volto/components';
7
7
  import { BodyClass } from '@plone/volto/helpers';
8
8
  import config from '@plone/volto/registry';
9
- import { rebind, applyConfigurationSchema, DateTime } from '@eeacms/search';
9
+ import { rebind, applyConfigurationSchema } from '@eeacms/search';
10
10
  import { Callout, Banner } from '@eeacms/volto-eea-design-system/ui';
11
11
  import {
12
12
  MoreLikeThis,
@@ -126,12 +126,12 @@ function ItemView(props) {
126
126
  <Banner.MetadataField
127
127
  label="Published"
128
128
  type="date"
129
- value={<DateTime format="DATE_MED" value={result.issued} />}
129
+ value={new Date(result.issued)}
130
130
  />
131
131
  <Banner.MetadataField
132
132
  label="Last modified"
133
133
  type="date"
134
- value={<DateTime format="DATE_MED" value={changeDate} />}
134
+ value={new Date(changeDate)}
135
135
  />
136
136
  {/* <Banner.MetadataField
137
137
  label="Reading time"
@@ -8,10 +8,6 @@ import { useAtom } from 'jotai';
8
8
  // import { getFacetCounts } from '@eeacms/search/components/LandingPage/request';
9
9
  // import buildStateFacets from '@eeacms/search/lib/search/state/facets';
10
10
  // import { customOrder } from '@eeacms/search/lib/utils';
11
- // import {
12
- // landingPageDataAtom,
13
- // isRequestedAtom,
14
- // } from '@eeacms/search/components/LandingPage/state';
15
11
  // import { Icon, Term } from '@eeacms/search/components';
16
12
 
17
13
  import {
@@ -19,8 +15,8 @@ import {
19
15
  showFacetsAsideAtom,
20
16
  getFacetCounts,
21
17
  buildStateFacets,
22
- landingPageDataAtom,
23
- isRequestedAtom,
18
+ useLandingPageData,
19
+ useLandingPageRequest,
24
20
  Icon,
25
21
  Term,
26
22
  } from '@eeacms/search';
@@ -52,6 +48,7 @@ const sortedTiles = (tiles, sectionConfig, appConfig) => {
52
48
 
53
49
  const LandingPage = (props) => {
54
50
  const { appConfig, children, setFilter, setSort } = props;
51
+ const { appName } = appConfig;
55
52
  const { onlyLandingPage = false } = appConfig;
56
53
  // const facetsConfig = appConfig.facets;
57
54
 
@@ -69,8 +66,11 @@ const LandingPage = (props) => {
69
66
 
70
67
  const [, setShowFacets] = useAtom(showFacetsAsideAtom);
71
68
 
72
- const [landingPageData, setLandingPageData] = useAtom(landingPageDataAtom);
73
- const [isRequested, setIsRequested] = useAtom(isRequestedAtom);
69
+ const [landingPageData, setLandingPageData] = useLandingPageData(appName);
70
+ const [isRequested, setIsRequested] = useLandingPageRequest(appName);
71
+
72
+ // const [landingPageData, setLandingPageData] = useAtom(landingPageDataAtom);
73
+ // const [isRequested, setIsRequested] = useAtom(isRequestedAtom);
74
74
 
75
75
  const getTiles = (maxPerSection) => {
76
76
  let result = landingPageData?.[activeSection]?.[0]?.data || [];