design-comuni-plone-theme 8.8.2 → 8.9.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 CHANGED
@@ -1,5 +1,22 @@
1
1
 
2
2
 
3
+ ## [8.9.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.8.2...v8.9.0) (2023-11-03)
4
+
5
+
6
+ ### Features
7
+
8
+ * added data-element for service-link pagination ([#387](https://github.com/RedTurtle/design-comuni-plone-theme/issues/387)) ([3ef75a5](https://github.com/RedTurtle/design-comuni-plone-theme/commit/3ef75a5f8dde74b948bbfe3e61fd58575baa7c13))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * locales ([e6b8904](https://github.com/RedTurtle/design-comuni-plone-theme/commit/e6b890401222739a756a77cc06958ea3b9173759))
14
+
15
+
16
+ ### Documentation
17
+
18
+ * updated publiccode and release log ([2fe4539](https://github.com/RedTurtle/design-comuni-plone-theme/commit/2fe4539ee4cf6dcc88d0dfeb9fe9c49bb972244f))
19
+
3
20
  ## [8.8.2](https://github.com/redturtle/design-comuni-plone-theme/compare/v8.8.1...v8.8.2) (2023-11-03)
4
21
 
5
22
 
package/RELEASE.md CHANGED
@@ -41,6 +41,12 @@
41
41
  - ...
42
42
  -->
43
43
 
44
+ ## Versione 8.9.0 (03/11/2023)
45
+
46
+ ### Novità
47
+
48
+ - Aggiunto data-element pager-link al paginatore per i blocchi Elenco per i quali viene impostata l'opzione service-link.
49
+
44
50
  ## Versione 8.8.1 (03/11/2023)
45
51
 
46
52
  ### Fix
@@ -1591,7 +1591,7 @@ msgstr "Description"
1591
1591
  #: components/ItaliaTheme/View/BandoView/BandoText
1592
1592
  # defaultMessage: Descrizione
1593
1593
  msgid "descrizione_bando"
1594
- msgstr ""
1594
+ msgstr "Description"
1595
1595
 
1596
1596
  #: components/ItaliaTheme/Header/HeaderSearch/SearchModal
1597
1597
  # defaultMessage: Non cercare nella sezione
@@ -1608,7 +1608,7 @@ msgstr "Description"
1608
1608
  #: components/ItaliaTheme/View/BandoView/BandoText
1609
1609
  # defaultMessage: Descrizione
1610
1610
  msgid "descrizione_bando"
1611
- msgstr ""
1611
+ msgstr "Description"
1612
1612
 
1613
1613
  #: components/ItaliaTheme/Header/HeaderSearch/SearchModal
1614
1614
  # defaultMessage: Non cercare nella sezione
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.8.2",
5
+ "version": "8.9.0",
6
6
  "main": "src/index.js",
7
7
  "keywords": [
8
8
  "volto-addon",
package/publiccode.yml CHANGED
@@ -229,7 +229,7 @@ platforms:
229
229
  - web
230
230
  releaseDate: '2023-11-03'
231
231
  softwareType: standalone/web
232
- softwareVersion: 8.8.2
232
+ softwareVersion: 8.9.0
233
233
  url: 'https://github.com/italia/design-comuni-plone-theme'
234
234
  usedBy:
235
235
  - ASP Comuni Modenesi Area Nord
@@ -43,6 +43,9 @@ class Pagination extends Component {
43
43
  /** Total number of pages. */
44
44
  totalPages: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
45
45
  .isRequired,
46
+
47
+ /** Lighthouse ID to set Agid data-element on pager link for CT Servizio*/
48
+ isServiceLink: PropTypes.bool,
46
49
  };
47
50
 
48
51
  static defaultProps = {
@@ -69,8 +72,13 @@ class Pagination extends Component {
69
72
  };
70
73
 
71
74
  render() {
72
- const { boundaryRange, ellipsisItem, siblingRange, totalPages } =
73
- this.props;
75
+ const {
76
+ boundaryRange,
77
+ ellipsisItem,
78
+ siblingRange,
79
+ totalPages,
80
+ isServiceLink,
81
+ } = this.props;
74
82
  const { activePage } = this.state;
75
83
 
76
84
  const items = createPaginationItems({
@@ -96,6 +104,7 @@ class Pagination extends Component {
96
104
  onClick={this.handleItemClick}
97
105
  type={type}
98
106
  ellipsisItem={ellipsisItem}
107
+ isServiceLink={isServiceLink}
99
108
  >
100
109
  {value}
101
110
  </PaginationItem>
@@ -46,6 +46,9 @@ class PaginationItem extends Component {
46
46
  'nextItem',
47
47
  'lastItem',
48
48
  ]),
49
+
50
+ /** Lighthouse ID to set Agid data-element on pager link for CT Servizio*/
51
+ isServiceLink: PropTypes.bool,
49
52
  };
50
53
 
51
54
  handleClick = (e) => {
@@ -59,7 +62,14 @@ class PaginationItem extends Component {
59
62
  };
60
63
 
61
64
  render() {
62
- const { active, type, children, intl, ellipsisItem } = this.props;
65
+ const {
66
+ active,
67
+ type,
68
+ children,
69
+ intl,
70
+ ellipsisItem,
71
+ isServiceLink,
72
+ } = this.props;
63
73
  const disabled = this.props.disabled || type === 'ellipsisItem';
64
74
  return (
65
75
  <PagerItem disabled={disabled}>
@@ -68,6 +78,7 @@ class PaginationItem extends Component {
68
78
  onClick={this.handleClick}
69
79
  onKeyDown={this.handleKeyDown}
70
80
  aria-current={active ? 'page' : null}
81
+ data-element={isServiceLink ? 'pager-link' : null}
71
82
  >
72
83
  {type === 'prevItem' && (
73
84
  <>
@@ -93,6 +93,11 @@ const ListingBody = React.memo(
93
93
  // Also need to purge title from searchblock schema, it's the name of the listing template used
94
94
  const listingBodyProps =
95
95
  variation?.['@type'] !== 'search' ? data : { ...variation, title: '' };
96
+
97
+ // Need to know if data-element is "service-link"
98
+ // to add data-element="pager-link" to pagination links
99
+ const isServiceLink = data.id_lighthouse === 'service-link';
100
+
96
101
  return (
97
102
  <div className="public-ui">
98
103
  {loadingQuery && (
@@ -123,6 +128,7 @@ const ListingBody = React.memo(
123
128
  activePage={currentPage}
124
129
  totalPages={totalPages}
125
130
  onPageChange={onPaginationChange}
131
+ isServiceLink={isServiceLink}
126
132
  />
127
133
  </div>
128
134
  )}