@eeacms/volto-clms-theme 1.0.200 → 1.0.202

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,6 +4,38 @@ 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.202](https://github.com/eea/volto-clms-theme/compare/1.0.201...1.0.202) - 11 May 2023
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: CLMS-1556 cart datasets not doleted after downloading [Unai - [`d92704a`](https://github.com/eea/volto-clms-theme/commit/d92704ae8bb2d6346627767da894a2e0e755e2b2)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - mediaquery in dashboards for big devices [Unai - [`ede6386`](https://github.com/eea/volto-clms-theme/commit/ede6386b1d30d5a0c9cd9be490df2eaba42ed4e9)]
16
+ ### [1.0.201](https://github.com/eea/volto-clms-theme/compare/1.0.200...1.0.201) - 9 May 2023
17
+
18
+ #### :rocket: New Features
19
+
20
+ - feat: CLMS-1882 [Unai - [`5509bc6`](https://github.com/eea/volto-clms-theme/commit/5509bc638817d5121e16bdadc6f5e084e363d9ed)]
21
+ - feat: CLMS-2019 ? used for undefined schemas [Unai - [`3440b26`](https://github.com/eea/volto-clms-theme/commit/3440b26e9677410c531b26e10d6f2b7519dd8120)]
22
+
23
+ #### :bug: Bug Fixes
24
+
25
+ - fix: clms-1714 remove button when no search button is selected [Mikel Larreategi - [`c3d72e5`](https://github.com/eea/volto-clms-theme/commit/c3d72e53355546019ca1e727b39d477f16079011)]
26
+ - fix: clms-2143 coordinates and direction were split [Mikel Larreategi - [`1c5c000`](https://github.com/eea/volto-clms-theme/commit/1c5c00003e323ef3fbf9911a415ca9143cf992ca)]
27
+
28
+ #### :hammer_and_wrench: Others
29
+
30
+ - snaphot update [Unai - [`1afab8d`](https://github.com/eea/volto-clms-theme/commit/1afab8d8087c613a9db53dfad7df4e20fa57e77b)]
31
+ - register/login link working to open modal [Unai - [`a43ff7e`](https://github.com/eea/volto-clms-theme/commit/a43ff7ed10b02facc7906c7d7378e0065b50ef9c)]
32
+ - grab cursor on handle hover [Unai - [`0e57ca8`](https://github.com/eea/volto-clms-theme/commit/0e57ca8bcad6eea5b35b90952ff9a4bd1b047cf9)]
33
+ - code cleaning [Unai - [`2ff7638`](https://github.com/eea/volto-clms-theme/commit/2ff7638bdef58a70c1ab17339d49c80c58e7dfbe)]
34
+ - draggable modal style fixes [Unai - [`6882fb9`](https://github.com/eea/volto-clms-theme/commit/6882fb90884b10dfd92d41713dd6d22d8c0d9177)]
35
+ - draggable-modal fixes [Unai - [`b95ee14`](https://github.com/eea/volto-clms-theme/commit/b95ee14231490e18227b9037fea38716a194a57c)]
36
+ - some fixes [Unai - [`e56229c`](https://github.com/eea/volto-clms-theme/commit/e56229c5c74c8a179bd43d5a48168616c82228e7)]
37
+ - lint [Mikel Larreategi - [`e4fc5d1`](https://github.com/eea/volto-clms-theme/commit/e4fc5d170c96d0b2870d4eba164c32c26005d44a)]
38
+ - modal closes on button click amd eslint fix [Unai - [`6a29ab6`](https://github.com/eea/volto-clms-theme/commit/6a29ab6b37f53df54b912210dd41cee42779b16e)]
7
39
  ### [1.0.200](https://github.com/eea/volto-clms-theme/compare/1.0.199...1.0.200) - 27 April 2023
8
40
 
9
41
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.0.200",
3
+ "version": "1.0.202",
4
4
  "description": "volto-clms-theme: Volto theme for CLMS site",
5
5
  "main": "src/index.js",
6
6
  "author": "CodeSyntax for the European Environment Agency",
@@ -55,6 +55,7 @@
55
55
  "lightgallery": "^2.4.0",
56
56
  "razzle-plugin-scss": "4.2.18",
57
57
  "react-csv": "2.2.2",
58
+ "react-draggable": "4.4.5",
58
59
  "react-input-range": "^1.3.0",
59
60
  "react-native-mime-types": "2.3.0",
60
61
  "react-slick": "0.28.1",
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
- import { Button, Input } from 'semantic-ui-react';
2
+ import { Input } from 'semantic-ui-react';
3
3
  import { defineMessages, useIntl } from 'react-intl';
4
- import { Icon } from '@plone/volto/components';
5
- import loupeSVG from '@plone/volto/icons/zoom.svg';
6
4
 
7
5
  const messages = defineMessages({
8
6
  search: {
@@ -50,11 +48,6 @@ const SearchInput = (props) => {
50
48
  }
51
49
  }}
52
50
  />
53
- {isLive && (
54
- <Button basic icon className="search-input-live-icon-button">
55
- <Icon name={loupeSVG} />
56
- </Button>
57
- )}
58
51
  </div>
59
52
  );
60
53
  };
@@ -33,7 +33,7 @@ import './cart-table.less';
33
33
  const CLMSCartContent = (props) => {
34
34
  const { localSessionCart } = props;
35
35
  const dispatch = useDispatch();
36
- const { removeCartItem, removeCartItems, updateCart } = useCartState();
36
+ const { removeCartItem, /* removeCartItems, */ updateCart } = useCartState();
37
37
 
38
38
  // state connections
39
39
  const cart = useSelector((state) => state.cart_items.items);
@@ -110,17 +110,17 @@ const CLMSCartContent = (props) => {
110
110
 
111
111
  // eslint-disable-next-line react-hooks/exhaustive-deps
112
112
  const setCartItemInProgress = (in_progress_unique_ids) => {
113
- let started_processing_items =
114
- cartItems.length > 0
115
- ? cartItems.filter((r) =>
116
- in_progress_unique_ids.includes(r['unique_id']),
117
- )
118
- : [];
119
- var items_to_remove =
120
- started_processing_items.length > 0
121
- ? started_processing_items.map((item) => item.unique_id)
122
- : [];
123
- removeCartItems(items_to_remove);
113
+ // let started_processing_items =
114
+ // cartItems.length > 0
115
+ // ? cartItems.filter((r) =>
116
+ // in_progress_unique_ids.includes(r['unique_id']),
117
+ // )
118
+ // : [];
119
+ // var items_to_remove =
120
+ // started_processing_items.length > 0
121
+ // ? started_processing_items.map((item) => item.unique_id)
122
+ // : [];
123
+ // removeCartItems(items_to_remove);
124
124
  dispatch(getDownloadtool());
125
125
  };
126
126
 
@@ -189,14 +189,15 @@ const CLMSCartContent = (props) => {
189
189
  <>
190
190
  <span>Bounding Box</span>
191
191
  <br />
192
- <span>
193
- {`N: ${item.area.value[0].toFixed(
194
- 1,
195
- )}º E: ${item.area.value[1].toFixed(1)}º`}
196
- <br />
197
- {`S: ${item.area.value[2].toFixed(
198
- 1,
199
- )}º W: ${item.area.value[3].toFixed(1)}º`}
192
+ <span class="cart-bounding-boxes">
193
+ <span class="cart-bounding-box-row">
194
+ <span>{`N: ${item.area.value[0].toFixed(1)}º `}</span>&nbsp;
195
+ <span>{`E: ${item.area.value[1].toFixed(1)}º `}</span>
196
+ </span>
197
+ <span class="cart-bounding-box-row">
198
+ <span>{`S: ${item.area.value[2].toFixed(1)}º `}</span>&nbsp;
199
+ <span>{`W: ${item.area.value[3].toFixed(1)}º `}</span>
200
+ </span>
200
201
  </span>
201
202
  </>
202
203
  );
@@ -289,28 +289,31 @@ function CclDownloadTable(props) {
289
289
  </>
290
290
  )}
291
291
  {props.dataset.show_legend_on_prepackages && (
292
- <CclModal
293
- trigger={
294
- <CclButton
295
- className="ccl-button ccl-button--default show_legend_on_prepackages"
296
- to="#download"
297
- >
298
- {intl.formatMessage(messages.prePackages_location_map)}
299
- </CclButton>
300
- }
301
- size={'medium'}
302
- >
303
- <div className="image-modal">
304
- <img
305
- src={
306
- prepackage_grid_image
307
- ? prepackage_grid_image
308
- : PlaceHolder
309
- }
310
- alt={'Placeholder'}
311
- />
312
- </div>
313
- </CclModal>
292
+ <>
293
+ <CclModal
294
+ draggable={true}
295
+ trigger={
296
+ <CclButton
297
+ className="ccl-button ccl-button--default show_legend_on_prepackages"
298
+ to="#download"
299
+ >
300
+ {intl.formatMessage(messages.prePackages_location_map)}
301
+ </CclButton>
302
+ }
303
+ size={'medium'}
304
+ >
305
+ <div className="image-modal">
306
+ <img
307
+ src={
308
+ prepackage_grid_image
309
+ ? prepackage_grid_image
310
+ : PlaceHolder
311
+ }
312
+ alt={'Placeholder'}
313
+ />
314
+ </div>
315
+ </CclModal>
316
+ </>
314
317
  )}
315
318
  {cartSelection.length !== prePackagedCollection.length && (
316
319
  <>
@@ -1,6 +1,9 @@
1
1
  import React from 'react';
2
- import { Modal } from 'semantic-ui-react';
2
+ import { Segment, Modal } from 'semantic-ui-react';
3
3
  import './modal.less';
4
+ import Draggable from 'react-draggable';
5
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
6
+ import { faGripHorizontal } from '@fortawesome/free-solid-svg-icons';
4
7
 
5
8
  function CclModal(props) {
6
9
  let {
@@ -9,13 +12,10 @@ function CclModal(props) {
9
12
  size = 'fullscreen',
10
13
  modalStatus = () => {},
11
14
  onCloseExtra = () => {},
15
+ draggable = false,
12
16
  } = props;
13
17
  const [open, setOpen] = React.useState(false);
14
18
 
15
- // React.useEffect(() => {
16
- // setOpen(openState);
17
- // }, [openState]);
18
-
19
19
  function openModal() {
20
20
  setOpen(true);
21
21
  modalStatus(true);
@@ -27,7 +27,40 @@ function CclModal(props) {
27
27
  onCloseExtra();
28
28
  }
29
29
 
30
- return (
30
+ return draggable ? (
31
+ <>
32
+ {open && (
33
+ <Draggable handle=".handle">
34
+ <div className="dragable-modal-dialog">
35
+ <div className={'modal-close modal-clms-close'}>
36
+ <span
37
+ className="ccl-icon-close"
38
+ aria-label="Close"
39
+ onClick={() => closeModal()}
40
+ onKeyDown={() => closeModal()}
41
+ tabIndex="0"
42
+ role="button"
43
+ ></span>
44
+ </div>
45
+ <Segment compact className="handle">
46
+ <FontAwesomeIcon icon={faGripHorizontal} size="lg" />
47
+ </Segment>
48
+
49
+ {children}
50
+ </div>
51
+ </Draggable>
52
+ )}
53
+ <Segment
54
+ basic
55
+ compact
56
+ onClick={() => {
57
+ !open ? openModal() : closeModal();
58
+ }}
59
+ >
60
+ {trigger}
61
+ </Segment>
62
+ </>
63
+ ) : (
31
64
  <Modal
32
65
  onClose={() => closeModal()}
33
66
  onOpen={() => openModal()}
@@ -248,6 +248,20 @@
248
248
  .modal .ccl-container {
249
249
  max-width: 100%;
250
250
  }
251
+
252
+ .dragable-modal-dialog {
253
+ position: absolute;
254
+ z-index: 9999 !important;
255
+ width: auto;
256
+ max-width: 700px;
257
+ border: 1px solid #acbe39;
258
+ background-color: white;
259
+ }
260
+
261
+ .handle {
262
+ cursor: grab;
263
+ }
264
+
251
265
  @media (min-width: 576px) {
252
266
  .modal .ccl-container {
253
267
  max-width: 540px;
@@ -8,8 +8,8 @@ import './DownloadableFilesTableWidget.less';
8
8
 
9
9
  const DownloadableFilesTableWidget = (props) => {
10
10
  const { functions, data } = useSchema(
11
- props.value.schema,
12
- props.value.uiSchema,
11
+ props?.value?.schema,
12
+ props?.value?.uiSchema,
13
13
  );
14
14
  const { schema, uiSchema, ready } = data;
15
15
  const { setSchema, setUISchema, setSchemaHandler } = functions;
@@ -34,8 +34,8 @@ const DownloadableFilesTableWidget = (props) => {
34
34
  }
35
35
  props.onChange(id, {
36
36
  items: value.items,
37
- ...props.schema,
38
- ...props.uiSchema,
37
+ ...props?.schema,
38
+ ...props?.uiSchema,
39
39
  });
40
40
  };
41
41
 
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * @module components/theme/Unauthorized/Unauthorized
3
3
  */
4
-
5
4
  import React from 'react';
6
5
  import { FormattedMessage } from 'react-intl';
6
+ import { useSelector } from 'react-redux';
7
7
  import { Link } from 'react-router-dom';
8
8
  import { Container } from 'semantic-ui-react';
9
- import { useSelector } from 'react-redux';
9
+
10
10
  import { withServerErrorCode } from '@plone/volto/helpers/Utils/Utils';
11
11
  import CclLoginModal from '@eeacms/volto-clms-theme/components/CclLoginModal/CclLoginModal';
12
12
 
@@ -29,7 +29,18 @@ const Unauthorized = () => {
29
29
  id="You are trying to access a protected resource, please {login} first."
30
30
  defaultMessage="You are trying to access a protected resource, please {login} first."
31
31
  values={{
32
- login: <CclLoginModal classname={'green-login-link'} />,
32
+ login: (
33
+ <CclLoginModal
34
+ triggerComponent={() => (
35
+ <Link to={'#'}>
36
+ <FormattedMessage
37
+ id="register-login"
38
+ defaultMessage="Register / Login"
39
+ />
40
+ </Link>
41
+ )}
42
+ />
43
+ ),
33
44
  }}
34
45
  />
35
46
  </p>
@@ -14,16 +14,16 @@ exports[`Unauthorized renders a not found component 1`] = `
14
14
  className="description"
15
15
  >
16
16
  You are trying to access a protected resource, please
17
- <span
18
- className="green-login-link"
17
+ <a
18
+ href="/"
19
19
  onBlur={[Function]}
20
20
  onClick={[Function]}
21
21
  onFocus={[Function]}
22
22
  onMouseEnter={[Function]}
23
23
  onMouseLeave={[Function]}
24
24
  >
25
- Register/Login
26
- </span>
25
+ Register / Login
26
+ </a>
27
27
  first.
28
28
  </p>
29
29
  <p>
@@ -222,7 +222,7 @@
222
222
  height: 30vw;
223
223
  }
224
224
  }
225
- @media (max-width: 380px) {
225
+ @media (max-width: 420px) {
226
226
  .home-products-container {
227
227
  margin-top: 3.6rem;
228
228
  }
@@ -1281,6 +1281,18 @@ div#page-document h1.documentFirstHeading {
1281
1281
  min-width: 7rem !important;
1282
1282
  }
1283
1283
 
1284
+ .cart-bounding-boxes {
1285
+ display: flex;
1286
+ flex-direction: column;
1287
+
1288
+ .cart-bounding-box-row {
1289
+ display: flex;
1290
+ flex-wrap: wrap;
1291
+ }
1292
+ }
1293
+
1294
+
1295
+
1284
1296
  .Toastify__toast--success {
1285
1297
  background-color: #fafbf3 !important;
1286
1298
  }
@@ -41,7 +41,7 @@ body.is-anonymous main {
41
41
  /* detect if is logged in but in view with toolbar open */
42
42
  body:not(.view-editview):not(.view-addview):not(.document_wide_view):not(.is-anonymous)
43
43
  .stretch {
44
- max-width: 1636px;
44
+ max-width: 100vw !important;
45
45
  margin: 0;
46
46
  }
47
47
 
@@ -49,6 +49,106 @@ body:not(.is-authenticated):not(.document_wide_view).stretch {
49
49
  padding: 0;
50
50
  }
51
51
 
52
+ /* @media screen and (max-width: 1790px) {
53
+ body.section-stats.section-dashboards .stretch {
54
+ padding-left: 80px !important;
55
+ margin-left: -21vw !important;
56
+ }
57
+ }
58
+ */
59
+
60
+ @media screen and (max-width: 3900px) {
61
+ body:not(.view-editview):not(.view-addview):not(.document_wide_view):not(.is-anonymous)
62
+ .stretch {
63
+ right: auto;
64
+ left: auto;
65
+ width: auto;
66
+ padding: 0;
67
+ transform: none;
68
+ }
69
+
70
+ body:not(.view-editview):not(.view-addview):not(.document_wide_view):not(.is-anonymous):not(.has-toolbar-collapsed)
71
+ .stretch {
72
+ max-width: 100vw !important;
73
+ margin: 0 -26.54vw !important;
74
+ }
75
+
76
+ body:not(.view-editview):not(.view-addview):not(.document_wide_view):not(.is-anonymous):not(.has-toolbar)
77
+ .stretch {
78
+ max-width: 100vw !important;
79
+ margin: 0 -26.5vw !important;
80
+ }
81
+ }
82
+
83
+ @media screen and (max-width: 3400px) {
84
+ body:not(.view-editview):not(.view-addview):not(.document_wide_view):not(.is-anonymous)
85
+ .stretch {
86
+ right: auto;
87
+ left: auto;
88
+ width: auto;
89
+ padding: 0;
90
+ transform: none;
91
+ }
92
+
93
+ body:not(.view-editview):not(.view-addview):not(.document_wide_view):not(.is-anonymous):not(.has-toolbar-collapsed)
94
+ .stretch {
95
+ max-width: 100vw !important;
96
+ margin: 0 -26.54vw !important;
97
+ }
98
+
99
+ body:not(.view-editview):not(.view-addview):not(.document_wide_view):not(.is-anonymous):not(.has-toolbar)
100
+ .stretch {
101
+ max-width: 100vw !important;
102
+ margin: 0 -26.5vw !important;
103
+ }
104
+ }
105
+
106
+ @media screen and (max-width: 2600px) {
107
+ body:not(.view-editview):not(.view-addview):not(.document_wide_view):not(.is-anonymous)
108
+ .stretch {
109
+ right: auto;
110
+ left: auto;
111
+ width: auto;
112
+ padding: 0;
113
+ transform: none;
114
+ }
115
+
116
+ body:not(.view-editview):not(.view-addview):not(.document_wide_view):not(.is-anonymous):not(.has-toolbar-collapsed)
117
+ .stretch {
118
+ max-width: 100vw !important;
119
+ margin: 0 -19.54vw !important;
120
+ }
121
+
122
+ body:not(.view-editview):not(.view-addview):not(.document_wide_view):not(.is-anonymous):not(.has-toolbar)
123
+ .stretch {
124
+ max-width: 100vw !important;
125
+ margin: 0 -19.5vw !important;
126
+ }
127
+ }
128
+
129
+ @media screen and (max-width: 2200px) {
130
+ body:not(.view-editview):not(.view-addview):not(.document_wide_view):not(.is-anonymous)
131
+ .stretch {
132
+ right: auto;
133
+ left: auto;
134
+ width: auto;
135
+ padding: 0;
136
+ transform: none;
137
+ }
138
+
139
+ body:not(.view-editview):not(.view-addview):not(.document_wide_view):not(.is-anonymous):not(.has-toolbar-collapsed)
140
+ .stretch {
141
+ max-width: 1636px !important;
142
+ margin: 0 !important;
143
+ }
144
+
145
+ body:not(.view-editview):not(.view-addview):not(.document_wide_view):not(.is-anonymous):not(.has-toolbar)
146
+ .stretch {
147
+ max-width: 1636px !important;
148
+ margin: 0 !important;
149
+ }
150
+ }
151
+
52
152
  @media screen and (max-width: 1790px) {
53
153
  body:not(.view-editview):not(.view-addview):not(.document_wide_view):not(.is-anonymous)
54
154
  .stretch {