design-comuni-plone-theme 11.12.9 → 11.14.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.
Files changed (45) hide show
  1. package/.yarn/cache/{@plone-collective-volto-sentry-npm-0.3.0-238a1b397a-99e5493e46.zip → @plone-collective-volto-sentry-npm-0.3.1-ffea0b0844-cf3a192860.zip} +0 -0
  2. package/.yarn/cache/volto-blocks-widget-npm-3.4.1-c4d451e2c2-4f5c183698.zip +0 -0
  3. package/.yarn/cache/{volto-dropdownmenu-npm-4.1.1-8db37e6495-81edb60075.zip → volto-dropdownmenu-npm-4.1.3-b44ee1c98b-5dc76c2ee7.zip} +0 -0
  4. package/.yarn/cache/{volto-editablefooter-npm-5.1.1-a6579f67d9-c9a2e1f96f.zip → volto-editablefooter-npm-5.1.6-2df484b3b6-0e479d49c4.zip} +0 -0
  5. package/.yarn/cache/{volto-feedback-npm-0.3.0-6f555b6437-5d4fe03279.zip → volto-feedback-npm-0.3.2-ff5b075c7c-bfc7951ca5.zip} +0 -0
  6. package/.yarn/cache/{volto-form-block-npm-3.8.3-dd17b59f52-44b043f3ea.zip → volto-form-block-npm-3.8.6-70f0648a8f-b038d1b89e.zip} +0 -0
  7. package/.yarn/cache/{volto-gdpr-privacy-npm-2.2.5-1673f4cc81-0cfc4e9ba7.zip → volto-gdpr-privacy-npm-2.2.6-d189f5d334-604badfe72.zip} +0 -0
  8. package/.yarn/cache/{volto-secondarymenu-npm-4.0.0-9684028dd3-cec2705740.zip → volto-secondarymenu-npm-4.1.1-f516c1891c-94eeac0bc4.zip} +0 -0
  9. package/.yarn/cache/{volto-slimheader-npm-0.1.1-6c4a32fae4-94bafa197c.zip → volto-slimheader-npm-0.1.2-8495cb2187-fb657c3274.zip} +0 -0
  10. package/.yarn/cache/{volto-subblocks-npm-2.0.0-5a53bcc26a-7e4774cd63.zip → volto-subblocks-npm-2.1.0-2f162a4b19-a1cc02ca26.zip} +0 -0
  11. package/.yarn/cache/{volto-subfooter-npm-3.0.0-bc1ad5b16c-c7619ac55e.zip → volto-subfooter-npm-3.1.1-57dfb2cf48-d03848013d.zip} +0 -0
  12. package/.yarn/cache/volto-subsites-npm-4.0.1-97a0109675-0796a9f77c.zip +0 -0
  13. package/.yarn/cache/{volto-venue-npm-4.0.2-0c5b2ce94f-d6ebdb2e3d.zip → volto-venue-npm-4.1.0-481d5ba425-64ca36bc93.zip} +0 -0
  14. package/.yarn/install-state.gz +0 -0
  15. package/CHANGELOG.md +45 -0
  16. package/RELEASE.md +21 -0
  17. package/locales/de/LC_MESSAGES/volto.po +10 -0
  18. package/locales/en/LC_MESSAGES/volto.po +10 -0
  19. package/locales/es/LC_MESSAGES/volto.po +10 -0
  20. package/locales/fr/LC_MESSAGES/volto.po +10 -0
  21. package/locales/it/LC_MESSAGES/volto.po +10 -0
  22. package/locales/volto.pot +11 -1
  23. package/package.json +14 -14
  24. package/publiccode.yml +2 -2
  25. package/src/components/ItaliaTheme/Blocks/EventSearch/Body.jsx +2 -0
  26. package/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js +4 -4
  27. package/src/components/ItaliaTheme/Blocks/Listing/CardWithImage/CardWithImageDefault.jsx +11 -1
  28. package/src/components/ItaliaTheme/Blocks/Listing/Commons/RassegnaInfo.jsx +28 -0
  29. package/src/components/ItaliaTheme/Blocks/Listing/ContentInEvidenceTemplate.jsx +13 -1
  30. package/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx +14 -1
  31. package/src/components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate.jsx +15 -1
  32. package/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/Card/SimpleCardDefault.jsx +11 -1
  33. package/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx +6 -4
  34. package/src/components/ItaliaTheme/MegaMenu/MegaMenu.jsx +5 -1
  35. package/src/components/ItaliaTheme/SkipLinks/SkipLinks.jsx +13 -11
  36. package/src/components/ItaliaTheme/View/PersonaView/PersonaRuolo.jsx +35 -11
  37. package/src/components/ItaliaTheme/index.js +1 -0
  38. package/src/config/italiaConfig.js +6 -4
  39. package/src/helpers/ListingHelper.js +1 -1
  40. package/src/helpers/getItemsByPath.js +23 -1
  41. package/src/theme/ItaliaTheme/Components/_card.scss +27 -7
  42. package/src/theme/_cms-ui.scss +5 -26
  43. package/.yarn/cache/volto-blocks-widget-npm-3.4.0-a61b810f4f-355675359c.zip +0 -0
  44. package/.yarn/cache/volto-subsites-npm-4.0.0-17412b8f3b-9f943abc00.zip +0 -0
  45. package/src/customizations/volto/components/manage/BlockChooser/BlockChooserButton.jsx +0 -157
Binary file
package/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
 
2
2
 
3
+ ## [11.14.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.13.0...v11.14.0) (2024-06-21)
4
+
5
+
6
+ ### Features
7
+
8
+ * button block pos editor ([#704](https://github.com/RedTurtle/design-comuni-plone-theme/issues/704)) ([8cf55af](https://github.com/RedTurtle/design-comuni-plone-theme/commit/8cf55afe4d2864ec72a2eba166d9e838b2304899))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * megamenu active item ([#703](https://github.com/RedTurtle/design-comuni-plone-theme/issues/703)) ([f6668ef](https://github.com/RedTurtle/design-comuni-plone-theme/commit/f6668ef7e7f6eaf624a3c3bd2eaf557d7f32ac14))
14
+ * volto-form-block form result ([#700](https://github.com/RedTurtle/design-comuni-plone-theme/issues/700)) ([746502f](https://github.com/RedTurtle/design-comuni-plone-theme/commit/746502f827359205374d54eda99ac4efd47502ba))
15
+
16
+
17
+ ### Documentation
18
+
19
+ * updated publiccode and release log ([309474a](https://github.com/RedTurtle/design-comuni-plone-theme/commit/309474adfde862d56c35c9b0832925cc157ecef0))
20
+
21
+ ## [11.13.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.12.9...v11.13.0) (2024-06-12)
22
+
23
+
24
+ ### Features
25
+
26
+ * indicate le rassegne nei listing ([#689](https://github.com/RedTurtle/design-comuni-plone-theme/issues/689)) ([b934e89](https://github.com/RedTurtle/design-comuni-plone-theme/commit/b934e89cf6bab540c729960e1b73d9d4d9638170))
27
+ * show more than one incarico in CT Persona ([#692](https://github.com/RedTurtle/design-comuni-plone-theme/issues/692)) ([34403db](https://github.com/RedTurtle/design-comuni-plone-theme/commit/34403dbddbc208e40a24c0681c31b17caa10768d))
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * added prefix condition to render solid icons ([#693](https://github.com/RedTurtle/design-comuni-plone-theme/issues/693)) ([145e914](https://github.com/RedTurtle/design-comuni-plone-theme/commit/145e914fad3d9091702530f1ac689d6ab51745ad))
33
+ * better handle /diff route as non-content route because otherwise cms-ui styles are applied also on contents that starts with "diff" like "diffusione". ([#696](https://github.com/RedTurtle/design-comuni-plone-theme/issues/696)) ([027b569](https://github.com/RedTurtle/design-comuni-plone-theme/commit/027b569bdd1d1601d608f9d97904b1564c7c584e))
34
+ * changed default filters in EventSearch DataFilter + query parameters ([#691](https://github.com/RedTurtle/design-comuni-plone-theme/issues/691)) ([6e36884](https://github.com/RedTurtle/design-comuni-plone-theme/commit/6e3688499943dee4d4ecc6ef2a1e4aeb79049727))
35
+ * match path in search filters ([#694](https://github.com/RedTurtle/design-comuni-plone-theme/issues/694)) ([e17199b](https://github.com/RedTurtle/design-comuni-plone-theme/commit/e17199bd29d0854bab8afe5d86cf5227d741215f))
36
+
37
+
38
+ ### Maintenance
39
+
40
+ * **perf:** updated dependencies ([5d46f09](https://github.com/RedTurtle/design-comuni-plone-theme/commit/5d46f0921b27f146b0abfe66f2c2e1522932c345))
41
+ * removed unneccessary skiplink styles ([#695](https://github.com/RedTurtle/design-comuni-plone-theme/issues/695)) ([1727b1e](https://github.com/RedTurtle/design-comuni-plone-theme/commit/1727b1e0104a0e6b035d5813462a523c79bce872))
42
+
43
+
44
+ ### Documentation
45
+
46
+ * updated publiccode and release log ([455df8d](https://github.com/RedTurtle/design-comuni-plone-theme/commit/455df8dd4ed17b9f9d4a20b96ae478a7d930c5f5))
47
+
3
48
  ## [11.12.9](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.12.8...v11.12.9) (2024-06-06)
4
49
 
5
50
 
package/RELEASE.md CHANGED
@@ -41,6 +41,27 @@
41
41
  - ...
42
42
  -->
43
43
 
44
+ ## Versione 11.14.0 (21/06/2024)
45
+
46
+ ### Migliorie
47
+
48
+ - Il pulsante di aggiunta dei blocchi è stato spostato nella parte bassa del blocco (non si trova più alla sua sinistra), per migliorare l'usabilità della gestione dei blocchi anche su mobile/tablet.
49
+
50
+ ## Versione 11.13.0 (12/06/2024)
51
+
52
+ ### Migliorie
53
+
54
+ - Nel CT Persona viene visualizzato anche il testo del campo "Importi di viaggio e/o servizi" impostato nel CT Incarico collegato e, se presente più di un Incarico collegato, vengono mostrati i link a ciascun Incarico nella sezione "Altri incarichi".
55
+
56
+ ### Novità
57
+
58
+ - Aggiunte informazioni sulle rassegne di eventi nei blocchi elenco.
59
+
60
+ ### Fix
61
+
62
+ - Il bottone "callout con sfondo" della barra degli strumenti per il testo è nuovamente visibile.
63
+ - Il blocco Ricerca Eventi permette di eliminare il filtro date.
64
+
44
65
  ## Versione 11.12.9 (06/06/2024)
45
66
 
46
67
  ### Fix
@@ -807,6 +807,11 @@ msgstr ""
807
807
  msgid "altri_documenti_persona"
808
808
  msgstr ""
809
809
 
810
+ #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
811
+ # defaultMessage: Altri incarichi
812
+ msgid "altri_incarichi"
813
+ msgstr ""
814
+
810
815
  #: config/Blocks/ListingOptions/cardWithImageTemplate
811
816
  # defaultMessage: Mostra l'immagine per tutti gli elementi
812
817
  msgid "always_show_image"
@@ -2909,6 +2914,11 @@ msgstr ""
2909
2914
  msgid "quartiere"
2910
2915
  msgstr ""
2911
2916
 
2917
+ #: components/ItaliaTheme/Blocks/Listing/Commons/RassegnaInfo
2918
+ # defaultMessage: Rassegna:
2919
+ msgid "rassegna_label"
2920
+ msgstr ""
2921
+
2912
2922
  #: components/ItaliaTheme/View/Commons/PageHeader/PageHeader
2913
2923
  # defaultMessage: Tempo di lettura
2914
2924
  msgid "reading_time"
@@ -792,6 +792,11 @@ msgstr "Other documents"
792
792
  msgid "altri_documenti_persona"
793
793
  msgstr "Other documents"
794
794
 
795
+ #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
796
+ # defaultMessage: Altri incarichi
797
+ msgid "altri_incarichi"
798
+ msgstr "Other roles"
799
+
795
800
  #: config/Blocks/ListingOptions/cardWithImageTemplate
796
801
  # defaultMessage: Mostra l'immagine per tutti gli elementi
797
802
  msgid "always_show_image"
@@ -2894,6 +2899,11 @@ msgstr ""
2894
2899
  msgid "quartiere"
2895
2900
  msgstr "District "
2896
2901
 
2902
+ #: components/ItaliaTheme/Blocks/Listing/Commons/RassegnaInfo
2903
+ # defaultMessage: Rassegna:
2904
+ msgid "rassegna_label"
2905
+ msgstr ""
2906
+
2897
2907
  #: components/ItaliaTheme/View/Commons/PageHeader/PageHeader
2898
2908
  # defaultMessage: Tempo di lettura
2899
2909
  msgid "reading_time"
@@ -801,6 +801,11 @@ msgstr "Otros documentos"
801
801
  msgid "altri_documenti_persona"
802
802
  msgstr ""
803
803
 
804
+ #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
805
+ # defaultMessage: Altri incarichi
806
+ msgid "altri_incarichi"
807
+ msgstr ""
808
+
804
809
  #: config/Blocks/ListingOptions/cardWithImageTemplate
805
810
  # defaultMessage: Mostra l'immagine per tutti gli elementi
806
811
  msgid "always_show_image"
@@ -2903,6 +2908,11 @@ msgstr ""
2903
2908
  msgid "quartiere"
2904
2909
  msgstr "Vecindario"
2905
2910
 
2911
+ #: components/ItaliaTheme/Blocks/Listing/Commons/RassegnaInfo
2912
+ # defaultMessage: Rassegna:
2913
+ msgid "rassegna_label"
2914
+ msgstr ""
2915
+
2906
2916
  #: components/ItaliaTheme/View/Commons/PageHeader/PageHeader
2907
2917
  # defaultMessage: Tempo di lettura
2908
2918
  msgid "reading_time"
@@ -809,6 +809,11 @@ msgstr "Autres documents"
809
809
  msgid "altri_documenti_persona"
810
810
  msgstr ""
811
811
 
812
+ #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
813
+ # defaultMessage: Altri incarichi
814
+ msgid "altri_incarichi"
815
+ msgstr ""
816
+
812
817
  #: config/Blocks/ListingOptions/cardWithImageTemplate
813
818
  # defaultMessage: Mostra l'immagine per tutti gli elementi
814
819
  msgid "always_show_image"
@@ -2911,6 +2916,11 @@ msgstr ""
2911
2916
  msgid "quartiere"
2912
2917
  msgstr "Quartier "
2913
2918
 
2919
+ #: components/ItaliaTheme/Blocks/Listing/Commons/RassegnaInfo
2920
+ # defaultMessage: Rassegna:
2921
+ msgid "rassegna_label"
2922
+ msgstr ""
2923
+
2914
2924
  #: components/ItaliaTheme/View/Commons/PageHeader/PageHeader
2915
2925
  # defaultMessage: Tempo di lettura
2916
2926
  msgid "reading_time"
@@ -792,6 +792,11 @@ msgstr "Documenti"
792
792
  msgid "altri_documenti_persona"
793
793
  msgstr "Altri documenti"
794
794
 
795
+ #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
796
+ # defaultMessage: Altri incarichi
797
+ msgid "altri_incarichi"
798
+ msgstr ""
799
+
795
800
  #: config/Blocks/ListingOptions/cardWithImageTemplate
796
801
  # defaultMessage: Mostra l'immagine per tutti gli elementi
797
802
  msgid "always_show_image"
@@ -2894,6 +2899,11 @@ msgstr "Data di pubblicazione"
2894
2899
  msgid "quartiere"
2895
2900
  msgstr "Quartiere"
2896
2901
 
2902
+ #: components/ItaliaTheme/Blocks/Listing/Commons/RassegnaInfo
2903
+ # defaultMessage: Rassegna:
2904
+ msgid "rassegna_label"
2905
+ msgstr ""
2906
+
2897
2907
  #: components/ItaliaTheme/View/Commons/PageHeader/PageHeader
2898
2908
  # defaultMessage: Tempo di lettura
2899
2909
  msgid "reading_time"
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-05-15T15:55:46.048Z\n"
4
+ "POT-Creation-Date: 2024-06-11T14:57:29.832Z\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"
@@ -794,6 +794,11 @@ msgstr ""
794
794
  msgid "altri_documenti_persona"
795
795
  msgstr ""
796
796
 
797
+ #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
798
+ # defaultMessage: Altri incarichi
799
+ msgid "altri_incarichi"
800
+ msgstr ""
801
+
797
802
  #: config/Blocks/ListingOptions/cardWithImageTemplate
798
803
  # defaultMessage: Mostra l'immagine per tutti gli elementi
799
804
  msgid "always_show_image"
@@ -2896,6 +2901,11 @@ msgstr ""
2896
2901
  msgid "quartiere"
2897
2902
  msgstr ""
2898
2903
 
2904
+ #: components/ItaliaTheme/Blocks/Listing/Commons/RassegnaInfo
2905
+ # defaultMessage: Rassegna:
2906
+ msgid "rassegna_label"
2907
+ msgstr ""
2908
+
2899
2909
  #: components/ItaliaTheme/View/Commons/PageHeader/PageHeader
2900
2910
  # defaultMessage: Tempo di lettura
2901
2911
  msgid "reading_time"
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.12.9",
5
+ "version": "11.14.0",
6
6
  "main": "src/index.js",
7
7
  "repository": {
8
8
  "type": "git",
@@ -129,7 +129,7 @@
129
129
  "@babel/plugin-proposal-throw-expressions": "7.18.6",
130
130
  "@eeacms/volto-taxonomy": "^1.0.0",
131
131
  "@loadable/babel-plugin": "5.13.2",
132
- "@plone-collective/volto-sentry": "0.3.0",
132
+ "@plone-collective/volto-sentry": "0.3.1",
133
133
  "bootstrap-italia": "2.6.1",
134
134
  "classnames": "^2.3.2",
135
135
  "design-react-kit": "5.0.0-1",
@@ -146,24 +146,24 @@
146
146
  "typeface-lora": "0.0.72",
147
147
  "typeface-roboto-mono": "0.0.75",
148
148
  "typeface-titillium-web": "0.0.72",
149
- "volto-blocks-widget": "3.4.0",
149
+ "volto-blocks-widget": "3.4.1",
150
150
  "volto-data-grid-widget": "2.3.1",
151
- "volto-dropdownmenu": "4.1.1",
152
- "volto-editablefooter": "5.1.1",
153
- "volto-feedback": "0.3.0",
154
- "volto-form-block": "3.8.3",
155
- "volto-gdpr-privacy": "2.2.5",
151
+ "volto-dropdownmenu": "4.1.3",
152
+ "volto-editablefooter": "5.1.6",
153
+ "volto-feedback": "0.3.2",
154
+ "volto-form-block": "3.8.6",
155
+ "volto-gdpr-privacy": "2.2.6",
156
156
  "volto-google-analytics": "2.0.0",
157
157
  "volto-multilingual-widget": "3.2.1",
158
158
  "volto-querywidget-with-browser": "0.4.2",
159
159
  "volto-rss-block": "3.0.0",
160
- "volto-secondarymenu": "4.0.0",
161
- "volto-slimheader": "0.1.1",
160
+ "volto-secondarymenu": "4.1.1",
161
+ "volto-slimheader": "0.1.2",
162
162
  "volto-social-settings": "3.0.0",
163
- "volto-subblocks": "2.0.0",
164
- "volto-subfooter": "3.0.0",
165
- "volto-subsites": "4.0.0",
166
- "volto-venue": "4.0.2",
163
+ "volto-subblocks": "2.1.0",
164
+ "volto-subfooter": "3.1.1",
165
+ "volto-subsites": "4.0.1",
166
+ "volto-venue": "4.1.0",
167
167
  "webpack-image-resize-loader": "^5.0.0"
168
168
  },
169
169
  "devDependencies": {
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-06-06'
230
+ releaseDate: '2024-06-21'
231
231
  softwareType: standalone/web
232
- softwareVersion: 11.12.9
232
+ softwareVersion: 11.14.0
233
233
  url: 'https://github.com/italia/design-comuni-plone-theme'
234
234
  usedBy:
235
235
  - ASP Comuni Modenesi Area Nord
@@ -101,6 +101,8 @@ const Body = ({ data, id, inEditMode, path, onChangeBlock }) => {
101
101
  fullobjects: 1,
102
102
  query: query,
103
103
  b_size: b_size,
104
+ sort_order: 'ascending',
105
+ sort_on: 'start',
104
106
  },
105
107
  id + '_events_search',
106
108
  page,
@@ -99,12 +99,12 @@ const DefaultFilters = () => {
99
99
  component: DateFilter,
100
100
  props: {
101
101
  value: {
102
- startDate: moment().startOf('day'),
103
- endDate: moment().endOf('day'),
102
+ startDate: null,
103
+ endDate: null,
104
104
  },
105
105
  showClearDates: true,
106
- defaultStart: moment().startOf('day'),
107
- defaultEnd: moment().endOf('day'),
106
+ defaultStart: null,
107
+ defaultEnd: null,
108
108
  isOutsideRange: () => false,
109
109
  },
110
110
  },
@@ -31,6 +31,7 @@ import {
31
31
  ListingImage,
32
32
  ListingText,
33
33
  CardPersona,
34
+ RassegnaInfo,
34
35
  } from 'design-comuni-plone-theme/components/ItaliaTheme';
35
36
 
36
37
  const CardWithImageDefault = (props) => {
@@ -72,6 +73,9 @@ const CardWithImageDefault = (props) => {
72
73
  dependencies: ['CardWithImageDefault', item['@type']],
73
74
  }).component;
74
75
 
76
+ const isEventAppointment =
77
+ item?.parent?.['@type'] === 'Event' && item?.['@type'] === 'Event';
78
+
75
79
  return (
76
80
  <>
77
81
  {item['@type'] === 'Persona' ? (
@@ -119,7 +123,12 @@ const CardWithImageDefault = (props) => {
119
123
  <ListingCategory category={category} item={item} />
120
124
  </CardCategory>
121
125
  )}
122
- <CardTitle tag="h3">
126
+ <CardTitle
127
+ tag="h3"
128
+ className={`${
129
+ isEventAppointment ? 'rassegna-appointment-title' : ''
130
+ }`}
131
+ >
123
132
  <UniversalLink
124
133
  item={!isEditMode ? item : null}
125
134
  href={isEditMode ? '#' : ''}
@@ -129,6 +138,7 @@ const CardWithImageDefault = (props) => {
129
138
  {item.title || item.id}
130
139
  </UniversalLink>
131
140
  </CardTitle>
141
+ {isEventAppointment && <RassegnaInfo eventoPadre={item.parent} />}
132
142
  {listingText && (
133
143
  <CardText
134
144
  className={cx('', {
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { defineMessages, useIntl } from 'react-intl';
3
+ import { UniversalLink } from '@plone/volto/components';
4
+
5
+ const RassegnaInfo = ({ eventoPadre }) => {
6
+ const intl = useIntl();
7
+ return (
8
+ <div className="rassegna-info mb-3 mt-1">
9
+ <span className="rassegna-label">
10
+ {intl.formatMessage(messages.rassegna_label)}
11
+ </span>
12
+ <span className="rassegna-name">
13
+ <UniversalLink href={eventoPadre['@id']}>
14
+ {eventoPadre.title}
15
+ </UniversalLink>
16
+ </span>
17
+ </div>
18
+ );
19
+ };
20
+
21
+ const messages = defineMessages({
22
+ rassegna_label: {
23
+ id: 'rassegna_label',
24
+ defaultMessage: 'Rassegna:',
25
+ },
26
+ });
27
+
28
+ export default RassegnaInfo;
@@ -31,6 +31,7 @@ import {
31
31
  getItemIcon,
32
32
  // ListingLinkMore,
33
33
  ListingImage,
34
+ RassegnaInfo,
34
35
  } from 'design-comuni-plone-theme/components/ItaliaTheme';
35
36
 
36
37
  const ContentInEvidenceTemplate = (props) => {
@@ -78,6 +79,9 @@ const ContentInEvidenceTemplate = (props) => {
78
79
  dependencies: ['ContentInEvidenceTemplate', item['@type']],
79
80
  }).component;
80
81
 
82
+ const isEventAppointment =
83
+ item?.parent?.['@type'] === 'Event' && item?.['@type'] === 'Event';
84
+
81
85
  return (
82
86
  <Row key={item['@id']} className="content-in-evidence">
83
87
  {image && (
@@ -93,11 +97,19 @@ const ContentInEvidenceTemplate = (props) => {
93
97
  item={item}
94
98
  />
95
99
  </CardCategory>
96
- <CardTitle tag="h2">
100
+ <CardTitle
101
+ tag="h2"
102
+ className={`${
103
+ isEventAppointment ? 'rassegna-appointment-title' : ''
104
+ }`}
105
+ >
97
106
  <UniversalLink item={item} data-element={id_lighthouse}>
98
107
  {item.title}
99
108
  </UniversalLink>
100
109
  </CardTitle>
110
+ {isEventAppointment && (
111
+ <RassegnaInfo eventoPadre={item.parent} />
112
+ )}
101
113
  <CardText>{listingText}</CardText>
102
114
 
103
115
  {item.tassonomia_argomenti &&
@@ -33,6 +33,7 @@ import {
33
33
  ListingImage,
34
34
  CardCategory,
35
35
  CardPersona,
36
+ RassegnaInfo,
36
37
  } from 'design-comuni-plone-theme/components/ItaliaTheme';
37
38
  import { getCategory } from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/Commons/utils';
38
39
 
@@ -94,6 +95,10 @@ const InEvidenceTemplate = (props) => {
94
95
  const category = getCategory(item, show_type, show_section, props);
95
96
  const topics = show_topics ? item.tassonomia_argomenti : null;
96
97
 
98
+ const isEventAppointment =
99
+ item?.parent?.['@type'] === 'Event' &&
100
+ item?.['@type'] === 'Event';
101
+
97
102
  return item['@type'] === 'Persona' ? (
98
103
  <CardPersona
99
104
  item={item}
@@ -124,7 +129,12 @@ const InEvidenceTemplate = (props) => {
124
129
  )}
125
130
  </CardCategory>
126
131
  )}
127
- <CardTitle tag="h3">
132
+ <CardTitle
133
+ tag="h3"
134
+ className={`${
135
+ isEventAppointment ? 'rassegna-appointment-title' : ''
136
+ }`}
137
+ >
128
138
  <UniversalLink
129
139
  item={!isEditMode ? item : null}
130
140
  href={isEditMode ? '#' : null}
@@ -133,6 +143,9 @@ const InEvidenceTemplate = (props) => {
133
143
  {item.title || item.id}
134
144
  </UniversalLink>
135
145
  </CardTitle>
146
+ {isEventAppointment && (
147
+ <RassegnaInfo eventoPadre={item.parent} />
148
+ )}
136
149
  {listingText && (
137
150
  <CardText
138
151
  className={cx('', {
@@ -22,6 +22,7 @@ import {
22
22
  getItemIcon,
23
23
  ListingText,
24
24
  ListingLinkMore,
25
+ RassegnaInfo,
25
26
  } from 'design-comuni-plone-theme/components/ItaliaTheme';
26
27
  import {
27
28
  getCalendarDate,
@@ -100,6 +101,10 @@ const RibbonCardTemplate = (props) => {
100
101
  name: 'BlockExtraTags',
101
102
  dependencies: ['RibbonCardTemplate', item['@type']],
102
103
  }).component;
104
+
105
+ const isEventAppointment =
106
+ item.parent?.['@type'] === 'Event' && item?.['@type'] === 'Event';
107
+
103
108
  return (
104
109
  <Col lg={4} sm={12} key={index}>
105
110
  <Card
@@ -133,7 +138,12 @@ const RibbonCardTemplate = (props) => {
133
138
  className={cx('', { 'mt-5': !showRibbon })}
134
139
  >
135
140
  {date && <div className="dates">{date}</div>}
136
- <CardTitle tag="h3">
141
+ <CardTitle
142
+ tag="h3"
143
+ className={`${
144
+ isEventAppointment ? 'rassegna-appointment-title' : ''
145
+ }`}
146
+ >
137
147
  <UniversalLink
138
148
  item={!isEditMode ? item : null}
139
149
  href={isEditMode ? '#' : null}
@@ -142,6 +152,10 @@ const RibbonCardTemplate = (props) => {
142
152
  {itemTitle}
143
153
  </UniversalLink>
144
154
  </CardTitle>
155
+ {isEventAppointment && (
156
+ <RassegnaInfo eventoPadre={item.parent} />
157
+ )}
158
+
145
159
  {listingText && <CardText>{listingText}</CardText>}
146
160
  <BlockExtraTags {...props} item={item} itemIndex={index} />
147
161
  {eventRecurrenceMore}
@@ -19,6 +19,7 @@ import {
19
19
  getItemIcon,
20
20
  ListingCategory,
21
21
  ListingText,
22
+ RassegnaInfo,
22
23
  } from 'design-comuni-plone-theme/components/ItaliaTheme';
23
24
  import {
24
25
  getCalendarDate,
@@ -91,6 +92,9 @@ const SimpleCardDefault = (props) => {
91
92
  dependencies: ['SimpleCardDefault', type],
92
93
  }).component;
93
94
 
95
+ const isEventAppointment =
96
+ item?.parent?.['@type'] === 'Event' && item?.['@type'] === 'Event';
97
+
94
98
  return (
95
99
  <Card
96
100
  className={`align-items-top rounded shadow no-after ${getItemClass(
@@ -114,7 +118,12 @@ const SimpleCardDefault = (props) => {
114
118
  )}
115
119
  </CardCategory>
116
120
  )}
117
- <CardTitle tag="h3">
121
+ <CardTitle
122
+ tag="h3"
123
+ className={`${
124
+ isEventAppointment ? 'rassegna-appointment-title' : ''
125
+ }`}
126
+ >
118
127
  <UniversalLink
119
128
  item={!isEditMode ? item : null}
120
129
  href={isEditMode ? '#' : null}
@@ -124,6 +133,7 @@ const SimpleCardDefault = (props) => {
124
133
  {itemTitle}
125
134
  </UniversalLink>
126
135
  </CardTitle>
136
+ {isEventAppointment && <RassegnaInfo eventoPadre={item.parent} />}
127
137
  {listingText && (
128
138
  <CardText className={cx('', { 'mb-5': eventRecurrenceMore })}>
129
139
  {listingText}
@@ -36,10 +36,12 @@ const FontAwesomeIcon = (props) => {
36
36
  prefixKey === 'fab'
37
37
  ? 'brands'
38
38
  : prefixKey === 'far'
39
- ? 'regular'
40
- : prefixKey != null
41
- ? prefixKey
42
- : 'solid',
39
+ ? 'regular'
40
+ : prefixKey === 'fas'
41
+ ? 'solid'
42
+ : prefixKey != null
43
+ ? prefixKey
44
+ : 'solid',
43
45
  iconName,
44
46
  ];
45
47
  };
@@ -66,7 +66,10 @@ const isActive = (item, pathname) => {
66
66
  );
67
67
  };
68
68
 
69
- const isChildActive = (itemUrl, pathname) => {
69
+ const isChildActive = (itemUrl, pathname, exact = false) => {
70
+ if (exact) {
71
+ return itemUrl === pathname;
72
+ }
70
73
  return pathname.indexOf(itemUrl) > -1;
71
74
  };
72
75
 
@@ -328,6 +331,7 @@ const MegaMenu = ({ item, pathname }) => {
328
331
  active: isChildActive(
329
332
  flattenToAppURL(child['@id']),
330
333
  pathname,
334
+ true,
331
335
  ),
332
336
  })}
333
337
  role="menuitem"
@@ -31,17 +31,19 @@ const SkipLinks = () => {
31
31
  }, []);
32
32
 
33
33
  return (
34
- <Skiplink tag="div">
35
- <SkiplinkItem href="#view" tag="a">
36
- {intl.formatMessage(messages.mainView)}
37
- </SkiplinkItem>
38
- <SkiplinkItem href="#navigation" tag="a">
39
- {intl.formatMessage(messages.navigation)}
40
- </SkiplinkItem>
41
- <SkiplinkItem href="#footer" tag="a">
42
- {intl.formatMessage(messages.footer)}
43
- </SkiplinkItem>
44
- </Skiplink>
34
+ <div className="public-ui">
35
+ <Skiplink tag="div">
36
+ <SkiplinkItem href="#view" tag="a">
37
+ {intl.formatMessage(messages.mainView)}
38
+ </SkiplinkItem>
39
+ <SkiplinkItem href="#navigation" tag="a">
40
+ {intl.formatMessage(messages.navigation)}
41
+ </SkiplinkItem>
42
+ <SkiplinkItem href="#footer" tag="a">
43
+ {intl.formatMessage(messages.footer)}
44
+ </SkiplinkItem>
45
+ </Skiplink>
46
+ </div>
45
47
  );
46
48
  };
47
49
 
@@ -74,6 +74,10 @@ const messages = defineMessages({
74
74
  defaultMessage:
75
75
  "Ha fatto parte dell'organizzazione comunale come {incarico} fino al",
76
76
  },
77
+ altri_incarichi: {
78
+ id: 'altri_incarichi',
79
+ defaultMessage: 'Altri incarichi',
80
+ },
77
81
  });
78
82
 
79
83
  const PersonaRuolo = ({ content }) => {
@@ -86,16 +90,16 @@ const PersonaRuolo = ({ content }) => {
86
90
  tag_id="incarico"
87
91
  title={intl.formatMessage(messages.ruolo)}
88
92
  >
89
- {content?.incarichi_persona?.map((incarico) => (
90
- <div className="font-serif" key={incarico.id}>
91
- <p>{incarico.title}</p>
92
- {incarico.atto_di_nomina && (
93
- <UniversalLink href={incarico.atto_di_nomina}>
94
- {intl.formatMessage(messages.atto_nomina)}
95
- </UniversalLink>
96
- )}
97
- </div>
98
- ))}
93
+ <div className="font-serif" key={content?.incarichi_persona[0]?.id}>
94
+ <p>{content?.incarichi_persona[0]?.title}</p>
95
+ {content?.incarichi_persona[0]?.atto_di_nomina && (
96
+ <UniversalLink
97
+ href={content?.incarichi_persona[0]?.atto_di_nomina}
98
+ >
99
+ {intl.formatMessage(messages.atto_nomina)}
100
+ </UniversalLink>
101
+ )}
102
+ </div>
99
103
  </RichTextSection>
100
104
  {content.incarichi_persona[0]?.tipologia_incarico?.title && (
101
105
  <RichTextSection
@@ -152,7 +156,7 @@ const PersonaRuolo = ({ content }) => {
152
156
  title={intl.formatMessage(
153
157
  messages.importi_di_viaggio_e_o_servizi,
154
158
  )}
155
- data={content.incarichi_persona[0].importi_di_viaggio_e_o_servizi}
159
+ data={content.incarichi_persona[0].importi_viaggio_servizio}
156
160
  >
157
161
  {content.incarichi_persona[0]?.importi_di_viaggio_e_o_servizi
158
162
  ?.length > 0 && (
@@ -233,6 +237,26 @@ const PersonaRuolo = ({ content }) => {
233
237
  )}
234
238
  </>
235
239
  )}
240
+
241
+ {content.incarichi_persona?.length > 1 && (
242
+ <RichTextSection
243
+ tag_id="altri_incarichi"
244
+ title={intl.formatMessage(messages.altri_incarichi)}
245
+ >
246
+ <ul>
247
+ {content.incarichi_persona.map((incarico, index) =>
248
+ index > 0 ? (
249
+ <li key={index}>
250
+ <UniversalLink href={incarico['@id']}>
251
+ {incarico.title}
252
+ </UniversalLink>
253
+ </li>
254
+ ) : null,
255
+ )}
256
+ </ul>
257
+ </RichTextSection>
258
+ )}
259
+
236
260
  {content.assessore_di?.length > 0 && (
237
261
  <RichTextSection
238
262
  tag_id="assessore_di"
@@ -80,6 +80,7 @@ export SearchSectionsBackground from 'design-comuni-plone-theme/components/Itali
80
80
  export BackgroundUser from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/SearchSections/BackgroundUser';
81
81
  export Skeleton from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/TemplatesSkeletons/Skeleton';
82
82
  export CardCalendar from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/Commons/CardCalendar';
83
+ export RassegnaInfo from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/Commons/RassegnaInfo';
83
84
  export ListingCategory from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/Commons/ListingCategory';
84
85
  export ListingText from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/Commons/ListingText';
85
86
  export ListingLinkMore from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/Commons/ListingLinkMore';
@@ -66,8 +66,8 @@ import { schemaListing } from 'design-comuni-plone-theme/components/ItaliaTheme/
66
66
 
67
67
  import reducers from 'design-comuni-plone-theme/reducers';
68
68
 
69
- const ReleaseLog = loadable(
70
- () => import('design-comuni-plone-theme/components/ReleaseLog/ReleaseLog'),
69
+ const ReleaseLog = loadable(() =>
70
+ import('design-comuni-plone-theme/components/ReleaseLog/ReleaseLog'),
71
71
  );
72
72
 
73
73
  const messages = defineMessages({
@@ -84,7 +84,7 @@ export default function applyConfig(voltoConfig) {
84
84
  * SETTINGS
85
85
  ******************************************************************************/
86
86
  const voltoSentryOptions = voltoConfig.settings.sentryOptions;
87
-
87
+ config.experimental.addBlockButton.enabled = true; //per spostare il bottone di aggiunta dei blocchi in basso, e fare in modo che i bottoni di edit dei blocchi siano usabili anche da tablet/mobile
88
88
  config.settings = {
89
89
  ...config.settings,
90
90
  openExternalLinkInNewTab: true,
@@ -342,8 +342,10 @@ export default function applyConfig(voltoConfig) {
342
342
  };
343
343
 
344
344
  config.settings.nonContentRoutes = config.settings.nonContentRoutes.filter(
345
- (route) => route !== '/contact-form',
345
+ (route) => route !== '/contact-form' && route !== '/diff',
346
346
  );
347
+ config.settings.nonContentRoutes.push(/\/diff$/);
348
+ config.settings.nonContentRoutes.push('/diff\\?');
347
349
  config.settings.nonContentRoutes.push('/release-log');
348
350
 
349
351
  /******************************************************************************
@@ -90,7 +90,7 @@ export const getEventRecurrenceMore = (item, isEditMode) => {
90
90
  const intl = Intl();
91
91
  let ret = null;
92
92
  if (item['@type'] === 'Event') {
93
- if (item.recurrence) {
93
+ if (item.recurrence || item.rassegna) {
94
94
  ret = (
95
95
  <Link
96
96
  to={!isEditMode ? flattenToAppURL(item['@id']) : '#'}
@@ -1,3 +1,25 @@
1
+ /**
2
+ * Retrieves items based on a given pathname from a list of items with specified root paths.
3
+ *
4
+ * @param {Array} items - An array of objects where each object contains a `rootPath` and `items` property.
5
+ * @param {string} pathname - The pathname to match against the root paths.
6
+ * @param {boolean} [defaultRootPath=true] - A flag to determine if the root path ('/') items should be returned when no match is found.
7
+ * @returns {Array} - The items corresponding to the matched root path or the root path if no match is found and defaultRootPath is true. Returns an empty array if no match is found and defaultRootPath is false.
8
+ *
9
+ * @example
10
+ * // Sample items array
11
+ * const items = [
12
+ * { rootPath: '/', items: ['homeItem1', 'homeItem2'] },
13
+ * { rootPath: '/about', items: ['aboutItem1'] },
14
+ * { rootPath: '/products', items: ['productItem1', 'productItem2'] },
15
+ * ];
16
+ *
17
+ * getItemsByPath(items, '/about'); // returns ['aboutItem1']
18
+ * getItemsByPath(items, '/products/item'); // returns ['productItem1', 'productItem2']
19
+ * getItemsByPath(items, '/contact'); // returns ['homeItem1', 'homeItem2'] assuming defaultRootPath is true
20
+ * getItemsByPath(items, '/contact', false); // returns []
21
+ */
22
+
1
23
  export function getItemsByPath(items, pathname, defaultRootPath = true) {
2
24
  let rootPathConfig = null;
3
25
  const itemsByPath = items?.reduce((acc, val) => {
@@ -8,7 +30,7 @@ export function getItemsByPath(items, pathname, defaultRootPath = true) {
8
30
  return { ...acc, [val.rootPath]: val };
9
31
  }, {});
10
32
  const matchingPaths = Object.keys(itemsByPath)
11
- .filter((path) => pathname.startsWith(path))
33
+ .filter((path) => pathname === path || pathname.startsWith(`${path}/`))
12
34
  .sort((a, b) => {
13
35
  if (a.length > b.length) return -1;
14
36
  else if (a.length < b.length) return 1;
@@ -166,15 +166,35 @@
166
166
  }
167
167
  }
168
168
 
169
- .block.listing.simpleCard {
170
- @include media-breakpoint-down(xl) {
171
- .card {
172
- row-gap: 0.56em;
169
+ .block.listing {
170
+ &.simpleCard {
171
+ @include media-breakpoint-down(xl) {
172
+ .card {
173
+ row-gap: 0.56em;
174
+ }
175
+
176
+ .card-body {
177
+ flex-basis: 100%;
178
+ margin-left: 0em;
179
+ }
173
180
  }
181
+ }
174
182
 
175
- .card-body {
176
- flex-basis: 100%;
177
- margin-left: 0em;
183
+ .card {
184
+ .card-title {
185
+ &.rassegna-appointment-title {
186
+ margin-bottom: 0px !important;
187
+ }
188
+ }
189
+
190
+ .rassegna-info {
191
+ font-size: 0.9rem;
192
+ display: inline-flex;
193
+ column-gap: 0.3rem;
194
+
195
+ a {
196
+ text-decoration: none;
197
+ }
178
198
  }
179
199
  }
180
200
  }
@@ -192,32 +192,6 @@ body.cms-ui {
192
192
  }
193
193
  }
194
194
 
195
- .skiplinks {
196
- position: absolute;
197
- top: -100%;
198
-
199
- a {
200
- display: inline-block;
201
- color: $link-color;
202
-
203
- &:focus {
204
- position: fixed;
205
- z-index: 9999;
206
- top: 10px;
207
- left: 10px;
208
- padding: 10px;
209
- border: 2px solid $link-color;
210
- background: #fff;
211
- outline: 3px solid $link-color;
212
- }
213
-
214
- &:hover {
215
- border-color: $link-color;
216
- color: $link-color;
217
- }
218
- }
219
- }
220
-
221
195
  .react-select__menu {
222
196
  z-index: 11;
223
197
 
@@ -270,6 +244,11 @@ body.cms-ui {
270
244
  }
271
245
  }
272
246
 
247
+ /*Block chooser*/
248
+ [data-popper-placement] {
249
+ z-index: 1000;
250
+ }
251
+
273
252
  .sidebar-container {
274
253
  .numbers-block-sidebar-form-container {
275
254
  padding-bottom: 1rem;
@@ -1,157 +0,0 @@
1
- /* CUSTOMIZATIONS
2
- - zindex for handling overlapping in small pages
3
- */
4
-
5
- import React from 'react';
6
- import { doesNodeContainClick } from 'semantic-ui-react/dist/commonjs/lib';
7
- import addSVG from '@plone/volto/icons/circle-plus.svg';
8
- import { blockHasValue } from '@plone/volto/helpers';
9
- import { Icon, BlockChooser } from '@plone/volto/components';
10
- import config from '@plone/volto/registry';
11
- import { Button, Ref } from 'semantic-ui-react';
12
- import { defineMessages, useIntl } from 'react-intl';
13
- import { usePopper } from 'react-popper';
14
- import { Portal } from 'react-portal';
15
-
16
- const messages = defineMessages({
17
- addBlock: {
18
- id: 'Add block',
19
- defaultMessage: 'Add block',
20
- },
21
- });
22
-
23
- export const ButtonComponent = (props) => {
24
- const intl = useIntl();
25
- const {
26
- className = `block-add-button${
27
- config.experimental.addBlockButton.enabled ? ' new-add-block' : ''
28
- }`,
29
- size = '19px',
30
- onShowBlockChooser,
31
- } = props;
32
-
33
- return (
34
- <Button
35
- icon
36
- basic
37
- title={intl.formatMessage(messages.addBlock)}
38
- onClick={(e) => {
39
- e.preventDefault();
40
- e.stopPropagation();
41
- onShowBlockChooser();
42
- }}
43
- className={className}
44
- >
45
- <Icon name={addSVG} className={className} size={size} />
46
- </Button>
47
- );
48
- };
49
-
50
- const BlockChooserButton = (props) => {
51
- const {
52
- block,
53
- allowedBlocks,
54
- showRestricted,
55
- data,
56
- onMutateBlock,
57
- onInsertBlock,
58
- blocksConfig,
59
- buttonComponent,
60
- properties,
61
- } = props;
62
- const { disableNewBlocks } = data;
63
- const [addNewBlockOpened, setAddNewBlockOpened] = React.useState(false);
64
-
65
- const blockChooserRef = React.useRef();
66
-
67
- const handleClickOutside = React.useCallback((e) => {
68
- if (
69
- blockChooserRef.current &&
70
- doesNodeContainClick(blockChooserRef.current, e)
71
- )
72
- return;
73
- setAddNewBlockOpened(false);
74
- }, []);
75
-
76
- const Component = buttonComponent || ButtonComponent;
77
-
78
- React.useEffect(() => {
79
- document.addEventListener('mousedown', handleClickOutside, false);
80
- return () => {
81
- document.removeEventListener('mousedown', handleClickOutside, false);
82
- };
83
- }, [handleClickOutside]);
84
-
85
- const [referenceElement, setReferenceElement] = React.useState(null);
86
- const [popperElement, setPopperElement] = React.useState(null);
87
- const { styles, attributes } = usePopper(referenceElement, popperElement, {
88
- placement: config.experimental.addBlockButton.enabled
89
- ? 'bottom'
90
- : 'right-start',
91
- modifiers: [
92
- {
93
- name: 'offset',
94
- options: {
95
- offset: [-10, 5],
96
- },
97
- },
98
- {
99
- name: 'flip',
100
- options: {
101
- fallbackPlacements: ['right-end', 'top-start'],
102
- },
103
- },
104
- ],
105
- });
106
-
107
- return (
108
- <>
109
- {!disableNewBlocks &&
110
- (config.experimental.addBlockButton.enabled ||
111
- !blockHasValue(data)) && (
112
- <Ref innerRef={setReferenceElement}>
113
- <Component
114
- {...props}
115
- onShowBlockChooser={() => setAddNewBlockOpened(true)}
116
- />
117
- </Ref>
118
- )}
119
- {addNewBlockOpened && (
120
- <Portal node={document.getElementById('body')}>
121
- <div
122
- ref={setPopperElement}
123
- style={{ ...styles.popper, zIndex: 1000 }}
124
- {...attributes.popper}
125
- >
126
- <BlockChooser
127
- onMutateBlock={
128
- onMutateBlock
129
- ? (id, value) => {
130
- setAddNewBlockOpened(false);
131
- onMutateBlock(id, value);
132
- }
133
- : null
134
- }
135
- onInsertBlock={
136
- onInsertBlock
137
- ? (id, value) => {
138
- setAddNewBlockOpened(false);
139
- onInsertBlock(id, value);
140
- }
141
- : null
142
- }
143
- currentBlock={block}
144
- allowedBlocks={allowedBlocks}
145
- blocksConfig={blocksConfig}
146
- properties={properties}
147
- showRestricted={showRestricted}
148
- ref={blockChooserRef}
149
- />
150
- </div>
151
- </Portal>
152
- )}
153
- </>
154
- );
155
- };
156
-
157
- export default BlockChooserButton;