@quandis/qbo4.ui 4.0.1-CI-20241022-235233 → 4.0.1-CI-20241024-193719
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/scss/qboui.scss +12 -0
- package/src/qbo/Program.d.ts +1 -0
- package/src/qbo/Program.js +1 -0
- package/src/qbo/Program.ts +1 -0
- package/src/qbo/RestApiService.js +1 -1
- package/src/qbo/RestApiService.ts +1 -1
- package/src/qbo/qbo-paginate.js +2 -2
- package/src/qbo/qbo-paginate.ts +2 -2
- package/src/qbo/qbo-selectable.d.ts +1 -0
- package/src/qbo/qbo-selectable.js +12 -0
- package/src/qbo/qbo-selectable.ts +11 -0
- package/src/qbo/styles.js +1 -1
- package/src/qbo/styles.ts +1 -1
- package/wwwroot/css/qboui.css +40 -8
- package/wwwroot/css/qboui.css.map +1 -1
- package/wwwroot/css/qboui.min.css +1 -1
- package/wwwroot/js/esm/qbo4.ui.js +26 -6
- package/wwwroot/js/esm/qbo4.ui.min.js +27 -27
- package/wwwroot/js/esm/qbo4.ui.min.js.map +1 -1
- package/wwwroot/js/qbo4.ui.js +22 -5
- package/wwwroot/js/qbo4.ui.min.js +27 -27
- package/wwwroot/js/qbo4.ui.min.js.map +1 -1
package/package.json
CHANGED
package/scss/qboui.scss
CHANGED
|
@@ -101,6 +101,18 @@
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
.qbo-paginate.small {
|
|
105
|
+
@extend .pagination-sm;
|
|
106
|
+
|
|
107
|
+
li.pageSize {
|
|
108
|
+
@extend .input-group-sm;
|
|
109
|
+
|
|
110
|
+
input {
|
|
111
|
+
@extend .form-control-sm;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
104
116
|
|
|
105
117
|
/* Sidebar - Start */
|
|
106
118
|
aside.qbo-sidebar {
|
package/src/qbo/Program.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export * from './qbo-selectable.js';
|
|
|
36
36
|
export * from './qbo-table.js';
|
|
37
37
|
export * from './qbo-user-preferences.js';
|
|
38
38
|
export * from './qbo-validate.js';
|
|
39
|
+
export * from './styles.js';
|
|
39
40
|
export declare function matches(source: any, match: any, wildCard?: string, ignoreCase?: boolean): boolean;
|
|
40
41
|
export declare function elementData(element: HTMLElement): Record<string, string>;
|
|
41
42
|
export declare function elementDate(date: string): string;
|
package/src/qbo/Program.js
CHANGED
|
@@ -25,6 +25,7 @@ export * from './qbo-selectable.js';
|
|
|
25
25
|
export * from './qbo-table.js';
|
|
26
26
|
export * from './qbo-user-preferences.js';
|
|
27
27
|
export * from './qbo-validate.js';
|
|
28
|
+
export * from './styles.js';
|
|
28
29
|
export function matches(source, match, wildCard = "*", ignoreCase = true) {
|
|
29
30
|
match = match.replace(/([.+^${}()|[\]\\])/g, '\\$1');
|
|
30
31
|
match = match.replace(new RegExp('\\' + wildCard, 'g'), ".*");
|
package/src/qbo/Program.ts
CHANGED
|
@@ -42,6 +42,7 @@ export * from './qbo-selectable.js';
|
|
|
42
42
|
export * from './qbo-table.js';
|
|
43
43
|
export * from './qbo-user-preferences.js';
|
|
44
44
|
export * from './qbo-validate.js';
|
|
45
|
+
export * from './styles.js';
|
|
45
46
|
|
|
46
47
|
export function matches(source, match, wildCard = "*", ignoreCase = true) {
|
|
47
48
|
match = match.replace(/([.+^${}()|[\]\\])/g, '\\$1');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { services } from "./Services.js";
|
|
2
2
|
import { substitute } from "./qbo-json.js";
|
|
3
3
|
export class RestApiService {
|
|
4
|
-
constructor(apiEndpoint, headers = {
|
|
4
|
+
constructor(apiEndpoint, headers = {}, method = null) {
|
|
5
5
|
this.relativePath = '';
|
|
6
6
|
this.apiEndpoint = apiEndpoint;
|
|
7
7
|
this.headers = headers;
|
|
@@ -9,7 +9,7 @@ export class RestApiService implements IApiService {
|
|
|
9
9
|
private method: string | null;
|
|
10
10
|
public relativePath: string = '';
|
|
11
11
|
|
|
12
|
-
constructor(apiEndpoint: string, headers: HeadersInit = {
|
|
12
|
+
constructor(apiEndpoint: string, headers: HeadersInit = { }, method: string | null = null) {
|
|
13
13
|
this.apiEndpoint = apiEndpoint;
|
|
14
14
|
this.headers = headers;
|
|
15
15
|
this.method = method;
|
package/src/qbo/qbo-paginate.js
CHANGED
|
@@ -90,13 +90,13 @@ let QboPaginate = class QboPaginate extends LitElement {
|
|
|
90
90
|
<nav aria-label="Page navigation">
|
|
91
91
|
<ul class="qbo-paginate">
|
|
92
92
|
<li class="${this.currentPage === 1 ? 'disabled' : ''}">
|
|
93
|
-
<a aria-label="Previous" @click="${(e) => this.goToPage(this.currentPage
|
|
93
|
+
<a aria-label="Previous" @click="${(e) => this.goToPage(--this.currentPage)}">
|
|
94
94
|
<span aria-hidden="true">«</span>
|
|
95
95
|
</a>
|
|
96
96
|
</li>
|
|
97
97
|
${this.renderPageNumbers()}
|
|
98
98
|
<li class="${this.currentPage === this.maxPage ? 'disabled' : ''}">
|
|
99
|
-
<a aria-label="Next" @click="${(e) => this.goToPage(this.currentPage
|
|
99
|
+
<a aria-label="Next" @click="${(e) => this.goToPage(++this.currentPage)}">
|
|
100
100
|
<span aria-hidden="true">»</span>
|
|
101
101
|
</a>
|
|
102
102
|
</li>
|
package/src/qbo/qbo-paginate.ts
CHANGED
|
@@ -104,13 +104,13 @@ export class QboPaginate extends LitElement {
|
|
|
104
104
|
<nav aria-label="Page navigation">
|
|
105
105
|
<ul class="qbo-paginate">
|
|
106
106
|
<li class="${this.currentPage === 1 ? 'disabled' : ''}">
|
|
107
|
-
<a aria-label="Previous" @click="${(e) => this.goToPage(this.currentPage
|
|
107
|
+
<a aria-label="Previous" @click="${(e) => this.goToPage(--this.currentPage) }">
|
|
108
108
|
<span aria-hidden="true">«</span>
|
|
109
109
|
</a>
|
|
110
110
|
</li>
|
|
111
111
|
${this.renderPageNumbers()}
|
|
112
112
|
<li class="${this.currentPage === this.maxPage ? 'disabled' : ''}">
|
|
113
|
-
<a aria-label="Next" @click="${(e) => this.goToPage(this.currentPage
|
|
113
|
+
<a aria-label="Next" @click="${(e) => this.goToPage(++this.currentPage)}">
|
|
114
114
|
<span aria-hidden="true">»</span>
|
|
115
115
|
</a>
|
|
116
116
|
</li>
|
|
@@ -25,6 +25,7 @@ let QboSelectable = class QboSelectable extends LitElement {
|
|
|
25
25
|
this.type = null;
|
|
26
26
|
this.selected = false;
|
|
27
27
|
this.mode = Mode.Single;
|
|
28
|
+
this.toggleCheckbox = true;
|
|
28
29
|
this.selectedItems = [];
|
|
29
30
|
this.target = null;
|
|
30
31
|
this._previousItem = null;
|
|
@@ -100,6 +101,13 @@ let QboSelectable = class QboSelectable extends LitElement {
|
|
|
100
101
|
}
|
|
101
102
|
item.classList.toggle(this.classSelected, selected);
|
|
102
103
|
item.classList.toggle(this.classUnselected, !selected);
|
|
104
|
+
if (this.toggleCheckbox) {
|
|
105
|
+
const checkbox = item instanceof HTMLInputElement && item.type === 'checkbox'
|
|
106
|
+
? item
|
|
107
|
+
: item.querySelector('input[type=checkbox]');
|
|
108
|
+
if (checkbox)
|
|
109
|
+
checkbox.checked = selected;
|
|
110
|
+
}
|
|
103
111
|
const index = this.selectedItems.indexOf(item);
|
|
104
112
|
if (selected && index === -1) {
|
|
105
113
|
this.selectedItems.push(item);
|
|
@@ -150,6 +158,10 @@ __decorate([
|
|
|
150
158
|
property({ type: Mode }),
|
|
151
159
|
__metadata("design:type", Object)
|
|
152
160
|
], QboSelectable.prototype, "mode", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
property(),
|
|
163
|
+
__metadata("design:type", Boolean)
|
|
164
|
+
], QboSelectable.prototype, "toggleCheckbox", void 0);
|
|
153
165
|
__decorate([
|
|
154
166
|
property({ attribute: false }),
|
|
155
167
|
__metadata("design:type", Object)
|
|
@@ -31,6 +31,9 @@ export class QboSelectable extends LitElement {
|
|
|
31
31
|
@property({ type: Mode })
|
|
32
32
|
mode = Mode.Single;
|
|
33
33
|
|
|
34
|
+
@property()
|
|
35
|
+
toggleCheckbox: boolean = true;
|
|
36
|
+
|
|
34
37
|
private selectedItems: HTMLElement[] = [];
|
|
35
38
|
|
|
36
39
|
@property({ attribute: false })
|
|
@@ -121,6 +124,14 @@ export class QboSelectable extends LitElement {
|
|
|
121
124
|
item.classList.toggle(this.classSelected, selected);
|
|
122
125
|
item.classList.toggle(this.classUnselected, !selected);
|
|
123
126
|
|
|
127
|
+
if (this.toggleCheckbox) {
|
|
128
|
+
const checkbox = item instanceof HTMLInputElement && item.type === 'checkbox'
|
|
129
|
+
? item
|
|
130
|
+
: item.querySelector('input[type=checkbox]') as HTMLInputElement | null;
|
|
131
|
+
if (checkbox)
|
|
132
|
+
checkbox.checked = selected;
|
|
133
|
+
}
|
|
134
|
+
|
|
124
135
|
const index = this.selectedItems.indexOf(item);
|
|
125
136
|
if (selected && index === -1) {
|
|
126
137
|
this.selectedItems.push(item);
|