design-comuni-plone-theme 11.10.1 → 12.0.0-alpha.1
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/slate.yml +47 -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/require-package-name-npm-2.0.1-ac9a206b63-00f4e9e467.zip +0 -0
- package/.yarn/cache/{volto-form-block-npm-3.7.2-f24953a510-7387a1b85a.zip → volto-form-block-npm-3.8.2-e49cbe07d5-5b72a06a5e.zip} +0 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +878 -904
- package/RELEASE.md +8 -0
- package/locales/de/LC_MESSAGES/volto.po +86 -18
- package/locales/en/LC_MESSAGES/volto.po +86 -18
- package/locales/es/LC_MESSAGES/volto.po +86 -18
- package/locales/fr/LC_MESSAGES/volto.po +86 -18
- package/locales/it/LC_MESSAGES/volto.po +86 -18
- package/locales/volto.pot +87 -19
- package/package.json +4 -2
- package/publiccode.yml +2 -2
- package/src/components/Collapse.jsx +1 -0
- 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 +67 -6
- 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 +84 -63
- package/src/components/ItaliaTheme/Blocks/ContactsBlock/Block/ViewBlock.jsx +19 -39
- package/src/components/ItaliaTheme/Blocks/ContactsBlock/Edit.jsx +92 -19
- 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 +40 -15
- package/src/components/ItaliaTheme/Blocks/IconBlocks/Block/ViewBlock.jsx +6 -21
- package/src/components/ItaliaTheme/Blocks/IconBlocks/Edit.jsx +93 -20
- package/src/components/ItaliaTheme/Blocks/IconBlocks/Sidebar.jsx +1 -9
- package/src/components/ItaliaTheme/Blocks/IconBlocks/View.jsx +4 -17
- package/src/components/ItaliaTheme/Blocks/NumbersBlock/Block/EditBlock.jsx +46 -15
- package/src/components/ItaliaTheme/Blocks/NumbersBlock/Block/ViewBlock.jsx +2 -18
- package/src/components/ItaliaTheme/Blocks/NumbersBlock/Edit.jsx +84 -11
- package/src/components/ItaliaTheme/Blocks/NumbersBlock/View.jsx +2 -11
- package/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block.jsx +33 -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/__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/Footer/FooterInfos.jsx +22 -8
- package/src/components/ItaliaTheme/Footer/FooterNavigation.jsx +3 -3
- package/src/components/ItaliaTheme/MegaMenu/MegaMenu.jsx +5 -1
- package/src/components/ItaliaTheme/Slider/SingleSlideWrapper.jsx +2 -3
- 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/Module.jsx +7 -6
- 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/ServizioView/ServizioAccedi.jsx +5 -6
- package/src/components/ItaliaTheme/View/ServizioView/ServizioMetatag.jsx +4 -0
- package/src/components/ItaliaTheme/View/__tests__/CartellaModulisticaView.test.jsx +12 -1
- package/src/components/ItaliaTheme/View/__tests__/IncaricoView.test.jsx +24 -30
- 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/manage/Widgets/ColorListWidget.jsx +11 -2
- package/src/components/ItaliaTheme/manage/Widgets/HtmlSlateWidget.jsx +154 -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 +12 -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 +7 -54
- package/src/customizations/volto/components/manage/AnchorPlugin/components/LinkButton/AddLinkForm.jsx +360 -0
- package/src/customizations/volto/components/manage/Blocks/HeroImageLeft/Edit.jsx +75 -200
- 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 +59 -6
- package/src/customizations/volto-form-block/components/Field.jsx +45 -22
- package/src/customizations/volto-form-block/components/FormResult.jsx +74 -0
- package/src/customizations/volto-form-block/components/FormView.jsx +79 -66
- package/src/customizations/volto-form-block/components/Widget/Button.jsx +50 -0
- package/src/helpers/EnhanceLink.js +44 -0
- package/src/helpers/FormValidation/FormValidationHelpers.js +3 -0
- package/src/helpers/blocks.js +86 -0
- package/src/helpers/files.js +14 -14
- 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 +1 -10
- package/src/theme/ItaliaTheme/Blocks/_alert.scss +53 -1
- 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 +15 -32
- package/src/theme/ItaliaTheme/Blocks/_ctaBlock.scss +0 -14
- 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 +0 -30
- package/src/theme/ItaliaTheme/Blocks/_imageCardTextBlock.scss +3 -2
- package/src/theme/ItaliaTheme/Blocks/_numbers.scss +1 -5
- package/src/theme/ItaliaTheme/Blocks/_simpleCardTextBlock.scss +8 -2
- package/src/theme/ItaliaTheme/Blocks/_tableOfContents.scss +1 -0
- package/src/theme/ItaliaTheme/Components/_megamenu.scss +0 -4
- 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/_slider.scss +3 -3
- package/src/theme/ItaliaTheme/Widgets/_iconWidget.scss +4 -0
- package/src/theme/ItaliaTheme/_main.scss +42 -54
- package/src/theme/_cms-ui.scss +59 -161
- package/src/theme/extras/_forms.scss +2 -14
- package/src/theme/site.scss +1 -0
- package/test-setup-config.js +58 -0
- package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block.jsx +0 -151
- 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
|
@@ -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 Contacts Blocks edit
|
|
42
42
|
*/
|
|
43
43
|
constructor(props) {
|
|
44
44
|
super(props);
|
|
@@ -58,6 +58,18 @@ class EditBlock extends SubblockEdit {
|
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
+
|
|
62
|
+
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
63
|
+
if (!this.props.selected && nextProps.focusOn) {
|
|
64
|
+
this.props.onSelectBlock(this.props.block);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (nextProps.selected && !this.state.focusOn) {
|
|
68
|
+
this.setState({ focusOn: 'title' });
|
|
69
|
+
} else if (!nextProps.selected) {
|
|
70
|
+
this.setState({ focusOn: null });
|
|
71
|
+
}
|
|
72
|
+
}
|
|
61
73
|
/**
|
|
62
74
|
* Render method.
|
|
63
75
|
* @method render
|
|
@@ -69,7 +81,7 @@ class EditBlock extends SubblockEdit {
|
|
|
69
81
|
}
|
|
70
82
|
|
|
71
83
|
return (
|
|
72
|
-
<Subblock subblock={this} className="subblock-edit">
|
|
84
|
+
<Subblock subblock={this} className="subblock-edit" tabIndex="-1">
|
|
73
85
|
<Card
|
|
74
86
|
className="card-bg rounded"
|
|
75
87
|
noWrapper={false}
|
|
@@ -81,104 +93,113 @@ class EditBlock extends SubblockEdit {
|
|
|
81
93
|
<CardBody tag="div">
|
|
82
94
|
<div className="contact-title">
|
|
83
95
|
{/* eslint-disable */}
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
96
|
+
<TextEditorWidget
|
|
97
|
+
{...this.props}
|
|
98
|
+
key="title"
|
|
99
|
+
showToolbar={false}
|
|
100
|
+
data={this.props.data}
|
|
101
|
+
fieldName="title"
|
|
102
|
+
onChangeBlock={(block, _data) => {
|
|
103
|
+
this.props.onChangeBlock(this.props.index, _data);
|
|
87
104
|
}}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
/>
|
|
107
|
-
</div>
|
|
105
|
+
placeholder={this.props.intl.formatMessage(
|
|
106
|
+
messages.titlePlaceholder,
|
|
107
|
+
)}
|
|
108
|
+
selected={this.props.selected && this.state.focusOn === 'title'}
|
|
109
|
+
setSelected={(f) => {
|
|
110
|
+
this.setState({ focusOn: f });
|
|
111
|
+
}}
|
|
112
|
+
focusNextField={() => {
|
|
113
|
+
this.setState({ focusOn: 'text' });
|
|
114
|
+
}}
|
|
115
|
+
focusPrevField={
|
|
116
|
+
this.props.isFirst
|
|
117
|
+
? this.props.onFocusPreviousBlock
|
|
118
|
+
: () => {
|
|
119
|
+
this.props.onSubblockChangeFocus(this.props.index - 1);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/>
|
|
108
123
|
</div>
|
|
109
124
|
|
|
110
|
-
<div
|
|
111
|
-
className="contact-text"
|
|
112
|
-
onClick={() => {
|
|
113
|
-
this.setState({ focusOn: 'text' });
|
|
114
|
-
}}
|
|
115
|
-
>
|
|
125
|
+
<div className="contact-text">
|
|
116
126
|
<TextEditorWidget
|
|
127
|
+
{...this.props}
|
|
128
|
+
key="text"
|
|
117
129
|
data={this.props.data}
|
|
118
130
|
fieldName="text"
|
|
119
|
-
selected={this.props.selected && this.state.focusOn === 'text'}
|
|
120
|
-
block={this.props.block}
|
|
121
|
-
onChangeBlock={this.onChange}
|
|
122
131
|
placeholder={this.props.intl.formatMessage(
|
|
123
132
|
messages.textPlaceholder,
|
|
124
133
|
)}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
134
|
+
onChangeBlock={(block, _data) => {
|
|
135
|
+
this.props.onChangeBlock(this.props.index, _data);
|
|
136
|
+
}}
|
|
137
|
+
selected={this.props.selected && this.state.focusOn === 'text'}
|
|
138
|
+
setSelected={(f) => this.setState({ focusOn: f })}
|
|
139
|
+
focusPrevField={() => {
|
|
140
|
+
this.setState({ focusOn: 'title' });
|
|
141
|
+
}}
|
|
142
|
+
focusNextField={() => {
|
|
143
|
+
this.setState({ focusOn: 'tel' });
|
|
129
144
|
}}
|
|
130
|
-
key="text"
|
|
131
145
|
/>
|
|
132
146
|
</div>
|
|
133
147
|
|
|
134
|
-
<div
|
|
135
|
-
className="contact-info"
|
|
136
|
-
onClick={() => {
|
|
137
|
-
this.setState({ focusOn: 'tel' });
|
|
138
|
-
}}
|
|
139
|
-
>
|
|
148
|
+
<div className="contact-info">
|
|
140
149
|
<div className="icon-wrapper">
|
|
141
150
|
<Icon icon="phone-alt" />
|
|
142
151
|
</div>
|
|
143
152
|
<TextEditorWidget
|
|
153
|
+
{...this.props}
|
|
154
|
+
key="tel"
|
|
144
155
|
data={this.props.data}
|
|
145
156
|
fieldName="tel"
|
|
157
|
+
wrapClass="tel"
|
|
146
158
|
selected={this.props.selected && this.state.focusOn === 'tel'}
|
|
147
|
-
|
|
148
|
-
|
|
159
|
+
onChangeBlock={(block, _data) => {
|
|
160
|
+
this.props.onChangeBlock(this.props.index, _data);
|
|
161
|
+
}}
|
|
149
162
|
placeholder={this.props.intl.formatMessage(
|
|
150
163
|
messages.textPlaceholder,
|
|
151
164
|
)}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
this.setState({ focusOn:
|
|
165
|
+
setSelected={(f) => this.setState({ focusOn: f })}
|
|
166
|
+
focusPrevField={() => {
|
|
167
|
+
this.setState({ focusOn: 'text' });
|
|
168
|
+
}}
|
|
169
|
+
focusNextField={() => {
|
|
170
|
+
this.setState({ focusOn: 'email' });
|
|
155
171
|
}}
|
|
156
|
-
key="tel"
|
|
157
172
|
/>
|
|
158
173
|
</div>
|
|
159
|
-
<div
|
|
160
|
-
className="contact-info"
|
|
161
|
-
onClick={() => {
|
|
162
|
-
this.setState({ focusOn: 'email' });
|
|
163
|
-
}}
|
|
164
|
-
>
|
|
174
|
+
<div className="contact-info">
|
|
165
175
|
<div className="icon-wrapper">
|
|
166
176
|
<Icon icon="envelope" />
|
|
167
177
|
</div>
|
|
168
178
|
<TextEditorWidget
|
|
179
|
+
{...this.props}
|
|
180
|
+
key="email"
|
|
181
|
+
wrapClass="email"
|
|
169
182
|
data={this.props.data}
|
|
170
183
|
fieldName="email"
|
|
171
184
|
selected={this.props.selected && this.state.focusOn === 'email'}
|
|
172
|
-
|
|
173
|
-
|
|
185
|
+
onChangeBlock={(block, _data) => {
|
|
186
|
+
this.props.onChangeBlock(this.props.index, _data);
|
|
187
|
+
}}
|
|
174
188
|
placeholder={this.props.intl.formatMessage(
|
|
175
189
|
messages.textPlaceholder,
|
|
176
190
|
)}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
this.setState({ focusOn:
|
|
191
|
+
setSelected={(f) => this.setState({ focusOn: f })}
|
|
192
|
+
focusPrevField={() => {
|
|
193
|
+
this.setState({ focusOn: 'tel' });
|
|
180
194
|
}}
|
|
181
|
-
|
|
195
|
+
focusNextField={
|
|
196
|
+
!this.props.isLast
|
|
197
|
+
? () => {
|
|
198
|
+
this.setState({ focusOn: null });
|
|
199
|
+
this.props.onSubblockChangeFocus(this.props.index + 1);
|
|
200
|
+
}
|
|
201
|
+
: null //default go to next block
|
|
202
|
+
}
|
|
182
203
|
/>
|
|
183
204
|
</div>
|
|
184
205
|
</CardBody>
|
|
@@ -5,12 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import redraft from 'redraft';
|
|
9
|
-
|
|
10
|
-
import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
11
8
|
import { Card, CardBody } from 'design-react-kit';
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
9
|
+
import { TextBlockView } from '@plone/volto-slate/blocks/Text';
|
|
10
|
+
import { checkRichTextHasContent } from 'design-comuni-plone-theme/helpers';
|
|
11
|
+
import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
14
12
|
|
|
15
13
|
/**
|
|
16
14
|
* ViewBlock class.
|
|
@@ -18,6 +16,16 @@ import { checkRedraftHasContent } from 'design-comuni-plone-theme/helpers';
|
|
|
18
16
|
* @extends Component
|
|
19
17
|
*/
|
|
20
18
|
const ViewBlock = ({ data, isOpen, toggle, id, index }) => {
|
|
19
|
+
const text = checkRichTextHasContent(data.text) ? (
|
|
20
|
+
<TextBlockView data={{ value: data.text }} />
|
|
21
|
+
) : null;
|
|
22
|
+
const tel = checkRichTextHasContent(data.tel) ? (
|
|
23
|
+
<TextBlockView data={{ value: data.tel }} />
|
|
24
|
+
) : null;
|
|
25
|
+
const email = checkRichTextHasContent(data.email) ? (
|
|
26
|
+
<TextBlockView data={{ value: data.email }} />
|
|
27
|
+
) : null;
|
|
28
|
+
|
|
21
29
|
return (
|
|
22
30
|
<Card
|
|
23
31
|
className="card-bg rounded subblock-view "
|
|
@@ -26,52 +34,24 @@ const ViewBlock = ({ data, isOpen, toggle, id, index }) => {
|
|
|
26
34
|
tag="div"
|
|
27
35
|
>
|
|
28
36
|
<CardBody tag="div">
|
|
29
|
-
{
|
|
30
|
-
|
|
31
|
-
{redraft(
|
|
32
|
-
data.title,
|
|
33
|
-
config.settings.richtextViewSettings.ToHTMLRenderers,
|
|
34
|
-
config.settings.richtextViewSettings.ToHTMLOptions,
|
|
35
|
-
)}
|
|
36
|
-
</div>
|
|
37
|
-
)}
|
|
38
|
-
{checkRedraftHasContent(data.text) && (
|
|
39
|
-
<div className="contact-text">
|
|
40
|
-
{redraft(
|
|
41
|
-
data.text,
|
|
42
|
-
config.settings.richtextViewSettings.ToHTMLRenderers,
|
|
43
|
-
config.settings.richtextViewSettings.ToHTMLOptions,
|
|
44
|
-
)}
|
|
45
|
-
</div>
|
|
46
|
-
)}
|
|
37
|
+
{data.title && <div className="contact-title">{data.title}</div>}
|
|
38
|
+
{text && <div className="contact-text">{text}</div>}
|
|
47
39
|
|
|
48
|
-
{
|
|
40
|
+
{tel && (
|
|
49
41
|
<div className="contact-info">
|
|
50
42
|
<div className="icon-wrapper">
|
|
51
43
|
<Icon icon="phone-alt" />
|
|
52
44
|
</div>
|
|
53
|
-
<div className="tel">
|
|
54
|
-
{redraft(
|
|
55
|
-
data.tel,
|
|
56
|
-
config.settings.richtextViewSettings.ToHTMLRenderers,
|
|
57
|
-
config.settings.richtextViewSettings.ToHTMLOptions,
|
|
58
|
-
)}
|
|
59
|
-
</div>
|
|
45
|
+
<div className="tel">{tel}</div>
|
|
60
46
|
</div>
|
|
61
47
|
)}
|
|
62
48
|
|
|
63
|
-
{
|
|
49
|
+
{email && (
|
|
64
50
|
<div className="contact-info">
|
|
65
51
|
<div className="icon-wrapper">
|
|
66
52
|
<Icon icon="envelope" />
|
|
67
53
|
</div>
|
|
68
|
-
<div className="email">
|
|
69
|
-
{redraft(
|
|
70
|
-
data.email,
|
|
71
|
-
config.settings.richtextViewSettings.ToHTMLRenderers,
|
|
72
|
-
config.settings.richtextViewSettings.ToHTMLOptions,
|
|
73
|
-
)}
|
|
74
|
-
</div>
|
|
54
|
+
<div className="email">{email}</div>
|
|
75
55
|
</div>
|
|
76
56
|
)}
|
|
77
57
|
</CardBody>
|
|
@@ -10,7 +10,7 @@ import { Container, Row, Col } from 'design-react-kit';
|
|
|
10
10
|
import { SidebarPortal } from '@plone/volto/components';
|
|
11
11
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
12
12
|
import { UniversalLink } from '@plone/volto/components';
|
|
13
|
-
|
|
13
|
+
import { handleKeyDownOwnFocusManagement } from 'design-comuni-plone-theme/helpers/blocks';
|
|
14
14
|
import {
|
|
15
15
|
withDNDContext,
|
|
16
16
|
SubblocksEdit,
|
|
@@ -44,7 +44,68 @@ class Edit extends SubblocksEdit {
|
|
|
44
44
|
constructor(props) {
|
|
45
45
|
super(props);
|
|
46
46
|
this.state.selectedField = 'title';
|
|
47
|
+
this.nodeF = React.createRef();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
UNSAFE_componentWillReceiveProps(newProps) {
|
|
51
|
+
if (newProps.selected) {
|
|
52
|
+
if (!this.props.selected) {
|
|
53
|
+
this.setState({ selectedField: 'title' });
|
|
54
|
+
}
|
|
55
|
+
} else {
|
|
56
|
+
this.setState({ selectedField: null });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
handleEnter = (e) => {
|
|
61
|
+
if (
|
|
62
|
+
this.props.selected &&
|
|
63
|
+
this.state.subIndexSelected < 0 &&
|
|
64
|
+
!this.state.selectedField
|
|
65
|
+
) {
|
|
66
|
+
handleKeyDownOwnFocusManagement(e, this.props);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
handleClick = (e) => {
|
|
71
|
+
const hasParent = (element, className) => {
|
|
72
|
+
if (!element.parentNode) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (element.classList.contains(className)) {
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return hasParent(element.parentNode, className);
|
|
81
|
+
};
|
|
82
|
+
const clickOutsideSubblocks =
|
|
83
|
+
!e.target.classList.contains('volto-subblocks-wrapper') &&
|
|
84
|
+
!hasParent(e.target, 'volto-subblocks-wrapper');
|
|
85
|
+
|
|
86
|
+
if (clickOutsideSubblocks) {
|
|
87
|
+
this.setState({ subIndexSelected: -1 });
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
componentDidMount() {
|
|
92
|
+
if (this.props.selected && this.node) {
|
|
93
|
+
this.node.focus();
|
|
94
|
+
}
|
|
95
|
+
if (this.props.selected && this.nodeF.current) {
|
|
96
|
+
this.nodeF.current.focus();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (this.state.subblocks.length === 0) {
|
|
100
|
+
this.addSubblock();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (this.nodeF && this.nodeF.current) {
|
|
104
|
+
this.nodeF.current.addEventListener('keydown', this.handleEnter, false);
|
|
105
|
+
this.nodeF.current.addEventListener('click', this.handleClick, false);
|
|
106
|
+
}
|
|
47
107
|
}
|
|
108
|
+
|
|
48
109
|
/**
|
|
49
110
|
* Render method.
|
|
50
111
|
* @method render
|
|
@@ -56,7 +117,7 @@ class Edit extends SubblocksEdit {
|
|
|
56
117
|
}
|
|
57
118
|
|
|
58
119
|
return (
|
|
59
|
-
<div className="public-ui">
|
|
120
|
+
<div className="public-ui" tabIndex="-1" ref={this.nodeF}>
|
|
60
121
|
<div
|
|
61
122
|
className={`full-width section bg-${
|
|
62
123
|
this.props.data.bg_color ?? 'primary'
|
|
@@ -66,19 +127,18 @@ class Edit extends SubblocksEdit {
|
|
|
66
127
|
<div className="block-header">
|
|
67
128
|
<div className="title">
|
|
68
129
|
<TextEditorWidget
|
|
130
|
+
{...this.props}
|
|
131
|
+
key="title"
|
|
132
|
+
showToolbar={false}
|
|
69
133
|
data={this.props.data}
|
|
70
134
|
fieldName="title"
|
|
71
135
|
selected={this.state.selectedField === 'title'}
|
|
72
|
-
block={this.props.block}
|
|
73
|
-
onChangeBlock={(data) => {
|
|
74
|
-
this.props.onChangeBlock(this.props.block, {
|
|
75
|
-
...data,
|
|
76
|
-
});
|
|
77
|
-
}}
|
|
78
136
|
placeholder={this.props.intl.formatMessage(messages.title)}
|
|
79
|
-
showToolbar={false}
|
|
80
137
|
onSelectBlock={() => {}}
|
|
81
|
-
|
|
138
|
+
setSelected={(f) => {
|
|
139
|
+
this.setState({ selectedField: f, subIndexSelected: -1 });
|
|
140
|
+
}}
|
|
141
|
+
focusNextField={() => {
|
|
82
142
|
this.setState({ selectedField: 'description' });
|
|
83
143
|
}}
|
|
84
144
|
/>
|
|
@@ -86,21 +146,24 @@ class Edit extends SubblocksEdit {
|
|
|
86
146
|
|
|
87
147
|
<div className="description">
|
|
88
148
|
<TextEditorWidget
|
|
149
|
+
{...this.props}
|
|
150
|
+
key="description"
|
|
89
151
|
data={this.props.data}
|
|
90
152
|
fieldName="description"
|
|
91
153
|
selected={this.state.selectedField === 'description'}
|
|
92
|
-
block={this.props.block}
|
|
93
|
-
onChangeBlock={(data) =>
|
|
94
|
-
this.props.onChangeBlock(this.props.block, {
|
|
95
|
-
...data,
|
|
96
|
-
})
|
|
97
|
-
}
|
|
98
154
|
placeholder={this.props.intl.formatMessage(
|
|
99
155
|
messages.description,
|
|
100
156
|
)}
|
|
101
|
-
showToolbar={true}
|
|
102
157
|
onSelectBlock={() => {}}
|
|
103
|
-
|
|
158
|
+
setSelected={(f) => {
|
|
159
|
+
this.setState({ selectedField: f, subIndexSelected: -1 });
|
|
160
|
+
}}
|
|
161
|
+
focusPrevField={() => {
|
|
162
|
+
this.setState({ selectedField: 'title' });
|
|
163
|
+
}}
|
|
164
|
+
focusNextField={() => {
|
|
165
|
+
this.setState({ selectedField: null, subIndexSelected: 0 });
|
|
166
|
+
}}
|
|
104
167
|
/>
|
|
105
168
|
</div>
|
|
106
169
|
</div>
|
|
@@ -116,11 +179,22 @@ class Edit extends SubblocksEdit {
|
|
|
116
179
|
{this.state.subblocks.map((subblock, subindex) => (
|
|
117
180
|
<Col lg="4" key={subblock.id} className="pb-3">
|
|
118
181
|
<EditBlock
|
|
182
|
+
{...this.props}
|
|
119
183
|
data={subblock}
|
|
120
184
|
index={subindex}
|
|
121
185
|
selected={this.isSubblockSelected(subindex)}
|
|
122
186
|
{...this.subblockProps}
|
|
123
187
|
openObjectBrowser={this.props.openObjectBrowser}
|
|
188
|
+
onSubblockChangeFocus={this.onSubblockChangeFocus}
|
|
189
|
+
onChangeFocus={this.onSubblockChangeFocus}
|
|
190
|
+
isLast={this.state.subblocks.length - 1 === subindex}
|
|
191
|
+
isFirst={subindex === 0}
|
|
192
|
+
onFocusPreviousBlock={() => {
|
|
193
|
+
this.setState({
|
|
194
|
+
selectedField: 'description',
|
|
195
|
+
subIndexSelected: -1,
|
|
196
|
+
});
|
|
197
|
+
}}
|
|
124
198
|
/>
|
|
125
199
|
</Col>
|
|
126
200
|
))}
|
|
@@ -134,7 +208,6 @@ class Edit extends SubblocksEdit {
|
|
|
134
208
|
)}
|
|
135
209
|
</Row>
|
|
136
210
|
</SubblocksWrapper>
|
|
137
|
-
|
|
138
211
|
{this.props.data.href && this.props.data.linkMoreTitle && (
|
|
139
212
|
<div className="link-button text-center my-4">
|
|
140
213
|
<UniversalLink
|
|
@@ -5,43 +5,35 @@
|
|
|
5
5
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import redraft from 'redraft';
|
|
9
8
|
import ViewBlock from './Block/ViewBlock';
|
|
10
9
|
import { Container, Row, Col } from 'design-react-kit';
|
|
11
10
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
12
11
|
import { UniversalLink } from '@plone/volto/components';
|
|
13
|
-
import
|
|
14
|
-
|
|
12
|
+
import { TextBlockView } from '@plone/volto-slate/blocks/Text';
|
|
15
13
|
/**
|
|
16
14
|
* View Accordion block class.
|
|
17
15
|
* @class View
|
|
18
16
|
* @extends Component
|
|
19
17
|
*/
|
|
20
|
-
const AccordionView = ({ data, block }) => {
|
|
21
|
-
const
|
|
18
|
+
const AccordionView = ({ data, block, id }) => {
|
|
19
|
+
const now = new Date().getTime();
|
|
22
20
|
return (
|
|
23
|
-
<div className="block contacts">
|
|
21
|
+
<div className="block contacts" id={id}>
|
|
24
22
|
<div className="public-ui">
|
|
25
23
|
<div
|
|
26
24
|
className={`full-width section bg-${data.bg_color ?? 'primary'} py-5`}
|
|
27
25
|
>
|
|
28
26
|
<Container className="px-md-4">
|
|
29
|
-
|
|
30
|
-
<div className="
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</div>
|
|
37
|
-
<div className="description">
|
|
38
|
-
{redraft(
|
|
39
|
-
data.description,
|
|
40
|
-
config.settings.richtextViewSettings.ToHTMLRenderers,
|
|
41
|
-
config.settings.richtextViewSettings.ToHTMLOptions,
|
|
27
|
+
{(data.title || data.description) && (
|
|
28
|
+
<div className="block-header">
|
|
29
|
+
{data.title && <div className="title">{data.title}</div>}
|
|
30
|
+
{data.description && (
|
|
31
|
+
<div className="description">
|
|
32
|
+
<TextBlockView id={id} data={{ value: data.description }} />
|
|
33
|
+
</div>
|
|
42
34
|
)}
|
|
43
35
|
</div>
|
|
44
|
-
|
|
36
|
+
)}
|
|
45
37
|
<Row
|
|
46
38
|
className={
|
|
47
39
|
data.subblocks.length > 3
|
|
@@ -54,7 +46,7 @@ const AccordionView = ({ data, block }) => {
|
|
|
54
46
|
<ViewBlock
|
|
55
47
|
data={subblock}
|
|
56
48
|
key={index}
|
|
57
|
-
id={
|
|
49
|
+
id={now}
|
|
58
50
|
index={index}
|
|
59
51
|
/>
|
|
60
52
|
</Col>
|
|
@@ -8,6 +8,7 @@ import cx from 'classnames';
|
|
|
8
8
|
import { TextEditorWidget } from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
9
9
|
import Sidebar from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/CountDown/Sidebar';
|
|
10
10
|
import CountDown from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/CountDown/CountDown';
|
|
11
|
+
import { useHandleDetachedBlockFocus } from 'design-comuni-plone-theme/helpers/blocks';
|
|
11
12
|
|
|
12
13
|
const messages = defineMessages({
|
|
13
14
|
text: {
|
|
@@ -17,20 +18,16 @@ const messages = defineMessages({
|
|
|
17
18
|
});
|
|
18
19
|
|
|
19
20
|
const Edit = (props) => {
|
|
20
|
-
const {
|
|
21
|
-
data,
|
|
22
|
-
block,
|
|
23
|
-
onChangeBlock,
|
|
24
|
-
selected,
|
|
25
|
-
onSelectBlock,
|
|
26
|
-
onAddBlock,
|
|
27
|
-
index,
|
|
28
|
-
} = props;
|
|
21
|
+
const { data, block, selected, ...otherProps } = props;
|
|
29
22
|
const intl = useIntl();
|
|
23
|
+
const { selectedField, setSelectedField } = useHandleDetachedBlockFocus(
|
|
24
|
+
props,
|
|
25
|
+
'text',
|
|
26
|
+
);
|
|
30
27
|
|
|
31
28
|
return (
|
|
32
29
|
<>
|
|
33
|
-
<div className="public-ui">
|
|
30
|
+
<div className="public-ui" tabIndex="-1">
|
|
34
31
|
<div
|
|
35
32
|
className={cx('block-content', { 'full-width': data.showFullWidth })}
|
|
36
33
|
>
|
|
@@ -68,17 +65,16 @@ const Edit = (props) => {
|
|
|
68
65
|
className="text"
|
|
69
66
|
>
|
|
70
67
|
<TextEditorWidget
|
|
68
|
+
{...otherProps}
|
|
71
69
|
data={data}
|
|
72
70
|
fieldName="text"
|
|
73
|
-
selected={
|
|
71
|
+
selected={selectedField === 'text'}
|
|
74
72
|
block={block}
|
|
75
|
-
onChangeBlock={(data) => onChangeBlock(block, data)}
|
|
76
73
|
placeholder={intl.formatMessage(messages.text)}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
disableMoveToNearest={true}
|
|
74
|
+
setSelected={setSelectedField}
|
|
75
|
+
focusNextField={() => {
|
|
76
|
+
setSelectedField('countdown_text');
|
|
77
|
+
}}
|
|
82
78
|
/>
|
|
83
79
|
</Col>
|
|
84
80
|
<Col
|
|
@@ -99,17 +95,17 @@ const Edit = (props) => {
|
|
|
99
95
|
showSeconds={data.showSeconds}
|
|
100
96
|
/>
|
|
101
97
|
<TextEditorWidget
|
|
98
|
+
{...otherProps}
|
|
99
|
+
showToolbar={true}
|
|
102
100
|
data={data}
|
|
103
|
-
fieldName="countdown_text"
|
|
104
|
-
selected={selected}
|
|
105
101
|
block={block}
|
|
106
|
-
|
|
102
|
+
fieldName="countdown_text"
|
|
103
|
+
selected={selectedField === 'countdown_text'}
|
|
107
104
|
placeholder={intl.formatMessage(messages.text)}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
disableMoveToNearest={true}
|
|
105
|
+
setSelected={setSelectedField}
|
|
106
|
+
focusPrevField={() => {
|
|
107
|
+
setSelectedField('text');
|
|
108
|
+
}}
|
|
113
109
|
/>
|
|
114
110
|
</Col>
|
|
115
111
|
</Row>
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
4
|
-
import { checkRedraftHasContent } from 'design-comuni-plone-theme/helpers';
|
|
3
|
+
import { checkRichTextHasContent } from 'design-comuni-plone-theme/helpers';
|
|
5
4
|
import { Container, Row, Col } from 'design-react-kit';
|
|
6
5
|
import { addAppURL, flattenToAppURL } from '@plone/volto/helpers';
|
|
7
6
|
import cx from 'classnames';
|
|
8
7
|
import CountDown from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/CountDown/CountDown';
|
|
9
|
-
import
|
|
8
|
+
import { TextBlockView } from '@plone/volto-slate/blocks/Text';
|
|
10
9
|
|
|
11
10
|
const View = ({ data, id }) => {
|
|
12
11
|
return (
|
|
@@ -37,7 +36,7 @@ const View = ({ data, id }) => {
|
|
|
37
36
|
)}
|
|
38
37
|
<Container className="px-md-4">
|
|
39
38
|
<Row>
|
|
40
|
-
{
|
|
39
|
+
{checkRichTextHasContent(data.text) && (
|
|
41
40
|
<Col
|
|
42
41
|
xs={{
|
|
43
42
|
size: 12,
|
|
@@ -48,11 +47,7 @@ const View = ({ data, id }) => {
|
|
|
48
47
|
}}
|
|
49
48
|
className="text"
|
|
50
49
|
>
|
|
51
|
-
{
|
|
52
|
-
data.text,
|
|
53
|
-
config.settings.richtextViewSettings.ToHTMLRenderers,
|
|
54
|
-
config.settings.richtextViewSettings.ToHTMLOptions,
|
|
55
|
-
)}
|
|
50
|
+
<TextBlockView data={{ value: data.text }} />
|
|
56
51
|
</Col>
|
|
57
52
|
)}
|
|
58
53
|
<Col
|
|
@@ -71,13 +66,9 @@ const View = ({ data, id }) => {
|
|
|
71
66
|
showMinutes={data.showMinutes}
|
|
72
67
|
showSeconds={data.showSeconds}
|
|
73
68
|
/>
|
|
74
|
-
{
|
|
69
|
+
{checkRichTextHasContent(data.countdown_text) && (
|
|
75
70
|
<div className="countdown_text">
|
|
76
|
-
{
|
|
77
|
-
data.countdown_text,
|
|
78
|
-
config.settings.richtextViewSettings.ToHTMLRenderers,
|
|
79
|
-
config.settings.richtextViewSettings.ToHTMLOptions,
|
|
80
|
-
)}
|
|
71
|
+
<TextBlockView data={{ value: data.countdown_text }} />
|
|
81
72
|
</div>
|
|
82
73
|
)}
|
|
83
74
|
</Col>
|