@eeacms/volto-bise-policy 1.0.1 → 1.0.3

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,13 @@ 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.3](https://github.com/eea/volto-bise-policy/compare/1.0.2...1.0.3) - 12 April 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - update [Miu Razvan - [`a75120c`](https://github.com/eea/volto-bise-policy/commit/a75120c5047d4654b064ba1e5114d2405be5d2ff)]
12
+ ### [1.0.2](https://github.com/eea/volto-bise-policy/compare/1.0.1...1.0.2) - 29 March 2023
13
+
7
14
  ### [1.0.1](https://github.com/eea/volto-bise-policy/compare/1.0.0...1.0.1) - 29 March 2023
8
15
 
9
16
  #### :rocket: New Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-bise-policy",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
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",
@@ -23,8 +23,8 @@
23
23
  "url": "git@github.com:eea/volto-bise-policy.git"
24
24
  },
25
25
  "dependencies": {
26
- "@eeacms/volto-datablocks": "*",
27
26
  "@eeacms/volto-block-toc": "*",
27
+ "@eeacms/volto-datablocks": "*",
28
28
  "@eeacms/volto-eea-design-system": "*",
29
29
  "@eeacms/volto-eea-website-theme": "*",
30
30
  "esri-loader": "3.7.0"
package/razzle.extend.js CHANGED
@@ -8,17 +8,18 @@ const modify = (config, { target, dev }, webpack) => {
8
8
  config.resolve.alias['../../theme.config'] = themeConfigPath;
9
9
  config.resolve.alias['../../theme'] = `${__dirname}/theme`;
10
10
  const projectRootPath = path.resolve('.');
11
- const themeLessPath = `${projectRootPath}/node_modules/@eeacms/volto-eea-design-system/theme`;
11
+ const themeLessPath = `${projectRootPath}/node_modules/@eeacms/volto-spotlight/theme`;
12
12
 
13
- config.resolve.alias['eea-design-system-theme'] = dev
14
- ? `${projectRootPath}/src/addons/volto-eea-design-system/theme/themes/eea`
15
- : `${themeLessPath}/themes/eea`;
13
+ config.resolve.alias['volto-spotlight-theme'] = dev
14
+ ? `${projectRootPath}/src/addons/volto-spotlight/theme/themes/spotlight`
15
+ : `${themeLessPath}/themes/spotlight`;
16
16
 
17
17
  const semanticLessPath = `${projectRootPath}/node_modules/semantic-ui-less`;
18
- const hasDesignSystemInstalled = config.resolve.alias['eea-volto-themes'];
19
- config.resolve.alias['eea-volto-theme-folder'] = hasDesignSystemInstalled
20
- ? themeLessPath
21
- : semanticLessPath;
18
+ const hasDesignSystemInstalled =
19
+ config.resolve.alias['volto-spotlight-themes'];
20
+ config.resolve.alias[
21
+ 'volto-spotlight-theme-folder'
22
+ ] = hasDesignSystemInstalled ? themeLessPath : semanticLessPath;
22
23
 
23
24
  return config;
24
25
  };
@@ -0,0 +1,55 @@
1
+ import { cloneDeep } from 'lodash';
2
+ import imageFitSVG from '@plone/volto/icons/image-fit.svg';
3
+ import imageWideSVG from '@plone/volto/icons/image-wide.svg';
4
+ import imageFullSVG from '@plone/volto/icons/image-full.svg';
5
+ import imageNarrowSVG from '@eeacms/volto-bise-policy/../theme/assets/icons/image-narrow.svg';
6
+ import leftSVG from '@eeacms/volto-bise-policy/../theme/assets/icons/image-half-left.svg';
7
+ import rightSVG from '@eeacms/volto-bise-policy/../theme/assets/icons/image-half-right.svg';
8
+
9
+ export const ALIGN_INFO_MAP = {
10
+ narrow_width: [imageNarrowSVG, 'Narrow width'],
11
+ container_width: [imageFitSVG, 'Container width'],
12
+ wide_width: [imageWideSVG, 'Wide width'],
13
+ full: [imageFullSVG, 'Full width'],
14
+ half_width_left: [leftSVG, 'Half width left'],
15
+ half_width_right: [rightSVG, 'Half width right'],
16
+ };
17
+
18
+ export const addStylingFieldsetSchemaEnhancer = ({ schema }) => {
19
+ const applied = schema?.properties?.styles;
20
+
21
+ if (!applied) {
22
+ const resSchema = cloneDeep(schema);
23
+
24
+ resSchema.fieldsets.push({
25
+ id: 'styling',
26
+ fields: ['styles'],
27
+ title: 'Styling',
28
+ });
29
+ resSchema.properties.styles = {
30
+ widget: 'object',
31
+ title: 'Styling',
32
+ schema: {
33
+ fieldsets: [
34
+ {
35
+ id: 'default',
36
+ title: 'Default',
37
+ fields: ['size'],
38
+ },
39
+ ],
40
+ properties: {
41
+ size: {
42
+ widget: 'style_align',
43
+ title: 'Section size',
44
+ actions: Object.keys(ALIGN_INFO_MAP),
45
+ actionsInfoMap: ALIGN_INFO_MAP,
46
+ },
47
+ },
48
+ required: [],
49
+ },
50
+ };
51
+ return resSchema;
52
+ }
53
+
54
+ return schema;
55
+ };
package/src/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import installLink from '@plone/volto-slate/editor/plugins/AdvancedLink';
2
+ import { addStylingFieldsetSchemaEnhancer } from '@eeacms/volto-bise-policy/components/manage/Blocks/schema';
2
3
 
3
4
  import installBlocks from './components/manage/Blocks';
4
5
  import installStyles from './components/manage/Styles';
@@ -6,8 +7,6 @@ import installStyles from './components/manage/Styles';
6
7
  import biseLogo from '@eeacms/volto-bise-policy/../theme//assets/images/Header/bise-logo.svg';
7
8
  import biseWhiteLogo from '@eeacms/volto-bise-policy/../theme//assets/images/Header/bise-logo-white.svg';
8
9
 
9
- import { getBlocksTocEntries } from '@eeacms/volto-block-toc/Block/TocView';
10
-
11
10
  const applyConfig = (config) => {
12
11
  // Volto specific settings
13
12
  config.settings = {
@@ -77,22 +76,28 @@ const applyConfig = (config) => {
77
76
  toolbarButtons.splice(linkIndex, 1, 'a');
78
77
  toolbarButtons.splice(advancedLinkIndex, 1);
79
78
 
80
- config.blocks.blocksConfig.columnsBlock.tocEntries = (blockData, data) => {
81
- const columns = blockData.data.blocks_layout.items || [];
82
- let entries = [];
83
-
84
- columns.forEach((column) => {
85
- const { blocksFormEntries } = getBlocksTocEntries(
86
- {
87
- ...blockData.data.blocks[column],
88
- },
89
- data,
90
- );
91
- entries = [...entries, ...blocksFormEntries];
92
- });
93
-
94
- return entries;
95
- };
79
+ // Customizations
80
+ // Group
81
+ if (config.blocks.blocksConfig.group) {
82
+ config.blocks.blocksConfig.group.schemaEnhancer = addStylingFieldsetSchemaEnhancer;
83
+ }
84
+
85
+ // Columns
86
+ if (config.blocks.blocksConfig.columnsBlock) {
87
+ config.blocks.blocksConfig.columnsBlock.mostUsed = true;
88
+ config.blocks.blocksConfig.columnsBlock.schemaEnhancer = addStylingFieldsetSchemaEnhancer;
89
+ }
90
+
91
+ // Listing
92
+ if (config.blocks.blocksConfig.listing) {
93
+ config.blocks.blocksConfig.listing.title = 'Listing (Content)';
94
+ config.blocks.blocksConfig.listing.schemaEnhancer = addStylingFieldsetSchemaEnhancer;
95
+ }
96
+
97
+ // Hero image left
98
+ if (config.blocks.blocksConfig.hero_image_left) {
99
+ config.blocks.blocksConfig.hero_image_left.schemaEnhancer = addStylingFieldsetSchemaEnhancer;
100
+ }
96
101
 
97
102
  return [installBlocks, installStyles].reduce(
98
103
  (acc, apply) => apply(acc),
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
+ <g>
3
+ <path fill-rule="nonzero" d="M18,13l2-2v14l-2-2h15l-2,2V11l2,2H18z M33,11v14H18V11H33z"/>
4
+ <polygon points="3,31 33,31 33,29 3,29 "/>
5
+ <polygon points="3,7 33,7 33,5 3,5 "/>
6
+ <polygon points="12.3,15.8 14,17.5 5,17.5 6.7,15.8 5.9,15.1 3,18 5.9,20.9 6.7,20.2 5,18.5 14,18.5 12.3,20.2 13.1,20.9 16,18
7
+ 13.1,15.1 "/>
8
+ </g>
9
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
+ <g>
3
+ <path fill-rule="nonzero" d="M3,13l2-2v14l-2-2h15l-2,2V11l2,2H3z M18,11v14H3V11H18z"/>
4
+ <polygon points="3,31 33,31 33,29 3,29 "/>
5
+ <polygon points="3,7 33,7 33,5 3,5 "/>
6
+ <polygon points="29.3,15.8 31,17.5 22.1,17.5 23.8,15.8 23,15.1 20.1,18 23,20.9 23.8,20.2 22.1,18.5 31,18.5 29.3,20.2 30.1,20.9
7
+ 33,18 30.1,15.1 "/>
8
+ </g>
9
+
10
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
+ <path d="M10 13L11.9333 11V25L10 23H26L24.0667 25V11L26 13H10ZM26 11V18V21.5V23.5V25H10V11H26Z" fill="black" />
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M7 31H29V29H7V31Z" />
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M7 7H29V5H7V7Z" />
5
+ </svg>
@@ -49,22 +49,10 @@
49
49
  }
50
50
  }
51
51
 
52
- .marginless {
53
- margin: 0;
52
+ .marginless,
53
+ div#view .ui.container > .marginless {
54
54
  margin-top: 0;
55
- margin-right: 0;
56
55
  margin-bottom: 0;
57
- margin-left: 0;
58
- }
59
-
60
- div#view .ui.container > {
61
- .marginless {
62
- margin: 0;
63
- margin-top: 0;
64
- margin-right: 0;
65
- margin-bottom: 0;
66
- margin-left: 0;
67
- }
68
56
  }
69
57
 
70
58
  .padded {
@@ -0,0 +1,3 @@
1
+ .align-widget .align-buttons {
2
+ flex-wrap: wrap;
3
+ }
@@ -2,13 +2,14 @@
2
2
  Global Overrides
3
3
  *******************************/
4
4
 
5
- @import '../extras/keyfacts.less';
6
- @import '../extras/factsheets.less';
7
- @import '../extras/pluggables.less';
8
- @import '../extras/stylemenu.less';
9
- @import '../extras/tocnav.less';
10
- @import './helpers.less';
11
- @import './natura2000.less';
5
+ @import '../extras/widgets';
6
+ @import '../extras/keyfacts';
7
+ @import '../extras/factsheets';
8
+ @import '../extras/pluggables';
9
+ @import '../extras/stylemenu';
10
+ @import '../extras/tocnav';
11
+ @import './helpers';
12
+ @import './natura2000';
12
13
 
13
14
  // :root {
14
15
  // .define-color(primary, #005248);
@@ -22,24 +23,6 @@
22
23
  // .define-color(dark-tertiary, #2e3e4c);
23
24
  // }
24
25
 
25
- // body::-webkit-scrollbar {
26
- // width: @scrollbarWidth;
27
- // }
28
-
29
- // body::-webkit-scrollbar-track {
30
- // background: #F9F9F9;
31
- // }
32
-
33
- // body::-webkit-scrollbar-thumb {
34
- // background-color: #B4B4B4;
35
- // border-radius: 20px;
36
- // border: 3px solid #FAF9F9;
37
- // }
38
-
39
- // body::-webkit-scrollbar-thumb:hover {
40
- // background-color: #6A6A6A;
41
- // }
42
-
43
26
  @font-face {
44
27
  font-family: 'OpenSans';
45
28
  font-weight: normal;
@@ -111,9 +94,9 @@ p.has--clear--both:empty {
111
94
  // border-bottom: 2px solid @darkSecondaryColor;
112
95
  }
113
96
 
114
- h2 {
115
- // border-bottom: 2px solid @secondaryColor;
116
- }
97
+ // h2 {
98
+ // border-bottom: 2px solid @secondaryColor;
99
+ // }
117
100
 
118
101
  .column-blocks-wrapper {
119
102
  display: flex;
@@ -275,4 +258,34 @@ p.has--clear--both:empty {
275
258
  .ui.content-area {
276
259
  margin-bottom: 2rem;
277
260
  }
278
- }
261
+ }
262
+
263
+ #toolbar {
264
+ z-index: 6;
265
+ }
266
+
267
+
268
+ @{view} {
269
+ .red-bg::before {
270
+ .full-width();
271
+ }
272
+ }
273
+
274
+ @{edit} {
275
+ .red-bg::before {
276
+ .full-width-edit();
277
+ }
278
+ }
279
+
280
+ .red-bg {
281
+ position: relative;
282
+ color: #fff;
283
+
284
+ &::before {
285
+ content: '';
286
+ height: 100%;
287
+ background-color: coral;
288
+ z-index: -1 !important;
289
+ position: absolute !important;
290
+ }
291
+ }
@@ -18,12 +18,13 @@
18
18
  */
19
19
 
20
20
  /* Global */
21
- @site : 'eea';
21
+ @site : 'mirage';
22
22
  @reset : 'eea';
23
+ @mixins : 'mirage';
23
24
 
24
25
  /* Elements */
25
26
  @button : 'eea';
26
- @container : 'eea';
27
+ @container : 'mirage';
27
28
  @divider : 'eea';
28
29
  @flag : 'eea';
29
30
  @header : 'eea';
@@ -77,39 +78,41 @@
77
78
  @main : 'eea';
78
79
  @custom : 'eea';
79
80
  /* EEA Design system custom components */
80
- @blockquote : 'eea';
81
- @pullquote : 'eea';
82
- @banner : 'eea';
83
- @timeline : 'eea';
84
- @footer : 'eea';
85
- @header : 'eea';
86
- @tag : 'eea';
87
- @tags : 'eea';
88
- @tagList : 'eea';
89
- @contextNavigation : 'eea';
90
- @inpageNavigation : 'eea';
91
- @avatar : 'eea';
92
- @divider : 'eea';
93
- @testimonial : 'eea';
94
- @avatarGrid : 'eea';
95
- @keyContent : 'eea';
96
- @publicationCard : 'eea';
97
- @contentBox : 'eea';
98
- @reverseCardGrid : 'eea';
99
- @relatedContent : 'eea';
100
- @share : 'eea';
101
- @faqContent : 'eea';
102
- @reportCard : 'eea';
103
- @faqFilter : 'eea';
104
- @contentAccordion : 'eea';
105
- @downloadLabeledIcon : 'eea';
106
- @newTabLabeledIcon : 'eea';
107
- @labeledIconGroup : 'eea';
108
- @languageLabeledIcon : 'eea';
109
- @callout : 'eea';
110
- @quote : 'eea';
111
- @hero : 'eea';
112
- @copyright : 'eea';
81
+ @blockquote : 'eea';
82
+ @pullquote : 'eea';
83
+ @banner : 'eea';
84
+ @timeline : 'eea';
85
+ @footer : 'eea';
86
+ @header : 'eea';
87
+ @tag : 'eea';
88
+ @tags : 'eea';
89
+ @tagList : 'eea';
90
+ @inpageNavigation : 'eea';
91
+ @contextNavigation : 'eea';
92
+ @avatar : 'eea';
93
+ @divider : 'eea';
94
+ @testimonial : 'eea';
95
+ @avatarGrid : 'eea';
96
+ @keyContent : 'eea';
97
+ @publicationCard : 'eea';
98
+ @contentBox : 'mirage';
99
+ @reverseCardGrid : 'eea';
100
+ @relatedContent : 'eea';
101
+ @share : 'eea';
102
+ @faqContent : 'eea';
103
+ @reportCard : 'eea';
104
+ @faqFilter : 'eea';
105
+ @contentAccordion : 'eea';
106
+ @downloadLabeledIcon :'eea';
107
+ @newTabLabeledIcon : 'eea';
108
+ @labeledIconGroup : 'eea';
109
+ @languageLabeledIcon : 'eea';
110
+ @callout : 'eea';
111
+ @quote : 'eea';
112
+ @hero : 'mirage';
113
+ @copyright : 'eea';
114
+ @columns : 'mirage';
115
+ @spotlight : 'mirage';
113
116
 
114
117
  /*******************************
115
118
  Folders
@@ -124,7 +127,7 @@
124
127
  /*******************************
125
128
  Import Theme
126
129
  *******************************/
127
- @import (multiple) "~eea-volto-theme-folder/theme.less";
130
+ @import (multiple) "~volto-spotlight-theme-folder/theme.less";
128
131
 
129
132
  @fontPath: "~volto-themes/default/assets/fonts";
130
133