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
package/publiccode.yml
CHANGED
|
@@ -227,9 +227,9 @@ maintenance:
|
|
|
227
227
|
name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici
|
|
228
228
|
platforms:
|
|
229
229
|
- web
|
|
230
|
-
releaseDate: '2025-03-
|
|
230
|
+
releaseDate: '2025-03-31'
|
|
231
231
|
softwareType: standalone/web
|
|
232
|
-
softwareVersion:
|
|
232
|
+
softwareVersion: 12.0.0
|
|
233
233
|
url: 'https://github.com/italia/design-comuni-plone-theme'
|
|
234
234
|
usedBy:
|
|
235
235
|
- ASP Comuni Modenesi Area Nord
|
|
@@ -59,6 +59,7 @@ const Collapse = ({
|
|
|
59
59
|
className="overlay"
|
|
60
60
|
style={{ display: isOpen ? 'block' : 'none' }}
|
|
61
61
|
onClick={onOverlayClick}
|
|
62
|
+
onKeyDown={() => {}}
|
|
62
63
|
></div>
|
|
63
64
|
{/* Deprecato - non viene più utilizzato da v12.0.0 per ragioni di accessibilità
|
|
64
65
|
Close button ora presente in Navigation.jsx
|
|
@@ -5,20 +5,16 @@ CUSTOMIZATIONS:
|
|
|
5
5
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { useIntl } from 'react-intl';
|
|
8
|
-
import { useSelector } from 'react-redux';
|
|
9
8
|
import { Helmet } from '@plone/volto/helpers';
|
|
10
9
|
import { SiteProperty } from 'volto-site-settings';
|
|
11
10
|
import { getSiteProperty } from 'design-comuni-plone-theme/helpers';
|
|
12
11
|
|
|
13
12
|
const SiteSettingsExtras = (props) => {
|
|
14
13
|
const intl = useIntl();
|
|
15
|
-
const subsite = useSelector((state) => state.subsite?.data);
|
|
16
14
|
let siteTitle = SiteProperty({
|
|
17
15
|
property: 'site_title',
|
|
18
16
|
getValue: true,
|
|
19
17
|
defaultValue: getSiteProperty('siteTitle', intl.locale),
|
|
20
|
-
// TODO DEPRECATED: remove and only use defaultValue in v12
|
|
21
|
-
forceValue: subsite?.title || getSiteProperty('siteTitle', intl.locale),
|
|
22
18
|
});
|
|
23
19
|
|
|
24
20
|
const parentSiteTitle = SiteProperty({
|
|
@@ -26,8 +22,6 @@ const SiteSettingsExtras = (props) => {
|
|
|
26
22
|
getValue: true,
|
|
27
23
|
getParent: true,
|
|
28
24
|
defaultValue: getSiteProperty('siteTitle', intl.locale),
|
|
29
|
-
// TODO DEPRECATED: remove and only use defaultValue in v12
|
|
30
|
-
forceValue: getSiteProperty('siteTitle', intl.locale),
|
|
31
25
|
});
|
|
32
26
|
|
|
33
27
|
if (parentSiteTitle !== siteTitle) {
|
|
@@ -38,7 +38,7 @@ class EditBlock extends SubblockEdit {
|
|
|
38
38
|
* Constructor
|
|
39
39
|
* @method constructor
|
|
40
40
|
* @param {Object} props Component properties
|
|
41
|
-
* @constructs
|
|
41
|
+
* @constructs Accordion Edit
|
|
42
42
|
*/
|
|
43
43
|
constructor(props) {
|
|
44
44
|
super(props);
|
|
@@ -87,30 +87,33 @@ class EditBlock extends SubblockEdit {
|
|
|
87
87
|
}}
|
|
88
88
|
>
|
|
89
89
|
<TextEditorWidget
|
|
90
|
+
{...this.props}
|
|
91
|
+
key="title"
|
|
92
|
+
showToolbar={false}
|
|
90
93
|
data={this.props.data}
|
|
91
94
|
fieldName="title"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
onChangeBlock={(block, _data) => {
|
|
96
|
+
this.onChange(_data);
|
|
97
|
+
}}
|
|
95
98
|
placeholder={this.props.intl.formatMessage(
|
|
96
99
|
messages.titlePlaceholder,
|
|
97
100
|
)}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
this.setState({
|
|
101
|
+
selected={this.props.selected && this.state.focusOn === 'title'}
|
|
102
|
+
setSelected={(f) => {
|
|
103
|
+
this.setState({
|
|
104
|
+
focusOn: f,
|
|
105
|
+
});
|
|
101
106
|
}}
|
|
102
|
-
|
|
107
|
+
focusNextField={() => {
|
|
103
108
|
this.setState({ focusOn: 'text' });
|
|
104
109
|
}}
|
|
105
|
-
|
|
110
|
+
focusPrevField={
|
|
106
111
|
this.props.isFirst
|
|
107
112
|
? this.props.onFocusPreviousBlock
|
|
108
113
|
: () => {
|
|
109
114
|
this.props.onSubblockChangeFocus(this.props.index - 1);
|
|
110
115
|
}
|
|
111
116
|
}
|
|
112
|
-
showToolbar={false}
|
|
113
|
-
key="title"
|
|
114
117
|
/>
|
|
115
118
|
</div>
|
|
116
119
|
</h3>
|
|
@@ -123,31 +126,33 @@ class EditBlock extends SubblockEdit {
|
|
|
123
126
|
>
|
|
124
127
|
<div className="accordion-inner">
|
|
125
128
|
<TextEditorWidget
|
|
129
|
+
{...this.props}
|
|
130
|
+
key="text"
|
|
126
131
|
data={this.props.data}
|
|
127
132
|
fieldName="text"
|
|
128
133
|
selected={
|
|
129
134
|
this.props.selected && this.state.focusOn === 'text'
|
|
130
135
|
}
|
|
131
|
-
block={this.props.block}
|
|
132
|
-
onChangeBlock={this.onChange}
|
|
133
136
|
placeholder={this.props.intl.formatMessage(
|
|
134
137
|
messages.textPlaceholder,
|
|
135
138
|
)}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
139
|
+
onChangeBlock={(block, _data) => {
|
|
140
|
+
this.onChange(_data);
|
|
141
|
+
}}
|
|
142
|
+
setSelected={(f) => this.setState({ focusOn: f })}
|
|
143
|
+
focusNextField={
|
|
144
|
+
!this.props.isLast
|
|
145
|
+
? () => {
|
|
146
|
+
this.setState({
|
|
147
|
+
focusOn: null,
|
|
148
|
+
subIndexSelected: this.props.index + 1,
|
|
149
|
+
});
|
|
145
150
|
}
|
|
151
|
+
: null //default go to next block
|
|
146
152
|
}
|
|
147
|
-
|
|
153
|
+
focusPrevField={() => {
|
|
148
154
|
this.setState({ focusOn: 'title' });
|
|
149
155
|
}}
|
|
150
|
-
key="text"
|
|
151
156
|
/>
|
|
152
157
|
</div>
|
|
153
158
|
{this.props.data.href && (
|
|
@@ -5,12 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import redraft from 'redraft';
|
|
9
8
|
import { useIntl, defineMessages } from 'react-intl';
|
|
10
9
|
import cx from 'classnames';
|
|
11
10
|
import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
12
11
|
import { UniversalLink } from '@plone/volto/components';
|
|
13
|
-
import
|
|
12
|
+
import { TextBlockView } from '@plone/volto-slate/blocks/Text';
|
|
14
13
|
|
|
15
14
|
const messages = defineMessages({
|
|
16
15
|
vedi: {
|
|
@@ -34,6 +33,7 @@ const messages = defineMessages({
|
|
|
34
33
|
*/
|
|
35
34
|
const ViewBlock = ({ data, isOpen, toggle, id, index }) => {
|
|
36
35
|
const intl = useIntl();
|
|
36
|
+
|
|
37
37
|
return (
|
|
38
38
|
<div className="accordion-item subblock-view">
|
|
39
39
|
{data.title && (
|
|
@@ -55,11 +55,7 @@ const ViewBlock = ({ data, isOpen, toggle, id, index }) => {
|
|
|
55
55
|
}
|
|
56
56
|
/>
|
|
57
57
|
|
|
58
|
-
{
|
|
59
|
-
data.title,
|
|
60
|
-
config.settings.richtextViewSettings.ToHTMLRenderers,
|
|
61
|
-
config.settings.richtextViewSettings.ToHTMLOptions,
|
|
62
|
-
)}
|
|
58
|
+
{data.title}
|
|
63
59
|
</button>
|
|
64
60
|
</h3>
|
|
65
61
|
)}
|
|
@@ -73,11 +69,7 @@ const ViewBlock = ({ data, isOpen, toggle, id, index }) => {
|
|
|
73
69
|
hidden={!isOpen}
|
|
74
70
|
>
|
|
75
71
|
<div className="accordion-inner">
|
|
76
|
-
{
|
|
77
|
-
data.text,
|
|
78
|
-
config.settings.richtextViewSettings.ToHTMLRenderers,
|
|
79
|
-
config.settings.richtextViewSettings.ToHTMLOptions,
|
|
80
|
-
)}
|
|
72
|
+
<TextBlockView id={id} data={{ value: data.text }} />
|
|
81
73
|
</div>
|
|
82
74
|
{data.href && (
|
|
83
75
|
<div className="link-more">
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
SubblocksEdit,
|
|
13
13
|
SubblocksWrapper,
|
|
14
14
|
} from 'volto-subblocks';
|
|
15
|
+
import { TextEditorWidget } from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
15
16
|
|
|
16
17
|
import { SidebarPortal } from '@plone/volto/components';
|
|
18
|
+
import { handleKeyDownOwnFocusManagement } from 'design-comuni-plone-theme/helpers/blocks';
|
|
17
19
|
import Sidebar from './Sidebar.jsx';
|
|
18
20
|
|
|
19
21
|
import { defineMessages } from 'react-intl';
|
|
20
22
|
|
|
21
|
-
import { TextEditorWidget } from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
22
|
-
|
|
23
23
|
const messages = defineMessages({
|
|
24
24
|
addItem: {
|
|
25
25
|
id: 'Add accordion item',
|
|
@@ -40,6 +40,68 @@ const messages = defineMessages({
|
|
|
40
40
|
* @extends Component
|
|
41
41
|
*/
|
|
42
42
|
class Edit extends SubblocksEdit {
|
|
43
|
+
constructor(props) {
|
|
44
|
+
super(props);
|
|
45
|
+
this.nodeF = React.createRef();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
UNSAFE_componentWillReceiveProps(newProps) {
|
|
49
|
+
if (newProps.selected) {
|
|
50
|
+
if (!this.props.selected) {
|
|
51
|
+
if (this.state.subIndexSelected < 0) {
|
|
52
|
+
this.onSubblockChangeFocus(0);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
} else {
|
|
56
|
+
this.onSubblockChangeFocus(-1);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
handleEnter = (e) => {
|
|
61
|
+
if (this.props.selected && this.state.subIndexSelected < 0) {
|
|
62
|
+
handleKeyDownOwnFocusManagement(e, this.props);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
handleClick = (e) => {
|
|
67
|
+
const hasParent = (element, className) => {
|
|
68
|
+
if (!element.parentNode) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (element.classList.contains(className)) {
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return hasParent(element.parentNode, className);
|
|
77
|
+
};
|
|
78
|
+
const clickOutsideSubblocks =
|
|
79
|
+
!e.target.classList.contains('volto-subblocks-wrapper') &&
|
|
80
|
+
!hasParent(e.target, 'volto-subblocks-wrapper');
|
|
81
|
+
|
|
82
|
+
if (clickOutsideSubblocks) {
|
|
83
|
+
this.setState({ subIndexSelected: -1 });
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
componentDidMount() {
|
|
88
|
+
if (this.props.selected && this.node) {
|
|
89
|
+
this.node.focus();
|
|
90
|
+
}
|
|
91
|
+
if (this.props.selected && this.nodeF.current) {
|
|
92
|
+
this.nodeF.current.focus();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (this.state.subblocks.length === 0) {
|
|
96
|
+
this.addSubblock();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (this.nodeF && this.nodeF.current) {
|
|
100
|
+
this.nodeF.current.addEventListener('keydown', this.handleEnter, false);
|
|
101
|
+
this.nodeF.current.addEventListener('click', this.handleClick, false);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
43
105
|
/**
|
|
44
106
|
* Render method.
|
|
45
107
|
* @method render
|
|
@@ -50,60 +112,74 @@ class Edit extends SubblocksEdit {
|
|
|
50
112
|
return <div />;
|
|
51
113
|
}
|
|
52
114
|
return (
|
|
53
|
-
<div className="public-ui">
|
|
115
|
+
<div className="public-ui" tabIndex="-1" ref={this.nodeF}>
|
|
54
116
|
<div className="full-width section section-muted section-inset-shadow py-5 is-edit-mode">
|
|
55
117
|
<Container className="px-md-4">
|
|
56
118
|
<Card className="card-bg rounded" noWrapper={false} space tag="div">
|
|
119
|
+
<div className="block-header">
|
|
120
|
+
<div className="title">
|
|
121
|
+
<TextEditorWidget
|
|
122
|
+
{...this.props}
|
|
123
|
+
showToolbar={false}
|
|
124
|
+
data={this.props.data}
|
|
125
|
+
key={'title'}
|
|
126
|
+
fieldName="title"
|
|
127
|
+
selected={this.state.selectedField === 'title'}
|
|
128
|
+
setSelected={(f) => {
|
|
129
|
+
this.setState({
|
|
130
|
+
selectedField: f,
|
|
131
|
+
subIndexSelected: -1,
|
|
132
|
+
});
|
|
133
|
+
}}
|
|
134
|
+
placeholder={this.props.intl.formatMessage(messages.title)}
|
|
135
|
+
focusNextField={() => {
|
|
136
|
+
this.setState({ selectedField: 'description' });
|
|
137
|
+
}}
|
|
138
|
+
/>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
<div className="description">
|
|
142
|
+
<TextEditorWidget
|
|
143
|
+
{...this.props}
|
|
144
|
+
showToolbar={true}
|
|
145
|
+
data={this.props.data}
|
|
146
|
+
fieldName="description"
|
|
147
|
+
selected={this.state.selectedField === 'description'}
|
|
148
|
+
setSelected={(f) => {
|
|
149
|
+
this.setState({
|
|
150
|
+
selectedField: f,
|
|
151
|
+
subIndexSelected: -1,
|
|
152
|
+
});
|
|
153
|
+
}}
|
|
154
|
+
placeholder={this.props.intl.formatMessage(
|
|
155
|
+
messages.description,
|
|
156
|
+
)}
|
|
157
|
+
focusPrevField={() => {
|
|
158
|
+
this.setState({ selectedField: 'title' });
|
|
159
|
+
}}
|
|
160
|
+
focusNextField={() => {
|
|
161
|
+
this.setState({
|
|
162
|
+
selectedField: null,
|
|
163
|
+
subIndexSelected: 0,
|
|
164
|
+
});
|
|
165
|
+
}}
|
|
166
|
+
/>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
57
169
|
<CardBody tag="div">
|
|
58
|
-
<TextEditorWidget
|
|
59
|
-
data={this.props.data}
|
|
60
|
-
fieldName="title"
|
|
61
|
-
selected={this.state.selectedField === 'title'}
|
|
62
|
-
block={this.props.block}
|
|
63
|
-
onChangeBlock={(data) => {
|
|
64
|
-
this.props.onChangeBlock(this.props.block, {
|
|
65
|
-
...data,
|
|
66
|
-
});
|
|
67
|
-
}}
|
|
68
|
-
placeholder={this.props.intl.formatMessage(messages.title)}
|
|
69
|
-
showToolbar={false}
|
|
70
|
-
onSelectBlock={() => {}}
|
|
71
|
-
onAddBlock={() => {
|
|
72
|
-
this.setState({ selectedField: 'description' });
|
|
73
|
-
}}
|
|
74
|
-
/>
|
|
75
|
-
<TextEditorWidget
|
|
76
|
-
data={this.props.data}
|
|
77
|
-
fieldName="description"
|
|
78
|
-
selected={this.state.selectedField === 'description'}
|
|
79
|
-
block={this.props.block}
|
|
80
|
-
onChangeBlock={(data) =>
|
|
81
|
-
this.props.onChangeBlock(this.props.block, {
|
|
82
|
-
...data,
|
|
83
|
-
})
|
|
84
|
-
}
|
|
85
|
-
placeholder={this.props.intl.formatMessage(
|
|
86
|
-
messages.description,
|
|
87
|
-
)}
|
|
88
|
-
showToolbar={true}
|
|
89
|
-
onSelectBlock={() => {}}
|
|
90
|
-
onAddBlock={() => {}}
|
|
91
|
-
/>
|
|
92
170
|
<SubblocksWrapper node={this.node}>
|
|
93
171
|
{this.state.subblocks.map((subblock, subindex) => (
|
|
94
172
|
<div className="accordion-item" key={subblock.id}>
|
|
95
173
|
<EditBlock
|
|
174
|
+
{...this.props}
|
|
175
|
+
{...this.subblockProps}
|
|
176
|
+
onChangeFocus={this.onSubblockChangeFocus}
|
|
96
177
|
data={subblock}
|
|
97
178
|
index={subindex}
|
|
98
179
|
selected={
|
|
99
180
|
this.props.selected &&
|
|
100
181
|
this.isSubblockSelected(subindex)
|
|
101
182
|
}
|
|
102
|
-
{...this.subblockProps}
|
|
103
|
-
openObjectBrowser={this.props.openObjectBrowser}
|
|
104
|
-
onFocusPreviousBlock={this.props.onFocusPreviousBlock}
|
|
105
|
-
onFocusNextBlock={this.props.onFocusNextBlock}
|
|
106
|
-
onSubblockChangeFocus={this.onSubblockChangeFocus}
|
|
107
183
|
isLast={this.state.subblocks.length - 1 === subindex}
|
|
108
184
|
isFirst={subindex === 0}
|
|
109
185
|
/>
|
|
@@ -6,10 +6,8 @@
|
|
|
6
6
|
import React, { useState } from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import ViewBlock from './Block/ViewBlock';
|
|
9
|
+
import { TextBlockView } from '@plone/volto-slate/blocks/Text';
|
|
9
10
|
import { Container, Card, CardBody } from 'design-react-kit';
|
|
10
|
-
import redraft from 'redraft';
|
|
11
|
-
import config from '@plone/volto/registry';
|
|
12
|
-
import { checkRedraftHasContent } from 'design-comuni-plone-theme/helpers';
|
|
13
11
|
|
|
14
12
|
/**
|
|
15
13
|
* View Accordion block class.
|
|
@@ -29,22 +27,10 @@ const AccordionView = ({ data, block }) => {
|
|
|
29
27
|
<Container className="px-md-4">
|
|
30
28
|
<Card className="card-bg rounded" noWrapper={false} space tag="div">
|
|
31
29
|
<div className="block-header">
|
|
32
|
-
{
|
|
33
|
-
|
|
34
|
-
{redraft(
|
|
35
|
-
data.title,
|
|
36
|
-
config.settings.richtextViewSettings.ToHTMLRenderers,
|
|
37
|
-
config.settings.richtextViewSettings.ToHTMLOptions,
|
|
38
|
-
)}
|
|
39
|
-
</div>
|
|
40
|
-
)}
|
|
41
|
-
{checkRedraftHasContent(data.description) && (
|
|
30
|
+
{data.title && <div className="title">{data.title}</div>}
|
|
31
|
+
{data.description && (
|
|
42
32
|
<div className="description">
|
|
43
|
-
{
|
|
44
|
-
data.description,
|
|
45
|
-
config.settings.richtextViewSettings.ToHTMLRenderers,
|
|
46
|
-
config.settings.richtextViewSettings.ToHTMLOptions,
|
|
47
|
-
)}
|
|
33
|
+
<TextBlockView data={{ value: data.description }} />
|
|
48
34
|
</div>
|
|
49
35
|
)}
|
|
50
36
|
</div>
|
|
@@ -3,18 +3,14 @@
|
|
|
3
3
|
* @module components/manage/Blocks/Image/Edit
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import React, {
|
|
7
|
-
import PropTypes from 'prop-types';
|
|
8
|
-
import { connect } from 'react-redux';
|
|
9
|
-
import { compose } from 'redux';
|
|
6
|
+
import React, { useEffect } from 'react';
|
|
10
7
|
|
|
11
8
|
import cx from 'classnames';
|
|
12
9
|
import { Container, Row, Col } from 'design-react-kit';
|
|
13
10
|
|
|
14
|
-
import { createContent } from '@plone/volto/actions';
|
|
15
11
|
import { SidebarPortal } from '@plone/volto/components';
|
|
16
|
-
import { defineMessages,
|
|
17
|
-
|
|
12
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
13
|
+
import { useHandleDetachedBlockFocus } from 'design-comuni-plone-theme/helpers/blocks';
|
|
18
14
|
import {
|
|
19
15
|
AlertSidebar,
|
|
20
16
|
TextEditorWidget,
|
|
@@ -26,116 +22,67 @@ const messages = defineMessages({
|
|
|
26
22
|
defaultMessage: 'Digita il testo…',
|
|
27
23
|
},
|
|
28
24
|
});
|
|
29
|
-
/**
|
|
30
|
-
* Edit Alert block class.
|
|
31
|
-
* @class Edit
|
|
32
|
-
* @extends Component
|
|
33
|
-
*/
|
|
34
|
-
class Edit extends Component {
|
|
35
|
-
/**
|
|
36
|
-
* Property types.
|
|
37
|
-
* @property {Object} propTypes Property types.
|
|
38
|
-
* @static
|
|
39
|
-
*/
|
|
40
|
-
static propTypes = {
|
|
41
|
-
selected: PropTypes.bool.isRequired,
|
|
42
|
-
block: PropTypes.string.isRequired,
|
|
43
|
-
index: PropTypes.number.isRequired,
|
|
44
|
-
data: PropTypes.objectOf(PropTypes.any).isRequired,
|
|
45
|
-
content: PropTypes.objectOf(PropTypes.any).isRequired,
|
|
46
|
-
request: PropTypes.shape({
|
|
47
|
-
loading: PropTypes.bool,
|
|
48
|
-
loaded: PropTypes.bool,
|
|
49
|
-
}).isRequired,
|
|
50
|
-
pathname: PropTypes.string.isRequired,
|
|
51
|
-
onChangeBlock: PropTypes.func.isRequired,
|
|
52
|
-
onSelectBlock: PropTypes.func.isRequired,
|
|
53
|
-
onDeleteBlock: PropTypes.func.isRequired,
|
|
54
|
-
onFocusPreviousBlock: PropTypes.func.isRequired,
|
|
55
|
-
onFocusNextBlock: PropTypes.func.isRequired,
|
|
56
|
-
handleKeyDown: PropTypes.func.isRequired,
|
|
57
|
-
createContent: PropTypes.func.isRequired,
|
|
58
|
-
};
|
|
59
25
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
26
|
+
const Edit = (props) => {
|
|
27
|
+
const { data, onChangeBlock, block, selected } = props;
|
|
28
|
+
const intl = useIntl();
|
|
29
|
+
const { selectedField, setSelectedField } = useHandleDetachedBlockFocus(
|
|
30
|
+
props,
|
|
31
|
+
'text',
|
|
32
|
+
);
|
|
67
33
|
|
|
68
|
-
|
|
69
|
-
if (
|
|
70
|
-
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (!data.bg_color) {
|
|
36
|
+
onChangeBlock(block, {
|
|
37
|
+
...data,
|
|
38
|
+
bg_color: data.color ?? 'warning',
|
|
39
|
+
});
|
|
71
40
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
>
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
{
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
? 'size-' + this.props.data.sizeImage
|
|
95
|
-
: 'size-l',
|
|
96
|
-
])}
|
|
97
|
-
/>
|
|
98
|
-
</Col>
|
|
99
|
-
)}
|
|
100
|
-
<Col>
|
|
101
|
-
<TextEditorWidget
|
|
102
|
-
data={this.props.data}
|
|
103
|
-
fieldName="text"
|
|
104
|
-
selected={this.props.selected}
|
|
105
|
-
block={this.props.block}
|
|
106
|
-
onChangeBlock={(data) =>
|
|
107
|
-
this.props.onChangeBlock(this.props.block, data)
|
|
108
|
-
}
|
|
109
|
-
placeholder={this.props.intl.formatMessage(
|
|
110
|
-
messages.content_placeholder,
|
|
111
|
-
)}
|
|
112
|
-
showToolbar={true}
|
|
113
|
-
onSelectBlock={this.props.onSelectBlock}
|
|
114
|
-
onAddBlock={this.props.onAddBlock}
|
|
115
|
-
index={this.props.index}
|
|
116
|
-
onFocusNextBlock={this.props.onFocusNextBlock}
|
|
117
|
-
onFocusPreviousBlock={this.props.onFocusPreviousBlock}
|
|
41
|
+
}, [data, onChangeBlock, block]);
|
|
42
|
+
|
|
43
|
+
return __SERVER__ ? (
|
|
44
|
+
<div />
|
|
45
|
+
) : (
|
|
46
|
+
<div className="public-ui" tabIndex="-1">
|
|
47
|
+
<div
|
|
48
|
+
className={cx('alertblock', {
|
|
49
|
+
selected: selected,
|
|
50
|
+
})}
|
|
51
|
+
>
|
|
52
|
+
<Row className={cx('full-width p-5', 'bg-alert-' + data.bg_color)}>
|
|
53
|
+
<Container className="ui">
|
|
54
|
+
<Row className="align-items-start">
|
|
55
|
+
{data.image?.data && (
|
|
56
|
+
<Col sm={2} className="pb-3 image-col">
|
|
57
|
+
<img
|
|
58
|
+
src={`data:${data.image['content-type']};${data.image.encoding},${data.image.data}`}
|
|
59
|
+
alt=""
|
|
60
|
+
className={cx('left-image', [
|
|
61
|
+
data.sizeImage ? 'size-' + data.sizeImage : 'size-l',
|
|
62
|
+
])}
|
|
118
63
|
/>
|
|
119
64
|
</Col>
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
65
|
+
)}
|
|
66
|
+
<Col>
|
|
67
|
+
<TextEditorWidget
|
|
68
|
+
{...props}
|
|
69
|
+
data={data}
|
|
70
|
+
fieldName="text"
|
|
71
|
+
selected={selected && selectedField === 'text'}
|
|
72
|
+
setSelected={setSelectedField}
|
|
73
|
+
placeholder={intl.formatMessage(messages.content_placeholder)}
|
|
74
|
+
showToolbar={true}
|
|
75
|
+
/>
|
|
76
|
+
</Col>
|
|
77
|
+
</Row>
|
|
78
|
+
</Container>
|
|
79
|
+
</Row>
|
|
127
80
|
</div>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
81
|
+
<SidebarPortal selected={selected}>
|
|
82
|
+
<AlertSidebar {...props} />
|
|
83
|
+
</SidebarPortal>
|
|
84
|
+
</div>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
131
87
|
|
|
132
|
-
export default
|
|
133
|
-
injectIntl,
|
|
134
|
-
connect(
|
|
135
|
-
(state) => ({
|
|
136
|
-
request: state.content.create,
|
|
137
|
-
content: state.content.data,
|
|
138
|
-
}),
|
|
139
|
-
{ createContent },
|
|
140
|
-
),
|
|
141
|
-
)(Edit);
|
|
88
|
+
export default Edit;
|