@eeacms/volto-eea-website-policy 0.1.1 → 0.2.2

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,8 +4,35 @@ 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.2](https://github.com/eea/volto-eea-website-policy/compare/0.2.1...0.2.2)
8
+
9
+ - Install callout and remove blockquote - refs #148688 [`53ba5a7`](https://github.com/eea/volto-eea-website-policy/commit/53ba5a7153e30f4f41221323393e41d53132fdae)
10
+
11
+ #### [0.2.1](https://github.com/eea/volto-eea-website-policy/compare/0.2.0...0.2.1)
12
+
13
+ > 25 March 2022
14
+
15
+ - 137187 keycloak integration for plone6 (#3) [`#6`](https://github.com/eea/volto-eea-website-policy/pull/6)
16
+ - 137187 keycloak integration for plone6 [`#3`](https://github.com/eea/volto-eea-website-policy/pull/3)
17
+
18
+ #### [0.2.0](https://github.com/eea/volto-eea-website-policy/compare/0.1.1...0.2.0)
19
+
20
+ > 18 March 2022
21
+
22
+ - Release [`#5`](https://github.com/eea/volto-eea-website-policy/pull/5)
23
+ - Enable multilingual - refs #146771 [`#4`](https://github.com/eea/volto-eea-website-policy/pull/4)
24
+ - Release 0.2.0 [`4b72206`](https://github.com/eea/volto-eea-website-policy/commit/4b72206675ab13ed81567df590849613581d7f10)
25
+ - Update index.js [`0f5be15`](https://github.com/eea/volto-eea-website-policy/commit/0f5be1553b608f49c9a61bbc69a0f90219260a83)
26
+ - Update index.js [`03dd3b1`](https://github.com/eea/volto-eea-website-policy/commit/03dd3b162d3175df00048339bed4f9a7d097a896)
27
+ - format index.js [`db4481a`](https://github.com/eea/volto-eea-website-policy/commit/db4481aeeba59a769272659f33278c902fc69bec)
28
+ - Update index.js [`dc09886`](https://github.com/eea/volto-eea-website-policy/commit/dc0988640a76a9914381b120f58bb61a9ab1eb39)
29
+ - Added externalRoutes [`b68135b`](https://github.com/eea/volto-eea-website-policy/commit/b68135b013fafa93a41ea602ea2fad30879abe0f)
30
+
7
31
  #### [0.1.1](https://github.com/eea/volto-eea-website-policy/compare/0.1.0...0.1.1)
8
32
 
33
+ > 4 March 2022
34
+
35
+ - Release [`#1`](https://github.com/eea/volto-eea-website-policy/pull/1)
9
36
  - Enable description block by default [`b3d6534`](https://github.com/eea/volto-eea-website-policy/commit/b3d6534a57f7288899c4f59b5cec553370363d8b)
10
37
  - Prepare for first release [`69e36b1`](https://github.com/eea/volto-eea-website-policy/commit/69e36b1c82b75b0917ef3d433581c50cdcf6c341)
11
38
  - Enable working copy support [`7c6269d`](https://github.com/eea/volto-eea-website-policy/commit/7c6269d75df915f39c15e8ed0893cc062601e7a7)
@@ -9,6 +9,7 @@ module.exports = {
9
9
  '@plone/volto/babel': '<rootDir>/node_modules/@plone/volto/babel',
10
10
  '@plone/volto/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
11
11
  '@package/(.*)$': '<rootDir>/src/$1',
12
+ '@root/(.*)$': '<rootDir>/src/$1',
12
13
  '@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
13
14
  '@eeacms/(.*?)/(.*)$': '<rootDir>/src/addons/$1/src/$2',
14
15
  'volto-slate/(.*)$': '<rootDir>/src/addons/volto-slate/src/$1',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-website-policy",
3
- "version": "0.1.1",
3
+ "version": "0.2.2",
4
4
  "description": "@eeacms/volto-eea-website-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -16,8 +16,12 @@
16
16
  "type": "git",
17
17
  "url": "git@github.com:eea/volto-eea-website-policy.git"
18
18
  },
19
+ "addons": [
20
+ "volto-slate"
21
+ ],
19
22
  "dependencies": {
20
- "@plone/scripts": "*"
23
+ "@plone/scripts": "*",
24
+ "volto-slate": "*"
21
25
  },
22
26
  "devDependencies": {
23
27
  "@cypress/code-coverage": "^3.9.5",
package/src/index.js CHANGED
@@ -1,3 +1,6 @@
1
+ import { runtimeConfig } from '@plone/volto/runtime_config';
2
+ import installCallout from 'volto-slate/editor/plugins/Callout';
3
+
1
4
  const applyConfig = (config) => {
2
5
  // if (process.env.NODE_ENV === 'production') {
3
6
  // // Restrict block-style to Layout only
@@ -6,11 +9,20 @@ const applyConfig = (config) => {
6
9
  // config.settings.layoutOnlySlateMetadataMentions = true;
7
10
  // }
8
11
 
12
+ // Callout slate button
13
+ config = installCallout(config);
14
+
15
+ // Remove blockquote slate button
16
+ config.settings.slate.toolbarButtons = config.settings.slate.toolbarButtons.filter(
17
+ (item) => item !== 'blockquote',
18
+ );
19
+
9
20
  // Disable tags on View
10
21
  config.settings.showTags = false;
11
22
 
12
23
  // Enable Title block
13
24
  config.blocks.blocksConfig.title.restricted = false;
25
+
14
26
  // Enable description block (also for cypress)
15
27
  config.blocks.blocksConfig.description.restricted = false;
16
28
  config.blocks.requiredBlocks = [];
@@ -18,44 +30,39 @@ const applyConfig = (config) => {
18
30
  // Date format for EU
19
31
  config.settings.dateLocale = 'en-gb';
20
32
 
21
- // TODO: Working-copy
22
- // config.settings.hasWorkingCopySupport = true;
23
-
24
- // TODO: Multi-lingual
25
- // config.settings.isMultilingual = true;
26
- // config.settings.defaultLanguage = 'en';
27
- // config.settings.supportedLanguages = [
28
- // 'en', // English
29
- // 'sq', // Albanian
30
- // 'bg', // Bulgarian
31
- // 'bs', // Bosnian
32
- // 'cs', // Czech
33
- // 'hr', // Croatian
34
- // 'da', // Danish
35
- // 'nl', // Dutch
36
- // 'el', // Greek
37
- // 'et', // Estonian
38
- // 'fi', // Finnish
39
- // 'fr', // French
40
- // 'de', // German
41
- // 'hu', // Hungarian
42
- // 'is', // Icelandic
43
- // 'it', // Italian
44
- // 'lv', // Latvian
45
- // 'lt', // Lithuanian
46
- // 'mk', // Macedonian
47
- // 'mt', // Maltese
48
- // 'no', // Norwegian
49
- // 'pl', // Polish
50
- // 'pt', // Portuguese
51
- // 'ro', // Romanian
52
- // 'sh', // Serbian
53
- // 'sk', // Slovak
54
- // 'sl', // Slovenian
55
- // 'es', // Spanish
56
- // 'sv', // Swedish
57
- // 'tr', // Turkish
58
- // ];
33
+ // #137187 Keycloak integration
34
+ if (runtimeConfig['RAZZLE_KEYCLOAK'] === 'Yes') {
35
+ config.settings.externalRoutes = [
36
+ ...(config.settings.externalRoutes || []),
37
+ {
38
+ match: {
39
+ path: '/login',
40
+ exact: true,
41
+ strict: false,
42
+ },
43
+ },
44
+ {
45
+ match: {
46
+ path: '/logout',
47
+ exact: true,
48
+ strict: false,
49
+ },
50
+ },
51
+ ];
52
+ }
53
+
54
+ // Working-copy
55
+ config.settings.hasWorkingCopySupport = true;
56
+
57
+ // Multi-lingual
58
+ config.settings.isMultilingual = true;
59
+ config.settings.defaultLanguage =
60
+ config.settings.eea?.defaultLanguage || 'en';
61
+ config.settings.supportedLanguages = config.settings.eea?.languages?.map(
62
+ (item) => item.code,
63
+ ) || ['en'];
64
+
65
+ // Done
59
66
  return config;
60
67
  };
61
68