@eeacms/volto-clms-theme 1.0.199 → 1.0.201

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,11 +4,37 @@ 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.199](https://github.com/eea/volto-clms-theme/compare/1.0.198...1.0.199) - 26 April 2023
7
+ ### [1.0.201](https://github.com/eea/volto-clms-theme/compare/1.0.200...1.0.201) - 9 May 2023
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: CLMS-1882 [Unai - [`5509bc6`](https://github.com/eea/volto-clms-theme/commit/5509bc638817d5121e16bdadc6f5e084e363d9ed)]
12
+ - feat: CLMS-2019 ? used for undefined schemas [Unai - [`3440b26`](https://github.com/eea/volto-clms-theme/commit/3440b26e9677410c531b26e10d6f2b7519dd8120)]
8
13
 
9
14
  #### :bug: Bug Fixes
10
15
 
11
- - fix: CLMS-2053 style changes in home page [Mikel Larreategi - [`ea163d1`](https://github.com/eea/volto-clms-theme/commit/ea163d14e0e051f18f37746ffe959bb7963fe41e)]
16
+ - fix: clms-1714 remove button when no search button is selected [Mikel Larreategi - [`c3d72e5`](https://github.com/eea/volto-clms-theme/commit/c3d72e53355546019ca1e727b39d477f16079011)]
17
+ - fix: clms-2143 coordinates and direction were split [Mikel Larreategi - [`1c5c000`](https://github.com/eea/volto-clms-theme/commit/1c5c00003e323ef3fbf9911a415ca9143cf992ca)]
18
+ - fix: clms-2053 CSS fixes [Mikel Larreategi - [`5b3098f`](https://github.com/eea/volto-clms-theme/commit/5b3098fdf42529e4d9bfaa026ed9a587ec5ff3d1)]
19
+
20
+ #### :hammer_and_wrench: Others
21
+
22
+ - snaphot update [Unai - [`1afab8d`](https://github.com/eea/volto-clms-theme/commit/1afab8d8087c613a9db53dfad7df4e20fa57e77b)]
23
+ - register/login link working to open modal [Unai - [`a43ff7e`](https://github.com/eea/volto-clms-theme/commit/a43ff7ed10b02facc7906c7d7378e0065b50ef9c)]
24
+ - grab cursor on handle hover [Unai - [`0e57ca8`](https://github.com/eea/volto-clms-theme/commit/0e57ca8bcad6eea5b35b90952ff9a4bd1b047cf9)]
25
+ - code cleaning [Unai - [`2ff7638`](https://github.com/eea/volto-clms-theme/commit/2ff7638bdef58a70c1ab17339d49c80c58e7dfbe)]
26
+ - draggable modal style fixes [Unai - [`6882fb9`](https://github.com/eea/volto-clms-theme/commit/6882fb90884b10dfd92d41713dd6d22d8c0d9177)]
27
+ - draggable-modal fixes [Unai - [`b95ee14`](https://github.com/eea/volto-clms-theme/commit/b95ee14231490e18227b9037fea38716a194a57c)]
28
+ - some fixes [Unai - [`e56229c`](https://github.com/eea/volto-clms-theme/commit/e56229c5c74c8a179bd43d5a48168616c82228e7)]
29
+ - lint [Mikel Larreategi - [`e4fc5d1`](https://github.com/eea/volto-clms-theme/commit/e4fc5d170c96d0b2870d4eba164c32c26005d44a)]
30
+ - modal closes on button click amd eslint fix [Unai - [`6a29ab6`](https://github.com/eea/volto-clms-theme/commit/6a29ab6b37f53df54b912210dd41cee42779b16e)]
31
+ ### [1.0.200](https://github.com/eea/volto-clms-theme/compare/1.0.199...1.0.200) - 27 April 2023
32
+
33
+ #### :hammer_and_wrench: Others
34
+
35
+ - fix clms-2048 change footer newsletter subscription message when the user is already subscribed [Mikel Larreategi - [`4fb9df6`](https://github.com/eea/volto-clms-theme/commit/4fb9df663254ab0aa038067c8805dea68d1bc0cd)]
36
+ - clms-2008 show bounding box coordinates [Mikel Larreategi - [`d0fdcf2`](https://github.com/eea/volto-clms-theme/commit/d0fdcf2fa74862bf861d869550d134fa86f5be30)]
37
+ ### [1.0.199](https://github.com/eea/volto-clms-theme/compare/1.0.198...1.0.199) - 26 April 2023
12
38
 
13
39
  ### [1.0.198](https://github.com/eea/volto-clms-theme/compare/1.0.197...1.0.198) - 17 April 2023
14
40
 
@@ -1062,7 +1088,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1062
1088
  #### :hammer_and_wrench: Others
1063
1089
 
1064
1090
  - related products and datasets added to news and meeting views and login-plone route created [Unai - [`5704a1a`](https://github.com/eea/volto-clms-theme/commit/5704a1a766148746162b60efaf232ea90dc20cf4)]
1065
- - Revert "[JENKINS] Use eeacms/plone-backend and Volto alpha version- Refs #151967" [Mikel Larreategi - [`46eb694`](https://github.com/eea/volto-clms-theme/commit/46eb69415280a3c982405299135027ae4221426a)]
1066
1091
  - sort items according to the lowercased label and put those with special meaning at the end [Mikel Larreategi - [`6410abe`](https://github.com/eea/volto-clms-theme/commit/6410abe096f60dcad54dced2026c9df9b7946d68)]
1067
1092
  - lint fix [Unai - [`1264a7a`](https://github.com/eea/volto-clms-theme/commit/1264a7adfe8d679fea1bd821ad087add20f4271d)]
1068
1093
  - footer newsletter subscription change, global search maxLength change from 8000 to 200 and /login design change [Unai - [`a09d24a`](https://github.com/eea/volto-clms-theme/commit/a09d24adbb6fa053fb2a2cc0071506b906593b42)]
@@ -1213,7 +1238,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1213
1238
  - search block new features [ionlizarazu - [`8e814cb`](https://github.com/eea/volto-clms-theme/commit/8e814cbd359782540c21fe37b37ef146d331f0d6)]
1214
1239
  - language selector cookie management [ionlizarazu - [`1385ac9`](https://github.com/eea/volto-clms-theme/commit/1385ac95795702206d3623ba6e780faa43a89e0a)]
1215
1240
  - toolbar cookie management [ionlizarazu - [`5c23200`](https://github.com/eea/volto-clms-theme/commit/5c23200790b20e1d4f1bc966463c37bf4c808f47)]
1216
- - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`0316a0d`](https://github.com/eea/volto-clms-theme/commit/0316a0d8b6fb0fa14af13002415f3c95d9f8ede3)]
1217
1241
  ### [1.0.84](https://github.com/eea/volto-clms-theme/compare/1.0.83...1.0.84) - 18 March 2022
1218
1242
 
1219
1243
  #### :hammer_and_wrench: Others
@@ -2118,13 +2142,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2118
2142
  #### :hammer_and_wrench: Others
2119
2143
 
2120
2144
  - replace @collective/volto-dropdownmenu with volto-dropdownmenu [ionlizarazu - [`07f004f`](https://github.com/eea/volto-clms-theme/commit/07f004fe0219e403fb51bc045c83d34f3b981f76)]
2121
- - yarn.lock [ionlizarazu - [`fe1ca04`](https://github.com/eea/volto-clms-theme/commit/fe1ca04889d29fe7b653db4c69af2751b84b8a1a)]
2122
2145
  - add NODE_ENV parameter [ionlizarazu - [`101f27c`](https://github.com/eea/volto-clms-theme/commit/101f27c25b8fbd192e1b11865e95cf5ffee08c1b)]
2123
2146
  - upgrade volto-dropdownmenu version [ionlizarazu - [`2081855`](https://github.com/eea/volto-clms-theme/commit/2081855301f4c708776e0dbab39db143cee00dbc)]
2124
2147
  - HomeSearch block missing url behaviour [ionlizarazu - [`d20a378`](https://github.com/eea/volto-clms-theme/commit/d20a378ce3f254b8343692348f314bf281974542)]
2125
2148
  - babel configuration [ionlizarazu - [`203ea2d`](https://github.com/eea/volto-clms-theme/commit/203ea2de07f99ca3403e4ca220ca74d7ce69b61d)]
2126
2149
  - prettier [ionlizarazu - [`e79e26b`](https://github.com/eea/volto-clms-theme/commit/e79e26bf2fa40ba7b4eb53a24dabd87928221c28)]
2127
- - add yarn lock [ionlizarazu - [`e1ab28b`](https://github.com/eea/volto-clms-theme/commit/e1ab28b060d5a74431c368b0de82a68dabce1eab)]
2128
2150
  - Jenkinsfile cypress test [ionlizarazu - [`b385d65`](https://github.com/eea/volto-clms-theme/commit/b385d65986f717c60f8c434a08fc11b829d08eb4)]
2129
2151
  - cypress [ionlizarazu - [`a243cf0`](https://github.com/eea/volto-clms-theme/commit/a243cf0182fa3dd113c16ff495c71e310252d83b)]
2130
2152
  - some fixes [ionlizarazu - [`046279b`](https://github.com/eea/volto-clms-theme/commit/046279b9d05bea8a64eca03eed493e02621534c9)]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.0.199",
3
+ "version": "1.0.201",
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
  };
@@ -189,9 +189,15 @@ const CLMSCartContent = (props) => {
189
189
  <>
190
190
  <span>Bounding Box</span>
191
191
  <br />
192
- <span>
193
- {'('} {item.area.value.map((item) => item.toFixed(3)).join(', ')}
194
- {')'}
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>
195
201
  </span>
196
202
  </>
197
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
 
@@ -193,7 +193,10 @@ class Footer extends Component {
193
193
  <Toast
194
194
  error
195
195
  title={this.props.intl.formatMessage(messages.error)}
196
- content={this.props.intl.formatMessage(messages.errorMessage)}
196
+ content={
197
+ this.props.subscribe_error_message ||
198
+ this.props.intl.formatMessage(messages.errorMessage)
199
+ }
197
200
  />,
198
201
  );
199
202
  });
@@ -501,6 +504,7 @@ export default compose(
501
504
  subscribe_loaded: state.subscription.loaded,
502
505
  subscribe_loading: state.subscription.loading,
503
506
  subscribe_error: state.subscription.error,
507
+ subscribe_error_message: state.subscription.error_message,
504
508
  }),
505
509
  {
506
510
  subscribeTo,
@@ -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
  }