@eeacms/volto-bise-policy 1.2.18 → 1.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 +16 -9
- package/package.json +1 -1
- package/src/components/manage/Blocks/CustomCSS/CustomCSSEdit.jsx +16 -0
- package/src/components/manage/Blocks/CustomCSS/CustomCSSView.jsx +17 -0
- package/src/components/manage/Blocks/CustomCSS/index.js +26 -0
- package/src/components/manage/Blocks/CustomJS/CustomJSEdit.jsx +14 -0
- package/src/components/manage/Blocks/CustomJS/CustomJSView.jsx +18 -0
- package/src/components/manage/Blocks/CustomJS/index.js +26 -0
- package/src/components/manage/Blocks/index.js +4 -0
- package/src/customizations/@eeacms/volto-datablocks/components/manage/Blocks/SimpleDataTable/Edit.jsx +10 -9
- package/src/customizations/@eeacms/volto-datablocks/components/manage/Blocks/SimpleDataTable/index.js +2 -2
- package/src/customizations/@eeacms/volto-datablocks/components/manage/Blocks/SimpleDataTable/templates/smart/View.jsx +12 -14
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ 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.19](https://github.com/eea/volto-bise-policy/compare/1.2.18...1.2.19) - 30 June 2025
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix: extend column schema to populate choices [nileshgulia1 - [`6897739`](https://github.com/eea/volto-bise-policy/commit/6897739b206ba4d7618dc222b5c2d2b88a99d6af)]
|
|
12
|
+
|
|
13
|
+
#### :house: Internal changes
|
|
14
|
+
|
|
15
|
+
- style: Automated code fix [eea-jenkins - [`9b23b7c`](https://github.com/eea/volto-bise-policy/commit/9b23b7c7f1646feb814b03d4ee88ca79d093b536)]
|
|
16
|
+
- style: Automated code fix [eea-jenkins - [`0767bb6`](https://github.com/eea/volto-bise-policy/commit/0767bb68e90dae2570edead9201b36d5a99319e6)]
|
|
17
|
+
|
|
18
|
+
#### :hammer_and_wrench: Others
|
|
19
|
+
|
|
20
|
+
- add custom css basic block [Claudia Ifrim - [`3a43d19`](https://github.com/eea/volto-bise-policy/commit/3a43d1909e185be80e17a82434917c1c42ee6c77)]
|
|
21
|
+
- custom js block [Claudia Ifrim - [`8e40d21`](https://github.com/eea/volto-bise-policy/commit/8e40d219592b816d274c3b3143c39f0737de82da)]
|
|
22
|
+
- rename simple data table customization [Claudia Ifrim - [`9e1bc9e`](https://github.com/eea/volto-bise-policy/commit/9e1bc9e0af3d3c2be9eaf129b2bb03d72a0805eb)]
|
|
7
23
|
### [1.2.18](https://github.com/eea/volto-bise-policy/compare/1.2.17...1.2.18) - 23 June 2025
|
|
8
24
|
|
|
9
25
|
#### :house: Internal changes
|
|
@@ -98,7 +114,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
98
114
|
- chore: customize root theme to use volto-spotlight - refs #259794 [ana-oprea - [`347f96e`](https://github.com/eea/volto-bise-policy/commit/347f96e335139f9656abd34c308c531b05de85e7)]
|
|
99
115
|
- chore: change the theme and alias to volto-spotlight and add volto-spotlight to package.json - refs #259794 [ana-oprea - [`52732a1`](https://github.com/eea/volto-bise-policy/commit/52732a17b3247a04ffae0a3f5118e173afa98157)]
|
|
100
116
|
- chore: change theme to eea-volto-theme, change config.alias - refs #259794 [ana-oprea - [`c2d08ea`](https://github.com/eea/volto-bise-policy/commit/c2d08ea08a7f0e5f6f7d32149e60ea3f3e901923)]
|
|
101
|
-
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`a3c9488`](https://github.com/eea/volto-bise-policy/commit/a3c9488c5d09ba97fe5976675524d436080a2460)]
|
|
102
117
|
- chore: husky, lint-staged use fixed versions [valentinab25 - [`fddc30f`](https://github.com/eea/volto-bise-policy/commit/fddc30f11a1d8ec290edaca2d924282f5e113bc6)]
|
|
103
118
|
- chore:volto 16 in tests, update docs, fix stylelint overrides [valentinab25 - [`005ce74`](https://github.com/eea/volto-bise-policy/commit/005ce742dbd014fde27e417059251233365766dd)]
|
|
104
119
|
|
|
@@ -111,17 +126,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
111
126
|
- test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`c1277ba`](https://github.com/eea/volto-bise-policy/commit/c1277bacf840ee9feccbfd6a2c85f0b25a9a9125)]
|
|
112
127
|
- test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`c944153`](https://github.com/eea/volto-bise-policy/commit/c944153710fd53c5d48863cf363464273e25f52e)]
|
|
113
128
|
- test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`d648d52`](https://github.com/eea/volto-bise-policy/commit/d648d525a2fc5076577fe0f75ff9782bf0d1d4e9)]
|
|
114
|
-
- test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`2a7affe`](https://github.com/eea/volto-bise-policy/commit/2a7affe33d737704bdba117c4a5c8c6748ef7a47)]
|
|
115
|
-
- test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`5929642`](https://github.com/eea/volto-bise-policy/commit/59296420105d0e8c1f1547aa0cd17a019e478c2b)]
|
|
116
|
-
- test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`b1142f1`](https://github.com/eea/volto-bise-policy/commit/b1142f1da3667a9f56720f65bebce897a5dd8005)]
|
|
117
129
|
- test: cypress should not wait for navigation, actions, types - refs #259794 [ana-oprea - [`188637c`](https://github.com/eea/volto-bise-policy/commit/188637c78a0cae71b5ee48022507d559dfaceb3e)]
|
|
118
|
-
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`fa4e473`](https://github.com/eea/volto-bise-policy/commit/fa4e473018386ec3f09d7300d655c8cccdc19a0e)]
|
|
119
|
-
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`1d9135b`](https://github.com/eea/volto-bise-policy/commit/1d9135bb878b3c7a1b828085b99b9d27d78ce60e)]
|
|
120
130
|
- remove cypress tests as it doesn t work on bise [Dobricean Ioan Dorian - [`ba7e2de`](https://github.com/eea/volto-bise-policy/commit/ba7e2defea2dcfd01537c3abb41fa9515ff0a3e3)]
|
|
121
131
|
- add mega menu layout settings as #259794 said [dobri1408 - [`b9a3683`](https://github.com/eea/volto-bise-policy/commit/b9a3683e7d85f8c88ad8feac975c47c434f62c4a)]
|
|
122
|
-
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`9181908`](https://github.com/eea/volto-bise-policy/commit/9181908c7f4b51bdf83a34f8c7f25827de9b1cc6)]
|
|
123
|
-
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`099d796`](https://github.com/eea/volto-bise-policy/commit/099d79669471e6924bf1e0bc51a79d54379c3a1a)]
|
|
124
|
-
- test: [JENKINS] Improve cypress time [valentinab25 - [`6d5d8e2`](https://github.com/eea/volto-bise-policy/commit/6d5d8e29b04ddb92628245570055067ca3dcbb6c)]
|
|
125
132
|
- test: fix comment [valentinab25 - [`4f27d5a`](https://github.com/eea/volto-bise-policy/commit/4f27d5af2e8895c7af4f1157521ca42682b96e23)]
|
|
126
133
|
- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`4c2fcb0`](https://github.com/eea/volto-bise-policy/commit/4c2fcb01065e1ef962317ba7be788fd1df079618)]
|
|
127
134
|
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`89afaa1`](https://github.com/eea/volto-bise-policy/commit/89afaa15892930452027ef8c8593fc6d193cda70)]
|
package/package.json
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TextareaWidget } from '@plone/volto/components';
|
|
2
|
+
|
|
3
|
+
const CustomCSSBlockEdit = ({ data, onChangeBlock, block }) => {
|
|
4
|
+
return (
|
|
5
|
+
<TextareaWidget
|
|
6
|
+
id="cssCode"
|
|
7
|
+
title="Inline CSS"
|
|
8
|
+
value={data.cssCode}
|
|
9
|
+
onChange={(id, value) =>
|
|
10
|
+
onChangeBlock(block, { ...data, cssCode: value })
|
|
11
|
+
}
|
|
12
|
+
/>
|
|
13
|
+
);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default CustomCSSBlockEdit;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
const CustomCSSBlockView = ({ data }) => {
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
const style = document.createElement('style');
|
|
6
|
+
style.innerHTML = data?.cssCode || '';
|
|
7
|
+
document.head.appendChild(style);
|
|
8
|
+
|
|
9
|
+
return () => {
|
|
10
|
+
document.head.removeChild(style);
|
|
11
|
+
};
|
|
12
|
+
}, [data]);
|
|
13
|
+
|
|
14
|
+
return null;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default CustomCSSBlockView;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import codeSVG from '@plone/volto/icons/code.svg';
|
|
2
|
+
import CustomCSSView from './CustomCSSView';
|
|
3
|
+
import CustomCSSEdit from './CustomCSSEdit';
|
|
4
|
+
|
|
5
|
+
const config = (config) => {
|
|
6
|
+
config.blocks.blocksConfig.biseCustomCSS = {
|
|
7
|
+
id: 'biseCustomCSS',
|
|
8
|
+
title: 'Custom CSS',
|
|
9
|
+
icon: codeSVG,
|
|
10
|
+
group: 'custom_addons',
|
|
11
|
+
view: CustomCSSView,
|
|
12
|
+
edit: CustomCSSEdit,
|
|
13
|
+
restricted: false,
|
|
14
|
+
mostUsed: false,
|
|
15
|
+
blockHasOwnFocusManagement: false,
|
|
16
|
+
sidebarTab: 1,
|
|
17
|
+
security: {
|
|
18
|
+
addPermission: [],
|
|
19
|
+
view: [],
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return config;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default config;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TextareaWidget } from '@plone/volto/components';
|
|
2
|
+
|
|
3
|
+
const CustomJSBlockEdit = ({ data, onChangeBlock, block }) => {
|
|
4
|
+
return (
|
|
5
|
+
<TextareaWidget
|
|
6
|
+
id="jsCode"
|
|
7
|
+
title="Inline JavaScript"
|
|
8
|
+
value={data.jsCode}
|
|
9
|
+
onChange={(id, value) => onChangeBlock(block, { ...data, jsCode: value })}
|
|
10
|
+
/>
|
|
11
|
+
);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default CustomJSBlockEdit;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
const CustomJSBlockView = ({ data }) => {
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
const script = document.createElement('script');
|
|
6
|
+
script.type = 'text/javascript';
|
|
7
|
+
script.innerHTML = data?.jsCode || '';
|
|
8
|
+
document.body.appendChild(script);
|
|
9
|
+
|
|
10
|
+
return () => {
|
|
11
|
+
document.body.removeChild(script);
|
|
12
|
+
};
|
|
13
|
+
}, [data]);
|
|
14
|
+
|
|
15
|
+
return null;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default CustomJSBlockView;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import codeSVG from '@plone/volto/icons/code.svg';
|
|
2
|
+
import CustomJSView from './CustomJSView';
|
|
3
|
+
import CustomJSEdit from './CustomJSEdit';
|
|
4
|
+
|
|
5
|
+
const config = (config) => {
|
|
6
|
+
config.blocks.blocksConfig.biseCustomJS = {
|
|
7
|
+
id: 'biseCustomJS',
|
|
8
|
+
title: 'Custom JS',
|
|
9
|
+
icon: codeSVG,
|
|
10
|
+
group: 'custom_addons',
|
|
11
|
+
view: CustomJSView,
|
|
12
|
+
edit: CustomJSEdit,
|
|
13
|
+
restricted: false,
|
|
14
|
+
mostUsed: false,
|
|
15
|
+
blockHasOwnFocusManagement: false,
|
|
16
|
+
sidebarTab: 1,
|
|
17
|
+
security: {
|
|
18
|
+
addPermission: [],
|
|
19
|
+
view: [],
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return config;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default config;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import installBodyClass from './BodyClass';
|
|
2
|
+
import installCustomJS from './CustomJS';
|
|
3
|
+
import installCustomCSS from './CustomCSS';
|
|
2
4
|
import installRedirect from './Redirect';
|
|
3
5
|
import installFactsheetsListing from './FactsheetsListing';
|
|
4
6
|
import installKeyFacts from './KeyFacts';
|
|
@@ -8,6 +10,8 @@ import installNavigation from './Navigation';
|
|
|
8
10
|
const config = (config) => {
|
|
9
11
|
return [
|
|
10
12
|
installBodyClass,
|
|
13
|
+
installCustomJS,
|
|
14
|
+
installCustomCSS,
|
|
11
15
|
installRedirect,
|
|
12
16
|
installFactsheetsListing,
|
|
13
17
|
installKeyFacts,
|
|
@@ -69,13 +69,14 @@ class Edit extends Component {
|
|
|
69
69
|
|
|
70
70
|
if (!provider_data) return schema;
|
|
71
71
|
|
|
72
|
-
const choices = Array.from(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
const choices = Array.from(
|
|
73
|
+
Object.keys(provider_data).sort((a, b) => a - b),
|
|
74
|
+
).map((n) => [n, n]);
|
|
75
|
+
schema.properties.columns.schemaExtender = (schema) => {
|
|
76
|
+
schema.properties.column.choices = choices;
|
|
77
|
+
schema.properties.column_link.choices = choices;
|
|
78
|
+
return schema;
|
|
79
|
+
};
|
|
79
80
|
|
|
80
81
|
return schema;
|
|
81
82
|
};
|
|
@@ -109,7 +110,7 @@ const EditWrapper = compose(
|
|
|
109
110
|
}),
|
|
110
111
|
)(injectIntl(Edit));
|
|
111
112
|
|
|
112
|
-
const
|
|
113
|
+
const SimpleDataTableEdit = (props) => {
|
|
113
114
|
return (
|
|
114
115
|
<VisibilitySensor offset={{ top: -150, bottom: -150 }}>
|
|
115
116
|
<EditWrapper {...props} />
|
|
@@ -117,4 +118,4 @@ const $Edit = (props) => {
|
|
|
117
118
|
);
|
|
118
119
|
};
|
|
119
120
|
|
|
120
|
-
export default
|
|
121
|
+
export default SimpleDataTableEdit;
|
|
@@ -11,12 +11,12 @@ import { ColoredTableView, coloredTableSchema } from './templates/colored';
|
|
|
11
11
|
const applyConfig = (config) => {
|
|
12
12
|
config.blocks.blocksConfig.simpleDataConnectedTable = {
|
|
13
13
|
id: 'simpleDataConnectedTable',
|
|
14
|
-
title: 'Data Table',
|
|
14
|
+
title: 'Simple Data Table',
|
|
15
15
|
icon: tableSVG,
|
|
16
16
|
group: 'data_blocks',
|
|
17
17
|
view: SimpleDataTableView,
|
|
18
18
|
edit: SimpleDataTableEdit,
|
|
19
|
-
restricted:
|
|
19
|
+
restricted: false,
|
|
20
20
|
mostUsed: false,
|
|
21
21
|
sidebarTab: 1,
|
|
22
22
|
security: {
|
|
@@ -61,14 +61,16 @@ const View = (props) => {
|
|
|
61
61
|
clearTimeout(timeoutRef.current);
|
|
62
62
|
props.dispatch({ type: 'TABLE_START_SEARCH', query: data.value });
|
|
63
63
|
timeoutRef.current = setTimeout(() => {
|
|
64
|
-
props.history
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
64
|
+
if (props.history) {
|
|
65
|
+
props.history.push({
|
|
66
|
+
search:
|
|
67
|
+
'?' +
|
|
68
|
+
qs.stringify({
|
|
69
|
+
...props.query,
|
|
70
|
+
searchTerm: data.value,
|
|
71
|
+
}),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
72
74
|
if (data.value.length === 0) {
|
|
73
75
|
props.dispatch({ type: 'TABLE_CLEAN_QUERY' });
|
|
74
76
|
return;
|
|
@@ -233,9 +235,7 @@ const View = (props) => {
|
|
|
233
235
|
{placeholder}
|
|
234
236
|
</Table.Cell>
|
|
235
237
|
</Table.Row>
|
|
236
|
-
) :
|
|
237
|
-
''
|
|
238
|
-
)}
|
|
238
|
+
) : null}
|
|
239
239
|
</Table.Body>
|
|
240
240
|
{Math.ceil(items.length / row_size) > 1 ? (
|
|
241
241
|
<Table.Footer>
|
|
@@ -258,9 +258,7 @@ const View = (props) => {
|
|
|
258
258
|
</Table.HeaderCell>
|
|
259
259
|
</Table.Row>
|
|
260
260
|
</Table.Footer>
|
|
261
|
-
) :
|
|
262
|
-
''
|
|
263
|
-
)}
|
|
261
|
+
) : null}
|
|
264
262
|
</Table>
|
|
265
263
|
</div>
|
|
266
264
|
);
|