design-comuni-plone-theme 11.24.2 → 11.24.4

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.
Binary file
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
 
2
2
 
3
+ ## [11.24.4](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.24.3...v11.24.4) (2024-11-07)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * arlogin styles in 992px-1200px media query space ([#802](https://github.com/RedTurtle/design-comuni-plone-theme/issues/802)) ([eebf6e4](https://github.com/RedTurtle/design-comuni-plone-theme/commit/eebf6e4129c021dc361638c940b62b67a5b15739))
9
+ * page freeze when updateSideMenuOnLoadingBlocks=true and page has gallery ([#805](https://github.com/RedTurtle/design-comuni-plone-theme/issues/805)) ([cab333e](https://github.com/RedTurtle/design-comuni-plone-theme/commit/cab333e35dc7faac5fbc61a41fdec02922378b00))
10
+
11
+
12
+ ### Documentation
13
+
14
+ * update docs link in publiccode.yml ([#190](https://github.com/RedTurtle/design-comuni-plone-theme/issues/190)) ([34a35b2](https://github.com/RedTurtle/design-comuni-plone-theme/commit/34a35b2ac7c6301e1bbf22a6109fef8d8135db3f))
15
+ * updated publiccode and release log ([67a062c](https://github.com/RedTurtle/design-comuni-plone-theme/commit/67a062cf007333435046c1b3cf8cf0d34bf59abc))
16
+
17
+ ## [11.24.3](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.24.2...v11.24.3) (2024-10-24)
18
+
19
+
20
+ ### Features
21
+
22
+ * show end of recurrence date instead of end date in event ct when set ([#789](https://github.com/RedTurtle/design-comuni-plone-theme/issues/789)) ([23e06c4](https://github.com/RedTurtle/design-comuni-plone-theme/commit/23e06c4c619d41d780f01a67502082d7603e199e))
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * append / to the end of apiPath because if it hasn't, internal url check for mp4 links fails. ([#794](https://github.com/RedTurtle/design-comuni-plone-theme/issues/794)) ([4f84bc3](https://github.com/RedTurtle/design-comuni-plone-theme/commit/4f84bc31b50b14657d53961ae4e4171e1c68b765))
28
+
29
+
30
+ ### Maintenance
31
+
32
+ * added BE info in release.md bc impacts usability ([#791](https://github.com/RedTurtle/design-comuni-plone-theme/issues/791)) ([b608189](https://github.com/RedTurtle/design-comuni-plone-theme/commit/b60818985b4065035cc9b4015890adfe6dbf86db))
33
+
34
+
35
+ ### Documentation
36
+
37
+ * updated publiccode and release log ([ffe98a5](https://github.com/RedTurtle/design-comuni-plone-theme/commit/ffe98a5896d6efd05ed63ca64f8a58c7282a0030))
38
+
3
39
  ## [11.24.2](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.24.1...v11.24.2) (2024-10-16)
4
40
 
5
41
 
package/RELEASE.md CHANGED
@@ -39,7 +39,23 @@
39
39
  ### Fix
40
40
 
41
41
  - ...
42
- -->
42
+ -->
43
+
44
+ ## Versione 11.24.4 (07/11/2024)
45
+
46
+ ### Fix
47
+
48
+ - Risolto un problema di visualizzazione grafica per il bottone di login all'area personale per alcune specifiche dimensioni di schermi
49
+
50
+ ## Versione 11.24.3 (24/10/2024)
51
+
52
+ ### Migliorie
53
+
54
+ - Quando viene impostata una ricorrenza, nel tipo di contenuto Evento viene mostrata la data di fine della ricorrenza invece che del singolo evento
55
+
56
+ ### Fix
57
+
58
+ - Risolto problema con i video esterni che puntano a degli mp4: ora non vengono più erroneamente visti come link interni.
43
59
 
44
60
  ## Versione 11.24.0 (03/10/2024)
45
61
 
@@ -202,6 +218,10 @@
202
218
 
203
219
  ## Versione 11.12.5 (30/05/2024)
204
220
 
221
+ ### Novità
222
+
223
+ - Per ragioni di conformità alle linee guida Agid, inibito l'inserimento di CT File nella cartella modulistica.
224
+
205
225
  ### Fix
206
226
 
207
227
  - Sistemato il layout "Card con immagine" dei blocchi elenco quando gli elementi non hanno immagine.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "design-comuni-plone-theme",
3
3
  "description": "Volto Theme for Italia design guidelines",
4
4
  "license": "GPL-v3",
5
- "version": "11.24.2",
5
+ "version": "11.24.4",
6
6
  "main": "src/index.js",
7
7
  "repository": {
8
8
  "type": "git",
package/publiccode.yml CHANGED
@@ -20,7 +20,7 @@ logo: docs/logo-io-comune.png
20
20
  description:
21
21
  it:
22
22
  documentation: |-
23
- https://docs.google.com/document/d/1SThuxa_ah0BuNXukWs564kKPfprK41WLQE8Mome-0xg/
23
+ https://docs.google.com/document/d/1BrlGYmE3Z4y6FMIrfBJWOX1P2JVEGzJZS6TRbeIiFSk/edit?tab=t.0
24
24
  features:
25
25
  - PNRR
26
26
  - PNRR/Misura/1.2
@@ -227,9 +227,9 @@ maintenance:
227
227
  name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici
228
228
  platforms:
229
229
  - web
230
- releaseDate: '2024-10-16'
230
+ releaseDate: '2024-11-07'
231
231
  softwareType: standalone/web
232
- softwareVersion: 11.24.2
232
+ softwareVersion: 11.24.4
233
233
  url: 'https://github.com/italia/design-comuni-plone-theme'
234
234
  usedBy:
235
235
  - ASP Comuni Modenesi Area Nord
@@ -9,7 +9,7 @@ import { Button } from 'design-react-kit';
9
9
  const LoginButton = ({ children, baseLoginUrl, size = 'full' }) => {
10
10
  return baseLoginUrl ? (
11
11
  <Button
12
- className="btn-icon"
12
+ className="btn-icon login-button"
13
13
  color="primary"
14
14
  href={baseLoginUrl}
15
15
  icon={false}
@@ -4,7 +4,7 @@ import { rrulei18n } from '@plone/volto/components/manage/Widgets/RecurrenceWidg
4
4
  import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';
5
5
  import { Card, CardTitle, CardBody } from 'design-react-kit';
6
6
  import PropTypes from 'prop-types';
7
- import { viewDate } from 'design-comuni-plone-theme/helpers';
7
+ import { viewDate, getRealEventEnd } from 'design-comuni-plone-theme/helpers';
8
8
 
9
9
  const messages = defineMessages({
10
10
  start: {
@@ -46,19 +46,23 @@ const Dates = ({ content, show_image, moment: momentlib, rrule }) => {
46
46
 
47
47
  const rrulestr = rrule.rrulestr;
48
48
 
49
- let rruleSet = null;
50
49
  let recurrenceText = null;
51
50
 
51
+ const rruleSet = content.recurrence
52
+ ? rrulestr(content?.recurrence, {
53
+ compatible: true, //If set to True, the parser will operate in RFC-compatible mode. Right now it means that unfold will be turned on, and if a DTSTART is found, it will be considered the first recurrence instance, as documented in the RFC.
54
+ forceset: true,
55
+ })
56
+ : null;
57
+
58
+ const actualEndDate = getRealEventEnd(content, rruleSet);
59
+
52
60
  if (content.recurrence) {
53
61
  const isRecurrenceByDay = content.recurrence.includes('BYDAY=+');
54
62
  const isWeekdaySunday = content.recurrence
55
63
  .split('BYDAY')[1]
56
64
  ?.includes('SU');
57
65
  const RRULE_LANGUAGE = rrulei18n(intl, moment);
58
- rruleSet = rrulestr(content.recurrence, {
59
- compatible: true, //If set to True, the parser will operate in RFC-compatible mode. Right now it means that unfold will be turned on, and if a DTSTART is found, it will be considered the first recurrence instance, as documented in the RFC.
60
- forceset: true,
61
- });
62
66
 
63
67
  recurrenceText = rruleSet.rrules()[0]?.toText(
64
68
  (t) => {
@@ -79,7 +83,8 @@ const Dates = ({ content, show_image, moment: momentlib, rrule }) => {
79
83
  );
80
84
  }
81
85
  const start = viewDate(intl.locale, content.start);
82
- const end = viewDate(intl.locale, content.end);
86
+ // format and save date into new variable depending on recurrence of event
87
+ const end = viewDate(intl.locale, actualEndDate);
83
88
  const openEnd = content?.open_end;
84
89
  const wholeDay = content?.whole_day;
85
90
  const rdates = rruleSet?.rdates() ?? [];
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
4
4
 
5
5
  import { rrulei18n } from '@plone/volto/components/manage/Widgets/RecurrenceWidget/Utils';
6
6
  import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';
7
+ import { getRealEventEnd } from 'design-comuni-plone-theme/helpers';
7
8
 
8
9
  const messages = defineMessages({
9
10
  dateStart: {
@@ -25,11 +26,23 @@ const PageHeaderEventDates = ({ content, moment, rrule }) => {
25
26
  Moment.locale(intl.locale);
26
27
 
27
28
  const rrulestr = rrule.rrulestr;
29
+
30
+ const rruleSet = content.recurrence
31
+ ? rrulestr(content?.recurrence, {
32
+ compatible: true, //If set to True, the parser will operate in RFC-compatible mode. Right now it means that unfold will be turned on, and if a DTSTART is found, it will be considered the first recurrence instance, as documented in the RFC.
33
+ forceset: true,
34
+ })
35
+ : null;
36
+
37
+ const actualEndDate = getRealEventEnd(content, rruleSet);
38
+
28
39
  const wholeDay = content?.whole_day;
29
40
  const openEnd = content?.open_end;
41
+ // show only start when event starts and ends in same day or if a recurrence is set
42
+ // because to set a recurrence, the event must have the same date as start and end date
30
43
  const renderOnlyStart =
31
44
  Moment(content.end).format('DD-MM-Y') ===
32
- Moment(content.start).format('DD-MM-Y');
45
+ Moment(content.start).format('DD-MM-Y') && !content.recurrence;
33
46
  let eventRecurrenceText = null;
34
47
 
35
48
  if (content['@type'] === 'Event') {
@@ -38,10 +51,7 @@ const PageHeaderEventDates = ({ content, moment, rrule }) => {
38
51
  const isWeekdaySunday = content.recurrence
39
52
  .split('BYDAY')[1]
40
53
  ?.includes('SU');
41
- const rruleSet = rrulestr(content.recurrence, {
42
- compatible: true, //If set to True, the parser will operate in RFC-compatible mode. Right now it means that unfold will be turned on, and if a DTSTART is found, it will be considered the first recurrence instance, as documented in the RFC.
43
- forceset: true,
44
- });
54
+
45
55
  const RRULE_LANGUAGE = rrulei18n(intl, Moment);
46
56
  eventRecurrenceText = rruleSet.rrules()[0]?.toText(
47
57
  (t) => {
@@ -55,6 +65,7 @@ const PageHeaderEventDates = ({ content, moment, rrule }) => {
55
65
  RRULE_LANGUAGE.strings['on the'] = 'la';
56
66
  }
57
67
  }
68
+
58
69
  return RRULE_LANGUAGE.strings[t];
59
70
  },
60
71
  RRULE_LANGUAGE,
@@ -62,15 +73,19 @@ const PageHeaderEventDates = ({ content, moment, rrule }) => {
62
73
  );
63
74
  }
64
75
  }
76
+
77
+ // format and save date into new variable depending on recurrence of event
78
+ const endDate = Moment(actualEndDate).format('DD-MM-Y');
79
+
65
80
  return content['@type'] === 'Event' ? (
66
81
  <p className="h4 py-2">
67
- {!wholeDay &&
82
+ {!Moment(content.end).isSame(actualEndDate) &&
68
83
  !openEnd &&
69
84
  !renderOnlyStart &&
70
- `dal ${Moment(content.start).format('DD-MM-Y')} al ${Moment(
71
- content.end,
72
- ).format('DD-MM-Y')}`}
73
- {(wholeDay || renderOnlyStart) &&
85
+ `dal ${Moment(content.start).format('DD-MM-Y')} al ${endDate}`}
86
+ {(wholeDay ||
87
+ renderOnlyStart ||
88
+ Moment(content.end).isSame(actualEndDate)) &&
74
89
  !openEnd &&
75
90
  `${Moment(content.start).format('DD-MM-Y')}`}
76
91
  {openEnd &&
@@ -67,9 +67,8 @@ export const useSideMenu = (content, documentBody) => {
67
67
  }
68
68
  if (observer) {
69
69
  observer.observe(documentBody.current, {
70
- //attributes: true,
71
70
  childList: true,
72
- subtree: true,
71
+ //subtree: true, //commentato, perchè a noi interessano solo i figli di primo livello. Con questo abilitato, se in pagina ci sono delle gallery si impalla il browser
73
72
  });
74
73
  }
75
74
  return () => {
@@ -74,6 +74,11 @@ const Body = ({ data, isEditMode }) => {
74
74
  ref: ref,
75
75
  };
76
76
 
77
+ let apiPath = config.settings.apiPath;
78
+ if (!apiPath.endsWith('/')) {
79
+ apiPath += '/';
80
+ }
81
+
77
82
  return (
78
83
  <>
79
84
  {data.url && (
@@ -105,10 +110,7 @@ const Body = ({ data, isEditMode }) => {
105
110
  <video
106
111
  src={
107
112
  isInternalURL(
108
- data.url.replace(
109
- getParentUrl(config.settings.apiPath),
110
- '',
111
- ),
113
+ data.url.replace(getParentUrl(apiPath), ''),
112
114
  )
113
115
  ? `${data.url}${
114
116
  data.url.indexOf('@@download/file') < 0
@@ -11,8 +11,8 @@ export const viewDate = (locale, value, format) => {
11
11
  ? // Since we assume UTC everywhere, then transform to local (momentjs default)
12
12
  moment(value)
13
13
  : value.match(/T(.)/g)
14
- ? moment(`${value}Z`) // This might happen in old Plone versions dates
15
- : moment(value); //This when date is like '2021-05-05'
14
+ ? moment(`${value}Z`) // This might happen in old Plone versions dates
15
+ : moment(value); //This when date is like '2021-05-05'
16
16
  } else {
17
17
  datetime = moment(value);
18
18
  }
@@ -45,3 +45,11 @@ export const getRealStartAndEndWithRecurrence = (
45
45
  ),
46
46
  };
47
47
  };
48
+
49
+ export const getRealEventEnd = (content, rruleSet) => {
50
+ let actualEndDate = content.end;
51
+ if (content.recurrence) {
52
+ actualEndDate = rruleSet.rrules()[0].options.until;
53
+ }
54
+ return actualEndDate;
55
+ };
@@ -21,6 +21,7 @@ export { getItemsByPath } from 'design-comuni-plone-theme/helpers/getItemsByPath
21
21
  export {
22
22
  viewDate,
23
23
  getRealStartAndEndWithRecurrence,
24
+ getRealEventEnd,
24
25
  } from 'design-comuni-plone-theme/helpers/dates';
25
26
  export { getSiteProperty } from 'design-comuni-plone-theme/helpers/config';
26
27
  export { useDebouncedEffect } from 'design-comuni-plone-theme/helpers/debounce';
@@ -381,3 +381,13 @@ iframe {
381
381
  }
382
382
  }
383
383
  }
384
+
385
+ .public-ui
386
+ .it-header-slim-wrapper
387
+ .it-header-slim-wrapper-content
388
+ .it-header-slim-right-zone.header-slim-right-zone
389
+ .login-button {
390
+ @media (min-width: #{map-get($grid-breakpoints, md)}) and (max-width:#{map-get($grid-breakpoints, xl)}) {
391
+ flex: unset;
392
+ }
393
+ }