@eeacms/volto-tabs-block 2.0.2 → 2.1.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/CHANGELOG.md +9 -1
- package/Jenkinsfile +4 -3
- package/cypress/support/index.js +1 -1
- package/cypress.json +6 -1
- package/package.json +1 -1
- package/src/components/templates/default/Edit.jsx +8 -1
- package/src/components/templates/default/View.jsx +17 -2
- package/src/less/menu.less +4 -0
- package/src/utils/index.js +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,9 +4,17 @@ 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
|
+
#### [2.1.0](https://github.com/eea/volto-tabs-block/compare/2.0.2...2.1.0)
|
|
8
|
+
|
|
9
|
+
- adjustments to tabs border [`#26`](https://github.com/eea/volto-tabs-block/pull/26)
|
|
10
|
+
- Release 2.1.0 [`3cdfa30`](https://github.com/eea/volto-tabs-block/commit/3cdfa30d4d03d864be8ad63f0648b4717298734a)
|
|
11
|
+
- Squashed commit of the following: [`ca241f5`](https://github.com/eea/volto-tabs-block/commit/ca241f56a96817679a1948154e2a8cc0e17b96fe)
|
|
12
|
+
|
|
7
13
|
#### [2.0.2](https://github.com/eea/volto-tabs-block/compare/2.0.1...2.0.2)
|
|
8
14
|
|
|
9
|
-
|
|
15
|
+
> 16 June 2022
|
|
16
|
+
|
|
17
|
+
- Fix Icon name warning: [`#25`](https://github.com/eea/volto-tabs-block/pull/25)
|
|
10
18
|
|
|
11
19
|
#### [2.0.1](https://github.com/eea/volto-tabs-block/compare/2.0.0...2.0.1)
|
|
12
20
|
|
package/Jenkinsfile
CHANGED
|
@@ -4,8 +4,9 @@ pipeline {
|
|
|
4
4
|
environment {
|
|
5
5
|
GIT_NAME = "volto-tabs-block"
|
|
6
6
|
NAMESPACE = "@eeacms"
|
|
7
|
-
SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,sustainability.eionet.europa.eu,forest.eea.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu,water.europa.eu-freshwater,demo-www.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu"
|
|
7
|
+
SONARQUBE_TAGS = "volto.eea.europa.eu,climate-energy.eea.europa.eu,biodiversity.europa.eu,www.eea.europa.eu-ims,sustainability.eionet.europa.eu,forest.eea.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu,water.europa.eu-freshwater,demo-www.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu,circularity.eea.europa.eu"
|
|
8
8
|
DEPENDENCIES = "@eeacms/volto-block-style"
|
|
9
|
+
VOLTO = "alpha"
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
stages {
|
|
@@ -124,8 +125,8 @@ pipeline {
|
|
|
124
125
|
node(label: 'docker') {
|
|
125
126
|
script {
|
|
126
127
|
try {
|
|
127
|
-
sh '''docker pull plone; docker run -d --
|
|
128
|
-
sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" plone/volto-addon-ci cypress'''
|
|
128
|
+
sh '''docker pull eeacms/plone-backend; docker run --rm -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="eea.kitkat:testing" eeacms/plone-backend'''
|
|
129
|
+
sh '''docker pull plone/volto-addon-ci; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" -e NODE_ENV=development -e VOLTO="$VOLTO" plone/volto-addon-ci cypress'''
|
|
129
130
|
} finally {
|
|
130
131
|
try {
|
|
131
132
|
sh '''rm -rf cypress-reports cypress-results cypress-coverage'''
|
package/cypress/support/index.js
CHANGED
package/cypress.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"baseUrl": "http://localhost:3000",
|
|
3
3
|
"viewportWidth": 1280,
|
|
4
|
-
"defaultCommandTimeout":
|
|
4
|
+
"defaultCommandTimeout": 8888,
|
|
5
|
+
"chromeWebSecurity": false,
|
|
5
6
|
"reporter": "junit",
|
|
6
7
|
"video": true,
|
|
8
|
+
"retries": {
|
|
9
|
+
"runMode": 8,
|
|
10
|
+
"openMode": 0
|
|
11
|
+
},
|
|
7
12
|
"reporterOptions": {
|
|
8
13
|
"mochaFile": "cypress/reports/cypress-[hash].xml",
|
|
9
14
|
"jenkinsMode": true,
|
package/package.json
CHANGED
|
@@ -285,7 +285,14 @@ const Edit = (props) => {
|
|
|
285
285
|
tabular: getDataValue('menuTabular'),
|
|
286
286
|
text: getDataValue('menuText'),
|
|
287
287
|
vertical: menuPosition.vertical,
|
|
288
|
-
className: cx(
|
|
288
|
+
className: cx(
|
|
289
|
+
data.menuAlign,
|
|
290
|
+
menuPosition.direction === 'left' ? 'border-right' : '',
|
|
291
|
+
menuPosition.direction === 'right' ? 'border-left' : '',
|
|
292
|
+
menuPosition.direction === 'top' ? 'border-bottom' : '',
|
|
293
|
+
menuPosition.direction === 'bottom' ? 'border-top' : '',
|
|
294
|
+
{ container: isContainer },
|
|
295
|
+
),
|
|
289
296
|
}}
|
|
290
297
|
menuPosition={menuPosition.direction}
|
|
291
298
|
panes={panes}
|
|
@@ -64,7 +64,15 @@ const View = (props) => {
|
|
|
64
64
|
hashlink = {},
|
|
65
65
|
setActiveTab = () => {},
|
|
66
66
|
} = props;
|
|
67
|
-
|
|
67
|
+
|
|
68
|
+
const [menuPosition, setMenuPosition] = React.useState({});
|
|
69
|
+
|
|
70
|
+
React.useEffect(() => {
|
|
71
|
+
if (Object.keys(menuPosition).length === 0) {
|
|
72
|
+
setMenuPosition(getMenuPosition(data));
|
|
73
|
+
}
|
|
74
|
+
}, [data, menuPosition]);
|
|
75
|
+
|
|
68
76
|
const isContainer = data.align === 'full';
|
|
69
77
|
const tabsTitle = data.title;
|
|
70
78
|
const tabsDescription = data.description;
|
|
@@ -157,7 +165,14 @@ const View = (props) => {
|
|
|
157
165
|
tabular: getDataValue('menuTabular'),
|
|
158
166
|
text: getDataValue('menuText'),
|
|
159
167
|
vertical: menuPosition.vertical,
|
|
160
|
-
className: cx(
|
|
168
|
+
className: cx(
|
|
169
|
+
data.menuAlign,
|
|
170
|
+
menuPosition.direction === 'left' ? 'border-right' : '',
|
|
171
|
+
menuPosition.direction === 'right' ? 'border-left' : '',
|
|
172
|
+
menuPosition.direction === 'top' ? 'border-bottom' : '',
|
|
173
|
+
menuPosition.direction === 'bottom' ? 'border-top' : '',
|
|
174
|
+
{ container: isContainer },
|
|
175
|
+
),
|
|
161
176
|
}}
|
|
162
177
|
menuPosition={menuPosition.direction}
|
|
163
178
|
panes={panes}
|
package/src/less/menu.less
CHANGED
package/src/utils/index.js
CHANGED
|
@@ -17,9 +17,12 @@ const getMenuPosition = (data) => {
|
|
|
17
17
|
if (['bottom'].includes(position)) {
|
|
18
18
|
return {
|
|
19
19
|
attached: position,
|
|
20
|
+
direction: position,
|
|
20
21
|
};
|
|
21
22
|
}
|
|
22
|
-
return {
|
|
23
|
+
return {
|
|
24
|
+
direction: position,
|
|
25
|
+
};
|
|
23
26
|
};
|
|
24
27
|
|
|
25
28
|
const toggleItem = (container, item, hidden) => {
|