@eeacms/volto-cca-policy 0.2.17 → 0.2.19
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 +17 -0
- package/package.json +1 -1
- package/src/components/manage/Blocks/RedirectBlock/RedirectBlock.test.js +1 -1
- package/src/components/manage/Blocks/RedirectBlock/RedirectBlockEdit.jsx +2 -1
- package/src/components/manage/Blocks/RedirectBlock/RedirectBlockView.jsx +6 -4
- package/src/index.js +10 -1
- package/src/search/mission_tools/config-tools.js +2 -17
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,23 @@ 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.2.19](https://github.com/eea/volto-cca-policy/compare/0.2.18...0.2.19) - 7 May 2024
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix: use DefaultView in layoutViews [kreafox - [`a87f13f`](https://github.com/eea/volto-cca-policy/commit/a87f13fc22374b40b3fbf2d0faff30059b65a610)]
|
|
12
|
+
- fix: update tests [kreafox - [`9f71324`](https://github.com/eea/volto-cca-policy/commit/9f7132455a988c09fed5a064a1c3e7f63856e27f)]
|
|
13
|
+
|
|
14
|
+
#### :hammer_and_wrench: Others
|
|
15
|
+
|
|
16
|
+
- Don't show content of redirection block [Tiberiu Ichim - [`65a1537`](https://github.com/eea/volto-cca-policy/commit/65a153714e4fe360c67f89575d1397d697a14711)]
|
|
17
|
+
### [0.2.18](https://github.com/eea/volto-cca-policy/compare/0.2.17...0.2.18) - 7 May 2024
|
|
18
|
+
|
|
19
|
+
#### :nail_care: Enhancements
|
|
20
|
+
|
|
21
|
+
- change(blocks): Increase number of columns for teaser block [kreafox - [`52f863e`](https://github.com/eea/volto-cca-policy/commit/52f863e118fc8e2530f1a38d073b0c1533df18d6)]
|
|
22
|
+
- change(mission): remove thumbnail from mission tools search result [kreafox - [`be460b3`](https://github.com/eea/volto-cca-policy/commit/be460b3c6bc3762f720e0718b56bf29104d8b2a6)]
|
|
23
|
+
|
|
7
24
|
### [0.2.17](https://github.com/eea/volto-cca-policy/compare/0.2.16...0.2.17) - 2 May 2024
|
|
8
25
|
|
|
9
26
|
### [0.2.16](https://github.com/eea/volto-cca-policy/compare/0.2.15...0.2.16) - 2 May 2024
|
package/package.json
CHANGED
|
@@ -5,9 +5,10 @@ import Schema from './schema';
|
|
|
5
5
|
export default function CountryMapObservatoryEdit(props) {
|
|
6
6
|
const { block, data, onChangeBlock, selected } = props;
|
|
7
7
|
const schema = Schema(data);
|
|
8
|
+
|
|
8
9
|
return (
|
|
9
10
|
<div className="redirection-block-edit">
|
|
10
|
-
<RedirectBlockDetails data={data} />
|
|
11
|
+
<RedirectBlockDetails data={data} token={true} />
|
|
11
12
|
|
|
12
13
|
<SidebarPortal selected={selected}>
|
|
13
14
|
<BlockDataForm
|
|
@@ -3,8 +3,8 @@ import React from 'react';
|
|
|
3
3
|
import { useHistory } from 'react-router-dom';
|
|
4
4
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
5
5
|
|
|
6
|
-
export function RedirectBlockDetails({ data }) {
|
|
7
|
-
return (
|
|
6
|
+
export function RedirectBlockDetails({ data, token }) {
|
|
7
|
+
return token ? (
|
|
8
8
|
<div className="redirect-block">
|
|
9
9
|
<h5>Redirection block</h5>
|
|
10
10
|
<p className="discreet">
|
|
@@ -16,16 +16,18 @@ export function RedirectBlockDetails({ data }) {
|
|
|
16
16
|
)}
|
|
17
17
|
</p>
|
|
18
18
|
</div>
|
|
19
|
-
);
|
|
19
|
+
) : null;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export default function RedirectBlockView({ data, token }) {
|
|
23
23
|
const target = data?.href?.[0]?.['@id'];
|
|
24
24
|
const history = useHistory();
|
|
25
|
+
|
|
25
26
|
React.useEffect(() => {
|
|
26
27
|
if (!token) {
|
|
27
28
|
history.push(flattenToAppURL(target));
|
|
28
29
|
}
|
|
29
30
|
}, [token, target, history]);
|
|
30
|
-
|
|
31
|
+
|
|
32
|
+
return <RedirectBlockDetails data={data} token={token} />;
|
|
31
33
|
}
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { compose } from 'redux';
|
|
2
2
|
import { Sitemap } from '@plone/volto/components';
|
|
3
|
+
import DefaultView from '@plone/volto/components/theme/View/DefaultView';
|
|
3
4
|
import {
|
|
4
5
|
RASTWidgetView,
|
|
5
6
|
TranslationDisclaimer,
|
|
@@ -257,7 +258,7 @@ const applyConfig = (config) => {
|
|
|
257
258
|
|
|
258
259
|
config.blocks.blocksConfig.__grid = {
|
|
259
260
|
...config.blocks.blocksConfig.__grid,
|
|
260
|
-
maxNumberOfColumns:
|
|
261
|
+
maxNumberOfColumns: 7,
|
|
261
262
|
};
|
|
262
263
|
|
|
263
264
|
config.blocks.blocksConfig.nextCloudVideo = {
|
|
@@ -290,6 +291,14 @@ const applyConfig = (config) => {
|
|
|
290
291
|
|
|
291
292
|
config.views.layoutViewsNamesMapping.view_cca_event = 'CCA Event View';
|
|
292
293
|
|
|
294
|
+
config.views.layoutViews = {
|
|
295
|
+
...config.views.layoutViews,
|
|
296
|
+
document_view: DefaultView,
|
|
297
|
+
album_view: DefaultView,
|
|
298
|
+
summary_view: DefaultView,
|
|
299
|
+
tabular_view: DefaultView,
|
|
300
|
+
};
|
|
301
|
+
|
|
293
302
|
config.settings.contextNavigationLocations = [
|
|
294
303
|
{
|
|
295
304
|
title: 'Adaptation',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { mergeConfig } from '@eeacms/search';
|
|
2
|
-
import { getClientProxyAddress
|
|
2
|
+
import { getClientProxyAddress } from '../utils';
|
|
3
|
+
|
|
3
4
|
import facets from './facets-tools';
|
|
4
5
|
|
|
5
6
|
const missionToolsConfig = {
|
|
@@ -37,21 +38,5 @@ export default function installMissionToolsSearch(config) {
|
|
|
37
38
|
process.env.RAZZLE_ES_PROXY_ADDR || getClientProxyAddress();
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
missionToolsSearch.resultItemModel = {
|
|
41
|
-
factory: 'ResultModel',
|
|
42
|
-
urlField: 'about',
|
|
43
|
-
titleField: 'title',
|
|
44
|
-
metatypeField: 'objectProvides',
|
|
45
|
-
descriptionField: 'description',
|
|
46
|
-
tagsField: 'topic',
|
|
47
|
-
issuedField: 'issued',
|
|
48
|
-
getThumbnailUrl: 'getSearchThumbUrl',
|
|
49
|
-
getIconUrl: 'getGlobalsearchIconUrl',
|
|
50
|
-
fallbackThumbUrl:
|
|
51
|
-
'https://react.semantic-ui.com/images/wireframe/white-image.png',
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
config.resolve.getSearchThumbUrl = getSearchThumbUrl();
|
|
55
|
-
|
|
56
41
|
return config;
|
|
57
42
|
}
|