@quandis/qbo4.ui 4.0.1-CI-20250106-202740 → 4.0.1-CI-20250106-222914

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Quandis, Inc.",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
- "version": "4.0.1-CI-20250106-202740",
6
+ "version": "4.0.1-CI-20250106-222914",
7
7
  "workspaces": [
8
8
  "code"
9
9
  ],
@@ -7,6 +7,7 @@ export declare class QboPaginate extends LitElement {
7
7
  currentPage: number;
8
8
  rollingView: boolean;
9
9
  editSize: boolean;
10
+ displayCountText: string;
10
11
  private get maxPage();
11
12
  static styles: import("lit").CSSResult[];
12
13
  goToPage(page: any): void;
@@ -20,6 +20,7 @@ let QboPaginate = class QboPaginate extends LitElement {
20
20
  this.currentPage = 1;
21
21
  this.rollingView = true;
22
22
  this.editSize = true;
23
+ this.displayCountText = 'Results per page:';
23
24
  }
24
25
  get maxPage() {
25
26
  return Math.floor(this.count / this.display) + (this.count % this.display === 0 ? 0 : 1);
@@ -54,6 +55,8 @@ let QboPaginate = class QboPaginate extends LitElement {
54
55
  : 1;
55
56
  if (first < 1)
56
57
  first = 1;
58
+ if (first + this.pageLimit > this.maxPage)
59
+ first = this.maxPage - this.pageLimit + 1;
57
60
  let last = (this.maxPage > this.pageLimit)
58
61
  ? first + this.pageLimit - 1
59
62
  : this.maxPage;
@@ -83,7 +86,7 @@ let QboPaginate = class QboPaginate extends LitElement {
83
86
  }
84
87
  renderPageSize() {
85
88
  return html `<li class="pageSize">
86
- <span>Records per page:</span>
89
+ <span>${this.displayCountText}</span>
87
90
  <input type="number" min="5" value="${this.display}" title="Display Size" @change=${(e) => this.setDisplaySize(e)}>
88
91
  </li>`;
89
92
  }
@@ -135,6 +138,10 @@ __decorate([
135
138
  property({ type: Boolean }),
136
139
  __metadata("design:type", Object)
137
140
  ], QboPaginate.prototype, "editSize", void 0);
141
+ __decorate([
142
+ property({ type: String }),
143
+ __metadata("design:type", Object)
144
+ ], QboPaginate.prototype, "displayCountText", void 0);
138
145
  QboPaginate = __decorate([
139
146
  customElement('qbo-paginate')
140
147
  ], QboPaginate);
@@ -25,6 +25,9 @@ export class QboPaginate extends LitElement {
25
25
  @property({ type: Boolean })
26
26
  editSize = true;
27
27
 
28
+ @property({ type: String })
29
+ displayCountText = 'Results per page:';
30
+
28
31
  private get maxPage(): number {
29
32
  return Math.floor(this.count / this.display) + (this.count % this.display === 0 ? 0 : 1);
30
33
  }
@@ -66,6 +69,8 @@ export class QboPaginate extends LitElement {
66
69
  ? this.currentPage - Math.floor(this.pageLimit / 2)
67
70
  : 1;
68
71
  if (first < 1) first = 1;
72
+ if (first + this.pageLimit > this.maxPage)
73
+ first = this.maxPage - this.pageLimit + 1;
69
74
  let last = (this.maxPage > this.pageLimit)
70
75
  ? first + this.pageLimit - 1
71
76
  : this.maxPage;
@@ -97,7 +102,7 @@ export class QboPaginate extends LitElement {
97
102
 
98
103
  renderPageSize() {
99
104
  return html`<li class="pageSize">
100
- <span>Records per page:</span>
105
+ <span>${this.displayCountText}</span>
101
106
  <input type="number" min="5" value="${this.display}" title="Display Size" @change=${(e) => this.setDisplaySize(e)}>
102
107
  </li>`
103
108
  }