@eeacms/volto-hero-block 0.2.0 → 1.0.0
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/.coverage.babel.config.js +1 -1
- package/.i18n.babel.config.js +1 -0
- package/CHANGELOG.md +40 -31
- package/README.md +1 -27
- package/babel.config.js +1 -1
- package/cypress.config.js +26 -0
- package/jest-addon.config.js +4 -4
- package/package.json +18 -17
- package/src/components/Blocks/Hero/Edit.jsx +6 -3
- package/src/helpers.js +1 -1
- package/cypress.json +0 -17
|
@@ -2,7 +2,7 @@ const defaultBabel = require('@plone/volto/babel');
|
|
|
2
2
|
|
|
3
3
|
function applyDefault(api) {
|
|
4
4
|
const voltoBabel = defaultBabel(api);
|
|
5
|
-
voltoBabel.plugins.push('
|
|
5
|
+
voltoBabel.plugins.push('istanbul');
|
|
6
6
|
return voltoBabel;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@plone/volto/babel');
|
package/CHANGELOG.md
CHANGED
|
@@ -4,50 +4,59 @@ 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
|
-
|
|
7
|
+
### [1.0.0](https://github.com/eea/volto-hero-block/compare/0.2.0...1.0.0) - 28 October 2022
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- fix(hero): image dimensions when full width and height isn't enabled [`69fb38e`](https://github.com/eea/volto-hero-block/commit/69fb38e9410f2a241a5d3babca9a712df946f859)
|
|
11
|
-
- change(hero): re-added quoted option to the hero block [`d8c9c59`](https://github.com/eea/volto-hero-block/commit/d8c9c59d7e7e5feaf592a52f9cc6ff23abca2fa2)
|
|
9
|
+
#### :nail_care: Enhancements
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
- refactor(volto-slate): Upgrade to @plone/volto-slate - refs #153447 [Alin Voinea - [`8e9aef4`](https://github.com/eea/volto-hero-block/commit/8e9aef42b9e92cca4666526b083f6f64bb5adfa8)]
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
#### :hammer_and_wrench: Others
|
|
16
14
|
|
|
15
|
+
- Remove cypress.json [Alin Voinea - [`593bdf2`](https://github.com/eea/volto-hero-block/commit/593bdf207ca4fd3f2393117b6f64a44727881ad0)]
|
|
16
|
+
- test(cypress): Upgrade to Cypress 10 / Razzle 4 [Alin Voinea - [`edd48a5`](https://github.com/eea/volto-hero-block/commit/edd48a5c13824bce5e03e46790f1890656b340d8)]
|
|
17
|
+
- Cleanup [Alin Voinea - [`9d72ee7`](https://github.com/eea/volto-hero-block/commit/9d72ee7a06d1c6fed46586d30bb85eae39e670bf)]
|
|
18
|
+
### [0.2.0](https://github.com/eea/volto-hero-block/compare/0.1.4...0.2.0) - 6 July 2022
|
|
17
19
|
|
|
18
|
-
####
|
|
20
|
+
#### :bug: Bug Fixes
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
- fix(hero): image dimensions when full width and height isn't enabled [David Ichim - [`69fb38e`](https://github.com/eea/volto-hero-block/commit/69fb38e9410f2a241a5d3babca9a712df946f859)]
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
#### :nail_care: Enhancements
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
- change(hero): implemented meta alignment and renamed several options for consistency [David Ichim - [`df08d80`](https://github.com/eea/volto-hero-block/commit/df08d80201b079a083e8c742e763c7b144fb5724)]
|
|
27
|
+
- change(hero): re-added quoted option to the hero block [David Ichim - [`d8c9c59`](https://github.com/eea/volto-hero-block/commit/d8c9c59d7e7e5feaf592a52f9cc6ff23abca2fa2)]
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
### [0.1.4](https://github.com/eea/volto-hero-block/compare/0.1.3...0.1.4) - 30 June 2022
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
- change(hero): wrap hero-block-image within a wrapper class [`2802c41`](https://github.com/eea/volto-hero-block/commit/2802c41ee8eba4c34bf6d4b4766ebafb24056602)
|
|
30
|
-
- change(hero): added spaced and inverted options to the main schema [`b6865cd`](https://github.com/eea/volto-hero-block/commit/b6865cdc6dfae0d486f43fccfb31fa555af3a536)
|
|
31
|
-
- change(hero): output h2 from slate instead of p tag [`0b2a4c5`](https://github.com/eea/volto-hero-block/commit/0b2a4c5070cc2bf97f31ff4cf74ade0e27434d91)
|
|
31
|
+
### [0.1.3](https://github.com/eea/volto-hero-block/compare/0.1.2...0.1.3) - 30 June 2022
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
### [0.1.2](https://github.com/eea/volto-hero-block/compare/0.1.1...0.1.2) - 16 June 2022
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
#### :nail_care: Enhancements
|
|
36
36
|
|
|
37
|
-
-
|
|
38
|
-
- change(hero): added
|
|
39
|
-
-
|
|
40
|
-
- Fix external vs internal image [`5e447e9`](https://github.com/eea/volto-hero-block/commit/5e447e9a4e35229d9a29b74ad230a2e1e659bbea)
|
|
41
|
-
- Fix block title [`db8de23`](https://github.com/eea/volto-hero-block/commit/db8de237f523e8cb9b96c2702818b529805fd36e)
|
|
42
|
-
- Support external images [`196902a`](https://github.com/eea/volto-hero-block/commit/196902ac0214cefb8a4bdc643f0424bc7c318282)
|
|
43
|
-
- Update slate footnote support [`c1522b4`](https://github.com/eea/volto-hero-block/commit/c1522b4164dbe6de01771d211d7e0bf3009f44d4)
|
|
44
|
-
- Use justify content for text and button as well [`08599cc`](https://github.com/eea/volto-hero-block/commit/08599cc45546d9b349128c4f8ce9c01318385811)
|
|
45
|
-
- Add dependencies [`30e2881`](https://github.com/eea/volto-hero-block/commit/30e2881a2a97a899e7f4cc614a0405c300ac6fee)
|
|
37
|
+
- change(hero): wrap hero-block-image within a wrapper class [David Ichim - [`2802c41`](https://github.com/eea/volto-hero-block/commit/2802c41ee8eba4c34bf6d4b4766ebafb24056602)]
|
|
38
|
+
- change(hero): added spaced and inverted options to the main schema [David Ichim - [`b6865cd`](https://github.com/eea/volto-hero-block/commit/b6865cdc6dfae0d486f43fccfb31fa555af3a536)]
|
|
39
|
+
- change(hero): output h2 from slate instead of p tag [David Ichim - [`0b2a4c5`](https://github.com/eea/volto-hero-block/commit/0b2a4c5070cc2bf97f31ff4cf74ade0e27434d91)]
|
|
46
40
|
|
|
47
|
-
|
|
41
|
+
### [0.1.1](https://github.com/eea/volto-hero-block/compare/0.1.0...0.1.1) - 13 June 2022
|
|
48
42
|
|
|
49
|
-
|
|
43
|
+
#### :nail_care: Enhancements
|
|
50
44
|
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
- change(hero): added image overlay option [David Ichim - [`647ef2c`](https://github.com/eea/volto-hero-block/commit/647ef2ce68848ac38b71977485021b17e8c2f540)]
|
|
46
|
+
|
|
47
|
+
#### :hammer_and_wrench: Others
|
|
48
|
+
|
|
49
|
+
- Fix Hero image type [Alin Voinea - [`fb2188a`](https://github.com/eea/volto-hero-block/commit/fb2188ac604cfc57ba26ea482e799ca867a412ad)]
|
|
50
|
+
- Fix external vs internal image [Alin Voinea - [`5e447e9`](https://github.com/eea/volto-hero-block/commit/5e447e9a4e35229d9a29b74ad230a2e1e659bbea)]
|
|
51
|
+
- Fix block title [Alin Voinea - [`db8de23`](https://github.com/eea/volto-hero-block/commit/db8de237f523e8cb9b96c2702818b529805fd36e)]
|
|
52
|
+
- Support external images [Miu Razvan - [`196902a`](https://github.com/eea/volto-hero-block/commit/196902ac0214cefb8a4bdc643f0424bc7c318282)]
|
|
53
|
+
- Update slate footnote support [Miu Razvan - [`c1522b4`](https://github.com/eea/volto-hero-block/commit/c1522b4164dbe6de01771d211d7e0bf3009f44d4)]
|
|
54
|
+
- Use justify content for text and button as well [Miu Razvan - [`08599cc`](https://github.com/eea/volto-hero-block/commit/08599cc45546d9b349128c4f8ce9c01318385811)]
|
|
55
|
+
- Add dependencies [Miu Razvan - [`30e2881`](https://github.com/eea/volto-hero-block/commit/30e2881a2a97a899e7f4cc614a0405c300ac6fee)]
|
|
56
|
+
### 0.1.0 - 10 June 2022
|
|
57
|
+
|
|
58
|
+
#### :hammer_and_wrench: Others
|
|
59
|
+
|
|
60
|
+
- jenkins file fix [David Ichim - [`3a51e37`](https://github.com/eea/volto-hero-block/commit/3a51e379dd70cb9c6045922050020e33fc896a74)]
|
|
61
|
+
- Initial commit [David Ichim - [`799ed92`](https://github.com/eea/volto-hero-block/commit/799ed92e506b9b0faded334c019f4a8ffc4b8d43)]
|
|
62
|
+
- Initial commit [ichim-david - [`b21bcfd`](https://github.com/eea/volto-hero-block/commit/b21bcfd42c775acc84179272fac0d6ecaad71430)]
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-hero-block-develop)
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
[Volto](https://github.com/plone/volto) add-on
|
|
18
|
+
Enhanced Hero Block [Volto](https://github.com/plone/volto) add-on
|
|
19
19
|
|
|
20
20
|
## Features
|
|
21
21
|
|
|
@@ -23,28 +23,6 @@ Demo GIF
|
|
|
23
23
|
|
|
24
24
|
## Getting started
|
|
25
25
|
|
|
26
|
-
### Try volto-hero-block with Docker
|
|
27
|
-
|
|
28
|
-
1. Get the latest Docker images
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
docker pull plone
|
|
32
|
-
docker pull plone/volto
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
1. Start Plone backend
|
|
36
|
-
```
|
|
37
|
-
docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
1. Start Volto frontend
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
docker run -it --rm -p 3000:3000 --link plone -e ADDONS="@eeacms/volto-hero-block" plone/volto
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
1. Go to http://localhost:3000
|
|
47
|
-
|
|
48
26
|
### Add volto-hero-block to your Volto project
|
|
49
27
|
|
|
50
28
|
1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
|
|
@@ -97,10 +75,6 @@ All Rights Reserved.
|
|
|
97
75
|
|
|
98
76
|
See [LICENSE.md](https://github.com/eea/volto-hero-block/blob/master/LICENSE.md) for details.
|
|
99
77
|
|
|
100
|
-
## Funding
|
|
101
|
-
|
|
102
|
-
[European Environment Agency (EU)](http://eea.europa.eu)
|
|
103
|
-
volto-addon-template/blob/master/LICENSE.md) for details.
|
|
104
78
|
|
|
105
79
|
## Funding
|
|
106
80
|
|
package/babel.config.js
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const { defineConfig } = require('cypress');
|
|
2
|
+
|
|
3
|
+
module.exports = defineConfig({
|
|
4
|
+
viewportWidth: 1280,
|
|
5
|
+
defaultCommandTimeout: 8888,
|
|
6
|
+
chromeWebSecurity: false,
|
|
7
|
+
reporter: 'junit',
|
|
8
|
+
video: true,
|
|
9
|
+
retries: {
|
|
10
|
+
runMode: 8,
|
|
11
|
+
openMode: 0,
|
|
12
|
+
},
|
|
13
|
+
reporterOptions: {
|
|
14
|
+
mochaFile: 'cypress/reports/cypress-[hash].xml',
|
|
15
|
+
jenkinsMode: true,
|
|
16
|
+
toConsole: true,
|
|
17
|
+
},
|
|
18
|
+
e2e: {
|
|
19
|
+
setupNodeEvents(on, config) {
|
|
20
|
+
// e2e testing node events setup code
|
|
21
|
+
require('@cypress/code-coverage/task')(on, config);
|
|
22
|
+
return config;
|
|
23
|
+
},
|
|
24
|
+
baseUrl: 'http://localhost:3000',
|
|
25
|
+
},
|
|
26
|
+
});
|
package/jest-addon.config.js
CHANGED
|
@@ -9,18 +9,18 @@ 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
|
-
'volto-slate
|
|
15
|
+
'@plone/volto-slate':
|
|
16
|
+
'<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
|
|
15
17
|
'~/(.*)$': '<rootDir>/src/$1',
|
|
16
18
|
'load-volto-addons':
|
|
17
19
|
'<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
|
|
20
|
+
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
|
|
18
21
|
},
|
|
19
22
|
transform: {
|
|
20
23
|
'^.+\\.js(x)?$': 'babel-jest',
|
|
21
|
-
'^.+\\.css$': 'jest-css-modules',
|
|
22
|
-
'^.+\\.less$': 'jest-css-modules',
|
|
23
|
-
'^.+\\.scss$': 'jest-css-modules',
|
|
24
24
|
'^.+\\.(png)$': 'jest-file',
|
|
25
25
|
'^.+\\.(jpg)$': 'jest-file',
|
|
26
26
|
'^.+\\.(svg)$': './node_modules/@plone/volto/jest-svgsystem-transform.js',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-hero-block",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "@eeacms/volto-hero-block: Volto add-on",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
|
@@ -17,33 +17,34 @@
|
|
|
17
17
|
"url": "git@github.com:eea/volto-hero-block.git"
|
|
18
18
|
},
|
|
19
19
|
"addons": [
|
|
20
|
-
"@eeacms/volto-object-widget"
|
|
21
|
-
"volto-slate"
|
|
20
|
+
"@eeacms/volto-object-widget"
|
|
22
21
|
],
|
|
23
22
|
"dependencies": {
|
|
24
|
-
"volto-slate": "*",
|
|
25
23
|
"@eeacms/volto-object-widget": "*"
|
|
26
24
|
},
|
|
27
25
|
"devDependencies": {
|
|
28
26
|
"@plone/scripts": "*",
|
|
29
|
-
"@cypress/code-coverage": "^3.
|
|
30
|
-
"babel-plugin-transform-class-properties": "^6.24.1"
|
|
27
|
+
"@cypress/code-coverage": "^3.10.0",
|
|
28
|
+
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
29
|
+
"md5": "^2.3.0"
|
|
31
30
|
},
|
|
32
31
|
"scripts": {
|
|
33
32
|
"release": "release-it",
|
|
33
|
+
"release-major-beta": "release-it major --preRelease=beta",
|
|
34
|
+
"release-beta": "release-it --preRelease=beta",
|
|
34
35
|
"bootstrap": "npm install -g ejs; npm link ejs; node bootstrap",
|
|
35
36
|
"test": "make test",
|
|
36
37
|
"test:fix": "make test-update",
|
|
37
38
|
"pre-commit": "yarn stylelint:fix && yarn prettier:fix && yarn lint:fix",
|
|
38
|
-
"stylelint": "
|
|
39
|
-
"stylelint:overrides": "
|
|
40
|
-
"stylelint:fix": "
|
|
41
|
-
"prettier": "
|
|
42
|
-
"prettier:fix": "
|
|
43
|
-
"lint": "
|
|
44
|
-
"lint:fix": "
|
|
45
|
-
"i18n": "
|
|
46
|
-
"cypress:run": "
|
|
47
|
-
"cypress:open": "
|
|
48
|
-
|
|
39
|
+
"stylelint": "make stylelint",
|
|
40
|
+
"stylelint:overrides": "make stylelint-overrides",
|
|
41
|
+
"stylelint:fix": "make stylelint-fix",
|
|
42
|
+
"prettier": "make prettier",
|
|
43
|
+
"prettier:fix": "make prettier-fix",
|
|
44
|
+
"lint": "make lint",
|
|
45
|
+
"lint:fix": "make lint-fix",
|
|
46
|
+
"i18n": "make i18n",
|
|
47
|
+
"cypress:run": "make cypress-run",
|
|
48
|
+
"cypress:open": "make cypress-open"
|
|
49
|
+
}
|
|
49
50
|
}
|
|
@@ -7,9 +7,12 @@ import {
|
|
|
7
7
|
SidebarPortal,
|
|
8
8
|
UniversalLink,
|
|
9
9
|
} from '@plone/volto/components';
|
|
10
|
-
import SlateEditor from 'volto-slate/editor/SlateEditor';
|
|
11
|
-
import { handleKey } from 'volto-slate/blocks/Text/keyboard';
|
|
12
|
-
import {
|
|
10
|
+
import SlateEditor from '@plone/volto-slate/editor/SlateEditor';
|
|
11
|
+
import { handleKey } from '@plone/volto-slate/blocks/Text/keyboard';
|
|
12
|
+
import {
|
|
13
|
+
uploadContent,
|
|
14
|
+
saveSlateBlockSelection,
|
|
15
|
+
} from '@plone/volto-slate/actions';
|
|
13
16
|
|
|
14
17
|
import { createSlateHeader } from '@eeacms/volto-hero-block/helpers';
|
|
15
18
|
|
package/src/helpers.js
CHANGED
package/cypress.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"baseUrl": "http://localhost:3000",
|
|
3
|
-
"viewportWidth": 1280,
|
|
4
|
-
"defaultCommandTimeout": 8888,
|
|
5
|
-
"chromeWebSecurity": false,
|
|
6
|
-
"reporter": "junit",
|
|
7
|
-
"video": true,
|
|
8
|
-
"retries": {
|
|
9
|
-
"runMode": 8,
|
|
10
|
-
"openMode": 0
|
|
11
|
-
},
|
|
12
|
-
"reporterOptions": {
|
|
13
|
-
"mochaFile": "cypress/reports/cypress-[hash].xml",
|
|
14
|
-
"jenkinsMode": true,
|
|
15
|
-
"toConsole": true
|
|
16
|
-
}
|
|
17
|
-
}
|