design-comuni-plone-theme 12.0.0-alpha.1 → 12.0.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 (432) hide show
  1. package/.github/workflows/main.yml +17 -17
  2. package/.github/workflows/{themes.yml → npm.yml} +22 -3
  3. package/.github/workflows/prs.yml +1 -1
  4. package/.github/workflows/release.yml +1 -1
  5. package/.github/workflows/{performance.yml → withnewsletter.yml} +12 -12
  6. package/.release-it.json +2 -1
  7. package/.yarn/cache/@formatjs-ecma402-abstract-npm-1.18.2-281c9afdd0-c664056cca.zip +0 -0
  8. package/.yarn/cache/@formatjs-fast-memoize-npm-2.2.0-4a46a61b8b-8697fe72a7.zip +0 -0
  9. package/.yarn/cache/@formatjs-icu-messageformat-parser-npm-2.7.6-59cd895220-d537253cbf.zip +0 -0
  10. package/.yarn/cache/@formatjs-icu-skeleton-parser-npm-1.8.0-0f1fd4bf3f-85ca45148a.zip +0 -0
  11. package/.yarn/cache/@formatjs-intl-localematcher-npm-0.5.4-e30cfcd8fd-a0af57874f.zip +0 -0
  12. package/.yarn/cache/@internationalized-date-npm-3.5.3-435a424ba4-e3b011b587.zip +0 -0
  13. package/.yarn/cache/@internationalized-message-npm-3.1.3-ed0b43d16d-76b7aadad0.zip +0 -0
  14. package/.yarn/cache/@internationalized-number-npm-3.5.2-0f0b803d0d-b622849a6c.zip +0 -0
  15. package/.yarn/cache/@internationalized-string-npm-3.2.2-dc233d6c2e-32d5944f0a.zip +0 -0
  16. 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
  17. package/.yarn/cache/@plone-components-npm-2.0.0-alpha.7-ae15679e71-6eb35f5ef6.zip +0 -0
  18. package/.yarn/cache/@react-aria-breadcrumbs-npm-3.5.12-4df37e0505-19c473c624.zip +0 -0
  19. package/.yarn/cache/@react-aria-button-npm-3.9.4-bcfdfa6d77-3644f5b504.zip +0 -0
  20. package/.yarn/cache/@react-aria-calendar-npm-3.5.7-4a24a3018a-08088c27ad.zip +0 -0
  21. package/.yarn/cache/@react-aria-checkbox-npm-3.14.2-ec0875b197-33c280dbaa.zip +0 -0
  22. package/.yarn/cache/@react-aria-color-npm-3.0.0-beta.32-b69a571afd-fcaa145f2d.zip +0 -0
  23. package/.yarn/cache/@react-aria-combobox-npm-3.9.0-9d01e3bcc8-ebc3aa2523.zip +0 -0
  24. package/.yarn/cache/@react-aria-datepicker-npm-3.10.0-b44d40522c-b5b3226e0e.zip +0 -0
  25. package/.yarn/cache/@react-aria-dialog-npm-3.5.13-fd75d2058e-b03586c90b.zip +0 -0
  26. package/.yarn/cache/@react-aria-dnd-npm-3.6.0-085417ff5c-da39c859dc.zip +0 -0
  27. package/.yarn/cache/@react-aria-focus-npm-3.17.0-a0d6fd01c9-bac778f7f9.zip +0 -0
  28. package/.yarn/cache/@react-aria-form-npm-3.0.4-1f761ca8f4-97a8f25e7b.zip +0 -0
  29. package/.yarn/cache/@react-aria-grid-npm-3.9.0-cdd984835d-c3841b238b.zip +0 -0
  30. package/.yarn/cache/@react-aria-gridlist-npm-3.8.0-40b98ff740-04ab1cccee.zip +0 -0
  31. package/.yarn/cache/@react-aria-i18n-npm-3.11.0-3bd97ed4c6-c4c7c7bd16.zip +0 -0
  32. package/.yarn/cache/@react-aria-interactions-npm-3.21.2-c6fe2e70fd-df7ca376b1.zip +0 -0
  33. package/.yarn/cache/@react-aria-label-npm-3.7.7-39b24fbd65-bfa2ec757c.zip +0 -0
  34. package/.yarn/cache/@react-aria-link-npm-3.7.0-cf388c071e-0af089b4b6.zip +0 -0
  35. package/.yarn/cache/@react-aria-listbox-npm-3.12.0-c9a3fcfdc1-2591d78997.zip +0 -0
  36. package/.yarn/cache/@react-aria-live-announcer-npm-3.3.3-46433149f6-501e772dba.zip +0 -0
  37. package/.yarn/cache/@react-aria-menu-npm-3.14.0-6fa31f531d-7f716c6ef9.zip +0 -0
  38. package/.yarn/cache/@react-aria-meter-npm-3.4.12-2821308fcd-a344cbb3df.zip +0 -0
  39. package/.yarn/cache/@react-aria-numberfield-npm-3.11.2-09acd47715-4e86800c8a.zip +0 -0
  40. package/.yarn/cache/@react-aria-overlays-npm-3.22.0-90340dac2d-bc2a4ed89d.zip +0 -0
  41. package/.yarn/cache/@react-aria-progress-npm-3.4.12-dfcbd6cd8f-3ca779f189.zip +0 -0
  42. package/.yarn/cache/@react-aria-radio-npm-3.10.3-94cedc9974-62cc213b68.zip +0 -0
  43. package/.yarn/cache/@react-aria-searchfield-npm-3.7.4-aaf2343364-ca4bc43633.zip +0 -0
  44. package/.yarn/cache/@react-aria-select-npm-3.14.4-36c0aabf5a-7b091a7a9c.zip +0 -0
  45. package/.yarn/cache/@react-aria-selection-npm-3.18.0-ac9a672791-58d96d02cd.zip +0 -0
  46. package/.yarn/cache/@react-aria-separator-npm-3.3.12-cba989b17a-972f038c36.zip +0 -0
  47. package/.yarn/cache/@react-aria-slider-npm-3.7.7-ed4b28f711-3d4b8c88cc.zip +0 -0
  48. package/.yarn/cache/@react-aria-spinbutton-npm-3.6.4-1361ae7900-d3df661c3b.zip +0 -0
  49. package/.yarn/cache/@react-aria-ssr-npm-3.9.3-83f9d6a628-9bbc8fea4a.zip +0 -0
  50. package/.yarn/cache/@react-aria-switch-npm-3.6.3-491c39fd33-754bdd8fe0.zip +0 -0
  51. package/.yarn/cache/@react-aria-table-npm-3.14.0-28948a50ad-8ce75e4b03.zip +0 -0
  52. package/.yarn/cache/@react-aria-tabs-npm-3.9.0-06e5f74497-1460c136f1.zip +0 -0
  53. package/.yarn/cache/@react-aria-tag-npm-3.4.0-1910b576b8-1fcd4068af.zip +0 -0
  54. package/.yarn/cache/@react-aria-textfield-npm-3.14.4-1c110be229-b9ba98a86e.zip +0 -0
  55. package/.yarn/cache/@react-aria-toggle-npm-3.10.3-93811531bc-a54c83da54.zip +0 -0
  56. package/.yarn/cache/@react-aria-toolbar-npm-3.0.0-beta.4-8a6d41e05d-ae6fc5f49a.zip +0 -0
  57. package/.yarn/cache/@react-aria-tooltip-npm-3.7.3-e2a6890301-57743f4bbd.zip +0 -0
  58. package/.yarn/cache/@react-aria-tree-npm-3.0.0-alpha.0-48c591e08d-2829e3a0ef.zip +0 -0
  59. package/.yarn/cache/@react-aria-utils-npm-3.24.0-b754bf323d-0f0b530f06.zip +0 -0
  60. package/.yarn/cache/@react-aria-visually-hidden-npm-3.8.11-437e8b0708-5b0e770a9c.zip +0 -0
  61. package/.yarn/cache/@react-spectrum-utils-npm-3.11.6-38e10974c6-6089e7b70b.zip +0 -0
  62. package/.yarn/cache/@react-stately-calendar-npm-3.5.0-269efd3343-8395aaf34d.zip +0 -0
  63. package/.yarn/cache/@react-stately-checkbox-npm-3.6.4-a5dc7cc18a-89c38c8698.zip +0 -0
  64. package/.yarn/cache/@react-stately-collections-npm-3.10.6-669dc2c16b-bc81d37b45.zip +0 -0
  65. package/.yarn/cache/@react-stately-color-npm-3.6.0-aee6f5f342-2cf47e66f0.zip +0 -0
  66. package/.yarn/cache/@react-stately-combobox-npm-3.8.3-15ca98aa5c-dad97a15fb.zip +0 -0
  67. package/.yarn/cache/@react-stately-data-npm-3.11.3-cce895778d-dfc8d1ac9a.zip +0 -0
  68. package/.yarn/cache/@react-stately-datepicker-npm-3.9.3-fe9d43086a-c2fee2a75e.zip +0 -0
  69. package/.yarn/cache/@react-stately-dnd-npm-3.3.0-12dd68769d-afc0565ac1.zip +0 -0
  70. package/.yarn/cache/@react-stately-flags-npm-3.0.2-1ec044f94e-c2c19b6043.zip +0 -0
  71. package/.yarn/cache/@react-stately-form-npm-3.0.2-4bc729a2ea-9dfae19354.zip +0 -0
  72. package/.yarn/cache/@react-stately-grid-npm-3.8.6-907965ec36-313e63ff3b.zip +0 -0
  73. package/.yarn/cache/@react-stately-list-npm-3.10.4-77dd54c792-19325e9ab4.zip +0 -0
  74. package/.yarn/cache/@react-stately-menu-npm-3.7.0-90a0db1055-a108e379e4.zip +0 -0
  75. package/.yarn/cache/@react-stately-numberfield-npm-3.9.2-3a89f1bc42-96956b46c5.zip +0 -0
  76. package/.yarn/cache/@react-stately-overlays-npm-3.6.6-f8aa64654d-bc910b54b2.zip +0 -0
  77. package/.yarn/cache/@react-stately-radio-npm-3.10.3-071befd78c-f8d356f86a.zip +0 -0
  78. package/.yarn/cache/@react-stately-searchfield-npm-3.5.2-2f3fb6c209-43558cfff5.zip +0 -0
  79. package/.yarn/cache/@react-stately-select-npm-3.6.3-be5e642bfa-34fbe8501b.zip +0 -0
  80. package/.yarn/cache/@react-stately-selection-npm-3.15.0-8b7bc0694b-9edcb36fed.zip +0 -0
  81. package/.yarn/cache/@react-stately-slider-npm-3.5.3-562ef6c5cb-06d0a53b7c.zip +0 -0
  82. package/.yarn/cache/@react-stately-table-npm-3.11.7-5c9e0fd96a-58d51f98d6.zip +0 -0
  83. package/.yarn/cache/@react-stately-tabs-npm-3.6.5-146716fcbd-d1968d1417.zip +0 -0
  84. package/.yarn/cache/@react-stately-toggle-npm-3.7.3-37e71d088a-5c5e7b52fa.zip +0 -0
  85. package/.yarn/cache/@react-stately-tooltip-npm-3.4.8-fd6ef872a2-25cc3e3c24.zip +0 -0
  86. package/.yarn/cache/@react-stately-tree-npm-3.8.0-500b430bb7-19c17a7406.zip +0 -0
  87. package/.yarn/cache/@react-stately-utils-npm-3.10.0-066f48a98e-780dab3581.zip +0 -0
  88. package/.yarn/cache/@react-stately-virtualizer-npm-3.7.0-2e4e9a8821-c04424dfff.zip +0 -0
  89. package/.yarn/cache/@react-types-breadcrumbs-npm-3.7.4-0e067c6509-132d9d1b0a.zip +0 -0
  90. package/.yarn/cache/@react-types-button-npm-3.9.3-491d887431-a9da87eb7e.zip +0 -0
  91. package/.yarn/cache/@react-types-calendar-npm-3.4.5-9491b2662c-6e3b6e44df.zip +0 -0
  92. package/.yarn/cache/@react-types-checkbox-npm-3.8.0-fa41e40b34-9786fd8224.zip +0 -0
  93. package/.yarn/cache/@react-types-color-npm-3.0.0-beta.24-a1c15bc97a-894371276c.zip +0 -0
  94. package/.yarn/cache/@react-types-combobox-npm-3.11.0-e0a5e09d36-3bf3ad11d0.zip +0 -0
  95. package/.yarn/cache/@react-types-datepicker-npm-3.7.3-1c968964c9-1053453aee.zip +0 -0
  96. package/.yarn/cache/@react-types-dialog-npm-3.5.9-037d2817d8-efeb8dc70e.zip +0 -0
  97. package/.yarn/cache/@react-types-form-npm-3.7.3-faea9d8969-e88a1a4097.zip +0 -0
  98. package/.yarn/cache/@react-types-grid-npm-3.2.5-47670b811f-e3588328cf.zip +0 -0
  99. package/.yarn/cache/@react-types-link-npm-3.5.4-44b62607b6-5d7555e036.zip +0 -0
  100. package/.yarn/cache/@react-types-listbox-npm-3.4.8-2e0a7f4dea-31e7b4c8b1.zip +0 -0
  101. package/.yarn/cache/@react-types-menu-npm-3.9.8-a4a0f57423-d5fb6d99bc.zip +0 -0
  102. package/.yarn/cache/@react-types-meter-npm-3.4.0-768a873170-cc30fd4745.zip +0 -0
  103. package/.yarn/cache/@react-types-numberfield-npm-3.8.2-a842f6619d-e8ed43b08f.zip +0 -0
  104. package/.yarn/cache/@react-types-overlays-npm-3.8.6-78e91b1a37-8efb3c2569.zip +0 -0
  105. package/.yarn/cache/@react-types-progress-npm-3.5.3-27066d6e69-d13f2db5c3.zip +0 -0
  106. package/.yarn/cache/@react-types-radio-npm-3.8.0-5d03b4b24f-f868f13ff2.zip +0 -0
  107. package/.yarn/cache/@react-types-searchfield-npm-3.5.4-9a6cb6c41b-806f97f5d6.zip +0 -0
  108. package/.yarn/cache/@react-types-select-npm-3.9.3-436aaa190f-b3db4acb66.zip +0 -0
  109. package/.yarn/cache/@react-types-shared-npm-3.23.0-1952004986-aa3507ef30.zip +0 -0
  110. package/.yarn/cache/@react-types-slider-npm-3.7.2-369a50984c-fcdafa3511.zip +0 -0
  111. package/.yarn/cache/@react-types-switch-npm-3.5.2-19ff24a621-e8caae2da6.zip +0 -0
  112. package/.yarn/cache/@react-types-table-npm-3.9.4-0afc8754dd-80dae2adfe.zip +0 -0
  113. package/.yarn/cache/@react-types-tabs-npm-3.3.6-047a1fd9c3-69d89f3c5c.zip +0 -0
  114. package/.yarn/cache/@react-types-textfield-npm-3.9.2-2bd9f93005-9102b983c5.zip +0 -0
  115. package/.yarn/cache/@react-types-tooltip-npm-3.4.8-8d81ea0e23-a3122729eb.zip +0 -0
  116. package/.yarn/cache/@swc-helpers-npm-0.4.14-f806c3fb16-273fd3f3fc.zip +0 -0
  117. package/.yarn/cache/@swc-helpers-npm-0.4.36-507abd5d2a-20b9f021a9.zip +0 -0
  118. package/.yarn/cache/@swc-helpers-npm-0.5.11-94bd1e1b3e-5d85e641d9.zip +0 -0
  119. package/.yarn/cache/braces-npm-3.0.3-582c14023c-b95aa0b3bd.zip +0 -0
  120. package/.yarn/cache/client-only-npm-0.0.1-07d3e9505c-0c16bf660d.zip +0 -0
  121. package/.yarn/cache/clsx-npm-2.1.1-96125b98be-acd3e1ab9d.zip +0 -0
  122. package/.yarn/cache/cross-spawn-npm-7.0.6-264bddf921-8d306efaca.zip +0 -0
  123. package/.yarn/cache/fill-range-npm-7.1.1-bf491486db-b4abfbca38.zip +0 -0
  124. package/.yarn/cache/intl-messageformat-npm-10.5.11-1feb0e2115-b5574447a0.zip +0 -0
  125. package/.yarn/cache/micromatch-npm-4.0.8-c9570e4aca-79920eb634.zip +0 -0
  126. package/.yarn/cache/nanoid-npm-3.3.8-d22226208b-dfe0adbc0c.zip +0 -0
  127. package/.yarn/cache/react-aria-components-npm-1.2.0-30040153be-43319158c8.zip +0 -0
  128. package/.yarn/cache/react-aria-npm-3.33.0-688afc3857-980f9da630.zip +0 -0
  129. package/.yarn/cache/react-stately-npm-3.31.0-9465d26d77-d59440e0a7.zip +0 -0
  130. package/.yarn/cache/use-sync-external-store-npm-1.2.2-7923c915e1-fe07c071c4.zip +0 -0
  131. package/.yarn/cache/volto-blocks-widget-npm-3.4.1-c4d451e2c2-4f5c183698.zip +0 -0
  132. package/.yarn/cache/{volto-dropdownmenu-npm-4.1.1-8db37e6495-81edb60075.zip → volto-dropdownmenu-npm-4.1.3-b44ee1c98b-5dc76c2ee7.zip} +0 -0
  133. package/.yarn/cache/volto-editablefooter-npm-5.1.7-483b4be25b-ad5642959b.zip +0 -0
  134. package/.yarn/cache/{volto-feedback-npm-0.3.0-6f555b6437-5d4fe03279.zip → volto-feedback-npm-0.6.1-0de05761ad-127b69de40.zip} +0 -0
  135. package/.yarn/cache/{volto-form-block-npm-3.8.2-e49cbe07d5-5b72a06a5e.zip → volto-form-block-npm-3.10.0-8cd1c7a976-8ddce2c624.zip} +0 -0
  136. package/.yarn/cache/volto-gdpr-privacy-npm-2.2.12-fbc24c3b6f-ba1b9c0127.zip +0 -0
  137. package/.yarn/cache/volto-multilingual-widget-npm-3.2.1-6fcb25c017-c24fd5379c.zip +0 -0
  138. package/.yarn/cache/{volto-secondarymenu-npm-4.0.0-9684028dd3-cec2705740.zip → volto-secondarymenu-npm-4.1.1-f516c1891c-94eeac0bc4.zip} +0 -0
  139. package/.yarn/cache/volto-site-settings-npm-0.4.4-11da224a90-ef0c504b64.zip +0 -0
  140. package/.yarn/cache/{volto-slimheader-npm-0.1.1-6c4a32fae4-94bafa197c.zip → volto-slimheader-npm-0.1.2-8495cb2187-fb657c3274.zip} +0 -0
  141. package/.yarn/cache/{volto-subblocks-npm-2.0.0-5a53bcc26a-7e4774cd63.zip → volto-subblocks-npm-2.1.0-2f162a4b19-a1cc02ca26.zip} +0 -0
  142. package/.yarn/cache/{volto-subfooter-npm-3.0.0-bc1ad5b16c-c7619ac55e.zip → volto-subfooter-npm-3.1.1-57dfb2cf48-d03848013d.zip} +0 -0
  143. package/.yarn/cache/volto-subsites-npm-4.0.2-715672140c-77408b4ea1.zip +0 -0
  144. package/.yarn/cache/{volto-venue-npm-4.0.2-0c5b2ce94f-d6ebdb2e3d.zip → volto-venue-npm-4.1.1-d5be247928-f796d519ad.zip} +0 -0
  145. package/.yarn/install-state.gz +0 -0
  146. package/CHANGELOG.md +1592 -485
  147. package/Makefile +1 -1
  148. package/RELEASE.md +400 -9
  149. package/locales/de/LC_MESSAGES/volto.po +244 -16
  150. package/locales/en/LC_MESSAGES/volto.po +306 -78
  151. package/locales/es/LC_MESSAGES/volto.po +244 -16
  152. package/locales/fr/LC_MESSAGES/volto.po +244 -16
  153. package/locales/it/LC_MESSAGES/volto.po +247 -19
  154. package/locales/volto.pot +245 -17
  155. package/package.json +23 -17
  156. package/publiccode.yml +3 -3
  157. package/src/components/ImageWithErrors/ImageWithErrors.jsx +30 -0
  158. package/src/components/ItaliaTheme/AppExtras/GenericAppExtras.jsx +2 -8
  159. package/src/components/ItaliaTheme/AppExtras/SiteSettingsExtras.jsx +35 -0
  160. package/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx +2 -1
  161. package/src/components/ItaliaTheme/Blocks/Accordion/Edit.jsx +59 -0
  162. package/src/components/ItaliaTheme/Blocks/Accordion/View.jsx +9 -0
  163. package/src/components/ItaliaTheme/Blocks/Alert/Edit.jsx +1 -1
  164. package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/BottomBody.jsx +2 -2
  165. package/src/components/ItaliaTheme/Blocks/BandiSearch/Body.jsx +4 -0
  166. package/src/components/ItaliaTheme/Blocks/CTABlock/Block.jsx +2 -2
  167. package/src/components/ItaliaTheme/Blocks/Calendar/Body.jsx +1 -0
  168. package/src/components/ItaliaTheme/Blocks/Callout/Edit.jsx +2 -2
  169. package/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx +3 -2
  170. package/src/components/ItaliaTheme/Blocks/Common/SearchFilters/SelectFilter.jsx +11 -3
  171. package/src/components/ItaliaTheme/Blocks/Common/SearchFilters/TextFilter.jsx +1 -0
  172. package/src/components/ItaliaTheme/Blocks/ContactsBlock/Block/EditBlock.jsx +17 -15
  173. package/src/components/ItaliaTheme/Blocks/ContactsBlock/Edit.jsx +12 -6
  174. package/src/components/ItaliaTheme/Blocks/CountDown/Edit.jsx +2 -2
  175. package/src/components/ItaliaTheme/Blocks/EventSearch/Body.jsx +17 -2
  176. package/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js +8 -15
  177. package/src/components/ItaliaTheme/Blocks/EventSearch/Sidebar.jsx +16 -5
  178. package/src/components/ItaliaTheme/Blocks/IconBlocks/Block/EditBlock.jsx +12 -7
  179. package/src/components/ItaliaTheme/Blocks/IconBlocks/Block/ViewBlock.jsx +8 -14
  180. package/src/components/ItaliaTheme/Blocks/IconBlocks/Edit.jsx +17 -3
  181. package/src/components/ItaliaTheme/Blocks/IconBlocks/View.jsx +6 -1
  182. package/src/components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate.jsx +9 -5
  183. package/src/components/ItaliaTheme/Blocks/Listing/CardWithImage/CardWithImageDefault.jsx +17 -7
  184. package/src/components/ItaliaTheme/Blocks/Listing/CardWithSlideUpTextTemplate.jsx +24 -13
  185. package/src/components/ItaliaTheme/Blocks/Listing/Commons/CardCalendar.jsx +1 -1
  186. package/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx +58 -13
  187. package/src/components/ItaliaTheme/Blocks/Listing/Commons/RassegnaInfo.jsx +28 -0
  188. package/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx +15 -10
  189. package/src/components/ItaliaTheme/Blocks/Listing/ContentInEvidenceTemplate.jsx +24 -10
  190. package/src/components/ItaliaTheme/Blocks/Listing/GridGalleryTemplate.jsx +4 -3
  191. package/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx +22 -9
  192. package/src/components/ItaliaTheme/Blocks/Listing/PhotogalleryTemplate.jsx +10 -8
  193. package/src/components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate.jsx +15 -1
  194. package/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/Card/SimpleCardDefault.jsx +16 -2
  195. package/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +12 -8
  196. package/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx +19 -21
  197. package/src/components/ItaliaTheme/Blocks/NumbersBlock/Block/EditBlock.jsx +5 -6
  198. package/src/components/ItaliaTheme/Blocks/NumbersBlock/Edit.jsx +17 -3
  199. package/src/components/ItaliaTheme/Blocks/NumbersBlock/View.jsx +5 -1
  200. package/src/components/ItaliaTheme/Blocks/SearchSections/Body.jsx +1 -0
  201. package/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block.jsx +4 -2
  202. package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/Edit.jsx +2 -2
  203. package/src/components/ItaliaTheme/Blocks/UOSearch/Body.jsx +7 -2
  204. package/src/components/ItaliaTheme/Blocks/UOSearch/Sidebar.jsx +16 -0
  205. package/src/components/ItaliaTheme/Blocks/__tests__/Accordion.test.jsx +0 -3
  206. package/src/components/ItaliaTheme/BrandText/BrandText.jsx +31 -7
  207. package/src/components/ItaliaTheme/BrandTextFooter/BrandTextFooter.jsx +31 -2
  208. package/src/components/ItaliaTheme/Breadcrumbs/Breadcrumbs.jsx +16 -8
  209. package/src/components/ItaliaTheme/Cards/CardCategory.jsx +2 -3
  210. package/src/components/ItaliaTheme/Cards/CardPersona.jsx +5 -8
  211. package/src/components/ItaliaTheme/CustomerSatisfaction/FeedbackForm.jsx +27 -23
  212. package/src/components/ItaliaTheme/CustomerSatisfaction/Steps/AnswersStep.jsx +1 -0
  213. package/src/components/ItaliaTheme/CustomerSatisfaction/Steps/CommentsStep.jsx +1 -0
  214. package/src/components/ItaliaTheme/Footer/FooterInfos.jsx +5 -4
  215. package/src/components/ItaliaTheme/Footer/FooterMain.jsx +4 -4
  216. package/src/components/ItaliaTheme/Footer/FooterSmall.jsx +10 -5
  217. package/src/components/ItaliaTheme/Header/HeaderCenter.jsx +5 -6
  218. package/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx +9 -1
  219. package/src/components/ItaliaTheme/Header/HeaderSearch/SearchModal.jsx +21 -4
  220. package/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx +32 -9
  221. package/src/components/ItaliaTheme/Header/HeaderSlim/LoginButton.jsx +1 -1
  222. package/src/components/ItaliaTheme/Header/HeaderSlim/TertiaryMenu.jsx +2 -2
  223. package/src/components/ItaliaTheme/Header/ParentSiteMenu.jsx +17 -2
  224. package/src/components/ItaliaTheme/Icons/DesignIcon.jsx +80 -29
  225. package/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx +2 -0
  226. package/src/components/ItaliaTheme/LoginAgid/LoginAgid.jsx +2 -5
  227. package/src/components/ItaliaTheme/Logo/Logo.jsx +15 -7
  228. package/src/components/ItaliaTheme/LogoFooter/LogoFooter.jsx +11 -3
  229. package/src/components/ItaliaTheme/MegaMenu/MegaMenu.jsx +5 -1
  230. package/src/components/ItaliaTheme/Pagination/Pagination.jsx +5 -1
  231. package/src/components/ItaliaTheme/Pagination/PaginationItem.jsx +15 -1
  232. package/src/components/ItaliaTheme/ScrollToTop/ScrollToTop.jsx +0 -1
  233. package/src/components/ItaliaTheme/Search/Search.jsx +2 -3
  234. package/src/components/ItaliaTheme/SkipLinks/SkipLinks.jsx +21 -11
  235. package/src/components/ItaliaTheme/Slider/NextArrow.jsx +1 -1
  236. package/src/components/ItaliaTheme/Slider/PrevArrow.jsx +1 -1
  237. package/src/components/ItaliaTheme/Slider/SingleSlideWrapper.jsx +5 -2
  238. package/src/components/ItaliaTheme/Unauthorized/Unauthorized.jsx +2 -5
  239. package/src/components/ItaliaTheme/View/BandoView/BandoApprofondimenti.jsx +1 -1
  240. package/src/components/ItaliaTheme/View/BandoView/BandoView.jsx +19 -1
  241. package/src/components/ItaliaTheme/View/Commons/Actions.jsx +2 -2
  242. package/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx +1 -1
  243. package/src/components/ItaliaTheme/View/Commons/Attachment.jsx +1 -1
  244. package/src/components/ItaliaTheme/View/Commons/BandoDates.jsx +27 -47
  245. package/src/components/ItaliaTheme/View/Commons/ContactsCard.jsx +2 -31
  246. package/src/components/ItaliaTheme/View/Commons/Dates.jsx +62 -28
  247. package/src/components/ItaliaTheme/View/Commons/Events.jsx +28 -27
  248. package/src/components/ItaliaTheme/View/Commons/Gallery.jsx +36 -28
  249. package/src/components/ItaliaTheme/View/Commons/GenericCard.jsx +14 -13
  250. package/src/components/ItaliaTheme/View/Commons/HelpBox.jsx +1 -1
  251. package/src/components/ItaliaTheme/View/Commons/LocationItem.jsx +15 -9
  252. package/src/components/ItaliaTheme/View/Commons/LocationsMap.jsx +4 -18
  253. package/src/components/ItaliaTheme/View/Commons/Module.jsx +22 -31
  254. package/src/components/ItaliaTheme/View/Commons/Modules.jsx +3 -1
  255. package/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx +7 -3
  256. package/src/components/ItaliaTheme/View/Commons/PageHeader/PageHeader.jsx +3 -4
  257. package/src/components/ItaliaTheme/View/Commons/PageHeader/PageHeaderBando.jsx +3 -0
  258. package/src/components/ItaliaTheme/View/Commons/PageHeader/PageHeaderDates.jsx +0 -10
  259. package/src/components/ItaliaTheme/View/Commons/PageHeader/PageHeaderEventDates.jsx +62 -14
  260. package/src/components/ItaliaTheme/View/Commons/PageHeader/PageHeaderTassonomiaArgomenti.jsx +4 -5
  261. package/src/components/ItaliaTheme/View/Commons/RelatedArticles.jsx +12 -1
  262. package/src/components/ItaliaTheme/View/Commons/RelatedItemInEvidence/RelatedItemInEvidence.jsx +14 -1
  263. package/src/components/ItaliaTheme/View/Commons/RelatedItems.jsx +11 -3
  264. package/src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx +5 -2
  265. package/src/components/ItaliaTheme/View/Commons/Sharing.jsx +1 -1
  266. package/src/components/ItaliaTheme/View/Commons/SideMenu.jsx +11 -7
  267. package/src/components/ItaliaTheme/View/Commons/Sponsors.jsx +14 -10
  268. package/src/components/ItaliaTheme/View/Commons/VenuesSmall.jsx +13 -6
  269. package/src/components/ItaliaTheme/View/Commons/__tests__/Dates.test.jsx +1 -1
  270. package/src/components/ItaliaTheme/View/DocumentoView/DocumentoAccedereServizio.jsx +5 -8
  271. package/src/components/ItaliaTheme/View/DocumentoView/DocumentoView.jsx +20 -1
  272. package/src/components/ItaliaTheme/View/EventoView/EventoContatti.jsx +8 -7
  273. package/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx +1 -12
  274. package/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno.jsx +1 -12
  275. package/src/components/ItaliaTheme/View/EventoView/EventoCosE.jsx +17 -2
  276. package/src/components/ItaliaTheme/View/EventoView/EventoOrganizzatoDa.jsx +38 -0
  277. package/src/components/ItaliaTheme/View/EventoView/EventoPatrocinatoDa.jsx +38 -0
  278. package/src/components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni.jsx +0 -22
  279. package/src/components/ItaliaTheme/View/EventoView/EventoView.jsx +20 -1
  280. package/src/components/ItaliaTheme/View/FAQ/FaqFolder/SearchBar.jsx +7 -0
  281. package/src/components/ItaliaTheme/View/IncaricoView/IncaricoView.jsx +47 -8
  282. package/src/components/ItaliaTheme/View/NewsItemView/NewsItemText.jsx +33 -10
  283. package/src/components/ItaliaTheme/View/NewsItemView/NewsItemView.jsx +19 -1
  284. package/src/components/ItaliaTheme/View/PageView/PageView.jsx +3 -0
  285. package/src/components/ItaliaTheme/View/PageView/Placeholder/HeaderEnd.jsx +6 -0
  286. package/src/components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoView.jsx +15 -36
  287. package/src/components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks.jsx +14 -1
  288. package/src/components/ItaliaTheme/View/PersonaView/PersonaDocumenti.jsx +106 -0
  289. package/src/components/ItaliaTheme/View/PersonaView/PersonaRuolo.jsx +85 -60
  290. package/src/components/ItaliaTheme/View/PersonaView/PersonaView.jsx +20 -1
  291. package/src/components/ItaliaTheme/View/PuntoDiContattoView/PuntoDiContattoView.jsx +2 -2
  292. package/src/components/ItaliaTheme/View/ServizioView/ServizioAccedi.jsx +5 -1
  293. package/src/components/ItaliaTheme/View/ServizioView/ServizioCondizioni.jsx +5 -1
  294. package/src/components/ItaliaTheme/View/ServizioView/ServizioMetatag.jsx +9 -1
  295. package/src/components/ItaliaTheme/View/ServizioView/ServizioView.jsx +19 -2
  296. package/src/components/ItaliaTheme/View/UOView/UOMetadati.jsx +12 -0
  297. package/src/components/ItaliaTheme/View/UOView/UOServices.jsx +20 -2
  298. package/src/components/ItaliaTheme/View/UOView/UOView.jsx +23 -1
  299. package/src/components/ItaliaTheme/View/VenueView/VenueView.jsx +24 -11
  300. package/src/components/ItaliaTheme/View/VenueView/VenueWhere.jsx +1 -1
  301. package/src/components/ItaliaTheme/View/ViewUtils.jsx +1 -2
  302. package/src/components/ItaliaTheme/View/__tests__/ServizioTempiScadenze.test.jsx +0 -1
  303. package/src/components/ItaliaTheme/View/index.js +2 -0
  304. package/src/components/ItaliaTheme/index.js +1 -1
  305. package/src/components/ItaliaTheme/manage/Widgets/HtmlSlateWidget.jsx +4 -2
  306. package/src/components/ItaliaTheme/manage/Widgets/SearchSectionsConfigurationWidget/SearchSectionsConfigurationForm.jsx +2 -2
  307. package/src/components/SelectInput/SelectInput.jsx +10 -4
  308. package/src/components/TextInput.jsx +1 -0
  309. package/src/components/__tests__/FormValidation.test.js +132 -0
  310. package/src/config/Blocks/ListingOptions/attachmentCardTemplate.js +1 -1
  311. package/src/config/Slate/Blockquote/index.js +7 -0
  312. package/src/config/Views/views.js +1 -0
  313. package/src/config/italiaConfig.js +77 -20
  314. package/src/customizations/volto/actions/vocabularies/vocabularies.js +102 -0
  315. package/src/customizations/volto/components/manage/AnchorPlugin/components/LinkButton/AddLinkForm.jsx +1 -0
  316. package/src/customizations/volto/components/manage/Blocks/Listing/ListingBody.jsx +5 -0
  317. package/src/customizations/volto/components/manage/Blocks/Search/SearchBlockView.jsx +50 -11
  318. package/src/customizations/volto/components/manage/Blocks/Search/components/DateRangeFacet.jsx +16 -2
  319. package/src/customizations/volto/components/manage/Blocks/Search/components/SearchDetails.jsx +2 -3
  320. package/src/customizations/volto/components/manage/Blocks/Search/hocs/withSearch.jsx +6 -4
  321. package/src/customizations/volto/components/manage/Blocks/Search/layout/LeftColumnFacets.jsx +21 -17
  322. package/src/customizations/volto/components/manage/Blocks/Search/layout/RightColumnFacets.jsx +21 -17
  323. package/src/customizations/volto/components/manage/Blocks/Search/schema.js +16 -0
  324. package/src/customizations/volto/components/manage/Blocks/Video/Body.jsx +6 -5
  325. package/src/customizations/volto/components/manage/Contents/ContentsUploadModal.jsx +375 -0
  326. package/src/customizations/volto/components/manage/Controlpanels/Groups/GroupsControlpanel.jsx +709 -0
  327. package/src/customizations/volto/components/manage/Controlpanels/Groups/RenderGroups.jsx +122 -0
  328. package/src/customizations/volto/components/manage/Diff/DiffField.jsx +2 -3
  329. package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +34 -23
  330. package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/EndField.jsx +18 -11
  331. package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +237 -116
  332. package/src/customizations/volto/components/theme/Error/Error.jsx +86 -0
  333. package/src/customizations/volto/components/theme/Footer/Footer.jsx +17 -16
  334. package/src/customizations/volto/components/theme/Navigation/Navigation.jsx +22 -7
  335. package/src/customizations/volto/components/theme/View/LinkView.jsx +81 -0
  336. package/src/customizations/volto/components/theme/View/ListingView.jsx +3 -3
  337. package/src/{components/ItaliaTheme/RemoveBodyClass/RemoveBodyClass.jsx → customizations/volto/helpers/BodyClass/BodyClass.jsx} +19 -25
  338. package/src/customizations/volto/helpers/FormValidation/FormValidation.js +10 -7
  339. package/src/customizations/volto/helpers/Html/Html.jsx +2 -2
  340. package/src/customizations/volto-form-block/components/Field.jsx +7 -0
  341. package/src/customizations/volto-form-block/components/FormResult.jsx +43 -9
  342. package/src/customizations/volto-form-block/components/FormView.jsx +45 -41
  343. package/src/customizations/volto-form-block/components/Sidebar.jsx +328 -0
  344. package/src/customizations/volto-form-block/components/View.jsx +398 -0
  345. package/src/customizations/volto-form-block/fieldSchema.js +519 -0
  346. package/src/customizations/volto-form-block/formSchema.js +255 -0
  347. package/src/helpers/ListingHelper.js +1 -1
  348. package/src/helpers/blocks.js +0 -6
  349. package/src/helpers/dates.js +30 -2
  350. package/src/helpers/files.js +9 -2
  351. package/src/helpers/files.test.js +90 -0
  352. package/src/helpers/getItemsByPath.js +23 -1
  353. package/src/helpers/images.js +77 -0
  354. package/src/helpers/index.js +11 -0
  355. package/src/helpers/url.js +22 -0
  356. package/src/helpers/usePaginatedItemsSection.hook.ts +63 -0
  357. package/src/overrideTranslations.jsx +68 -0
  358. package/src/theme/ItaliaTheme/Addons/volto-gdpr-privacy.scss +0 -18
  359. package/src/theme/ItaliaTheme/Blocks/_accordion.scss +5 -4
  360. package/src/theme/ItaliaTheme/Blocks/_alert.scss +6 -11
  361. package/src/theme/ItaliaTheme/Blocks/_cardWithImage.scss +7 -2
  362. package/src/theme/ItaliaTheme/Blocks/_cardWithSlideUpTextTemplate.scss +19 -1
  363. package/src/theme/ItaliaTheme/Blocks/_contacts.scss +10 -34
  364. package/src/theme/ItaliaTheme/Blocks/_countdown.scss +10 -1
  365. package/src/theme/ItaliaTheme/Blocks/_ctaBlock.scss +8 -10
  366. package/src/theme/ItaliaTheme/Blocks/_form.scss +38 -32
  367. package/src/theme/ItaliaTheme/Blocks/_gridBlock.scss +39 -23
  368. package/src/theme/ItaliaTheme/Blocks/_iconBlocks.scss +10 -51
  369. package/src/theme/ItaliaTheme/Blocks/_inEvidenceTemplate.scss +1 -1
  370. package/src/theme/ItaliaTheme/Blocks/_listing.scss +0 -3
  371. package/src/theme/ItaliaTheme/Blocks/_numbers.scss +5 -15
  372. package/src/theme/ItaliaTheme/Blocks/_photogallerytemplate.scss +2 -2
  373. package/src/theme/ItaliaTheme/Blocks/_search.scss +20 -2
  374. package/src/theme/ItaliaTheme/Blocks/_sliderTemplate.scss +4 -4
  375. package/src/theme/ItaliaTheme/Blocks/_subblocks-edit.scss +3 -1
  376. package/src/theme/ItaliaTheme/Blocks/common/_searchBlockFilters.scss +10 -2
  377. package/src/theme/ItaliaTheme/Components/_card.scss +27 -7
  378. package/src/theme/ItaliaTheme/Components/_cardLocationItem.scss +12 -0
  379. package/src/theme/ItaliaTheme/Components/_cardPersona.scss +21 -1
  380. package/src/theme/ItaliaTheme/Components/_metadata.scss +1 -0
  381. package/src/theme/ItaliaTheme/Components/_mobileMenu.scss +12 -16
  382. package/src/theme/ItaliaTheme/Components/_pager.scss +10 -0
  383. package/src/theme/ItaliaTheme/Print/_all_pages.scss +98 -15
  384. package/src/theme/ItaliaTheme/Print/_blocks.scss +915 -8
  385. package/src/theme/ItaliaTheme/Print/_page.scss +1 -7
  386. package/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Blocks/_contacts.scss +3 -0
  387. package/src/theme/ItaliaTheme/Views/_common.scss +27 -0
  388. package/src/theme/ItaliaTheme/Views/_servizio.scss +6 -0
  389. package/src/theme/ItaliaTheme/Views/_slider.scss +4 -0
  390. package/src/theme/ItaliaTheme/Widgets/_blocksWidget.scss +37 -0
  391. package/src/theme/ItaliaTheme/Widgets/_reactSelect.scss +5 -1
  392. package/src/theme/ItaliaTheme/_ar.scss +3 -2
  393. package/src/theme/ItaliaTheme/_common.scss +11 -6
  394. package/src/theme/ItaliaTheme/_home.scss +4 -6
  395. package/src/theme/ItaliaTheme/_main.scss +51 -1
  396. package/src/theme/ItaliaTheme/_white-header.scss +1 -1
  397. package/src/theme/_cms-ui.scss +150 -31
  398. package/src/theme/_mixins.scss +13 -0
  399. package/src/theme/_site-variables.scss +5 -6
  400. package/src/theme/bootstrap-override/_bootstrap-italia-site.scss +3 -0
  401. package/src/theme/bootstrap-override/bootstrap/_print.scss +1 -0
  402. package/src/theme/bootstrap-override/bootstrap-italia/_avatar.scss +28 -0
  403. package/src/theme/bootstrap-override/bootstrap-italia/_buttons.scss +18 -0
  404. package/src/theme/bootstrap-override/bootstrap-italia/_card.scss +12 -2
  405. package/src/theme/bootstrap-override/bootstrap-italia/_focus.scss +23 -0
  406. package/src/theme/bootstrap-override/bootstrap-italia/_footer.scss +1 -1
  407. package/src/theme/bootstrap-override/bootstrap-italia/_form-select.scss +17 -0
  408. package/src/theme/bootstrap-override/bootstrap-italia/_forms.scss +7 -0
  409. package/src/theme/bootstrap-override/bootstrap-italia/_headercenter.scss +19 -5
  410. package/src/theme/extras/_modals.scss +13 -0
  411. package/src/theme/extras/_search.scss +5 -0
  412. package/src/theme/extras/_tables.scss +12 -13
  413. package/src/theme/site.scss +0 -3
  414. package/.github/workflows/slate.yml +0 -47
  415. package/.yarn/cache/braces-npm-3.0.2-782240b28a-e2a8e769a8.zip +0 -0
  416. package/.yarn/cache/cross-spawn-npm-7.0.3-e4ff3e65b3-671cc7c728.zip +0 -0
  417. package/.yarn/cache/fill-range-npm-7.0.1-b8b1817caa-cc283f4e65.zip +0 -0
  418. package/.yarn/cache/fsevents-patch-3340e2eb10-8.zip +0 -0
  419. package/.yarn/cache/micromatch-npm-4.0.5-cfab5d7669-02a17b671c.zip +0 -0
  420. package/.yarn/cache/nanoid-npm-3.3.6-e6d6ae7e71-7d0eda6570.zip +0 -0
  421. package/.yarn/cache/volto-blocks-widget-npm-3.4.0-a61b810f4f-355675359c.zip +0 -0
  422. package/.yarn/cache/volto-editablefooter-npm-5.1.1-a6579f67d9-c9a2e1f96f.zip +0 -0
  423. package/.yarn/cache/volto-gdpr-privacy-npm-2.2.0-6be0f74d53-8a93254251.zip +0 -0
  424. package/.yarn/cache/volto-multilingual-widget-npm-3.0.0-58c1ce4fb7-3fa0611e79.zip +0 -0
  425. package/.yarn/cache/volto-subsites-npm-4.0.0-17412b8f3b-9f943abc00.zip +0 -0
  426. package/src/customizations/volto/components/manage/BlockChooser/BlockChooserButton.jsx +0 -157
  427. package/src/customizations/volto/components/theme/View/disabled_View.jsx +0 -308
  428. package/src/customizations/volto/helpers/Api/disabled_Api.js +0 -131
  429. package/src/theme/ItaliaTheme/Components/_logo.scss +0 -10
  430. package/src/theme/ItaliaTheme/Print/_bandi.scss +0 -9
  431. package/src/theme/ItaliaTheme/Print/_news_items.scss +0 -19
  432. /package/src/components/ItaliaTheme/View/{__tests__/IncaricoView.test.jsx → __disabled_tests__/IncaricoView.test__disabled.jsx} +0 -0
@@ -0,0 +1,255 @@
1
+ // CUSTOMIZATION:
2
+ // - added field to set a subscription limit
3
+ import { defineMessages } from 'react-intl';
4
+ import { useIntl } from 'react-intl';
5
+
6
+ const messages = defineMessages({
7
+ form: {
8
+ id: 'form',
9
+ defaultMessage: 'Form',
10
+ },
11
+ title: {
12
+ id: 'title',
13
+ defaultMessage: 'Title',
14
+ },
15
+ description: {
16
+ id: 'description',
17
+ defaultMessage: 'Description',
18
+ },
19
+ default_to: {
20
+ id: 'form_to',
21
+ defaultMessage: 'Recipients',
22
+ },
23
+ default_from: {
24
+ id: 'form_default_from',
25
+ defaultMessage: 'Default sender',
26
+ },
27
+ default_subject: {
28
+ id: 'form_default_subject',
29
+ defaultMessage: 'Mail subject',
30
+ },
31
+ default_subject_description: {
32
+ id: 'form_default_subject_description',
33
+ defaultMessage:
34
+ 'Use the ${field_id} syntax to add a form value to the email subject',
35
+ },
36
+ submit_label: {
37
+ id: 'form_submit_label',
38
+ defaultMessage: 'Submit button label',
39
+ },
40
+ show_cancel: {
41
+ id: 'form_show_cancel',
42
+ defaultMessage: 'Show cancel button',
43
+ },
44
+ set_limit: {
45
+ id: 'form_set_limit',
46
+ defaultMessage: 'Set a submission limit',
47
+ },
48
+ limit: {
49
+ id: 'form_limit',
50
+ defaultMessage: 'Submission limit',
51
+ },
52
+ cancel_label: {
53
+ id: 'form_cancel_label',
54
+ defaultMessage: 'Cancel button label',
55
+ },
56
+ captcha: {
57
+ id: 'captcha',
58
+ defaultMessage: 'Captcha provider',
59
+ },
60
+ store: {
61
+ id: 'form_save_persistent_data',
62
+ defaultMessage: 'Store compiled data',
63
+ },
64
+ remove_data_after_days: {
65
+ id: 'form_remove_data_after_days',
66
+ defaultMessage: 'Data wipe',
67
+ },
68
+ remove_data_after_days_helptext: {
69
+ id: 'form_remove_data_after_days_helptext',
70
+ defaultMessage: 'Number of days after which, the data should be deleted',
71
+ },
72
+ attachmentSendEmail: {
73
+ id: 'form_attachment_send_email_info_text',
74
+ defaultMessage: 'Attached file will be sent via email, but not stored',
75
+ },
76
+ send: {
77
+ id: 'form_send_email',
78
+ defaultMessage: 'Send email to recipient',
79
+ },
80
+ send_message: {
81
+ id: 'form_send_message',
82
+ defaultMessage: 'Message of sending confirmed',
83
+ },
84
+ send_message_helptext: {
85
+ id: 'form_send_message_helptext',
86
+ defaultMessage:
87
+ 'You can add the value of a filled field in the form by inserting its ID between curly brackets preceded by $, example: ${field_id}; you can add also html elements such as links <a>, new line <br />, bold <b> and italic <i> formatting.',
88
+ },
89
+ manage_data: {
90
+ id: 'form_manage_data',
91
+ defaultMessage: 'Manage data',
92
+ },
93
+ mail_header_label: {
94
+ id: 'mail_header_label',
95
+ defaultMessage: 'Text at the beginning of the email',
96
+ },
97
+ mail_header_footer_description: {
98
+ id: 'mail_header_description',
99
+ defaultMessage: "If field isn't filled in, a default text will be used",
100
+ },
101
+ mail_footer_label: {
102
+ id: 'mail_footer_label',
103
+ defaultMessage: 'Text at the end of the email',
104
+ },
105
+ email_otp_verification: {
106
+ id: 'form_email_otp_verification',
107
+ defaultMessage: 'Validate BCC emails with OTP verification',
108
+ },
109
+ email_otp_verification_description: {
110
+ id: 'form_email_otp_verification_description',
111
+ defaultMessage:
112
+ "Prevent spam from your website. By enabling this option, you do not allow malicious users to send emails to other email addresses through your website. The OTP will be requested for all email-type fields for which the 'Send a copy of the email to this address' option is checked.",
113
+ },
114
+ });
115
+
116
+ const Schema = (data) => {
117
+ var intl = useIntl();
118
+
119
+ let conditional_required = [];
120
+ if (!data.store && !data.send) {
121
+ conditional_required.push('store');
122
+ conditional_required.push('send');
123
+ }
124
+
125
+ return {
126
+ title: intl.formatMessage(messages.form),
127
+ fieldsets: [
128
+ {
129
+ id: 'default',
130
+ title: 'Default',
131
+ fields: [
132
+ 'title',
133
+ 'description',
134
+ 'default_to',
135
+ 'default_from',
136
+ 'default_subject',
137
+ 'submit_label',
138
+ 'show_cancel',
139
+ ...(data?.show_cancel ? ['cancel_label'] : []),
140
+ 'set_limit',
141
+ ...(data?.set_limit ? ['limit'] : []),
142
+ 'email_otp_verification',
143
+ 'mail_header',
144
+ 'mail_footer',
145
+ 'captcha',
146
+ ],
147
+ },
148
+ {
149
+ id: 'manage_data',
150
+ title: intl.formatMessage(messages.manage_data),
151
+ fields: ['store', 'remove_data_after_days', 'send', 'send_message'],
152
+ },
153
+ ],
154
+ properties: {
155
+ title: {
156
+ title: intl.formatMessage(messages.title),
157
+ },
158
+ description: {
159
+ title: intl.formatMessage(messages.description),
160
+ type: 'textarea',
161
+ },
162
+ default_to: {
163
+ title: intl.formatMessage(messages.default_to),
164
+ },
165
+ default_from: {
166
+ title: intl.formatMessage(messages.default_from),
167
+ },
168
+ default_subject: {
169
+ title: intl.formatMessage(messages.default_subject),
170
+ description: intl.formatMessage(messages.default_subject_description),
171
+ },
172
+ submit_label: {
173
+ title: intl.formatMessage(messages.submit_label),
174
+ },
175
+ show_cancel: {
176
+ type: 'boolean',
177
+ title: intl.formatMessage(messages.show_cancel),
178
+ default: false,
179
+ },
180
+ set_limit: {
181
+ type: 'boolean',
182
+ title: intl.formatMessage(messages.set_limit),
183
+ default: false,
184
+ },
185
+ limit: {
186
+ title: intl.formatMessage(messages.limit),
187
+ default: -1,
188
+ },
189
+ cancel_label: {
190
+ title: intl.formatMessage(messages.cancel_label),
191
+ },
192
+ mail_header: {
193
+ title: intl.formatMessage(messages.mail_header_label),
194
+ widget: 'richtext',
195
+ type: 'string',
196
+ description: intl.formatMessage(
197
+ messages.mail_header_footer_description,
198
+ ),
199
+ },
200
+ mail_footer: {
201
+ title: intl.formatMessage(messages.mail_footer_label),
202
+ widget: 'richtext',
203
+ type: 'string',
204
+ description: intl.formatMessage(
205
+ messages.mail_header_footer_description,
206
+ ),
207
+ },
208
+ captcha: {
209
+ title: intl.formatMessage(messages.captcha),
210
+ type: 'string',
211
+ vocabulary: {
212
+ '@id': 'collective.volto.formsupport.captcha.providers',
213
+ },
214
+ },
215
+ email_otp_verification: {
216
+ type: 'boolean',
217
+ title: intl.formatMessage(messages.email_otp_verification),
218
+ description: intl.formatMessage(
219
+ messages.email_otp_verification_description,
220
+ ),
221
+ default: false,
222
+ },
223
+ store: {
224
+ type: 'boolean',
225
+ title: intl.formatMessage(messages.store),
226
+ },
227
+ remove_data_after_days: {
228
+ type: 'integer',
229
+ title: intl.formatMessage(messages.remove_data_after_days),
230
+ description: intl.formatMessage(
231
+ messages.remove_data_after_days_helptext,
232
+ ),
233
+ default: -1,
234
+ },
235
+ send: {
236
+ type: 'boolean',
237
+ title: intl.formatMessage(messages.send),
238
+ description: intl.formatMessage(messages.attachmentSendEmail),
239
+ },
240
+ send_message: {
241
+ title: intl.formatMessage(messages.send_message),
242
+ widget: 'textarea',
243
+ description: intl.formatMessage(messages.send_message_helptext),
244
+ },
245
+ },
246
+ required: [
247
+ 'default_to',
248
+ 'default_from',
249
+ 'default_subject',
250
+ 'captcha',
251
+ ...conditional_required,
252
+ ],
253
+ };
254
+ };
255
+ export default Schema;
@@ -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']) : '#'}
@@ -58,12 +58,6 @@ export const useHandleDetachedBlockFocus = (
58
58
  }
59
59
  }, [selected]);
60
60
 
61
- useEffect(() => {
62
- if (!selected && selectedField && onSelectBlock) {
63
- onSelectBlock(block);
64
- }
65
- }, [selectedField]);
66
-
67
61
  useEffect(() => {
68
62
  const handleEnter = (e) => {
69
63
  if (selected && !selectedField) {
@@ -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,31 @@ export const getRealStartAndEndWithRecurrence = (
45
45
  ),
46
46
  };
47
47
  };
48
+
49
+ export const getRealEventEnd = (content, rruleSet) => {
50
+ let actualEndDate = content.end;
51
+
52
+ if (content.recurrence && rruleSet.rrules()[0].options.until) {
53
+ actualEndDate = rruleSet.rrules()[0].options.until;
54
+ }
55
+ return actualEndDate;
56
+ };
57
+
58
+ export const getRecurrenceExceptionDates = (rruleSet) => {
59
+ const rdates = rruleSet?.rdates() ?? [];
60
+ const exdates = rruleSet?.exdates() ?? [];
61
+
62
+ const additionalDates = rdates.reduce((acc, curr) => {
63
+ const isExdate = exdates.some((b) => b.toString() === curr.toString());
64
+ if (!isExdate) {
65
+ return [...acc, curr];
66
+ } else return acc;
67
+ }, []);
68
+
69
+ const exceptionDates = {
70
+ additionalDates: additionalDates,
71
+ removedDates: exdates,
72
+ };
73
+
74
+ return exceptionDates;
75
+ };
@@ -119,11 +119,18 @@ export const FILE_EXTENSIONS = {
119
119
  icon: { lib: '', name: faFileOdp, svg_format: true },
120
120
  format_name: 'ODP',
121
121
  },
122
+ pdf: {
123
+ icon: { lib: 'far', name: 'file-pdf' },
124
+ format_name: 'PDF',
125
+ },
122
126
  };
123
127
 
124
128
  export const getFileViewFormat = (file) => {
125
- const regexEx = /(?:\.([^.]+))?$/;
126
- const fileExtension = regexEx.exec(file.filename)[1];
129
+ const cleanedFilename = (file.filename || '').split(/\/[@?#]/)[0];
130
+ const regexEx = /\.([a-zA-Z0-9]+)$/;
131
+
132
+ const match = regexEx.exec(cleanedFilename);
133
+ const fileExtension = match ? match[1] : null;
127
134
  const typeOfContent = file['content-type'] ?? file['mime_type'];
128
135
 
129
136
  const viewFormat = {
@@ -0,0 +1,90 @@
1
+ import { getFileViewFormat, FILE_EXTENSIONS, FILE_FORMATS } from './files';
2
+
3
+ describe('getFileViewFormat', () => {
4
+ test('should correctly extract the extension and match the icon for a valid PDF URL with multiple segments after the extension', () => {
5
+ const file = {
6
+ filename:
7
+ 'https://example.com/amministrazione/documenti-e-dati/modulistica/area-servizi-educativi-e-scolastici/intestazione-ripartizione-rette/modulo_intestazione_ripartizione_rette_nona_784_9690.pdf/@@download/file_principale',
8
+ 'content-type': 'application/pdf',
9
+ };
10
+
11
+ const result = getFileViewFormat(file);
12
+
13
+ expect(result.icon).toEqual(FILE_EXTENSIONS.pdf.icon); // Verifica che l'icona sia corretta
14
+ expect(result.label).toEqual(FILE_EXTENSIONS.pdf.format_name); // Verifica che il formato sia corretto
15
+ });
16
+
17
+ test('should correctly handle a PDF URL without multiple segments after the extension', () => {
18
+ const file = {
19
+ filename:
20
+ 'https://example.com/amministrazione/documenti-e-dati/modulistica/area-servizi-educativi-e-scolastici/intestazione-ripartizione-rette/modulo_intestazione_ripartizione_rette_nona_784_9690.pdf/@@download/filehttps://example.com/amministrazione/documenti-e-dati/modulistica/area-servizi-educativi-e-scolastici/intestazione-ripartizione-rette/modulo_intestazione_ripartizione_rette_nona_784_9690.pdf',
21
+ 'content-type': 'application/pdf',
22
+ };
23
+
24
+ const result = getFileViewFormat(file);
25
+
26
+ expect(result.icon).toEqual(FILE_EXTENSIONS.pdf.icon);
27
+ expect(result.label).toEqual(FILE_EXTENSIONS.pdf.format_name);
28
+ });
29
+
30
+ test('should return correct format for a non-PDF file extension', () => {
31
+ const file = {
32
+ filename: 'https://example.com/file/example.xsd',
33
+ 'content-type': 'application/xml',
34
+ };
35
+
36
+ const result = getFileViewFormat(file);
37
+
38
+ expect(result.icon).toEqual(FILE_EXTENSIONS.xsd.icon);
39
+ expect(result.label).toEqual(FILE_EXTENSIONS.xsd.format_name);
40
+ });
41
+
42
+ test('should return correct format for a non-PDF content-type', () => {
43
+ const file = {
44
+ filename: 'https://example.com/file/example.xml',
45
+ 'content-type': 'application/xml',
46
+ };
47
+
48
+ const result = getFileViewFormat(file);
49
+
50
+ expect(result.icon).toEqual(FILE_FORMATS['application/xml'].icon);
51
+ expect(result.label).toEqual(FILE_FORMATS['application/xml'].format_name);
52
+ });
53
+
54
+ test('should return null format when extension or content-type is not found', () => {
55
+ const file = {
56
+ filename: 'https://example.com/file/unknown.xyz',
57
+ 'content-type': 'application/unknown',
58
+ };
59
+
60
+ const result = getFileViewFormat(file);
61
+
62
+ expect(result.icon).toBeNull();
63
+ expect(result.label).toBeNull();
64
+ });
65
+
66
+ test('should handle file URLs without an extension', () => {
67
+ const file = {
68
+ filename: 'https://example.com/file/no-extension/',
69
+ 'content-type': 'text/plain',
70
+ };
71
+
72
+ const result = getFileViewFormat(file);
73
+
74
+ expect(result.icon).toEqual(FILE_FORMATS['text/plain'].icon);
75
+ expect(result.label).toEqual(FILE_FORMATS['text/plain'].format_name);
76
+ });
77
+
78
+ test('should handle case where URL is .pdf but content-type is text/plain', () => {
79
+ const file = {
80
+ filename: 'https://example.com/file/example.pdf',
81
+ 'content-type': 'text/plain',
82
+ };
83
+
84
+ const result = getFileViewFormat(file);
85
+
86
+ // La funzione dovrebbe comunque dare priorità all'estensione ".pdf" rispetto al content-type "text/plain"
87
+ expect(result.icon).toEqual(FILE_EXTENSIONS.pdf.icon); // Verifica che l'icona PDF venga restituita
88
+ expect(result.label).toEqual(FILE_EXTENSIONS.pdf.format_name); // Verifica che il formato PDF venga restituito
89
+ });
90
+ });
@@ -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;
@@ -0,0 +1,77 @@
1
+ import { useState, useEffect } from 'react';
2
+ import {
3
+ isResolveUID,
4
+ getSiteProperty,
5
+ } from 'design-comuni-plone-theme/helpers';
6
+
7
+ const FALLBACK_IMAGE_SRC =
8
+ 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA8AAAAMcCAMAAACo9Dz9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmN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9S9lHsAA9z6J7V+vaL76cUJwAC33XBV99XA1w3g1it1X/myASwBLAlgSQBLAlgCWBLAkgCWAJYEsCSAJQEsASwJYEkASwJYAlgSwJIAlgCWBLAkgCUBLAEsCWBJAEsCWAJYEsCSAJYAlgSwJIAlASwBLAlgSQBLAEsCWBLAkgCWAJYEsCSAJQEsASwJYEkASwBLAlgSwJIAlgCWBLAkgCUBLAEsCWBJAEsASwJYEsCSAJYAlgSwJIAlgCUBLAlgSQBLAEsCWBLAkgCWAJYEsCSAJYAlASwJYEkASwBLAlgSwJIAlgCWBLAkgCWAJQEsCWBJAEsASwJYEsCSAJYAlgSwJIAlgCUBLAlgSQBLAEsCWBLAEsCSAJYEsCSAJYAlASwJYEkASwBLAlgSwBLAkgCWBLAkgCWAJQEsCWBJAEsASwJYEsASwJIAlgSwJIAlgCUBLAlgSQBLAEsCWBLAEsCSAJYEsCSAJYAlASwJYAlgSQBLAlgSwBLAkgCWBLAkgCWAJQEsCWAJYEkASwJYEsASwJIAlgSwJIAlgCUBLAlgCWBJAEsCWBLAEsCSAJYEsASwj0ACWBLAkgCWAJYEsCSAJQEsASwJYEkASwBLAlgSwJIAlgCWBLAkgCUBLAEsCWBJAEsASwJYEsCSAJYAlgSwJIAlASwBLAlgSQBLAEsCWBLAkgCWAJYEsCSAJYAlASwJYEkASwBLAlgSwJIAlgCWBLAkgCWAJQEsCWBJAEsASwJYEsCSAJYAlgSwJIAlgCUBLAlgSQBLAEsCWBLAkgCWAJb0MJU+Amlu+38MX/XOo4IBUwAAAABJRU5ErkJggg==';
9
+
10
+ const FALLBACK_IMAGE_SRC_MAX_W = 200;
11
+
12
+ const getFallbackImageStyle = ({
13
+ src,
14
+ customFallbackSrc,
15
+ className,
16
+ sizes,
17
+ }) => {
18
+ const fallbackSrc = customFallbackSrc || getSiteProperty('fallbackImageSrc');
19
+ if (src === fallbackSrc) {
20
+ if (!className && sizes) return { maxWidth: sizes };
21
+ else if (!className && !sizes)
22
+ return { maxWidth: getSiteProperty('fallbackImageSrcMaxW') };
23
+ }
24
+ };
25
+
26
+ /*
27
+ Hook per l'utilizzo di immagini con fallback per immagini rotte.
28
+ NB: il backend a volte torna ./resolveuid/xxxxx se non trova il brain
29
+ dell'immagine nella property per la src. Siamo tutti d'accordo a
30
+ classificarlo come immagine rotta in questo caso.
31
+ */
32
+ const useFallbackImageSrc = ({
33
+ src,
34
+ customFallbackSrc = '',
35
+ className,
36
+ sizes,
37
+ }) => {
38
+ const [currentSrc, setCurrentSrc] = useState(
39
+ !isResolveUID(src)
40
+ ? src
41
+ : customFallbackSrc || getSiteProperty('fallbackImageSrc'),
42
+ );
43
+ useEffect(() => {
44
+ setCurrentSrc(src); // Reset the source if props change
45
+ }, [src]);
46
+
47
+ const handleError = () => {
48
+ setCurrentSrc(getSiteProperty('fallbackImageSrc'));
49
+ };
50
+ return { currentSrc, handleError, getFallbackImageStyle };
51
+ };
52
+
53
+ /*
54
+ Check if a Content item has a related image
55
+ This check is done on image_field and image_scales fields, which are
56
+ the default fields in a JSON response for a content in plone.restapi
57
+
58
+ @param {Object} item - The Plone item/brain/content
59
+ */
60
+ const contentHasImage = (item) => {
61
+ if (!item) return false;
62
+ const isFromRealObject = !item.image_scales;
63
+ const imageFieldWithDefault = item.image_field || 'image';
64
+
65
+ const image = isFromRealObject
66
+ ? item[imageFieldWithDefault]
67
+ : item.image_scales[imageFieldWithDefault]?.[0];
68
+
69
+ return Boolean(image);
70
+ };
71
+
72
+ export {
73
+ FALLBACK_IMAGE_SRC,
74
+ FALLBACK_IMAGE_SRC_MAX_W,
75
+ useFallbackImageSrc,
76
+ contentHasImage,
77
+ };
@@ -23,6 +23,8 @@ export { getItemsByPath } from 'design-comuni-plone-theme/helpers/getItemsByPath
23
23
  export {
24
24
  viewDate,
25
25
  getRealStartAndEndWithRecurrence,
26
+ getRealEventEnd,
27
+ getRecurrenceExceptionDates,
26
28
  } from 'design-comuni-plone-theme/helpers/dates';
27
29
  export { getSiteProperty } from 'design-comuni-plone-theme/helpers/config';
28
30
  export { useDebouncedEffect } from 'design-comuni-plone-theme/helpers/debounce';
@@ -53,3 +55,12 @@ export {
53
55
  export { commonSearchBlockMessages } from 'design-comuni-plone-theme/helpers/Translations/searchBlockExtendedTranslations';
54
56
  export { getComponentWithFallback } from 'design-comuni-plone-theme/helpers/registry';
55
57
  export { EnhanceLink };
58
+ export {
59
+ useHomePath,
60
+ isResolveUID,
61
+ } from 'design-comuni-plone-theme/helpers/url';
62
+ export { usePaginatedItemsSection } from 'design-comuni-plone-theme/helpers/usePaginatedItemsSection.hook.ts';
63
+ export {
64
+ useFallbackImageSrc,
65
+ contentHasImage,
66
+ } from 'design-comuni-plone-theme/helpers/images';
@@ -0,0 +1,22 @@
1
+ import { useState, useEffect } from 'react';
2
+ import { useIntl } from 'react-intl';
3
+
4
+ import config from '@plone/volto/registry';
5
+
6
+ export const useHomePath = () => {
7
+ const [path, setPath] = useState('/');
8
+
9
+ const { locale } = useIntl();
10
+
11
+ useEffect(() => {
12
+ setPath(config.settings.isMultilingual ? '/' + locale : '/');
13
+ }, [locale]);
14
+ return path;
15
+ };
16
+
17
+ const RESOLVEUID_RE = /^[./]*resolve[Uu]id\/([^/]*)\/?(.*)$/;
18
+
19
+ export function isResolveUID(url) {
20
+ const match = url?.match(RESOLVEUID_RE);
21
+ return Boolean(match);
22
+ }
@@ -0,0 +1,63 @@
1
+ import { useState, useMemo } from 'react';
2
+ import type { IntlShape } from 'react-intl';
3
+
4
+ interface usePaginatedItemsSectionProps {
5
+ data: Array<any> | null | undefined;
6
+ bSize?: number;
7
+ }
8
+
9
+ type ActivePage = {
10
+ active: boolean;
11
+ type: 'pageItem' | string;
12
+ ellipsisItem: '...' | string | null | undefined;
13
+ isPrevButtonInactive: boolean;
14
+ isForwButtonInactive: boolean;
15
+ children: number;
16
+ intl: IntlShape;
17
+ };
18
+
19
+ type PaginationFunctionExtraArgs = {
20
+ activePage: ActivePage;
21
+ onClick: (
22
+ e: MouseEvent | KeyboardEvent,
23
+ obj: PaginationFunctionExtraArgs,
24
+ ) => void;
25
+ };
26
+
27
+ export const DEFAULT_PAGINATED_CARDS_SECTION_BSIZE = 4;
28
+
29
+ function getBatches(
30
+ arr: usePaginatedItemsSectionProps['data'],
31
+ batchSize: number,
32
+ ): any[][] {
33
+ const batches = [];
34
+ if (arr) {
35
+ for (let i = 0; i < arr.length; i += batchSize) {
36
+ batches.push(arr.slice(i, i + batchSize));
37
+ }
38
+ }
39
+ return batches;
40
+ }
41
+
42
+ export function usePaginatedItemsSection({
43
+ data,
44
+ bSize = DEFAULT_PAGINATED_CARDS_SECTION_BSIZE,
45
+ }: usePaginatedItemsSectionProps) {
46
+ const [currentPage, setCurrentPage] = useState<number>(1);
47
+
48
+ const pageNumbers = data ? Math.ceil(data.length / bSize) : 0;
49
+
50
+ const onPaginationChange = (
51
+ _e: MouseEvent | KeyboardEvent,
52
+ { activePage }: PaginationFunctionExtraArgs,
53
+ ) => {
54
+ const current = activePage?.children ?? 1;
55
+ setCurrentPage(current);
56
+ };
57
+ const batches: Array<any> = useMemo(() => {
58
+ const currentIndex = currentPage - 1;
59
+ return getBatches(data, bSize)[currentIndex];
60
+ }, [data, bSize, currentPage]);
61
+
62
+ return { batches, currentPage, onPaginationChange, pageNumbers };
63
+ }