design-comuni-plone-theme 11.29.2 → 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 (227) hide show
  1. package/.github/workflows/main.yml +16 -16
  2. package/.github/workflows/npm.yml +1 -1
  3. package/.github/workflows/withnewsletter.yml +47 -0
  4. package/.release-it.json +1 -0
  5. package/.yarn/cache/@babel-helper-module-imports-npm-7.24.3-edb733448b-c23492189b.zip +0 -0
  6. package/.yarn/cache/@babel-types-npm-7.24.0-a0508cb308-4b574a37d4.zip +0 -0
  7. package/.yarn/cache/babel-plugin-lodash-npm-3.3.4-c7161075b6-044a4261e6.zip +0 -0
  8. package/.yarn/cache/braces-npm-3.0.3-582c14023c-b95aa0b3bd.zip +0 -0
  9. package/.yarn/cache/fill-range-npm-7.1.1-bf491486db-b4abfbca38.zip +0 -0
  10. package/.yarn/cache/micromatch-npm-4.0.8-c9570e4aca-79920eb634.zip +0 -0
  11. package/.yarn/cache/require-package-name-npm-2.0.1-ac9a206b63-00f4e9e467.zip +0 -0
  12. package/.yarn/install-state.gz +0 -0
  13. package/CHANGELOG.md +1728 -1659
  14. package/RELEASE.md +6 -0
  15. package/locales/de/LC_MESSAGES/volto.po +86 -19
  16. package/locales/en/LC_MESSAGES/volto.po +86 -19
  17. package/locales/es/LC_MESSAGES/volto.po +86 -19
  18. package/locales/fr/LC_MESSAGES/volto.po +86 -19
  19. package/locales/it/LC_MESSAGES/volto.po +87 -20
  20. package/locales/volto.pot +87 -20
  21. package/package.json +3 -1
  22. package/publiccode.yml +2 -2
  23. package/src/components/Collapse.jsx +1 -0
  24. package/src/components/ItaliaTheme/AppExtras/SiteSettingsExtras.jsx +0 -6
  25. package/src/components/ItaliaTheme/Blocks/Accordion/Block/EditBlock.jsx +29 -24
  26. package/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx +4 -12
  27. package/src/components/ItaliaTheme/Blocks/Accordion/Edit.jsx +118 -42
  28. package/src/components/ItaliaTheme/Blocks/Accordion/View.jsx +4 -18
  29. package/src/components/ItaliaTheme/Blocks/Alert/Edit.jsx +60 -113
  30. package/src/components/ItaliaTheme/Blocks/Alert/Sidebar.jsx +1 -0
  31. package/src/components/ItaliaTheme/Blocks/Alert/View.jsx +5 -14
  32. package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/Block.jsx +16 -11
  33. package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/Body.jsx +2 -1
  34. package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/Edit.jsx +39 -1
  35. package/src/components/ItaliaTheme/Blocks/CTABlock/Block.jsx +35 -95
  36. package/src/components/ItaliaTheme/Blocks/Callout/Edit.jsx +108 -0
  37. package/src/components/ItaliaTheme/Blocks/Callout/Sidebar.jsx +173 -0
  38. package/src/components/ItaliaTheme/Blocks/Callout/View.jsx +45 -0
  39. package/src/components/ItaliaTheme/Blocks/ContactsBlock/Block/EditBlock.jsx +86 -63
  40. package/src/components/ItaliaTheme/Blocks/ContactsBlock/Block/ViewBlock.jsx +19 -39
  41. package/src/components/ItaliaTheme/Blocks/ContactsBlock/Edit.jsx +101 -22
  42. package/src/components/ItaliaTheme/Blocks/ContactsBlock/View.jsx +13 -21
  43. package/src/components/ItaliaTheme/Blocks/CountDown/Edit.jsx +21 -25
  44. package/src/components/ItaliaTheme/Blocks/CountDown/View.jsx +6 -15
  45. package/src/components/ItaliaTheme/Blocks/IconBlocks/Block/EditBlock.jsx +52 -22
  46. package/src/components/ItaliaTheme/Blocks/IconBlocks/Block/ViewBlock.jsx +9 -29
  47. package/src/components/ItaliaTheme/Blocks/IconBlocks/Edit.jsx +108 -21
  48. package/src/components/ItaliaTheme/Blocks/IconBlocks/Sidebar.jsx +1 -9
  49. package/src/components/ItaliaTheme/Blocks/IconBlocks/View.jsx +6 -14
  50. package/src/components/ItaliaTheme/Blocks/Listing/CardWithSlideUpTextTemplate.jsx +0 -1
  51. package/src/components/ItaliaTheme/Blocks/NumbersBlock/Block/EditBlock.jsx +45 -15
  52. package/src/components/ItaliaTheme/Blocks/NumbersBlock/Block/ViewBlock.jsx +2 -18
  53. package/src/components/ItaliaTheme/Blocks/NumbersBlock/Edit.jsx +98 -11
  54. package/src/components/ItaliaTheme/Blocks/NumbersBlock/View.jsx +2 -7
  55. package/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block.jsx +35 -67
  56. package/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Edit.jsx +2 -8
  57. package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/BodyWrapper.jsx +2 -1
  58. package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/Edit.jsx +98 -84
  59. package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/View.jsx +20 -3
  60. package/src/components/ItaliaTheme/Blocks/UOSearch/Sidebar.jsx +11 -11
  61. package/src/components/ItaliaTheme/Blocks/__tests__/Accordion.test.jsx +11 -28
  62. package/src/components/ItaliaTheme/Blocks/__tests__/Alert.test.jsx +10 -14
  63. package/src/components/ItaliaTheme/Blocks/__tests__/ArgumentsInEvidence.test.jsx +20 -28
  64. package/src/components/ItaliaTheme/Blocks/__tests__/CTABlock.test.jsx +14 -29
  65. package/src/components/ItaliaTheme/Blocks/__tests__/CardWithImage.test.jsx +11 -28
  66. package/src/components/ItaliaTheme/Blocks/__tests__/ContactsBlock.test.jsx +75 -140
  67. package/src/components/ItaliaTheme/Blocks/__tests__/Countdown.test.jsx +20 -28
  68. package/src/components/ItaliaTheme/Blocks/__tests__/IconBlocks.test.jsx +22 -56
  69. package/src/components/ItaliaTheme/Blocks/__tests__/NumbersBlock.test.jsx +14 -43
  70. package/src/components/ItaliaTheme/Blocks/__tests__/SimpleCard.test.jsx +14 -30
  71. package/src/components/ItaliaTheme/BrandText/BrandText.jsx +8 -14
  72. package/src/components/ItaliaTheme/BrandTextFooter/BrandTextFooter.jsx +31 -2
  73. package/src/components/ItaliaTheme/Footer/FooterInfos.jsx +21 -8
  74. package/src/components/ItaliaTheme/Footer/FooterNavigation.jsx +3 -3
  75. package/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx +0 -7
  76. package/src/components/ItaliaTheme/Icons/Icon.jsx +0 -1
  77. package/src/components/ItaliaTheme/MegaMenu/MegaMenu.jsx +5 -1
  78. package/src/components/ItaliaTheme/View/BandoView/BandoApprofondimenti.jsx +1 -2
  79. package/src/components/ItaliaTheme/View/CartellaModulisticaView/DocRow.jsx +14 -5
  80. package/src/components/ItaliaTheme/View/Commons/Attachment.jsx +19 -3
  81. package/src/components/ItaliaTheme/View/Commons/Attachments.jsx +0 -1
  82. package/src/components/ItaliaTheme/View/Commons/DownloadFileFormat.jsx +11 -7
  83. package/src/components/ItaliaTheme/View/Commons/Gallery.jsx +1 -0
  84. package/src/components/ItaliaTheme/View/Commons/PageHeader/PageHeaderEventDates.jsx +0 -1
  85. package/src/components/ItaliaTheme/View/Commons/PageHeader/PageHeaderLinkServizio.jsx +6 -2
  86. package/src/components/ItaliaTheme/View/Commons/RichTextRender.jsx +8 -6
  87. package/src/components/ItaliaTheme/View/Commons/__tests__/RichText.test.jsx +14 -17
  88. package/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx +1 -1
  89. package/src/components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni.jsx +0 -4
  90. package/src/components/ItaliaTheme/View/ServizioView/ServizioAccedi.jsx +10 -7
  91. package/src/components/ItaliaTheme/View/ServizioView/ServizioMetatag.jsx +4 -3
  92. package/src/components/ItaliaTheme/View/__disabled_tests__/IncaricoView.test__disabled.jsx +24 -30
  93. package/src/components/ItaliaTheme/View/__tests__/CartellaModulisticaView.test.jsx +12 -1
  94. package/src/components/ItaliaTheme/View/__tests__/PageView.test.jsx +24 -2
  95. package/src/components/ItaliaTheme/View/__tests__/PersonaView.test.jsx +96 -92
  96. package/src/components/ItaliaTheme/View/__tests__/ServizioAChiSiRivolge.test.jsx +240 -286
  97. package/src/components/ItaliaTheme/View/__tests__/ServizioAccedi.test.jsx +240 -286
  98. package/src/components/ItaliaTheme/View/__tests__/ServizioCasiParticolari.test.jsx +240 -286
  99. package/src/components/ItaliaTheme/View/__tests__/ServizioComeFare.test.jsx +240 -286
  100. package/src/components/ItaliaTheme/View/__tests__/ServizioCondizioni.test.jsx +240 -286
  101. package/src/components/ItaliaTheme/View/__tests__/ServizioContatti.test.jsx +240 -286
  102. package/src/components/ItaliaTheme/View/__tests__/ServizioCosE.test.jsx +240 -286
  103. package/src/components/ItaliaTheme/View/__tests__/ServizioCosaServe.test.jsx +240 -286
  104. package/src/components/ItaliaTheme/View/__tests__/ServizioCosaSiOttiene.test.jsx +240 -286
  105. package/src/components/ItaliaTheme/View/__tests__/ServizioCostiVincoli.test.jsx +240 -286
  106. package/src/components/ItaliaTheme/View/__tests__/ServizioMetadati.test.jsx +240 -286
  107. package/src/components/ItaliaTheme/View/__tests__/ServizioModulistica.test.jsx +240 -286
  108. package/src/components/ItaliaTheme/View/__tests__/ServizioProcedure.test.jsx +240 -286
  109. package/src/components/ItaliaTheme/View/__tests__/ServizioSitiEsterni.test.jsx +240 -286
  110. package/src/components/ItaliaTheme/View/__tests__/ServizioTempiScadenze.test.jsx +240 -286
  111. package/src/components/ItaliaTheme/View/__tests__/ServizioUlterioriInformazioni.test.jsx +240 -286
  112. package/src/components/ItaliaTheme/View/__tests__/ServizioView.test.jsx +470 -560
  113. package/src/components/ItaliaTheme/View/__tests__/TrasparenzaView.test.jsx +12 -1
  114. package/src/components/ItaliaTheme/index.js +0 -1
  115. package/src/components/ItaliaTheme/manage/Widgets/ColorListWidget.jsx +11 -2
  116. package/src/components/ItaliaTheme/manage/Widgets/HtmlSlateWidget.jsx +156 -0
  117. package/src/components/ItaliaTheme/manage/Widgets/RichTextWidget.jsx +88 -0
  118. package/src/components/ItaliaTheme/manage/Widgets/SimpleTextEditorWidget.jsx +158 -0
  119. package/src/components/ItaliaTheme/manage/Widgets/TextEditorWidget.jsx +167 -270
  120. package/src/config/Blocks/ListingOptions/index.js +0 -1
  121. package/src/config/Blocks/ListingOptions/utils.js +0 -7
  122. package/src/config/Blocks/blocks.js +29 -8
  123. package/src/config/Blocks/listingVariations.js +1 -1
  124. package/src/config/Slate/Alignment/AlignMenu.jsx +169 -0
  125. package/src/config/Slate/Alignment/index.js +42 -0
  126. package/src/config/Slate/Blockquote/BlockquoteMenu.jsx +151 -0
  127. package/src/config/Slate/Blockquote/index.js +19 -0
  128. package/src/config/Slate/Headings/HeadingsMenu.jsx +139 -0
  129. package/src/config/Slate/Headings/headingsMenu.scss +44 -0
  130. package/src/config/Slate/Headings/index.js +62 -0
  131. package/src/config/Slate/Link/deserializer.js +25 -0
  132. package/src/config/Slate/Link/index.js +126 -0
  133. package/src/config/Slate/Link/renderer.jsx +99 -0
  134. package/src/config/Slate/LinkButton/index.js +47 -0
  135. package/src/config/Slate/TextLarger/index.js +51 -0
  136. package/src/config/Slate/Underline/index.js +10 -0
  137. package/src/config/Slate/config.js +43 -0
  138. package/src/config/Slate/deserializers.js +66 -0
  139. package/src/config/Slate/dropdownStyle.scss +14 -0
  140. package/src/config/Slate/dropdownUtils.js +422 -0
  141. package/src/config/Slate/extensions/breakList.js +91 -0
  142. package/src/config/Slate/handlers.js +243 -0
  143. package/src/config/Slate/utils.js +73 -0
  144. package/src/config/Widgets/widgets.js +1 -2
  145. package/src/config/italiaConfig.js +5 -53
  146. package/src/customizations/volto/components/manage/AnchorPlugin/components/LinkButton/AddLinkForm.jsx +361 -0
  147. package/src/customizations/volto/components/manage/Blocks/HeroImageLeft/Edit.jsx +75 -200
  148. package/src/customizations/volto/components/manage/Blocks/Video/Body.jsx +0 -1
  149. package/src/customizations/volto/components/manage/Blocks/Video/Edit.jsx +1 -1
  150. package/src/customizations/volto/components/manage/Form/BlocksToolbar.jsx +1 -1
  151. package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +76 -18
  152. package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +4 -0
  153. package/src/customizations/volto-form-block/components/Field.jsx +45 -22
  154. package/src/helpers/EnhanceLink.js +44 -0
  155. package/src/helpers/FormValidation/FormValidationHelpers.js +3 -0
  156. package/src/helpers/blocks.js +80 -0
  157. package/src/helpers/files.js +13 -13
  158. package/src/helpers/index.js +4 -3
  159. package/src/helpers/richTextHelper.js +10 -0
  160. package/src/icons/Group.svg +1 -0
  161. package/src/icons/blocco-icone.svg +0 -3
  162. package/src/icons/blockquote-card-dark.svg +1 -0
  163. package/src/icons/blockquote-card.svg +1 -0
  164. package/src/icons/blockquote-simple.svg +1 -0
  165. package/src/icons/text-larger.svg +1 -0
  166. package/src/theme/ItaliaTheme/Blocks/_accordion.scss +2 -22
  167. package/src/theme/ItaliaTheme/Blocks/_alert.scss +51 -4
  168. package/src/theme/ItaliaTheme/Blocks/_bandiInEvidenceTemplate.scss +1 -0
  169. package/src/theme/ItaliaTheme/Blocks/_callout.scss +32 -0
  170. package/src/theme/ItaliaTheme/Blocks/_contacts.scss +17 -51
  171. package/src/theme/ItaliaTheme/Blocks/_countdown.scss +10 -1
  172. package/src/theme/ItaliaTheme/Blocks/_ctaBlock.scss +7 -23
  173. package/src/theme/ItaliaTheme/Blocks/_gridBlock.scss +1 -1
  174. package/src/theme/ItaliaTheme/Blocks/_hero.scss +1 -8
  175. package/src/theme/ItaliaTheme/Blocks/_iconBlocks.scss +6 -77
  176. package/src/theme/ItaliaTheme/Blocks/_imageCardTextBlock.scss +3 -2
  177. package/src/theme/ItaliaTheme/Blocks/_numbers.scss +6 -20
  178. package/src/theme/ItaliaTheme/Blocks/_simpleCardTextBlock.scss +8 -2
  179. package/src/theme/ItaliaTheme/Blocks/_subblocks-edit.scss +3 -1
  180. package/src/theme/ItaliaTheme/Blocks/_tableOfContents.scss +1 -0
  181. package/src/theme/ItaliaTheme/Components/_megamenu.scss +0 -4
  182. package/src/theme/ItaliaTheme/Components/_mobileMenu.scss +12 -16
  183. package/src/theme/ItaliaTheme/Print/_page.scss +1 -1
  184. package/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Blocks/_contacts.scss +3 -0
  185. package/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Blocks/_cta.scss +1 -0
  186. package/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Blocks/_searchSections.scss +1 -0
  187. package/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_headercenter.scss +1 -0
  188. package/src/theme/ItaliaTheme/Views/_cartellaModulistica.scss +11 -2
  189. package/src/theme/ItaliaTheme/Views/_servizio.scss +2 -2
  190. package/src/theme/ItaliaTheme/Views/_slider.scss +3 -0
  191. package/src/theme/ItaliaTheme/Widgets/_iconWidget.scss +4 -0
  192. package/src/theme/ItaliaTheme/_common.scss +1 -0
  193. package/src/theme/ItaliaTheme/_home.scss +0 -4
  194. package/src/theme/ItaliaTheme/_main.scss +78 -84
  195. package/src/theme/_cms-ui.scss +63 -160
  196. package/src/theme/_mixins.scss +13 -0
  197. package/src/theme/bootstrap-override/_bootstrap-italia-site.scss +1 -0
  198. package/src/theme/bootstrap-override/bootstrap-italia/_footer.scss +1 -1
  199. package/src/theme/bootstrap-override/bootstrap-italia/_forms.scss +7 -0
  200. package/src/theme/bootstrap-override/bootstrap-italia/_headercenter.scss +8 -3
  201. package/src/theme/extras/_forms.scss +2 -14
  202. package/src/theme/site.scss +1 -1
  203. package/test-setup-config.js +58 -0
  204. package/.yarn/cache/braces-npm-3.0.2-782240b28a-e2a8e769a8.zip +0 -0
  205. package/.yarn/cache/fill-range-npm-7.0.1-b8b1817caa-cc283f4e65.zip +0 -0
  206. package/.yarn/cache/micromatch-npm-4.0.5-cfab5d7669-02a17b671c.zip +0 -0
  207. package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block.jsx +0 -151
  208. package/src/components/ItaliaTheme/RemoveBodyClass/RemoveBodyClass.jsx +0 -84
  209. package/src/config/RichTextEditor/LinkEntity.jsx +0 -27
  210. package/src/config/RichTextEditor/Plugins/AnchorPlugin/components/Link/index.jsx +0 -44
  211. package/src/config/RichTextEditor/Plugins/AnchorPlugin/components/LinkButton/AddLinkForm.jsx +0 -349
  212. package/src/config/RichTextEditor/Plugins/AnchorPlugin/components/LinkButton/index.js +0 -150
  213. package/src/config/RichTextEditor/Plugins/AnchorPlugin/index.js +0 -88
  214. package/src/config/RichTextEditor/ToolbarButtons/AlignButton.jsx +0 -61
  215. package/src/config/RichTextEditor/ToolbarButtons/ButtonsButton.jsx +0 -14
  216. package/src/config/RichTextEditor/ToolbarButtons/CalloutsButton.jsx +0 -38
  217. package/src/config/RichTextEditor/ToolbarButtons/DraftJsDropdownButton.jsx +0 -106
  218. package/src/config/RichTextEditor/ToolbarButtons/HeadingsButton.jsx +0 -57
  219. package/src/config/RichTextEditor/ToolbarButtons/TextSizeButton.jsx +0 -65
  220. package/src/config/RichTextEditor/ToolbarButtons/UnderlineButton.jsx +0 -14
  221. package/src/config/RichTextEditor/config.js +0 -253
  222. package/src/config/volto-gdpr-privacy-defaultPanelConfig.js +0 -292
  223. package/src/customizations/volto/components/manage/Blocks/ToC/View.jsx +0 -134
  224. package/src/customizations/volto/components/manage/Blocks/ToC/variations/DefaultTocRenderer.jsx +0 -99
  225. package/src/customizations/volto/config/RichTextEditor/Plugins.jsx +0 -63
  226. package/src/helpers/redraftHelper.js +0 -9
  227. package/src/theme/ItaliaTheme/Components/_logo.scss +0 -10
@@ -6,7 +6,7 @@
6
6
  * - customized to use design-react-kit elements instead semantic-ui elements
7
7
  */
8
8
 
9
- import React from 'react';
9
+ import React, { useState } from 'react';
10
10
  import PropTypes from 'prop-types';
11
11
  import { useIntl, defineMessages } from 'react-intl';
12
12
  import { Input, FormGroup, Label } from 'design-react-kit';
@@ -14,15 +14,21 @@ import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme';
14
14
 
15
15
  import FileWidget from 'design-comuni-plone-theme/components/ItaliaTheme/manage/Widgets/FileWidget';
16
16
  import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';
17
- import WysiwygWidget from '@plone/volto/components/manage/Widgets/WysiwygWidget';
18
-
17
+ import { TextBlockView } from '@plone/volto-slate/blocks/Text';
18
+ import { TextEditorWidget } from 'design-comuni-plone-theme/components/ItaliaTheme';
19
19
  import config from '@plone/volto/registry';
20
20
 
21
+ import { fromHtml } from 'design-comuni-plone-theme/config/Slate/utils';
22
+
21
23
  const messages = defineMessages({
22
24
  select_a_value: {
23
25
  id: 'form_select_a_value',
24
26
  defaultMessage: 'Seleziona un valore',
25
27
  },
28
+ static_field_placeholder: {
29
+ id: 'form_static_field_placeholder',
30
+ defaultMessage: 'Inserisci qui il testo statico da mostrare.',
31
+ },
26
32
  open_menu: {
27
33
  id: 'open_menu',
28
34
  defaultMessage: 'Apri il menu',
@@ -69,6 +75,8 @@ const Field = ({
69
75
  const intl = useIntl();
70
76
  const Select = reactSelect.default;
71
77
 
78
+ const [selected, setSelected] = useState(false);
79
+
72
80
  const getLabel = () => {
73
81
  return required ? label + ' *' : label;
74
82
  };
@@ -86,6 +94,13 @@ const Field = ({
86
94
  description
87
95
  );
88
96
 
97
+ let static_text_value = value;
98
+ if (field_type === 'static_text') {
99
+ if (value?.data) {
100
+ static_text_value = fromHtml(value);
101
+ } //per retrocompatibilità con il vecchio widget che usava draftjs
102
+ }
103
+
89
104
  return (
90
105
  <div className="field">
91
106
  {field_type === 'text' && (
@@ -328,25 +343,33 @@ const Field = ({
328
343
  autoComplete={autocomplete}
329
344
  />
330
345
  )}
331
- {field_type === 'static_text' &&
332
- (isOnEdit ? (
333
- <WysiwygWidget
334
- wrapped={false}
335
- id={name}
336
- name={name}
337
- title={label}
338
- description={description}
339
- onChange={onChange}
340
- value={value}
341
- />
342
- ) : value?.data ? (
343
- <div
344
- className="static-text"
345
- dangerouslySetInnerHTML={{ __html: value.data }}
346
- />
347
- ) : (
348
- <br />
349
- ))}
346
+
347
+ {field_type === 'static_text' && (
348
+ <>
349
+ {isOnEdit ? (
350
+ <div className="mb-2">
351
+ <TextEditorWidget
352
+ value={static_text_value}
353
+ selected={selected}
354
+ setSelected={setSelected}
355
+ placeholder={intl.formatMessage(
356
+ messages.static_field_placeholder,
357
+ )}
358
+ showToolbar={true}
359
+ onChangeBlock={(block, data) => {
360
+ onChange(name, data.value);
361
+ }}
362
+ />
363
+ </div>
364
+ ) : value ? (
365
+ <div className="static-text">
366
+ <TextBlockView id={name} data={{ value: static_text_value }} />
367
+ </div>
368
+ ) : (
369
+ <br />
370
+ )}
371
+ </>
372
+ )}
350
373
  {config.blocks.blocksConfig.form.additionalFields?.reduce((acc, val) => {
351
374
  if (val.id === field_type)
352
375
  return [
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import prettybytes from 'pretty-bytes';
3
+ import cx from 'classnames';
4
+ import { getFileViewFormat } from 'design-comuni-plone-theme/helpers';
5
+
6
+ const EnhanceLink = ({
7
+ enhanced_link_infos,
8
+ hideFileFormat = false,
9
+ className,
10
+ aria_label,
11
+ }) => {
12
+ let children = <></>;
13
+ let aria_label_extended = null;
14
+ let size =
15
+ enhanced_link_infos.getObjSize ??
16
+ prettybytes(enhanced_link_infos.size)?.toUpperCase();
17
+
18
+ if (enhanced_link_infos) {
19
+ const viewFormat = getFileViewFormat(enhanced_link_infos);
20
+ children = (
21
+ <span className={cx('enhance-link', { [className]: className })}>
22
+ {' ('}
23
+ {!hideFileFormat && (
24
+ <>
25
+ <span className="file-format">{viewFormat.label}</span> -{' '}
26
+ </>
27
+ )}
28
+ <span className="file-size">{size}</span>
29
+ {')'}
30
+ </span>
31
+ );
32
+
33
+ aria_label_extended =
34
+ (aria_label ? aria_label + ' - ' : '') +
35
+ '(' +
36
+ viewFormat.label +
37
+ ') ' +
38
+ size;
39
+ }
40
+
41
+ return { children, aria_label: aria_label_extended };
42
+ };
43
+
44
+ export default EnhanceLink;
@@ -12,6 +12,9 @@ const customValidationMessages = defineMessages({
12
12
  export const blocksFieldIsEmpty = (field) => {
13
13
  return (
14
14
  filter(field?.blocks, (block) => {
15
+ if (block?.['@type'] === 'slate') {
16
+ return !!block?.plaintext?.trim()?.length;
17
+ }
15
18
  if (block?.['@type'] === 'text') {
16
19
  return !!block?.text?.blocks?.filter((block) => !!block.text.trim())
17
20
  ?.length;
@@ -0,0 +1,80 @@
1
+ import { v4 as uuid } from 'uuid';
2
+ import { useState, useEffect } from 'react';
3
+ import config from '@plone/volto/registry';
4
+ export const cloneBlock = (blockData) => {
5
+ const blockID = uuid();
6
+ const clonedData = { ...blockData, block: blockID };
7
+ return [blockID, clonedData];
8
+ };
9
+
10
+ export const handleKeyDownOwnFocusManagement = (
11
+ e,
12
+ props,
13
+ {
14
+ disableEnter = false,
15
+ disableArrowUp = false,
16
+ disableArrowDown = false,
17
+ } = {},
18
+ ) => {
19
+ const {
20
+ index,
21
+ block,
22
+ node,
23
+ onFocusPreviousBlock = () => {},
24
+ onFocusNextBlock = () => {},
25
+ onSelectBlock = () => {},
26
+ onAddBlock = () => {},
27
+ } = props;
28
+ const isMultipleSelection = e.shiftKey;
29
+
30
+ if (e.key === 'ArrowUp' && !disableArrowUp) {
31
+ onFocusPreviousBlock(block, node, isMultipleSelection);
32
+ e.preventDefault();
33
+ }
34
+ if (e.key === 'ArrowDown' && !disableArrowDown) {
35
+ onFocusNextBlock(block, node, isMultipleSelection);
36
+ e.preventDefault();
37
+ }
38
+ if (e.key === 'Enter' && !disableEnter) {
39
+ onSelectBlock(onAddBlock(config.settings.defaultBlockType, index + 1));
40
+
41
+ e.preventDefault();
42
+ }
43
+ };
44
+
45
+ /*HOOK to handle detached blocks with own focus management*/
46
+ export const useHandleDetachedBlockFocus = (
47
+ blockProps,
48
+ defaultSelectedField,
49
+ ) => {
50
+ const [selectedField, setSelectedField] = useState(defaultSelectedField);
51
+ const { selected, onSelectBlock, block } = blockProps;
52
+
53
+ useEffect(() => {
54
+ if (selected && !selectedField) {
55
+ setSelectedField(defaultSelectedField);
56
+ } else if (!selected) {
57
+ setSelectedField(null);
58
+ }
59
+ }, [selected]);
60
+
61
+ useEffect(() => {
62
+ const handleEnter = (e) => {
63
+ if (selected && !selectedField) {
64
+ handleKeyDownOwnFocusManagement(e, blockProps);
65
+ }
66
+ };
67
+ const blockNode = blockProps.blockNode;
68
+
69
+ if (blockNode && blockNode.current) {
70
+ blockNode.current.addEventListener('keydown', handleEnter, false);
71
+ return function cleanup() {
72
+ if (blockNode?.current) {
73
+ blockNode.current.removeEventListener('keydown', handleEnter, false);
74
+ }
75
+ };
76
+ }
77
+ }, [selected, selectedField]);
78
+
79
+ return { selectedField, setSelectedField };
80
+ };
@@ -9,56 +9,56 @@ export const FILE_FORMATS = {
9
9
  'text/rtf': { icon: { lib: 'far', name: 'file-alt' }, format_name: 'rtf' },
10
10
  'application/rtf': {
11
11
  icon: { lib: 'far', name: 'file-alt' },
12
- format_name: 'rtf',
12
+ format_name: 'RTF',
13
13
  },
14
14
  'application/pdf': {
15
15
  icon: { lib: 'far', name: 'file-pdf' },
16
- format_name: 'pdf',
16
+ format_name: 'PDF',
17
17
  },
18
18
  'application/zip': {
19
19
  icon: { lib: 'far', name: 'file-archive' },
20
- format_name: 'zip',
20
+ format_name: 'ZIP',
21
21
  },
22
22
  'application/x-zip-compressed': {
23
23
  icon: { lib: 'far', name: 'file-archive' },
24
- format_name: 'zip',
24
+ format_name: 'ZIP',
25
25
  },
26
26
  'application/gzip': {
27
27
  icon: { lib: 'far', name: 'file-archive' },
28
- format_name: 'gzip',
28
+ format_name: 'GZIP',
29
29
  },
30
30
  'application/vnd.rar': {
31
31
  icon: { lib: 'far', name: 'file-archive' },
32
- format_name: 'rar',
32
+ format_name: 'RAR',
33
33
  },
34
34
  'application/x-tar': {
35
35
  icon: { lib: 'far', name: 'file-archive' },
36
- format_name: 'tar',
36
+ format_name: 'TAR',
37
37
  },
38
38
  'application/json': {
39
39
  icon: { lib: 'fas', name: 'code' },
40
- format_name: 'json',
40
+ format_name: 'JSON',
41
41
  },
42
42
  'text/javascript': {
43
43
  icon: { lib: 'fas', name: 'code' },
44
- format_name: 'js',
44
+ format_name: 'JS',
45
45
  },
46
46
  'text/html': { icon: { lib: 'fas', name: 'code' }, format_name: 'html' },
47
47
  'image/jpg': {
48
48
  icon: { lib: 'far', name: 'file-image' },
49
- format_name: 'jpg',
49
+ format_name: 'JPG',
50
50
  },
51
51
  'image/jpeg': {
52
52
  icon: { lib: 'far', name: 'file-image' },
53
- format_name: 'jpeg',
53
+ format_name: 'JPEG',
54
54
  },
55
55
  'image/png': {
56
56
  icon: { lib: 'far', name: 'file-image' },
57
- format_name: 'png',
57
+ format_name: 'PNG',
58
58
  },
59
59
  'image/svg': {
60
60
  icon: { lib: 'far', name: 'file-image' },
61
- format_name: 'svg',
61
+ format_name: 'SVG',
62
62
  },
63
63
  'application/msword': {
64
64
  icon: { lib: 'far', name: 'file-word' },
@@ -5,6 +5,8 @@
5
5
  * export { Api } from './Api/Api';
6
6
  */
7
7
 
8
+ import EnhanceLink from 'design-comuni-plone-theme/helpers/EnhanceLink';
9
+
8
10
  export { defaultIconWidgetOptions } from 'design-comuni-plone-theme/helpers/IconWidget/IconWidgetHelper';
9
11
  export { fontAwesomeAliases } from 'design-comuni-plone-theme/helpers/IconWidget/IconAliasHelper';
10
12
  export {
@@ -15,7 +17,7 @@ export {
15
17
  contentFolderHasItems,
16
18
  renderPDCItemValue,
17
19
  } from 'design-comuni-plone-theme/helpers/contentHelper';
18
- export { checkRedraftHasContent } from 'design-comuni-plone-theme/helpers/redraftHelper';
20
+ export { checkRichTextHasContent } from 'design-comuni-plone-theme/helpers/richTextHelper';
19
21
  export { getTableRowData } from 'design-comuni-plone-theme/helpers/amministrazioneTrasparenteHelper';
20
22
  export { getItemsByPath } from 'design-comuni-plone-theme/helpers/getItemsByPath';
21
23
  export {
@@ -50,10 +52,9 @@ export {
50
52
  realWidgetType,
51
53
  CUSTOM_DGFIELD_VALIDATION,
52
54
  } from 'design-comuni-plone-theme/helpers/FormValidation/DataGridFormValidationHelpers';
53
-
54
55
  export { commonSearchBlockMessages } from 'design-comuni-plone-theme/helpers/Translations/searchBlockExtendedTranslations';
55
-
56
56
  export { getComponentWithFallback } from 'design-comuni-plone-theme/helpers/registry';
57
+ export { EnhanceLink };
57
58
  export {
58
59
  useHomePath,
59
60
  isResolveUID,
@@ -0,0 +1,10 @@
1
+ import { serializeNodesToText } from '@plone/volto-slate/editor/render';
2
+ /*
3
+ Used to verify if slate text blocks are empty
4
+ */
5
+ export const checkRichTextHasContent = (text) => {
6
+ if (text?.[0]?.children) {
7
+ return serializeNodesToText(text?.[0]?.children || [])?.length > 0;
8
+ }
9
+ return false;
10
+ };
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="28" height="25" viewBox="0 0 28 25"><defs><filter id="b" width="170%" height="182.4%" x="-25%" y="-35.3%" filterUnits="objectBoundingBox"><feOffset dx="2" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="2"/><feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.200185069 0"/></filter><rect id="a" width="20" height="17" x="0" y="0"/></defs><g fill="none" fill-rule="evenodd" transform="translate(2 3)"><use xlink:href="#a" fill="#000" filter="url(#b)"/><use xlink:href="#a" fill="#FFF"/><line x1=".5" x2=".5" y1=".5" y2="16.5" stroke="#979797" stroke-linecap="square" stroke-width="2"/></g></svg>
@@ -1,8 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <svg width="597px" height="391px" viewBox="0 0 597 391" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
4
- <title>blocco-icone</title>
5
- <desc>Created with Sketch.</desc>
6
3
  <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
4
  <g id="blocco-icone" transform="translate(1.000000, 1.000000)">
8
5
  <g id="Group">
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><g fill="none"><rect width="36" height="36" fill="currentColor"/><path fill="#FFF" d="M10.3032227,23.1523438 C10.6967773,23.1523438 11.0670573,23.0782878 11.4140625,22.9301758 C11.7610677,22.7820638 12.0869141,22.5598958 12.3916016,22.2636719 C12.4042969,22.297526 12.4254557,22.3673503 12.4550781,22.4731445 C12.5227865,22.7058919 12.5799154,22.8815104 12.6264648,23 L12.6264648,23 L14.3911133,23 C14.2345378,22.6783854 14.1276855,22.3768717 14.0705566,22.095459 C14.0134277,21.8140462 13.9848633,21.3771159 13.9848633,20.784668 L13.9848633,20.784668 L14.0039062,18.7026367 C14.0039062,17.9282227 13.9245605,17.3960775 13.7658691,17.1062012 C13.6071777,16.8163249 13.3331706,16.5772298 12.9438477,16.388916 C12.5545247,16.2006022 11.9620768,16.1064453 11.1665039,16.1064453 C10.2905273,16.1064453 9.63037109,16.2630208 9.18603516,16.5761719 C8.74169922,16.8893229 8.42854818,17.3717448 8.24658203,18.0234375 L8.24658203,18.0234375 L9.86523438,18.3154297 C9.97526042,18.0022786 10.1191406,17.7832845 10.296875,17.6584473 C10.4746094,17.53361 10.722168,17.4711914 11.0395508,17.4711914 C11.5092773,17.4711914 11.828776,17.5441895 11.9980469,17.6901855 C12.1673177,17.8361816 12.2519531,18.0805664 12.2519531,18.4233398 L12.2519531,18.4233398 L12.2519531,18.6010742 C11.9303385,18.7364909 11.3527018,18.882487 10.519043,19.0390625 C9.90120443,19.1575521 9.42830404,19.2961426 9.1003418,19.454834 C8.77237956,19.6135254 8.51741536,19.842041 8.33544922,20.1403809 C8.15348307,20.4387207 8.0625,20.7783203 8.0625,21.1591797 C8.0625,21.7347005 8.26245117,22.2107747 8.66235352,22.5874023 C9.06225586,22.9640299 9.60921224,23.1523438 10.3032227,23.1523438 Z M10.8364258,21.8955078 C10.5486654,21.8955078 10.3116862,21.8045247 10.1254883,21.6225586 C9.93929036,21.4405924 9.84619141,21.2247721 9.84619141,20.9750977 C9.84619141,20.7211914 9.9625651,20.5117188 10.1953125,20.3466797 C10.3476562,20.2451172 10.6713867,20.1414388 11.1665039,20.0356445 C11.6616211,19.9298503 12.0234375,19.8388672 12.2519531,19.7626953 L12.2519531,19.7626953 L12.2519531,20.1181641 C12.2519531,20.5455729 12.2286784,20.8354492 12.1821289,20.987793 C12.1144206,21.2205404 11.9726562,21.4173177 11.7568359,21.578125 C11.4648438,21.7897135 11.1580404,21.8955078 10.8364258,21.8955078 Z M19.4501953,23.1523438 C20.2330729,23.1523438 20.8985189,22.8413086 21.4465332,22.2192383 C21.9945475,21.597168 22.2685547,20.710612 22.2685547,19.5595703 C22.2685547,18.4466146 21.9998372,17.5928548 21.4624023,16.998291 C20.9249674,16.4037272 20.2457682,16.1064453 19.4248047,16.1064453 C18.6715495,16.1064453 18.0198568,16.4195964 17.4697266,17.0458984 L17.4697266,17.0458984 L17.4697266,13.6943359 L15.6860352,13.6943359 L15.6860352,23 L17.3427734,23 L17.3427734,22.0097656 C17.6136068,22.3863932 17.9362793,22.6709798 18.310791,22.8635254 C18.6853027,23.056071 19.0651042,23.1523438 19.4501953,23.1523438 Z M19.0185547,21.7431641 C18.5065104,21.7431641 18.0960286,21.5061849 17.7871094,21.0322266 C17.5670573,20.6979167 17.4570312,20.1816406 17.4570312,19.4833984 C17.4570312,18.8063151 17.5987956,18.3016764 17.8823242,17.9694824 C18.1658529,17.6372884 18.5213216,17.4711914 18.9487305,17.4711914 C19.3846029,17.4711914 19.7421875,17.6415202 20.0214844,17.9821777 C20.3007812,18.3228353 20.4404297,18.8782552 20.4404297,19.6484375 C20.4404297,20.3720703 20.3018392,20.9020996 20.0246582,21.2385254 C19.7474772,21.5749512 19.4121094,21.7431641 19.0185547,21.7431641 Z M26.546875,23.1523438 C27.414388,23.1523438 28.1062826,22.9471029 28.6225586,22.5366211 C29.1388346,22.1261393 29.4879557,21.5188802 29.6699219,20.7148438 L29.6699219,20.7148438 L27.9179688,20.4165039 C27.8291016,20.8862305 27.6767578,21.2173665 27.4609375,21.4099121 C27.2451172,21.6024577 26.9679362,21.6987305 26.6293945,21.6987305 C26.1765951,21.6987305 25.8158366,21.5336914 25.5471191,21.2036133 C25.2784017,20.8735352 25.144043,20.3085938 25.144043,19.5087891 C25.144043,18.789388 25.2762858,18.2762858 25.5407715,17.9694824 C25.8052572,17.662679 26.159668,17.5092773 26.6040039,17.5092773 C26.9383138,17.5092773 27.2102051,17.5981445 27.4196777,17.7758789 C27.6291504,17.9536133 27.7635091,18.218099 27.8227539,18.5693359 L27.8227539,18.5693359 L29.5810547,18.2519531 C29.3694661,17.5283203 29.021403,16.9898275 28.5368652,16.6364746 C28.0523275,16.2831217 27.3995768,16.1064453 26.5786133,16.1064453 C25.5756836,16.1064453 24.7801107,16.4164225 24.1918945,17.036377 C23.6036784,17.6563314 23.3095703,18.5227865 23.3095703,19.6357422 C23.3095703,20.7360026 23.6026204,21.597168 24.1887207,22.2192383 C24.774821,22.8413086 25.5608724,23.1523438 26.546875,23.1523438 Z"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="37" height="38" viewBox="0 0 37 38"><defs><path id="a" d="M9.91210938,22.1640625 C10.3359375,22.1640625 10.7347005,22.0843099 11.1083984,21.9248047 C11.4820964,21.7652995 11.8330078,21.5260417 12.1611328,21.2070312 C12.1748047,21.2434896 12.1975911,21.3186849 12.2294922,21.4326172 C12.3024089,21.6832682 12.3639323,21.8723958 12.4140625,22 L12.4140625,22 L14.3144531,22 C14.1458333,21.6536458 14.0307617,21.3289388 13.9692383,21.0258789 C13.9077148,20.722819 13.8769531,20.2522786 13.8769531,19.6142578 L13.8769531,19.6142578 L13.8974609,17.3720703 C13.8974609,16.5380859 13.8120117,15.9650065 13.6411133,15.652832 C13.4702148,15.3406576 13.1751302,15.0831706 12.7558594,14.8803711 C12.3365885,14.6775716 11.6985677,14.5761719 10.8417969,14.5761719 C9.8984375,14.5761719 9.1875,14.7447917 8.70898438,15.0820312 C8.23046875,15.4192708 7.89322917,15.9388021 7.69726562,16.640625 L7.69726562,16.640625 L9.44042969,16.9550781 C9.55891927,16.6178385 9.71386719,16.3819987 9.90527344,16.2475586 C10.0966797,16.1131185 10.3632812,16.0458984 10.7050781,16.0458984 C11.2109375,16.0458984 11.555013,16.1245117 11.7373047,16.2817383 C11.9195964,16.4389648 12.0107422,16.7021484 12.0107422,17.0712891 L12.0107422,17.0712891 L12.0107422,17.2626953 C11.664388,17.4085286 11.0423177,17.5657552 10.1445312,17.734375 C9.47916667,17.8619792 8.96988932,18.0112305 8.61669922,18.1821289 C8.26350911,18.3530273 7.98893229,18.5991211 7.79296875,18.9204102 C7.59700521,19.2416992 7.49902344,19.6074219 7.49902344,20.0175781 C7.49902344,20.6373698 7.71435547,21.1500651 8.14501953,21.5556641 C8.57568359,21.961263 9.16471354,22.1640625 9.91210938,22.1640625 Z M10.4863281,20.8105469 C10.1764323,20.8105469 9.92122396,20.7125651 9.72070312,20.5166016 C9.52018229,20.320638 9.41992188,20.0882161 9.41992188,19.8193359 C9.41992188,19.5458984 9.5452474,19.3203125 9.79589844,19.1425781 C9.95996094,19.0332031 10.3085938,18.9215495 10.8417969,18.8076172 C11.375,18.6936849 11.7646484,18.5957031 12.0107422,18.5136719 L12.0107422,18.5136719 L12.0107422,18.8964844 C12.0107422,19.3567708 11.9856771,19.6689453 11.9355469,19.8330078 C11.8626302,20.0836589 11.7099609,20.2955729 11.4775391,20.46875 C11.1630859,20.6966146 10.8326823,20.8105469 10.4863281,20.8105469 Z M19.7626953,22.1640625 C20.6057943,22.1640625 21.3224284,21.8291016 21.9125977,21.1591797 C22.5027669,20.4892578 22.7978516,19.5345052 22.7978516,18.2949219 C22.7978516,17.0963542 22.5084635,16.1769206 21.9296875,15.5366211 C21.3509115,14.8963216 20.6194661,14.5761719 19.7353516,14.5761719 C18.9241536,14.5761719 18.2223307,14.9134115 17.6298828,15.5878906 L17.6298828,15.5878906 L17.6298828,11.9785156 L15.7089844,11.9785156 L15.7089844,22 L17.4931641,22 L17.4931641,20.9335938 C17.7848307,21.3391927 18.1323242,21.6456706 18.5356445,21.8530273 C18.9389648,22.0603841 19.3479818,22.1640625 19.7626953,22.1640625 Z M19.2978516,20.6464844 C18.7464193,20.6464844 18.304362,20.391276 17.9716797,19.8808594 C17.7347005,19.5208333 17.6162109,18.9648438 17.6162109,18.2128906 C17.6162109,17.483724 17.7688802,16.9402669 18.0742188,16.5825195 C18.3795573,16.2247721 18.7623698,16.0458984 19.2226562,16.0458984 C19.6920573,16.0458984 20.0771484,16.2293294 20.3779297,16.5961914 C20.6787109,16.9630534 20.8291016,17.5611979 20.8291016,18.390625 C20.8291016,19.1699219 20.6798503,19.7407227 20.3813477,20.1030273 C20.0828451,20.465332 19.7216797,20.6464844 19.2978516,20.6464844 Z M27.4052734,22.1640625 C28.3395182,22.1640625 29.0846354,21.9430339 29.640625,21.5009766 C30.1966146,21.0589193 30.5725911,20.4049479 30.7685547,19.5390625 L30.7685547,19.5390625 L28.8818359,19.2177734 C28.7861328,19.7236328 28.6220703,20.0802409 28.3896484,20.2875977 C28.1572266,20.4949544 27.858724,20.5986328 27.4941406,20.5986328 C27.0065104,20.5986328 26.6180013,20.4208984 26.3286133,20.0654297 C26.0392253,19.7099609 25.8945312,19.1015625 25.8945312,18.2402344 C25.8945312,17.4654948 26.0369466,16.9129232 26.3217773,16.5825195 C26.6066081,16.2521159 26.9882812,16.0869141 27.4667969,16.0869141 C27.8268229,16.0869141 28.1196289,16.1826172 28.3452148,16.3740234 C28.5708008,16.5654297 28.7154948,16.8502604 28.7792969,17.2285156 L28.7792969,17.2285156 L30.6728516,16.8867188 C30.444987,16.1074219 30.0701497,15.5275065 29.5483398,15.1469727 C29.0265299,14.7664388 28.3235677,14.5761719 27.4394531,14.5761719 C26.359375,14.5761719 25.5026042,14.9099935 24.8691406,15.5776367 C24.2356771,16.2452799 23.9189453,17.1783854 23.9189453,18.3769531 C23.9189453,19.561849 24.2345378,20.4892578 24.8657227,21.1591797 C25.4969076,21.8291016 26.3434245,22.1640625 27.4052734,22.1640625 Z"/></defs><g fill="none" fill-rule="evenodd" transform="translate(0 1)"><rect width="36" height="36" x=".25" y=".25" stroke="currentColor" stroke-width=".5"/><g transform="translate(1 1)"><g fill="currentColor" fill-rule="nonzero"><use xlink:href="#a"/><use xlink:href="#a"/></g><line x1="1" x2="1" y2="34" stroke="currentColor" stroke-linecap="square" stroke-width="3"/></g></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="38" height="38" viewBox="0 0 38 38"><defs><path id="a" d="M9.91210938,22.1640625 C10.3359375,22.1640625 10.7347005,22.0843099 11.1083984,21.9248047 C11.4820964,21.7652995 11.8330078,21.5260417 12.1611328,21.2070312 C12.1748047,21.2434896 12.1975911,21.3186849 12.2294922,21.4326172 C12.3024089,21.6832682 12.3639323,21.8723958 12.4140625,22 L12.4140625,22 L14.3144531,22 C14.1458333,21.6536458 14.0307617,21.3289388 13.9692383,21.0258789 C13.9077148,20.722819 13.8769531,20.2522786 13.8769531,19.6142578 L13.8769531,19.6142578 L13.8974609,17.3720703 C13.8974609,16.5380859 13.8120117,15.9650065 13.6411133,15.652832 C13.4702148,15.3406576 13.1751302,15.0831706 12.7558594,14.8803711 C12.3365885,14.6775716 11.6985677,14.5761719 10.8417969,14.5761719 C9.8984375,14.5761719 9.1875,14.7447917 8.70898438,15.0820312 C8.23046875,15.4192708 7.89322917,15.9388021 7.69726562,16.640625 L7.69726562,16.640625 L9.44042969,16.9550781 C9.55891927,16.6178385 9.71386719,16.3819987 9.90527344,16.2475586 C10.0966797,16.1131185 10.3632812,16.0458984 10.7050781,16.0458984 C11.2109375,16.0458984 11.555013,16.1245117 11.7373047,16.2817383 C11.9195964,16.4389648 12.0107422,16.7021484 12.0107422,17.0712891 L12.0107422,17.0712891 L12.0107422,17.2626953 C11.664388,17.4085286 11.0423177,17.5657552 10.1445312,17.734375 C9.47916667,17.8619792 8.96988932,18.0112305 8.61669922,18.1821289 C8.26350911,18.3530273 7.98893229,18.5991211 7.79296875,18.9204102 C7.59700521,19.2416992 7.49902344,19.6074219 7.49902344,20.0175781 C7.49902344,20.6373698 7.71435547,21.1500651 8.14501953,21.5556641 C8.57568359,21.961263 9.16471354,22.1640625 9.91210938,22.1640625 Z M10.4863281,20.8105469 C10.1764323,20.8105469 9.92122396,20.7125651 9.72070312,20.5166016 C9.52018229,20.320638 9.41992188,20.0882161 9.41992188,19.8193359 C9.41992188,19.5458984 9.5452474,19.3203125 9.79589844,19.1425781 C9.95996094,19.0332031 10.3085938,18.9215495 10.8417969,18.8076172 C11.375,18.6936849 11.7646484,18.5957031 12.0107422,18.5136719 L12.0107422,18.5136719 L12.0107422,18.8964844 C12.0107422,19.3567708 11.9856771,19.6689453 11.9355469,19.8330078 C11.8626302,20.0836589 11.7099609,20.2955729 11.4775391,20.46875 C11.1630859,20.6966146 10.8326823,20.8105469 10.4863281,20.8105469 Z M19.7626953,22.1640625 C20.6057943,22.1640625 21.3224284,21.8291016 21.9125977,21.1591797 C22.5027669,20.4892578 22.7978516,19.5345052 22.7978516,18.2949219 C22.7978516,17.0963542 22.5084635,16.1769206 21.9296875,15.5366211 C21.3509115,14.8963216 20.6194661,14.5761719 19.7353516,14.5761719 C18.9241536,14.5761719 18.2223307,14.9134115 17.6298828,15.5878906 L17.6298828,15.5878906 L17.6298828,11.9785156 L15.7089844,11.9785156 L15.7089844,22 L17.4931641,22 L17.4931641,20.9335938 C17.7848307,21.3391927 18.1323242,21.6456706 18.5356445,21.8530273 C18.9389648,22.0603841 19.3479818,22.1640625 19.7626953,22.1640625 Z M19.2978516,20.6464844 C18.7464193,20.6464844 18.304362,20.391276 17.9716797,19.8808594 C17.7347005,19.5208333 17.6162109,18.9648438 17.6162109,18.2128906 C17.6162109,17.483724 17.7688802,16.9402669 18.0742188,16.5825195 C18.3795573,16.2247721 18.7623698,16.0458984 19.2226562,16.0458984 C19.6920573,16.0458984 20.0771484,16.2293294 20.3779297,16.5961914 C20.6787109,16.9630534 20.8291016,17.5611979 20.8291016,18.390625 C20.8291016,19.1699219 20.6798503,19.7407227 20.3813477,20.1030273 C20.0828451,20.465332 19.7216797,20.6464844 19.2978516,20.6464844 Z M27.4052734,22.1640625 C28.3395182,22.1640625 29.0846354,21.9430339 29.640625,21.5009766 C30.1966146,21.0589193 30.5725911,20.4049479 30.7685547,19.5390625 L30.7685547,19.5390625 L28.8818359,19.2177734 C28.7861328,19.7236328 28.6220703,20.0802409 28.3896484,20.2875977 C28.1572266,20.4949544 27.858724,20.5986328 27.4941406,20.5986328 C27.0065104,20.5986328 26.6180013,20.4208984 26.3286133,20.0654297 C26.0392253,19.7099609 25.8945312,19.1015625 25.8945312,18.2402344 C25.8945312,17.4654948 26.0369466,16.9129232 26.3217773,16.5825195 C26.6066081,16.2521159 26.9882812,16.0869141 27.4667969,16.0869141 C27.8268229,16.0869141 28.1196289,16.1826172 28.3452148,16.3740234 C28.5708008,16.5654297 28.7154948,16.8502604 28.7792969,17.2285156 L28.7792969,17.2285156 L30.6728516,16.8867188 C30.444987,16.1074219 30.0701497,15.5275065 29.5483398,15.1469727 C29.0265299,14.7664388 28.3235677,14.5761719 27.4394531,14.5761719 C26.359375,14.5761719 25.5026042,14.9099935 24.8691406,15.5776367 C24.2356771,16.2452799 23.9189453,17.1783854 23.9189453,18.3769531 C23.9189453,19.561849 24.2345378,20.4892578 24.8657227,21.1591797 C25.4969076,21.8291016 26.3434245,22.1640625 27.4052734,22.1640625 Z"/></defs><g fill="none" fill-rule="evenodd" transform="translate(1 2)"><g fill="currentColor" fill-rule="nonzero"><use xlink:href="#a"/><use xlink:href="#a"/></g><line x1="1" x2="1" y2="34" stroke="currentColor" stroke-linecap="square" stroke-width="3"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><g fill-rule="evenodd"><polygon fill-rule="nonzero" points="10 0 8 0 0 0 0 4 2 4 2 2 8 2 8 24 6 24 6 26 8 26 10 26 12 26 12 24 10 24 10 2 16 2 16 4 18 4 18 0" transform="translate(10 5)"/><polygon fill-rule="nonzero" points="5.556 0 4.444 0 0 0 0 2.308 1.111 2.308 1.111 1.154 4.444 1.154 4.444 13.846 3.333 13.846 3.333 15 4.444 15 5.556 15 6.667 15 6.667 13.846 5.556 13.846 5.556 1.154 8.889 1.154 8.889 2.308 10 2.308 10 0" transform="translate(0 16)"/><polygon points="5 4 10 8 0 8" transform="translate(0 5)"/></g></svg>
@@ -4,16 +4,9 @@ $accordion-icon-color: #7fb2e5;
4
4
  .section.full-width {
5
5
  height: auto;
6
6
  .title {
7
- font-size: 2.35rem !important;
7
+ font-size: 2.35rem;
8
8
  font-weight: bold;
9
9
  line-height: 3rem;
10
-
11
- .DraftEditor-root {
12
- .public-DraftEditorPlaceholder-root {
13
- width: 100%;
14
- font-size: 2.35rem;
15
- }
16
- }
17
10
  }
18
11
 
19
12
  @media (max-width: #{map-get($grid-breakpoints, md)}) {
@@ -50,10 +43,6 @@ $accordion-icon-color: #7fb2e5;
50
43
  top: -7px;
51
44
  right: 0;
52
45
  left: unset;
53
-
54
- &:focus {
55
- outline: 1px solid $focus-outline-color;
56
- }
57
46
  }
58
47
 
59
48
  .accordion-header {
@@ -96,6 +85,7 @@ $accordion-icon-color: #7fb2e5;
96
85
  color: $primary;
97
86
  font-size: 1.2rem;
98
87
  font-weight: bold;
88
+ text-align: left;
99
89
 
100
90
  .icon {
101
91
  flex-shrink: 0;
@@ -160,15 +150,5 @@ $accordion-icon-color: #7fb2e5;
160
150
  }
161
151
  }
162
152
  }
163
-
164
- &.is-edit-mode {
165
- .card {
166
- .card-body {
167
- //per mostrare la barra di formattazione di draft-js
168
- padding-left: 10em;
169
- margin-left: -7em;
170
- }
171
- }
172
- }
173
153
  }
174
154
  }
@@ -1,11 +1,37 @@
1
- .public-ui {
1
+ .alert-colors-widget {
2
+ .color-list-widget {
3
+ .ui.button.info {
4
+ &,
5
+ &.active {
6
+ background-color: $alert-info;
7
+ }
8
+ }
9
+
10
+ .ui.button.warning {
11
+ &,
12
+ &.active {
13
+ background-color: $alert-warning;
14
+ }
15
+ }
16
+
17
+ .ui.button.danger {
18
+ &,
19
+ &.active {
20
+ background-color: $alert-danger;
21
+ }
22
+ }
23
+ }
24
+ }
25
+
26
+ .public-ui,
27
+ body.cms-ui .public-ui {
2
28
  .block.alertblock,
3
29
  .alertblock {
4
30
  .full-width {
5
31
  height: auto;
6
32
  }
7
33
 
8
- .draftjs-buttons a {
34
+ a.btn.btn-primary.inline-link {
9
35
  background-color: $white;
10
36
  color: $body-color;
11
37
 
@@ -19,7 +45,13 @@
19
45
  background-color: $alert-danger;
20
46
  color: $alert-danger-text;
21
47
 
22
- a {
48
+ h1,
49
+ h2,
50
+ h3,
51
+ h4,
52
+ h5,
53
+ h6,
54
+ a:not(.btn) {
23
55
  color: $alert-danger-text;
24
56
  }
25
57
  }
@@ -28,7 +60,13 @@
28
60
  background-color: $alert-warning;
29
61
  color: $alert-warning-text;
30
62
 
31
- a {
63
+ h1,
64
+ h2,
65
+ h3,
66
+ h4,
67
+ h5,
68
+ h6,
69
+ a:not(.btn) {
32
70
  color: $alert-warning-text;
33
71
  }
34
72
  }
@@ -37,6 +75,15 @@
37
75
  background-color: $alert-info;
38
76
  color: $alert-info-text;
39
77
 
78
+ h1,
79
+ h2,
80
+ h3,
81
+ h4,
82
+ h5,
83
+ h6 {
84
+ color: $alert-info-text;
85
+ }
86
+
40
87
  a {
41
88
  color: $alert-info-text;
42
89
  }
@@ -21,6 +21,7 @@
21
21
 
22
22
  .listing-item {
23
23
  align-items: normal;
24
+
24
25
  .card-body {
25
26
  display: flex;
26
27
  flex-direction: column;
@@ -0,0 +1,32 @@
1
+ body.cms-ui {
2
+ .block-editor-callout_block {
3
+ .public-ui {
4
+ .callout {
5
+ .callout-title {
6
+ display: flex;
7
+
8
+ .icon {
9
+ max-width: 32px;
10
+ flex: 1 0 100%;
11
+ }
12
+
13
+ .text {
14
+ padding-right: calc(10px + 0.7rem);
15
+ background-color: #fff;
16
+
17
+ &:after {
18
+ z-index: -1;
19
+ }
20
+ }
21
+ }
22
+
23
+ p {
24
+ &,
25
+ * {
26
+ font-family: 'Lora', Georgia, serif !important; //as bootstrap-italia says
27
+ }
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }