design-comuni-plone-theme 8.1.0 → 8.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 +13 -0
- package/package.json +1 -1
- package/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx +4 -2
- package/src/config/Blocks/listingVariations.js +3 -4
- package/src/config/italiaConfig.js +5 -3
- package/src/customizations/volto/components/manage/Blocks/Listing/ListingBody.jsx +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [8.2.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.1.0...v8.2.0) (2023-07-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* make config.settings.italiaThemeViewsConfig extensible from addons ([#257](https://github.com/RedTurtle/design-comuni-plone-theme/issues/257)) ([5b17faf](https://github.com/RedTurtle/design-comuni-plone-theme/commit/5b17faf33c6ca3b0d8cc0091801ef8601cc8dd38))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* display listing bg_color ([#261](https://github.com/RedTurtle/design-comuni-plone-theme/issues/261)) ([5b973c3](https://github.com/RedTurtle/design-comuni-plone-theme/commit/5b973c3d82979db8710432abf0ed90c01bb71cc5))
|
|
14
|
+
* FontAwesomeIcon rendering for both array and string formats ([#256](https://github.com/RedTurtle/design-comuni-plone-theme/issues/256)) ([06eac0e](https://github.com/RedTurtle/design-comuni-plone-theme/commit/06eac0e764156faec99f884f5b4d6bc79d9a168f))
|
|
15
|
+
|
|
3
16
|
## [8.1.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.0.3...v8.1.0) (2023-07-20)
|
|
4
17
|
|
|
5
18
|
|
package/package.json
CHANGED
|
@@ -18,11 +18,13 @@ const FontAwesomeIcon = (props) => {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
let prefixKey = prefix;
|
|
21
|
-
let iconName =
|
|
21
|
+
let iconName = '';
|
|
22
22
|
|
|
23
23
|
if (Array.isArray(icon)) {
|
|
24
24
|
prefixKey = icon[0];
|
|
25
|
-
iconName = icon[1];
|
|
25
|
+
iconName = getIconAlias(icon[1], fontAwesomeAliases);
|
|
26
|
+
} else {
|
|
27
|
+
iconName = getIconAlias(icon, fontAwesomeAliases);
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
const prefixFolder =
|
|
@@ -298,10 +298,9 @@ export const getItaliaListingVariations = (config) => {
|
|
|
298
298
|
};
|
|
299
299
|
export const removeListingVariation = (config, id) => {
|
|
300
300
|
let indexOfVariation = -1;
|
|
301
|
-
indexOfVariation =
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
);
|
|
301
|
+
indexOfVariation = config.blocks?.blocksConfig?.listing?.variations?.findIndex(
|
|
302
|
+
(x) => x.id === id,
|
|
303
|
+
);
|
|
305
304
|
if (indexOfVariation >= 0) {
|
|
306
305
|
config.blocks.blocksConfig.listing.variations.splice(indexOfVariation, 1);
|
|
307
306
|
}
|
|
@@ -169,6 +169,7 @@ export default function applyConfig(voltoConfig) {
|
|
|
169
169
|
portalTypes: ['Image', 'File'],
|
|
170
170
|
},
|
|
171
171
|
italiaThemeViewsConfig: {
|
|
172
|
+
...(config.settings.italiaThemeViewsConfig ?? {}),
|
|
172
173
|
imagePosition: 'afterHeader', // possible values: afterHeader, documentBody
|
|
173
174
|
// Venue: {
|
|
174
175
|
// sections: [
|
|
@@ -461,9 +462,10 @@ export default function applyConfig(voltoConfig) {
|
|
|
461
462
|
},
|
|
462
463
|
};
|
|
463
464
|
// Remove Horizontal Menu variation of TOC Block
|
|
464
|
-
config.blocks.blocksConfig.toc.variations =
|
|
465
|
-
(
|
|
466
|
-
|
|
465
|
+
config.blocks.blocksConfig.toc.variations =
|
|
466
|
+
config.blocks.blocksConfig.toc.variations.filter(
|
|
467
|
+
(v) => v.id !== 'horizontalMenu',
|
|
468
|
+
);
|
|
467
469
|
|
|
468
470
|
// REDUCERS
|
|
469
471
|
config.addonReducers = {
|
|
@@ -34,7 +34,6 @@ const ListingBody = React.memo(
|
|
|
34
34
|
hasQuery,
|
|
35
35
|
addFilters,
|
|
36
36
|
firstLoading,
|
|
37
|
-
properties,
|
|
38
37
|
loadingQuery,
|
|
39
38
|
listingRef,
|
|
40
39
|
additionalFilters,
|
|
@@ -65,9 +64,7 @@ const ListingBody = React.memo(
|
|
|
65
64
|
|
|
66
65
|
const getBackgroundClass = () => {
|
|
67
66
|
const isSearchBlockResults = variation?.['@type'] === 'search';
|
|
68
|
-
const block = isSearchBlockResults
|
|
69
|
-
? variation
|
|
70
|
-
: properties?.blocks?.[data?.block];
|
|
67
|
+
const block = isSearchBlockResults ? variation : data;
|
|
71
68
|
|
|
72
69
|
if (!block?.show_block_bg) return '';
|
|
73
70
|
|
|
@@ -105,7 +102,11 @@ const ListingBody = React.memo(
|
|
|
105
102
|
)}
|
|
106
103
|
{!loadingQuery &&
|
|
107
104
|
(listingItems.length > 0 || additionalFilters?.length > 0) ? (
|
|
108
|
-
<div
|
|
105
|
+
<div
|
|
106
|
+
className={`${getBlockClasses()}`}
|
|
107
|
+
ref={listingRef}
|
|
108
|
+
aria-live="polite"
|
|
109
|
+
>
|
|
109
110
|
<ListingBodyTemplate
|
|
110
111
|
items={listingItems}
|
|
111
112
|
isEditMode={isEditMode}
|