@eeacms/volto-clms-theme 1.0.37 → 1.0.41
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 +58 -0
- package/Jenkinsfile +28 -5
- package/locales/bg/LC_MESSAGES/volto.po +208 -14
- package/locales/cs/LC_MESSAGES/volto.po +208 -14
- package/locales/da/LC_MESSAGES/volto.po +208 -14
- package/locales/de/LC_MESSAGES/volto.po +208 -14
- package/locales/el/LC_MESSAGES/volto.po +208 -14
- package/locales/en/LC_MESSAGES/volto.po +208 -14
- package/locales/es/LC_MESSAGES/volto.po +208 -14
- package/locales/et/LC_MESSAGES/volto.po +208 -14
- package/locales/fi/LC_MESSAGES/volto.po +208 -14
- package/locales/fr/LC_MESSAGES/volto.po +208 -14
- package/locales/hr/LC_MESSAGES/volto.po +208 -14
- package/locales/hu/LC_MESSAGES/volto.po +208 -14
- package/locales/it/LC_MESSAGES/volto.po +208 -14
- package/locales/lt/LC_MESSAGES/volto.po +208 -14
- package/locales/lv/LC_MESSAGES/volto.po +208 -14
- package/locales/mt/LC_MESSAGES/volto.po +208 -14
- package/locales/nl/LC_MESSAGES/volto.po +208 -14
- package/locales/pl/LC_MESSAGES/volto.po +208 -14
- package/locales/pt/LC_MESSAGES/volto.po +208 -14
- package/locales/ro/LC_MESSAGES/volto.po +208 -14
- package/locales/sk/LC_MESSAGES/volto.po +208 -14
- package/locales/sl/LC_MESSAGES/volto.po +208 -14
- package/locales/sv/LC_MESSAGES/volto.po +208 -14
- package/locales/volto.pot +258 -17
- package/package.json +7 -3
- package/src/actions/index.js +0 -6
- package/src/components/Blocks/CclProductLeftMenu/CclProductLeftMenuEdit.jsx +1 -1
- package/src/components/Blocks/CclProductLeftMenu/CclProductLeftMenuView.jsx +4 -1
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclCarouselView.jsx +40 -2
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclProductTabsView.jsx +36 -0
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclVerticalTabsView.jsx +20 -61
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/RoutingHOC.jsx +63 -0
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/custom.less +8 -0
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/index.js +4 -0
- package/src/components/Blocks/customBlocks.js +13 -6
- package/src/components/CLMSDatasetDetailView/CLMSDatasetDetailView.jsx +9 -9
- package/src/components/CLMSDatasetDetailView/DataSetInfoContent.jsx +43 -43
- package/src/components/CLMSDatasetDetailView/DownloadDataSetContent.jsx +2 -2
- package/src/components/CLMSDownloadCartView/CLMSDownloadCartView.jsx +1 -1
- package/src/components/CLMSEventView/CLMSEventView.jsx +3 -2
- package/src/components/CLMSServiceDeskView/CLMSServiceDeskView.jsx +1 -0
- package/src/components/CclCard/CclCard.jsx +2 -2
- package/src/components/CclDownloadTable/CclDownloadTable.jsx +5 -2
- package/src/customizations/volto/components/theme/Footer/Footer.jsx +1 -1
- package/src/customizations/volto/components/theme/Header/Header.jsx +1 -1
- package/src/reducers/index.js +0 -2
- package/theme/clms/css/home.css +6 -1
- package/theme/clms/css/maps.css +10 -3
- package/theme/clms/css/maps.less +10 -3
- package/theme/clms/css/styles.less +27 -3
- package/theme/site/modules/accordion.overrides +6 -1
- package/src/actions/cart/cart.js +0 -30
- package/src/reducers/cart/cart_reducer.js +0 -31
- package/src/utils/useCartState.js +0 -122
|
@@ -81,10 +81,15 @@ p {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
li {
|
|
84
|
+
margin-left: 1.125rem;
|
|
84
85
|
font-size: 1.125rem;
|
|
85
86
|
line-height: 1.6875rem;
|
|
86
87
|
}
|
|
87
88
|
|
|
89
|
+
.collapsed {
|
|
90
|
+
margin-left: 0rem !important;
|
|
91
|
+
}
|
|
92
|
+
|
|
88
93
|
.ul-list,
|
|
89
94
|
.ol-list {
|
|
90
95
|
margin-bottom: 2rem;
|
|
@@ -238,7 +243,7 @@ body:not(.contenttype-lrf:not(.section-cart):not(.section-profile))
|
|
|
238
243
|
body:not(.contenttype-lrf:not(.section-cart):not(.section-profile))
|
|
239
244
|
main
|
|
240
245
|
.ccl-container {
|
|
241
|
-
max-width:
|
|
246
|
+
max-width: 1127px;
|
|
242
247
|
}
|
|
243
248
|
|
|
244
249
|
body:not(.contenttype-lrf:not(.section-cart):not(.section-profile))
|
|
@@ -664,7 +669,7 @@ body:not(.contenttype-lrf:not(.section-cart):not(.section-profile))
|
|
|
664
669
|
}
|
|
665
670
|
|
|
666
671
|
.green-container .ccl-button {
|
|
667
|
-
margin: 0 auto;
|
|
672
|
+
margin: 0 auto !important;
|
|
668
673
|
}
|
|
669
674
|
|
|
670
675
|
/* Search */
|
|
@@ -807,7 +812,7 @@ body:not(.contenttype-lrf:not(.section-cart):not(.section-profile))
|
|
|
807
812
|
}
|
|
808
813
|
|
|
809
814
|
.news-detail i,
|
|
810
|
-
.event-detail
|
|
815
|
+
.event-detail svg {
|
|
811
816
|
width: 1rem;
|
|
812
817
|
margin-right: 0.5rem;
|
|
813
818
|
}
|
|
@@ -826,6 +831,9 @@ body:not(.contenttype-lrf:not(.section-cart):not(.section-profile))
|
|
|
826
831
|
margin-bottom: 1rem;
|
|
827
832
|
}
|
|
828
833
|
|
|
834
|
+
.event-detail-content {
|
|
835
|
+
margin-bottom: 1rem;
|
|
836
|
+
}
|
|
829
837
|
/* About */
|
|
830
838
|
.about-block:not(:last-of-type) {
|
|
831
839
|
margin-bottom: 3rem;
|
|
@@ -1088,3 +1096,19 @@ body:not(.contenttype-lrf:not(.section-cart):not(.section-profile))
|
|
|
1088
1096
|
margin: 0 0 !important;
|
|
1089
1097
|
}
|
|
1090
1098
|
} */
|
|
1099
|
+
body.section-mapviewer #page-document.ui.container,
|
|
1100
|
+
body.section-map-viewer #page-document.ui.container {
|
|
1101
|
+
h1 {
|
|
1102
|
+
width: 1127px !important;
|
|
1103
|
+
}
|
|
1104
|
+
width: 100% !important;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
.full-width > .ccl-buton {
|
|
1108
|
+
width: 100% !important;
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
body.searchlib-page div#page-document {
|
|
1112
|
+
top: 0em !important;
|
|
1113
|
+
width: 1127px !important;
|
|
1114
|
+
}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
display: flex;
|
|
6
6
|
align-items: center;
|
|
7
7
|
padding: 1rem;
|
|
8
|
-
padding-right: 2.5rem;
|
|
9
8
|
margin: 0;
|
|
10
9
|
background: #a0b1280f !important;
|
|
11
10
|
|
|
@@ -35,3 +34,9 @@ h2.accordion-title span {
|
|
|
35
34
|
.accordion-title:hover {
|
|
36
35
|
color: #273b4b !important;
|
|
37
36
|
}
|
|
37
|
+
|
|
38
|
+
.accordion.ui.fluid.styled > .content.active {
|
|
39
|
+
ul {
|
|
40
|
+
padding: 0.5em 1em 1.5em !important;
|
|
41
|
+
}
|
|
42
|
+
}
|
package/src/actions/cart/cart.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cart items actions.
|
|
3
|
-
* @module actions/getCartItems
|
|
4
|
-
*/
|
|
5
|
-
export const GET_CART_ITEMS = 'GET_CART_ITEMS';
|
|
6
|
-
export const SET_CART_ITEMS = 'SET_CART_ITEMS';
|
|
7
|
-
/**
|
|
8
|
-
* Set Cart items.
|
|
9
|
-
* @function setCartItems
|
|
10
|
-
* @returns {Object} Set extra items action.
|
|
11
|
-
*/
|
|
12
|
-
export function setCartItems(items) {
|
|
13
|
-
return {
|
|
14
|
-
type: SET_CART_ITEMS,
|
|
15
|
-
items: items,
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Get Cart items.
|
|
21
|
-
* @function getCartItems
|
|
22
|
-
* @returns {Object} Get extra items action.
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
export function getCartItems(user_id) {
|
|
26
|
-
return {
|
|
27
|
-
type: GET_CART_ITEMS,
|
|
28
|
-
user_id: user_id,
|
|
29
|
-
};
|
|
30
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cart items reducer.
|
|
3
|
-
* @module reducers/cartItemsReducer
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { SET_CART_ITEMS, GET_CART_ITEMS } from '../../actions/cart/cart';
|
|
7
|
-
import { CART_SESSION_KEY } from '@eeacms/volto-clms-theme/utils/useCartState';
|
|
8
|
-
|
|
9
|
-
const initialState = {
|
|
10
|
-
items: [],
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const cartItemsReducer = (state = initialState, action = {}) => {
|
|
14
|
-
switch (action?.type) {
|
|
15
|
-
case SET_CART_ITEMS:
|
|
16
|
-
return {
|
|
17
|
-
...state,
|
|
18
|
-
items: action.items,
|
|
19
|
-
};
|
|
20
|
-
case GET_CART_ITEMS:
|
|
21
|
-
const CART_SESSION_USER_KEY = action.user_id
|
|
22
|
-
? CART_SESSION_KEY.concat(`_${action.user_id}`)
|
|
23
|
-
: CART_SESSION_KEY;
|
|
24
|
-
return {
|
|
25
|
-
...state,
|
|
26
|
-
items: JSON.parse(localStorage.getItem(CART_SESSION_USER_KEY)),
|
|
27
|
-
};
|
|
28
|
-
default:
|
|
29
|
-
return state;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import { useDispatch } from 'react-redux';
|
|
3
|
-
import { setCartItems } from '@eeacms/volto-clms-theme/actions';
|
|
4
|
-
import { Message } from 'semantic-ui-react';
|
|
5
|
-
import jwtDecode from 'jwt-decode';
|
|
6
|
-
import { useSelector } from 'react-redux';
|
|
7
|
-
export const CART_SESSION_KEY = 'cart_session';
|
|
8
|
-
|
|
9
|
-
const useCartState = () => {
|
|
10
|
-
// const [cart, setCart] = useState([]);
|
|
11
|
-
const [savedToCard, setSavedToCard] = useState(false);
|
|
12
|
-
const [toasTime, setToastTime] = useState(3000);
|
|
13
|
-
const [CART_SESSION_USER_KEY, SET_CART_SESSION_USER_KEY] = useState();
|
|
14
|
-
const isLoggedIn = useSelector((state) =>
|
|
15
|
-
state.userSession.token ? jwtDecode(state.userSession.token).sub : '',
|
|
16
|
-
)
|
|
17
|
-
? true
|
|
18
|
-
: false;
|
|
19
|
-
|
|
20
|
-
const user_id = useSelector((state) => state.users.user.id);
|
|
21
|
-
const cartState = useSelector((state) => state.cart_items.items);
|
|
22
|
-
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
user_id &&
|
|
25
|
-
SET_CART_SESSION_USER_KEY(CART_SESSION_KEY.concat(`_${user_id}`));
|
|
26
|
-
getCartSessionStorage();
|
|
27
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
28
|
-
}, [CART_SESSION_USER_KEY, user_id]);
|
|
29
|
-
const dispatch = useDispatch();
|
|
30
|
-
|
|
31
|
-
const saveItems = (values) => {
|
|
32
|
-
let items = cleanDuplicatesEntries(values);
|
|
33
|
-
localStorage.setItem(CART_SESSION_USER_KEY, JSON.stringify(items));
|
|
34
|
-
dispatch(setCartItems(items ?? []));
|
|
35
|
-
setSavedToCard(true);
|
|
36
|
-
setTimeout(() => setSavedToCard(false), toasTime);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const removeAllCart = () => {
|
|
40
|
-
localStorage.removeItem(CART_SESSION_USER_KEY);
|
|
41
|
-
dispatch(setCartItems([]));
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const getCartSessionStorage = () => {
|
|
45
|
-
CART_SESSION_USER_KEY &&
|
|
46
|
-
dispatch(
|
|
47
|
-
setCartItems(
|
|
48
|
-
JSON.parse(localStorage.getItem(CART_SESSION_USER_KEY)) || [],
|
|
49
|
-
),
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const addCartItem = async (value) => {
|
|
54
|
-
let card_item = value.map((item) => {
|
|
55
|
-
item['task_in_progress'] = false;
|
|
56
|
-
return item;
|
|
57
|
-
});
|
|
58
|
-
await getCartSessionStorage();
|
|
59
|
-
if (cartState) {
|
|
60
|
-
saveItems(cartState.concat(card_item));
|
|
61
|
-
} else {
|
|
62
|
-
saveItems(card_item);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const removeCartItem = async (id) => {
|
|
67
|
-
await getCartSessionStorage();
|
|
68
|
-
let newcart = cartState.slice();
|
|
69
|
-
await newcart.forEach((item) => {
|
|
70
|
-
if (item.unique_id === id) {
|
|
71
|
-
newcart.splice(newcart.indexOf(item), 1);
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
saveItems(newcart);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
const cleanDuplicatesEntries = (arr) =>
|
|
79
|
-
arr.filter(
|
|
80
|
-
(arr, index, self) =>
|
|
81
|
-
index === self.findIndex((t) => t.unique_id === arr.unique_id),
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
const Toast = ({ message, time = toasTime }) => {
|
|
85
|
-
return (
|
|
86
|
-
<>
|
|
87
|
-
{setToastTime(time)}
|
|
88
|
-
{savedToCard ? (
|
|
89
|
-
<Message floating size="small">
|
|
90
|
-
{message ? message : 'Added to card'}
|
|
91
|
-
</Message>
|
|
92
|
-
) : (
|
|
93
|
-
<></>
|
|
94
|
-
)}
|
|
95
|
-
</>
|
|
96
|
-
);
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
const changeCartItemTaskStatus = async (unique_id, in_progress) => {
|
|
100
|
-
await getCartSessionStorage();
|
|
101
|
-
let newcart = cartState.map((item) => {
|
|
102
|
-
if (item['unique_id'] === unique_id) {
|
|
103
|
-
item['task_in_progress'] = in_progress;
|
|
104
|
-
}
|
|
105
|
-
return item;
|
|
106
|
-
});
|
|
107
|
-
saveItems(newcart);
|
|
108
|
-
};
|
|
109
|
-
// return [cart, addCartItem, removeCartSessionStorage];
|
|
110
|
-
|
|
111
|
-
return {
|
|
112
|
-
cart: cartState,
|
|
113
|
-
addCartItem: addCartItem,
|
|
114
|
-
removeAllCart: removeAllCart,
|
|
115
|
-
removeCartItem: removeCartItem,
|
|
116
|
-
Toast: Toast,
|
|
117
|
-
isLoggedIn: isLoggedIn,
|
|
118
|
-
changeCartItemTaskStatus: changeCartItemTaskStatus,
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
export default useCartState;
|