@1024pix/pix-ui 13.4.1 → 13.4.4

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,17 @@
1
1
  # Pix-UI Changelog
2
2
 
3
+ ## v13.4.4 (11/04/2022)
4
+
5
+
6
+ ### :bug: Correction
7
+ - [#209](https://github.com/1024pix/pix-ui/pull/209) [BUGFIX] Remplace la page courante si elle n'existe plus
8
+
9
+ ## v13.4.2 (07/04/2022)
10
+
11
+
12
+ ### :building_construction: Tech
13
+ - [#208](https://github.com/1024pix/pix-ui/pull/208) [TECH] Suppression de la margin dans Pix-Pagination (PIX-4733)
14
+
3
15
  ## v13.4.1 (05/04/2022)
4
16
 
5
17
 
@@ -1,4 +1,4 @@
1
- <footer class={{this.isCondensed}}>
1
+ <footer class={{this.isCondensed}} {{did-update this.checkCurrentPageAgainstPageCount @pagination}}>
2
2
  <section class="pix-pagination__size">
3
3
  <span class="pagination-size__label">{{this.beforeResultsPerPage}}</span>
4
4
  <PixSelect
@@ -118,4 +118,13 @@ export default class PixPagination extends Component {
118
118
  goToPreviousPage() {
119
119
  this.router.replaceWith({ queryParams: { pageNumber: this.previousPage } });
120
120
  }
121
+
122
+ @action
123
+ checkCurrentPageAgainstPageCount() {
124
+ const pageCount = this.args.pagination.pageCount;
125
+ if (pageCount === 0) return;
126
+ if (this.currentPage > pageCount) {
127
+ this.router.replaceWith({ queryParams: { pageNumber: pageCount } });
128
+ }
129
+ }
121
130
  }
@@ -1,7 +1,6 @@
1
1
  .pix-pagination, .pix-pagination-condensed {
2
2
  display: flex;
3
3
  justify-content: center;
4
- margin: 16px 0;
5
4
  color: $grey-60;
6
5
  font-size: 0.875rem;
7
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "13.4.1",
3
+ "version": "13.4.4",
4
4
  "description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -52,6 +52,7 @@
52
52
  "devDependencies": {
53
53
  "@1024pix/ember-testing-library": "^0.5.0",
54
54
  "@ember/optional-features": "^2.0.0",
55
+ "@ember/render-modifiers": "^2.0.4",
55
56
  "@ember/test-helpers": "^2.6.0",
56
57
  "@formatjs/intl": "^2.1.0",
57
58
  "@fortawesome/ember-fontawesome": "^0.2.3",