@quandis/qbo4.ui 4.0.1-CI-20250106-202740 → 4.0.1-CI-20250107-002248
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 +1 -1
- package/src/qbo/qbo-paginate.d.ts +1 -0
- package/src/qbo/qbo-paginate.js +10 -1
- package/src/qbo/qbo-paginate.ts +7 -1
- package/wwwroot/js/esm/qbo4.ui.js +11 -2
- package/wwwroot/js/esm/qbo4.ui.min.js +4 -4
- package/wwwroot/js/esm/qbo4.ui.min.js.map +1 -1
- package/wwwroot/js/qbo4.ui.js +11 -2
- package/wwwroot/js/qbo4.ui.min.js +4 -4
- package/wwwroot/js/qbo4.ui.min.js.map +1 -1
package/package.json
CHANGED
package/src/qbo/qbo-paginate.js
CHANGED
|
@@ -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,10 @@ 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;
|
|
60
|
+
if (first < 1)
|
|
61
|
+
first = 1;
|
|
57
62
|
let last = (this.maxPage > this.pageLimit)
|
|
58
63
|
? first + this.pageLimit - 1
|
|
59
64
|
: this.maxPage;
|
|
@@ -83,7 +88,7 @@ let QboPaginate = class QboPaginate extends LitElement {
|
|
|
83
88
|
}
|
|
84
89
|
renderPageSize() {
|
|
85
90
|
return html `<li class="pageSize">
|
|
86
|
-
<span
|
|
91
|
+
<span>${this.displayCountText}</span>
|
|
87
92
|
<input type="number" min="5" value="${this.display}" title="Display Size" @change=${(e) => this.setDisplaySize(e)}>
|
|
88
93
|
</li>`;
|
|
89
94
|
}
|
|
@@ -135,6 +140,10 @@ __decorate([
|
|
|
135
140
|
property({ type: Boolean }),
|
|
136
141
|
__metadata("design:type", Object)
|
|
137
142
|
], QboPaginate.prototype, "editSize", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
property({ type: String }),
|
|
145
|
+
__metadata("design:type", Object)
|
|
146
|
+
], QboPaginate.prototype, "displayCountText", void 0);
|
|
138
147
|
QboPaginate = __decorate([
|
|
139
148
|
customElement('qbo-paginate')
|
|
140
149
|
], QboPaginate);
|
package/src/qbo/qbo-paginate.ts
CHANGED
|
@@ -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,9 @@ 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;
|
|
74
|
+
if (first < 1) first = 1;
|
|
69
75
|
let last = (this.maxPage > this.pageLimit)
|
|
70
76
|
? first + this.pageLimit - 1
|
|
71
77
|
: this.maxPage;
|
|
@@ -97,7 +103,7 @@ export class QboPaginate extends LitElement {
|
|
|
97
103
|
|
|
98
104
|
renderPageSize() {
|
|
99
105
|
return html`<li class="pageSize">
|
|
100
|
-
<span
|
|
106
|
+
<span>${this.displayCountText}</span>
|
|
101
107
|
<input type="number" min="5" value="${this.display}" title="Display Size" @change=${(e) => this.setDisplaySize(e)}>
|
|
102
108
|
</li>`
|
|
103
109
|
}
|