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.
- package/.github/workflows/main.yml +16 -16
- package/.github/workflows/npm.yml +1 -1
- package/.github/workflows/withnewsletter.yml +47 -0
- package/.release-it.json +1 -0
- package/.yarn/cache/@babel-helper-module-imports-npm-7.24.3-edb733448b-c23492189b.zip +0 -0
- package/.yarn/cache/@babel-types-npm-7.24.0-a0508cb308-4b574a37d4.zip +0 -0
- package/.yarn/cache/babel-plugin-lodash-npm-3.3.4-c7161075b6-044a4261e6.zip +0 -0
- package/.yarn/cache/braces-npm-3.0.3-582c14023c-b95aa0b3bd.zip +0 -0
- package/.yarn/cache/fill-range-npm-7.1.1-bf491486db-b4abfbca38.zip +0 -0
- package/.yarn/cache/micromatch-npm-4.0.8-c9570e4aca-79920eb634.zip +0 -0
- package/.yarn/cache/require-package-name-npm-2.0.1-ac9a206b63-00f4e9e467.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +1728 -1659
- package/RELEASE.md +6 -0
- package/locales/de/LC_MESSAGES/volto.po +86 -19
- package/locales/en/LC_MESSAGES/volto.po +86 -19
- package/locales/es/LC_MESSAGES/volto.po +86 -19
- package/locales/fr/LC_MESSAGES/volto.po +86 -19
- package/locales/it/LC_MESSAGES/volto.po +87 -20
- package/locales/volto.pot +87 -20
- package/package.json +3 -1
- package/publiccode.yml +2 -2
- package/src/components/Collapse.jsx +1 -0
- package/src/components/ItaliaTheme/AppExtras/SiteSettingsExtras.jsx +0 -6
- package/src/components/ItaliaTheme/Blocks/Accordion/Block/EditBlock.jsx +29 -24
- package/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx +4 -12
- package/src/components/ItaliaTheme/Blocks/Accordion/Edit.jsx +118 -42
- package/src/components/ItaliaTheme/Blocks/Accordion/View.jsx +4 -18
- package/src/components/ItaliaTheme/Blocks/Alert/Edit.jsx +60 -113
- package/src/components/ItaliaTheme/Blocks/Alert/Sidebar.jsx +1 -0
- package/src/components/ItaliaTheme/Blocks/Alert/View.jsx +5 -14
- package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/Block.jsx +16 -11
- package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/Body.jsx +2 -1
- package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/Edit.jsx +39 -1
- package/src/components/ItaliaTheme/Blocks/CTABlock/Block.jsx +35 -95
- package/src/components/ItaliaTheme/Blocks/Callout/Edit.jsx +108 -0
- package/src/components/ItaliaTheme/Blocks/Callout/Sidebar.jsx +173 -0
- package/src/components/ItaliaTheme/Blocks/Callout/View.jsx +45 -0
- package/src/components/ItaliaTheme/Blocks/ContactsBlock/Block/EditBlock.jsx +86 -63
- package/src/components/ItaliaTheme/Blocks/ContactsBlock/Block/ViewBlock.jsx +19 -39
- package/src/components/ItaliaTheme/Blocks/ContactsBlock/Edit.jsx +101 -22
- package/src/components/ItaliaTheme/Blocks/ContactsBlock/View.jsx +13 -21
- package/src/components/ItaliaTheme/Blocks/CountDown/Edit.jsx +21 -25
- package/src/components/ItaliaTheme/Blocks/CountDown/View.jsx +6 -15
- package/src/components/ItaliaTheme/Blocks/IconBlocks/Block/EditBlock.jsx +52 -22
- package/src/components/ItaliaTheme/Blocks/IconBlocks/Block/ViewBlock.jsx +9 -29
- package/src/components/ItaliaTheme/Blocks/IconBlocks/Edit.jsx +108 -21
- package/src/components/ItaliaTheme/Blocks/IconBlocks/Sidebar.jsx +1 -9
- package/src/components/ItaliaTheme/Blocks/IconBlocks/View.jsx +6 -14
- package/src/components/ItaliaTheme/Blocks/Listing/CardWithSlideUpTextTemplate.jsx +0 -1
- package/src/components/ItaliaTheme/Blocks/NumbersBlock/Block/EditBlock.jsx +45 -15
- package/src/components/ItaliaTheme/Blocks/NumbersBlock/Block/ViewBlock.jsx +2 -18
- package/src/components/ItaliaTheme/Blocks/NumbersBlock/Edit.jsx +98 -11
- package/src/components/ItaliaTheme/Blocks/NumbersBlock/View.jsx +2 -7
- package/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block.jsx +35 -67
- package/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Edit.jsx +2 -8
- package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/BodyWrapper.jsx +2 -1
- package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/Edit.jsx +98 -84
- package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/View.jsx +20 -3
- package/src/components/ItaliaTheme/Blocks/UOSearch/Sidebar.jsx +11 -11
- package/src/components/ItaliaTheme/Blocks/__tests__/Accordion.test.jsx +11 -28
- package/src/components/ItaliaTheme/Blocks/__tests__/Alert.test.jsx +10 -14
- package/src/components/ItaliaTheme/Blocks/__tests__/ArgumentsInEvidence.test.jsx +20 -28
- package/src/components/ItaliaTheme/Blocks/__tests__/CTABlock.test.jsx +14 -29
- package/src/components/ItaliaTheme/Blocks/__tests__/CardWithImage.test.jsx +11 -28
- package/src/components/ItaliaTheme/Blocks/__tests__/ContactsBlock.test.jsx +75 -140
- package/src/components/ItaliaTheme/Blocks/__tests__/Countdown.test.jsx +20 -28
- package/src/components/ItaliaTheme/Blocks/__tests__/IconBlocks.test.jsx +22 -56
- package/src/components/ItaliaTheme/Blocks/__tests__/NumbersBlock.test.jsx +14 -43
- package/src/components/ItaliaTheme/Blocks/__tests__/SimpleCard.test.jsx +14 -30
- package/src/components/ItaliaTheme/BrandText/BrandText.jsx +8 -14
- package/src/components/ItaliaTheme/BrandTextFooter/BrandTextFooter.jsx +31 -2
- package/src/components/ItaliaTheme/Footer/FooterInfos.jsx +21 -8
- package/src/components/ItaliaTheme/Footer/FooterNavigation.jsx +3 -3
- package/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx +0 -7
- package/src/components/ItaliaTheme/Icons/Icon.jsx +0 -1
- package/src/components/ItaliaTheme/MegaMenu/MegaMenu.jsx +5 -1
- package/src/components/ItaliaTheme/View/BandoView/BandoApprofondimenti.jsx +1 -2
- package/src/components/ItaliaTheme/View/CartellaModulisticaView/DocRow.jsx +14 -5
- package/src/components/ItaliaTheme/View/Commons/Attachment.jsx +19 -3
- package/src/components/ItaliaTheme/View/Commons/Attachments.jsx +0 -1
- package/src/components/ItaliaTheme/View/Commons/DownloadFileFormat.jsx +11 -7
- package/src/components/ItaliaTheme/View/Commons/Gallery.jsx +1 -0
- package/src/components/ItaliaTheme/View/Commons/PageHeader/PageHeaderEventDates.jsx +0 -1
- package/src/components/ItaliaTheme/View/Commons/PageHeader/PageHeaderLinkServizio.jsx +6 -2
- package/src/components/ItaliaTheme/View/Commons/RichTextRender.jsx +8 -6
- package/src/components/ItaliaTheme/View/Commons/__tests__/RichText.test.jsx +14 -17
- package/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx +1 -1
- package/src/components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni.jsx +0 -4
- package/src/components/ItaliaTheme/View/ServizioView/ServizioAccedi.jsx +10 -7
- package/src/components/ItaliaTheme/View/ServizioView/ServizioMetatag.jsx +4 -3
- package/src/components/ItaliaTheme/View/__disabled_tests__/IncaricoView.test__disabled.jsx +24 -30
- package/src/components/ItaliaTheme/View/__tests__/CartellaModulisticaView.test.jsx +12 -1
- package/src/components/ItaliaTheme/View/__tests__/PageView.test.jsx +24 -2
- package/src/components/ItaliaTheme/View/__tests__/PersonaView.test.jsx +96 -92
- package/src/components/ItaliaTheme/View/__tests__/ServizioAChiSiRivolge.test.jsx +240 -286
- package/src/components/ItaliaTheme/View/__tests__/ServizioAccedi.test.jsx +240 -286
- package/src/components/ItaliaTheme/View/__tests__/ServizioCasiParticolari.test.jsx +240 -286
- package/src/components/ItaliaTheme/View/__tests__/ServizioComeFare.test.jsx +240 -286
- package/src/components/ItaliaTheme/View/__tests__/ServizioCondizioni.test.jsx +240 -286
- package/src/components/ItaliaTheme/View/__tests__/ServizioContatti.test.jsx +240 -286
- package/src/components/ItaliaTheme/View/__tests__/ServizioCosE.test.jsx +240 -286
- package/src/components/ItaliaTheme/View/__tests__/ServizioCosaServe.test.jsx +240 -286
- package/src/components/ItaliaTheme/View/__tests__/ServizioCosaSiOttiene.test.jsx +240 -286
- package/src/components/ItaliaTheme/View/__tests__/ServizioCostiVincoli.test.jsx +240 -286
- package/src/components/ItaliaTheme/View/__tests__/ServizioMetadati.test.jsx +240 -286
- package/src/components/ItaliaTheme/View/__tests__/ServizioModulistica.test.jsx +240 -286
- package/src/components/ItaliaTheme/View/__tests__/ServizioProcedure.test.jsx +240 -286
- package/src/components/ItaliaTheme/View/__tests__/ServizioSitiEsterni.test.jsx +240 -286
- package/src/components/ItaliaTheme/View/__tests__/ServizioTempiScadenze.test.jsx +240 -286
- package/src/components/ItaliaTheme/View/__tests__/ServizioUlterioriInformazioni.test.jsx +240 -286
- package/src/components/ItaliaTheme/View/__tests__/ServizioView.test.jsx +470 -560
- package/src/components/ItaliaTheme/View/__tests__/TrasparenzaView.test.jsx +12 -1
- package/src/components/ItaliaTheme/index.js +0 -1
- package/src/components/ItaliaTheme/manage/Widgets/ColorListWidget.jsx +11 -2
- package/src/components/ItaliaTheme/manage/Widgets/HtmlSlateWidget.jsx +156 -0
- package/src/components/ItaliaTheme/manage/Widgets/RichTextWidget.jsx +88 -0
- package/src/components/ItaliaTheme/manage/Widgets/SimpleTextEditorWidget.jsx +158 -0
- package/src/components/ItaliaTheme/manage/Widgets/TextEditorWidget.jsx +167 -270
- package/src/config/Blocks/ListingOptions/index.js +0 -1
- package/src/config/Blocks/ListingOptions/utils.js +0 -7
- package/src/config/Blocks/blocks.js +29 -8
- package/src/config/Blocks/listingVariations.js +1 -1
- package/src/config/Slate/Alignment/AlignMenu.jsx +169 -0
- package/src/config/Slate/Alignment/index.js +42 -0
- package/src/config/Slate/Blockquote/BlockquoteMenu.jsx +151 -0
- package/src/config/Slate/Blockquote/index.js +19 -0
- package/src/config/Slate/Headings/HeadingsMenu.jsx +139 -0
- package/src/config/Slate/Headings/headingsMenu.scss +44 -0
- package/src/config/Slate/Headings/index.js +62 -0
- package/src/config/Slate/Link/deserializer.js +25 -0
- package/src/config/Slate/Link/index.js +126 -0
- package/src/config/Slate/Link/renderer.jsx +99 -0
- package/src/config/Slate/LinkButton/index.js +47 -0
- package/src/config/Slate/TextLarger/index.js +51 -0
- package/src/config/Slate/Underline/index.js +10 -0
- package/src/config/Slate/config.js +43 -0
- package/src/config/Slate/deserializers.js +66 -0
- package/src/config/Slate/dropdownStyle.scss +14 -0
- package/src/config/Slate/dropdownUtils.js +422 -0
- package/src/config/Slate/extensions/breakList.js +91 -0
- package/src/config/Slate/handlers.js +243 -0
- package/src/config/Slate/utils.js +73 -0
- package/src/config/Widgets/widgets.js +1 -2
- package/src/config/italiaConfig.js +5 -53
- package/src/customizations/volto/components/manage/AnchorPlugin/components/LinkButton/AddLinkForm.jsx +361 -0
- package/src/customizations/volto/components/manage/Blocks/HeroImageLeft/Edit.jsx +75 -200
- package/src/customizations/volto/components/manage/Blocks/Video/Body.jsx +0 -1
- package/src/customizations/volto/components/manage/Blocks/Video/Edit.jsx +1 -1
- package/src/customizations/volto/components/manage/Form/BlocksToolbar.jsx +1 -1
- package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +76 -18
- package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +4 -0
- package/src/customizations/volto-form-block/components/Field.jsx +45 -22
- package/src/helpers/EnhanceLink.js +44 -0
- package/src/helpers/FormValidation/FormValidationHelpers.js +3 -0
- package/src/helpers/blocks.js +80 -0
- package/src/helpers/files.js +13 -13
- package/src/helpers/index.js +4 -3
- package/src/helpers/richTextHelper.js +10 -0
- package/src/icons/Group.svg +1 -0
- package/src/icons/blocco-icone.svg +0 -3
- package/src/icons/blockquote-card-dark.svg +1 -0
- package/src/icons/blockquote-card.svg +1 -0
- package/src/icons/blockquote-simple.svg +1 -0
- package/src/icons/text-larger.svg +1 -0
- package/src/theme/ItaliaTheme/Blocks/_accordion.scss +2 -22
- package/src/theme/ItaliaTheme/Blocks/_alert.scss +51 -4
- package/src/theme/ItaliaTheme/Blocks/_bandiInEvidenceTemplate.scss +1 -0
- package/src/theme/ItaliaTheme/Blocks/_callout.scss +32 -0
- package/src/theme/ItaliaTheme/Blocks/_contacts.scss +17 -51
- package/src/theme/ItaliaTheme/Blocks/_countdown.scss +10 -1
- package/src/theme/ItaliaTheme/Blocks/_ctaBlock.scss +7 -23
- package/src/theme/ItaliaTheme/Blocks/_gridBlock.scss +1 -1
- package/src/theme/ItaliaTheme/Blocks/_hero.scss +1 -8
- package/src/theme/ItaliaTheme/Blocks/_iconBlocks.scss +6 -77
- package/src/theme/ItaliaTheme/Blocks/_imageCardTextBlock.scss +3 -2
- package/src/theme/ItaliaTheme/Blocks/_numbers.scss +6 -20
- package/src/theme/ItaliaTheme/Blocks/_simpleCardTextBlock.scss +8 -2
- package/src/theme/ItaliaTheme/Blocks/_subblocks-edit.scss +3 -1
- package/src/theme/ItaliaTheme/Blocks/_tableOfContents.scss +1 -0
- package/src/theme/ItaliaTheme/Components/_megamenu.scss +0 -4
- package/src/theme/ItaliaTheme/Components/_mobileMenu.scss +12 -16
- package/src/theme/ItaliaTheme/Print/_page.scss +1 -1
- package/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Blocks/_contacts.scss +3 -0
- package/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Blocks/_cta.scss +1 -0
- package/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Blocks/_searchSections.scss +1 -0
- package/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_headercenter.scss +1 -0
- package/src/theme/ItaliaTheme/Views/_cartellaModulistica.scss +11 -2
- package/src/theme/ItaliaTheme/Views/_servizio.scss +2 -2
- package/src/theme/ItaliaTheme/Views/_slider.scss +3 -0
- package/src/theme/ItaliaTheme/Widgets/_iconWidget.scss +4 -0
- package/src/theme/ItaliaTheme/_common.scss +1 -0
- package/src/theme/ItaliaTheme/_home.scss +0 -4
- package/src/theme/ItaliaTheme/_main.scss +78 -84
- package/src/theme/_cms-ui.scss +63 -160
- package/src/theme/_mixins.scss +13 -0
- package/src/theme/bootstrap-override/_bootstrap-italia-site.scss +1 -0
- package/src/theme/bootstrap-override/bootstrap-italia/_footer.scss +1 -1
- package/src/theme/bootstrap-override/bootstrap-italia/_forms.scss +7 -0
- package/src/theme/bootstrap-override/bootstrap-italia/_headercenter.scss +8 -3
- package/src/theme/extras/_forms.scss +2 -14
- package/src/theme/site.scss +1 -1
- package/test-setup-config.js +58 -0
- package/.yarn/cache/braces-npm-3.0.2-782240b28a-e2a8e769a8.zip +0 -0
- package/.yarn/cache/fill-range-npm-7.0.1-b8b1817caa-cc283f4e65.zip +0 -0
- package/.yarn/cache/micromatch-npm-4.0.5-cfab5d7669-02a17b671c.zip +0 -0
- package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block.jsx +0 -151
- package/src/components/ItaliaTheme/RemoveBodyClass/RemoveBodyClass.jsx +0 -84
- package/src/config/RichTextEditor/LinkEntity.jsx +0 -27
- package/src/config/RichTextEditor/Plugins/AnchorPlugin/components/Link/index.jsx +0 -44
- package/src/config/RichTextEditor/Plugins/AnchorPlugin/components/LinkButton/AddLinkForm.jsx +0 -349
- package/src/config/RichTextEditor/Plugins/AnchorPlugin/components/LinkButton/index.js +0 -150
- package/src/config/RichTextEditor/Plugins/AnchorPlugin/index.js +0 -88
- package/src/config/RichTextEditor/ToolbarButtons/AlignButton.jsx +0 -61
- package/src/config/RichTextEditor/ToolbarButtons/ButtonsButton.jsx +0 -14
- package/src/config/RichTextEditor/ToolbarButtons/CalloutsButton.jsx +0 -38
- package/src/config/RichTextEditor/ToolbarButtons/DraftJsDropdownButton.jsx +0 -106
- package/src/config/RichTextEditor/ToolbarButtons/HeadingsButton.jsx +0 -57
- package/src/config/RichTextEditor/ToolbarButtons/TextSizeButton.jsx +0 -65
- package/src/config/RichTextEditor/ToolbarButtons/UnderlineButton.jsx +0 -14
- package/src/config/RichTextEditor/config.js +0 -253
- package/src/config/volto-gdpr-privacy-defaultPanelConfig.js +0 -292
- package/src/customizations/volto/components/manage/Blocks/ToC/View.jsx +0 -134
- package/src/customizations/volto/components/manage/Blocks/ToC/variations/DefaultTocRenderer.jsx +0 -99
- package/src/customizations/volto/config/RichTextEditor/Plugins.jsx +0 -63
- package/src/helpers/redraftHelper.js +0 -9
- package/src/theme/ItaliaTheme/Components/_logo.scss +0 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render, screen } from '@testing-library/react';
|
|
3
3
|
import '@testing-library/jest-dom/extend-expect';
|
|
4
|
-
import
|
|
4
|
+
import View from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/TextCard/SimpleCard/View';
|
|
5
5
|
import configureStore from 'redux-mock-store';
|
|
6
6
|
import { Provider } from 'react-intl-redux';
|
|
7
7
|
import { MemoryRouter } from 'react-router-dom';
|
|
@@ -12,34 +12,18 @@ const mockStore = configureStore(middlewares);
|
|
|
12
12
|
|
|
13
13
|
const mock_fields = {
|
|
14
14
|
'@type': 'testo_riquadro_semplice',
|
|
15
|
-
simple_card_content:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
entityMap: {},
|
|
28
|
-
},
|
|
29
|
-
simple_card_title: {
|
|
30
|
-
blocks: [
|
|
31
|
-
{
|
|
32
|
-
data: {},
|
|
33
|
-
depth: 0,
|
|
34
|
-
entityRanges: [],
|
|
35
|
-
inlineStyleRanges: [],
|
|
36
|
-
key: '23dhi',
|
|
37
|
-
text: 'Is this the real life?',
|
|
38
|
-
type: 'unstyled',
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
entityMap: {},
|
|
42
|
-
},
|
|
15
|
+
simple_card_content: [
|
|
16
|
+
{
|
|
17
|
+
children: [
|
|
18
|
+
{
|
|
19
|
+
text: 'Is this just fantasy?',
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
type: 'p',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
|
|
26
|
+
simple_card_title: 'Is this the real life?',
|
|
43
27
|
};
|
|
44
28
|
|
|
45
29
|
const store = mockStore({
|
|
@@ -53,7 +37,7 @@ test('View renders all fields', async () => {
|
|
|
53
37
|
render(
|
|
54
38
|
<Provider store={store}>
|
|
55
39
|
<MemoryRouter>
|
|
56
|
-
<
|
|
40
|
+
<View data={mock_fields} block={{ id: '1234' }} />
|
|
57
41
|
</MemoryRouter>
|
|
58
42
|
</Provider>,
|
|
59
43
|
);
|
|
@@ -4,28 +4,20 @@ import { useIntl } from 'react-intl';
|
|
|
4
4
|
import { SiteProperty } from 'volto-site-settings';
|
|
5
5
|
import { getSiteProperty } from 'design-comuni-plone-theme/helpers';
|
|
6
6
|
|
|
7
|
-
const BrandText = ({ mobile = false
|
|
7
|
+
const BrandText = ({ mobile = false }) => {
|
|
8
8
|
const intl = useIntl();
|
|
9
|
-
// TODO DEPRECATED: remove and only use SiteProperty
|
|
10
|
-
const deprecatedSiteTitle =
|
|
11
|
-
subsite?.title || getSiteProperty('siteTitle', intl.locale);
|
|
12
9
|
let title = SiteProperty({
|
|
13
10
|
property: 'site_title',
|
|
14
|
-
forceValue: deprecatedSiteTitle,
|
|
15
11
|
defaultValue: getSiteProperty('siteTitle', intl.locale),
|
|
16
12
|
getValue: true,
|
|
17
|
-
getParent:
|
|
13
|
+
getParent: false,
|
|
18
14
|
});
|
|
19
15
|
|
|
20
|
-
// TODO DEPRECATED: remove and only use SiteProperty
|
|
21
|
-
const deprecatedSiteSubtitle =
|
|
22
|
-
subsite?.description || getSiteProperty('siteSubtitle', intl.locale);
|
|
23
16
|
const description = SiteProperty({
|
|
24
17
|
property: 'site_subtitle',
|
|
25
|
-
forceValue: deprecatedSiteSubtitle,
|
|
26
18
|
defaultValue: getSiteProperty('siteSubtitle', intl.locale),
|
|
27
19
|
getValue: true,
|
|
28
|
-
getParent:
|
|
20
|
+
getParent: false,
|
|
29
21
|
});
|
|
30
22
|
const titleSplit = title?.split('\n') ?? null;
|
|
31
23
|
title = titleSplit?.map((t, i) => (
|
|
@@ -37,11 +29,13 @@ const BrandText = ({ mobile = false, subsite, getParent = false }) => {
|
|
|
37
29
|
|
|
38
30
|
return (
|
|
39
31
|
<div className="it-brand-text">
|
|
40
|
-
{title && <
|
|
32
|
+
{title && <div className="it-brand-title">{title}</div>}
|
|
41
33
|
{description && (
|
|
42
|
-
<
|
|
34
|
+
<div
|
|
35
|
+
className={cx('it-brand-tagline', { 'd-none d-md-block': !mobile })}
|
|
36
|
+
>
|
|
43
37
|
{description}
|
|
44
|
-
</
|
|
38
|
+
</div>
|
|
45
39
|
)}
|
|
46
40
|
</div>
|
|
47
41
|
);
|
|
@@ -1,8 +1,37 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useIntl } from 'react-intl';
|
|
3
|
+
import { SiteProperty } from 'volto-site-settings';
|
|
4
|
+
import { getSiteProperty } from 'design-comuni-plone-theme/helpers';
|
|
3
5
|
|
|
4
6
|
const BrandTextFooter = () => {
|
|
5
|
-
|
|
7
|
+
const intl = useIntl();
|
|
8
|
+
let title = SiteProperty({
|
|
9
|
+
property: 'site_title',
|
|
10
|
+
defaultValue: getSiteProperty('siteTitle', intl.locale),
|
|
11
|
+
getValue: true,
|
|
12
|
+
getParent: true,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const description = SiteProperty({
|
|
16
|
+
property: 'site_subtitle',
|
|
17
|
+
defaultValue: getSiteProperty('siteSubtitle', intl.locale),
|
|
18
|
+
getValue: true,
|
|
19
|
+
getParent: true,
|
|
20
|
+
});
|
|
21
|
+
const titleSplit = title?.split('\n') ?? null;
|
|
22
|
+
title = titleSplit?.map((t, i) => (
|
|
23
|
+
<React.Fragment key={i}>
|
|
24
|
+
{t}
|
|
25
|
+
{i < titleSplit.length - 1 && <br />}
|
|
26
|
+
</React.Fragment>
|
|
27
|
+
));
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div className="it-brand-text">
|
|
31
|
+
{title && <div className="h2">{title}</div>}
|
|
32
|
+
{description && <div className="h3">{description}</div>}
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
6
35
|
};
|
|
7
36
|
|
|
8
37
|
export default BrandTextFooter;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React, { useEffect } from 'react';
|
|
7
|
+
|
|
7
8
|
import { useDispatch, useSelector } from 'react-redux';
|
|
8
9
|
import { useLocation } from 'react-router-dom';
|
|
9
10
|
|
|
@@ -17,6 +18,8 @@ import {
|
|
|
17
18
|
FooterSocials,
|
|
18
19
|
} from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
19
20
|
|
|
21
|
+
import { TextBlockView } from '@plone/volto-slate/blocks/Text';
|
|
22
|
+
import { fromHtml } from 'design-comuni-plone-theme/config/Slate/utils';
|
|
20
23
|
import { useHomePath } from 'design-comuni-plone-theme/helpers';
|
|
21
24
|
|
|
22
25
|
const messages = defineMessages({
|
|
@@ -41,10 +44,15 @@ const FooterInfos = () => {
|
|
|
41
44
|
}, [dispatch, location]);
|
|
42
45
|
|
|
43
46
|
//filter rootpaths
|
|
44
|
-
|
|
47
|
+
let footerColumns = getItemsByPath(
|
|
45
48
|
footerConfiguration,
|
|
46
49
|
location?.pathname?.length ? location.pathname : homepath,
|
|
47
50
|
);
|
|
51
|
+
footerColumns.forEach((column) => {
|
|
52
|
+
if (__CLIENT__) {
|
|
53
|
+
column.slateText = fromHtml(column.text);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
48
56
|
|
|
49
57
|
const colWidth =
|
|
50
58
|
12 / (footerColumns.length < N_COLUMNS ? footerColumns.length : N_COLUMNS);
|
|
@@ -77,13 +85,18 @@ const FooterInfos = () => {
|
|
|
77
85
|
)}
|
|
78
86
|
</p>
|
|
79
87
|
{column.showSocial && <FooterSocials />}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
88
|
+
{column.slateText ? (
|
|
89
|
+
<TextBlockView data={{ value: column.slateText }} />
|
|
90
|
+
) : (
|
|
91
|
+
column.text && (
|
|
92
|
+
<div
|
|
93
|
+
dangerouslySetInnerHTML={{
|
|
94
|
+
__html: flattenHTMLToAppURL(column.text.data),
|
|
95
|
+
}}
|
|
96
|
+
/>
|
|
97
|
+
)
|
|
98
|
+
)}
|
|
99
|
+
{/* <TextBlockView id={index} data={{ value: data.text }} /> */}
|
|
87
100
|
{column.newsletterSubscribe && <FooterNewsletterSubscribe />}
|
|
88
101
|
</Col>
|
|
89
102
|
))}
|
|
@@ -60,15 +60,15 @@ const FooterNavigation = () => {
|
|
|
60
60
|
title: item.title,
|
|
61
61
|
}}
|
|
62
62
|
/>
|
|
63
|
-
<
|
|
64
|
-
|
|
63
|
+
<UniversalLink
|
|
64
|
+
href={item.url}
|
|
65
65
|
title={
|
|
66
66
|
intl.formatMessage(messages.goToPage) + ': ' + item.title
|
|
67
67
|
}
|
|
68
68
|
className={markFooterLinks ? 'underlined' : ''}
|
|
69
69
|
>
|
|
70
70
|
{item.title}
|
|
71
|
-
</
|
|
71
|
+
</UniversalLink>
|
|
72
72
|
</h4>
|
|
73
73
|
{/* DEPRECATED: isFooterCollapsed to be removed in version 12 */}
|
|
74
74
|
{!config.settings.isFooterCollapsed &&
|
|
@@ -36,15 +36,8 @@ const HeaderSlim = () => {
|
|
|
36
36
|
|
|
37
37
|
const staticParentSiteTitle = getSiteProperty('parentSiteTitle', intl.locale);
|
|
38
38
|
|
|
39
|
-
// TODO DEPRECATED use only SiteProperty
|
|
40
|
-
const deprecatedSubsiteParentSiteTitle = getSiteProperty(
|
|
41
|
-
'subsiteParentSiteTitle',
|
|
42
|
-
intl.locale,
|
|
43
|
-
);
|
|
44
|
-
|
|
45
39
|
const subsiteParentSiteTitle = SiteProperty({
|
|
46
40
|
property: 'site_title',
|
|
47
|
-
forceValue: deprecatedSubsiteParentSiteTitle,
|
|
48
41
|
defaultValue: getSiteProperty('subsiteParentSiteTitle', intl.locale),
|
|
49
42
|
getValue: true,
|
|
50
43
|
getParent: true,
|
|
@@ -137,7 +137,6 @@ const MegaMenu = ({ item, pathname }) => {
|
|
|
137
137
|
} else {
|
|
138
138
|
//megamenu
|
|
139
139
|
let hasBlocks = hasBlocksData(item);
|
|
140
|
-
|
|
141
140
|
if (item?.blocks && Object.keys(item.blocks).length === 1) {
|
|
142
141
|
let b = item.blocks[Object.keys(item.blocks)[0]];
|
|
143
142
|
|
|
@@ -156,6 +155,11 @@ const MegaMenu = ({ item, pathname }) => {
|
|
|
156
155
|
}
|
|
157
156
|
}
|
|
158
157
|
}
|
|
158
|
+
if (b['@type'] === 'slate') {
|
|
159
|
+
if (b.plaintext?.length === 0) {
|
|
160
|
+
hasBlocks = false;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
159
163
|
}
|
|
160
164
|
|
|
161
165
|
const childrenGroups = [];
|
|
@@ -30,9 +30,8 @@ const BandoApprofondimenti = ({ content }) => {
|
|
|
30
30
|
title={item.title}
|
|
31
31
|
description={item.description}
|
|
32
32
|
download_url={item.url}
|
|
33
|
-
item={item}
|
|
33
|
+
item={item} //viene utilizzato nelle customizzazioni per ottenere altre proprietà
|
|
34
34
|
/>
|
|
35
|
-
// item={item} viene utilizzato nelle customizzazioni per ottenere altre proprietà
|
|
36
35
|
);
|
|
37
36
|
} else if (item.type === 'Collegamento') {
|
|
38
37
|
return (
|
|
@@ -27,9 +27,15 @@ const Downloads = ({ item, titleDoc }) => {
|
|
|
27
27
|
titleDoc !== item.title && <div className="title">{item.title}</div>
|
|
28
28
|
)}
|
|
29
29
|
<div className="downloads">
|
|
30
|
-
<DownloadFileFormat file={item?.file_principale} />
|
|
31
|
-
<DownloadFileFormat
|
|
32
|
-
|
|
30
|
+
<DownloadFileFormat file={item?.file_principale} title={item.title} />
|
|
31
|
+
<DownloadFileFormat
|
|
32
|
+
file={item?.formato_alternativo_1}
|
|
33
|
+
title={item.title}
|
|
34
|
+
/>
|
|
35
|
+
<DownloadFileFormat
|
|
36
|
+
file={item?.formato_alternativo_2}
|
|
37
|
+
title={item.title}
|
|
38
|
+
/>
|
|
33
39
|
</div>
|
|
34
40
|
</React.Fragment>
|
|
35
41
|
) : (
|
|
@@ -37,6 +43,7 @@ const Downloads = ({ item, titleDoc }) => {
|
|
|
37
43
|
href={item.remoteUrl || flattenToAppURL(item['@id'])}
|
|
38
44
|
title={item.title}
|
|
39
45
|
className="modulistica-link"
|
|
46
|
+
item={item}
|
|
40
47
|
>
|
|
41
48
|
<div className="title">{item.title}</div>
|
|
42
49
|
<FontAwesomeIcon
|
|
@@ -51,7 +58,6 @@ const Downloads = ({ item, titleDoc }) => {
|
|
|
51
58
|
|
|
52
59
|
const DocRow = ({ doc }) => {
|
|
53
60
|
const [itemOpen, setItemOpen] = useState(false);
|
|
54
|
-
|
|
55
61
|
const titleWrapper = (
|
|
56
62
|
<div
|
|
57
63
|
className={cx('title-wrap', {
|
|
@@ -59,7 +65,10 @@ const DocRow = ({ doc }) => {
|
|
|
59
65
|
})}
|
|
60
66
|
>
|
|
61
67
|
<div id={`title-${doc.id}`} className="title">
|
|
62
|
-
<UniversalLink
|
|
68
|
+
<UniversalLink
|
|
69
|
+
href={doc.remoteUrl || flattenToAppURL(doc['@id'])}
|
|
70
|
+
item={doc}
|
|
71
|
+
>
|
|
63
72
|
{doc.title}
|
|
64
73
|
</UniversalLink>
|
|
65
74
|
{doc?.description && (
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { defineMessages, useIntl } from 'react-intl';
|
|
4
4
|
import { Card, CardBody, CardTitle } from 'design-react-kit';
|
|
5
|
-
import {
|
|
5
|
+
import { UniversalLink } from '@plone/volto/components';
|
|
6
6
|
import Icon from 'design-comuni-plone-theme/components/ItaliaTheme/Icons/Icon';
|
|
7
7
|
|
|
8
8
|
const messages = defineMessages({
|
|
@@ -12,8 +12,15 @@ const messages = defineMessages({
|
|
|
12
12
|
},
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
const Attachment = ({ title, description, download_url }) => {
|
|
15
|
+
const Attachment = ({ title, description, download_url, item = {} }) => {
|
|
16
16
|
const intl = useIntl();
|
|
17
|
+
let _item = { ...item };
|
|
18
|
+
if (item['@type'] === 'File') {
|
|
19
|
+
_item = item.file;
|
|
20
|
+
}
|
|
21
|
+
if (item['@type'] === 'Image') {
|
|
22
|
+
_item = item.image;
|
|
23
|
+
}
|
|
17
24
|
return (
|
|
18
25
|
<Card
|
|
19
26
|
className="card card-teaser shadow p-4 mt-3 rounded attachment"
|
|
@@ -27,7 +34,16 @@ const Attachment = ({ title, description, download_url }) => {
|
|
|
27
34
|
/>
|
|
28
35
|
<CardBody tag="div">
|
|
29
36
|
<CardTitle className="h5">
|
|
30
|
-
<
|
|
37
|
+
<UniversalLink
|
|
38
|
+
item={{
|
|
39
|
+
..._item,
|
|
40
|
+
'@id': download_url,
|
|
41
|
+
}}
|
|
42
|
+
title={title}
|
|
43
|
+
aria-label={title}
|
|
44
|
+
>
|
|
45
|
+
{title}
|
|
46
|
+
</UniversalLink>
|
|
31
47
|
</CardTitle>
|
|
32
48
|
{description && <p>{description}</p>}
|
|
33
49
|
</CardBody>
|
|
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
5
5
|
import { FontAwesomeIcon as IconFA } from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
6
6
|
import { defineMessages, useIntl } from 'react-intl';
|
|
7
|
-
import { Icon } from '@plone/volto/components';
|
|
7
|
+
import { Icon, UniversalLink } from '@plone/volto/components';
|
|
8
8
|
import { getFileViewFormat } from 'design-comuni-plone-theme/helpers';
|
|
9
9
|
|
|
10
10
|
const messages = defineMessages({
|
|
@@ -23,6 +23,8 @@ const DownloadFileFormat = ({
|
|
|
23
23
|
formatsize = '2x',
|
|
24
24
|
className,
|
|
25
25
|
showLabel = false,
|
|
26
|
+
title,
|
|
27
|
+
hideFileFormatLabel = false,
|
|
26
28
|
}) => {
|
|
27
29
|
const intl = useIntl();
|
|
28
30
|
const defaultIcon = { lib: 'far', name: 'file', svg_format: false };
|
|
@@ -40,15 +42,17 @@ const DownloadFileFormat = ({
|
|
|
40
42
|
|
|
41
43
|
icon = viewFormat?.icon ?? defaultIcon;
|
|
42
44
|
}
|
|
43
|
-
const pdfFile = file?.download?.includes('@@display-file');
|
|
44
45
|
|
|
45
46
|
return file ? (
|
|
46
|
-
<
|
|
47
|
-
|
|
47
|
+
<UniversalLink
|
|
48
|
+
item={{
|
|
49
|
+
...file,
|
|
50
|
+
['@id']: file.download,
|
|
51
|
+
}}
|
|
48
52
|
title={file.filename}
|
|
49
53
|
className={className}
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
aria-label={(title ?? file.filename) + ': ' + label}
|
|
55
|
+
hideFileFormat={hideFileFormatLabel}
|
|
52
56
|
>
|
|
53
57
|
{!icon.svg_format ? (
|
|
54
58
|
<IconFA
|
|
@@ -61,7 +65,7 @@ const DownloadFileFormat = ({
|
|
|
61
65
|
<Icon className="icon-svg-custom" name={icon.name} />
|
|
62
66
|
)}
|
|
63
67
|
{showLabel && <span className="ms-4">{label}</span>}
|
|
64
|
-
</
|
|
68
|
+
</UniversalLink>
|
|
65
69
|
) : null;
|
|
66
70
|
};
|
|
67
71
|
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
CarouselWrapper,
|
|
15
15
|
} from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
16
16
|
import { useSlider } from 'design-comuni-plone-theme/components/ItaliaTheme/Slider/slider';
|
|
17
|
+
|
|
17
18
|
import PropTypes from 'prop-types';
|
|
18
19
|
import { contentFolderHasItems } from 'design-comuni-plone-theme/helpers';
|
|
19
20
|
import { UniversalLink } from '@plone/volto/components';
|
|
@@ -61,7 +61,6 @@ const PageHeaderEventDates = ({ content, moment, rrule }) => {
|
|
|
61
61
|
const isWeekdaySunday = content.recurrence
|
|
62
62
|
.split('BYDAY')[1]
|
|
63
63
|
?.includes('SU');
|
|
64
|
-
|
|
65
64
|
const RRULE_LANGUAGE = rrulei18n(intl, Moment);
|
|
66
65
|
eventRecurrenceText = rruleSet.rrules()[0]?.toText(
|
|
67
66
|
(t) => {
|
|
@@ -8,8 +8,12 @@ const PageHeaderLinkServizio = ({ content }) => {
|
|
|
8
8
|
content.canale_digitale_link &&
|
|
9
9
|
!content.stato_servizio ? (
|
|
10
10
|
<div className="mb-4">
|
|
11
|
-
<p className="
|
|
12
|
-
<UniversalLink
|
|
11
|
+
<p className="canale-digitale">
|
|
12
|
+
<UniversalLink
|
|
13
|
+
className="btn btn-primary btn-lg"
|
|
14
|
+
href={content.canale_digitale_link}
|
|
15
|
+
data-element="service-online-access"
|
|
16
|
+
>
|
|
13
17
|
{intl.formatMessage(messages.canale_digitale_link)}
|
|
14
18
|
</UniversalLink>
|
|
15
19
|
</p>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import cx from 'classnames';
|
|
4
|
-
import {
|
|
4
|
+
import { values } from 'lodash';
|
|
5
5
|
import { flattenHTMLToAppURL } from '@plone/volto/helpers';
|
|
6
6
|
import { hasBlocksData } from '@plone/volto/helpers';
|
|
7
7
|
import { RenderBlocks } from 'design-comuni-plone-theme/components/ItaliaTheme/View';
|
|
@@ -11,14 +11,16 @@ const richTextHasContent = (data) => {
|
|
|
11
11
|
//ReactDOMServer.renderToStaticMarkup(RenderBlocks({ data: data })),
|
|
12
12
|
const renderedBlocks = RenderBlocks({ data: data });
|
|
13
13
|
|
|
14
|
-
const textBlocks = values(data.blocks).filter(
|
|
14
|
+
const textBlocks = values(data.blocks).filter(
|
|
15
|
+
(b) => b['@type'] === 'slate',
|
|
16
|
+
);
|
|
15
17
|
const noTextBlocks = values(data.blocks).filter(
|
|
16
|
-
(b) => b['@type'] !== '
|
|
18
|
+
(b) => b['@type'] !== 'slate',
|
|
17
19
|
);
|
|
18
20
|
|
|
19
|
-
const textContent =
|
|
20
|
-
|
|
21
|
-
)?.
|
|
21
|
+
const textContent = textBlocks?.filter(
|
|
22
|
+
(b) => b.plaintext != null && b.plaintext?.trim().length > 0,
|
|
23
|
+
)?.[0];
|
|
22
24
|
|
|
23
25
|
return (
|
|
24
26
|
renderedBlocks !== null &&
|
|
@@ -22,26 +22,23 @@ it('renders content', () => {
|
|
|
22
22
|
<RichText
|
|
23
23
|
data={{
|
|
24
24
|
blocks: {
|
|
25
|
-
'
|
|
26
|
-
'@type': '
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
],
|
|
39
|
-
entityMap: {},
|
|
40
|
-
},
|
|
25
|
+
'77317d1d-92a1-4e94-946c-f00647c71f32': {
|
|
26
|
+
'@type': 'slate',
|
|
27
|
+
plaintext: 'Un mega evento con delle mega iniziative',
|
|
28
|
+
value: [
|
|
29
|
+
{
|
|
30
|
+
children: [
|
|
31
|
+
{
|
|
32
|
+
text: 'Un mega evento con delle mega iniziative',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
type: 'p',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
41
38
|
},
|
|
42
39
|
},
|
|
43
40
|
blocks_layout: {
|
|
44
|
-
items: ['
|
|
41
|
+
items: ['77317d1d-92a1-4e94-946c-f00647c71f32'],
|
|
45
42
|
},
|
|
46
43
|
}}
|
|
47
44
|
/>
|
|
@@ -11,7 +11,7 @@ const EventoContattiOrganizzatoreEsterno = ({ content }) => {
|
|
|
11
11
|
content?.telefono ||
|
|
12
12
|
content?.email ||
|
|
13
13
|
content?.fax ? (
|
|
14
|
-
<div className="mb-5">
|
|
14
|
+
<div className="mb-5 ">
|
|
15
15
|
<Card
|
|
16
16
|
className="card card-teaser rounded shadow mt-3"
|
|
17
17
|
noWrapper={true}
|
|
@@ -16,10 +16,6 @@ const messages = defineMessages({
|
|
|
16
16
|
id: 'event_url',
|
|
17
17
|
defaultMessage: "Url dell'evento",
|
|
18
18
|
},
|
|
19
|
-
patrocinato_da: {
|
|
20
|
-
id: 'patrocinato_da',
|
|
21
|
-
defaultMessage: 'Patrocinato da',
|
|
22
|
-
},
|
|
23
19
|
strutture_politiche: {
|
|
24
20
|
id: 'event_strutture_politiche',
|
|
25
21
|
defaultMessage: 'Strutture politiche coinvolte',
|
|
@@ -27,18 +27,21 @@ const ServizioAccedi = ({ content }) => {
|
|
|
27
27
|
>
|
|
28
28
|
{content.canale_digitale_link && (
|
|
29
29
|
<div className="mb-4">
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<UniversalLink href={content.canale_digitale_link}>
|
|
30
|
+
<p data-element="service-online-access">
|
|
31
|
+
<UniversalLink
|
|
32
|
+
href={content.canale_digitale_link}
|
|
33
|
+
className="btn btn-primary mobile-full"
|
|
34
|
+
>
|
|
36
35
|
{intl.formatMessage(messages.canale_digitale_link)}
|
|
37
36
|
</UniversalLink>
|
|
38
37
|
</p>
|
|
39
38
|
</div>
|
|
40
39
|
)}
|
|
41
|
-
<RichText
|
|
40
|
+
<RichText
|
|
41
|
+
data={content.prenota_appuntamento}
|
|
42
|
+
content={content}
|
|
43
|
+
serif={false}
|
|
44
|
+
/>
|
|
42
45
|
{content.canale_fisico?.map?.((canale) => (
|
|
43
46
|
<div className="mt-3">
|
|
44
47
|
<OfficeCard
|
|
@@ -10,17 +10,18 @@ const fieldDataToPlainText = (field) => {
|
|
|
10
10
|
if (index > 0) accumulator += ' ';
|
|
11
11
|
accumulator += field.blocks[item].text?.blocks[0].text ?? '';
|
|
12
12
|
}
|
|
13
|
+
if (field.blocks[item]['@type'] === 'slate') {
|
|
14
|
+
if (index > 0) accumulator += ' ';
|
|
15
|
+
accumulator += field.blocks[item].plaintext ?? '';
|
|
16
|
+
}
|
|
13
17
|
return accumulator;
|
|
14
18
|
}, '');
|
|
15
19
|
};
|
|
16
20
|
|
|
17
21
|
const ServizioMetatag = ({ content }) => {
|
|
18
22
|
const intl = useIntl();
|
|
19
|
-
// TODO DEPRECATED use only SiteProperty
|
|
20
|
-
const deprecatedSiteTitle = getSiteProperty('siteTitle', intl.locale);
|
|
21
23
|
let siteTitle = SiteProperty({
|
|
22
24
|
property: 'site_title',
|
|
23
|
-
forceValue: deprecatedSiteTitle,
|
|
24
25
|
getValue: true,
|
|
25
26
|
defaultTitle: getSiteProperty('siteTitle', intl.locale),
|
|
26
27
|
});
|