design-comuni-plone-theme 8.0.2 → 8.0.3

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,19 @@
1
1
 
2
2
 
3
+ ## [8.0.3](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.0.2...v8.0.3) (2023-07-14)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * added condition to SimpleCardTemplate for the effective/modified dates ([#251](https://github.com/RedTurtle/design-comuni-plone-theme/issues/251)) ([d578ffa](https://github.com/RedTurtle/design-comuni-plone-theme/commit/d578ffae3dcab1d4e73174762b6507288a93f9e6))
9
+ * grid block view with bootstrap-italia ([aa594d8](https://github.com/RedTurtle/design-comuni-plone-theme/commit/aa594d854b45cab44159328131d0ab782781a4d3))
10
+ * intl missing in SelectInput ([5c9f458](https://github.com/RedTurtle/design-comuni-plone-theme/commit/5c9f45831dc5b8301c832b47f56d4860bebb67da))
11
+
12
+
13
+ ### Documentation
14
+
15
+ * updated publiccode ([31efc10](https://github.com/RedTurtle/design-comuni-plone-theme/commit/31efc10ddb1180ae69464371444e8045eba43221))
16
+
3
17
  ## [8.0.2](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.0.1...v8.0.2) (2023-07-14)
4
18
 
5
19
 
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.0.2",
5
+ "version": "8.0.3",
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-11'
230
+ releaseDate: '2023-07-14'
231
231
  softwareType: standalone/web
232
- softwareVersion: 8.0.0
232
+ softwareVersion: 8.0.3
233
233
  url: 'https://github.com/italia/design-comuni-plone-theme'
234
234
  usedBy:
235
235
  - ASP Comuni Modenesi Area Nord
@@ -189,6 +189,7 @@ const SimpleCardTemplateDefault = (props) => {
189
189
  ) : null;
190
190
  const category = getCategory(item, show_type, show_section, props);
191
191
  const type = item['@type'];
192
+
192
193
  return (
193
194
  <Card
194
195
  className={`align-items-top rounded shadow ${getItemClass(item)}`}
@@ -222,19 +223,27 @@ const SimpleCardTemplateDefault = (props) => {
222
223
  {listingText && (
223
224
  <CardText className={cx('', { 'mb-5': eventRecurrenceMore })}>
224
225
  {listingText}
225
- {(type === 'Modulo' || type === 'Documento') && (
226
- <div className="document-date mt-3">
227
- <strong>
228
- {intl.formatMessage(messages.publication_date)}:{' '}
229
- </strong>
230
- {moment(item.CreationDate).format('DD-MM-YYYY')}
231
- <br />
232
- <strong>
233
- {intl.formatMessage(messages.update_date)}:{' '}
234
- </strong>
235
- {moment(item.modified).format('DD-MM-YYYY')}
236
- </div>
237
- )}
226
+ {(type === 'Modulo' || type === 'Documento') &&
227
+ !hide_dates && (
228
+ <div className="document-date mt-3">
229
+ {item?.effective && (
230
+ <p className="mb-0">
231
+ <strong>
232
+ {intl.formatMessage(messages.publication_date)}:{' '}
233
+ </strong>
234
+ {moment(item.effective).format('DD-MM-YYYY')}
235
+ </p>
236
+ )}
237
+ {item?.modified && (
238
+ <p className="mb-0">
239
+ <strong>
240
+ {intl.formatMessage(messages.update_date)}:{' '}
241
+ </strong>
242
+ {moment(item.modified).format('DD-MM-YYYY')}
243
+ </p>
244
+ )}
245
+ </div>
246
+ )}
238
247
  </CardText>
239
248
  )}
240
249
  {eventRecurrenceMore}
@@ -47,7 +47,8 @@ const messages = defineMessages({
47
47
  'premi la freccia a sinistra per evidenziare i valori selezionati',
48
48
  },
49
49
  ay11_toggle_values: {
50
- id: 'ay11_select_Use left and right to toggle between focused values, press Backspace to remove the currently focused value',
50
+ id:
51
+ 'ay11_select_Use left and right to toggle between focused values, press Backspace to remove the currently focused value',
51
52
  defaultMessage:
52
53
  'Usa le frecce destra e sinistra per attivare o disattivare i valori evidenziati, premi Backspace per rimuovere il valore corrente evidenziato',
53
54
  },
@@ -148,6 +149,8 @@ const GroupHeading = injectLazyLibs('reactSelect')((props) => {
148
149
  });
149
150
 
150
151
  const ClearIndicator = (props) => {
152
+ const intl = useIntl();
153
+
151
154
  const {
152
155
  innerProps: { ref, ...restInnerProps },
153
156
  } = props;
@@ -176,8 +179,13 @@ ClearIndicator.propTypes = {
176
179
  const getSelectAriaLiveMessages = (intl) => {
177
180
  return {
178
181
  guidance: (props) => {
179
- const { isSearchable, isMulti, isDisabled, tabSelectsValue, context } =
180
- props;
182
+ const {
183
+ isSearchable,
184
+ isMulti,
185
+ isDisabled,
186
+ tabSelectsValue,
187
+ context,
188
+ } = props;
181
189
  switch (context) {
182
190
  case 'menu':
183
191
  return `${intl.formatMessage(messages.ay11_up_down)}${
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Customizations:
3
+ * - used design-react-kit Grid component
4
+ */
5
+ import { Row, Col } from 'design-react-kit';
6
+ import cx from 'classnames';
7
+ import { RenderBlocks } from '@plone/volto/components';
8
+ import { withBlockExtensions } from '@plone/volto/helpers';
9
+ import config from '@plone/volto/registry';
10
+
11
+ const GridBlockView = (props) => {
12
+ const { data, path, className } = props;
13
+ const metadata = props.metadata || props.properties;
14
+ const columns = data.blocks_layout.items;
15
+ const blocksConfig =
16
+ config.blocks.blocksConfig[data['@type']].blocksConfig ||
17
+ props.blocksConfig;
18
+ const location = {
19
+ pathname: path,
20
+ };
21
+ return (
22
+ <div
23
+ className={cx('block', data['@type'], className, {
24
+ one: columns?.length === 1,
25
+ two: columns?.length === 2,
26
+ three: columns?.length === 3,
27
+ four: columns?.length === 4,
28
+ })}
29
+ >
30
+ {data.headline && <h2 className="headline">{data.headline}</h2>}
31
+
32
+ <Row>
33
+ <RenderBlocks
34
+ {...props}
35
+ blockWrapperTag={Col}
36
+ metadata={metadata}
37
+ content={data}
38
+ location={location}
39
+ blocksConfig={blocksConfig}
40
+ isContainer
41
+ />
42
+ </Row>
43
+ </div>
44
+ );
45
+ };
46
+
47
+ export default withBlockExtensions(GridBlockView);