@eeacms/volto-clms-theme 1.1.23 → 1.1.25

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,18 @@ 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.23](https://github.com/eea/volto-clms-theme/compare/1.1.22...1.1.23) - 12 July 2023
7
+ ### [1.1.25](https://github.com/eea/volto-clms-theme/compare/1.1.24...1.1.25) - 12 July 2023
8
8
 
9
9
  #### :hammer_and_wrench: Others
10
10
 
11
- - show collections always [Mikel Larreategi - [`442d2d9`](https://github.com/eea/volto-clms-theme/commit/442d2d9eeb1bba511401b643b21a019b62580709)]
11
+ - fix removing the last cart item [ionlizarazu - [`ae79754`](https://github.com/eea/volto-clms-theme/commit/ae79754fc5618ec759d3264f0d3e7f373cb2b276)]
12
+ - add cart pagination location reference [ionlizarazu - [`d1c0813`](https://github.com/eea/volto-clms-theme/commit/d1c08138854044a3a6d18351cbdbc38bdb04d506)]
13
+ - change accordion id [Mikel Larreategi - [`0aa3ad3`](https://github.com/eea/volto-clms-theme/commit/0aa3ad3722cc406a7d3f37855865d5e41f517b9e)]
14
+ - change sorting [Mikel Larreategi - [`abb6a67`](https://github.com/eea/volto-clms-theme/commit/abb6a677b1da7a65337b8088a8e1d989ae026673)]
15
+ ### [1.1.24](https://github.com/eea/volto-clms-theme/compare/1.1.23...1.1.24) - 12 July 2023
16
+
17
+ ### [1.1.23](https://github.com/eea/volto-clms-theme/compare/1.1.22...1.1.23) - 12 July 2023
18
+
12
19
  ### [1.1.22](https://github.com/eea/volto-clms-theme/compare/1.1.21...1.1.22) - 10 July 2023
13
20
 
14
21
  #### :hammer_and_wrench: Others
@@ -40,7 +47,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
40
47
 
41
48
  - remove NUTS text for area naming in the cart [ionlizarazu - [`062e0a3`](https://github.com/eea/volto-clms-theme/commit/062e0a375f5352bc13c18ff7ec33fad4bcc59f2f)]
42
49
  - dependencies [ionlizarazu - [`405ef96`](https://github.com/eea/volto-clms-theme/commit/405ef96090fe7bd4af73a49d3285a92fad712e3b)]
43
- - yarn.lock [ionlizarazu - [`7132119`](https://github.com/eea/volto-clms-theme/commit/71321195c4dd4fceed67f2f0872f3e24bba61c17)]
44
50
  - volto-blocks-grid module mapping [ionlizarazu - [`4fec3ca`](https://github.com/eea/volto-clms-theme/commit/4fec3cabc437322ad92ed90d682250bd123ccaaf)]
45
51
  - volto-blocks-grid v7.0.2 [ionlizarazu - [`2557e60`](https://github.com/eea/volto-clms-theme/commit/2557e6039d3cea33ca0bd11a0a3ef4764c611f78)]
46
52
  - remove styling from teaser block [ionlizarazu - [`879e684`](https://github.com/eea/volto-clms-theme/commit/879e684057c88f52f60f0fa54cbaa155c7d14688)]
@@ -128,7 +134,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
128
134
 
129
135
  #### :house: Internal changes
130
136
 
131
- - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`b4cbf65`](https://github.com/eea/volto-clms-theme/commit/b4cbf6557fbc67f7fc4cea5aa2cb19804f3d7e3c)]
132
137
 
133
138
  #### :hammer_and_wrench: Others
134
139
 
@@ -1327,7 +1332,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1327
1332
  #### :hammer_and_wrench: Others
1328
1333
 
1329
1334
  - 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)]
1330
- - Revert "[JENKINS] Use eeacms/plone-backend and Volto alpha version- Refs #151967" [Mikel Larreategi - [`46eb694`](https://github.com/eea/volto-clms-theme/commit/46eb69415280a3c982405299135027ae4221426a)]
1331
1335
  - 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)]
1332
1336
  - lint fix [Unai - [`1264a7a`](https://github.com/eea/volto-clms-theme/commit/1264a7adfe8d679fea1bd821ad087add20f4271d)]
1333
1337
  - 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)]
@@ -1478,7 +1482,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1478
1482
  - search block new features [ionlizarazu - [`8e814cb`](https://github.com/eea/volto-clms-theme/commit/8e814cbd359782540c21fe37b37ef146d331f0d6)]
1479
1483
  - language selector cookie management [ionlizarazu - [`1385ac9`](https://github.com/eea/volto-clms-theme/commit/1385ac95795702206d3623ba6e780faa43a89e0a)]
1480
1484
  - toolbar cookie management [ionlizarazu - [`5c23200`](https://github.com/eea/volto-clms-theme/commit/5c23200790b20e1d4f1bc966463c37bf4c808f47)]
1481
- - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`0316a0d`](https://github.com/eea/volto-clms-theme/commit/0316a0d8b6fb0fa14af13002415f3c95d9f8ede3)]
1482
1485
  ### [1.0.84](https://github.com/eea/volto-clms-theme/compare/1.0.83...1.0.84) - 18 March 2022
1483
1486
 
1484
1487
  #### :hammer_and_wrench: Others
@@ -2383,13 +2386,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2383
2386
  #### :hammer_and_wrench: Others
2384
2387
 
2385
2388
  - replace @collective/volto-dropdownmenu with volto-dropdownmenu [ionlizarazu - [`07f004f`](https://github.com/eea/volto-clms-theme/commit/07f004fe0219e403fb51bc045c83d34f3b981f76)]
2386
- - yarn.lock [ionlizarazu - [`fe1ca04`](https://github.com/eea/volto-clms-theme/commit/fe1ca04889d29fe7b653db4c69af2751b84b8a1a)]
2387
2389
  - add NODE_ENV parameter [ionlizarazu - [`101f27c`](https://github.com/eea/volto-clms-theme/commit/101f27c25b8fbd192e1b11865e95cf5ffee08c1b)]
2388
2390
  - upgrade volto-dropdownmenu version [ionlizarazu - [`2081855`](https://github.com/eea/volto-clms-theme/commit/2081855301f4c708776e0dbab39db143cee00dbc)]
2389
2391
  - HomeSearch block missing url behaviour [ionlizarazu - [`d20a378`](https://github.com/eea/volto-clms-theme/commit/d20a378ce3f254b8343692348f314bf281974542)]
2390
2392
  - babel configuration [ionlizarazu - [`203ea2d`](https://github.com/eea/volto-clms-theme/commit/203ea2de07f99ca3403e4ca220ca74d7ce69b61d)]
2391
2393
  - prettier [ionlizarazu - [`e79e26b`](https://github.com/eea/volto-clms-theme/commit/e79e26bf2fa40ba7b4eb53a24dabd87928221c28)]
2392
- - add yarn lock [ionlizarazu - [`e1ab28b`](https://github.com/eea/volto-clms-theme/commit/e1ab28b060d5a74431c368b0de82a68dabce1eab)]
2393
2394
  - Jenkinsfile cypress test [ionlizarazu - [`b385d65`](https://github.com/eea/volto-clms-theme/commit/b385d65986f717c60f8c434a08fc11b829d08eb4)]
2394
2395
  - cypress [ionlizarazu - [`a243cf0`](https://github.com/eea/volto-clms-theme/commit/a243cf0182fa3dd113c16ff495c71e310252d83b)]
2395
2396
  - 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.1.23",
3
+ "version": "1.1.25",
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",
@@ -12,6 +12,8 @@ import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
12
12
  import CclRelatedListingView from '@eeacms/volto-clms-theme/components/Blocks/CclRelatedListingBlock/CclRelatedListingView';
13
13
  import { MetadataPaginatedListing } from './MetadataPaginatedListing';
14
14
  import { CclInfoContainer, CclInfoDescription } from '../CclInfoDescription';
15
+ import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
16
+ import { hasBlocksData } from '@plone/volto/helpers';
15
17
 
16
18
  import './datasetinfocontent.less';
17
19
 
@@ -36,6 +38,20 @@ const DataSetInfoContent = (props) => {
36
38
  id,
37
39
  ),
38
40
  );
41
+ dispatch(
42
+ searchContent(
43
+ '',
44
+ {
45
+ portal_type: 'DataSetAccordion',
46
+ review_state: 'published',
47
+ path: location.pathname,
48
+ b_size: 99999,
49
+ metadata_fields: ['blocks', 'blocks_layout'],
50
+ sort_on: 'getObjPositionInParent',
51
+ },
52
+ 'accordions',
53
+ ),
54
+ );
39
55
  }
40
56
  }, [id, UID, dispatch, location]);
41
57
 
@@ -86,6 +102,8 @@ const DataSetInfoContent = (props) => {
86
102
  );
87
103
  };
88
104
 
105
+ let accordionsState = searchSubrequests?.['accordions'] || {};
106
+
89
107
  return (
90
108
  <div>
91
109
  {validation?.data &&
@@ -234,18 +252,17 @@ const DataSetInfoContent = (props) => {
234
252
  </Accordion.Content>
235
253
  </Accordion>
236
254
 
237
- {props.jrc_algorithm?.data &&
238
- props.jrc_algorithm?.data !== '<p><br/><p>' &&
239
- props.jrc_algorithm?.data !== '<p></p>' && (
240
- <Accordion fluid styled>
255
+ {accordionsState?.loaded &&
256
+ accordionsState.items.map((item, key) => (
257
+ <Accordion fluid styled key={key}>
241
258
  <Accordion.Title
242
259
  as={'h2'}
243
- onClick={() => handleClick({ index: 98 })}
244
- active={activeIndex === 98}
245
- index={98}
260
+ onClick={() => handleClick({ index: key })}
261
+ active={activeIndex === key}
262
+ index={key}
246
263
  className={'accordion-title align-arrow-right'}
247
264
  >
248
- {activeIndex.includes(98) ? (
265
+ {activeIndex.includes(key) ? (
249
266
  <Icon
250
267
  name={iconName(data, titleIcons.opened)}
251
268
  size="24px"
@@ -256,105 +273,29 @@ const DataSetInfoContent = (props) => {
256
273
  size="24px"
257
274
  />
258
275
  )}
259
- <span>Algorithm</span>
276
+ <span>{item.title}</span>
260
277
  </Accordion.Title>
261
- <Accordion.Content active={activeIndex.includes(98)}>
278
+ <Accordion.Content active={activeIndex.includes(key)}>
262
279
  <AnimateHeight
263
280
  animateOpacity
264
281
  duration={500}
265
282
  height={'auto'}
266
283
  >
267
- <StringToHTML
268
- string={props.jrc_algorithm?.data || ''}
269
- />
270
- </AnimateHeight>
271
- </Accordion.Content>
272
- </Accordion>
273
- )}
274
-
275
- {props.jrc_quality?.data &&
276
- props.jrc_quality?.data !== '<p><br/><p>' &&
277
- props.jrc_quality?.data !== '<p></p>' && (
278
- <Accordion fluid styled>
279
- <Accordion.Title
280
- as={'h2'}
281
- onClick={() => handleClick({ index: 97 })}
282
- active={activeIndex === 97}
283
- index={97}
284
- className={'accordion-title align-arrow-right'}
285
- >
286
- {activeIndex.includes(97) ? (
287
- <Icon
288
- name={iconName(data, titleIcons.opened)}
289
- size="24px"
290
- />
291
- ) : (
292
- <Icon
293
- name={iconName(data, titleIcons.closed)}
294
- size="24px"
295
- />
296
- )}
297
- <span>Quality</span>
298
- </Accordion.Title>
299
- <Accordion.Content active={activeIndex.includes(97)}>
300
- <AnimateHeight
301
- animateOpacity
302
- duration={500}
303
- height={'auto'}
304
- >
305
- <StringToHTML string={props.jrc_quality?.data || ''} />
306
- </AnimateHeight>
307
- </Accordion.Content>
308
- </Accordion>
309
- )}
310
-
311
- {props.jrc_datalayers?.data &&
312
- props.jrc_datalayers?.data !== '<p><br/><p>' &&
313
- props.jrc_datalayers?.data !== '<p></p>' && (
314
- <Accordion fluid styled>
315
- <Accordion.Title
316
- as={'h2'}
317
- onClick={() => handleClick({ index: 96 })}
318
- active={activeIndex === 96}
319
- index={96}
320
- className={'accordion-title align-arrow-right'}
321
- >
322
- {activeIndex.includes(96) ? (
323
- <Icon
324
- name={iconName(data, titleIcons.opened)}
325
- size="24px"
326
- />
327
- ) : (
328
- <Icon
329
- name={iconName(data, titleIcons.closed)}
330
- size="24px"
331
- />
332
- )}
333
- <span>Datalayers</span>
334
- </Accordion.Title>
335
- <Accordion.Content active={activeIndex.includes(96)}>
336
- <AnimateHeight
337
- animateOpacity
338
- duration={500}
339
- height={'auto'}
340
- >
341
- <StringToHTML
342
- string={props.jrc_datalayers?.data || ''}
343
- />
284
+ {hasBlocksData(item) && <RenderBlocks content={item} />}
344
285
  </AnimateHeight>
345
286
  </Accordion.Content>
346
287
  </Accordion>
347
- )}
288
+ ))}
348
289
 
349
290
  {librariesPending && <Loader active inline="centered" />}
350
291
  {libraries?.length > 0 && (
351
292
  <Accordion fluid styled>
352
293
  <Accordion.Title
353
294
  as={'h2'}
354
- onClick={() => handleClick({ index: 1 })}
295
+ onClick={() => handleClick({ index: 98 })}
355
296
  className={'accordion-title align-arrow-right'}
356
297
  >
357
- {activeIndex.includes(1) ? (
298
+ {activeIndex.includes(98) ? (
358
299
  <Icon
359
300
  name={iconName(data, titleIcons.opened)}
360
301
  size="24px"
@@ -367,7 +308,7 @@ const DataSetInfoContent = (props) => {
367
308
  )}
368
309
  <span>Technical documents</span>
369
310
  </Accordion.Title>
370
- <Accordion.Content active={activeIndex.includes(1)}>
311
+ <Accordion.Content active={activeIndex.includes(98)}>
371
312
  <AnimateHeight
372
313
  animateOpacity
373
314
  duration={500}
@@ -80,15 +80,13 @@ const CLMSCartContent = (props) => {
80
80
  // eslint-disable-next-line react-hooks/exhaustive-deps
81
81
  }, [post_download_in_progress]);
82
82
 
83
- const use_p = useFilteredPagination(cartItems);
83
+ const use_p = useFilteredPagination(cartItems, 10, 'cart');
84
84
  const p_f = use_p.functions;
85
85
  const p_data = use_p.data;
86
86
  const { pagination, currentPage, paginationSize, dataList } = p_data;
87
87
 
88
88
  useEffect(() => {
89
- if (cartItems.length > 0) {
90
- p_f.setOriginalDataList(cartItems);
91
- }
89
+ p_f.setOriginalDataList(cartItems);
92
90
  }, [cartItems]);
93
91
  useEffect(() => {
94
92
  const array_ids =
@@ -455,6 +453,12 @@ const CLMSCartContent = (props) => {
455
453
  <button
456
454
  onClick={() => {
457
455
  removeCartItem(item.unique_id);
456
+ if (
457
+ pagination.length === 1 &&
458
+ currentPage > 1
459
+ ) {
460
+ p_f.setCurrentPage(currentPage - 1);
461
+ }
458
462
  }}
459
463
  style={{
460
464
  backgroundColor: 'transparent',