@eeacms/volto-bise-policy 1.2.13 → 1.2.14
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 +6 -2
- package/package.json +1 -1
- package/razzle.extend.js +2 -13
- package/src/components/manage/Blocks/FactsheetsListing/index.js +1 -1
- package/src/components/manage/Blocks/MaesViewer/MaesViewerEdit.jsx +36 -39
- package/src/components/manage/Blocks/MaesViewer/MaesViewerView.jsx +5 -1
- package/src/components/manage/Blocks/MaesViewer/schema.js +4 -5
- package/src/customizations/@eeacms/volto-datablocks/components/manage/Blocks/SimpleDataTable/index.js +1 -1
- package/theme/theme.config +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,11 +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
|
-
### [1.2.
|
|
7
|
+
### [1.2.14](https://github.com/eea/volto-bise-policy/compare/1.2.13...1.2.14) - 11 December 2024
|
|
8
8
|
|
|
9
9
|
#### :hammer_and_wrench: Others
|
|
10
10
|
|
|
11
|
-
-
|
|
11
|
+
- fix eslint [Miu Razvan - [`cb8d143`](https://github.com/eea/volto-bise-policy/commit/cb8d1438cdfd37840639879ea235fbd0eb69d59f)]
|
|
12
|
+
- fix eslint [Miu Razvan - [`49f38f4`](https://github.com/eea/volto-bise-policy/commit/49f38f4509ae68e0658137511eacd521bac6c078)]
|
|
13
|
+
- restrict factsheet block [Miu Razvan - [`daf4dcd`](https://github.com/eea/volto-bise-policy/commit/daf4dcd4684e121ccc86e26a2155ad127dbd7204)]
|
|
14
|
+
### [1.2.13](https://github.com/eea/volto-bise-policy/compare/1.2.12...1.2.13) - 12 November 2024
|
|
15
|
+
|
|
12
16
|
### [1.2.12](https://github.com/eea/volto-bise-policy/compare/1.2.11...1.2.12) - 6 November 2024
|
|
13
17
|
|
|
14
18
|
#### :bug: Bug Fixes
|
package/package.json
CHANGED
package/razzle.extend.js
CHANGED
|
@@ -2,23 +2,12 @@ const path = require('path');
|
|
|
2
2
|
const plugins = (defaultPlugins) => {
|
|
3
3
|
return defaultPlugins;
|
|
4
4
|
};
|
|
5
|
-
const modify = (config
|
|
5
|
+
const modify = (config) => {
|
|
6
6
|
const themeConfigPath = `${__dirname}/theme/theme.config`;
|
|
7
7
|
config.resolve.alias['../../theme.config$'] = themeConfigPath;
|
|
8
8
|
config.resolve.alias['../../theme.config'] = themeConfigPath;
|
|
9
|
-
config.resolve.alias['../../theme'] = `${__dirname}/theme`;
|
|
10
|
-
const projectRootPath = path.resolve('.');
|
|
11
|
-
const themeLessPath = `${projectRootPath}/node_modules/@eeacms/volto-spotlight/theme`;
|
|
12
|
-
|
|
13
|
-
config.resolve.alias['volto-spotlight-theme'] = dev
|
|
14
|
-
? `${projectRootPath}/src/addons/volto-spotlight/theme/themes/spotlight`
|
|
15
|
-
: `${themeLessPath}/themes/spotlight`;
|
|
16
9
|
|
|
17
|
-
|
|
18
|
-
const hasDesignSystemInstalled =
|
|
19
|
-
config.resolve.alias['volto-spotlight-themes'];
|
|
20
|
-
config.resolve.alias['volto-spotlight-theme-folder'] =
|
|
21
|
-
hasDesignSystemInstalled ? themeLessPath : semanticLessPath;
|
|
10
|
+
config.resolve.alias['../../theme'] = `${__dirname}/theme`;
|
|
22
11
|
|
|
23
12
|
return config;
|
|
24
13
|
};
|
|
@@ -1,64 +1,61 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
2
|
import { compose } from 'redux';
|
|
3
3
|
import cx from 'classnames';
|
|
4
4
|
import { SidebarPortal } from '@plone/volto/components'; // EditBlock
|
|
5
5
|
import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import maesViewrSchema from './schema';
|
|
8
8
|
import { connectToProviderData } from '@eeacms/volto-datablocks/hocs';
|
|
9
9
|
import MaesViewerView from './MaesViewerView';
|
|
10
10
|
import { defaultHoverTemplate } from './constants';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
super(props);
|
|
15
|
-
this.schema = MaesViewerSchema();
|
|
16
|
-
}
|
|
12
|
+
function Edit(props) {
|
|
13
|
+
const { data, provider_data, block, selected, onChangeBlock } = props;
|
|
17
14
|
|
|
18
|
-
|
|
19
|
-
if (!
|
|
20
|
-
const provider_data = this.props.provider_data || {};
|
|
15
|
+
const schema = useMemo(() => {
|
|
16
|
+
if (!provider_data) return maesViewrSchema;
|
|
21
17
|
|
|
22
18
|
const select_field = 'Ecosystem_level2';
|
|
23
19
|
const choices = Array.from(
|
|
24
20
|
new Set(provider_data?.[select_field] || []),
|
|
25
21
|
).map((n) => [n, n]);
|
|
26
22
|
|
|
27
|
-
const newSchema =
|
|
23
|
+
const newSchema = { ...maesViewrSchema };
|
|
28
24
|
newSchema.properties.ecosystem.choices = choices;
|
|
29
25
|
|
|
30
|
-
if (
|
|
31
|
-
|
|
32
|
-
...
|
|
26
|
+
if (data && !data.hoverTemplate) {
|
|
27
|
+
onChangeBlock(block, {
|
|
28
|
+
...data,
|
|
33
29
|
hoverTemplate: defaultHoverTemplate,
|
|
34
30
|
});
|
|
35
31
|
}
|
|
36
32
|
|
|
37
33
|
return newSchema;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
</div>
|
|
60
|
-
);
|
|
61
|
-
}
|
|
34
|
+
}, [block, data, onChangeBlock, provider_data]);
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<div className={cx('block', { selected })}>
|
|
38
|
+
<MaesViewerView data={data} />
|
|
39
|
+
|
|
40
|
+
<SidebarPortal selected={selected}>
|
|
41
|
+
<InlineForm
|
|
42
|
+
schema={schema}
|
|
43
|
+
title={schema.title}
|
|
44
|
+
onChangeField={(id, value) => {
|
|
45
|
+
onChangeBlock(block, {
|
|
46
|
+
...data,
|
|
47
|
+
[id]: value,
|
|
48
|
+
});
|
|
49
|
+
}}
|
|
50
|
+
formData={data}
|
|
51
|
+
/>
|
|
52
|
+
</SidebarPortal>
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
62
55
|
}
|
|
63
56
|
|
|
64
|
-
export default compose(
|
|
57
|
+
export default compose(
|
|
58
|
+
connectToProviderData((props) => ({
|
|
59
|
+
provider_url: props.data?.provider_url,
|
|
60
|
+
})),
|
|
61
|
+
)(Edit);
|
|
@@ -133,4 +133,8 @@ const View = ({ data, provider_data, id, ...rest }) => {
|
|
|
133
133
|
);
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
-
export default compose(
|
|
136
|
+
export default compose(
|
|
137
|
+
connectToProviderData((props) => ({
|
|
138
|
+
provider_url: props.data?.provider_url,
|
|
139
|
+
})),
|
|
140
|
+
)(View);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { defaultHoverTemplate } from './constants';
|
|
3
2
|
|
|
4
|
-
const
|
|
3
|
+
const maesViewrSchema = {
|
|
5
4
|
title: 'Edit MAES Viewer',
|
|
6
5
|
|
|
7
6
|
fieldsets: [
|
|
@@ -27,7 +26,7 @@ const MaesViewerSchema = () => ({
|
|
|
27
26
|
widget: 'slate_richtext',
|
|
28
27
|
},
|
|
29
28
|
provider_url: {
|
|
30
|
-
widget: '
|
|
29
|
+
widget: 'internal_url',
|
|
31
30
|
title: 'Data provider',
|
|
32
31
|
},
|
|
33
32
|
ecosystem: {
|
|
@@ -55,6 +54,6 @@ const MaesViewerSchema = () => ({
|
|
|
55
54
|
},
|
|
56
55
|
|
|
57
56
|
required: ['provider_url'],
|
|
58
|
-
}
|
|
57
|
+
};
|
|
59
58
|
|
|
60
|
-
export default
|
|
59
|
+
export default maesViewrSchema;
|
package/theme/theme.config
CHANGED
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
/*******************************
|
|
128
128
|
Import Theme
|
|
129
129
|
*******************************/
|
|
130
|
-
@import (multiple) "~volto-spotlight-theme
|
|
130
|
+
@import (multiple) "~volto-spotlight-themes/../theme.less";
|
|
131
131
|
|
|
132
132
|
@fontPath: "~volto-themes/default/assets/fonts";
|
|
133
133
|
|