@eeacms/volto-bise-policy 1.2.13 → 1.2.15

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,11 +4,25 @@ 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.13](https://github.com/eea/volto-bise-policy/compare/1.2.12...1.2.13) - 7 November 2024
7
+ ### [1.2.15](https://github.com/eea/volto-bise-policy/compare/1.2.14...1.2.15) - 13 May 2025
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat(stylewrapper): add useAsPageHeader style option to all blocks refs#286320 [nileshgulia1 - [`09592ca`](https://github.com/eea/volto-bise-policy/commit/09592ca5077b19c1b421e39c6e391f7711117e87)]
12
+
13
+ #### :bug: Bug Fixes
14
+
15
+ - fix(toc): accordionToc list marker and fonts [nileshgulia1 - [`761354d`](https://github.com/eea/volto-bise-policy/commit/761354d8c94196339ffa2737a48d43bd08be5148)]
16
+
17
+ ### [1.2.14](https://github.com/eea/volto-bise-policy/compare/1.2.13...1.2.14) - 11 December 2024
8
18
 
9
19
  #### :hammer_and_wrench: Others
10
20
 
11
- - update [Miu Razvan - [`f7bfa97`](https://github.com/eea/volto-bise-policy/commit/f7bfa97d951ca009cd5ef4d525f6194813114806)]
21
+ - fix eslint [Miu Razvan - [`cb8d143`](https://github.com/eea/volto-bise-policy/commit/cb8d1438cdfd37840639879ea235fbd0eb69d59f)]
22
+ - fix eslint [Miu Razvan - [`49f38f4`](https://github.com/eea/volto-bise-policy/commit/49f38f4509ae68e0658137511eacd521bac6c078)]
23
+ - restrict factsheet block [Miu Razvan - [`daf4dcd`](https://github.com/eea/volto-bise-policy/commit/daf4dcd4684e121ccc86e26a2155ad127dbd7204)]
24
+ ### [1.2.13](https://github.com/eea/volto-bise-policy/compare/1.2.12...1.2.13) - 12 November 2024
25
+
12
26
  ### [1.2.12](https://github.com/eea/volto-bise-policy/compare/1.2.11...1.2.12) - 6 November 2024
13
27
 
14
28
  #### :bug: Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-bise-policy",
3
- "version": "1.2.13",
3
+ "version": "1.2.15",
4
4
  "description": "@eeacms/volto-bise-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
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, { target, dev }, webpack) => {
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
- const semanticLessPath = `${projectRootPath}/node_modules/semantic-ui-less`;
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
  };
@@ -10,7 +10,7 @@ const config = (config) => {
10
10
  group: 'custom_addons',
11
11
  view: FactsheetsListingView,
12
12
  edit: FactsheetsListingEdit,
13
- restricted: false,
13
+ restricted: true,
14
14
  mostUsed: false,
15
15
  blockHasOwnFocusManagement: false,
16
16
  sidebarTab: 1,
@@ -1,64 +1,61 @@
1
- import React, { Component } from 'react';
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 MaesViewerSchema from './schema';
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
- class Edit extends Component {
13
- constructor(props) {
14
- super(props);
15
- this.schema = MaesViewerSchema();
16
- }
12
+ function Edit(props) {
13
+ const { data, provider_data, block, selected, onChangeBlock } = props;
17
14
 
18
- getSchema = () => {
19
- if (!this.props.provider_data) return this.schema;
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 = this.schema;
23
+ const newSchema = { ...maesViewrSchema };
28
24
  newSchema.properties.ecosystem.choices = choices;
29
25
 
30
- if (this.props.data && !this.props.data.hoverTemplate) {
31
- this.props.onChangeBlock(this.props.block, {
32
- ...this.props.data,
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
- render() {
41
- const schema = this.getSchema();
42
- return (
43
- <div className={cx('block', { selected: this.props.selected })}>
44
- <MaesViewerView data={this.props.data} />
45
-
46
- <SidebarPortal selected={this.props.selected}>
47
- <InlineForm
48
- schema={schema}
49
- title={schema.title}
50
- onChangeField={(id, value) => {
51
- this.props.onChangeBlock(this.props.block, {
52
- ...this.props.data,
53
- [id]: value,
54
- });
55
- }}
56
- formData={this.props.data}
57
- />
58
- </SidebarPortal>
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(connectToProviderData)(Edit);
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(connectToProviderData)(View);
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 MaesViewerSchema = () => ({
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: 'pick_provider',
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 MaesViewerSchema;
59
+ export default maesViewrSchema;
@@ -48,6 +48,7 @@ export const StyleSchema = () => {
48
48
  id: 'advanced',
49
49
  title: 'Advanced',
50
50
  fields: [
51
+ 'useAsPageHeader',
51
52
  'theme',
52
53
  'hidden',
53
54
  'height',
@@ -164,6 +165,11 @@ export const StyleSchema = () => {
164
165
  description: 'Hide this block',
165
166
  type: 'boolean',
166
167
  },
168
+ useAsPageHeader: {
169
+ title: 'Use as page header',
170
+ description: 'Use this block as page header',
171
+ type: 'boolean',
172
+ },
167
173
  shadowDepth: {
168
174
  widget: 'slider',
169
175
  title: 'Shadow depth',
@@ -16,7 +16,7 @@ const applyConfig = (config) => {
16
16
  group: 'data_blocks',
17
17
  view: SimpleDataTableView,
18
18
  edit: SimpleDataTableEdit,
19
- restricted: false,
19
+ restricted: true,
20
20
  mostUsed: false,
21
21
  sidebarTab: 1,
22
22
  security: {
@@ -121,6 +121,22 @@
121
121
  }
122
122
  }
123
123
 
124
+ // Table of contents - accordion menu
125
+ .table-of-contents.accordionMenu {
126
+ .ui.accordion {
127
+ .content {
128
+ .accordion-list-bulleted li::marker {
129
+ content: '\25CB';
130
+ color: @lightSecondaryColor;
131
+ font-size: 1.2em;
132
+ }
133
+ .title {
134
+ font-size: 1em;
135
+ }
136
+ }
137
+ }
138
+ }
139
+
124
140
  @media only screen and (min-width: 769px) {
125
141
  .table-of-contents.horizontalMenu {
126
142
  .ui.menu {
@@ -127,7 +127,7 @@
127
127
  /*******************************
128
128
  Import Theme
129
129
  *******************************/
130
- @import (multiple) "~volto-spotlight-theme-folder/theme.less";
130
+ @import (multiple) "~volto-spotlight-themes/../theme.less";
131
131
 
132
132
  @fontPath: "~volto-themes/default/assets/fonts";
133
133