@eeacms/volto-clms-theme 1.0.44 → 1.0.45
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 +59 -0
- package/Jenkinsfile +17 -19
- package/package.json +1 -1
- package/src/actions/geonetwork/import_geonetwork.js +21 -0
- package/src/actions/index.js +14 -0
- package/src/actions/userschema/userschema.js +17 -0
- package/src/components/Blocks/CclTextLinkCarouselBlock/CclTextLinkCarouselEdit.jsx +38 -0
- package/src/components/Blocks/CclTextLinkCarouselBlock/CclTextLinkCarouselView.jsx +41 -0
- package/src/components/Blocks/CclTextLinkCarouselBlock/TextLinkCarouselSchema.js +18 -0
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclCarouselView.jsx +32 -11
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclProductTabsView.jsx +1 -1
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/custom.less +55 -1
- package/src/components/Blocks/customBlocks.js +19 -0
- package/src/components/CLMSDatasetDetailView/CLMSDatasetDetailView.jsx +175 -15
- package/src/components/CLMSDatasetDetailView/DataSetInfoContent.jsx +14 -6
- package/src/components/CLMSDatasetDetailView/MetadataContent.jsx +26 -7
- package/src/components/CLMSDownloadCartView/CLMSDownloadCartView.jsx +5 -1
- package/src/components/CLMSProfileView/CLMSApiTokensView.jsx +55 -33
- package/src/components/CLMSProfileView/CLMSProfileView.jsx +28 -15
- package/src/components/CLMSProfileView/CLMSUserProfileView.jsx +37 -64
- package/src/components/CclCard/cards.less +1 -1
- package/src/components/CclLoginModal/CclLoginModal.jsx +1 -1
- package/src/components/CclLoginModal/ccl-login-modal.css +0 -4
- package/src/components/CclModal/CclModal.jsx +6 -1
- package/src/components/Widgets/ContactWidget.jsx +91 -0
- package/src/components/Widgets/DistributionInfoWidget.jsx +40 -0
- package/src/components/Widgets/GeonetworkIdentifiersWidget.jsx +48 -0
- package/src/components/Widgets/TextLinkWidget.jsx +41 -0
- package/src/constants/ActionTypes.js +1 -0
- package/src/customizations/volto/components/theme/Header/Header.jsx +30 -21
- package/src/index.js +8 -3
- package/src/reducers/geonetwork/import_geonetwork_reducer.js +45 -0
- package/src/reducers/index.js +7 -3
- package/src/reducers/tokens/tokens.js +14 -10
- package/src/reducers/userschema/userschema.js +48 -0
- package/theme/clms/css/carousel.css +64 -11
- package/theme/clms/css/home.css +18 -4
- package/theme/clms/css/maps.css +4 -0
- package/theme/clms/css/maps.less +4 -0
- package/theme/clms/css/styles.less +8 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,67 @@ 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.45](https://github.com/eea/volto-clms-theme/compare/1.0.44...1.0.45)
|
|
8
|
+
|
|
9
|
+
- Geonetwork importer [`#146`](https://github.com/eea/volto-clms-theme/pull/146)
|
|
10
|
+
- @userschema endpoint based dynamic user profile form [`#145`](https://github.com/eea/volto-clms-theme/pull/145)
|
|
11
|
+
- Changes after the release of ftw.tokenauth 2.0+cs5 [`#144`](https://github.com/eea/volto-clms-theme/pull/144)
|
|
12
|
+
- Api token changes [`#142`](https://github.com/eea/volto-clms-theme/pull/142)
|
|
13
|
+
- Bugs n improvements [`#141`](https://github.com/eea/volto-clms-theme/pull/141)
|
|
14
|
+
- Text carousel to develop [`#140`](https://github.com/eea/volto-clms-theme/pull/140)
|
|
15
|
+
- Text carousel corrections and image carousel dots change [`#139`](https://github.com/eea/volto-clms-theme/pull/139)
|
|
16
|
+
- Text carousel [`#138`](https://github.com/eea/volto-clms-theme/pull/138)
|
|
17
|
+
- resolve conflicts [`27ac50c`](https://github.com/eea/volto-clms-theme/commit/27ac50c69e5fe7af3fbad72cf0d273d74cb28d71)
|
|
18
|
+
- add breadcrumb and container class to get more structured profile page [`7787080`](https://github.com/eea/volto-clms-theme/commit/77870805f4c249aaa7552e53d66305b8eb493c85)
|
|
19
|
+
- dataset catalogue view width [`c218194`](https://github.com/eea/volto-clms-theme/commit/c21819442b8af0327fd5ea80769ea479a331ccd4)
|
|
20
|
+
- add a dynamic userschema [`8c38d98`](https://github.com/eea/volto-clms-theme/commit/8c38d983eb92ef216ece00e55a3e18926671970c)
|
|
21
|
+
- show the tokens only when they have a private key [`f6a4fb1`](https://github.com/eea/volto-clms-theme/commit/f6a4fb16baf0e66721af2ce93d5c07220855bbdd)
|
|
22
|
+
- save only tokens when they exist [`a9e8ec1`](https://github.com/eea/volto-clms-theme/commit/a9e8ec17ea88a675fbdb62034a851ccb72270313)
|
|
23
|
+
- show metadata download links pointing to geonetwork [`122442c`](https://github.com/eea/volto-clms-theme/commit/122442cbcd23be54bc6d43e04226d621c635599e)
|
|
24
|
+
- use sdi full link [`6837d90`](https://github.com/eea/volto-clms-theme/commit/6837d9055877d51df7832c1cb15287ac83507e14)
|
|
25
|
+
- add translations [`c8373db`](https://github.com/eea/volto-clms-theme/commit/c8373db635dcd9dda0155b44daca29f8a76bcc53)
|
|
26
|
+
- merge develop into geonetwork [`67c5b39`](https://github.com/eea/volto-clms-theme/commit/67c5b3977bd51c84d24d6bf2389c162a3391cd7d)
|
|
27
|
+
- add vito link [`0c6b4c3`](https://github.com/eea/volto-clms-theme/commit/0c6b4c340b6f26c878924862357c843fc1100c5a)
|
|
28
|
+
- add a segment to import data from geonetwork endpoints [`dc941a3`](https://github.com/eea/volto-clms-theme/commit/dc941a3fedcf29760274d15c0d1c0c2f0a919c75)
|
|
29
|
+
- geonetwork importer endpoint reducer and action [`6bb0939`](https://github.com/eea/volto-clms-theme/commit/6bb0939d8f2efefa8970ecfc23f244e0ed60dbce)
|
|
30
|
+
- test [`daa9d02`](https://github.com/eea/volto-clms-theme/commit/daa9d020eb1a089afc87ad4b5c83a50ab144a54c)
|
|
31
|
+
- use value attribute [`02b57fe`](https://github.com/eea/volto-clms-theme/commit/02b57fe0a1db2c4d1ec6b3786b12e2e782b0b60c)
|
|
32
|
+
- use a textarea [`58d8d17`](https://github.com/eea/volto-clms-theme/commit/58d8d1710be3d7bade93ffc3ecca6f0173878efc)
|
|
33
|
+
- change some screen messages [`beed740`](https://github.com/eea/volto-clms-theme/commit/beed740d88f93e73cd3f13611c75cf7acab9dcb6)
|
|
34
|
+
- when copying to clipboard copy the full object [`3717f38`](https://github.com/eea/volto-clms-theme/commit/3717f388fb7c828b7c422c058630c115b891810b)
|
|
35
|
+
- hoem carousel [`01eecf8`](https://github.com/eea/volto-clms-theme/commit/01eecf84e23845c79920004ce9990b282445c0d7)
|
|
36
|
+
- prettier fix [`27aa6c2`](https://github.com/eea/volto-clms-theme/commit/27aa6c223279977d9a8228e845a1b50f02c42253)
|
|
37
|
+
- Api tokens changes [`41e75a1`](https://github.com/eea/volto-clms-theme/commit/41e75a1bca8bc93c0cee8fe675098ac32c464d7a)
|
|
38
|
+
- show Download tab only in items explicitely marked to be downloadable [`0f1884b`](https://github.com/eea/volto-clms-theme/commit/0f1884b83c803e1cab89fbd03edbca3dba12dcb4)
|
|
39
|
+
- change mapviewer link for dataset [`2833557`](https://github.com/eea/volto-clms-theme/commit/28335576b8eebfd3f87c37872a846739f2e25edb)
|
|
40
|
+
- prettier:fix [`8643889`](https://github.com/eea/volto-clms-theme/commit/8643889c14ed42ff72d4fa4f9c0d4493eab237f3)
|
|
41
|
+
- li styles [`6f1c3b0`](https://github.com/eea/volto-clms-theme/commit/6f1c3b07d1ac88fa581344824cfac20e0197c4a6)
|
|
42
|
+
- home text carousel desktop [`9b7402f`](https://github.com/eea/volto-clms-theme/commit/9b7402f3aa0c8d9c8bf46656e0f6af1c521759fb)
|
|
43
|
+
- Header cart icon [`ffd90d6`](https://github.com/eea/volto-clms-theme/commit/ffd90d6d3f294a5ac6db4b3abc8fb70cf3538ff1)
|
|
44
|
+
- fix map-viewer link [`aeb571b`](https://github.com/eea/volto-clms-theme/commit/aeb571bad44ab346104993f847e48e1c996023cd)
|
|
45
|
+
- new distribution info widget [`a3c3edd`](https://github.com/eea/volto-clms-theme/commit/a3c3edde299749644596439a31671bd9e44ecb08)
|
|
46
|
+
- add fields to contact widget [`6493c32`](https://github.com/eea/volto-clms-theme/commit/6493c323fe0564c0e36f7face0f37460d5f20d69)
|
|
47
|
+
- code cleaned [`1ee2dfa`](https://github.com/eea/volto-clms-theme/commit/1ee2dfa606c3f927a8f9042836b71683fe7a1fe0)
|
|
48
|
+
- login modal bug fixed [`2cc3b77`](https://github.com/eea/volto-clms-theme/commit/2cc3b77304863be8c8556f9cff287db6d7ce4a03)
|
|
49
|
+
- reverse last change [`71eb265`](https://github.com/eea/volto-clms-theme/commit/71eb265bcf328208bba079f7b92a0ddf5d27dbf6)
|
|
50
|
+
- redirect to home page if carousel url is empty [`27b129d`](https://github.com/eea/volto-clms-theme/commit/27b129d1bf81cc18b25bba9aa8a7ceec4ab04cd2)
|
|
51
|
+
- contact widget [`dcf1ee4`](https://github.com/eea/volto-clms-theme/commit/dcf1ee477344375e8dd944c56490427aab43e5ec)
|
|
52
|
+
- ESLint fix [`f507e3a`](https://github.com/eea/volto-clms-theme/commit/f507e3a643bc6740d5d3aba0da8d92b1ee28fd81)
|
|
53
|
+
- Empty cart text style [`6e16941`](https://github.com/eea/volto-clms-theme/commit/6e1694176e00d5afaf0c5b8335ab24bf67744abe)
|
|
54
|
+
- dataset catalogue size fixed when logged in [`ce66ec1`](https://github.com/eea/volto-clms-theme/commit/ce66ec11713a273d8bea77f104a457649916868a)
|
|
55
|
+
- Card block image fix [`25535bc`](https://github.com/eea/volto-clms-theme/commit/25535bc0dbcce80a60e6a115f1709e5dd1f04b62)
|
|
56
|
+
- image carousel dots change and text carousel style change [`509eb04`](https://github.com/eea/volto-clms-theme/commit/509eb04e0320de8ea6fe9121ca15498274de170e)
|
|
57
|
+
- Basemap gallery bug fix [`00aed49`](https://github.com/eea/volto-clms-theme/commit/00aed490b48c405edf474b20fad98f5653783a82)
|
|
58
|
+
- text carousel [`0becdb2`](https://github.com/eea/volto-clms-theme/commit/0becdb254318fd010b916adefa0ef7e9ec0b5b79)
|
|
59
|
+
- add dataset citation [`895bbc3`](https://github.com/eea/volto-clms-theme/commit/895bbc3ce48badfd3b03afcecccacba0505508d6)
|
|
60
|
+
- Text and link carousel block created [`c4d8bb3`](https://github.com/eea/volto-clms-theme/commit/c4d8bb34b2fbb1a3f3064f073b0441366a5d2839)
|
|
61
|
+
- add a new data-grid widget [`dd64854`](https://github.com/eea/volto-clms-theme/commit/dd648544afa2c8896981fe0feded18b38f236e79)
|
|
62
|
+
|
|
7
63
|
#### [1.0.44](https://github.com/eea/volto-clms-theme/compare/1.0.43...1.0.44)
|
|
8
64
|
|
|
65
|
+
> 1 December 2021
|
|
66
|
+
|
|
67
|
+
- Develop [`#136`](https://github.com/eea/volto-clms-theme/pull/136)
|
|
9
68
|
- CclLoginModal - external link fixed [`736f348`](https://github.com/eea/volto-clms-theme/commit/736f348712c473d323a8bf2b6a1c6a10ab0aa266)
|
|
10
69
|
- change login modal texts [`b0c98af`](https://github.com/eea/volto-clms-theme/commit/b0c98af08501c830bb175b4ec69ad711c2874da1)
|
|
11
70
|
|
package/Jenkinsfile
CHANGED
|
@@ -10,6 +10,23 @@ pipeline {
|
|
|
10
10
|
|
|
11
11
|
stages {
|
|
12
12
|
|
|
13
|
+
stage('Release') {
|
|
14
|
+
when {
|
|
15
|
+
allOf {
|
|
16
|
+
environment name: 'CHANGE_ID', value: ''
|
|
17
|
+
branch 'master'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
steps {
|
|
21
|
+
node(label: 'docker') {
|
|
22
|
+
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),string(credentialsId: 'eea-jenkins-npm-token', variable: 'NPM_TOKEN')]) {
|
|
23
|
+
sh '''docker pull eeacms/gitflow'''
|
|
24
|
+
sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e NPM_TOKEN="$NPM_TOKEN" -e LANGUAGE=javascript eeacms/gitflow'''
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
13
30
|
stage('Code') {
|
|
14
31
|
when {
|
|
15
32
|
allOf {
|
|
@@ -46,7 +63,6 @@ pipeline {
|
|
|
46
63
|
when {
|
|
47
64
|
allOf {
|
|
48
65
|
environment name: 'CHANGE_ID', value: ''
|
|
49
|
-
not { branch 'master' }
|
|
50
66
|
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
51
67
|
}
|
|
52
68
|
}
|
|
@@ -92,7 +108,6 @@ pipeline {
|
|
|
92
108
|
when {
|
|
93
109
|
allOf {
|
|
94
110
|
environment name: 'CHANGE_ID', value: ''
|
|
95
|
-
not { branch 'master' }
|
|
96
111
|
not { changelog '.*^Automated release [0-9\\.]+$' }
|
|
97
112
|
}
|
|
98
113
|
}
|
|
@@ -191,23 +206,6 @@ pipeline {
|
|
|
191
206
|
}
|
|
192
207
|
}
|
|
193
208
|
|
|
194
|
-
stage('Release') {
|
|
195
|
-
when {
|
|
196
|
-
allOf {
|
|
197
|
-
environment name: 'CHANGE_ID', value: ''
|
|
198
|
-
branch 'master'
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
steps {
|
|
202
|
-
node(label: 'docker') {
|
|
203
|
-
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'),string(credentialsId: 'eea-jenkins-npm-token', variable: 'NPM_TOKEN')]) {
|
|
204
|
-
sh '''docker pull eeacms/gitflow'''
|
|
205
|
-
sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e NPM_TOKEN="$NPM_TOKEN" -e LANGUAGE=javascript eeacms/gitflow'''
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
209
|
}
|
|
212
210
|
|
|
213
211
|
post {
|
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Post meeting register actions.
|
|
3
|
+
* @module actions/postImportGeonetwork
|
|
4
|
+
*/
|
|
5
|
+
export const POST_IMPORT_GEONETWORK = 'POST_IMPORT_GEONETWORK';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Post import geonetwork.
|
|
9
|
+
* @function postImportGeonetwork
|
|
10
|
+
* @returns {Object} Get extra items action.
|
|
11
|
+
*/
|
|
12
|
+
export function postImportGeonetwork(url, id, type) {
|
|
13
|
+
return {
|
|
14
|
+
type: POST_IMPORT_GEONETWORK,
|
|
15
|
+
request: {
|
|
16
|
+
op: 'post',
|
|
17
|
+
data: { id: id, type: type },
|
|
18
|
+
path: `${url}/@import-from-geonetwork`,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
package/src/actions/index.js
CHANGED
|
@@ -11,33 +11,47 @@
|
|
|
11
11
|
* };
|
|
12
12
|
*/
|
|
13
13
|
export { getTokens, createTokens, deleteTokens } from './tokens/tokens';
|
|
14
|
+
|
|
14
15
|
export {
|
|
15
16
|
getExtraBreadcrumbItems,
|
|
16
17
|
GET_EXTRA_BREADCRUMB_ITEMS,
|
|
17
18
|
} from './extra_breadcrumbs/extra_breadcrumb';
|
|
19
|
+
|
|
18
20
|
export {
|
|
19
21
|
POST_MEETING_REGISTER,
|
|
20
22
|
postMeetingRegister,
|
|
21
23
|
} from './meeting/meeting_register';
|
|
24
|
+
|
|
22
25
|
export {
|
|
23
26
|
MEETING_SUBSCRIBERS_MANIPULATION,
|
|
24
27
|
MeetingSubscribersManipulation,
|
|
25
28
|
} from './meeting/meeting_subscribers_manipulation';
|
|
29
|
+
|
|
26
30
|
export {
|
|
27
31
|
MEETING_SUBSCRIBERS,
|
|
28
32
|
MeetingSubscribers,
|
|
29
33
|
} from './meeting/meeting_subscribers';
|
|
34
|
+
|
|
30
35
|
export {
|
|
31
36
|
POST_DOWNLOADTOOL,
|
|
32
37
|
postDownloadtool,
|
|
33
38
|
} from './downloadtool/post_downloadtool';
|
|
39
|
+
|
|
34
40
|
export {
|
|
35
41
|
GET_DOWNLOADTOOL,
|
|
36
42
|
getDownloadtool,
|
|
37
43
|
} from './downloadtool/get_downloadtool';
|
|
44
|
+
|
|
38
45
|
export {
|
|
39
46
|
DELETE_DOWNLOADTOOL,
|
|
40
47
|
deleteDownloadtool,
|
|
41
48
|
} from './downloadtool/delete_downloadtool';
|
|
42
49
|
|
|
43
50
|
export { GET_REGISTRY, getRegistry } from './registry/registry';
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
POST_IMPORT_GEONETWORK,
|
|
54
|
+
postImportGeonetwork,
|
|
55
|
+
} from './geonetwork/import_geonetwork';
|
|
56
|
+
|
|
57
|
+
export { getUserSchema } from './userschema/userschema';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-unresolved
|
|
2
|
+
import { GET_USERSCHEMA } from '../../constants/ActionTypes';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Get the user schema.
|
|
6
|
+
* @function getUserSchema
|
|
7
|
+
* @returns {Object} Get the user schema action.
|
|
8
|
+
*/
|
|
9
|
+
export function getUserSchema() {
|
|
10
|
+
return {
|
|
11
|
+
type: GET_USERSCHEMA,
|
|
12
|
+
request: {
|
|
13
|
+
op: 'get',
|
|
14
|
+
path: `/@userschema`,
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React /* , { useState } */ from 'react';
|
|
2
|
+
|
|
3
|
+
// import { TextLinkCarouselView } from './TextLinkCarouselView';
|
|
4
|
+
import { SidebarPortal } from '@plone/volto/components';
|
|
5
|
+
import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
|
|
6
|
+
import { TextLinkCarouselSchema } from './TextLinkCarouselSchema';
|
|
7
|
+
|
|
8
|
+
// import { compose } from 'redux';
|
|
9
|
+
// import withObjectBrowser from '@plone/volto/components/manage/Sidebar/ObjectBrowser';
|
|
10
|
+
// import { injectIntl } from 'react-intl';
|
|
11
|
+
|
|
12
|
+
const TextLinkCarouselEdit = (props) => {
|
|
13
|
+
const { block, data, onChangeBlock, selected } = props;
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<>
|
|
17
|
+
{data?.textLink?.items.map((item, index) => (
|
|
18
|
+
<div className="text-link-carousel-block" key={index}>
|
|
19
|
+
{item.text}
|
|
20
|
+
</div>
|
|
21
|
+
))}
|
|
22
|
+
<SidebarPortal selected={selected}>
|
|
23
|
+
<InlineForm
|
|
24
|
+
schema={TextLinkCarouselSchema()}
|
|
25
|
+
title="Home text link carousel"
|
|
26
|
+
onChangeField={(id, value) => {
|
|
27
|
+
onChangeBlock(block, {
|
|
28
|
+
...data,
|
|
29
|
+
[id]: value,
|
|
30
|
+
});
|
|
31
|
+
}}
|
|
32
|
+
formData={data}
|
|
33
|
+
/>
|
|
34
|
+
</SidebarPortal>
|
|
35
|
+
</>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
export default /* compose(withObjectBrowser, injectIntl) */ TextLinkCarouselEdit;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import loadable from '@loadable/component';
|
|
3
|
+
const Slider = loadable(() => import('react-slick'));
|
|
4
|
+
|
|
5
|
+
const TextLinkCarouselView = (props) => {
|
|
6
|
+
const { data } = props;
|
|
7
|
+
const slider = React.useRef(null);
|
|
8
|
+
|
|
9
|
+
const { tabsList = [], setActiveTab = () => {} } = props;
|
|
10
|
+
const settings = {
|
|
11
|
+
dots: false,
|
|
12
|
+
infinite: true,
|
|
13
|
+
speed: 500,
|
|
14
|
+
fade: false,
|
|
15
|
+
cssEase: 'linear',
|
|
16
|
+
arrows: false,
|
|
17
|
+
autoplay: true,
|
|
18
|
+
autoplaySpeed: 2000,
|
|
19
|
+
beforeChange: (oldIndex, index) => {
|
|
20
|
+
setActiveTab(tabsList[index]);
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<>
|
|
26
|
+
<div class="ccl-container">
|
|
27
|
+
<Slider {...settings} ref={slider} className="text-carousel">
|
|
28
|
+
{data?.textLink?.items.map((item, index) => (
|
|
29
|
+
<div className="text-link-carousel-block" key={index}>
|
|
30
|
+
<div className="text-link-carousel-block-content">
|
|
31
|
+
<a href={'' + item?.link?.[0]?.['@id']}>{item.text}</a>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
))}
|
|
35
|
+
</Slider>
|
|
36
|
+
</div>
|
|
37
|
+
</>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default TextLinkCarouselView;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const TextLinkCarouselSchema = () => ({
|
|
2
|
+
title: 'Home text link carousel',
|
|
3
|
+
fieldsets: [
|
|
4
|
+
{
|
|
5
|
+
id: 'default',
|
|
6
|
+
title: 'Default',
|
|
7
|
+
fields: ['textLink'],
|
|
8
|
+
},
|
|
9
|
+
],
|
|
10
|
+
properties: {
|
|
11
|
+
textLink: {
|
|
12
|
+
title: 'Text and Link',
|
|
13
|
+
widget: 'text_link_widget',
|
|
14
|
+
type: 'string',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
required: [],
|
|
18
|
+
});
|
|
@@ -3,12 +3,10 @@ import { connect } from 'react-redux';
|
|
|
3
3
|
import { compose } from 'redux';
|
|
4
4
|
import { withRouter } from 'react-router';
|
|
5
5
|
import loadable from '@loadable/component';
|
|
6
|
-
import {
|
|
6
|
+
import { RenderBlocks } from '@plone/volto/components';
|
|
7
7
|
import { withScrollToTarget } from '@eeacms/volto-tabs-block/hocs';
|
|
8
8
|
import './custom.less';
|
|
9
|
-
import
|
|
10
|
-
import leftArrowSVG from '@eeacms/volto-tabs-block/icons/left-arrow.svg';
|
|
11
|
-
// import cx from 'classnames';
|
|
9
|
+
import cx from 'classnames';
|
|
12
10
|
import 'slick-carousel/slick/slick.css';
|
|
13
11
|
import 'slick-carousel/slick/slick-theme.css';
|
|
14
12
|
import '@eeacms/volto-tabs-block/less/carousel.less';
|
|
@@ -29,7 +27,7 @@ const View = (props) => {
|
|
|
29
27
|
const activeTabIndex = tabsList.indexOf(activeTab);
|
|
30
28
|
|
|
31
29
|
const settings = {
|
|
32
|
-
dots:
|
|
30
|
+
dots: false,
|
|
33
31
|
infinite: true,
|
|
34
32
|
speed: 2000,
|
|
35
33
|
fade: true,
|
|
@@ -40,6 +38,32 @@ const View = (props) => {
|
|
|
40
38
|
setActiveTab(tabsList[index]);
|
|
41
39
|
},
|
|
42
40
|
};
|
|
41
|
+
|
|
42
|
+
const Dots = (props) => {
|
|
43
|
+
const { activeTab = null, tabsList = [], slider = {} } = props;
|
|
44
|
+
return tabsList.length > 1 ? (
|
|
45
|
+
<ul className={cx('slick-dots', props.uiContainer)} role={'tablist'}>
|
|
46
|
+
{tabsList.map((tab, index) => (
|
|
47
|
+
<li
|
|
48
|
+
key={`dot-${tab}`}
|
|
49
|
+
className={cx({ 'slick-active': activeTab === tab })}
|
|
50
|
+
role={'presentation'}
|
|
51
|
+
>
|
|
52
|
+
<button
|
|
53
|
+
onClick={() => {
|
|
54
|
+
if (slider.current) {
|
|
55
|
+
slider.current.slickGoTo(index);
|
|
56
|
+
}
|
|
57
|
+
}}
|
|
58
|
+
/>
|
|
59
|
+
</li>
|
|
60
|
+
))}
|
|
61
|
+
</ul>
|
|
62
|
+
) : (
|
|
63
|
+
''
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
43
67
|
const ArrowsGroup = (props) => {
|
|
44
68
|
// const { activeTab = null, tabsList = [], slider = {} } = props;
|
|
45
69
|
// const currentSlide = tabsList.indexOf(activeTab);
|
|
@@ -55,9 +79,7 @@ const View = (props) => {
|
|
|
55
79
|
slider.current.slickPrev();
|
|
56
80
|
}
|
|
57
81
|
}}
|
|
58
|
-
>
|
|
59
|
-
<Icon name={leftArrowSVG} size="50px" />
|
|
60
|
-
</button>
|
|
82
|
+
></button>
|
|
61
83
|
|
|
62
84
|
<button
|
|
63
85
|
aria-label="Next slide"
|
|
@@ -67,9 +89,7 @@ const View = (props) => {
|
|
|
67
89
|
slider.current.slickNext();
|
|
68
90
|
}
|
|
69
91
|
}}
|
|
70
|
-
>
|
|
71
|
-
<Icon name={rightArrowSVG} size="50px" />
|
|
72
|
-
</button>
|
|
92
|
+
></button>
|
|
73
93
|
</div>
|
|
74
94
|
);
|
|
75
95
|
};
|
|
@@ -128,6 +148,7 @@ const View = (props) => {
|
|
|
128
148
|
{panes.length ? panes.map((pane) => pane.renderItem) : ''}
|
|
129
149
|
</Slider>
|
|
130
150
|
<ArrowsGroup activeTab={activeTab} tabsList={tabsList} slider={slider} />
|
|
151
|
+
<Dots activeTab={activeTab} tabsList={tabsList} slider={slider} />
|
|
131
152
|
</>
|
|
132
153
|
);
|
|
133
154
|
};
|
|
@@ -23,7 +23,7 @@ const CclProductTabsView = (props) => {
|
|
|
23
23
|
</div>
|
|
24
24
|
<div className="menu-detail-button">
|
|
25
25
|
<a
|
|
26
|
-
href={'/' + locale + '/
|
|
26
|
+
href={'/' + locale + '/map-viewer?product=' + props.metadata['UID']}
|
|
27
27
|
className="ccl-button ccl-button--default"
|
|
28
28
|
>
|
|
29
29
|
<FormattedMessage
|
|
@@ -9,12 +9,18 @@ div.tabs-block.CCLCarousel {
|
|
|
9
9
|
left: 50% !important;
|
|
10
10
|
width: 100vw !important;
|
|
11
11
|
max-width: initial !important;
|
|
12
|
-
// margin-top: -2rem;
|
|
13
12
|
margin-right: -50vw !important;
|
|
14
13
|
margin-left: -50vw !important;
|
|
15
14
|
}
|
|
16
15
|
}
|
|
17
16
|
|
|
17
|
+
.slick-slider.text-carousel {
|
|
18
|
+
div & {
|
|
19
|
+
z-index: 1;
|
|
20
|
+
width: 60%;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
18
24
|
.tabs-block .slick-slider {
|
|
19
25
|
z-index: 1;
|
|
20
26
|
}
|
|
@@ -22,3 +28,51 @@ div.tabs-block.CCLCarousel {
|
|
|
22
28
|
.slick-arrows {
|
|
23
29
|
margin-top: -2rem !important;
|
|
24
30
|
}
|
|
31
|
+
|
|
32
|
+
.text-link-carousel-block {
|
|
33
|
+
height: 2rem;
|
|
34
|
+
padding: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.text-link-carousel-block-content {
|
|
38
|
+
display: flex;
|
|
39
|
+
height: 2rem;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.text-link-carousel-block .text-link-carousel-block-content > a,
|
|
45
|
+
.text-link-carousel-block .text-link-carousel-block-content > a:hover {
|
|
46
|
+
color: #fff;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
p.styled-slate {
|
|
50
|
+
margin-bottom: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (max-width: 1200px) {
|
|
54
|
+
.text-link-carousel-block {
|
|
55
|
+
height: fit-content !important;
|
|
56
|
+
margin: 0.5rem;
|
|
57
|
+
margin-top: -2rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.text-carousel {
|
|
61
|
+
margin: 0.5rem;
|
|
62
|
+
margin-top: -2rem;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.text-link-carousel-block-content {
|
|
66
|
+
height: fit-content !important;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@media (max-width: 420px) {
|
|
71
|
+
.text-link-carousel-block {
|
|
72
|
+
margin-top: -4rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.text-carousel {
|
|
76
|
+
margin-top: -4rem;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -68,6 +68,9 @@ import CclRelatedListingView from '@eeacms/volto-clms-theme/components/Blocks/Cc
|
|
|
68
68
|
import CclRelatedListingEdit from '@eeacms/volto-clms-theme/components/Blocks/CclRelatedListingBlock/CclRelatedListingEdit';
|
|
69
69
|
import RelatedListingSchema from '@eeacms/volto-clms-theme/components/Blocks/CclRelatedListingBlock/schema';
|
|
70
70
|
|
|
71
|
+
import TextLinkCarouselView from '@eeacms/volto-clms-theme/components/Blocks/CclTextLinkCarouselBlock/CclTextLinkCarouselView';
|
|
72
|
+
import TextLinkCarouselEdit from '@eeacms/volto-clms-theme/components/Blocks/CclTextLinkCarouselBlock/CclTextLinkCarouselEdit';
|
|
73
|
+
|
|
71
74
|
import upSVG from '@plone/volto/icons/up-key.svg';
|
|
72
75
|
import downSVG from '@plone/volto/icons/down-key.svg';
|
|
73
76
|
|
|
@@ -436,6 +439,22 @@ const customBlocks = (config) => ({
|
|
|
436
439
|
},
|
|
437
440
|
],
|
|
438
441
|
},
|
|
442
|
+
textLinkCarousel: {
|
|
443
|
+
id: 'textLinkCarousel', // The name (id) of the block
|
|
444
|
+
title: 'Text and Link Carousel', // The display name of the block
|
|
445
|
+
icon: homeBand, // The icon used in the block chooser
|
|
446
|
+
group: 'ccl_blocks', // The group (blocks can be grouped, displayed in the chooser)
|
|
447
|
+
view: TextLinkCarouselView, // The view mode component
|
|
448
|
+
edit: TextLinkCarouselEdit, // The edit mode component
|
|
449
|
+
restricted: false, // If the block is restricted, it won't show in the chooser
|
|
450
|
+
mostUsed: false, // A meta group `most used`, appearing at the top of the chooser
|
|
451
|
+
blockHasOwnFocusManagement: false, // Set this to true if the block manages its own focus
|
|
452
|
+
sidebarTab: 1, // The sidebar tab you want to be selected when selecting the block
|
|
453
|
+
security: {
|
|
454
|
+
addPermission: [], // Future proof (not implemented yet) add user permission role(s)
|
|
455
|
+
view: [], // Future proof (not implemented yet) view user role(s)
|
|
456
|
+
},
|
|
457
|
+
},
|
|
439
458
|
});
|
|
440
459
|
|
|
441
460
|
export default customBlocks;
|