design-comuni-plone-theme 11.1.3 → 11.2.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/CHANGELOG.md +52 -0
- package/RELEASE.md +20 -0
- package/locales/de/LC_MESSAGES/volto.po +5 -0
- package/locales/en/LC_MESSAGES/volto.po +5 -0
- package/locales/es/LC_MESSAGES/volto.po +5 -0
- package/locales/fr/LC_MESSAGES/volto.po +5 -0
- package/locales/it/LC_MESSAGES/volto.po +5 -0
- package/locales/volto.pot +6 -1
- package/package.json +2 -2
- package/publiccode.yml +2 -2
- package/src/components/Collapse.jsx +16 -11
- package/src/components/ItaliaTheme/Blocks/Alert/Edit.jsx +1 -1
- package/src/components/ItaliaTheme/Blocks/Alert/View.jsx +3 -1
- package/src/components/ItaliaTheme/Blocks/BandiSearch/Body.jsx +49 -43
- package/src/components/ItaliaTheme/Blocks/EventSearch/Body.jsx +49 -43
- package/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block.jsx +32 -44
- package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block.jsx +28 -34
- package/src/components/ItaliaTheme/Blocks/UOSearch/Body.jsx +49 -43
- package/src/components/ItaliaTheme/Blocks/VideoGallery/Block/ViewBlock.jsx +33 -37
- package/src/components/ItaliaTheme/MegaMenu/MegaMenu.jsx +16 -6
- package/src/components/ItaliaTheme/MenuSecondary/MenuSecondary.jsx +3 -2
- package/src/components/ItaliaTheme/Search/ResultItem.jsx +30 -15
- package/src/components/ItaliaTheme/Search/Search.jsx +49 -19
- package/src/config/italiaConfig.js +5 -6
- package/src/customizations/volto/components/manage/Blocks/HTML/Edit.jsx +42 -16
- package/src/customizations/volto/components/manage/Blocks/Listing/ListingBody.jsx +6 -2
- package/src/customizations/volto/components/theme/Navigation/Navigation.jsx +65 -36
- package/src/theme/ItaliaTheme/Blocks/_alert.scss +6 -4
- package/src/theme/ItaliaTheme/Blocks/_countdown.scss +1 -1
- package/src/theme/ItaliaTheme/Blocks/_gridGalleryTemplate.scss +7 -2
- package/src/theme/ItaliaTheme/Blocks/_numbers.scss +1 -1
- package/src/theme/ItaliaTheme/Components/_card.scss +1 -1
- package/src/theme/ItaliaTheme/Components/_search.scss +1 -0
- package/src/theme/_site-variables.scss +7 -4
- package/src/theme/bootstrap-override/_bootstrap-italia-site.scss +1 -0
- package/src/theme/bootstrap-override/bootstrap-italia/_card.scss +1 -1
- package/src/theme/bootstrap-override/bootstrap-italia/_focus.scss +3 -0
- package/src/theme/extras/_modals.scss +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [11.2.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.1.4...v11.2.0) (2024-01-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* customizable Alert block colors and text color ([#470](https://github.com/redturtle/design-comuni-plone-theme/issues/470)) ([4aa6f76](https://github.com/redturtle/design-comuni-plone-theme/commit/4aa6f7607be0ac8a76f1d519eee82483d9320a05))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* a11y for navigation in megamenu and mobile menu ([#456](https://github.com/redturtle/design-comuni-plone-theme/issues/456)) ([6e4c1ef](https://github.com/redturtle/design-comuni-plone-theme/commit/6e4c1efbf96c372bf78a67ecf86ade64b7b2bb6a))
|
|
14
|
+
* **a11y:** a11y - colore sfondo opzione con focus in tendina "ordina per" ([#457](https://github.com/redturtle/design-comuni-plone-theme/issues/457)) ([d81b3a9](https://github.com/redturtle/design-comuni-plone-theme/commit/d81b3a9f34822242e10942a4acccb5978996a06b))
|
|
15
|
+
* added aria-live and aria-labels for filters in Search page ([#462](https://github.com/redturtle/design-comuni-plone-theme/issues/462)) ([13cf7da](https://github.com/redturtle/design-comuni-plone-theme/commit/13cf7dac5f8aaf5deaee5720ccd2e9a54c6326db))
|
|
16
|
+
* added focus style for skiplinks for a11y ([#458](https://github.com/redturtle/design-comuni-plone-theme/issues/458)) ([94e5cca](https://github.com/redturtle/design-comuni-plone-theme/commit/94e5cca0b671aa5bfc1febf4f51b306f71de43be))
|
|
17
|
+
* aria tags to avoid double feedback on SR ([#468](https://github.com/redturtle/design-comuni-plone-theme/issues/468)) ([867df42](https://github.com/redturtle/design-comuni-plone-theme/commit/867df42a8ae96f0546afb43e12490553648128f7))
|
|
18
|
+
* background color contrast for blocks number, countdown and gallery grid ([#433](https://github.com/redturtle/design-comuni-plone-theme/issues/433)) ([d005222](https://github.com/redturtle/design-comuni-plone-theme/commit/d005222a994d0117f41fcf7d9e93ead1c8e71f1f))
|
|
19
|
+
* broken videos in Video Gallery block ([#461](https://github.com/redturtle/design-comuni-plone-theme/issues/461)) ([e977673](https://github.com/redturtle/design-comuni-plone-theme/commit/e9776738df702dd915e1dab45f3cdbb227fa4a6a))
|
|
20
|
+
* default in white header scss variable ([3194ab8](https://github.com/redturtle/design-comuni-plone-theme/commit/3194ab8139edfadff747494c9609e7b2fa79b057))
|
|
21
|
+
* font and spaces of Card blocks ([#476](https://github.com/redturtle/design-comuni-plone-theme/issues/476)) ([3b45cc8](https://github.com/redturtle/design-comuni-plone-theme/commit/3b45cc890f769ab839f9abd30968ff9ca4ef82e7))
|
|
22
|
+
* listing bg color ([#475](https://github.com/redturtle/design-comuni-plone-theme/issues/475)) ([544be04](https://github.com/redturtle/design-comuni-plone-theme/commit/544be046ddca345f1b0c9073a4a57c876281031b))
|
|
23
|
+
* lowered flex basis of card-body in LocationItem cards ([#460](https://github.com/redturtle/design-comuni-plone-theme/issues/460)) ([697f54c](https://github.com/redturtle/design-comuni-plone-theme/commit/697f54c9f81947898caa27f4aa76dee0b16d0616))
|
|
24
|
+
* toolbar buttons for html block ([#477](https://github.com/redturtle/design-comuni-plone-theme/issues/477)) ([ed41904](https://github.com/redturtle/design-comuni-plone-theme/commit/ed419046c9184387e4daac4de86f8b0cd09924b4))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Maintenance
|
|
28
|
+
|
|
29
|
+
* **deps:** bump http-cache-semantics from 4.1.0 to 4.1.1 ([#464](https://github.com/redturtle/design-comuni-plone-theme/issues/464)) ([88d5d2c](https://github.com/redturtle/design-comuni-plone-theme/commit/88d5d2c8423ea3052ad2a4ea54623e072a86e0e8))
|
|
30
|
+
* **deps:** bump json5 from 1.0.1 to 1.0.2 ([#467](https://github.com/redturtle/design-comuni-plone-theme/issues/467)) ([1dbc958](https://github.com/redturtle/design-comuni-plone-theme/commit/1dbc9582e49866edc74ff65ce4b96c8218e713d9))
|
|
31
|
+
* **deps:** bump semver from 5.7.1 to 5.7.2 ([#446](https://github.com/redturtle/design-comuni-plone-theme/issues/446)) ([49a6e2f](https://github.com/redturtle/design-comuni-plone-theme/commit/49a6e2f217b779ba4f57ca030335af12b91b7337))
|
|
32
|
+
* **deps:** bump simple-git from 3.14.1 to 3.22.0 ([#465](https://github.com/redturtle/design-comuni-plone-theme/issues/465)) ([6d956dd](https://github.com/redturtle/design-comuni-plone-theme/commit/6d956dda6575f6acd5321b223b67c593db27d1e1))
|
|
33
|
+
* replace react-highlight-words with simple custom code ([#463](https://github.com/redturtle/design-comuni-plone-theme/issues/463)) ([809e92e](https://github.com/redturtle/design-comuni-plone-theme/commit/809e92e647a23dfcfb2d3c15616e17fc32388984))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Documentation
|
|
37
|
+
|
|
38
|
+
* updated publiccode and release log ([285b7ce](https://github.com/redturtle/design-comuni-plone-theme/commit/285b7ced0dc20b0e6e35d9849ded449913279a83))
|
|
39
|
+
|
|
40
|
+
## [11.1.4](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.1.3...v11.1.4) (2024-01-05)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
* allow submit when pressing enter key in search blocks ([#451](https://github.com/RedTurtle/design-comuni-plone-theme/issues/451)) ([947f983](https://github.com/RedTurtle/design-comuni-plone-theme/commit/947f9837d532017f5dcb3f25826ea56d6bb2e93b))
|
|
46
|
+
* backwards compatibility for background color var of Alert block ([#459](https://github.com/RedTurtle/design-comuni-plone-theme/issues/459)) ([7cf6626](https://github.com/RedTurtle/design-comuni-plone-theme/commit/7cf6626131276a79b765fc6f9a102522d7d9ed56))
|
|
47
|
+
* changed max width of card-body to fit image ([#453](https://github.com/RedTurtle/design-comuni-plone-theme/issues/453)) ([d836021](https://github.com/RedTurtle/design-comuni-plone-theme/commit/d83602136fa6800758184e1b6b403f363062654b))
|
|
48
|
+
* removed style that hides modal close icon ([#455](https://github.com/RedTurtle/design-comuni-plone-theme/issues/455)) ([59dd922](https://github.com/RedTurtle/design-comuni-plone-theme/commit/59dd922b1120a87febaca51a1fb337c85cb4b9c8))
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Maintenance
|
|
52
|
+
|
|
53
|
+
* preparing relase 11.1.4 ([2edb3c7](https://github.com/RedTurtle/design-comuni-plone-theme/commit/2edb3c7e7c840c63f00c2fadac0781c5e33b35c0))
|
|
54
|
+
|
|
3
55
|
## [11.1.3](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.1.1...v11.1.3) (2023-12-27)
|
|
4
56
|
|
|
5
57
|
|
package/RELEASE.md
CHANGED
|
@@ -41,6 +41,26 @@
|
|
|
41
41
|
- ...
|
|
42
42
|
-->
|
|
43
43
|
|
|
44
|
+
## Versione 11.2.0 (11/01/2023)
|
|
45
|
+
|
|
46
|
+
### Migliorie
|
|
47
|
+
|
|
48
|
+
- Migliorata l'accessibilità nella pagina di Ricerca.
|
|
49
|
+
- Diminuita la larghezza del testo nelle card che indicano i luoghi.
|
|
50
|
+
|
|
51
|
+
### Fix
|
|
52
|
+
|
|
53
|
+
- Risolto un problema nel blocco Video Gallery, per cui alcuni video di youtube non erano riproducibili.
|
|
54
|
+
- Risolto problema nel funzionamento della toolbar per il blocco HTML.
|
|
55
|
+
- Sistemate spaziature e font su mobile del blocco Card con Immagine e Card Semplice, migliorato il layout di quest'ultimo.
|
|
56
|
+
- È stato migliorato il contrasto minimo necessario tra sfondo e testo nei blocchi numeri, countdown e galleria a griglia.
|
|
57
|
+
|
|
58
|
+
## Versione 11.1.4 (05/01/2024)
|
|
59
|
+
|
|
60
|
+
### Fix
|
|
61
|
+
|
|
62
|
+
- Risolto il problema di layout nelle card che indicano dei luoghi.
|
|
63
|
+
|
|
44
64
|
## Versione 11.1.1 (22/12/2023)
|
|
45
65
|
|
|
46
66
|
### Fix
|
|
@@ -742,6 +742,11 @@ msgstr ""
|
|
|
742
742
|
msgid "actions"
|
|
743
743
|
msgstr ""
|
|
744
744
|
|
|
745
|
+
#: components/ItaliaTheme/Search/Search
|
|
746
|
+
# defaultMessage: {filterNumber} filtri attivati
|
|
747
|
+
msgid "active_filters"
|
|
748
|
+
msgstr ""
|
|
749
|
+
|
|
745
750
|
#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
|
|
746
751
|
# defaultMessage: Vai alla ricerca per sezioni avanzata
|
|
747
752
|
msgid "advandedSectionsFilters"
|
|
@@ -727,6 +727,11 @@ msgstr ""
|
|
|
727
727
|
msgid "actions"
|
|
728
728
|
msgstr "View actions"
|
|
729
729
|
|
|
730
|
+
#: components/ItaliaTheme/Search/Search
|
|
731
|
+
# defaultMessage: {filterNumber} filtri attivati
|
|
732
|
+
msgid "active_filters"
|
|
733
|
+
msgstr ""
|
|
734
|
+
|
|
730
735
|
#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
|
|
731
736
|
# defaultMessage: Vai alla ricerca per sezioni avanzata
|
|
732
737
|
msgid "advandedSectionsFilters"
|
|
@@ -736,6 +736,11 @@ msgstr ""
|
|
|
736
736
|
msgid "actions"
|
|
737
737
|
msgstr "Ver acciones"
|
|
738
738
|
|
|
739
|
+
#: components/ItaliaTheme/Search/Search
|
|
740
|
+
# defaultMessage: {filterNumber} filtri attivati
|
|
741
|
+
msgid "active_filters"
|
|
742
|
+
msgstr ""
|
|
743
|
+
|
|
739
744
|
#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
|
|
740
745
|
# defaultMessage: Vai alla ricerca per sezioni avanzata
|
|
741
746
|
msgid "advandedSectionsFilters"
|
|
@@ -744,6 +744,11 @@ msgstr ""
|
|
|
744
744
|
msgid "actions"
|
|
745
745
|
msgstr "Voir les actions"
|
|
746
746
|
|
|
747
|
+
#: components/ItaliaTheme/Search/Search
|
|
748
|
+
# defaultMessage: {filterNumber} filtri attivati
|
|
749
|
+
msgid "active_filters"
|
|
750
|
+
msgstr ""
|
|
751
|
+
|
|
747
752
|
#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
|
|
748
753
|
# defaultMessage: Vai alla ricerca per sezioni avanzata
|
|
749
754
|
msgid "advandedSectionsFilters"
|
|
@@ -727,6 +727,11 @@ msgstr "Account"
|
|
|
727
727
|
msgid "actions"
|
|
728
728
|
msgstr "Vedi azioni"
|
|
729
729
|
|
|
730
|
+
#: components/ItaliaTheme/Search/Search
|
|
731
|
+
# defaultMessage: {filterNumber} filtri attivati
|
|
732
|
+
msgid "active_filters"
|
|
733
|
+
msgstr ""
|
|
734
|
+
|
|
730
735
|
#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
|
|
731
736
|
# defaultMessage: Vai alla ricerca per sezioni avanzata
|
|
732
737
|
msgid "advandedSectionsFilters"
|
package/locales/volto.pot
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
msgid ""
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Plone\n"
|
|
4
|
-
"POT-Creation-Date:
|
|
4
|
+
"POT-Creation-Date: 2024-01-11T11:04:31.849Z\n"
|
|
5
5
|
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
6
6
|
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
7
7
|
"MIME-Version: 1.0\n"
|
|
@@ -729,6 +729,11 @@ msgstr ""
|
|
|
729
729
|
msgid "actions"
|
|
730
730
|
msgstr ""
|
|
731
731
|
|
|
732
|
+
#: components/ItaliaTheme/Search/Search
|
|
733
|
+
# defaultMessage: {filterNumber} filtri attivati
|
|
734
|
+
msgid "active_filters"
|
|
735
|
+
msgstr ""
|
|
736
|
+
|
|
732
737
|
#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
|
|
733
738
|
# defaultMessage: Vai alla ricerca per sezioni avanzata
|
|
734
739
|
msgid "advandedSectionsFilters"
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "design-comuni-plone-theme",
|
|
3
3
|
"description": "Volto Theme for Italia design guidelines",
|
|
4
4
|
"license": "GPL-v3",
|
|
5
|
-
"version": "11.
|
|
5
|
+
"version": "11.2.0",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"volto-addon",
|
|
@@ -131,8 +131,8 @@
|
|
|
131
131
|
"htmldiff-js": "1.0.5",
|
|
132
132
|
"marked": "9.0.0",
|
|
133
133
|
"react-dropzone": "11.0.1",
|
|
134
|
+
"react-focus-lock": "2.9.4",
|
|
134
135
|
"react-google-recaptcha-v3": "1.7.0",
|
|
135
|
-
"react-highlight-words": "0.18.0",
|
|
136
136
|
"react-select": "^4.3.1",
|
|
137
137
|
"react-slick": "^0.29.0",
|
|
138
138
|
"slick-carousel": "1.8.1",
|
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: '
|
|
230
|
+
releaseDate: '2024-01-11'
|
|
231
231
|
softwareType: standalone/web
|
|
232
|
-
softwareVersion: 11.
|
|
232
|
+
softwareVersion: 11.2.0
|
|
233
233
|
url: 'https://github.com/italia/design-comuni-plone-theme'
|
|
234
234
|
usedBy:
|
|
235
235
|
- ASP Comuni Modenesi Area Nord
|
|
@@ -39,10 +39,10 @@ const Collapse = ({
|
|
|
39
39
|
children,
|
|
40
40
|
isOpen,
|
|
41
41
|
onOverlayClick,
|
|
42
|
+
showCloseButton = true, // deprecato da v12.0.0
|
|
42
43
|
...attributes
|
|
43
44
|
}) => {
|
|
44
45
|
const intl = useIntl();
|
|
45
|
-
|
|
46
46
|
if (navbar && header) {
|
|
47
47
|
const classes = classNames(className, 'navbar-collapse', {
|
|
48
48
|
expanded: isOpen,
|
|
@@ -60,16 +60,21 @@ const Collapse = ({
|
|
|
60
60
|
style={{ display: isOpen ? 'block' : 'none' }}
|
|
61
61
|
onClick={onOverlayClick}
|
|
62
62
|
></div>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
{/* Deprecato - non viene più utilizzato da v12.0.0 per ragioni di accessibilità
|
|
64
|
+
Close button ora presente in Navigation.jsx
|
|
65
|
+
*/}
|
|
66
|
+
{showCloseButton && (
|
|
67
|
+
<div className="close-div">
|
|
68
|
+
<button
|
|
69
|
+
className="btn close-menu"
|
|
70
|
+
type="button"
|
|
71
|
+
title={intl.formatMessage(messages.CloseMenu)}
|
|
72
|
+
onClick={onOverlayClick}
|
|
73
|
+
>
|
|
74
|
+
<Icon color="white" icon="it-close-big" padding={false} />
|
|
75
|
+
</button>
|
|
76
|
+
</div>
|
|
77
|
+
)}
|
|
73
78
|
{children}
|
|
74
79
|
</CollapseBase>
|
|
75
80
|
);
|
|
@@ -60,7 +60,7 @@ class Edit extends Component {
|
|
|
60
60
|
constructor(props) {
|
|
61
61
|
super(props);
|
|
62
62
|
if (!this.props.data.bg_color) {
|
|
63
|
-
this.props.data.bg_color = 'warning';
|
|
63
|
+
this.props.data.bg_color = this.props.data.color ?? 'warning'; // backwards compatibility with previous background-color variable name 'color'
|
|
64
64
|
}
|
|
65
65
|
this.blockNode = React.createRef();
|
|
66
66
|
}
|
|
@@ -27,9 +27,11 @@ const View = ({ data, pathname }) => {
|
|
|
27
27
|
)
|
|
28
28
|
: '';
|
|
29
29
|
|
|
30
|
+
const background_color = data.bg_color ?? data.color; // backwards compatibility with previous background-color variable name 'color'
|
|
31
|
+
|
|
30
32
|
return (
|
|
31
33
|
<section role="alert" className="block alertblock">
|
|
32
|
-
<div className={cx('full-width', 'bg-alert-' +
|
|
34
|
+
<div className={cx('full-width', 'bg-alert-' + background_color)}>
|
|
33
35
|
<Container className="p-4 pt-5 pb-5">
|
|
34
36
|
<Row className="align-items-start">
|
|
35
37
|
{data.image?.data && (
|
|
@@ -149,54 +149,60 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => {
|
|
|
149
149
|
'public-ui': inEditMode,
|
|
150
150
|
})}
|
|
151
151
|
>
|
|
152
|
-
<
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
152
|
+
<form
|
|
153
|
+
onSubmit={(event) => {
|
|
154
|
+
event.preventDefault();
|
|
155
|
+
doRequest(1);
|
|
156
|
+
}}
|
|
157
|
+
>
|
|
158
|
+
<div className="d-flex justify-content-center">
|
|
159
|
+
<div className="d-flex search-container align-items-center justify-content-center flex-wrap">
|
|
160
|
+
{filterOne && (
|
|
161
|
+
<>
|
|
162
|
+
{React.createElement(filterOne.widget.component, {
|
|
163
|
+
...filterOne.widget?.props,
|
|
164
|
+
id: 'filterOne',
|
|
165
|
+
onChange: (filter, value) => {
|
|
166
|
+
dispatchFilter({
|
|
167
|
+
filter: filter,
|
|
168
|
+
value: value,
|
|
169
|
+
});
|
|
170
|
+
},
|
|
171
|
+
})}
|
|
172
|
+
</>
|
|
173
|
+
)}
|
|
174
|
+
{filterTwo &&
|
|
175
|
+
React.createElement(filterTwo.widget?.component, {
|
|
176
|
+
...filterTwo.widget?.props,
|
|
177
|
+
id: 'filterTwo',
|
|
178
|
+
onChange: (filter, value) =>
|
|
160
179
|
dispatchFilter({
|
|
161
180
|
filter: filter,
|
|
162
181
|
value: value,
|
|
163
|
-
})
|
|
164
|
-
},
|
|
182
|
+
}),
|
|
165
183
|
})}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}),
|
|
187
|
-
})}
|
|
188
|
-
|
|
189
|
-
<Button
|
|
190
|
-
color={data.button_color || 'tertiary'}
|
|
191
|
-
icon={false}
|
|
192
|
-
tag="button"
|
|
193
|
-
onClick={() => doRequest(1)}
|
|
194
|
-
className="my-2 my-lg-1"
|
|
195
|
-
>
|
|
196
|
-
{intl.formatMessage(messages.find)}
|
|
197
|
-
</Button>
|
|
184
|
+
{filterThree &&
|
|
185
|
+
React.createElement(filterThree.widget?.component, {
|
|
186
|
+
...filterThree.widget?.props,
|
|
187
|
+
id: 'filterThree',
|
|
188
|
+
onChange: (filter, value) =>
|
|
189
|
+
dispatchFilter({
|
|
190
|
+
filter: filter,
|
|
191
|
+
value: value,
|
|
192
|
+
}),
|
|
193
|
+
})}
|
|
194
|
+
|
|
195
|
+
<Button
|
|
196
|
+
color={data.button_color || 'tertiary'}
|
|
197
|
+
icon={false}
|
|
198
|
+
tag="button"
|
|
199
|
+
className="my-2 my-lg-1"
|
|
200
|
+
>
|
|
201
|
+
{intl.formatMessage(messages.find)}
|
|
202
|
+
</Button>
|
|
203
|
+
</div>
|
|
198
204
|
</div>
|
|
199
|
-
</
|
|
205
|
+
</form>
|
|
200
206
|
</div>
|
|
201
207
|
|
|
202
208
|
{!loading ? (
|
|
@@ -159,54 +159,60 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => {
|
|
|
159
159
|
'public-ui': inEditMode,
|
|
160
160
|
})}
|
|
161
161
|
>
|
|
162
|
-
<
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
162
|
+
<form
|
|
163
|
+
onSubmit={(event) => {
|
|
164
|
+
event.preventDefault();
|
|
165
|
+
doRequest(1);
|
|
166
|
+
}}
|
|
167
|
+
>
|
|
168
|
+
<div className="d-flex justify-content-center">
|
|
169
|
+
<div className="d-flex search-container align-items-center justify-content-center flex-wrap">
|
|
170
|
+
{filterOne && (
|
|
171
|
+
<>
|
|
172
|
+
{React.createElement(filterOne.widget.component, {
|
|
173
|
+
...filterOne.widget?.props,
|
|
174
|
+
id: 'filterOne',
|
|
175
|
+
onChange: (filter, value) => {
|
|
176
|
+
dispatchFilter({
|
|
177
|
+
filter: filter,
|
|
178
|
+
value: value,
|
|
179
|
+
});
|
|
180
|
+
},
|
|
181
|
+
})}
|
|
182
|
+
</>
|
|
183
|
+
)}
|
|
184
|
+
{filterTwo &&
|
|
185
|
+
React.createElement(filterTwo.widget?.component, {
|
|
186
|
+
...filterTwo.widget?.props,
|
|
187
|
+
id: 'filterTwo',
|
|
188
|
+
onChange: (filter, value) =>
|
|
170
189
|
dispatchFilter({
|
|
171
190
|
filter: filter,
|
|
172
191
|
value: value,
|
|
173
|
-
})
|
|
174
|
-
},
|
|
192
|
+
}),
|
|
175
193
|
})}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}),
|
|
197
|
-
})}
|
|
198
|
-
|
|
199
|
-
<Button
|
|
200
|
-
color={data.button_color || 'tertiary'}
|
|
201
|
-
icon={false}
|
|
202
|
-
tag="button"
|
|
203
|
-
onClick={() => doRequest(1)}
|
|
204
|
-
className="my-2 my-lg-1"
|
|
205
|
-
>
|
|
206
|
-
{intl.formatMessage(messages.find)}
|
|
207
|
-
</Button>
|
|
194
|
+
{filterThree &&
|
|
195
|
+
React.createElement(filterThree.widget?.component, {
|
|
196
|
+
...filterThree.widget?.props,
|
|
197
|
+
id: 'filterThree',
|
|
198
|
+
onChange: (filter, value) =>
|
|
199
|
+
dispatchFilter({
|
|
200
|
+
filter: filter,
|
|
201
|
+
value: value,
|
|
202
|
+
}),
|
|
203
|
+
})}
|
|
204
|
+
|
|
205
|
+
<Button
|
|
206
|
+
color={data.button_color || 'tertiary'}
|
|
207
|
+
icon={false}
|
|
208
|
+
tag="button"
|
|
209
|
+
className="my-2 my-lg-1"
|
|
210
|
+
>
|
|
211
|
+
{intl.formatMessage(messages.find)}
|
|
212
|
+
</Button>
|
|
213
|
+
</div>
|
|
208
214
|
</div>
|
|
209
|
-
</
|
|
215
|
+
</form>
|
|
210
216
|
</div>
|
|
211
217
|
|
|
212
218
|
{!loading ? (
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
2
2
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3
|
-
import React, { useState,
|
|
4
|
-
import {
|
|
5
|
-
Card,
|
|
6
|
-
CardBody,
|
|
7
|
-
CardText,
|
|
8
|
-
Container,
|
|
9
|
-
Row,
|
|
10
|
-
Col,
|
|
11
|
-
} from 'design-react-kit';
|
|
3
|
+
import React, { useState, useEffect } from 'react';
|
|
4
|
+
import { Card, CardBody, Container, Row, Col } from 'design-react-kit';
|
|
12
5
|
import { defineMessages, useIntl } from 'react-intl';
|
|
13
6
|
import PropTypes from 'prop-types';
|
|
14
7
|
import redraft from 'redraft';
|
|
@@ -113,7 +106,7 @@ const Block = ({
|
|
|
113
106
|
)}
|
|
114
107
|
</h2>
|
|
115
108
|
<Card color="white" className="card-bg rounded" noWrapper={false}>
|
|
116
|
-
<CardBody
|
|
109
|
+
<CardBody>
|
|
117
110
|
{inEditMode ? (
|
|
118
111
|
<Container>
|
|
119
112
|
<Row
|
|
@@ -123,19 +116,20 @@ const Block = ({
|
|
|
123
116
|
})}
|
|
124
117
|
>
|
|
125
118
|
{hasImage && (
|
|
126
|
-
<Col className="
|
|
119
|
+
<Col className="my-1 px-0" key={'col-0'}>
|
|
127
120
|
{renderImage(data?.image, hasImage, data?.sizeNatural)}
|
|
128
121
|
</Col>
|
|
129
122
|
)}
|
|
130
123
|
<div
|
|
131
124
|
key={'col-1'}
|
|
132
|
-
className={cx('
|
|
125
|
+
className={cx('px-4 mb-2', {
|
|
133
126
|
'col-12': !hasImage,
|
|
134
127
|
'col-8':
|
|
135
128
|
(hasImage && data?.sizeImage === 's') ||
|
|
136
129
|
(hasImage && !data?.sizeImage),
|
|
137
130
|
'col-6': hasImage && data?.sizeImage === 'm',
|
|
138
131
|
'col-4': hasImage && data?.sizeImage === 'l',
|
|
132
|
+
'ps-0': data?.rightImage,
|
|
139
133
|
})}
|
|
140
134
|
>
|
|
141
135
|
<div
|
|
@@ -146,29 +140,24 @@ const Block = ({
|
|
|
146
140
|
setSelectedField('content');
|
|
147
141
|
}}
|
|
148
142
|
>
|
|
149
|
-
<
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
onFocusPreviousBlock={() => {
|
|
168
|
-
setSelectedField('title');
|
|
169
|
-
}}
|
|
170
|
-
/>
|
|
171
|
-
</CardText>
|
|
143
|
+
<TextEditorWidget
|
|
144
|
+
data={data}
|
|
145
|
+
fieldName="image_card_content"
|
|
146
|
+
selected={selectedField === 'content'}
|
|
147
|
+
block={block}
|
|
148
|
+
onChangeBlock={(data) => onChange(data)}
|
|
149
|
+
placeholder={intl.formatMessage(
|
|
150
|
+
messages.image_card_content,
|
|
151
|
+
)}
|
|
152
|
+
showToolbar={true}
|
|
153
|
+
onSelectBlock={onSelectBlock}
|
|
154
|
+
onAddBlock={onAddBlock}
|
|
155
|
+
index={index}
|
|
156
|
+
onFocusNextBlock={onFocusNextBlock}
|
|
157
|
+
onFocusPreviousBlock={() => {
|
|
158
|
+
setSelectedField('title');
|
|
159
|
+
}}
|
|
160
|
+
/>
|
|
172
161
|
</div>
|
|
173
162
|
</div>
|
|
174
163
|
</Row>
|
|
@@ -180,28 +169,27 @@ const Block = ({
|
|
|
180
169
|
'revert-row': data?.rightImage,
|
|
181
170
|
})}
|
|
182
171
|
>
|
|
183
|
-
<Col className="
|
|
172
|
+
<Col className="my-1 p-0" key={'col-0'} data-testid={'col-0'}>
|
|
184
173
|
{renderImage(data?.image, hasImage, data?.sizeNatural)}
|
|
185
174
|
</Col>
|
|
186
175
|
<div
|
|
187
176
|
key={'col-1'}
|
|
188
177
|
data-testid={'col-1'}
|
|
189
|
-
className={cx('
|
|
178
|
+
className={cx('px-4', {
|
|
190
179
|
'col-12': !hasImage,
|
|
191
180
|
'col-8':
|
|
192
181
|
(hasImage && data?.sizeImage === 's') ||
|
|
193
182
|
(hasImage && !data?.sizeImage),
|
|
194
183
|
'col-6': hasImage && data?.sizeImage === 'm',
|
|
195
184
|
'col-4': hasImage && data?.sizeImage === 'l',
|
|
185
|
+
'ps-0': data?.rightImage,
|
|
196
186
|
})}
|
|
197
187
|
>
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
)}
|
|
204
|
-
</CardText>
|
|
188
|
+
{redraft(
|
|
189
|
+
content,
|
|
190
|
+
config.settings.richtextViewSettings.ToHTMLRenderers,
|
|
191
|
+
config.settings.richtextViewSettings.ToHTMLOptions,
|
|
192
|
+
)}
|
|
205
193
|
</div>
|
|
206
194
|
</Row>
|
|
207
195
|
</Container>
|