@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 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
- - Fix Icon name warning: [`0c72628`](https://github.com/eea/volto-tabs-block/commit/0c726288cd851f676c5942702118215bd4bae4ab)
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 --rm --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="profile-plone.restapi:blocks" plone fg'''
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'''
@@ -27,7 +27,7 @@ coverage-end */
27
27
  export const setupBeforeEach = () => {
28
28
  cy.autologin();
29
29
  cy.createContent({
30
- contentType: 'Folder',
30
+ contentType: 'Document',
31
31
  contentId: 'cypress',
32
32
  contentTitle: 'Cypress',
33
33
  });
package/cypress.json CHANGED
@@ -1,9 +1,14 @@
1
1
  {
2
2
  "baseUrl": "http://localhost:3000",
3
3
  "viewportWidth": 1280,
4
- "defaultCommandTimeout": 15000,
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-tabs-block",
3
- "version": "2.0.2",
3
+ "version": "2.1.0",
4
4
  "description": "volto-tabs-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -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(data.menuAlign, { container: isContainer }),
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
- const menuPosition = getMenuPosition(data);
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(data.menuAlign, { container: isContainer }),
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}
@@ -77,6 +77,10 @@
77
77
  .menu-item-count {
78
78
  display: @menuItemCountDisplay;
79
79
  }
80
+
81
+ &.active {
82
+ border-width: 0.2rem;
83
+ }
80
84
  }
81
85
 
82
86
  .ui.fluid.input {
@@ -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) => {