@eeacms/volto-clms-theme 1.1.90 → 1.1.92

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,34 @@ 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.1.92](https://github.com/eea/volto-clms-theme/compare/1.1.91...1.1.92) - 12 December 2023
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: add FME Job ID in the downloads page CLMS-2907 [Mikel Larreategi - [`7af59ad`](https://github.com/eea/volto-clms-theme/commit/7af59add01d655b29093061d50ca5346664d7501)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - styles [Mikel Larreategi - [`c10774a`](https://github.com/eea/volto-clms-theme/commit/c10774ad2454e399fd4a0dc8f7973865fcf831cf)]
16
+ ### [1.1.91](https://github.com/eea/volto-clms-theme/compare/1.1.90...1.1.91) - 12 December 2023
17
+
18
+ #### :rocket: New Features
19
+
20
+ - feat: new field type for service desk form [Mikel Larreategi - [`4b22f00`](https://github.com/eea/volto-clms-theme/commit/4b22f00b2c52b23b45e5740f1f29d7e7ed3af818)]
21
+ - feat: add a pop-up about formats [Mikel Larreategi - [`da7ee61`](https://github.com/eea/volto-clms-theme/commit/da7ee61424938148703f77d677a3d11fdb7cc07f)]
22
+ - feat: add a pop-up about EPSG codes [Mikel Larreategi - [`c2163b6`](https://github.com/eea/volto-clms-theme/commit/c2163b6a940249a46af7db5057976c5c0f71122b)]
23
+ - feat: enable add block button [Mikel Larreategi - [`53d0573`](https://github.com/eea/volto-clms-theme/commit/53d0573dfbecd117d044a7c25a68ce89294b5f61)]
24
+
25
+ #### :bug: Bug Fixes
26
+
27
+ - fix: CLMS-2898 reverted CLMS-1556 [Unai - [`d4c9e6e`](https://github.com/eea/volto-clms-theme/commit/d4c9e6e249de534705bd4e0bf0f2ed584026f0a5)]
28
+
29
+ #### :hammer_and_wrench: Others
30
+
31
+ - lint [Mikel Larreategi - [`b912406`](https://github.com/eea/volto-clms-theme/commit/b91240623d56c91e544902f84f52b51dddd550c5)]
32
+ - eslint [Mikel Larreategi - [`d216ab5`](https://github.com/eea/volto-clms-theme/commit/d216ab514d0dcc4091084642c80868033ac6ae6b)]
33
+ - fix [Mikel Larreategi - [`f8470ad`](https://github.com/eea/volto-clms-theme/commit/f8470ad0cb4f64ce54078b9ccba936e43960e9ab)]
34
+ - style for span in active tab [Unai - [`ac9f312`](https://github.com/eea/volto-clms-theme/commit/ac9f312d48ae053cd94540167a45aea83d524b33)]
7
35
  ### [1.1.90](https://github.com/eea/volto-clms-theme/compare/1.1.89...1.1.90) - 4 December 2023
8
36
 
9
37
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.1.90",
3
+ "version": "1.1.92",
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",
@@ -125,7 +125,7 @@ export default (props) => {
125
125
  },
126
126
  field_type: {
127
127
  title: intl.formatMessage(messages.field_type),
128
- type: 'array',
128
+ type: 'string',
129
129
  choices: [
130
130
  ...baseFieldTypeChoices,
131
131
  ...(config.blocks.blocksConfig.form.additionalFields?.map(
@@ -88,3 +88,7 @@ div.tabs-block.edit a.item.active p.menu-item-text {
88
88
  border-style: none none solid none;
89
89
  font-weight: bold;
90
90
  }
91
+
92
+ .left-menu .active span {
93
+ color: #fff;
94
+ }
@@ -78,6 +78,7 @@ import codeSVG from '@plone/volto/icons/code.svg';
78
78
  import upSVG from '@plone/volto/icons/up-key.svg';
79
79
  import ImageWidget from '@eeacms/volto-clms-theme/components/Widgets/ImageWidget';
80
80
  import AttachmentWithSizeLimit from '@eeacms/volto-clms-theme/components/Widgets/AttachmentWithSizeLimit';
81
+ import TextareaWithRequestData from '@eeacms/volto-clms-theme/components/Widgets/TextareaWithRequestData';
81
82
  import TextWidget from '@plone/volto/components/manage/Widgets/TextWidget';
82
83
  import TextareaWidget from '@plone/volto/components/manage/Widgets/TextareaWidget';
83
84
  import EmailWidget from '@plone/volto/components/manage/Widgets/EmailWidget';
@@ -610,6 +611,11 @@ const customBlocks = (config) => ({
610
611
  label: 'Attachment (size limit)',
611
612
  component: AttachmentWithSizeLimit,
612
613
  },
614
+ {
615
+ id: 'text_area_with_request_data',
616
+ label: 'CCL Text Area with Request Data',
617
+ component: TextareaWithRequestData,
618
+ },
613
619
  ],
614
620
  },
615
621
  maps: {
@@ -8,10 +8,12 @@ import {
8
8
  Select,
9
9
  Table,
10
10
  Pagination,
11
+ Popup,
11
12
  } from 'semantic-ui-react';
12
13
 
13
14
  import { Icon } from '@plone/volto/components';
14
15
  import { Toast } from '@plone/volto/components';
16
+ import { UniversalLink } from '@plone/volto/components';
15
17
  import addDocumentSVG from '@plone/volto/icons/add-document.svg';
16
18
  import removeSVG from '@plone/volto/icons/delete.svg';
17
19
  import paginationLeftSVG from '@plone/volto/icons/left-key.svg';
@@ -20,6 +22,7 @@ import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
20
22
  import useCartState from '@eeacms/volto-clms-utils/cart/useCartState';
21
23
  import { cleanDuplicatesEntries } from '@eeacms/volto-clms-utils/utils';
22
24
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
25
+ import CclModal from '@eeacms/volto-clms-theme/components/CclModal/CclModal';
23
26
 
24
27
  import { getDownloadtool, postDownloadtool } from '../../actions';
25
28
  import { useFilteredPagination } from '../CclUtils/useFilteredPagination';
@@ -49,7 +52,7 @@ import {
49
52
  const CLMSCartContent = (props) => {
50
53
  const { localSessionCart, getNutsIDList } = props;
51
54
  const dispatch = useDispatch();
52
- const { removeCartItem, /* removeCartItems, */ updateCart } = useCartState();
55
+ const { removeCartItem, removeCartItems, updateCart } = useCartState();
53
56
 
54
57
  // state connections
55
58
  const cart = useSelector((state) => state.cart_items.items);
@@ -143,17 +146,17 @@ const CLMSCartContent = (props) => {
143
146
 
144
147
  // eslint-disable-next-line react-hooks/exhaustive-deps
145
148
  const setCartItemInProgress = (in_progress_unique_ids) => {
146
- // let started_processing_items =
147
- // cartItems.length > 0
148
- // ? cartItems.filter((r) =>
149
- // in_progress_unique_ids.includes(r['unique_id']),
150
- // )
151
- // : [];
152
- // var items_to_remove =
153
- // started_processing_items.length > 0
154
- // ? started_processing_items.map((item) => item.unique_id)
155
- // : [];
156
- // removeCartItems(items_to_remove);
149
+ let started_processing_items =
150
+ cartItems.length > 0
151
+ ? cartItems.filter((r) =>
152
+ in_progress_unique_ids.includes(r['unique_id']),
153
+ )
154
+ : [];
155
+ var items_to_remove =
156
+ started_processing_items.length > 0
157
+ ? started_processing_items.map((item) => item.unique_id)
158
+ : [];
159
+ removeCartItems(items_to_remove);
157
160
  dispatch(getDownloadtool());
158
161
  };
159
162
 
@@ -196,6 +199,7 @@ const CLMSCartContent = (props) => {
196
199
  ? selectedItems.map((item) => item?.unique_id)
197
200
  : [];
198
201
  dispatch(postDownloadtool(body, unique_ids));
202
+ removeCartItem(unique_ids);
199
203
  };
200
204
 
201
205
  const downloadModal = () => {
@@ -271,7 +275,31 @@ const CLMSCartContent = (props) => {
271
275
  <Table.HeaderCell width={5}>Static info</Table.HeaderCell>
272
276
  <Table.HeaderCell>Configurable</Table.HeaderCell>
273
277
  <Table.HeaderCell></Table.HeaderCell>
274
- <Table.HeaderCell>Projection</Table.HeaderCell>
278
+ <Table.HeaderCell>
279
+ Projection{' '}
280
+ <CclModal
281
+ draggable={false}
282
+ trigger={
283
+ /* eslint-disable jsx-a11y/anchor-is-valid */
284
+ <a href="#">
285
+ <Popup
286
+ content="Explore EPSG details and coordinate systems with a click."
287
+ trigger={
288
+ <FontAwesomeIcon
289
+ icon={['far', 'question-circle']}
290
+ />
291
+ }
292
+ />
293
+ </a>
294
+ }
295
+ size={'small'}
296
+ >
297
+ <div className="image-modal">
298
+ Explore EPSG-related details in our{' '}
299
+ <UniversalLink href="/faq">FAQ page</UniversalLink>
300
+ </div>
301
+ </CclModal>
302
+ </Table.HeaderCell>
275
303
  <Table.HeaderCell>Timeseries</Table.HeaderCell>
276
304
  <Table.HeaderCell></Table.HeaderCell>
277
305
  </Table.Row>
@@ -339,7 +367,32 @@ const CLMSCartContent = (props) => {
339
367
  </div>
340
368
 
341
369
  <div className="mb-2">
342
- <strong>Format: </strong>
370
+ <strong>Format: </strong>{' '}
371
+ <CclModal
372
+ draggable={false}
373
+ trigger={
374
+ /* eslint-disable jsx-a11y/anchor-is-valid */
375
+ <a href="#">
376
+ <Popup
377
+ content="Explore Formats details and coordinate systems with a click."
378
+ trigger={
379
+ <FontAwesomeIcon
380
+ color="#000000"
381
+ icon={['far', 'question-circle']}
382
+ />
383
+ }
384
+ />
385
+ </a>
386
+ }
387
+ size={'small'}
388
+ >
389
+ <div className="image-modal">
390
+ Explore format-related details in our{' '}
391
+ <UniversalLink href="/faq">
392
+ FAQ page
393
+ </UniversalLink>
394
+ </div>
395
+ </CclModal>
343
396
  </div>
344
397
  {item?.layer !== null && (
345
398
  <div className="mb-2">
@@ -156,6 +156,7 @@ const FileCard = (props) => {
156
156
  width={['In_progress', 'Queued'].includes(item?.Status) ? 8 : 10}
157
157
  >
158
158
  <Header as="h3">{`Task ID: ${item?.TaskID}`}</Header>
159
+ <Header.Subheader as="h4">{`Job ID: ${item?.FMETaskId}`}</Header.Subheader>
159
160
  <Segment basic className="file-datetimes">
160
161
  {item?.RegistrationDateTime && (
161
162
  <>
@@ -19,3 +19,7 @@
19
19
  .ui.column.grid.filecard .file-datetimes svg {
20
20
  cursor: pointer;
21
21
  }
22
+
23
+ .ui.column.grid.filecard h4 {
24
+ color: rgba(0, 0, 0, 0.87);
25
+ }
@@ -3,6 +3,11 @@ import CclButton from '../CclButton/CclButton';
3
3
 
4
4
  const CLMSTechnicalLibraryView = (props) => {
5
5
  const { content } = props;
6
+
7
+ const textToForm = encodeURIComponent(
8
+ `I want the following document ${content.title} ${content['@id']}`,
9
+ );
10
+
6
11
  return (
7
12
  <div className="ccl-container">
8
13
  <>
@@ -16,13 +21,12 @@ const CLMSTechnicalLibraryView = (props) => {
16
21
  {content.ondemand ? (
17
22
  <>
18
23
  <p>
19
- You are requesting an on-demand document. Please contact the
20
- service desk to obtain it.
24
+ You are requesting an on-demand document. Please contact the{' '}
25
+ <a href={`/en/contact-service-helpdesk?text=${textToForm}`}>
26
+ service desk
27
+ </a>{' '}
28
+ to obtain it.
21
29
  </p>
22
-
23
- <CclButton to={`/en/contact-service-helpdesk`}>
24
- Helpdesk
25
- </CclButton>
26
30
  </>
27
31
  ) : (
28
32
  <>
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ //import { injectIntl } from 'react-intl';
3
+ import TextareaWidget from '@plone/volto/components/manage/Widgets/TextareaWidget';
4
+
5
+ import { useLocation } from 'react-router-dom';
6
+
7
+ const TextareaWithRequestData = (props) => {
8
+ const { search } = useLocation();
9
+
10
+ const hashMatch = decodeURIComponent(
11
+ search.includes('text') &&
12
+ search.match(/.*(\?text=.*)/)[1].replace(/\?text=/, ''),
13
+ );
14
+
15
+ return <TextareaWidget {...props} value={hashMatch} />;
16
+ };
17
+
18
+ export default TextareaWithRequestData;
package/src/index.js CHANGED
@@ -323,6 +323,8 @@ const applyConfig = (config) => {
323
323
  ...reducers,
324
324
  };
325
325
 
326
+ config.experimental.addBlockButton.enabled = true;
327
+
326
328
  return config;
327
329
  };
328
330
  export default applyConfig;
@@ -71,6 +71,12 @@ h3 {
71
71
  font-weight: bold;
72
72
  }
73
73
 
74
+ h4 {
75
+ margin-bottom: 1rem;
76
+ font-size: 1.15rem;
77
+ font-weight: bold;
78
+ }
79
+
74
80
  p {
75
81
  min-height: 1.6875rem;
76
82
  margin-bottom: 1rem;
@@ -490,9 +496,9 @@ body:not(.contenttype-lrf:not(.section-cart):not(.section-profile))
490
496
  }
491
497
 
492
498
  body.contenttype-document .right-content ul {
493
- position: relative;
494
- left: 0.5rem;
495
- margin-bottom:1rem;
499
+ position: relative;
500
+ left: 0.5rem;
501
+ margin-bottom: 1rem;
496
502
  }
497
503
  .card-container {
498
504
  display: flex;