@umbraco-ui/uui-pagination 1.0.0 → 1.1.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/lib/index.js CHANGED
@@ -32,7 +32,7 @@ let UUIPaginationElement = class extends LitElement {
32
32
  this._observer = new ResizeObserver(this._calculateRange.bind(this));
33
33
  this.label = "";
34
34
  this.ariaLabel = "";
35
- this.total = 1;
35
+ this._total = 100;
36
36
  this._range = 0;
37
37
  this._visiblePages = [];
38
38
  this._current = 1;
@@ -83,6 +83,14 @@ let UUIPaginationElement = class extends LitElement {
83
83
  );
84
84
  return pages;
85
85
  }
86
+ get total() {
87
+ return this._total;
88
+ }
89
+ set total(newValue) {
90
+ this._total = newValue;
91
+ this._visiblePages = this._generateVisiblePages(this._current);
92
+ this.requestUpdate("total", newValue);
93
+ }
86
94
  get current() {
87
95
  return this._current;
88
96
  }
@@ -255,7 +263,7 @@ __decorateClass([
255
263
  ], UUIPaginationElement.prototype, "ariaLabel", 2);
256
264
  __decorateClass([
257
265
  property({ type: Number })
258
- ], UUIPaginationElement.prototype, "total", 2);
266
+ ], UUIPaginationElement.prototype, "total", 1);
259
267
  __decorateClass([
260
268
  state()
261
269
  ], UUIPaginationElement.prototype, "_range", 2);
@@ -28,13 +28,15 @@ export declare class UUIPaginationElement extends LitElement {
28
28
  * @attr
29
29
  */
30
30
  ariaLabel: string;
31
+ private _total;
31
32
  /**
32
33
  * Set the amount of pages to navigate.
33
34
  * @type {number}
34
35
  * @attr
35
36
  * @default: 1
36
37
  */
37
- total: number;
38
+ get total(): number;
39
+ set total(newValue: number);
38
40
  private _range;
39
41
  private _visiblePages;
40
42
  private _current;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-pagination",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "Umbraco",
@@ -30,9 +30,9 @@
30
30
  "custom-elements.json"
31
31
  ],
32
32
  "dependencies": {
33
- "@umbraco-ui/uui-base": "1.0.0",
34
- "@umbraco-ui/uui-button": "1.0.0",
35
- "@umbraco-ui/uui-button-group": "1.0.0"
33
+ "@umbraco-ui/uui-base": "1.1.0",
34
+ "@umbraco-ui/uui-button": "1.1.0",
35
+ "@umbraco-ui/uui-button-group": "1.1.0"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",
@@ -43,5 +43,5 @@
43
43
  "access": "public"
44
44
  },
45
45
  "homepage": "https://uui.umbraco.com/?path=/story/uui-pagination",
46
- "gitHead": "ffb9cef00262b9f36177adcca9675b4893c0045e"
46
+ "gitHead": "5159a81e353c893c30073cdbf2fdd94306477d6e"
47
47
  }