@quandis/qbo4.ui 4.0.1-CI-20241107-011209 → 4.0.1-CI-20241108-002603
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 +2 -1
- package/scss/qbo.scss +466 -24
- package/src/qbo/qbo-api.js +5 -7
- package/src/qbo/qbo-api.ts +2 -1
- package/src/qbo/qbo-card.js +5 -7
- package/src/qbo/qbo-card.ts +4 -2
- package/src/qbo/qbo-contextmenu.js +5 -7
- package/src/qbo/qbo-contextmenu.ts +3 -1
- package/src/qbo/qbo-datalist.js +5 -7
- package/src/qbo/qbo-datalist.ts +4 -2
- package/src/qbo/qbo-docviewer.js +5 -7
- package/src/qbo/qbo-docviewer.ts +3 -1
- package/src/qbo/qbo-fetch.js +4 -0
- package/src/qbo/qbo-fetch.ts +3 -0
- package/src/qbo/qbo-form-edit.js +5 -7
- package/src/qbo/qbo-form-edit.ts +3 -1
- package/src/qbo/qbo-form-element.js +7 -12
- package/src/qbo/qbo-form-element.ts +2 -1
- package/src/qbo/qbo-icon.js +7 -11
- package/src/qbo/qbo-icon.ts +3 -1
- package/src/qbo/qbo-menu.d.ts +17 -15
- package/src/qbo/qbo-menu.js +88 -115
- package/src/qbo/qbo-menu.ts +95 -120
- package/src/qbo/qbo-microphone.js +7 -11
- package/src/qbo/qbo-microphone.ts +3 -1
- package/src/qbo/qbo-paginate.js +5 -7
- package/src/qbo/qbo-paginate.ts +3 -1
- package/src/qbo/qbo-popover.d.ts +13 -17
- package/src/qbo/qbo-popover.js +67 -80
- package/src/qbo/qbo-popover.ts +82 -54
- package/src/qbo/qbo-popup-listener.js +5 -7
- package/src/qbo/qbo-popup-listener.ts +3 -1
- package/src/qbo/qbo-popup.js +5 -7
- package/src/qbo/qbo-popup.ts +3 -1
- package/src/qbo/qbo-resize.js +5 -7
- package/src/qbo/qbo-resize.ts +3 -2
- package/src/qbo/qbo-select.js +5 -7
- package/src/qbo/qbo-select.ts +3 -1
- package/src/qbo/qbo-selectable.js +5 -7
- package/src/qbo/qbo-selectable.ts +3 -1
- package/src/qbo/qbo-table.js +5 -7
- package/src/qbo/qbo-table.ts +2 -1
- package/src/qbo/qbo-user-preferences.js +5 -8
- package/src/qbo/qbo-user-preferences.ts +3 -1
- package/src/qbo/qbo-validate.js +5 -8
- package/src/qbo/qbo-validate.ts +3 -1
- package/src/qbo/styles.js +2 -2
- package/src/qbo/styles.ts +2 -2
- package/wwwroot/css/qbo.css +448 -21
- package/wwwroot/css/qbo.css.map +1 -1
- package/wwwroot/css/qbo.min.css +1 -1
- package/wwwroot/css/qboui.css +450 -21
- package/wwwroot/css/qboui.css.map +1 -1
- package/wwwroot/css/qboui.min.css +1 -1
- package/wwwroot/favicon.ico +0 -0
- package/wwwroot/images/qbo-logo-new.svg +25 -0
- package/wwwroot/js/esm/qbo4.ui.js +2672 -7986
- package/wwwroot/js/esm/qbo4.ui.min.js +35 -48
- package/wwwroot/js/esm/qbo4.ui.min.js.LICENSE.txt +0 -6
- package/wwwroot/js/esm/qbo4.ui.min.js.map +1 -1
- package/wwwroot/js/qbo4.ui.js +2679 -8047
- package/wwwroot/js/qbo4.ui.min.js +43 -56
- package/wwwroot/js/qbo4.ui.min.js.LICENSE.txt +0 -6
- package/wwwroot/js/qbo4.ui.min.js.map +1 -1
package/src/qbo/qbo-popover.ts
CHANGED
|
@@ -1,74 +1,102 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { customElement, property } from
|
|
3
|
-
import {
|
|
4
|
-
import { QboFormElement } from './qbo-form-element.js';
|
|
1
|
+
import { LitElement, PropertyValues, html } from "lit";
|
|
2
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
3
|
+
import { computePosition, Placement, shift, flip } from "@floating-ui/dom";
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
export class QboPopover extends QboFormElement {
|
|
5
|
+
export class QboPopover extends LitElement {
|
|
8
6
|
|
|
9
7
|
@property({ type: String })
|
|
10
|
-
|
|
8
|
+
placement: Placement = "bottom";
|
|
11
9
|
|
|
12
10
|
@property({ type: String })
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
11
|
+
selector = '*[data-popover-trigger]';
|
|
12
|
+
|
|
13
|
+
// Internal state to control menu visibility
|
|
14
|
+
@state() private isOpen = false;
|
|
15
|
+
|
|
16
|
+
private triggerElement!: HTMLElement;
|
|
17
|
+
private middleware = [flip(), shift()];
|
|
18
|
+
|
|
19
|
+
private async setPosition() {
|
|
20
|
+
const { x, y } = await computePosition(
|
|
21
|
+
this.triggerElement,
|
|
22
|
+
this,
|
|
23
|
+
{
|
|
24
|
+
placement: this.placement as Placement | undefined,
|
|
25
|
+
middleware: this.middleware,
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
Object.assign(
|
|
30
|
+
this.style, {
|
|
31
|
+
left: `${x}px`,
|
|
32
|
+
top: `${y}px`,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
connectedCallback() {
|
|
37
|
+
super.connectedCallback();
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
document.addEventListener("qbo-popover-open", this.handleMenuOpen);
|
|
40
|
+
}
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
disconnectedCallback() {
|
|
43
|
+
super.disconnectedCallback();
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
renderInHost = true;
|
|
45
|
+
document.removeEventListener("qbo-popover-open", this.handleMenuOpen);
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
if (this.triggerElement != null) {
|
|
48
|
+
this.triggerElement.removeEventListener("mouseover", this.toggleMenu);
|
|
49
|
+
this.triggerElement.removeEventListener("mouseout", this.toggleMenu);
|
|
50
|
+
}
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
super.
|
|
54
|
-
|
|
55
|
-
this.setAttribute(this.toggleAtt, this.toggleValue);
|
|
56
|
-
this.setAttribute(this.placementAtt, this.placementValue);
|
|
57
|
-
this.setAttribute(this.containerAtt, this.containerValue);
|
|
58
|
-
this.setAttribute(this.htmlAtt, this.htmlValue);
|
|
59
|
-
}
|
|
53
|
+
firstUpdated(changes: PropertyValues) {
|
|
54
|
+
super.firstUpdated(changes);
|
|
60
55
|
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
this.triggerElement =
|
|
57
|
+
this.parentElement?.querySelector(this.selector) ||
|
|
58
|
+
this.shadowRoot?.querySelector(this.selector) ||
|
|
59
|
+
document.querySelector(this.selector) ||
|
|
60
|
+
this.parentElement as HTMLElement;
|
|
63
61
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
if (this.triggerElement != null) {
|
|
63
|
+
this.triggerElement.addEventListener("mouseover", this.toggleMenu);
|
|
64
|
+
this.triggerElement.addEventListener("mouseout", this.toggleMenu);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
handleMenuOpen = (event: Event) => {
|
|
69
|
+
event.preventDefault();
|
|
70
|
+
event.stopPropagation();
|
|
71
|
+
|
|
72
|
+
if ((event as CustomEvent).detail.menu !== this && this.isOpen) this.closeMenu();
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
toggleMenu = (event: Event) => {
|
|
76
|
+
this.isOpen = !this.isOpen;
|
|
77
|
+
this.classList.toggle("open", this.isOpen);
|
|
78
|
+
|
|
79
|
+
if (this.isOpen) {
|
|
80
|
+
this.setPosition();
|
|
81
|
+
document.dispatchEvent(
|
|
82
|
+
new CustomEvent("qbo-popover-open", {
|
|
83
|
+
bubbles: true,
|
|
84
|
+
composed: true,
|
|
85
|
+
detail: { menu: this },
|
|
86
|
+
})
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
closeMenu() {
|
|
92
|
+
this.isOpen = false;
|
|
93
|
+
this.classList.remove("open");
|
|
69
94
|
}
|
|
70
95
|
|
|
71
96
|
render() {
|
|
72
97
|
return html`<slot></slot>`;
|
|
73
98
|
}
|
|
74
|
-
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (!customElements.get('qbo-popover'))
|
|
102
|
+
customElements.define('qbo-popover', QboPopover)
|
|
@@ -8,11 +8,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { LitElement, html } from 'lit';
|
|
11
|
-
import {
|
|
11
|
+
import { property } from 'lit/decorators.js';
|
|
12
12
|
/**
|
|
13
13
|
* Listens for a popup event, and renders popup with the content.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
export class QboPopupListener extends LitElement {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments);
|
|
18
18
|
this.open = false;
|
|
@@ -102,7 +102,7 @@ let QboPopupListener = class QboPopupListener extends LitElement {
|
|
|
102
102
|
</slot>
|
|
103
103
|
`;
|
|
104
104
|
}
|
|
105
|
-
}
|
|
105
|
+
}
|
|
106
106
|
__decorate([
|
|
107
107
|
property({ type: Boolean }),
|
|
108
108
|
__metadata("design:type", Object)
|
|
@@ -139,7 +139,5 @@ __decorate([
|
|
|
139
139
|
property({ type: Boolean }),
|
|
140
140
|
__metadata("design:type", Object)
|
|
141
141
|
], QboPopupListener.prototype, "listen", void 0);
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
], QboPopupListener);
|
|
145
|
-
export { QboPopupListener };
|
|
142
|
+
if (!customElements.get('qbo-popup-listener'))
|
|
143
|
+
customElements.define('qbo-popup-listener', QboPopupListener);
|
|
@@ -4,7 +4,6 @@ import { customElement, property } from 'lit/decorators.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* Listens for a popup event, and renders popup with the content.
|
|
6
6
|
*/
|
|
7
|
-
@customElement('qbo-popup-listener')
|
|
8
7
|
export class QboPopupListener extends LitElement {
|
|
9
8
|
@property({ type: Boolean })
|
|
10
9
|
open = false;
|
|
@@ -127,3 +126,6 @@ export class QboPopupListener extends LitElement {
|
|
|
127
126
|
`;
|
|
128
127
|
}
|
|
129
128
|
}
|
|
129
|
+
|
|
130
|
+
if (!customElements.get('qbo-popup-listener'))
|
|
131
|
+
customElements.define('qbo-popup-listener', QboPopupListener)
|
package/src/qbo/qbo-popup.js
CHANGED
|
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { html, css } from 'lit';
|
|
11
|
-
import {
|
|
11
|
+
import { property } from 'lit/decorators.js';
|
|
12
12
|
import { QboFetch } from './qbo-fetch.js';
|
|
13
13
|
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
14
14
|
/**
|
|
@@ -17,7 +17,7 @@ import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
|
17
17
|
* @remarks
|
|
18
18
|
* This element is a thin wrapper around {@link QboFetch} that renders a <select> element with options populated from a JSON array.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
export class QboPopup extends QboFetch {
|
|
21
21
|
constructor() {
|
|
22
22
|
super(...arguments);
|
|
23
23
|
this.open = false;
|
|
@@ -76,7 +76,7 @@ let QboPopup = class QboPopup extends QboFetch {
|
|
|
76
76
|
<slot name="content" @click="${this.hide}" style="display:${this.open ? 'flex' : 'none'}">${unsafeHTML(this.html)}</slot>
|
|
77
77
|
`;
|
|
78
78
|
}
|
|
79
|
-
}
|
|
79
|
+
}
|
|
80
80
|
__decorate([
|
|
81
81
|
property({ type: Boolean }),
|
|
82
82
|
__metadata("design:type", Object)
|
|
@@ -89,7 +89,5 @@ __decorate([
|
|
|
89
89
|
property({ type: Boolean }),
|
|
90
90
|
__metadata("design:type", Object)
|
|
91
91
|
], QboPopup.prototype, "renderInHost", void 0);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
], QboPopup);
|
|
95
|
-
export { QboPopup };
|
|
92
|
+
if (!customElements.get('qbo-popup'))
|
|
93
|
+
customElements.define('qbo-popup', QboPopup);
|
package/src/qbo/qbo-popup.ts
CHANGED
|
@@ -9,7 +9,6 @@ import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
|
9
9
|
* @remarks
|
|
10
10
|
* This element is a thin wrapper around {@link QboFetch} that renders a <select> element with options populated from a JSON array.
|
|
11
11
|
*/
|
|
12
|
-
@customElement('qbo-popup')
|
|
13
12
|
export class QboPopup extends QboFetch {
|
|
14
13
|
@property({ type: Boolean })
|
|
15
14
|
open = false;
|
|
@@ -82,3 +81,6 @@ export class QboPopup extends QboFetch {
|
|
|
82
81
|
`;
|
|
83
82
|
}
|
|
84
83
|
}
|
|
84
|
+
|
|
85
|
+
if (!customElements.get('qbo-popup'))
|
|
86
|
+
customElements.define('qbo-popup', QboPopup)
|
package/src/qbo/qbo-resize.js
CHANGED
|
@@ -8,13 +8,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { LitElement, html, css } from 'lit';
|
|
11
|
-
import {
|
|
11
|
+
import { property, state } from 'lit/decorators.js';
|
|
12
12
|
export var ResizeType;
|
|
13
13
|
(function (ResizeType) {
|
|
14
14
|
ResizeType["Horizontal"] = "horizontal";
|
|
15
15
|
ResizeType["Vertical"] = "vertical";
|
|
16
16
|
})(ResizeType || (ResizeType = {}));
|
|
17
|
-
|
|
17
|
+
export class QboResize extends LitElement {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments);
|
|
20
20
|
this.isResizing = false;
|
|
@@ -93,7 +93,7 @@ let QboResize = class QboResize extends LitElement {
|
|
|
93
93
|
render() {
|
|
94
94
|
return html `<slot><span></span></slot>`;
|
|
95
95
|
}
|
|
96
|
-
}
|
|
96
|
+
}
|
|
97
97
|
__decorate([
|
|
98
98
|
state(),
|
|
99
99
|
__metadata("design:type", Object)
|
|
@@ -102,7 +102,5 @@ __decorate([
|
|
|
102
102
|
property(),
|
|
103
103
|
__metadata("design:type", String)
|
|
104
104
|
], QboResize.prototype, "type", void 0);
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
], QboResize);
|
|
108
|
-
export { QboResize };
|
|
105
|
+
if (!customElements.get('qbo-resize'))
|
|
106
|
+
customElements.define('qbo-resize', QboResize);
|
package/src/qbo/qbo-resize.ts
CHANGED
|
@@ -6,8 +6,6 @@ export enum ResizeType {
|
|
|
6
6
|
Vertical = 'vertical'
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
@customElement('qbo-resize')
|
|
11
9
|
export class QboResize extends LitElement {
|
|
12
10
|
static styles = css`
|
|
13
11
|
`;
|
|
@@ -101,3 +99,6 @@ export class QboResize extends LitElement {
|
|
|
101
99
|
return html`<slot><span></span></slot>`;
|
|
102
100
|
}
|
|
103
101
|
}
|
|
102
|
+
|
|
103
|
+
if (!customElements.get('qbo-resize'))
|
|
104
|
+
customElements.define('qbo-resize', QboResize)
|
package/src/qbo/qbo-select.js
CHANGED
|
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { html, css } from 'lit';
|
|
11
|
-
import {
|
|
11
|
+
import { property } from 'lit/decorators.js';
|
|
12
12
|
import { getArray } from './qbo-json.js';
|
|
13
13
|
import { QboFormElement, getApiService } from './Program.js';
|
|
14
14
|
/**
|
|
@@ -17,7 +17,7 @@ import { QboFormElement, getApiService } from './Program.js';
|
|
|
17
17
|
* @remarks
|
|
18
18
|
* This element is a thin wrapper around {@link QboFetch} that renders a <select> element with options populated from a JSON array.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
export class QboSelect extends QboFormElement {
|
|
21
21
|
constructor() {
|
|
22
22
|
super(...arguments);
|
|
23
23
|
this.apiEndpoint = 'default';
|
|
@@ -59,7 +59,7 @@ let QboSelect = class QboSelect extends QboFormElement {
|
|
|
59
59
|
${this.options.map(option => html `<option value="${option[this.optionValue]}" ?selected="${option[this.optionValue] == this.defaultValue}">${option[this.optionText]}</option>`)}
|
|
60
60
|
</select>`;
|
|
61
61
|
}
|
|
62
|
-
}
|
|
62
|
+
}
|
|
63
63
|
__decorate([
|
|
64
64
|
property({ type: String }),
|
|
65
65
|
__metadata("design:type", Object)
|
|
@@ -100,7 +100,5 @@ __decorate([
|
|
|
100
100
|
property({ type: Boolean }),
|
|
101
101
|
__metadata("design:type", Object)
|
|
102
102
|
], QboSelect.prototype, "renderInHost", void 0);
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
], QboSelect);
|
|
106
|
-
export { QboSelect };
|
|
103
|
+
if (!customElements.get('qbo-select'))
|
|
104
|
+
customElements.define('qbo-select', QboSelect);
|
package/src/qbo/qbo-select.ts
CHANGED
|
@@ -10,7 +10,6 @@ import { IApiService, QboFormElement, getApiService } from './Program.js';
|
|
|
10
10
|
* @remarks
|
|
11
11
|
* This element is a thin wrapper around {@link QboFetch} that renders a <select> element with options populated from a JSON array.
|
|
12
12
|
*/
|
|
13
|
-
@customElement('qbo-select')
|
|
14
13
|
export class QboSelect extends QboFormElement
|
|
15
14
|
{
|
|
16
15
|
@property({ type: String })
|
|
@@ -77,3 +76,6 @@ export class QboSelect extends QboFormElement
|
|
|
77
76
|
</select>`;
|
|
78
77
|
}
|
|
79
78
|
}
|
|
79
|
+
|
|
80
|
+
if (!customElements.get('qbo-select'))
|
|
81
|
+
customElements.define('qbo-select', QboSelect)
|
|
@@ -8,14 +8,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { LitElement, css, html } from "lit";
|
|
11
|
-
import {
|
|
11
|
+
import { property } from "lit/decorators.js";
|
|
12
12
|
import { qboui } from "./styles.js";
|
|
13
13
|
export var Mode;
|
|
14
14
|
(function (Mode) {
|
|
15
15
|
Mode["Single"] = "single";
|
|
16
16
|
Mode["Multi"] = "multi";
|
|
17
17
|
})(Mode || (Mode = {}));
|
|
18
|
-
|
|
18
|
+
export class QboSelectable extends LitElement {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(...arguments);
|
|
21
21
|
this.classSelected = 'qbo-select-on';
|
|
@@ -129,7 +129,7 @@ let QboSelectable = class QboSelectable extends LitElement {
|
|
|
129
129
|
});
|
|
130
130
|
this.dispatchEvent(event);
|
|
131
131
|
}
|
|
132
|
-
}
|
|
132
|
+
}
|
|
133
133
|
__decorate([
|
|
134
134
|
property(),
|
|
135
135
|
__metadata("design:type", String)
|
|
@@ -166,7 +166,5 @@ __decorate([
|
|
|
166
166
|
property({ attribute: false }),
|
|
167
167
|
__metadata("design:type", Object)
|
|
168
168
|
], QboSelectable.prototype, "target", void 0);
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
], QboSelectable);
|
|
172
|
-
export { QboSelectable };
|
|
169
|
+
if (!customElements.get('qbo-selectable'))
|
|
170
|
+
customElements.define('qbo-selectable', QboSelectable);
|
|
@@ -7,7 +7,6 @@ export enum Mode {
|
|
|
7
7
|
Multi = 'multi'
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
@customElement('qbo-selectable')
|
|
11
10
|
export class QboSelectable extends LitElement {
|
|
12
11
|
|
|
13
12
|
@property()
|
|
@@ -154,3 +153,6 @@ export class QboSelectable extends LitElement {
|
|
|
154
153
|
this.dispatchEvent(event);
|
|
155
154
|
}
|
|
156
155
|
}
|
|
156
|
+
|
|
157
|
+
if (!customElements.get('qbo-selectable'))
|
|
158
|
+
customElements.define('qbo-selectable', QboSelectable)
|
package/src/qbo/qbo-table.js
CHANGED
|
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { html } from 'lit';
|
|
11
|
-
import {
|
|
11
|
+
import { property } from 'lit/decorators.js';
|
|
12
12
|
import { getArray, replicate } from './qbo-json.js';
|
|
13
13
|
import { QboFetch } from './qbo-fetch.js';
|
|
14
14
|
/**
|
|
@@ -18,7 +18,7 @@ import { QboFetch } from './qbo-fetch.js';
|
|
|
18
18
|
* This element is a thin wrapper around {@link QboFetch} that renders a <table> element with options populated from a JSON array.
|
|
19
19
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template#examples
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
export class QboTable extends QboFetch {
|
|
22
22
|
constructor() {
|
|
23
23
|
super(...arguments);
|
|
24
24
|
this.loading = false;
|
|
@@ -67,7 +67,7 @@ let QboTable = class QboTable extends QboFetch {
|
|
|
67
67
|
}
|
|
68
68
|
return null;
|
|
69
69
|
}
|
|
70
|
-
}
|
|
70
|
+
}
|
|
71
71
|
__decorate([
|
|
72
72
|
property({ type: Boolean }),
|
|
73
73
|
__metadata("design:type", Object)
|
|
@@ -88,7 +88,5 @@ __decorate([
|
|
|
88
88
|
property(),
|
|
89
89
|
__metadata("design:type", Object)
|
|
90
90
|
], QboTable.prototype, "options", void 0);
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
], QboTable);
|
|
94
|
-
export { QboTable };
|
|
91
|
+
if (!customElements.get('qbo-table'))
|
|
92
|
+
customElements.define('qbo-table', QboTable);
|
package/src/qbo/qbo-table.ts
CHANGED
|
@@ -10,7 +10,6 @@ import { QboFetch } from './qbo-fetch.js';
|
|
|
10
10
|
* This element is a thin wrapper around {@link QboFetch} that renders a <table> element with options populated from a JSON array.
|
|
11
11
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template#examples
|
|
12
12
|
*/
|
|
13
|
-
@customElement('qbo-table')
|
|
14
13
|
export class QboTable extends QboFetch {
|
|
15
14
|
@property({ type: Boolean })
|
|
16
15
|
loading = false;
|
|
@@ -78,3 +77,5 @@ export class QboTable extends QboFetch {
|
|
|
78
77
|
|
|
79
78
|
}
|
|
80
79
|
|
|
80
|
+
if (!customElements.get('qbo-table'))
|
|
81
|
+
customElements.define('qbo-table', QboTable)
|
|
@@ -8,9 +8,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { LitElement, html, css } from 'lit';
|
|
11
|
-
import {
|
|
11
|
+
import { property, state } from 'lit/decorators.js';
|
|
12
12
|
import { qboui } from './styles.js';
|
|
13
|
-
|
|
13
|
+
export class QboUserPreferences extends LitElement {
|
|
14
14
|
static { this.styles = [qboui, css `
|
|
15
15
|
:host {
|
|
16
16
|
display: block;
|
|
@@ -89,7 +89,7 @@ let QboUserPreferences = class QboUserPreferences extends LitElement {
|
|
|
89
89
|
</dialog>
|
|
90
90
|
` : html ``}`;
|
|
91
91
|
}
|
|
92
|
-
}
|
|
92
|
+
}
|
|
93
93
|
__decorate([
|
|
94
94
|
property({ type: Object }),
|
|
95
95
|
__metadata("design:type", Object)
|
|
@@ -102,11 +102,6 @@ __decorate([
|
|
|
102
102
|
state(),
|
|
103
103
|
__metadata("design:type", Object)
|
|
104
104
|
], QboUserPreferences.prototype, "isEditing", void 0);
|
|
105
|
-
QboUserPreferences = __decorate([
|
|
106
|
-
customElement('qbo-user-preferences'),
|
|
107
|
-
__metadata("design:paramtypes", [])
|
|
108
|
-
], QboUserPreferences);
|
|
109
|
-
export { QboUserPreferences };
|
|
110
105
|
export function setUserPreference(preference, value, storageKey = 'qbo4.ui.preferences') {
|
|
111
106
|
// Get the current stored preferences
|
|
112
107
|
const storedPreferences = localStorage.getItem(storageKey);
|
|
@@ -176,3 +171,5 @@ export function formatDate(dateString, format = null) {
|
|
|
176
171
|
const formattedDate = new Intl.DateTimeFormat(undefined, options).format(new Date(dateString));
|
|
177
172
|
return formattedDate;
|
|
178
173
|
}
|
|
174
|
+
if (!customElements.get('qbo-user-preferences'))
|
|
175
|
+
customElements.define('qbo-user-preferences', QboUserPreferences);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
3
3
|
import { qboui } from './styles.js';
|
|
4
4
|
|
|
5
|
-
@customElement('qbo-user-preferences')
|
|
6
5
|
export class QboUserPreferences extends LitElement {
|
|
7
6
|
@property({ type: Object }) preferences = {};
|
|
8
7
|
|
|
@@ -165,3 +164,6 @@ export function formatDate(dateString: string | Date | undefined | null, format:
|
|
|
165
164
|
|
|
166
165
|
return formattedDate;
|
|
167
166
|
}
|
|
167
|
+
|
|
168
|
+
if (!customElements.get('qbo-user-preferences'))
|
|
169
|
+
customElements.define('qbo-user-preferences', QboUserPreferences)
|
package/src/qbo/qbo-validate.js
CHANGED
|
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { LitElement, html } from 'lit';
|
|
11
|
-
import {
|
|
11
|
+
import { property } from 'lit/decorators.js';
|
|
12
12
|
import { ValidateToken } from './IValidate.js';
|
|
13
13
|
import { services } from './Services.js';
|
|
14
14
|
/**
|
|
@@ -34,7 +34,7 @@ import { services } from './Services.js';
|
|
|
34
34
|
* });
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
export class QboValidate extends LitElement {
|
|
38
38
|
constructor() {
|
|
39
39
|
super();
|
|
40
40
|
this.renderInHost = false;
|
|
@@ -120,7 +120,7 @@ let QboValidate = class QboValidate extends LitElement {
|
|
|
120
120
|
render() {
|
|
121
121
|
return html ``;
|
|
122
122
|
}
|
|
123
|
-
}
|
|
123
|
+
}
|
|
124
124
|
__decorate([
|
|
125
125
|
property({ type: Boolean }),
|
|
126
126
|
__metadata("design:type", Object)
|
|
@@ -142,8 +142,5 @@ __decorate([
|
|
|
142
142
|
}),
|
|
143
143
|
__metadata("design:type", Object)
|
|
144
144
|
], QboValidate.prototype, "workingClass", void 0);
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
__metadata("design:paramtypes", [])
|
|
148
|
-
], QboValidate);
|
|
149
|
-
export { QboValidate };
|
|
145
|
+
if (!customElements.get('qbo-validate'))
|
|
146
|
+
customElements.define('qbo-validate', QboValidate);
|
package/src/qbo/qbo-validate.ts
CHANGED
|
@@ -27,7 +27,6 @@ import { DependencyContainer } from 'tsyringe';
|
|
|
27
27
|
* });
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
@customElement('qbo-validate')
|
|
31
30
|
export class QboValidate extends LitElement {
|
|
32
31
|
|
|
33
32
|
@property({ type: Boolean })
|
|
@@ -139,3 +138,6 @@ export class QboValidate extends LitElement {
|
|
|
139
138
|
}
|
|
140
139
|
|
|
141
140
|
}
|
|
141
|
+
|
|
142
|
+
if (!customElements.get('qbo-validate'))
|
|
143
|
+
customElements.define('qbo-validate', QboValidate)
|