design-comuni-plone-theme 8.1.0 → 8.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
 
2
2
 
3
+ ## [8.2.1](https://github.com/redturtle/design-comuni-plone-theme/compare/v8.2.0...v8.2.1) (2023-07-27)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * fix LinkEntity error on create link in WysWidget and in edit ([ce16c45](https://github.com/redturtle/design-comuni-plone-theme/commit/ce16c45f0894ce1853f0185c859f85d82ec2d847))
9
+
10
+
11
+ ### Documentation
12
+
13
+ * updated publiccode ([d6affcf](https://github.com/redturtle/design-comuni-plone-theme/commit/d6affcf7f1241c4d338e40907747f93c57716343))
14
+ * updated publiccode ([12ce260](https://github.com/redturtle/design-comuni-plone-theme/commit/12ce2605354b0a380ce83d0285e33e1b75bdb5a8))
15
+
16
+ ## [8.2.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.1.0...v8.2.0) (2023-07-26)
17
+
18
+
19
+ ### Features
20
+
21
+ * 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))
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * 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))
27
+ * 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))
28
+
3
29
  ## [8.1.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.0.3...v8.1.0) (2023-07-20)
4
30
 
5
31
 
package/README.md CHANGED
@@ -74,6 +74,7 @@ Si veda ad esempio:
74
74
  - [Comune di Canossa](https://www.comune.canossa.re.it/)
75
75
  - [Comune di Cantagallo](https://www.comune.cantagallo.po.it/)
76
76
  - [Comune di Cavriago](https://www.comune.cavriago.re.it/)
77
+ - [Comune di Gattatico](https://www.comune.gattatico.re.it/)
77
78
  - [Comune di Imola](https://www.comune.imola.bo.it)
78
79
  - [Comune di Medolla](https://www.comune.medolla.mo.it/)
79
80
  - [Comune di Mirandola](https://www.comune.mirandola.mo.it/)
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": "8.1.0",
5
+ "version": "8.2.1",
6
6
  "main": "src/index.js",
7
7
  "keywords": [
8
8
  "volto-addon",
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: '2023-07-20'
230
+ releaseDate: '2023-07-27'
231
231
  softwareType: standalone/web
232
- softwareVersion: 8.0.4
232
+ softwareVersion: 8.2.1
233
233
  url: 'https://github.com/italia/design-comuni-plone-theme'
234
234
  usedBy:
235
235
  - ASP Comuni Modenesi Area Nord
@@ -247,6 +247,7 @@ usedBy:
247
247
  - Comune di Camposanto
248
248
  - Comune di Cantagallo
249
249
  - Comune di Cavriago
250
+ - Comune di Gattatico
250
251
  - Comune di Imola
251
252
  - Comune di Medolla
252
253
  - Comune di Mirandola
@@ -18,11 +18,13 @@ const FontAwesomeIcon = (props) => {
18
18
  };
19
19
 
20
20
  let prefixKey = prefix;
21
- let iconName = getIconAlias(icon, fontAwesomeAliases);
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
- config.blocks?.blocksConfig?.listing?.variations?.findIndex(
303
- (x) => x.id === id,
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
  }
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { connect } from 'react-redux';
3
3
  import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
4
+ import { IntlProvider } from 'react-intl';
4
5
 
5
6
  const LinkEntity = connect((state) => ({
6
7
  token: state.userSession.token,
@@ -10,14 +11,16 @@ const LinkEntity = connect((state) => ({
10
11
  const to = token ? url : targetUrl || url;
11
12
 
12
13
  return (
13
- <UniversalLink
14
- href={to}
15
- openLinkInNewTab={target === '_blank' || undefined}
16
- download={download}
17
- data-element={dataElement || props['data-element'] || null}
18
- >
19
- {children}
20
- </UniversalLink>
14
+ <IntlProvider>
15
+ <UniversalLink
16
+ href={to}
17
+ openLinkInNewTab={target === '_blank' || undefined}
18
+ download={download}
19
+ data-element={dataElement || props['data-element'] || null}
20
+ >
21
+ {children}
22
+ </UniversalLink>
23
+ </IntlProvider>
21
24
  );
22
25
  });
23
26
 
@@ -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 = config.blocks.blocksConfig.toc.variations.filter(
465
- (v) => v.id !== 'horizontalMenu',
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 className={`${getBlockClasses()}`} ref={listingRef} aria-live="polite">
105
+ <div
106
+ className={`${getBlockClasses()}`}
107
+ ref={listingRef}
108
+ aria-live="polite"
109
+ >
109
110
  <ListingBodyTemplate
110
111
  items={listingItems}
111
112
  isEditMode={isEditMode}