design-comuni-plone-theme 11.25.4 → 11.26.0
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/.github/workflows/npm.yml +1 -1
- package/.yarn/cache/cross-spawn-npm-7.0.6-264bddf921-8d306efaca.zip +0 -0
- package/.yarn/cache/nanoid-npm-3.3.8-d22226208b-dfe0adbc0c.zip +0 -0
- package/.yarn/cache/{volto-blocks-widget-npm-3.4.1-c4d451e2c2-4f5c183698.zip → volto-blocks-widget-npm-3.4.3-d7e305af36-68490569a4.zip} +0 -0
- package/.yarn/cache/{volto-feedback-npm-0.3.2-ff5b075c7c-bfc7951ca5.zip → volto-feedback-npm-0.5.2-c3471099a1-48c0763678.zip} +0 -0
- package/.yarn/cache/volto-gdpr-privacy-npm-2.2.12-fbc24c3b6f-ba1b9c0127.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +38 -0
- package/RELEASE.md +19 -0
- package/locales/de/LC_MESSAGES/volto.po +5 -0
- package/locales/en/LC_MESSAGES/volto.po +5 -0
- package/locales/es/LC_MESSAGES/volto.po +5 -0
- package/locales/fr/LC_MESSAGES/volto.po +5 -0
- package/locales/it/LC_MESSAGES/volto.po +5 -0
- package/locales/volto.pot +6 -1
- package/package.json +4 -4
- package/publiccode.yml +2 -2
- package/src/components/ItaliaTheme/Blocks/Calendar/Body.jsx +1 -0
- package/src/components/ItaliaTheme/Blocks/Common/SearchFilters/SelectFilter.jsx +9 -3
- package/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js +1 -0
- package/src/components/ItaliaTheme/Cards/CardCategory.jsx +2 -3
- package/src/components/ItaliaTheme/View/Commons/Dates.jsx +16 -16
- package/src/components/ItaliaTheme/View/Commons/PageHeader/PageHeaderEventDates.jsx +30 -8
- package/src/customizations/volto/actions/vocabularies/vocabularies.js +6 -2
- package/src/customizations/volto/components/manage/Blocks/Search/SearchBlockView.jsx +9 -15
- package/src/customizations/volto/components/manage/Blocks/Search/schema.js +16 -0
- package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +4 -7
- package/src/customizations/volto-form-block/components/View.jsx +11 -10
- package/src/helpers/dates.js +21 -1
- package/src/helpers/index.js +1 -0
- package/src/theme/ItaliaTheme/Blocks/_contacts.scss +5 -12
- package/src/theme/ItaliaTheme/Print/_all_pages.scss +98 -15
- package/src/theme/ItaliaTheme/Print/_blocks.scss +903 -8
- package/src/theme/ItaliaTheme/Print/_page.scss +0 -6
- package/src/theme/ItaliaTheme/_main.scss +3 -0
- package/src/theme/_cms-ui.scss +58 -0
- package/src/theme/bootstrap-override/bootstrap/_print.scss +1 -0
- package/src/theme/bootstrap-override/bootstrap-italia/_card.scss +12 -2
- package/src/theme/extras/_tables.scss +12 -13
- package/src/theme/site.scss +0 -2
- package/.yarn/cache/cross-spawn-npm-7.0.3-e4ff3e65b3-671cc7c728.zip +0 -0
- package/.yarn/cache/nanoid-npm-3.3.6-e6d6ae7e71-7d0eda6570.zip +0 -0
- package/.yarn/cache/volto-gdpr-privacy-npm-2.2.9-a1e4258e06-fe530fe8ee.zip +0 -0
- package/src/theme/ItaliaTheme/Print/_bandi.scss +0 -9
- package/src/theme/ItaliaTheme/Print/_news_items.scss +0 -19
|
@@ -36,7 +36,7 @@ jobs:
|
|
|
36
36
|
run: |
|
|
37
37
|
curl --fail --request POST \
|
|
38
38
|
--form token=${{ secrets.TOKEN }} \
|
|
39
|
-
--form ref=
|
|
39
|
+
--form ref=3.2.x \
|
|
40
40
|
--form "variables[ADDON_NAME]=design-comuni-plone-theme" \
|
|
41
41
|
--form "variables[ADDON_TAG]=${{ steps.get_version.outputs.VERSION }}" \
|
|
42
42
|
"https://gitlab.com/api/v4/projects/${{ secrets.PROJECT_ID }}/trigger/pipeline"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [11.26.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.25.4...v11.26.0) (2024-12-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* added information on recurrence exception dates in event subtitle ([#830](https://github.com/RedTurtle/design-comuni-plone-theme/issues/830)) ([f9d7f09](https://github.com/RedTurtle/design-comuni-plone-theme/commit/f9d7f09f763ad6214bbd35fa5e890a4e192056a2))
|
|
9
|
+
* added usePloneRanking option in Search Block ([#820](https://github.com/RedTurtle/design-comuni-plone-theme/issues/820)) ([7b12ae3](https://github.com/RedTurtle/design-comuni-plone-theme/commit/7b12ae399db201acedbbd8321b3338a08e59722a))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* "ci: fix npm release script" ([ac69380](https://github.com/RedTurtle/design-comuni-plone-theme/commit/ac6938038a8341cae08a7cc45b1effc8c7afd37e))
|
|
15
|
+
* a11y in cms-ui and links color in cms-ui ([#840](https://github.com/RedTurtle/design-comuni-plone-theme/issues/840)) ([9965f50](https://github.com/RedTurtle/design-comuni-plone-theme/commit/9965f50f50a6df38aa8cd59bd646f2e2a2061f53))
|
|
16
|
+
* backport from https://github.com/collective/volto-form-block/pull/122 ([#834](https://github.com/RedTurtle/design-comuni-plone-theme/issues/834)) ([8312f5e](https://github.com/RedTurtle/design-comuni-plone-theme/commit/8312f5e60c695cfe2bf0ebc8aced4ec5a83a8055))
|
|
17
|
+
* cambiato colore del font per il pulsante creato con draftJS ([#836](https://github.com/RedTurtle/design-comuni-plone-theme/issues/836)) ([ef62472](https://github.com/RedTurtle/design-comuni-plone-theme/commit/ef62472607aee7aadba01f951ac1709193000e1e))
|
|
18
|
+
* changed conditions for date range in header subtitle for ct event ([#825](https://github.com/RedTurtle/design-comuni-plone-theme/issues/825)) ([bfc673d](https://github.com/RedTurtle/design-comuni-plone-theme/commit/bfc673df227d556e2e7d54d9bf36ed9a99c1b916))
|
|
19
|
+
* default sort for day-items in Calendar block ([#846](https://github.com/RedTurtle/design-comuni-plone-theme/issues/846)) ([be2f1df](https://github.com/RedTurtle/design-comuni-plone-theme/commit/be2f1df9efbe92b1c4703a1899392de76abf9307))
|
|
20
|
+
* default volto-blocks-widget text block if slate enabled ([#832](https://github.com/RedTurtle/design-comuni-plone-theme/issues/832)) ([43fc8f2](https://github.com/RedTurtle/design-comuni-plone-theme/commit/43fc8f298e154b5542228b579fe6b0062904b0c9))
|
|
21
|
+
* read waiting_list from right data structure ([#835](https://github.com/RedTurtle/design-comuni-plone-theme/issues/835)) ([ef05c69](https://github.com/RedTurtle/design-comuni-plone-theme/commit/ef05c6953979f70687389329a95090f90d276238))
|
|
22
|
+
* removed no_value option from recurrence widget ([#827](https://github.com/RedTurtle/design-comuni-plone-theme/issues/827)) ([0581d8b](https://github.com/RedTurtle/design-comuni-plone-theme/commit/0581d8b5289a5a1c42dd7601e64c194df6604e13))
|
|
23
|
+
* removed query b_size limit for event_location vocabulary ([#843](https://github.com/RedTurtle/design-comuni-plone-theme/issues/843)) ([0116482](https://github.com/RedTurtle/design-comuni-plone-theme/commit/0116482c3506169ed43c48a5e7bc624332d61602))
|
|
24
|
+
* set icon title in CardCategory with content-type name ([#831](https://github.com/RedTurtle/design-comuni-plone-theme/issues/831)) ([ea6e668](https://github.com/RedTurtle/design-comuni-plone-theme/commit/ea6e668f91dba25e43be1490c9ee8042640098f4))
|
|
25
|
+
* ssr conditional embed ([#839](https://github.com/RedTurtle/design-comuni-plone-theme/issues/839)) ([e369991](https://github.com/RedTurtle/design-comuni-plone-theme/commit/e369991fc3a161e6a5697f91c9b0e2c693fb88b7))
|
|
26
|
+
* start date in recurrences ([#845](https://github.com/RedTurtle/design-comuni-plone-theme/issues/845)) ([18777b4](https://github.com/RedTurtle/design-comuni-plone-theme/commit/18777b4580b94cb3ca72aff852b6d9b506314634))
|
|
27
|
+
* table styles in edit mode ([#826](https://github.com/RedTurtle/design-comuni-plone-theme/issues/826)) ([ebef417](https://github.com/RedTurtle/design-comuni-plone-theme/commit/ebef41700558395b5367740cbbdbd6770ea89216))
|
|
28
|
+
* updated print styles ([#838](https://github.com/RedTurtle/design-comuni-plone-theme/issues/838)) ([52fce57](https://github.com/RedTurtle/design-comuni-plone-theme/commit/52fce573fd521deea579744bb6e44f9060bf9d59))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Maintenance
|
|
32
|
+
|
|
33
|
+
* **deps:** bump cross-spawn from 7.0.3 to 7.0.6 ([#807](https://github.com/RedTurtle/design-comuni-plone-theme/issues/807)) ([0e4293d](https://github.com/RedTurtle/design-comuni-plone-theme/commit/0e4293d8b11c2c6a1bcdb529a037874e93068142))
|
|
34
|
+
* **deps:** bump nanoid from 3.3.6 to 3.3.8 ([#837](https://github.com/RedTurtle/design-comuni-plone-theme/issues/837)) ([0b2de95](https://github.com/RedTurtle/design-comuni-plone-theme/commit/0b2de959496f767fdf7dd9e80f3e23fd3774225d))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Documentation
|
|
38
|
+
|
|
39
|
+
* updated publiccode and release log ([ef94ad6](https://github.com/RedTurtle/design-comuni-plone-theme/commit/ef94ad6577531df4fefdd3e85a3b328dbfdeac26))
|
|
40
|
+
|
|
3
41
|
## [11.25.4](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.25.3...v11.25.4) (2024-12-16)
|
|
4
42
|
|
|
5
43
|
|
package/RELEASE.md
CHANGED
|
@@ -41,6 +41,25 @@
|
|
|
41
41
|
- ...
|
|
42
42
|
-->
|
|
43
43
|
|
|
44
|
+
## Versione 11.26.0 (20/12/2024)
|
|
45
|
+
|
|
46
|
+
### Migliorie
|
|
47
|
+
|
|
48
|
+
- Se vengono aggiunte o rimosse date dalla ricorrenza di un CT evento, nel sottotitolo viene aggiunta l'indicazione di controllare le eccezioni nella sezione apposita.
|
|
49
|
+
- Il sottotitolo del CT Evento mostra il range di date per tutti gli eventi con ricorrenza o con una data di fine diversa dalla data di inizio.
|
|
50
|
+
- Sistemata l'accessibilità riguardante il focus lato operatore.
|
|
51
|
+
|
|
52
|
+
### Novità
|
|
53
|
+
|
|
54
|
+
- Nel blocco 'Cerca' è stata aggiunta l'opzione "Usa l'ordinamento dei risultati di Plone" nella sezione 'Controlli'.
|
|
55
|
+
|
|
56
|
+
### Fix
|
|
57
|
+
|
|
58
|
+
- Il menu a tendina da cui è possibile filtrare i luoghi nel blocco Ricerca Eventi mostra tutti i luoghi collegati agli eventi presenti nel percorso selezionato dalla Sidebar, senza limitarne il numero.
|
|
59
|
+
- Risolto un problema con il colore del testo del bottone nell'editor.
|
|
60
|
+
- Rimossa l'opzione non selezionabile "nessun valore" dal widget ricorrenza.
|
|
61
|
+
- La pagina non dà più errore quando si imposta una ricorrenza con impostazione "Termina dopo tot. ricorrenze".
|
|
62
|
+
|
|
44
63
|
## Versione 11.25.3 (12/12/2024)
|
|
45
64
|
|
|
46
65
|
### Migliorie
|
|
@@ -1998,6 +1998,11 @@ msgstr ""
|
|
|
1998
1998
|
msgid "exceeded_chars"
|
|
1999
1999
|
msgstr ""
|
|
2000
2000
|
|
|
2001
|
+
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderEventDates
|
|
2002
|
+
# defaultMessage: con alcune eccezioni. Per maggiori informazioni controllare la sezione dedicata.
|
|
2003
|
+
msgid "exceptionDates"
|
|
2004
|
+
msgstr ""
|
|
2005
|
+
|
|
2001
2006
|
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderDates
|
|
2002
2007
|
# defaultMessage: Scadenza
|
|
2003
2008
|
msgid "expire"
|
|
@@ -1983,6 +1983,11 @@ msgstr "Read more"
|
|
|
1983
1983
|
msgid "exceeded_chars"
|
|
1984
1984
|
msgstr ""
|
|
1985
1985
|
|
|
1986
|
+
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderEventDates
|
|
1987
|
+
# defaultMessage: con alcune eccezioni. Per maggiori informazioni controllare la sezione dedicata.
|
|
1988
|
+
msgid "exceptionDates"
|
|
1989
|
+
msgstr "with some exceptions. Please see the dedicated section for more information."
|
|
1990
|
+
|
|
1986
1991
|
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderDates
|
|
1987
1992
|
# defaultMessage: Scadenza
|
|
1988
1993
|
msgid "expire"
|
|
@@ -1992,6 +1992,11 @@ msgstr ""
|
|
|
1992
1992
|
msgid "exceeded_chars"
|
|
1993
1993
|
msgstr "El texto excede la longitud recomendada"
|
|
1994
1994
|
|
|
1995
|
+
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderEventDates
|
|
1996
|
+
# defaultMessage: con alcune eccezioni. Per maggiori informazioni controllare la sezione dedicata.
|
|
1997
|
+
msgid "exceptionDates"
|
|
1998
|
+
msgstr ""
|
|
1999
|
+
|
|
1995
2000
|
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderDates
|
|
1996
2001
|
# defaultMessage: Scadenza
|
|
1997
2002
|
msgid "expire"
|
|
@@ -2000,6 +2000,11 @@ msgstr ""
|
|
|
2000
2000
|
msgid "exceeded_chars"
|
|
2001
2001
|
msgstr ""
|
|
2002
2002
|
|
|
2003
|
+
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderEventDates
|
|
2004
|
+
# defaultMessage: con alcune eccezioni. Per maggiori informazioni controllare la sezione dedicata.
|
|
2005
|
+
msgid "exceptionDates"
|
|
2006
|
+
msgstr ""
|
|
2007
|
+
|
|
2003
2008
|
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderDates
|
|
2004
2009
|
# defaultMessage: Scadenza
|
|
2005
2010
|
msgid "expire"
|
|
@@ -1983,6 +1983,11 @@ msgstr "Leggi di più"
|
|
|
1983
1983
|
msgid "exceeded_chars"
|
|
1984
1984
|
msgstr "Il testo supera la lunghezza consigliata perciò verrà tagliato."
|
|
1985
1985
|
|
|
1986
|
+
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderEventDates
|
|
1987
|
+
# defaultMessage: con alcune eccezioni. Per maggiori informazioni controllare la sezione dedicata.
|
|
1988
|
+
msgid "exceptionDates"
|
|
1989
|
+
msgstr "con alcune eccezioni. Per maggiori informazioni controllare la sezione dedicata."
|
|
1990
|
+
|
|
1986
1991
|
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderDates
|
|
1987
1992
|
# defaultMessage: Scadenza
|
|
1988
1993
|
msgid "expire"
|
package/locales/volto.pot
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
msgid ""
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Plone\n"
|
|
4
|
-
"POT-Creation-Date: 2024-
|
|
4
|
+
"POT-Creation-Date: 2024-12-12T10:58:07.184Z\n"
|
|
5
5
|
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
6
6
|
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
7
7
|
"MIME-Version: 1.0\n"
|
|
@@ -1985,6 +1985,11 @@ msgstr ""
|
|
|
1985
1985
|
msgid "exceeded_chars"
|
|
1986
1986
|
msgstr ""
|
|
1987
1987
|
|
|
1988
|
+
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderEventDates
|
|
1989
|
+
# defaultMessage: con alcune eccezioni. Per maggiori informazioni controllare la sezione dedicata.
|
|
1990
|
+
msgid "exceptionDates"
|
|
1991
|
+
msgstr ""
|
|
1992
|
+
|
|
1988
1993
|
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderDates
|
|
1989
1994
|
# defaultMessage: Scadenza
|
|
1990
1995
|
msgid "expire"
|
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.
|
|
5
|
+
"version": "11.26.0",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -147,13 +147,13 @@
|
|
|
147
147
|
"typeface-lora": "0.0.72",
|
|
148
148
|
"typeface-roboto-mono": "0.0.75",
|
|
149
149
|
"typeface-titillium-web": "0.0.72",
|
|
150
|
-
"volto-blocks-widget": "3.4.
|
|
150
|
+
"volto-blocks-widget": "3.4.3",
|
|
151
151
|
"volto-data-grid-widget": "2.3.1",
|
|
152
152
|
"volto-dropdownmenu": "4.1.3",
|
|
153
153
|
"volto-editablefooter": "5.1.7",
|
|
154
|
-
"volto-feedback": "0.
|
|
154
|
+
"volto-feedback": "0.5.2",
|
|
155
155
|
"volto-form-block": "3.10.0",
|
|
156
|
-
"volto-gdpr-privacy": "2.2.
|
|
156
|
+
"volto-gdpr-privacy": "2.2.12",
|
|
157
157
|
"volto-google-analytics": "2.0.0",
|
|
158
158
|
"volto-multilingual-widget": "3.2.1",
|
|
159
159
|
"volto-querywidget-with-browser": "0.4.2",
|
package/publiccode.yml
CHANGED
|
@@ -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-12-
|
|
230
|
+
releaseDate: '2024-12-20'
|
|
231
231
|
softwareType: standalone/web
|
|
232
|
-
softwareVersion: 11.
|
|
232
|
+
softwareVersion: 11.26.0
|
|
233
233
|
url: 'https://github.com/italia/design-comuni-plone-theme'
|
|
234
234
|
usedBy:
|
|
235
235
|
- ASP Comuni Modenesi Area Nord
|
|
@@ -123,6 +123,7 @@ const Body = ({ data, block, inEditMode, path, onChangeBlock, reactSlick }) => {
|
|
|
123
123
|
const adaptedQuery = Object.assign(
|
|
124
124
|
{
|
|
125
125
|
fullobjects: 1,
|
|
126
|
+
sort_on: !Object.keys(_querystring).includes('sort_on') ? 'start' : null,
|
|
126
127
|
},
|
|
127
128
|
...copyFields.map((name) =>
|
|
128
129
|
Object.keys(_querystring).includes(name)
|
|
@@ -11,6 +11,7 @@ const SelectFilter = ({
|
|
|
11
11
|
onChange,
|
|
12
12
|
placeholder,
|
|
13
13
|
isSearchable = false,
|
|
14
|
+
optionsQuerySize = 25,
|
|
14
15
|
}) => {
|
|
15
16
|
const dispatch = useDispatch();
|
|
16
17
|
|
|
@@ -52,15 +53,20 @@ const SelectFilter = ({
|
|
|
52
53
|
);
|
|
53
54
|
}
|
|
54
55
|
} else if (options.vocabulary) {
|
|
55
|
-
dispatch(
|
|
56
|
+
dispatch(
|
|
57
|
+
getVocabulary({
|
|
58
|
+
vocabNameOrURL: options.vocabulary,
|
|
59
|
+
size: optionsQuerySize,
|
|
60
|
+
}),
|
|
61
|
+
);
|
|
56
62
|
}
|
|
57
63
|
}, []);
|
|
58
64
|
|
|
59
65
|
const select_options = options?.choices
|
|
60
66
|
? options.choices
|
|
61
67
|
: options?.vocabulary
|
|
62
|
-
|
|
63
|
-
|
|
68
|
+
? vocabularies?.[options.vocabulary]?.items
|
|
69
|
+
: selectOptions;
|
|
64
70
|
|
|
65
71
|
return (
|
|
66
72
|
<div className="me-lg-3 my-2 my-lg-1 filter-wrapper select-filter">
|
|
@@ -38,9 +38,8 @@ const CardCategory = (props) => {
|
|
|
38
38
|
const categoryText = !href && children && (
|
|
39
39
|
<span className="text">{children}</span>
|
|
40
40
|
);
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
);
|
|
41
|
+
const iconTitle = rest.title || intl.formatMessage(messages.categoryIcon);
|
|
42
|
+
const categoryIcon = iconName && <Icon icon={iconName} title={iconTitle} />;
|
|
44
43
|
|
|
45
44
|
return (
|
|
46
45
|
<div className={classes} {...rest}>
|
|
@@ -4,7 +4,11 @@ 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 {
|
|
7
|
+
import {
|
|
8
|
+
viewDate,
|
|
9
|
+
getRealEventEnd,
|
|
10
|
+
getRecurrenceExceptionDates,
|
|
11
|
+
} from 'design-comuni-plone-theme/helpers';
|
|
8
12
|
|
|
9
13
|
const messages = defineMessages({
|
|
10
14
|
start: {
|
|
@@ -85,16 +89,12 @@ const Dates = ({ content, show_image, moment: momentlib, rrule }) => {
|
|
|
85
89
|
const start = viewDate(intl.locale, content.start);
|
|
86
90
|
// format and save date into new variable depending on recurrence of event
|
|
87
91
|
const end = viewDate(intl.locale, actualEndDate);
|
|
92
|
+
|
|
88
93
|
const openEnd = content?.open_end;
|
|
89
94
|
const wholeDay = content?.whole_day;
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
const isExdate = exdates.some((b) => b.toString() === curr.toString());
|
|
94
|
-
if (!isExdate) {
|
|
95
|
-
return [...acc, curr];
|
|
96
|
-
} else return acc;
|
|
97
|
-
}, []);
|
|
95
|
+
|
|
96
|
+
const { additionalDates, removedDates } =
|
|
97
|
+
getRecurrenceExceptionDates(rruleSet);
|
|
98
98
|
|
|
99
99
|
return content ? (
|
|
100
100
|
<>
|
|
@@ -133,11 +133,11 @@ const Dates = ({ content, show_image, moment: momentlib, rrule }) => {
|
|
|
133
133
|
<div className="point-list">
|
|
134
134
|
<div className="point-list-aside point-list-warning">
|
|
135
135
|
<span className="point-date font-monospace">
|
|
136
|
-
{end
|
|
136
|
+
{end?.format('DD')}
|
|
137
137
|
</span>
|
|
138
|
-
<span className="point-month">{end
|
|
139
|
-
{!end
|
|
140
|
-
<span className="point-month">{end
|
|
138
|
+
<span className="point-month">{end?.format('MMMM')}</span>
|
|
139
|
+
{!end?.isSame(start, 'year') && (
|
|
140
|
+
<span className="point-month">{end?.format('YYYY')}</span>
|
|
141
141
|
)}
|
|
142
142
|
</div>
|
|
143
143
|
<div className="point-list-content">
|
|
@@ -148,7 +148,7 @@ const Dates = ({ content, show_image, moment: momentlib, rrule }) => {
|
|
|
148
148
|
>
|
|
149
149
|
<CardBody tag="div" className={'card-body'}>
|
|
150
150
|
<CardTitle tag="p">
|
|
151
|
-
{!content.whole_day && `${end
|
|
151
|
+
{!content.whole_day && `${end?.format('HH:mm')} - `}
|
|
152
152
|
{intl.formatMessage(messages.end)}
|
|
153
153
|
</CardTitle>
|
|
154
154
|
</CardBody>
|
|
@@ -172,10 +172,10 @@ const Dates = ({ content, show_image, moment: momentlib, rrule }) => {
|
|
|
172
172
|
))}
|
|
173
173
|
</div>
|
|
174
174
|
)}
|
|
175
|
-
{
|
|
175
|
+
{removedDates.length > 0 && (
|
|
176
176
|
<div className="mt-4">
|
|
177
177
|
<h5>{intl.formatMessage(messages.excluded_dates)}</h5>
|
|
178
|
-
{
|
|
178
|
+
{removedDates.map((exDate) => (
|
|
179
179
|
<div className="font-serif">
|
|
180
180
|
{viewDate(intl.locale, exDate, 'dddd DD MMMM YYYY')}
|
|
181
181
|
</div>
|
|
@@ -4,13 +4,21 @@ 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 {
|
|
7
|
+
import {
|
|
8
|
+
getRealEventEnd,
|
|
9
|
+
getRecurrenceExceptionDates,
|
|
10
|
+
} from 'design-comuni-plone-theme/helpers';
|
|
8
11
|
|
|
9
12
|
const messages = defineMessages({
|
|
10
13
|
dateStart: {
|
|
11
14
|
id: 'dal {dateStart} fino a conclusione',
|
|
12
15
|
defaultMessage: 'dal {dateStart} fino a conclusione',
|
|
13
16
|
},
|
|
17
|
+
exceptionDates: {
|
|
18
|
+
id: 'exceptionDates',
|
|
19
|
+
defaultMessage:
|
|
20
|
+
'con alcune eccezioni. Per maggiori informazioni controllare la sezione dedicata.',
|
|
21
|
+
},
|
|
14
22
|
});
|
|
15
23
|
|
|
16
24
|
/**
|
|
@@ -36,18 +44,20 @@ const PageHeaderEventDates = ({ content, moment, rrule }) => {
|
|
|
36
44
|
|
|
37
45
|
const actualEndDate = getRealEventEnd(content, rruleSet);
|
|
38
46
|
|
|
39
|
-
const wholeDay = content?.whole_day;
|
|
47
|
+
// const wholeDay = content?.whole_day;
|
|
40
48
|
const openEnd = content?.open_end;
|
|
41
49
|
// show only start when event starts and ends in same day or if a recurrence is set
|
|
42
50
|
// because to set a recurrence, the event must have the same date as start and end date
|
|
43
51
|
const renderOnlyStart =
|
|
44
52
|
Moment(content.end).format('DD-MM-Y') ===
|
|
45
|
-
|
|
53
|
+
Moment(content.start).format('DD-MM-Y');
|
|
54
|
+
|
|
46
55
|
let eventRecurrenceText = null;
|
|
47
56
|
|
|
48
57
|
if (content['@type'] === 'Event') {
|
|
49
58
|
if (content.recurrence) {
|
|
50
59
|
const isRecurrenceByDay = content.recurrence.includes('BYDAY=+');
|
|
60
|
+
const isRecurrenceByMonthDay = content.recurrence.includes('BYMONTHDAY=');
|
|
51
61
|
const isWeekdaySunday = content.recurrence
|
|
52
62
|
.split('BYDAY')[1]
|
|
53
63
|
?.includes('SU');
|
|
@@ -55,7 +65,10 @@ const PageHeaderEventDates = ({ content, moment, rrule }) => {
|
|
|
55
65
|
const RRULE_LANGUAGE = rrulei18n(intl, Moment);
|
|
56
66
|
eventRecurrenceText = rruleSet.rrules()[0]?.toText(
|
|
57
67
|
(t) => {
|
|
58
|
-
if (
|
|
68
|
+
if (
|
|
69
|
+
Moment.locale(intl.locale) === 'it' &&
|
|
70
|
+
(isRecurrenceByDay || isRecurrenceByMonthDay)
|
|
71
|
+
) {
|
|
59
72
|
RRULE_LANGUAGE.strings.th = '°';
|
|
60
73
|
RRULE_LANGUAGE.strings.nd = '°';
|
|
61
74
|
RRULE_LANGUAGE.strings.rd = '°';
|
|
@@ -77,13 +90,17 @@ const PageHeaderEventDates = ({ content, moment, rrule }) => {
|
|
|
77
90
|
// format and save date into new variable depending on recurrence of event
|
|
78
91
|
const endDate = Moment(actualEndDate).format('DD-MM-Y');
|
|
79
92
|
|
|
93
|
+
// check if there are exception dates added to the recurrence to add info
|
|
94
|
+
const { additionalDates, removedDates } =
|
|
95
|
+
getRecurrenceExceptionDates(rruleSet);
|
|
96
|
+
|
|
80
97
|
return content['@type'] === 'Event' ? (
|
|
81
98
|
<p className="h4 py-2">
|
|
82
|
-
{
|
|
99
|
+
{(content.recurrence || !renderOnlyStart) &&
|
|
83
100
|
!openEnd &&
|
|
84
|
-
!renderOnlyStart &&
|
|
85
101
|
`dal ${Moment(content.start).format('DD-MM-Y')} al ${endDate}`}
|
|
86
|
-
{
|
|
102
|
+
{!content.recurrence &&
|
|
103
|
+
renderOnlyStart &&
|
|
87
104
|
!openEnd &&
|
|
88
105
|
`${Moment(content.start).format('DD-MM-Y')}`}
|
|
89
106
|
{openEnd &&
|
|
@@ -91,7 +108,12 @@ const PageHeaderEventDates = ({ content, moment, rrule }) => {
|
|
|
91
108
|
dateStart: `${Moment(content.start).format('DD-MM-Y')}`,
|
|
92
109
|
})}
|
|
93
110
|
{eventRecurrenceText && (
|
|
94
|
-
<div className="recurrence small">
|
|
111
|
+
<div className="recurrence small">
|
|
112
|
+
<span>{eventRecurrenceText}</span>
|
|
113
|
+
{(additionalDates.length > 0 || removedDates.length > 0) && (
|
|
114
|
+
<span> {intl.formatMessage(messages.exceptionDates)}</span>
|
|
115
|
+
)}
|
|
116
|
+
</div>
|
|
95
117
|
)}
|
|
96
118
|
</p>
|
|
97
119
|
) : null;
|
|
@@ -36,7 +36,9 @@ export function getVocabulary({
|
|
|
36
36
|
const vocabulary = getVocabName(vocabNameOrURL);
|
|
37
37
|
const contextualVocabularies = config.settings.contextualVocabularies;
|
|
38
38
|
const vocabPath =
|
|
39
|
-
contextualVocabularies &&
|
|
39
|
+
contextualVocabularies &&
|
|
40
|
+
contextualVocabularies.includes(vocabulary) &&
|
|
41
|
+
vocabulary !== vocabNameOrURL
|
|
40
42
|
? flattenToAppURL(vocabNameOrURL)
|
|
41
43
|
: `/@vocabularies/${vocabulary}`;
|
|
42
44
|
let queryString = `b_start=${start}${size ? '&b_size=' + size : ''}`;
|
|
@@ -74,7 +76,9 @@ export function getVocabularyTokenTitle({
|
|
|
74
76
|
const vocabulary = getVocabName(vocabNameOrURL);
|
|
75
77
|
const contextualVocabularies = config.settings.contextualVocabularies;
|
|
76
78
|
const vocabPath =
|
|
77
|
-
contextualVocabularies &&
|
|
79
|
+
contextualVocabularies &&
|
|
80
|
+
contextualVocabularies.includes(vocabulary) &&
|
|
81
|
+
vocabulary !== vocabNameOrURL
|
|
78
82
|
? flattenToAppURL(vocabNameOrURL)
|
|
79
83
|
: `/@vocabularies/${vocabulary}`;
|
|
80
84
|
const queryString = {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
existing listing template styles
|
|
5
5
|
- Inspired from
|
|
6
6
|
https://github.com/plone/volto/commit/211d9bea13119cc430db9d53a4740a860781ca2e
|
|
7
|
-
the way to handle search sort
|
|
7
|
+
the way to handle search sort. If searchableText is setted, discard default sorting and uses plone's ranking only if is configured from sidebar. (Changed applyDefaults fn passing usePloneRanking)
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import React from 'react';
|
|
@@ -52,7 +52,7 @@ const blockPropsAreChanged = (prevProps, nextProps) => {
|
|
|
52
52
|
return isEqual(prev, next);
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
const applyDefaults = (data, root) => {
|
|
55
|
+
const applyDefaults = (data, root, usePloneRanking) => {
|
|
56
56
|
const defaultQuery = [
|
|
57
57
|
{
|
|
58
58
|
i: 'path',
|
|
@@ -65,19 +65,13 @@ const applyDefaults = (data, root) => {
|
|
|
65
65
|
(item) => item['i'] === 'SearchableText',
|
|
66
66
|
).length;
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
? data?.sort_on
|
|
71
|
-
? { sort_on: data.sort_on }
|
|
72
|
-
: { sort_on: 'effective' }
|
|
73
|
-
: undefined;
|
|
68
|
+
let sort_on = { sort_on: data?.sort_on ?? 'effective' };
|
|
69
|
+
let sort_order = { sort_order: data?.sort_order ?? 'descending' };
|
|
74
70
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
: { sort_order: 'descending' }
|
|
80
|
-
: undefined;
|
|
71
|
+
if (usePloneRanking && searchBySearchableText > 0) {
|
|
72
|
+
sort_on = undefined;
|
|
73
|
+
sort_order = undefined;
|
|
74
|
+
}
|
|
81
75
|
|
|
82
76
|
const result = {
|
|
83
77
|
...data,
|
|
@@ -115,7 +109,7 @@ const SearchBlockView = (props) => {
|
|
|
115
109
|
}, [dataListingBodyVariation, mode]);
|
|
116
110
|
|
|
117
111
|
const root = useSelector((state) => state.breadcrumbs.root);
|
|
118
|
-
const listingBodyData = applyDefaults(searchData, root);
|
|
112
|
+
const listingBodyData = applyDefaults(searchData, root, data.usePloneRanking);
|
|
119
113
|
const { variations } = config.blocks.blocksConfig.listing;
|
|
120
114
|
const listingBodyVariation = variations.find(({ id }) => id === selectedView);
|
|
121
115
|
if (!Layout) return null;
|
|
@@ -153,6 +153,15 @@ const messages = defineMessages({
|
|
|
153
153
|
id: 'Link to',
|
|
154
154
|
defaultMessage: 'Link to',
|
|
155
155
|
},
|
|
156
|
+
usePloneRanking: {
|
|
157
|
+
id: "Usa l'ordinamento dei risultati di Plone",
|
|
158
|
+
defaultMessage: "Usa l'ordinamento dei risultati di Plone",
|
|
159
|
+
},
|
|
160
|
+
usePloneRankingDescription: {
|
|
161
|
+
id: "Usa l'ordinamento dei risultati di Plone - descrizione",
|
|
162
|
+
defaultMessage:
|
|
163
|
+
"Se impostato, nel momento in cui un utente effettua una ricerca testuale per parola chiave, non viene usato l'ordinamento di default impostato nella sezione 'Ricerca iniziale', ma l'ordinamento di Plone in base all'ordine di importanza dei risultati da esso stabilito.",
|
|
164
|
+
},
|
|
156
165
|
});
|
|
157
166
|
|
|
158
167
|
const enhanceSchema = (originalSchema, formData) => {
|
|
@@ -285,6 +294,7 @@ const SearchSchema = ({ data = {}, intl }) => {
|
|
|
285
294
|
...(data.showSearchInput ?? true ? ['showSearchButton'] : []),
|
|
286
295
|
// ...(data.showSearchInput ? ['searchInputPrompt'] : []),
|
|
287
296
|
// ...(data.showSearchButton ? ['searchButtonLabel'] : []),
|
|
297
|
+
'usePloneRanking',
|
|
288
298
|
'showTotalResults',
|
|
289
299
|
],
|
|
290
300
|
},
|
|
@@ -316,6 +326,12 @@ const SearchSchema = ({ data = {}, intl }) => {
|
|
|
316
326
|
title: intl.formatMessage(messages.showTotalResults),
|
|
317
327
|
default: true,
|
|
318
328
|
},
|
|
329
|
+
usePloneRanking: {
|
|
330
|
+
type: 'boolean',
|
|
331
|
+
title: intl.formatMessage(messages.usePloneRanking),
|
|
332
|
+
description: intl.formatMessage(messages.usePloneRankingDescription),
|
|
333
|
+
default: false,
|
|
334
|
+
},
|
|
319
335
|
searchButtonLabel: {
|
|
320
336
|
title: intl.formatMessage(messages.searchButtonLabel),
|
|
321
337
|
placeholder: intl.formatMessage(messages.searchButtonPlaceholder),
|
package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx
CHANGED
|
@@ -409,8 +409,8 @@ class RecurrenceWidget extends Component {
|
|
|
409
409
|
formValues['freq'] = FREQUENCES.MONDAYFRIDAY;
|
|
410
410
|
} else
|
|
411
411
|
formValues[option] = value.map((d) => {
|
|
412
|
-
|
|
413
|
-
|
|
412
|
+
return this.getWeekday(d);
|
|
413
|
+
});
|
|
414
414
|
}
|
|
415
415
|
break;
|
|
416
416
|
case 'bymonthday':
|
|
@@ -538,7 +538,7 @@ class RecurrenceWidget extends Component {
|
|
|
538
538
|
}
|
|
539
539
|
let exdates = Object.assign([], rruleSet.exdates());
|
|
540
540
|
let rdates = Object.assign([], rruleSet.rdates());
|
|
541
|
-
if (field === '
|
|
541
|
+
if (field === 'dtstart') dstart = value;
|
|
542
542
|
else if (field === 'exdates') exdates = value;
|
|
543
543
|
else if (field === 'rdates') rdates = value;
|
|
544
544
|
else if (field === 'freq') {
|
|
@@ -990,6 +990,7 @@ class RecurrenceWidget extends Component {
|
|
|
990
990
|
)}
|
|
991
991
|
value={formValues.freq}
|
|
992
992
|
onChange={this.onChangeRule}
|
|
993
|
+
noValueOption={false}
|
|
993
994
|
/>
|
|
994
995
|
{OPTIONS.frequences[formValues.freq].interval && (
|
|
995
996
|
<IntervalField
|
|
@@ -1004,7 +1005,6 @@ class RecurrenceWidget extends Component {
|
|
|
1004
1005
|
onChange={this.onChangeRule}
|
|
1005
1006
|
/>
|
|
1006
1007
|
)}
|
|
1007
|
-
|
|
1008
1008
|
{/***** byday *****/}
|
|
1009
1009
|
{OPTIONS.frequences[formValues.freq].byday && (
|
|
1010
1010
|
<ByDayField
|
|
@@ -1013,7 +1013,6 @@ class RecurrenceWidget extends Component {
|
|
|
1013
1013
|
onChange={this.onChangeRule}
|
|
1014
1014
|
/>
|
|
1015
1015
|
)}
|
|
1016
|
-
|
|
1017
1016
|
{/***** bymonth *****/}
|
|
1018
1017
|
{OPTIONS.frequences[formValues.freq].bymonth && (
|
|
1019
1018
|
<ByMonthField
|
|
@@ -1027,7 +1026,6 @@ class RecurrenceWidget extends Component {
|
|
|
1027
1026
|
onChange={this.onChangeRule}
|
|
1028
1027
|
/>
|
|
1029
1028
|
)}
|
|
1030
|
-
|
|
1031
1029
|
{/***** byyear *****/}
|
|
1032
1030
|
{OPTIONS.frequences[formValues.freq].byyear && (
|
|
1033
1031
|
<ByYearField
|
|
@@ -1042,7 +1040,6 @@ class RecurrenceWidget extends Component {
|
|
|
1042
1040
|
onChange={this.onChangeRule}
|
|
1043
1041
|
/>
|
|
1044
1042
|
)}
|
|
1045
|
-
|
|
1046
1043
|
{/*-- ends after N recurrence or date --*/}
|
|
1047
1044
|
<EndField
|
|
1048
1045
|
value={formValues.recurrenceEnds}
|